diff --git a/.cargo/config.toml b/.cargo/config.toml index 0c1258f6..0584e1b4 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -9,3 +9,15 @@ linker = "arm-linux-gnueabihf-gcc" [target.aarch64-unknown-linux-musl] linker = "aarch64-linux-musl-gcc" + +[target.x86_64-unknown-linux-musl] +linker = "x86_64-linux-musl-gcc" + +[target.powerpc64le-unknown-linux-gnu] +linker = "powerpc64le-linux-gnu-gcc" + +[target.s390x-unknown-linux-gnu] +linker = "s390x-linux-gnu-gcc" + +[target.mips-unknown-linux-gnu] +linker = "mips-linux-gnu-gcc" diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 86da3ebf..472472c5 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,5 @@ # Please see the documentation for all configuration options: -# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file +# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference version: 2 updates: diff --git a/.github/scripts/download_kernel_images.sh b/.github/scripts/download_kernel_images.sh new file mode 100755 index 00000000..da827460 --- /dev/null +++ b/.github/scripts/download_kernel_images.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +set -euo pipefail + +# Check for required arguments. +if [ "$#" -lt 3 ]; then + echo "Usage: $0 [ ...]" + exit 1 +fi + +OUTPUT_DIR=$1 +ARCHITECTURE=$2 +shift 2 +VERSIONS=("$@") + +URLS=$(lynx -dump -listonly -nonumbers https://mirrors.wikimedia.org/debian/pool/main/l/linux/) +readonly URLS + +# Find the latest revision of each kernel version. +FILES=() +for VERSION in "${VERSIONS[@]}"; do + REGEX="linux-image-${VERSION//./\\.}\\.[0-9]+(-[0-9]+)?(\+bpo|\+deb[0-9]+)?-cloud-${ARCHITECTURE}-unsigned_.*\\.deb" + match=$(printf '%s\n' "$URLS" | grep -E "$REGEX" | sort -V | tail -n1) || { + printf '%s\nVERSION=%s\nREGEX=%s\n' "$URLS" "$VERSION" "$REGEX" >&2 + exit 1 + } + FILES+=("$match") +done + +# Note: `--etag-{compare,save}` are not idempotent until curl 8.9.0 which included +# https://github.com/curl/curl/commit/85efbb92b8e6679705e122cee45ce76c56414a3e. At the time of +# writing our CI uses Ubuntu 22.04 which has curl 7.81.0 and the latest available is Ubuntu 24.04 +# which has curl 8.5.0. Since neither has a new enough curl, we don't bother to update, but we +# should do so when Ubuntu 24.10 or later is available. +mkdir -p "$OUTPUT_DIR" +KEEP=() +for FILE in "${FILES[@]}"; do + name=$(basename "$FILE") + etag_name="$name.etag" + KEEP+=("$name" "$etag_name") + + etag="$OUTPUT_DIR/$etag_name" + curl -sfSL --output-dir "$OUTPUT_DIR" --remote-name-all --etag-compare "$etag" --etag-save "$etag" "$FILE" +done + +# Remove any files that were previously downloaded that are no longer needed. +FIND_ARGS=() +for FILE in "${KEEP[@]}"; do + FIND_ARGS+=("!" "-name" "$FILE") +done +find "$OUTPUT_DIR" -type f "${FIND_ARGS[@]}" -exec rm {} + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 951832bd..72937e20 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,12 +2,8 @@ name: aya-ci on: push: - branches: - - main pull_request: - branches: - - main schedule: - cron: 00 4 * * * @@ -17,15 +13,17 @@ env: jobs: lint: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - - uses: dtolnay/rust-toolchain@master + - uses: dtolnay/rust-toolchain@nightly with: - toolchain: nightly - components: rustfmt, clippy, miri, rust-src + components: clippy,miri,rustfmt,rust-src + + # Installed *after* nightly so it is the default. + - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 @@ -33,28 +31,42 @@ jobs: with: tool: cargo-hack,taplo-cli - - name: Check C formatting - run: git ls-files -- '*.c' '*.h' | xargs clang-format --dry-run --Werror + - run: git ls-files -- '*.c' '*.h' | xargs clang-format --dry-run --Werror - - name: Check Markdown - uses: DavidAnson/markdownlint-cli2-action@v16 + - uses: DavidAnson/markdownlint-cli2-action@v20 - - name: Check TOML formatting - run: taplo fmt --check + - run: taplo fmt --check - - name: Check formatting - run: cargo fmt --all -- --check + - run: cargo +nightly fmt --all -- --check - - name: Run clippy - run: cargo hack clippy --all-targets --feature-powerset --workspace -- --deny warnings + - run: ./clippy.sh - - name: Check public API - run: cargo xtask public-api + # On the `aya-rs/aya` repository, regenerate the public API on a schedule. + # + # On all other events and repositories assert the public API is up to date. + - run: cargo xtask public-api + if: ${{ !(github.event_name == 'schedule' && github.repository == 'aya-rs/aya') }} + - run: cargo xtask public-api --bless + if: ${{ (github.event_name == 'schedule' && github.repository == 'aya-rs/aya') }} + - uses: peter-evans/create-pull-request@v7 + if: ${{ (github.event_name == 'schedule' && github.repository == 'aya-rs/aya') }} + with: + # GitHub actions aren't allowed to trigger other actions to prevent + # abuse; the canonical workaround is to use a sufficiently authorized + # token. + # + # See https://github.com/peter-evans/create-pull-request/issues/48. + token: ${{ secrets.CRABBY_GITHUB_TOKEN }} + branch: create-pull-request/public-api + commit-message: 'public-api: regenerate' + title: 'public-api: regenerate' + body: | + **Automated changes** - name: Run miri run: | set -euxo pipefail - cargo hack miri test --all-targets --feature-powerset \ + cargo +nightly hack miri test --all-targets --feature-powerset \ --exclude aya-ebpf \ --exclude aya-ebpf-bindings \ --exclude aya-log-ebpf \ @@ -67,23 +79,26 @@ jobs: fail-fast: false matrix: arch: - - x86_64-unknown-linux-gnu - aarch64-unknown-linux-gnu - armv7-unknown-linux-gnueabi + - loongarch64-unknown-linux-gnu + - powerpc64le-unknown-linux-gnu - riscv64gc-unknown-linux-gnu - runs-on: ubuntu-22.04 + - s390x-unknown-linux-gnu + - x86_64-unknown-linux-gnu + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - - uses: dtolnay/rust-toolchain@master + - uses: dtolnay/rust-toolchain@stable with: - toolchain: stable targets: ${{ matrix.arch }} - uses: Swatinem/rust-cache@v2 - uses: taiki-e/install-action@cargo-hack + # This is magic, it sets `$CARGO_BUILD_TARGET`. - uses: taiki-e/setup-cross-toolchain-action@v1 with: target: ${{ matrix.arch }} @@ -96,6 +111,7 @@ jobs: --exclude aya-ebpf-bindings \ --exclude aya-log-ebpf \ --exclude integration-ebpf \ + --exclude xtask \ --workspace - name: Test @@ -103,186 +119,241 @@ jobs: RUST_BACKTRACE: full run: | set -euxo pipefail - cargo hack test --all-targets --feature-powerset \ + cargo hack test --all-targets \ --exclude aya-ebpf \ --exclude aya-ebpf-bindings \ --exclude aya-log-ebpf \ --exclude integration-ebpf \ --exclude integration-test \ - --workspace + --feature-powerset - name: Doctests env: RUST_BACKTRACE: full run: | set -euxo pipefail - cargo hack test --doc --feature-powerset \ + cargo hack test --doc \ --exclude aya-ebpf \ --exclude aya-ebpf-bindings \ --exclude aya-log-ebpf \ - --exclude init \ --exclude integration-ebpf \ --exclude integration-test \ - --workspace + --feature-powerset build-test-aya-ebpf: - strategy: - fail-fast: false - matrix: - arch: - - x86_64 - - aarch64 - - arm - - riscv64 - target: - - bpfel-unknown-none - - bpfeb-unknown-none - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - - uses: dtolnay/rust-toolchain@master + - uses: dtolnay/rust-toolchain@nightly with: - toolchain: nightly components: rust-src + # Installed *after* nightly so it is the default. + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 - - name: bpf-linker - run: cargo install bpf-linker --git https://github.com/aya-rs/bpf-linker.git + - run: cargo install --git https://github.com/aya-rs/bpf-linker.git bpf-linker --features llvm-21 - uses: taiki-e/install-action@cargo-hack - - name: Build - env: - CARGO_CFG_BPF_TARGET_ARCH: ${{ matrix.arch }} - run: | - set -euxo pipefail - cargo hack build --package aya-ebpf --package aya-log-ebpf \ - --feature-powerset \ - --target ${{ matrix.target }} \ - -Z build-std=core - - name: Test + - name: Build & test for all BPF architectures env: - CARGO_CFG_BPF_TARGET_ARCH: ${{ matrix.arch }} RUST_BACKTRACE: full run: | - set -euxo pipefail - cargo hack test --doc \ - --package aya-ebpf \ - --package aya-log-ebpf \ - --feature-powerset + set -euo pipefail + + failures=() + + # NB: this hand-rolled shell script is used instead of a matrix + # because the time spent doing useful work per target is about equal + # to the overhead of setting up the job - so this saves a bunch of + # machine time. + for arch in aarch64 arm loongarch64 mips powerpc64 riscv64 s390x x86_64; do + echo "::group::arch=$arch" + export RUSTFLAGS="--cfg bpf_target_arch=\"$arch\"" + for target in bpfeb-unknown-none bpfel-unknown-none; do + echo "::group::target=$target" + if ! ( + cargo +nightly hack build \ + --release \ + --target "$target" \ + -Z build-std=core \ + --package aya-ebpf \ + --package aya-ebpf-bindings \ + --package aya-log-ebpf \ + --package integration-ebpf \ + --feature-powerset + ); then + failures+=("build: $arch/$target") + fi + echo "::endgroup::" + done + if ! ( + RUSTDOCFLAGS=$RUSTFLAGS cargo +nightly hack test --doc \ + --package aya-ebpf \ + --package aya-ebpf-bindings \ + --package aya-log-ebpf \ + --package integration-ebpf \ + --feature-powerset + ); then + failures+=("doctests: $arch") + fi + echo "::endgroup::" + done + + if ((${#failures[@]})); then + echo "::error::Some builds/tests failed:" + printf ' %s\n' "${failures[@]}" + exit 1 + fi run-integration-test: strategy: fail-fast: false matrix: - runner: - - macos-12 - - ubuntu-22.04 - runs-on: ${{ matrix.runner }} + include: + # TODO(https://github.com/actions/runner-images/issues/13277): Reenable when fixed. + # - target: x86_64-apple-darwin + # macos-15 is arm64[0] which doesn't support nested + # virtualization[1]. + # + # [0] https://github.com/actions/runner-images#available-images + # + # [1] https://docs.github.com/en/actions/reference/runners/github-hosted-runners#limitations-for-arm64-macos-runners + # + # os: macos-15-intel + + # We don't use ubuntu-latest because we care about the apt packages available. + - target: x86_64-unknown-linux-gnu + os: ubuntu-24.04 + - target: aarch64-unknown-linux-gnu + os: ubuntu-24.04-arm + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: submodules: recursive - - uses: dtolnay/rust-toolchain@master - with: - toolchain: nightly - components: rust-src - targets: aarch64-unknown-linux-musl,x86_64-unknown-linux-musl - - - uses: Swatinem/rust-cache@v2 - - name: Install prerequisites if: runner.os == 'Linux' - # ubuntu-22.04 comes with clang 14[0] which doesn't include support for signed and 64bit - # enum values which was added in clang 15[1]. - # - # gcc-multilib provides at least which is referenced by libbpf. - # - # llvm provides llvm-objcopy which is used to build the BTF relocation tests. - # - # [0] https://github.com/actions/runner-images/blob/ubuntu22/20230724.1/images/linux/Ubuntu2204-Readme.md - # - # [1] https://github.com/llvm/llvm-project/commit/dc1c43d run: | set -euxo pipefail - wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc - echo deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main | sudo tee /etc/apt/sources.list.d/llvm.list sudo apt update - sudo apt -y install clang gcc-multilib llvm locate qemu-system-{arm,x86} - - - name: bpf-linker - if: runner.os == 'Linux' - run: cargo install bpf-linker --git https://github.com/aya-rs/bpf-linker.git + sudo apt -y install \ + liblzma-dev \ + lynx \ + musl-tools \ + qemu-system-{arm,x86} - name: Install prerequisites if: runner.os == 'macOS' - # The xargs shipped on macOS always exits 0 with -P0, so we need GNU findutils. + # The curl shipped on macOS doesn't contain + # https://github.com/curl/curl/commit/85efbb92b8e6679705e122cee45ce76c56414a3e which is + # needed for proper handling of `--etag-{compare,save}`. # # The tar shipped on macOS doesn't support --wildcards, so we need GNU tar. # # The clang shipped on macOS doesn't support BPF, so we need LLVM from brew. # - # We also need LLVM for bpf-linker, see comment below. + # We need a musl C toolchain to compile our `test-distro` since some of + # our dependencies have build scripts that compile C code (i.e xz2). + # This is provided by `brew install filosottile/musl-cross/musl-cross`. run: | set -euxo pipefail - brew update + # Dependencies are tracked in `Brewfile`. + brew bundle + echo $(brew --prefix curl)/bin >> $GITHUB_PATH + echo $(brew --prefix llvm)/bin >> $GITHUB_PATH + # https://github.com/actions/setup-python/issues/577 find /usr/local/bin -type l -exec sh -c 'readlink -f "$1" \ | grep -q ^/Library/Frameworks/Python.framework/Versions/' _ {} \; -exec rm -v {} \; - HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 \ - brew install dpkg findutils gnu-tar llvm pkg-config qemu - echo /usr/local/opt/findutils/libexec/gnubin >> $GITHUB_PATH - echo /usr/local/opt/gnu-tar/libexec/gnubin >> $GITHUB_PATH - echo /usr/local/opt/llvm/bin >> $GITHUB_PATH - # https://github.com/Homebrew/homebrew-core/issues/140244 - codesign --verify $(which qemu-system-x86_64) || brew reinstall qemu --build-from-source - - - name: bpf-linker - if: runner.os == 'macOS' - # NB: rustc doesn't ship libLLVM.so on macOS, so disable proxying (default feature). We also - # --force so that bpf-linker gets always relinked against the latest LLVM installed by brew. - run: cargo install --force bpf-linker --git https://github.com/aya-rs/bpf-linker.git --no-default-features - - name: Download debian kernels - if: runner.arch == 'ARM64' + - uses: dtolnay/rust-toolchain@nightly + with: + components: rust-src + + # Installed *after* nightly so it is the default. + - uses: dtolnay/rust-toolchain@stable + with: + targets: aarch64-unknown-linux-musl,x86_64-unknown-linux-musl + + - uses: Swatinem/rust-cache@v2 + + - name: Install libLLVM + # Download libLLVM from Rust CI to ensure that the libLLVM version + # matches exactly with the version used by the current Rust nightly. A + # mismatch between libLLVM (used by bpf-linker) and Rust's LLVM version + # can lead to linking issues. run: | set -euxo pipefail - mkdir -p test/.tmp/debian-kernels/arm64 - # NB: a 4.19 kernel image for arm64 was not available. - # TODO: enable tests on kernels before 6.0. - # linux-image-5.10.0-23-cloud-arm64-unsigned_5.10.179-3_arm64.deb \ - printf '%s\0' \ - linux-image-6.1.0-15-cloud-arm64-unsigned_6.1.66-1_arm64.deb \ - | xargs -0 -t -P0 -I {} wget -nd -nv -P test/.tmp/debian-kernels/arm64 ftp://ftp.us.debian.org/debian/pool/main/l/linux/{} + # Get the partial SHA from Rust nightly. + rustc_sha=$(rustc +nightly --version | grep -oE '[a-f0-9]{7,40}') + # Get the full SHA from GitHub. + rustc_sha=$(curl -sfSL https://api.github.com/repos/rust-lang/rust/commits/$rustc_sha \ + --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ + --header 'content-type: application/json' \ + | jq -r '.sha') + mkdir -p /tmp/rustc-llvm + curl -sfSL https://ci-artifacts.rust-lang.org/rustc-builds/$rustc_sha/rust-dev-nightly-${{ matrix.target }}.tar.xz | \ + tar -xJ --strip-components 2 -C /tmp/rustc-llvm + echo /tmp/rustc-llvm/bin >> $GITHUB_PATH + + # NB: rustc doesn't ship libLLVM.so on macOS, so disable proxying (default feature). We also + # --force so that bpf-linker gets always relinked against the latest LLVM downloaded above. + # + # Do this on all system (not just macOS) to avoid relying on rustc-provided libLLVM.so. + - run: cargo install --git https://github.com/aya-rs/bpf-linker.git bpf-linker --no-default-features --features llvm-21 --force + + - uses: actions/cache@v4 + with: + path: test/.tmp + key: ${{ runner.arch }}-${{ runner.os }}-test-cache + + - name: Download debian kernels + if: runner.arch == 'ARM64' + run: .github/scripts/download_kernel_images.sh test/.tmp/debian-kernels/arm64 arm64 5.10 6.1 6.12 - name: Download debian kernels if: runner.arch == 'X64' + run: .github/scripts/download_kernel_images.sh test/.tmp/debian-kernels/amd64 amd64 5.10 6.1 6.12 + + - name: Cleanup stale kernels and modules run: | set -euxo pipefail - mkdir -p test/.tmp/debian-kernels/amd64 - # TODO: enable tests on kernels before 6.0. - # linux-image-4.19.0-21-cloud-amd64-unsigned_4.19.249-2_amd64.deb \ - # linux-image-5.10.0-23-cloud-amd64-unsigned_5.10.179-3_amd64.deb \ - printf '%s\0' \ - linux-image-6.1.0-15-cloud-amd64-unsigned_6.1.66-1_amd64.deb \ - | xargs -0 -t -P0 -I {} wget -nd -nv -P test/.tmp/debian-kernels/amd64 ftp://ftp.us.debian.org/debian/pool/main/l/linux/{} - - - name: Extract debian kernels - run: | - set -euxo pipefail - find test/.tmp -name '*.deb' -print0 | xargs -t -0 -I {} \ - sh -c "dpkg --fsys-tarfile {} | tar -C test/.tmp --wildcards --extract '*vmlinuz*' --file -" + rm -rf test/.tmp/boot test/.tmp/lib - name: Run local integration tests if: runner.os == 'Linux' run: cargo xtask integration-test local - name: Run virtualized integration tests - run: find test/.tmp -name 'vmlinuz-*' | xargs -t cargo xtask integration-test vm + if: runner.os == 'Linux' + run: | + set -euxo pipefail + + # https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners/ + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm || true # kvm is not available on arm64. + + find test/.tmp -name '*.deb' -print0 | sort -Vz | xargs -t -0 \ + cargo xtask integration-test vm --cache-dir test/.tmp \ + --github-api-token ${{ secrets.GITHUB_TOKEN }} + + - name: Run virtualized integration tests + if: runner.os == 'macOS' + env: + # This sets the linker to the one installed by FiloSottile/musl-cross. + CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER: x86_64-linux-musl-gcc + run: | + set -euxo pipefail + find test/.tmp -name '*.deb' -print0 | sort -Vz | xargs -t -0 \ + cargo xtask integration-test vm --cache-dir test/.tmp \ + --github-api-token ${{ secrets.GITHUB_TOKEN }} # Provides a single status check for the entire build workflow. # This is used for merge automation, like Mergify, since GH actions @@ -296,5 +367,4 @@ jobs: - run-integration-test runs-on: ubuntu-latest steps: - - name: Build Complete - run: echo "Build Complete" + - run: echo 'Build Complete' diff --git a/.github/workflows/gen.yml b/.github/workflows/gen.yml index 30763c41..e63ccc1b 100644 --- a/.github/workflows/gen.yml +++ b/.github/workflows/gen.yml @@ -1,62 +1,61 @@ name: codegen -on: workflow_dispatch +on: + push: + branches-ignore: + - 'create-pull-request/**' + + schedule: + - cron: 00 4 * * * + + workflow_dispatch: jobs: codegen: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: submodules: recursive - - name: update libbpf - working-directory: xtask/libbpf - run: | - set -e - git fetch origin - git checkout origin/HEAD - echo "LIBBPF_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV - - - uses: dtolnay/rust-toolchain@master + - uses: dtolnay/rust-toolchain@nightly with: - toolchain: nightly components: rustfmt, clippy - uses: Swatinem/rust-cache@v2 - name: Install headers run: | + set -euxo pipefail sudo apt -y update - sudo apt -y install libc6-dev libc6-dev-{arm64,armel,riscv64}-cross + sudo apt -y install libelf-dev libc6-dev libc6-dev-{arm64,armel,loong64,riscv64,ppc64el,s390x,mips}-cross - - name: Run codegen - run: | - cargo xtask codegen + - run: cargo xtask codegen + # aya-ebpf-bindings aren't emitted directly from bindgen and so aren't formatted. + - run: cargo fmt --all + - run: cargo xtask public-api --bless - - name: Check for changes - run: | - git diff --quiet || echo "COMMIT_CHANGES=1" >> $GITHUB_ENV + - id: libbpf + working-directory: xtask/libbpf + run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" - - name: Commit Changes - id: commit - if: env.COMMIT_CHANGES == 1 - uses: devops-infra/action-commit-push@master - with: - github_token: "${{ secrets.CRABBY_GITHUB_TOKEN }}" - commit_prefix: "[codegen] Update libbpf to ${{ env.LIBBPF_SHA }}" - commit_message: "Update libbpf to ${{ env.LIBBPF_SHA }}" - target_branch: codegen - force: true - - - name: Create pull request - if: steps.commit.outputs.files_changed != '' - uses: devops-infra/action-pull-request@master + - uses: peter-evans/create-pull-request@v7 + if: ${{ github.repository == 'aya-rs/aya' }} with: - github_token: ${{ secrets.CRABBY_GITHUB_TOKEN }} - body: "**Automated pull request**

Update libbpf to ${{ env.LIBBPF_SHA }}" - title: Update libbpf to ${{ env.LIBBPF_SHA }} - source_branch: codegen - target_branch: main - get_diff: true + # GitHub actions aren't allowed to trigger other actions to prevent + # abuse; the canonical workaround is to use a sufficiently authorized + # token. + # + # See https://github.com/peter-evans/create-pull-request/issues/48. + token: ${{ secrets.CRABBY_GITHUB_TOKEN }} + branch: create-pull-request/codegen + commit-message: | + aya-obj, aya-ebpf-bindings: regenerate + + libbpf commit: ${{ steps.libbpf.outputs.sha }} + title: 'aya-obj, aya-ebpf-bindings: regenerate' + body: | + **Automated changes** + + libbpf commit: ${{ steps.libbpf.outputs.sha}} diff --git a/.mergify.yml b/.mergify.yml index 88cdc1de..d7fa21b5 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,11 +1,4 @@ pull_request_rules: - - name: automatic merge for Dependabot pull request that pass CI - conditions: - - author=dependabot[bot] - actions: - comment: - message: "@dependabot merge" - # REVIEW MANAGEMENT - name: ask alessandrod to review public API changes diff --git a/.taplo.toml b/.taplo.toml index d8a04c55..fffb7cba 100644 --- a/.taplo.toml +++ b/.taplo.toml @@ -2,3 +2,4 @@ [rule.formatting] indent_string = " " +reorder_keys = true diff --git a/.vscode/settings.json b/.vscode/settings.json index af346ecc..fe99dc28 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,9 @@ { - "rust-analyzer.check.allTargets": true, - "rust-analyzer.check.command": "clippy", - "search.exclude": { - "/xtask/public-api/*.txt": true, - }, + "rust-analyzer.check.allTargets": true, + "rust-analyzer.check.command": "clippy", + "rust-analyzer.cargo.target": "x86_64-unknown-linux-musl", + "search.exclude": { + "/xtask/public-api/*.txt": true + }, + "yaml.format.singleQuote": true } diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..0087076e --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,31 @@ +# AGENTS NOTES + +- Repository: aya (Rust library and tooling for working with eBPF programs). +- Development tooling: + - Do not regenerate public API fixtures; the user handles that. + - Many crates only build on Linux; on macOS lint and type check using + + ```sh + ./clippy.sh --target x86_64-unknown-linux-musl + ``` + +- Coding guidelines: + - Use github or bootlin permalinks when referencing kernel sources. +- Integration testing: + - Prepare: + + ```sh + .github/scripts/download_kernel_images.sh \ + test/.tmp/debian-kernels/ [VERSIONS]... + ``` + + - Run: + + + + ```sh + find test/.tmp -name '*.deb' -print0 | xargs -0 -t sh -c \ + 'cargo xtask integration-test vm --cache-dir test/.tmp "$@" -- [ARGS]...' _ + ``` + + diff --git a/Brewfile b/Brewfile new file mode 100644 index 00000000..356453a7 --- /dev/null +++ b/Brewfile @@ -0,0 +1,10 @@ +# Keep this congruent with `.github/workflows/ci.yml`. + +brew "curl" +brew "llvm" +brew "lynx" +brew "pkg-config" +brew "qemu" + +tap "filosottile/musl-cross" +brew "filosottile/musl-cross/musl-cross" diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 0d9ca6f7..565420f1 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -115,7 +115,7 @@ the community. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.0, available [here][covenant-2-0]. +[version 2.0][covenant-2-0]. Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). @@ -124,5 +124,5 @@ enforcement ladder](https://github.com/mozilla/diversity). [covenant-2-0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct For answers to common questions about this code of conduct, see the -[FAQ](https://www.contributor-covenant.org/faq). Translations are available -[here](https://www.contributor-covenant.org/translations). +[FAQ](https://www.contributor-covenant.org/faq). +[Translations](https://www.contributor-covenant.org/translations) are available. diff --git a/Cargo.toml b/Cargo.toml index a370735e..e4d1111a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,15 @@ [workspace] members = [ "aya", + "aya-build", "aya-log", "aya-log-common", "aya-log-parser", "aya-obj", "aya-tool", - "init", + "ebpf-panic", + "test-distro", + "test/integration-common", "test/integration-test", "xtask", @@ -25,12 +28,15 @@ resolver = "2" default-members = [ "aya", + "aya-build", "aya-log", "aya-log-common", "aya-log-parser", "aya-obj", "aya-tool", - "init", + "ebpf-panic", + "test-distro", + "test/integration-common", # test/integration-test is omitted; including it in this list causes `cargo test` to run its # tests, and that doesn't work unless they've been built with `cargo xtask`. "xtask", @@ -39,72 +45,119 @@ default-members = [ "aya-log-ebpf-macros", # ebpf crates are omitted; they must be built with: + # + # RUSTFLAGS="--cfg bpf_target_arch={aarch64,arm,loongarch64,mips,powerpc64,riscv64,s390x,x86_64}" + # ... # --target bpfe{b,l}-unknown-none - # CARGO_CFG_BPF_TARGET_ARCH={x86_64,aarch64,arm,riscv64} ] [workspace.package] authors = ["Aya Contributors"] +edition = "2024" +homepage = "https://aya-rs.dev" license = "MIT OR Apache-2.0" repository = "https://github.com/aya-rs/aya" -homepage = "https://aya-rs.dev" -edition = "2021" +rust-version = "1.87.0" # NOTE(vadorovsky): Neither cargo-udeps nor cargo-machete are able to detect # unused crates defined in this section. It would be nice to teach either of # them to do that, but in the meantime we need to be careful. [workspace.dependencies] anyhow = { version = "1", default-features = false } +ar = { version = "0.9", default-features = false } assert_matches = { version = "1.5.0", default-features = false } -async-io = { version = "2.0", default-features = false } -bindgen = { version = "0.69", default-features = false } +base64 = { version = "0.22.1", default-features = false } +bindgen = { version = "0.72", default-features = false } bitflags = { version = "2.2.1", default-features = false } bytes = { version = "1", default-features = false } -cargo_metadata = { version = "0.18.0", default-features = false } +cargo_metadata = { version = "0.23.0", default-features = false } clap = { version = "4", default-features = false } const-assert = { version = "1.0.1", default-features = false } -core-error = { version = "0.0.0", default-features = false } -dialoguer = { version = "0.11", default-features = false } +dialoguer = { version = "0.12", default-features = false } diff = { version = "0.1.13", default-features = false } env_logger = { version = "0.11", default-features = false } epoll = { version = "4.3.3", default-features = false } futures = { version = "0.3.28", default-features = false } -hashbrown = { version = "0.14.3", default-features = false } +glob = { version = "0.3.0", default-features = false } +hashbrown = { version = "0.16.0", default-features = false } indoc = { version = "2.0", default-features = false } -integration-ebpf = { path = "test/integration-ebpf", default-features = false } -lazy_static = { version = "1", default-features = false } libc = { version = "0.2.105", default-features = false } log = { version = "0.4", default-features = false } -netns-rs = { version = "0.1", default-features = false } -nix = { version = "0.29.0", default-features = false } +network-types = { version = "0.1.0", default-features = false } +nix = { version = "0.30.1", default-features = false } num_enum = { version = "0.7", default-features = false } -object = { version = "0.36", default-features = false } -proc-macro-error = { version = "1.0", default-features = false } +object = { version = "0.37", default-features = false } +once_cell = { version = "1.20.1", default-features = false } proc-macro2 = { version = "1", default-features = false } -public-api = { version = "0.35.0", default-features = false } +proc-macro2-diagnostics = { version = "0.10.1", default-features = false } +procfs = { version = "0.18.0", default-features = false } +public-api = { version = "0.50.0", default-features = false } quote = { version = "1", default-features = false } -rand = { version = "0.8", default-features = false } -rbpf = { version = "0.2.0", default-features = false } +rand = { version = "0.9", default-features = false } +rbpf = { version = "0.3.0", default-features = false } rustdoc-json = { version = "0.9.0", default-features = false } rustup-toolchain = { version = "0.1.5", default-features = false } rustversion = { version = "1.0.0", default-features = false } +scopeguard = { version = "1.2.0", default-features = false } syn = { version = "2", default-features = false } +tar = { version = "0.4.44", default-features = false } tempfile = { version = "3", default-features = false } test-case = { version = "3.1.0", default-features = false } test-log = { version = "0.2.13", default-features = false } testing_logger = { version = "0.1.1", default-features = false } -thiserror = { version = "1", default-features = false } +thiserror = { version = "2.0.3", default-features = false } tokio = { version = "1.24.0", default-features = false } -which = { version = "6.0.0", default-features = false } -xdpilone = { version = "1.0", default-features = false } -xtask = { path = "xtask", default-features = false } - -[profile.dev] -panic = "abort" +walkdir = { version = "2", default-features = false } +which = { version = "8.0.0", default-features = false } +xdpilone = { version = "1.0.5", default-features = false } +xz2 = { version = "0.1.7", default-features = false } -[profile.release] -panic = "abort" +[workspace.lints.clippy] +all = "warn" +as_ptr_cast_mut = "warn" +as_underscore = "warn" +cast_lossless = "warn" +#cast_possible_truncation = "warn" +#cast_possible_wrap = "warn" +cast_precision_loss = "warn" +#cast_sign_loss = "warn" +char_lit_as_u8 = "warn" +fn_to_numeric_cast = "warn" +fn_to_numeric_cast_with_truncation = "warn" +mut_mut = "warn" +needless_bitwise_bool = "warn" +needless_lifetimes = "warn" +no_mangle_with_rust_abi = "warn" +ptr_as_ptr = "warn" +ptr_cast_constness = "warn" +ref_as_ptr = "warn" +unnecessary_cast = "warn" +unused_trait_names = "warn" +use_self = "warn" -[profile.release.package.integration-ebpf] -debug = 2 -codegen-units = 1 +[workspace.lints.rust] +absolute_paths_not_starting_with_crate = "warn" +deprecated_in_future = "warn" +elided_lifetimes_in_paths = "warn" +explicit_outlives_requirements = "warn" +ffi_unwind_calls = "warn" +keyword_idents = "warn" +#let_underscore_drop = "warn" +macro_use_extern_crate = "warn" +meta_variable_misuse = "warn" +missing_abi = "warn" +#missing_copy_implementations = "warn" +non_ascii_idents = "warn" +noop_method_call = "warn" +single_use_lifetimes = "warn" +trivial_numeric_casts = "warn" +unreachable_pub = "warn" +unsafe_op_in_unsafe_fn = "warn" +unstable_features = "warn" +unused_crate_dependencies = "warn" +unused_extern_crates = "warn" +unused_import_braces = "warn" +unused_lifetimes = "warn" +unused_macro_rules = "warn" +#unused_qualifications = "warn" # https://github.com/rust-lang/rust/commit/9ccc7b7 added size_of to the prelude, but we need to continue to qualify it so that we build on older compilers. +#unused_results = "warn" diff --git a/README.md b/README.md index 4a6a8672..fdf691fb 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ ![License][license-badge] [![Build status][build-badge]][build-url] [![Book][book-badge]][book-url] +[![Gurubase][gurubase-badge]][gurubase-url] [crates-badge]: https://img.shields.io/crates/v/aya.svg?style=for-the-badge&logo=rust [crates-url]: https://crates.io/crates/aya @@ -12,6 +13,8 @@ [build-url]: https://github.com/aya-rs/aya/actions/workflows/ci.yml [book-badge]: https://img.shields.io/badge/read%20the-book-9cf.svg?style=for-the-badge&logo=mdbook [book-url]: https://aya-rs.dev/book +[gurubase-badge]: https://img.shields.io/badge/Gurubase-Ask%20Aya%20Guru-006BFF?style=for-the-badge +[gurubase-url]: https://gurubase.io/g/aya ## API Documentation @@ -75,7 +78,7 @@ use a `BPF_PROG_TYPE_CGROUP_SKB` program with aya: ```rust use std::fs::File; use aya::Ebpf; -use aya::programs::{CgroupSkb, CgroupSkbAttachType}; +use aya::programs::{CgroupSkb, CgroupSkbAttachType, CgroupAttachMode}; // load the BPF code let mut ebpf = Ebpf::load_file("ebpf.o")?; @@ -89,7 +92,7 @@ ingress.load()?; // attach the program to the root cgroup. `ingress_filter` will be called for all // incoming packets. let cgroup = File::open("/sys/fs/cgroup/unified")?; -ingress.attach(cgroup, CgroupSkbAttachType::Ingress)?; +ingress.attach(cgroup, CgroupSkbAttachType::Ingress, CgroupAttachMode::AllowOverride)?; ``` ## Contributing diff --git a/aya-build/Cargo.toml b/aya-build/Cargo.toml new file mode 100644 index 00000000..5acc53c8 --- /dev/null +++ b/aya-build/Cargo.toml @@ -0,0 +1,18 @@ +[package] +description = "Build-time support for aya projects" +name = "aya-build" +version = "0.1.2" + +authors.workspace = true +edition.workspace = true +homepage.workspace = true +license.workspace = true +repository.workspace = true +rust-version.workspace = true + +[lints] +workspace = true + +[dependencies] +anyhow = { workspace = true, default-features = true } +cargo_metadata = { workspace = true } diff --git a/aya-build/src/lib.rs b/aya-build/src/lib.rs new file mode 100644 index 00000000..4caf28a6 --- /dev/null +++ b/aya-build/src/lib.rs @@ -0,0 +1,274 @@ +use std::{ + borrow::Cow, + env, + ffi::OsString, + fs, + io::{BufRead as _, BufReader}, + path::PathBuf, + process::{Child, Command, Stdio}, +}; + +use anyhow::{Context as _, Result, anyhow}; +use cargo_metadata::{Artifact, CompilerMessage, Message, Target}; + +#[derive(Default)] +pub struct Package<'a> { + pub name: &'a str, + pub root_dir: &'a str, + pub no_default_features: bool, + pub features: &'a [&'a str], +} + +fn target_arch_fixup(target_arch: Cow<'_, str>) -> Cow<'_, str> { + if target_arch.starts_with("riscv64") { + "riscv64".into() + } else { + target_arch + } +} + +/// Build binary artifacts produced by `packages`. +/// +/// This would be better expressed as one or more [artifact-dependencies][bindeps] but issues such +/// as: +/// +/// * +/// * +/// * +/// +/// prevent their use for the time being. +/// +/// [bindeps]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html?highlight=feature#artifact-dependencies +pub fn build_ebpf<'a>( + packages: impl IntoIterator>, + toolchain: Toolchain<'a>, +) -> Result<()> { + let out_dir = env::var_os("OUT_DIR").ok_or(anyhow!("OUT_DIR not set"))?; + let out_dir = PathBuf::from(out_dir); + + let endian = + env::var_os("CARGO_CFG_TARGET_ENDIAN").ok_or(anyhow!("CARGO_CFG_TARGET_ENDIAN not set"))?; + let target = if endian == "big" { + "bpfeb" + } else if endian == "little" { + "bpfel" + } else { + return Err(anyhow!("unsupported endian={endian:?}")); + }; + + const TARGET_ARCH: &str = "CARGO_CFG_TARGET_ARCH"; + let bpf_target_arch = + env::var_os(TARGET_ARCH).unwrap_or_else(|| panic!("{TARGET_ARCH} not set")); + let bpf_target_arch = bpf_target_arch + .into_string() + .unwrap_or_else(|err| panic!("OsString::into_string({TARGET_ARCH}): {err:?}")); + let bpf_target_arch = target_arch_fixup(bpf_target_arch.into()); + let target = format!("{target}-unknown-none"); + + for Package { + name, + root_dir, + no_default_features, + features, + } in packages + { + // We have a build-dependency on `name`, so cargo will automatically rebuild us if `name`'s + // *library* target or any of its dependencies change. Since we depend on `name`'s *binary* + // targets, that only gets us half of the way. This stanza ensures cargo will rebuild us on + // changes to the binaries too, which gets us the rest of the way. + println!("cargo:rerun-if-changed={root_dir}"); + + let mut cmd = Command::new("rustup"); + cmd.args([ + "run", + toolchain.as_str(), + "cargo", + "build", + "--package", + name, + "-Z", + "build-std=core", + "--bins", + "--message-format=json", + "--release", + "--target", + &target, + ]); + if no_default_features { + cmd.arg("--no-default-features"); + } + cmd.args(["--features", &features.join(",")]); + + { + const SEPARATOR: &str = "\x1f"; + + let mut rustflags = OsString::new(); + + for s in [ + "--cfg=bpf_target_arch=\"", + &bpf_target_arch, + "\"", + SEPARATOR, + "-Cdebuginfo=2", + SEPARATOR, + "-Clink-arg=--btf", + ] { + rustflags.push(s); + } + + cmd.env("CARGO_ENCODED_RUSTFLAGS", rustflags); + } + + // Workaround to make sure that the correct toolchain is used. + for key in ["RUSTC", "RUSTC_WORKSPACE_WRAPPER"] { + cmd.env_remove(key); + } + + // Workaround for https://github.com/rust-lang/cargo/issues/6412 where cargo flocks itself. + let target_dir = out_dir.join(name); + cmd.arg("--target-dir").arg(&target_dir); + + let mut child = cmd + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .spawn() + .with_context(|| format!("failed to spawn {cmd:?}"))?; + let Child { stdout, stderr, .. } = &mut child; + + // Trampoline stdout to cargo warnings. + let stderr = stderr.take().expect("stderr"); + let stderr = BufReader::new(stderr); + let stderr = std::thread::spawn(move || { + for line in stderr.lines() { + let line = line.expect("read line"); + println!("cargo:warning={line}"); + } + }); + + let stdout = stdout.take().expect("stdout"); + let stdout = BufReader::new(stdout); + let mut executables = Vec::new(); + for message in Message::parse_stream(stdout) { + #[expect(clippy::collapsible_match)] + match message.expect("valid JSON") { + Message::CompilerArtifact(Artifact { + executable, + target: Target { name, .. }, + .. + }) => { + if let Some(executable) = executable { + executables.push((name, executable.into_std_path_buf())); + } + } + Message::CompilerMessage(CompilerMessage { message, .. }) => { + for line in message.rendered.unwrap_or_default().split('\n') { + println!("cargo:warning={line}"); + } + } + Message::TextLine(line) => { + println!("cargo:warning={line}"); + } + _ => {} + } + } + + let status = child + .wait() + .with_context(|| format!("failed to wait for {cmd:?}"))?; + if !status.success() { + return Err(anyhow!("{cmd:?} failed: {status:?}")); + } + + match stderr.join().map_err(std::panic::resume_unwind) { + Ok(()) => {} + Err(err) => match err {}, + } + + for (name, binary) in executables { + let dst = out_dir.join(name); + let _: u64 = fs::copy(&binary, &dst) + .with_context(|| format!("failed to copy {binary:?} to {dst:?}"))?; + } + } + Ok(()) +} + +/// The toolchain to use for building eBPF programs. +#[derive(Default)] +pub enum Toolchain<'a> { + /// The latest nightly toolchain i.e. `nightly`. + #[default] + Nightly, + /// A custom toolchain e.g. `nightly-2021-01-01`. + /// + /// The toolchain specifier is passed to `rustup run` and therefore should _not_ have a preceding `+`. + Custom(&'a str), +} + +impl<'a> Toolchain<'a> { + fn as_str(&self) -> &'a str { + match self { + Toolchain::Nightly => "nightly", + Toolchain::Custom(toolchain) => toolchain, + } + } +} + +/// Emit cfg flags that describe the desired BPF target architecture. +pub fn emit_bpf_target_arch_cfg() { + // The presence of this environment variable indicates that `--cfg + // bpf_target_arch="..."` was passed to the compiler, so we don't need to + // emit it again. Note that we cannot *set* this environment variable - it + // is set by cargo. + const BPF_TARGET_ARCH: &str = "CARGO_CFG_BPF_TARGET_ARCH"; + println!("cargo:rerun-if-env-changed={BPF_TARGET_ARCH}"); + + // Users may directly set this environment variable in situations where + // using RUSTFLAGS to set `--cfg bpf_target_arch="..."` is not possible or + // not ergonomic. In contrast to RUSTFLAGS this mechanism reuses the target + // cache for all values, producing many more invalidations. + const AYA_BPF_TARGET_ARCH: &str = "AYA_BPF_TARGET_ARCH"; + println!("cargo:rerun-if-env-changed={AYA_BPF_TARGET_ARCH}"); + + const HOST: &str = "HOST"; + println!("cargo:rerun-if-env-changed={HOST}"); + + if std::env::var_os(BPF_TARGET_ARCH).is_none() { + let host = std::env::var_os(HOST).unwrap_or_else(|| panic!("{HOST} not set")); + let host = host + .into_string() + .unwrap_or_else(|err| panic!("OsString::into_string({HOST}): {err:?}")); + let host = host.as_str(); + + let bpf_target_arch = if let Some(bpf_target_arch) = std::env::var_os(AYA_BPF_TARGET_ARCH) { + bpf_target_arch + .into_string() + .unwrap_or_else(|err| { + panic!("OsString::into_string({AYA_BPF_TARGET_ARCH}): {err:?}") + }) + .into() + } else { + target_arch_fixup( + host.split_once('-') + .map_or(host, |(arch, _rest)| arch) + .into(), + ) + }; + println!("cargo:rustc-cfg=bpf_target_arch=\"{bpf_target_arch}\""); + } + + print!("cargo::rustc-check-cfg=cfg(bpf_target_arch, values("); + for value in [ + "aarch64", + "arm", + "loongarch64", + "mips", + "powerpc64", + "riscv64", + "s390x", + "x86_64", + ] { + print!("\"{value}\","); + } + println!("))"); +} diff --git a/aya-ebpf-macros/CHANGELOG.md b/aya-ebpf-macros/CHANGELOG.md index 09521087..4e1df55f 100644 --- a/aya-ebpf-macros/CHANGELOG.md +++ b/aya-ebpf-macros/CHANGELOG.md @@ -5,6 +5,43 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## v0.1.1 (2024-10-09) + +### Chore + + - aya-ebpf-macros: uncomment aya-ebpf dev-dep + This wasn't meant to be committed, cargo-smart-release. Commenting is + needed to fix the cyclic dep aya-ebpf-macros -> aya-ebpf -> + aya-ebpf-macros. See + https://github.com/rust-lang/cargo/issues/4242#issuecomment-413203081 + +### Other + + - separate probe to probe ctx & retprobe to retprobe ctx + Added logic in expand function in both kprobe.rs and uprobe.rs for valid + macros. Now, kprobe & uprobe proc macros only accept ProbeContext, and + kretprobe & uretprobe only accept RetProbeContext. + +### Commit Statistics + + + + - 2 commits contributed to the release. + - 185 days passed between releases. + - 2 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Separate probe to probe ctx & retprobe to retprobe ctx ([`b84ede1`](https://github.com/aya-rs/aya/commit/b84ede10b9c4813f221fade16b60d5ced4ecdc58)) + - Aya-ebpf-macros: uncomment aya-ebpf dev-dep ([`a6f4739`](https://github.com/aya-rs/aya/commit/a6f4739b5b138e718632758cad266ee3cb7b1b65)) +
+ ## v0.1.0 (2024-04-06) @@ -22,7 +59,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - - 8 commits contributed to the release over the course of 31 calendar days. + - 9 commits contributed to the release. - 2 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages @@ -33,6 +70,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
view details * **Uncategorized** + - Release aya-ebpf-macros v0.1.0 ([`9d24bbe`](https://github.com/aya-rs/aya/commit/9d24bbe316ddf5caca7413198d6f79a0064def88)) - Release aya-ebpf-macros v0.1.0 ([`90f68db`](https://github.com/aya-rs/aya/commit/90f68dbd074e4cd74540d98fb9f17b6c2de3d054)) - Release aya-ebpf-macros v0.1.0, aya-ebpf v0.1.0 ([`eb3947b`](https://github.com/aya-rs/aya/commit/eb3947bf14e8e7ab0f70e12306e38fb8056edf57)) - Release aya-ebpf-bindings v0.1.0, aya-ebpf-macros v0.1.0, aya-ebpf v0.1.0 ([`a34c5e4`](https://github.com/aya-rs/aya/commit/a34c5e43b85dd176b9b18f1cc9c9d80d52f10a1f)) diff --git a/aya-ebpf-macros/Cargo.toml b/aya-ebpf-macros/Cargo.toml index b61ff477..55a76f2c 100644 --- a/aya-ebpf-macros/Cargo.toml +++ b/aya-ebpf-macros/Cargo.toml @@ -1,21 +1,26 @@ [package] -name = "aya-ebpf-macros" -version = "0.1.0" description = "Proc macros used by aya-ebpf" +name = "aya-ebpf-macros" +version = "0.1.1" + authors.workspace = true +edition.workspace = true +homepage.workspace = true license.workspace = true repository.workspace = true -homepage.workspace = true -edition.workspace = true +rust-version.workspace = true + +[lints] +workspace = true [lib] proc-macro = true [dependencies] proc-macro2 = { workspace = true } -proc-macro-error = { workspace = true } +proc-macro2-diagnostics = { workspace = true } quote = { workspace = true } syn = { workspace = true, default-features = true, features = ["full"] } [dev-dependencies] -aya-ebpf = { path = "../ebpf/aya-ebpf", version = "^0.1.0", default-features = false } +aya-ebpf = { path = "../ebpf/aya-ebpf", default-features = false } diff --git a/aya-ebpf-macros/src/args.rs b/aya-ebpf-macros/src/args.rs index 12ed84d1..4405dde7 100644 --- a/aya-ebpf-macros/src/args.rs +++ b/aya-ebpf-macros/src/args.rs @@ -1,7 +1,7 @@ use syn::{ + Error, Ident, LitStr, Result, Token, parse::{Parse, ParseStream}, punctuated::{Pair, Punctuated}, - Error, Ident, LitStr, Result, Token, }; pub(crate) struct NameValue { @@ -19,7 +19,7 @@ pub(crate) struct Args { } impl Parse for Args { - fn parse(input: ParseStream) -> Result { + fn parse(input: ParseStream<'_>) -> Result { let args = Punctuated::::parse_terminated_with(input, |input| { let ident = input.parse::()?; let lookahead = input.lookahead1(); @@ -42,7 +42,7 @@ impl Parse for Args { }) .collect(); - Ok(Args { args }) + Ok(Self { args }) } } diff --git a/aya-ebpf-macros/src/btf_map.rs b/aya-ebpf-macros/src/btf_map.rs new file mode 100644 index 00000000..c155e045 --- /dev/null +++ b/aya-ebpf-macros/src/btf_map.rs @@ -0,0 +1,75 @@ +use std::borrow::Cow; + +use proc_macro2::TokenStream; +use quote::quote; +use syn::{ItemStatic, Result}; + +use crate::args::name_arg; + +pub(crate) struct BtfMap { + item: ItemStatic, + name: String, +} + +impl BtfMap { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + let item: ItemStatic = syn::parse2(item)?; + let mut args = syn::parse2(attrs)?; + let name = name_arg(&mut args).unwrap_or_else(|| item.ident.to_string()); + Ok(Self { item, name }) + } + + pub(crate) fn expand(&self) -> TokenStream { + let section_name: Cow<'_, _> = ".maps".into(); + let name = &self.name; + let item = &self.item; + quote! { + #[unsafe(link_section = #section_name)] + #[unsafe(export_name = #name)] + #item + } + } +} + +#[cfg(test)] +mod tests { + use syn::parse_quote; + + use super::*; + + #[test] + fn test_map_with_name() { + let map = BtfMap::parse( + parse_quote!(name = "foo"), + parse_quote!( + static BAR: HashMap<&'static str, u32> = HashMap::new(); + ), + ) + .unwrap(); + let expanded = map.expand(); + let expected = quote!( + #[unsafe(link_section = ".maps")] + #[unsafe(export_name = "foo")] + static BAR: HashMap<&'static str, u32> = HashMap::new(); + ); + assert_eq!(expected.to_string(), expanded.to_string()); + } + + #[test] + fn test_map_no_name() { + let map = BtfMap::parse( + parse_quote!(), + parse_quote!( + static BAR: HashMap<&'static str, u32> = HashMap::new(); + ), + ) + .unwrap(); + let expanded = map.expand(); + let expected = quote!( + #[unsafe(link_section = ".maps")] + #[unsafe(export_name = "BAR")] + static BAR: HashMap<&'static str, u32> = HashMap::new(); + ); + assert_eq!(expected.to_string(), expanded.to_string()); + } +} diff --git a/aya-ebpf-macros/src/btf_tracepoint.rs b/aya-ebpf-macros/src/btf_tracepoint.rs index f9e23e0a..c8f5261a 100644 --- a/aya-ebpf-macros/src/btf_tracepoint.rs +++ b/aya-ebpf-macros/src/btf_tracepoint.rs @@ -4,7 +4,7 @@ use proc_macro2::TokenStream; use quote::quote; use syn::{ItemFn, Result}; -use crate::args::{err_on_unknown_args, pop_string_arg, Args}; +use crate::args::{Args, err_on_unknown_args, pop_string_arg}; pub(crate) struct BtfTracePoint { item: ItemFn, @@ -18,28 +18,33 @@ impl BtfTracePoint { let function = pop_string_arg(&mut args, "function"); err_on_unknown_args(&args)?; - Ok(BtfTracePoint { item, function }) + Ok(Self { item, function }) } - pub(crate) fn expand(&self) -> Result { - let section_name: Cow<'_, _> = if let Some(function) = &self.function { - format!("tp_btf/{}", function).into() + pub(crate) fn expand(&self) -> TokenStream { + let Self { item, function } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let section_name: Cow<'_, _> = if let Some(function) = function { + format!("tp_btf/{function}").into() } else { "tp_btf".into() }; - let fn_vis = &self.item.vis; - let fn_name = self.item.sig.ident.clone(); - let item = &self.item; - Ok(quote! { - #[no_mangle] - #[link_section = #section_name] - #fn_vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> i32 { + let fn_name = &sig.ident; + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = #section_name)] + #vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> i32 { let _ = #fn_name(::aya_ebpf::programs::BtfTracePointContext::new(ctx)); return 0; #item } - }) + } } } @@ -60,10 +65,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote!( - #[no_mangle] - #[link_section = "tp_btf"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "tp_btf")] fn foo(ctx: *mut ::core::ffi::c_void) -> i32 { let _ = foo(::aya_ebpf::programs::BtfTracePointContext::new(ctx)); return 0; @@ -87,10 +92,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote!( - #[no_mangle] - #[link_section = "tp_btf/some_func"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "tp_btf/some_func")] fn foo(ctx: *mut ::core::ffi::c_void) -> i32 { let _ = foo(::aya_ebpf::programs::BtfTracePointContext::new(ctx)); return 0; diff --git a/aya-ebpf-macros/src/cgroup_device.rs b/aya-ebpf-macros/src/cgroup_device.rs index 28800cce..9a888d0b 100644 --- a/aya-ebpf-macros/src/cgroup_device.rs +++ b/aya-ebpf-macros/src/cgroup_device.rs @@ -1,34 +1,39 @@ use proc_macro2::TokenStream; -use proc_macro_error::abort; +use proc_macro2_diagnostics::{Diagnostic, SpanDiagnosticExt as _}; use quote::quote; -use syn::{ItemFn, Result}; +use syn::{ItemFn, spanned::Spanned as _}; pub(crate) struct CgroupDevice { item: ItemFn, } impl CgroupDevice { - pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { if !attrs.is_empty() { - abort!(attrs, "unexpected attribute") + return Err(attrs.span().error("unexpected attribute")); } let item = syn::parse2(item)?; - Ok(CgroupDevice { item }) + Ok(Self { item }) } - pub(crate) fn expand(&self) -> Result { - let fn_vis = &self.item.vis; - let fn_name = self.item.sig.ident.clone(); - let item = &self.item; - Ok(quote! { - #[no_mangle] - #[link_section = "cgroup/dev"] - #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_cgroup_dev_ctx) -> i32 { + pub(crate) fn expand(&self) -> TokenStream { + let Self { item } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let fn_name = &sig.ident; + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/dev")] + #vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_cgroup_dev_ctx) -> i32 { return #fn_name(::aya_ebpf::programs::DeviceContext::new(ctx)); #item } - }) + } } } @@ -49,10 +54,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup/dev"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/dev")] fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_cgroup_dev_ctx) -> i32 { return foo(::aya_ebpf::programs::DeviceContext::new(ctx)); diff --git a/aya-ebpf-macros/src/cgroup_skb.rs b/aya-ebpf-macros/src/cgroup_skb.rs index 39f60be1..89dbc5c5 100644 --- a/aya-ebpf-macros/src/cgroup_skb.rs +++ b/aya-ebpf-macros/src/cgroup_skb.rs @@ -1,48 +1,52 @@ use std::borrow::Cow; use proc_macro2::TokenStream; -use proc_macro_error::abort; +use proc_macro2_diagnostics::{Diagnostic, SpanDiagnosticExt as _}; use quote::quote; -use syn::{Ident, ItemFn, Result}; +use syn::{Ident, ItemFn}; pub(crate) struct CgroupSkb { item: ItemFn, - attach_type: Option, + attach_type: Option, } impl CgroupSkb { - pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { let item: ItemFn = syn::parse2(item)?; - let mut attach_type = None; - if !attrs.is_empty() { + let attach_type = if attrs.is_empty() { + None + } else { let ident: Ident = syn::parse2(attrs)?; - match ident.to_string().as_str() { - "ingress" | "egress" => (), - _ => abort!(ident, "invalid attach type"), + if ident != "ingress" && ident != "egress" { + return Err(ident.span().error("invalid attach type")); } - attach_type = Some(ident.to_string()); - } - Ok(CgroupSkb { item, attach_type }) + Some(ident) + }; + Ok(Self { item, attach_type }) } - pub(crate) fn expand(&self) -> Result { - let section_name: Cow<'_, _> = if self.attach_type.is_some() { - format!("cgroup_skb/{}", self.attach_type.as_ref().unwrap()).into() - } else { - "cgroup/skb".into() + pub(crate) fn expand(&self) -> TokenStream { + let Self { item, attach_type } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let section_name: Cow<'_, _> = match attach_type { + Some(attach_type) => format!("cgroup_skb/{attach_type}").into(), + None => "cgroup/skb".into(), }; - let fn_vis = &self.item.vis; - let fn_name = self.item.sig.ident.clone(); - let item = &self.item; - Ok(quote! { - #[no_mangle] - #[link_section = #section_name] - #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 { + let fn_name = &sig.ident; + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = #section_name)] + #vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 { return #fn_name(::aya_ebpf::programs::SkBuffContext::new(ctx)); #item } - }) + } } } @@ -63,10 +67,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup/skb"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/skb")] fn foo(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 { return foo(::aya_ebpf::programs::SkBuffContext::new(ctx)); @@ -89,10 +93,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup_skb/egress"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup_skb/egress")] fn foo(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 { return foo(::aya_ebpf::programs::SkBuffContext::new(ctx)); @@ -115,10 +119,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup_skb/ingress"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup_skb/ingress")] fn foo(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 { return foo(::aya_ebpf::programs::SkBuffContext::new(ctx)); @@ -141,10 +145,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup_skb/egress"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup_skb/egress")] fn foo(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 { return foo(::aya_ebpf::programs::SkBuffContext::new(ctx)); @@ -167,10 +171,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup_skb/egress"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup_skb/egress")] pub fn foo(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 { return foo(::aya_ebpf::programs::SkBuffContext::new(ctx)); @@ -193,10 +197,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup_skb/egress"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup_skb/egress")] pub(crate) fn foo(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 { return foo(::aya_ebpf::programs::SkBuffContext::new(ctx)); diff --git a/aya-ebpf-macros/src/cgroup_sock.rs b/aya-ebpf-macros/src/cgroup_sock.rs index d8950500..951f12d7 100644 --- a/aya-ebpf-macros/src/cgroup_sock.rs +++ b/aya-ebpf-macros/src/cgroup_sock.rs @@ -1,46 +1,51 @@ use std::borrow::Cow; use proc_macro2::TokenStream; -use proc_macro_error::abort; +use proc_macro2_diagnostics::{Diagnostic, SpanDiagnosticExt as _}; use quote::quote; -use syn::{Ident, ItemFn, Result}; +use syn::{Ident, ItemFn, spanned::Spanned as _}; pub(crate) struct CgroupSock { item: ItemFn, - attach_type: String, + attach_type: Ident, } impl CgroupSock { - pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { if attrs.is_empty() { - abort!(attrs, "missing attach type") + return Err(attrs.span().error("missing attach type")); } let item: ItemFn = syn::parse2(item)?; let attach_type: Ident = syn::parse2(attrs)?; - match attach_type.to_string().as_str() { - "post_bind4" | "post_bind6" | "sock_create" | "sock_release" => (), - _ => abort!(attach_type, "invalid attach type"), + if attach_type != "post_bind4" + && attach_type != "post_bind6" + && attach_type != "sock_create" + && attach_type != "sock_release" + { + return Err(attach_type.span().error("invalid attach type")); } - Ok(CgroupSock { - item, - attach_type: attach_type.to_string(), - }) + Ok(Self { item, attach_type }) } - pub(crate) fn expand(&self) -> Result { - let section_name: Cow<'_, _> = format!("cgroup/{}", self.attach_type).into(); - let fn_vis = &self.item.vis; - let fn_name = self.item.sig.ident.clone(); - let item = &self.item; - Ok(quote! { - #[no_mangle] - #[link_section = #section_name] - #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_sock) -> i32 { + pub(crate) fn expand(&self) -> TokenStream { + let Self { item, attach_type } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let section_name: Cow<'_, _> = format!("cgroup/{attach_type}").into(); + let fn_name = &sig.ident; + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = #section_name)] + #vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_sock) -> i32 { return #fn_name(::aya_ebpf::programs::SockContext::new(ctx)); #item } - }) + } } } @@ -61,10 +66,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup/post_bind4"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/post_bind4")] fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock) -> i32 { return foo(::aya_ebpf::programs::SockContext::new(ctx)); @@ -87,10 +92,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup/post_bind6"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/post_bind6")] fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock) -> i32 { return foo(::aya_ebpf::programs::SockContext::new(ctx)); @@ -112,10 +117,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup/sock_create"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/sock_create")] fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock) -> i32 { return foo(::aya_ebpf::programs::SockContext::new(ctx)); @@ -137,10 +142,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup/sock_release"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/sock_release")] fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock) -> i32 { return foo(::aya_ebpf::programs::SockContext::new(ctx)); diff --git a/aya-ebpf-macros/src/cgroup_sock_addr.rs b/aya-ebpf-macros/src/cgroup_sock_addr.rs index 17d0de39..edede565 100644 --- a/aya-ebpf-macros/src/cgroup_sock_addr.rs +++ b/aya-ebpf-macros/src/cgroup_sock_addr.rs @@ -1,48 +1,59 @@ use std::borrow::Cow; use proc_macro2::TokenStream; -use proc_macro_error::abort; +use proc_macro2_diagnostics::{Diagnostic, SpanDiagnosticExt as _}; use quote::quote; -use syn::{Ident, ItemFn, Result}; +use syn::{Ident, ItemFn, spanned::Spanned as _}; pub(crate) struct CgroupSockAddr { item: ItemFn, - attach_type: String, + attach_type: Ident, } impl CgroupSockAddr { - pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { if attrs.is_empty() { - abort!(attrs, "missing attach type") + return Err(attrs.span().error("missing attach type")); } let item = syn::parse2(item)?; let attach_type: Ident = syn::parse2(attrs)?; - match attach_type.to_string().as_str() { - "connect4" | "connect6" | "bind4" | "bind6" | "getpeername4" | "getpeername6" - | "getsockname4" | "getsockname6" | "sendmsg4" | "sendmsg6" | "recvmsg4" - | "recvmsg6" => (), - _ => abort!(attach_type, "invalid attach type"), + if attach_type != "connect4" + && attach_type != "connect6" + && attach_type != "bind4" + && attach_type != "bind6" + && attach_type != "getpeername4" + && attach_type != "getpeername6" + && attach_type != "getsockname4" + && attach_type != "getsockname6" + && attach_type != "sendmsg4" + && attach_type != "sendmsg6" + && attach_type != "recvmsg4" + && attach_type != "recvmsg6" + { + return Err(attach_type.span().error("invalid attach type")); } - Ok(CgroupSockAddr { - item, - attach_type: attach_type.to_string(), - }) + Ok(Self { item, attach_type }) } - pub(crate) fn expand(&self) -> Result { - let section_name: Cow<'_, _> = format!("cgroup/{}", self.attach_type).into(); - let fn_vis = &self.item.vis; - let fn_name = self.item.sig.ident.clone(); - let item = &self.item; - Ok(quote! { - #[no_mangle] - #[link_section = #section_name] - #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 { + pub(crate) fn expand(&self) -> TokenStream { + let Self { item, attach_type } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let section_name: Cow<'_, _> = format!("cgroup/{attach_type}").into(); + let fn_name = &sig.ident; + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = #section_name)] + #vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 { return #fn_name(::aya_ebpf::programs::SockAddrContext::new(ctx)); #item } - }) + } } } @@ -63,10 +74,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup/connect4"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/connect4")] fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 { return foo(::aya_ebpf::programs::SockAddrContext::new(ctx)); @@ -89,10 +100,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup/connect6"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/connect6")] fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 { return foo(::aya_ebpf::programs::SockAddrContext::new(ctx)); @@ -115,10 +126,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup/bind4"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/bind4")] fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 { return foo(::aya_ebpf::programs::SockAddrContext::new(ctx)); @@ -141,10 +152,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup/bind6"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/bind6")] fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 { return foo(::aya_ebpf::programs::SockAddrContext::new(ctx)); @@ -167,10 +178,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup/getpeername4"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/getpeername4")] fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 { return foo(::aya_ebpf::programs::SockAddrContext::new(ctx)); @@ -193,10 +204,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup/getpeername6"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/getpeername6")] fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 { return foo(::aya_ebpf::programs::SockAddrContext::new(ctx)); @@ -219,10 +230,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup/getsockname4"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/getsockname4")] fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 { return foo(::aya_ebpf::programs::SockAddrContext::new(ctx)); @@ -245,10 +256,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup/getsockname6"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/getsockname6")] fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 { return foo(::aya_ebpf::programs::SockAddrContext::new(ctx)); @@ -271,10 +282,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup/sendmsg4"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/sendmsg4")] fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 { return foo(::aya_ebpf::programs::SockAddrContext::new(ctx)); @@ -297,10 +308,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup/sendmsg6"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/sendmsg6")] fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 { return foo(::aya_ebpf::programs::SockAddrContext::new(ctx)); @@ -323,10 +334,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup/recvmsg4"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/recvmsg4")] fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 { return foo(::aya_ebpf::programs::SockAddrContext::new(ctx)); @@ -349,10 +360,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup/recvmsg6"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/recvmsg6")] fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 { return foo(::aya_ebpf::programs::SockAddrContext::new(ctx)); diff --git a/aya-ebpf-macros/src/cgroup_sockopt.rs b/aya-ebpf-macros/src/cgroup_sockopt.rs index ae4c7752..7b1759a3 100644 --- a/aya-ebpf-macros/src/cgroup_sockopt.rs +++ b/aya-ebpf-macros/src/cgroup_sockopt.rs @@ -1,46 +1,47 @@ use std::borrow::Cow; use proc_macro2::TokenStream; -use proc_macro_error::abort; +use proc_macro2_diagnostics::{Diagnostic, SpanDiagnosticExt as _}; use quote::quote; -use syn::{Ident, ItemFn, Result}; +use syn::{Ident, ItemFn, spanned::Spanned as _}; pub(crate) struct CgroupSockopt { item: ItemFn, - attach_type: String, + attach_type: Ident, } impl CgroupSockopt { - pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { if attrs.is_empty() { - abort!(attrs, "expected attach type"); + return Err(attrs.span().error("missing attach type")); } let item = syn::parse2(item)?; let attach_type: Ident = syn::parse2(attrs)?; - match attach_type.to_string().as_str() { - "getsockopt" | "setsockopt" => (), - _ => abort!(attach_type, "invalid attach type"), + if attach_type != "getsockopt" && attach_type != "setsockopt" { + return Err(attach_type.span().error("invalid attach type")); } - Ok(CgroupSockopt { - item, - attach_type: attach_type.to_string(), - }) + Ok(Self { item, attach_type }) } - pub(crate) fn expand(&self) -> Result { - let section_name: Cow<'_, _> = format!("cgroup/{}", self.attach_type).into(); - let fn_vis = &self.item.vis; - let fn_name = self.item.sig.ident.clone(); - let item = &self.item; - Ok(quote! { - #[no_mangle] - #[link_section = #section_name] - #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_sockopt) -> i32 { + pub(crate) fn expand(&self) -> TokenStream { + let Self { item, attach_type } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let section_name: Cow<'_, _> = format!("cgroup/{attach_type}").into(); + let fn_name = &sig.ident; + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = #section_name)] + #vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_sockopt) -> i32 { return #fn_name(::aya_ebpf::programs::SockoptContext::new(ctx)); #item } - }) + } } } @@ -61,10 +62,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote!( - #[no_mangle] - #[link_section = "cgroup/getsockopt"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/getsockopt")] fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sockopt) -> i32 { return foo(::aya_ebpf::programs::SockoptContext::new(ctx)); @@ -87,10 +88,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote!( - #[no_mangle] - #[link_section = "cgroup/setsockopt"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/setsockopt")] fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sockopt) -> i32 { return foo(::aya_ebpf::programs::SockoptContext::new(ctx)); diff --git a/aya-ebpf-macros/src/cgroup_sysctl.rs b/aya-ebpf-macros/src/cgroup_sysctl.rs index 451d3f76..0ff1b82f 100644 --- a/aya-ebpf-macros/src/cgroup_sysctl.rs +++ b/aya-ebpf-macros/src/cgroup_sysctl.rs @@ -1,34 +1,39 @@ use proc_macro2::TokenStream; -use proc_macro_error::abort; +use proc_macro2_diagnostics::{Diagnostic, SpanDiagnosticExt as _}; use quote::quote; -use syn::{ItemFn, Result}; +use syn::{ItemFn, spanned::Spanned as _}; pub(crate) struct CgroupSysctl { item: ItemFn, } impl CgroupSysctl { - pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { if !attrs.is_empty() { - abort!(attrs, "unexpected attribute") + return Err(attrs.span().error("unexpected attribute")); } let item = syn::parse2(item)?; - Ok(CgroupSysctl { item }) + Ok(Self { item }) } - pub(crate) fn expand(&self) -> Result { - let fn_vis = &self.item.vis; - let fn_name = self.item.sig.ident.clone(); - let item = &self.item; - Ok(quote! { - #[no_mangle] - #[link_section = "cgroup/sysctl"] - #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_sysctl) -> i32 { + pub(crate) fn expand(&self) -> TokenStream { + let Self { item } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let fn_name = &sig.ident; + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/sysctl")] + #vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_sysctl) -> i32 { return #fn_name(::aya_ebpf::programs::SysctlContext::new(ctx)); #item } - }) + } } } @@ -49,10 +54,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "cgroup/sysctl"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "cgroup/sysctl")] fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sysctl) -> i32 { return foo(::aya_ebpf::programs::SysctlContext::new(ctx)); diff --git a/aya-ebpf-macros/src/fentry.rs b/aya-ebpf-macros/src/fentry.rs index 0856e23f..aca54757 100644 --- a/aya-ebpf-macros/src/fentry.rs +++ b/aya-ebpf-macros/src/fentry.rs @@ -13,39 +13,48 @@ pub(crate) struct FEntry { } impl FEntry { - pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { let item = syn::parse2(item)?; let mut args = syn::parse2(attrs)?; let function = pop_string_arg(&mut args, "function"); let sleepable = pop_bool_arg(&mut args, "sleepable"); err_on_unknown_args(&args)?; - Ok(FEntry { + Ok(Self { item, function, sleepable, }) } - pub(crate) fn expand(&self) -> Result { - let section_prefix = if self.sleepable { "fentry.s" } else { "fentry" }; - let section_name: Cow<'_, _> = if let Some(function) = &self.function { - format!("{}/{}", section_prefix, function).into() + pub(crate) fn expand(&self) -> TokenStream { + let Self { + item, + function, + sleepable, + } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let section_prefix = if *sleepable { "fentry.s" } else { "fentry" }; + let section_name: Cow<'_, _> = if let Some(function) = function { + format!("{section_prefix}/{function}").into() } else { section_prefix.into() }; - let fn_vis = &self.item.vis; - let fn_name = self.item.sig.ident.clone(); - let item = &self.item; - Ok(quote! { - #[no_mangle] - #[link_section = #section_name] - #fn_vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> i32 { + let fn_name = &sig.ident; + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = #section_name)] + #vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> i32 { let _ = #fn_name(::aya_ebpf::programs::FEntryContext::new(ctx)); return 0; #item } - }) + } } } @@ -66,10 +75,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "fentry"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "fentry")] fn sys_clone(ctx: *mut ::core::ffi::c_void) -> i32 { let _ = sys_clone(::aya_ebpf::programs::FEntryContext::new(ctx)); return 0; @@ -95,10 +104,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "fentry/sys_clone"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "fentry/sys_clone")] fn sys_clone(ctx: *mut ::core::ffi::c_void) -> i32 { let _ = sys_clone(::aya_ebpf::programs::FEntryContext::new(ctx)); return 0; @@ -124,10 +133,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "fentry.s"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "fentry.s")] fn sys_clone(ctx: *mut ::core::ffi::c_void) -> i32 { let _ = sys_clone(::aya_ebpf::programs::FEntryContext::new(ctx)); return 0; diff --git a/aya-ebpf-macros/src/fexit.rs b/aya-ebpf-macros/src/fexit.rs index dd4eb2d5..1a2b15a9 100644 --- a/aya-ebpf-macros/src/fexit.rs +++ b/aya-ebpf-macros/src/fexit.rs @@ -13,39 +13,48 @@ pub(crate) struct FExit { } impl FExit { - pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { let item = syn::parse2(item)?; let mut args = syn::parse2(attrs)?; let function = pop_string_arg(&mut args, "function"); let sleepable = pop_bool_arg(&mut args, "sleepable"); err_on_unknown_args(&args)?; - Ok(FExit { + Ok(Self { item, function, sleepable, }) } - pub(crate) fn expand(&self) -> Result { - let section_prefix = if self.sleepable { "fexit.s" } else { "fexit" }; - let section_name: Cow<'_, _> = if let Some(function) = &self.function { - format!("{}/{}", section_prefix, function).into() + pub(crate) fn expand(&self) -> TokenStream { + let Self { + item, + function, + sleepable, + } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let section_prefix = if *sleepable { "fexit.s" } else { "fexit" }; + let section_name: Cow<'_, _> = if let Some(function) = function { + format!("{section_prefix}/{function}").into() } else { section_prefix.into() }; - let fn_vis = &self.item.vis; - let fn_name = self.item.sig.ident.clone(); - let item = &self.item; - Ok(quote! { - #[no_mangle] - #[link_section = #section_name] - #fn_vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> i32 { + let fn_name = &sig.ident; + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = #section_name)] + #vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> i32 { let _ = #fn_name(::aya_ebpf::programs::FExitContext::new(ctx)); return 0; #item } - }) + } } } @@ -66,10 +75,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "fexit"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "fexit")] fn sys_clone(ctx: *mut ::core::ffi::c_void) -> i32 { let _ = sys_clone(::aya_ebpf::programs::FExitContext::new(ctx)); return 0; @@ -95,10 +104,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "fexit/sys_clone"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "fexit/sys_clone")] fn sys_clone(ctx: *mut ::core::ffi::c_void) -> i32 { let _ = sys_clone(::aya_ebpf::programs::FExitContext::new(ctx)); return 0; @@ -124,10 +133,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "fexit.s/sys_clone"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "fexit.s/sys_clone")] fn sys_clone(ctx: *mut ::core::ffi::c_void) -> i32 { let _ = sys_clone(::aya_ebpf::programs::FExitContext::new(ctx)); return 0; diff --git a/aya-ebpf-macros/src/flow_dissector.rs b/aya-ebpf-macros/src/flow_dissector.rs new file mode 100644 index 00000000..f3d29314 --- /dev/null +++ b/aya-ebpf-macros/src/flow_dissector.rs @@ -0,0 +1,71 @@ +use proc_macro2::TokenStream; +use proc_macro2_diagnostics::{Diagnostic, SpanDiagnosticExt as _}; +use quote::quote; +use syn::{ItemFn, spanned::Spanned as _}; + +pub(crate) struct FlowDissector { + item: ItemFn, +} + +impl FlowDissector { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + if !attrs.is_empty() { + return Err(attrs.span().error("unexpected attribute")); + } + let item = syn::parse2(item)?; + Ok(Self { item }) + } + + pub(crate) fn expand(&self) -> TokenStream { + let Self { item } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let fn_name = &sig.ident; + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = "flow_dissector")] + #vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> u32 { + return #fn_name(::aya_ebpf::programs::FlowDissectorContext::new(ctx)); + + #item + } + } + } +} + +#[cfg(test)] +mod tests { + use syn::parse_quote; + + use super::*; + + #[test] + fn test_flow_dissector() { + let prog = FlowDissector::parse( + parse_quote! {}, + parse_quote! { + fn prog(ctx: &mut ::aya_ebpf::programs::FlowDissectorContext) -> u32 { + 0 + } + }, + ) + .unwrap(); + let expanded = prog.expand(); + let expected = quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = "flow_dissector")] + fn prog(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> u32 { + return prog(::aya_ebpf::programs::FlowDissectorContext::new(ctx)); + + fn prog(ctx: &mut ::aya_ebpf::programs::FlowDissectorContext) -> u32 { + 0 + } + } + }; + assert_eq!(expected.to_string(), expanded.to_string()); + } +} diff --git a/aya-ebpf-macros/src/kprobe.rs b/aya-ebpf-macros/src/kprobe.rs index 87eedb26..ba5ea31b 100644 --- a/aya-ebpf-macros/src/kprobe.rs +++ b/aya-ebpf-macros/src/kprobe.rs @@ -1,12 +1,12 @@ use std::borrow::Cow; use proc_macro2::TokenStream; +use proc_macro2_diagnostics::{Diagnostic, SpanDiagnosticExt as _}; use quote::quote; -use syn::{ItemFn, Result}; +use syn::{ItemFn, spanned::Spanned as _}; use crate::args::{err_on_unknown_args, pop_string_arg}; -#[allow(clippy::enum_variant_names)] #[derive(Debug, Copy, Clone)] pub(crate) enum KProbeKind { KProbe, @@ -31,14 +31,23 @@ pub(crate) struct KProbe { } impl KProbe { - pub(crate) fn parse(kind: KProbeKind, attrs: TokenStream, item: TokenStream) -> Result { + pub(crate) fn parse( + kind: KProbeKind, + attrs: TokenStream, + item: TokenStream, + ) -> Result { let item = syn::parse2(item)?; + let span = attrs.span(); let mut args = syn::parse2(attrs)?; let function = pop_string_arg(&mut args, "function"); - let offset = pop_string_arg(&mut args, "offset").map(|v| v.parse::().unwrap()); + let offset = pop_string_arg(&mut args, "offset") + .as_deref() + .map(str::parse) + .transpose() + .map_err(|err| span.error(format!("failed to parse `offset` argument: {err}")))?; err_on_unknown_args(&args)?; - Ok(KProbe { + Ok(Self { kind, item, function, @@ -46,39 +55,42 @@ impl KProbe { }) } - pub(crate) fn expand(&self) -> Result { - let section_name: Cow<'_, _> = if self.function.is_some() && self.offset.is_some() { - format!( - "{}/{}+{}", - self.kind, - self.function.as_ref().unwrap(), - self.offset.unwrap() - ) - .into() - } else if self.function.is_some() { - format!("{}/{}", self.kind, self.function.as_ref().unwrap()).into() - } else { - format!("{}", self.kind).into() + pub(crate) fn expand(&self) -> TokenStream { + let Self { + kind, + function, + offset, + item, + } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let section_name: Cow<'_, _> = match function { + None => self.kind.to_string().into(), + Some(function) => match offset { + None => format!("{kind}/{function}").into(), + Some(offset) => format!("{kind}/{function}+{offset}").into(), + }, }; - let probe_type = if section_name.as_ref().starts_with("kprobe") { quote! { ProbeContext } } else { quote! { RetProbeContext } }; - let fn_vis = &self.item.vis; - let fn_name = self.item.sig.ident.clone(); - let item = &self.item; - Ok(quote! { - #[no_mangle] - #[link_section = #section_name] - #fn_vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> u32 { + let fn_name = &sig.ident; + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = #section_name)] + #vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> u32 { let _ = #fn_name(::aya_ebpf::programs::#probe_type::new(ctx)); return 0; #item } - }) + } } } @@ -101,10 +113,10 @@ mod tests { ) .unwrap(); assert_eq!( - kprobe.expand().unwrap().to_string(), + kprobe.expand().to_string(), quote! { - #[no_mangle] - #[link_section = "kprobe"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "kprobe")] fn foo(ctx: *mut ::core::ffi::c_void) -> u32 { let _ = foo(::aya_ebpf::programs::ProbeContext::new(ctx)); return 0; @@ -133,10 +145,10 @@ mod tests { ) .unwrap(); assert_eq!( - kprobe.expand().unwrap().to_string(), + kprobe.expand().to_string(), quote! { - #[no_mangle] - #[link_section = "kprobe/fib_lookup"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "kprobe/fib_lookup")] fn foo(ctx: *mut ::core::ffi::c_void) -> u32 { let _ = foo(::aya_ebpf::programs::ProbeContext::new(ctx)); return 0; @@ -166,10 +178,10 @@ mod tests { ) .unwrap(); assert_eq!( - kprobe.expand().unwrap().to_string(), + kprobe.expand().to_string(), quote! { - #[no_mangle] - #[link_section = "kprobe/fib_lookup+10"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "kprobe/fib_lookup+10")] fn foo(ctx: *mut ::core::ffi::c_void) -> u32 { let _ = foo(::aya_ebpf::programs::ProbeContext::new(ctx)); return 0; @@ -196,10 +208,10 @@ mod tests { ) .unwrap(); assert_eq!( - kprobe.expand().unwrap().to_string(), + kprobe.expand().to_string(), quote! { - #[no_mangle] - #[link_section = "kretprobe"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "kretprobe")] fn foo(ctx: *mut ::core::ffi::c_void) -> u32 { let _ = foo(::aya_ebpf::programs::RetProbeContext::new(ctx)); return 0; diff --git a/aya-ebpf-macros/src/lib.rs b/aya-ebpf-macros/src/lib.rs index 8364b683..5c9878b0 100644 --- a/aya-ebpf-macros/src/lib.rs +++ b/aya-ebpf-macros/src/lib.rs @@ -1,4 +1,7 @@ +#![cfg_attr(test, expect(unused_crate_dependencies, reason = "used in doctests"))] + pub(crate) mod args; +mod btf_map; mod btf_tracepoint; mod cgroup_device; mod cgroup_skb; @@ -8,8 +11,10 @@ mod cgroup_sockopt; mod cgroup_sysctl; mod fentry; mod fexit; +mod flow_dissector; mod kprobe; mod lsm; +mod lsm_cgroup; mod map; mod perf_event; mod raw_tracepoint; @@ -23,6 +28,7 @@ mod tracepoint; mod uprobe; mod xdp; +use btf_map::BtfMap; use btf_tracepoint::BtfTracePoint; use cgroup_device::CgroupDevice; use cgroup_skb::CgroupSkb; @@ -32,12 +38,13 @@ use cgroup_sockopt::CgroupSockopt; use cgroup_sysctl::CgroupSysctl; use fentry::FEntry; use fexit::FExit; +use flow_dissector::FlowDissector; use kprobe::{KProbe, KProbeKind}; use lsm::Lsm; +use lsm_cgroup::LsmCgroup; use map::Map; use perf_event::PerfEvent; use proc_macro::TokenStream; -use proc_macro_error::{abort, proc_macro_error}; use raw_tracepoint::RawTracePoint; use sk_lookup::SkLookup; use sk_msg::SkMsg; @@ -48,83 +55,78 @@ use tc::SchedClassifier; use tracepoint::TracePoint; use uprobe::{UProbe, UProbeKind}; use xdp::Xdp; -#[proc_macro_error] + +#[proc_macro_attribute] +pub fn btf_map(attrs: TokenStream, item: TokenStream) -> TokenStream { + match BtfMap::parse(attrs.into(), item.into()) { + Ok(prog) => prog.expand(), + Err(err) => err.into_compile_error(), + } + .into() +} + #[proc_macro_attribute] pub fn map(attrs: TokenStream, item: TokenStream) -> TokenStream { match Map::parse(attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.into_compile_error(), } + .into() } -#[proc_macro_error] #[proc_macro_attribute] pub fn kprobe(attrs: TokenStream, item: TokenStream) -> TokenStream { match KProbe::parse(KProbeKind::KProbe, attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.emit_as_expr_tokens(), } + .into() } -#[proc_macro_error] #[proc_macro_attribute] pub fn kretprobe(attrs: TokenStream, item: TokenStream) -> TokenStream { match KProbe::parse(KProbeKind::KRetProbe, attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.emit_as_expr_tokens(), } + .into() } -#[proc_macro_error] #[proc_macro_attribute] pub fn uprobe(attrs: TokenStream, item: TokenStream) -> TokenStream { match UProbe::parse(UProbeKind::UProbe, attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => match prog.expand() { + Ok(tokens) => tokens, + Err(err) => err.emit_as_expr_tokens(), + }, + Err(err) => err.emit_as_expr_tokens(), } + .into() } -#[proc_macro_error] #[proc_macro_attribute] pub fn uretprobe(attrs: TokenStream, item: TokenStream) -> TokenStream { match UProbe::parse(UProbeKind::URetProbe, attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => match prog.expand() { + Ok(tokens) => tokens, + Err(err) => err.emit_as_expr_tokens(), + }, + Err(err) => err.emit_as_expr_tokens(), } + .into() } -#[proc_macro_error] #[proc_macro_attribute] pub fn sock_ops(attrs: TokenStream, item: TokenStream) -> TokenStream { match SockOps::parse(attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.emit_as_expr_tokens(), } + .into() } -#[proc_macro_error] #[proc_macro_attribute] pub fn sk_msg(attrs: TokenStream, item: TokenStream) -> TokenStream { match SkMsg::parse(attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.emit_as_expr_tokens(), } + .into() } /// Marks a function as an eBPF XDP program that can be attached to a network interface. @@ -149,60 +151,46 @@ pub fn sk_msg(attrs: TokenStream, item: TokenStream) -> TokenStream { /// XDP_PASS /// } /// ``` -#[proc_macro_error] #[proc_macro_attribute] pub fn xdp(attrs: TokenStream, item: TokenStream) -> TokenStream { match Xdp::parse(attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.emit_as_expr_tokens(), } + .into() } -#[proc_macro_error] #[proc_macro_attribute] pub fn classifier(attrs: TokenStream, item: TokenStream) -> TokenStream { match SchedClassifier::parse(attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.emit_as_expr_tokens(), } + .into() } #[proc_macro_attribute] pub fn cgroup_sysctl(attrs: TokenStream, item: TokenStream) -> TokenStream { match CgroupSysctl::parse(attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.emit_as_expr_tokens(), } + .into() } -#[proc_macro_error] #[proc_macro_attribute] pub fn cgroup_sockopt(attrs: TokenStream, item: TokenStream) -> TokenStream { match CgroupSockopt::parse(attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.emit_as_expr_tokens(), } + .into() } -#[proc_macro_error] #[proc_macro_attribute] pub fn cgroup_skb(attrs: TokenStream, item: TokenStream) -> TokenStream { match CgroupSkb::parse(attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.emit_as_expr_tokens(), } + .into() } /// Marks a function as a [`CgroupSockAddr`] eBPF program. @@ -228,62 +216,47 @@ pub fn cgroup_skb(attrs: TokenStream, item: TokenStream) -> TokenStream { /// pub fn connect4(ctx: SockAddrContext) -> i32 { /// match try_connect4(ctx) { /// Ok(ret) => ret, -/// Err(ret) => match ret.try_into() { -/// Ok(rt) => rt, -/// Err(_) => 1, -/// }, +/// Err(ret) => ret, /// } /// } /// -/// fn try_connect4(ctx: SockAddrContext) -> Result { +/// fn try_connect4(ctx: SockAddrContext) -> Result { /// Ok(0) /// } /// ``` -#[proc_macro_error] #[proc_macro_attribute] pub fn cgroup_sock_addr(attrs: TokenStream, item: TokenStream) -> TokenStream { match CgroupSockAddr::parse(attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.emit_as_expr_tokens(), } + .into() } -#[proc_macro_error] #[proc_macro_attribute] pub fn cgroup_sock(attrs: TokenStream, item: TokenStream) -> TokenStream { match CgroupSock::parse(attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.emit_as_expr_tokens(), } + .into() } -#[proc_macro_error] #[proc_macro_attribute] pub fn tracepoint(attrs: TokenStream, item: TokenStream) -> TokenStream { match TracePoint::parse(attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.emit_as_expr_tokens(), } + .into() } -#[proc_macro_error] #[proc_macro_attribute] pub fn perf_event(attrs: TokenStream, item: TokenStream) -> TokenStream { match PerfEvent::parse(attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.emit_as_expr_tokens(), } + .into() } /// Marks a function as a raw tracepoint eBPF program that can be attached at a @@ -314,16 +287,13 @@ pub fn perf_event(attrs: TokenStream, item: TokenStream) -> TokenStream { /// Ok(0) /// } /// ``` -#[proc_macro_error] #[proc_macro_attribute] pub fn raw_tracepoint(attrs: TokenStream, item: TokenStream) -> TokenStream { match RawTracePoint::parse(attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.into_compile_error(), } + .into() } /// Marks a function as an LSM program that can be attached to Linux LSM hooks. @@ -338,7 +308,7 @@ pub fn raw_tracepoint(attrs: TokenStream, item: TokenStream) -> TokenStream { /// /// LSM probes require a kernel compiled with `CONFIG_BPF_LSM=y` and `CONFIG_DEBUG_INFO_BTF=y`. /// In order for the probes to fire, you also need the BPF LSM to be enabled through your -/// kernel's boot paramters (like `lsm=lockdown,yama,bpf`). +/// kernel's boot parameters (like `lsm=lockdown,yama,bpf`). /// /// # Minimum kernel version /// @@ -361,16 +331,56 @@ pub fn raw_tracepoint(attrs: TokenStream, item: TokenStream) -> TokenStream { /// Ok(0) /// } /// ``` -#[proc_macro_error] #[proc_macro_attribute] pub fn lsm(attrs: TokenStream, item: TokenStream) -> TokenStream { match Lsm::parse(attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.into_compile_error(), + } + .into() +} + +/// Marks a function as an LSM program that can be attached to cgroups. +/// This program will only trigger for workloads in the attached cgroups. +/// Used to implement security policy and audit logging. +/// +/// The hook name is the first and only argument to the macro. +/// +/// LSM probes can be attached to the kernel's security hooks to implement mandatory +/// access control policy and security auditing. +/// +/// LSM probes require a kernel compiled with `CONFIG_BPF_LSM=y` and `CONFIG_DEBUG_INFO_BTF=y`. +/// In order for the probes to fire, you also need the BPF LSM to be enabled through your +/// kernel's boot parameters (like `lsm=lockdown,yama,bpf`). +/// +/// # Minimum kernel version +/// +/// The minimum kernel version required to use this feature is 6.0. +/// +/// # Examples +/// +/// ```no_run +/// use aya_ebpf::{macros::lsm_cgroup, programs::LsmContext}; +/// +/// #[lsm_cgroup(hook = "file_open")] +/// pub fn file_open(ctx: LsmContext) -> i32 { +/// match unsafe { try_file_open(ctx) } { +/// Ok(ret) => ret, +/// Err(ret) => ret, +/// } +/// } +/// +/// unsafe fn try_file_open(_ctx: LsmContext) -> Result { +/// Err(0) +/// } +/// ``` +#[proc_macro_attribute] +pub fn lsm_cgroup(attrs: TokenStream, item: TokenStream) -> TokenStream { + match LsmCgroup::parse(attrs.into(), item.into()) { + Ok(prog) => prog.expand(), + Err(err) => err.into_compile_error(), } + .into() } /// Marks a function as a [BTF-enabled raw tracepoint][1] eBPF program that can be attached at @@ -403,16 +413,13 @@ pub fn lsm(attrs: TokenStream, item: TokenStream) -> TokenStream { /// ``` /// /// [1]: https://github.com/torvalds/linux/commit/9e15db66136a14cde3f35691f1d839d950118826 -#[proc_macro_error] #[proc_macro_attribute] pub fn btf_tracepoint(attrs: TokenStream, item: TokenStream) -> TokenStream { match BtfTracePoint::parse(attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.into_compile_error(), } + .into() } /// Marks a function as a SK_SKB Stream Parser eBPF program that can be attached @@ -430,7 +437,7 @@ pub fn btf_tracepoint(attrs: TokenStream, item: TokenStream) -> TokenStream { /// ///#[stream_parser] ///fn stream_parser(ctx: SkBuffContext) -> u32 { -/// match { try_stream_parser(ctx) } { +/// match try_stream_parser(ctx) { /// Ok(ret) => ret, /// Err(ret) => ret, /// } @@ -440,7 +447,6 @@ pub fn btf_tracepoint(attrs: TokenStream, item: TokenStream) -> TokenStream { /// Ok(ctx.len()) ///} /// ``` -#[proc_macro_error] #[proc_macro_attribute] pub fn stream_parser(attrs: TokenStream, item: TokenStream) -> TokenStream { sk_skb(SkSkbKind::StreamParser, attrs, item) @@ -461,7 +467,7 @@ pub fn stream_parser(attrs: TokenStream, item: TokenStream) -> TokenStream { /// ///#[stream_verdict] ///fn stream_verdict(ctx: SkBuffContext) -> u32 { -/// match { try_stream_verdict(ctx) } { +/// match try_stream_verdict(ctx) { /// Ok(ret) => ret, /// Err(ret) => ret, /// } @@ -471,7 +477,6 @@ pub fn stream_parser(attrs: TokenStream, item: TokenStream) -> TokenStream { /// Ok(sk_action::SK_PASS) ///} /// ``` -#[proc_macro_error] #[proc_macro_attribute] pub fn stream_verdict(attrs: TokenStream, item: TokenStream) -> TokenStream { sk_skb(SkSkbKind::StreamVerdict, attrs, item) @@ -479,12 +484,10 @@ pub fn stream_verdict(attrs: TokenStream, item: TokenStream) -> TokenStream { fn sk_skb(kind: SkSkbKind, attrs: TokenStream, item: TokenStream) -> TokenStream { match SkSkb::parse(kind, attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.emit_as_expr_tokens(), } + .into() } /// Marks a function as a eBPF Socket Filter program that can be attached to @@ -501,19 +504,16 @@ fn sk_skb(kind: SkSkbKind, attrs: TokenStream, item: TokenStream) -> TokenStream /// /// #[socket_filter] /// pub fn accept_all(_ctx: SkBuffContext) -> i64 { -/// return 0 +/// 0 /// } /// ``` -#[proc_macro_error] #[proc_macro_attribute] pub fn socket_filter(attrs: TokenStream, item: TokenStream) -> TokenStream { match SocketFilter::parse(attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.emit_as_expr_tokens(), } + .into() } /// Marks a function as a fentry eBPF program that can be attached to almost @@ -528,9 +528,10 @@ pub fn socket_filter(attrs: TokenStream, item: TokenStream) -> TokenStream { /// # Examples /// /// ```no_run -/// # #![allow(non_camel_case_types)] /// use aya_ebpf::{macros::fentry, programs::FEntryContext}; +/// # #[expect(non_camel_case_types)] /// # type filename = u32; +/// # #[expect(non_camel_case_types)] /// # type path = u32; /// /// #[fentry(function = "filename_lookup")] @@ -548,16 +549,13 @@ pub fn socket_filter(attrs: TokenStream, item: TokenStream) -> TokenStream { /// Ok(0) /// } /// ``` -#[proc_macro_error] #[proc_macro_attribute] pub fn fentry(attrs: TokenStream, item: TokenStream) -> TokenStream { match FEntry::parse(attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.into_compile_error(), } + .into() } /// Marks a function as a fexit eBPF program that can be attached to almost @@ -573,9 +571,10 @@ pub fn fentry(attrs: TokenStream, item: TokenStream) -> TokenStream { /// # Examples /// /// ```no_run -/// # #![allow(non_camel_case_types)] /// use aya_ebpf::{macros::fexit, programs::FExitContext}; +/// # #[expect(non_camel_case_types)] /// # type filename = u32; +/// # #[expect(non_camel_case_types)] /// # type path = u32; /// /// #[fexit(function = "filename_lookup")] @@ -593,16 +592,54 @@ pub fn fentry(attrs: TokenStream, item: TokenStream) -> TokenStream { /// Ok(0) /// } /// ``` -#[proc_macro_error] #[proc_macro_attribute] pub fn fexit(attrs: TokenStream, item: TokenStream) -> TokenStream { match FExit::parse(attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.into_compile_error(), + } + .into() +} + +/// Marks a function as an eBPF Flow Dissector program. +/// +/// Flow dissector is a program type that parses metadata out of the packets. +/// +/// BPF flow dissectors can be attached per network namespace. These programs +/// are given a packet and expected to populate the fields of +/// `FlowDissectorContext::flow_keys`. The return code of the BPF program is +/// either [`BPF_OK`] to indicate successful dissection, [`BPF_DROP`] to +/// indicate parsing error, or [`BPF_FLOW_DISSECTOR_CONTINUE`] to indicate that +/// no custom dissection was performed, and fallback to standard dissector is +/// requested. +/// +/// # Minimum kernel version +/// +/// The minimum kernel version required to use this feature is 4.20. +/// +/// # Examples +/// +/// ```no_run +/// use aya_ebpf::{bindings::bpf_ret_code, macros::flow_dissector, programs::FlowDissectorContext}; +/// +/// #[flow_dissector] +/// pub fn dissect(_ctx: FlowDissectorContext) -> u32 { +/// // TODO: do something useful here. +/// bpf_ret_code::BPF_FLOW_DISSECTOR_CONTINUE +/// } +/// ``` +/// +/// [`FlowDissectorContext::flow_keys`]: ../aya_ebpf/programs/flow_dissector/struct.FlowDissectorContext.html#method.flow_keys +/// [`BPF_OK`]: ../aya_ebpf/bindings/bpf_ret_code/constant.bpf_ok +/// [`BPF_DROP`]: ../aya_ebpf/bindings/bpf_ret_code/constant.bpf_drop +/// [`BPF_FLOW_DISSECTOR_CONTINUE`]: ../aya_ebpf/bindings/bpf_ret_code/constant.bpf_flow_dissector_continue +#[proc_macro_attribute] +pub fn flow_dissector(attrs: TokenStream, item: TokenStream) -> TokenStream { + match FlowDissector::parse(attrs.into(), item.into()) { + Ok(prog) => prog.expand(), + Err(err) => err.emit_as_expr_tokens(), } + .into() } /// Marks a function as an eBPF Socket Lookup program that can be attached to @@ -620,19 +657,16 @@ pub fn fexit(attrs: TokenStream, item: TokenStream) -> TokenStream { /// #[sk_lookup] /// pub fn accept_all(_ctx: SkLookupContext) -> u32 { /// // use sk_assign to redirect -/// return 0 +/// 0 /// } /// ``` -#[proc_macro_error] #[proc_macro_attribute] pub fn sk_lookup(attrs: TokenStream, item: TokenStream) -> TokenStream { match SkLookup::parse(attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.emit_as_expr_tokens(), } + .into() } /// Marks a function as a cgroup device eBPF program that can be attached to a @@ -653,17 +687,14 @@ pub fn sk_lookup(attrs: TokenStream, item: TokenStream) -> TokenStream { /// #[cgroup_device] /// pub fn cgroup_dev(ctx: DeviceContext) -> i32 { /// // Reject all device access -/// return 0; +/// 0 /// } /// ``` -#[proc_macro_error] #[proc_macro_attribute] pub fn cgroup_device(attrs: TokenStream, item: TokenStream) -> TokenStream { match CgroupDevice::parse(attrs.into(), item.into()) { - Ok(prog) => prog - .expand() - .unwrap_or_else(|err| abort!(err.span(), "{}", err)) - .into(), - Err(err) => abort!(err.span(), "{}", err), + Ok(prog) => prog.expand(), + Err(err) => err.emit_as_expr_tokens(), } + .into() } diff --git a/aya-ebpf-macros/src/lsm.rs b/aya-ebpf-macros/src/lsm.rs index f32705db..00fa55fb 100644 --- a/aya-ebpf-macros/src/lsm.rs +++ b/aya-ebpf-macros/src/lsm.rs @@ -13,41 +13,50 @@ pub(crate) struct Lsm { } impl Lsm { - pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { let item = syn::parse2(item)?; let mut args = syn::parse2(attrs)?; let hook = pop_string_arg(&mut args, "hook"); let sleepable = pop_bool_arg(&mut args, "sleepable"); err_on_unknown_args(&args)?; - Ok(Lsm { + Ok(Self { item, hook, sleepable, }) } - pub(crate) fn expand(&self) -> Result { - let section_prefix = if self.sleepable { "lsm.s" } else { "lsm" }; - let section_name: Cow<'_, _> = if let Some(hook) = &self.hook { - format!("{}/{}", section_prefix, hook).into() + pub(crate) fn expand(&self) -> TokenStream { + let Self { + item, + hook, + sleepable, + } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let section_prefix = if *sleepable { "lsm.s" } else { "lsm" }; + let section_name: Cow<'_, _> = if let Some(hook) = hook { + format!("{section_prefix}/{hook}").into() } else { section_prefix.into() }; - let fn_vis = &self.item.vis; - let fn_name = self.item.sig.ident.clone(); - let item = &self.item; + let fn_name = &sig.ident; // LSM probes need to return an integer corresponding to the correct // policy decision. Therefore we do not simply default to a return value // of 0 as in other program types. - Ok(quote! { - #[no_mangle] - #[link_section = #section_name] - #fn_vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> i32 { + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = #section_name)] + #vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> i32 { return #fn_name(::aya_ebpf::programs::LsmContext::new(ctx)); #item } - }) + } } } @@ -71,10 +80,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "lsm.s/bprm_committed_creds"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "lsm.s/bprm_committed_creds")] fn bprm_committed_creds(ctx: *mut ::core::ffi::c_void) -> i32 { return bprm_committed_creds(::aya_ebpf::programs::LsmContext::new(ctx)); @@ -99,10 +108,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "lsm/bprm_committed_creds"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "lsm/bprm_committed_creds")] fn bprm_committed_creds(ctx: *mut ::core::ffi::c_void) -> i32 { return bprm_committed_creds(::aya_ebpf::programs::LsmContext::new(ctx)); diff --git a/aya-ebpf-macros/src/lsm_cgroup.rs b/aya-ebpf-macros/src/lsm_cgroup.rs new file mode 100644 index 00000000..0646c1bc --- /dev/null +++ b/aya-ebpf-macros/src/lsm_cgroup.rs @@ -0,0 +1,87 @@ +use std::borrow::Cow; + +use proc_macro2::TokenStream; +use quote::quote; +use syn::{ItemFn, Result}; + +use crate::args::{err_on_unknown_args, pop_string_arg}; + +pub(crate) struct LsmCgroup { + item: ItemFn, + hook: Option, +} + +impl LsmCgroup { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + let item = syn::parse2(item)?; + let mut args = syn::parse2(attrs)?; + let hook = pop_string_arg(&mut args, "hook"); + err_on_unknown_args(&args)?; + + Ok(Self { item, hook }) + } + + pub(crate) fn expand(&self) -> TokenStream { + let Self { item, hook } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let section_prefix = "lsm_cgroup"; + let section_name: Cow<'_, _> = if let Some(name) = hook { + format!("{section_prefix}/{name}").into() + } else { + section_prefix.into() + }; + let fn_name = &sig.ident; + // LSM probes need to return an integer corresponding to the correct + // policy decision. Therefore we do not simply default to a return value + // of 0 as in other program types. + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = #section_name)] + #vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> i32 { + return #fn_name(::aya_ebpf::programs::LsmContext::new(ctx)); + + #item + } + } + } +} + +#[cfg(test)] +mod tests { + use syn::parse_quote; + + use super::*; + + #[test] + fn test_lsm_cgroup() { + let prog = LsmCgroup::parse( + parse_quote! { + hook = "bprm_committed_creds", + }, + parse_quote! { + fn bprm_committed_creds(ctx: &mut ::aya_ebpf::programs::LsmContext) -> i32 { + 0 + } + }, + ) + .unwrap(); + let expanded = prog.expand(); + let expected = quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = "lsm_cgroup/bprm_committed_creds")] + fn bprm_committed_creds(ctx: *mut ::core::ffi::c_void) -> i32 { + return bprm_committed_creds(::aya_ebpf::programs::LsmContext::new(ctx)); + + fn bprm_committed_creds(ctx: &mut ::aya_ebpf::programs::LsmContext) -> i32 { + 0 + } + } + }; + assert_eq!(expected.to_string(), expanded.to_string()); + } +} diff --git a/aya-ebpf-macros/src/map.rs b/aya-ebpf-macros/src/map.rs index e50f45b9..2c9989d2 100644 --- a/aya-ebpf-macros/src/map.rs +++ b/aya-ebpf-macros/src/map.rs @@ -11,22 +11,22 @@ pub(crate) struct Map { } impl Map { - pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { let item: ItemStatic = syn::parse2(item)?; let mut args = syn::parse2(attrs)?; let name = name_arg(&mut args).unwrap_or_else(|| item.ident.to_string()); - Ok(Map { item, name }) + Ok(Self { item, name }) } - pub(crate) fn expand(&self) -> Result { - let section_name: Cow<'_, _> = "maps".to_string().into(); + pub(crate) fn expand(&self) -> TokenStream { + let section_name: Cow<'_, _> = "maps".into(); let name = &self.name; let item = &self.item; - Ok(quote! { - #[link_section = #section_name] - #[export_name = #name] + quote! { + #[unsafe(link_section = #section_name)] + #[unsafe(export_name = #name)] #item - }) + } } } @@ -45,10 +45,10 @@ mod tests { ), ) .unwrap(); - let expanded = map.expand().unwrap(); + let expanded = map.expand(); let expected = quote!( - #[link_section = "maps"] - #[export_name = "foo"] + #[unsafe(link_section = "maps")] + #[unsafe(export_name = "foo")] static BAR: HashMap<&'static str, u32> = HashMap::new(); ); assert_eq!(expected.to_string(), expanded.to_string()); @@ -63,10 +63,10 @@ mod tests { ), ) .unwrap(); - let expanded = map.expand().unwrap(); + let expanded = map.expand(); let expected = quote!( - #[link_section = "maps"] - #[export_name = "BAR"] + #[unsafe(link_section = "maps")] + #[unsafe(export_name = "BAR")] static BAR: HashMap<&'static str, u32> = HashMap::new(); ); assert_eq!(expected.to_string(), expanded.to_string()); diff --git a/aya-ebpf-macros/src/perf_event.rs b/aya-ebpf-macros/src/perf_event.rs index eb582167..6b693f5a 100644 --- a/aya-ebpf-macros/src/perf_event.rs +++ b/aya-ebpf-macros/src/perf_event.rs @@ -1,35 +1,40 @@ use proc_macro2::TokenStream; -use proc_macro_error::abort; +use proc_macro2_diagnostics::{Diagnostic, SpanDiagnosticExt as _}; use quote::quote; -use syn::{ItemFn, Result}; +use syn::{ItemFn, spanned::Spanned as _}; pub(crate) struct PerfEvent { item: ItemFn, } impl PerfEvent { - pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { if !attrs.is_empty() { - abort!(attrs, "unexpected attribute") + return Err(attrs.span().error("unexpected attribute")); } let item = syn::parse2(item)?; - Ok(PerfEvent { item }) + Ok(Self { item }) } - pub(crate) fn expand(&self) -> Result { - let fn_vis = &self.item.vis; - let fn_name = self.item.sig.ident.clone(); - let item = &self.item; - Ok(quote! { - #[no_mangle] - #[link_section = "perf_event"] - #fn_vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> u32 { + pub(crate) fn expand(&self) -> TokenStream { + let Self { item } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let fn_name = &sig.ident; + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = "perf_event")] + #vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> u32 { let _ = #fn_name(::aya_ebpf::programs::PerfEventContext::new(ctx)); return 0; #item } - }) + } } } @@ -50,10 +55,10 @@ mod tests { ), ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "perf_event"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "perf_event")] fn foo(ctx: *mut ::core::ffi::c_void) -> u32 { let _ = foo(::aya_ebpf::programs::PerfEventContext::new(ctx)); return 0; diff --git a/aya-ebpf-macros/src/raw_tracepoint.rs b/aya-ebpf-macros/src/raw_tracepoint.rs index d2780dce..7e5c6ed2 100644 --- a/aya-ebpf-macros/src/raw_tracepoint.rs +++ b/aya-ebpf-macros/src/raw_tracepoint.rs @@ -12,33 +12,38 @@ pub(crate) struct RawTracePoint { } impl RawTracePoint { - pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { let item = syn::parse2(item)?; let mut args = syn::parse2(attrs)?; let tracepoint = pop_string_arg(&mut args, "tracepoint"); err_on_unknown_args(&args)?; - Ok(RawTracePoint { item, tracepoint }) + Ok(Self { item, tracepoint }) } - pub(crate) fn expand(&self) -> Result { - let section_name: Cow<'_, _> = if let Some(tracepoint) = &self.tracepoint { - format!("raw_tp/{}", tracepoint).into() + pub(crate) fn expand(&self) -> TokenStream { + let Self { item, tracepoint } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let section_name: Cow<'_, _> = if let Some(tracepoint) = tracepoint { + format!("raw_tp/{tracepoint}").into() } else { "raw_tp".into() }; - let fn_vis = &self.item.vis; - let fn_name = self.item.sig.ident.clone(); - let item = &self.item; - Ok(quote! { - #[no_mangle] - #[link_section = #section_name] - #fn_vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> u32 { + let fn_name = &sig.ident; + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = #section_name)] + #vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> u32 { let _ = #fn_name(::aya_ebpf::programs::RawTracePointContext::new(ctx)); return 0; #item } - }) + } } } @@ -59,10 +64,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "raw_tp/sys_enter"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "raw_tp/sys_enter")] fn prog(ctx: *mut ::core::ffi::c_void) -> u32 { let _ = prog(::aya_ebpf::programs::RawTracePointContext::new(ctx)); return 0; diff --git a/aya-ebpf-macros/src/sk_lookup.rs b/aya-ebpf-macros/src/sk_lookup.rs index e32890de..699d4b43 100644 --- a/aya-ebpf-macros/src/sk_lookup.rs +++ b/aya-ebpf-macros/src/sk_lookup.rs @@ -1,34 +1,39 @@ use proc_macro2::TokenStream; -use proc_macro_error::abort; +use proc_macro2_diagnostics::{Diagnostic, SpanDiagnosticExt as _}; use quote::quote; -use syn::{ItemFn, Result}; +use syn::{ItemFn, spanned::Spanned as _}; pub(crate) struct SkLookup { item: ItemFn, } impl SkLookup { - pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { if !attrs.is_empty() { - abort!(attrs, "unexpected attribute") + return Err(attrs.span().error("unexpected attribute")); } let item = syn::parse2(item)?; - Ok(SkLookup { item }) + Ok(Self { item }) } - pub(crate) fn expand(&self) -> Result { - let fn_name = self.item.sig.ident.clone(); - let fn_vis = &self.item.vis; - let item = &self.item; - Ok(quote! { - #[no_mangle] - #[link_section = "sk_lookup"] - #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_sk_lookup) -> u32 { + pub(crate) fn expand(&self) -> TokenStream { + let Self { item } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let fn_name = &sig.ident; + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = "sk_lookup")] + #vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_sk_lookup) -> u32 { return #fn_name(::aya_ebpf::programs::SkLookupContext::new(ctx)); #item } - }) + } } } @@ -49,10 +54,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "sk_lookup"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "sk_lookup")] fn prog(ctx: *mut ::aya_ebpf::bindings::bpf_sk_lookup) -> u32 { return prog(::aya_ebpf::programs::SkLookupContext::new(ctx)); diff --git a/aya-ebpf-macros/src/sk_msg.rs b/aya-ebpf-macros/src/sk_msg.rs index 6586f8da..32100ff2 100644 --- a/aya-ebpf-macros/src/sk_msg.rs +++ b/aya-ebpf-macros/src/sk_msg.rs @@ -1,34 +1,39 @@ use proc_macro2::TokenStream; -use proc_macro_error::abort; +use proc_macro2_diagnostics::{Diagnostic, SpanDiagnosticExt as _}; use quote::quote; -use syn::{ItemFn, Result}; +use syn::{ItemFn, spanned::Spanned as _}; pub(crate) struct SkMsg { item: ItemFn, } impl SkMsg { - pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { if !attrs.is_empty() { - abort!(attrs, "unexpected attribute") + return Err(attrs.span().error("unexpected attribute")); } let item = syn::parse2(item)?; - Ok(SkMsg { item }) + Ok(Self { item }) } - pub(crate) fn expand(&self) -> Result { - let fn_vis = &self.item.vis; - let fn_name = self.item.sig.ident.clone(); - let item = &self.item; - Ok(quote! { - #[no_mangle] - #[link_section = "sk_msg"] - #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::sk_msg_md) -> u32 { + pub(crate) fn expand(&self) -> TokenStream { + let Self { item } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let fn_name = &sig.ident; + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = "sk_msg")] + #vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::sk_msg_md) -> u32 { return #fn_name(::aya_ebpf::programs::SkMsgContext::new(ctx)); #item } - }) + } } } @@ -49,10 +54,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "sk_msg"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "sk_msg")] fn prog(ctx: *mut ::aya_ebpf::bindings:: sk_msg_md) -> u32 { return prog(::aya_ebpf::programs::SkMsgContext::new(ctx)); diff --git a/aya-ebpf-macros/src/sk_skb.rs b/aya-ebpf-macros/src/sk_skb.rs index c626602f..4117c4e9 100644 --- a/aya-ebpf-macros/src/sk_skb.rs +++ b/aya-ebpf-macros/src/sk_skb.rs @@ -1,11 +1,10 @@ use std::borrow::Cow; use proc_macro2::TokenStream; -use proc_macro_error::abort; +use proc_macro2_diagnostics::{Diagnostic, SpanDiagnosticExt as _}; use quote::quote; -use syn::{ItemFn, Result}; +use syn::{ItemFn, spanned::Spanned as _}; -#[allow(clippy::enum_variant_names)] #[derive(Debug, Copy, Clone)] pub(crate) enum SkSkbKind { StreamVerdict, @@ -28,29 +27,37 @@ pub(crate) struct SkSkb { } impl SkSkb { - pub(crate) fn parse(kind: SkSkbKind, attrs: TokenStream, item: TokenStream) -> Result { + pub(crate) fn parse( + kind: SkSkbKind, + attrs: TokenStream, + item: TokenStream, + ) -> Result { if !attrs.is_empty() { - abort!(attrs, "unexpected attribute"); + return Err(attrs.span().error("unexpected attribute")); } let item = syn::parse2(item)?; - Ok(SkSkb { item, kind }) + Ok(Self { item, kind }) } - pub(crate) fn expand(&self) -> Result { - let kind = &self.kind; + pub(crate) fn expand(&self) -> TokenStream { + let Self { kind, item } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; let section_name: Cow<'_, _> = format!("sk_skb/{kind}").into(); - let fn_name = self.item.sig.ident.clone(); - let fn_vis = &self.item.vis; - let item = &self.item; - Ok(quote! { - #[no_mangle] - #[link_section = #section_name] - #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> u32 { + let fn_name = &sig.ident; + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = #section_name)] + #vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> u32 { return #fn_name(::aya_ebpf::programs::SkBuffContext::new(ctx)); #item } - }) + } } } @@ -72,10 +79,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "sk_skb/stream_parser"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "sk_skb/stream_parser")] fn prog(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> u32 { return prog(::aya_ebpf::programs::SkBuffContext::new(ctx)); @@ -99,10 +106,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "sk_skb/stream_verdict"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "sk_skb/stream_verdict")] fn prog(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> u32 { return prog(::aya_ebpf::programs::SkBuffContext::new(ctx)); diff --git a/aya-ebpf-macros/src/sock_ops.rs b/aya-ebpf-macros/src/sock_ops.rs index 91b9c5c4..f16b0585 100644 --- a/aya-ebpf-macros/src/sock_ops.rs +++ b/aya-ebpf-macros/src/sock_ops.rs @@ -1,34 +1,39 @@ use proc_macro2::TokenStream; -use proc_macro_error::abort; +use proc_macro2_diagnostics::{Diagnostic, SpanDiagnosticExt as _}; use quote::quote; -use syn::{ItemFn, Result}; +use syn::{ItemFn, spanned::Spanned as _}; pub(crate) struct SockOps { item: ItemFn, } impl SockOps { - pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { if !attrs.is_empty() { - abort!(attrs, "unexpected attribute") + return Err(attrs.span().error("unexpected attribute")); } let item = syn::parse2(item)?; - Ok(SockOps { item }) + Ok(Self { item }) } - pub(crate) fn expand(&self) -> Result { - let fn_vis = &self.item.vis; - let fn_name = self.item.sig.ident.clone(); - let item = &self.item; - Ok(quote! { - #[no_mangle] - #[link_section = "sockops"] - #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_sock_ops) -> u32 { + pub(crate) fn expand(&self) -> TokenStream { + let Self { item } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let fn_name = &sig.ident; + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = "sockops")] + #vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_sock_ops) -> u32 { return #fn_name(::aya_ebpf::programs::SockOpsContext::new(ctx)); #item } - }) + } } } @@ -49,10 +54,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "sockops"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "sockops")] fn prog(ctx: *mut ::aya_ebpf::bindings::bpf_sock_ops) -> u32 { return prog(::aya_ebpf::programs::SockOpsContext::new(ctx)); diff --git a/aya-ebpf-macros/src/socket_filter.rs b/aya-ebpf-macros/src/socket_filter.rs index 27c0b7c7..dc50551b 100644 --- a/aya-ebpf-macros/src/socket_filter.rs +++ b/aya-ebpf-macros/src/socket_filter.rs @@ -1,34 +1,39 @@ use proc_macro2::TokenStream; -use proc_macro_error::abort; +use proc_macro2_diagnostics::{Diagnostic, SpanDiagnosticExt as _}; use quote::quote; -use syn::{ItemFn, Result}; +use syn::{ItemFn, spanned::Spanned as _}; pub(crate) struct SocketFilter { item: ItemFn, } impl SocketFilter { - pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { if !attrs.is_empty() { - abort!(attrs, "unexpected attribute") + return Err(attrs.span().error("unexpected attribute")); } let item = syn::parse2(item)?; - Ok(SocketFilter { item }) + Ok(Self { item }) } - pub(crate) fn expand(&self) -> Result { - let fn_name = self.item.sig.ident.clone(); - let fn_vis = &self.item.vis; - let item = &self.item; - Ok(quote! { - #[no_mangle] - #[link_section = "socket"] - #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i64 { + pub(crate) fn expand(&self) -> TokenStream { + let Self { item } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let fn_name = &sig.ident; + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = "socket")] + #vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i64 { return #fn_name(::aya_ebpf::programs::SkBuffContext::new(ctx)); #item } - }) + } } } @@ -49,10 +54,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "socket"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "socket")] fn prog(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i64 { return prog(::aya_ebpf::programs::SkBuffContext::new(ctx)); diff --git a/aya-ebpf-macros/src/tc.rs b/aya-ebpf-macros/src/tc.rs index 0b816674..d6989a4b 100644 --- a/aya-ebpf-macros/src/tc.rs +++ b/aya-ebpf-macros/src/tc.rs @@ -1,34 +1,39 @@ use proc_macro2::TokenStream; -use proc_macro_error::abort; +use proc_macro2_diagnostics::{Diagnostic, SpanDiagnosticExt as _}; use quote::quote; -use syn::{ItemFn, Result}; +use syn::{ItemFn, spanned::Spanned as _}; pub(crate) struct SchedClassifier { item: ItemFn, } impl SchedClassifier { - pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { if !attrs.is_empty() { - abort!(attrs, "unexpected attribute") + return Err(attrs.span().error("unexpected attribute")); } let item = syn::parse2(item)?; - Ok(SchedClassifier { item }) + Ok(Self { item }) } - pub(crate) fn expand(&self) -> Result { - let fn_vis = &self.item.vis; - let fn_name = self.item.sig.ident.clone(); - let item = &self.item; - Ok(quote! { - #[no_mangle] - #[link_section = "classifier"] - #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 { + pub(crate) fn expand(&self) -> TokenStream { + let Self { item } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let fn_name = &sig.ident; + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = "classifier")] + #vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 { return #fn_name(::aya_ebpf::programs::TcContext::new(ctx)); #item } - }) + } } } @@ -49,10 +54,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "classifier"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "classifier")] fn prog(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 { return prog(::aya_ebpf::programs::TcContext::new(ctx)); diff --git a/aya-ebpf-macros/src/tracepoint.rs b/aya-ebpf-macros/src/tracepoint.rs index 7377346f..bdedc956 100644 --- a/aya-ebpf-macros/src/tracepoint.rs +++ b/aya-ebpf-macros/src/tracepoint.rs @@ -1,52 +1,64 @@ use std::borrow::Cow; use proc_macro2::TokenStream; -use proc_macro_error::abort; +use proc_macro2_diagnostics::{Diagnostic, SpanDiagnosticExt as _}; use quote::quote; -use syn::{ItemFn, Result}; +use syn::{ItemFn, spanned::Spanned as _}; use crate::args::{err_on_unknown_args, pop_string_arg}; pub(crate) struct TracePoint { item: ItemFn, - category: Option, - name: Option, + name_and_category: Option<(String, String)>, } impl TracePoint { - pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { let item = syn::parse2(item)?; + let span = attrs.span(); let mut args = syn::parse2(attrs)?; let name = pop_string_arg(&mut args, "name"); let category = pop_string_arg(&mut args, "category"); err_on_unknown_args(&args)?; - Ok(TracePoint { - item, - category, - name, - }) + match (name, category) { + (None, None) => Ok(Self { + item, + name_and_category: None, + }), + (Some(name), Some(category)) => Ok(Self { + item, + name_and_category: Some((name, category)), + }), + _ => Err(span.error("expected `name` and `category` arguments")), + } } - pub(crate) fn expand(&self) -> Result { - let section_name: Cow<'_, _> = match (&self.category, &self.name) { - (Some(category), Some(name)) => format!("tracepoint/{}/{}", category, name).into(), - (Some(_), None) => abort!(self.item, "expected `name` and `category` arguments"), - (None, Some(_)) => abort!(self.item, "expected `name` and `category` arguments"), - _ => "tracepoint".into(), + pub(crate) fn expand(&self) -> TokenStream { + let Self { + item, + name_and_category, + } = self; + let section_name: Cow<'_, _> = match name_and_category { + Some((name, category)) => format!("tracepoint/{category}/{name}").into(), + None => "tracepoint".into(), }; - let fn_vis = &self.item.vis; - let fn_name = self.item.sig.ident.clone(); - let item = &self.item; - Ok(quote! { - #[no_mangle] - #[link_section = #section_name] - #fn_vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> u32 { + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let fn_name = &sig.ident; + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = #section_name)] + #vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> u32 { let _ = #fn_name(::aya_ebpf::programs::TracePointContext::new(ctx)); return 0; #item } - }) + } } } @@ -67,10 +79,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "tracepoint/syscalls/sys_enter_bind"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "tracepoint/syscalls/sys_enter_bind")] fn prog(ctx: *mut ::core::ffi::c_void) -> u32 { let _ = prog(::aya_ebpf::programs::TracePointContext::new(ctx)); return 0; diff --git a/aya-ebpf-macros/src/uprobe.rs b/aya-ebpf-macros/src/uprobe.rs index 5ce01239..bc748635 100644 --- a/aya-ebpf-macros/src/uprobe.rs +++ b/aya-ebpf-macros/src/uprobe.rs @@ -1,13 +1,12 @@ use std::borrow::Cow; use proc_macro2::TokenStream; -use proc_macro_error::abort; +use proc_macro2_diagnostics::{Diagnostic, SpanDiagnosticExt as _}; use quote::quote; -use syn::{ItemFn, Result}; +use syn::{ItemFn, spanned::Spanned as _}; use crate::args::{err_on_unknown_args, pop_bool_arg, pop_string_arg}; -#[allow(clippy::enum_variant_names)] #[derive(Debug, Copy, Clone)] pub(crate) enum UProbeKind { UProbe, @@ -34,15 +33,24 @@ pub(crate) struct UProbe { } impl UProbe { - pub(crate) fn parse(kind: UProbeKind, attrs: TokenStream, item: TokenStream) -> Result { + pub(crate) fn parse( + kind: UProbeKind, + attrs: TokenStream, + item: TokenStream, + ) -> Result { let item = syn::parse2(item)?; + let span = attrs.span(); let mut args = syn::parse2(attrs)?; let path = pop_string_arg(&mut args, "path"); let function = pop_string_arg(&mut args, "function"); - let offset = pop_string_arg(&mut args, "offset").map(|v| v.parse::().unwrap()); + let offset = pop_string_arg(&mut args, "offset") + .as_deref() + .map(str::parse) + .transpose() + .map_err(|err| span.error(format!("failed to parse `offset` argument: {err}")))?; let sleepable = pop_bool_arg(&mut args, "sleepable"); err_on_unknown_args(&args)?; - Ok(UProbe { + Ok(Self { kind, item, path, @@ -52,39 +60,38 @@ impl UProbe { }) } - pub(crate) fn expand(&self) -> Result { - let prefix = if self.sleepable { - format!("{}.s", self.kind) - } else { - format!("{}", self.kind) - }; - let section_name: Cow<'_, _> = if self.path.is_some() && self.offset.is_some() { - if self.function.is_none() { - abort!(self.item.sig.ident, "expected `function` attribute"); - } - let mut path = self.path.as_ref().unwrap().clone(); - if path.starts_with('/') { - path.remove(0); - } - format!( - "{}/{}:{}+{}", - prefix, - path, - self.function.as_ref().unwrap(), - self.offset.unwrap() - ) - .into() - } else if self.path.is_some() { - if self.function.is_none() { - abort!(self.item.sig.ident, "expected `function` attribute"); - } - let mut path = self.path.as_ref().unwrap().clone(); - if path.starts_with('/') { - path.remove(0); + pub(crate) fn expand(&self) -> Result { + let Self { + kind, + path, + function, + offset, + item, + sleepable, + } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let mut prefix = kind.to_string(); + if *sleepable { + prefix.push_str(".s"); + } + let section_name: Cow<'_, _> = match path { + None => prefix.into(), + Some(path) => { + let path = path.strip_prefix("/").unwrap_or(path); + // TODO: check this in parse instead. + let function = function + .as_deref() + .ok_or(item.sig.span().error("expected `function` attribute"))?; + match offset { + None => format!("{prefix}/{path}:{function}").into(), + Some(offset) => format!("{prefix}/{path}:{function}+{offset}").into(), + } } - format!("{}/{}:{}", prefix, path, self.function.as_ref().unwrap()).into() - } else { - prefix.to_string().into() }; let probe_type = if section_name.as_ref().starts_with("uprobe") { @@ -92,13 +99,11 @@ impl UProbe { } else { quote! { RetProbeContext } }; - let fn_vis = &self.item.vis; - let fn_name = self.item.sig.ident.clone(); - let item = &self.item; + let fn_name = &sig.ident; Ok(quote! { - #[no_mangle] - #[link_section = #section_name] - #fn_vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> u32 { + #[unsafe(no_mangle)] + #[unsafe(link_section = #section_name)] + #vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> u32 { let _ = #fn_name(::aya_ebpf::programs::#probe_type::new(ctx)); return 0; @@ -129,8 +134,8 @@ mod tests { assert_eq!( uprobe.expand().unwrap().to_string(), quote! { - #[no_mangle] - #[link_section = "uprobe"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "uprobe")] fn foo(ctx: *mut ::core::ffi::c_void) -> u32 { let _ = foo(::aya_ebpf::programs::ProbeContext::new(ctx)); return 0; @@ -159,8 +164,8 @@ mod tests { assert_eq!( uprobe.expand().unwrap().to_string(), quote! { - #[no_mangle] - #[link_section = "uprobe.s"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "uprobe.s")] fn foo(ctx: *mut ::core::ffi::c_void) -> u32 { let _ = foo(::aya_ebpf::programs::ProbeContext::new(ctx)); return 0; @@ -192,8 +197,8 @@ mod tests { assert_eq!( uprobe.expand().unwrap().to_string(), quote! { - #[no_mangle] - #[link_section = "uprobe/self/proc/exe:trigger_uprobe"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "uprobe/self/proc/exe:trigger_uprobe")] fn foo(ctx: *mut ::core::ffi::c_void) -> u32 { let _ = foo(::aya_ebpf::programs::ProbeContext::new(ctx)); return 0; @@ -224,8 +229,8 @@ mod tests { assert_eq!( uprobe.expand().unwrap().to_string(), quote! { - #[no_mangle] - #[link_section = "uprobe/self/proc/exe:foo+123"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "uprobe/self/proc/exe:foo+123")] fn foo(ctx: *mut ::core::ffi::c_void) -> u32 { let _ = foo(::aya_ebpf::programs::ProbeContext::new(ctx)); return 0; @@ -254,8 +259,8 @@ mod tests { assert_eq!( uprobe.expand().unwrap().to_string(), quote! { - #[no_mangle] - #[link_section = "uretprobe"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "uretprobe")] fn foo(ctx: *mut ::core::ffi::c_void) -> u32 { let _ = foo(::aya_ebpf::programs::RetProbeContext::new(ctx)); return 0; diff --git a/aya-ebpf-macros/src/xdp.rs b/aya-ebpf-macros/src/xdp.rs index 3944fb19..e71b6f21 100644 --- a/aya-ebpf-macros/src/xdp.rs +++ b/aya-ebpf-macros/src/xdp.rs @@ -1,8 +1,9 @@ use proc_macro2::TokenStream; +use proc_macro2_diagnostics::{Diagnostic, SpanDiagnosticExt as _}; use quote::quote; -use syn::{Error, ItemFn, Result}; +use syn::{ItemFn, spanned::Spanned as _}; -use crate::args::{err_on_unknown_args, pop_bool_arg, pop_string_arg, Args}; +use crate::args::{Args, err_on_unknown_args, pop_bool_arg, pop_string_arg}; pub(crate) struct Xdp { item: ItemFn, @@ -17,8 +18,9 @@ pub(crate) enum XdpMap { } impl Xdp { - pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { let item = syn::parse2(item)?; + let span = attrs.span(); let mut args: Args = syn::parse2(attrs)?; let frags = pop_bool_arg(&mut args, "frags"); @@ -26,39 +28,42 @@ impl Xdp { Some("cpumap") => Some(XdpMap::CpuMap), Some("devmap") => Some(XdpMap::DevMap), Some(name) => { - return Err(Error::new_spanned( - "map", - format!("Invalid value. Expected 'cpumap' or 'devmap', found '{name}'"), - )) + return Err(span.error(format!( + "Invalid value. Expected 'cpumap' or 'devmap', found '{name}'" + ))); } None => None, }; err_on_unknown_args(&args)?; - Ok(Xdp { item, frags, map }) + Ok(Self { item, frags, map }) } - pub(crate) fn expand(&self) -> Result { - let mut section_name = vec![if self.frags { "xdp.frags" } else { "xdp" }]; - match self.map { + pub(crate) fn expand(&self) -> TokenStream { + let Self { item, frags, map } = self; + let ItemFn { + attrs: _, + vis, + sig, + block: _, + } = item; + let mut section_name = vec![if *frags { "xdp.frags" } else { "xdp" }]; + match map { Some(XdpMap::CpuMap) => section_name.push("cpumap"), Some(XdpMap::DevMap) => section_name.push("devmap"), None => (), }; let section_name = section_name.join("/"); - - let fn_vis = &self.item.vis; - let fn_name = self.item.sig.ident.clone(); - let item = &self.item; - Ok(quote! { - #[no_mangle] - #[link_section = #section_name] - #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::xdp_md) -> u32 { + let fn_name = &sig.ident; + quote! { + #[unsafe(no_mangle)] + #[unsafe(link_section = #section_name)] + #vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::xdp_md) -> u32 { return #fn_name(::aya_ebpf::programs::XdpContext::new(ctx)); #item } - }) + } } } @@ -79,10 +84,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "xdp"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "xdp")] fn prog(ctx: *mut ::aya_ebpf::bindings::xdp_md) -> u32 { return prog(::aya_ebpf::programs::XdpContext::new(ctx)); @@ -105,10 +110,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "xdp.frags"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "xdp.frags")] fn prog(ctx: *mut ::aya_ebpf::bindings::xdp_md) -> u32 { return prog(::aya_ebpf::programs::XdpContext::new(ctx)); @@ -131,10 +136,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "xdp/cpumap"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "xdp/cpumap")] fn prog(ctx: *mut ::aya_ebpf::bindings::xdp_md) -> u32 { return prog(::aya_ebpf::programs::XdpContext::new(ctx)); @@ -157,10 +162,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "xdp/devmap"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "xdp/devmap")] fn prog(ctx: *mut ::aya_ebpf::bindings::xdp_md) -> u32 { return prog(::aya_ebpf::programs::XdpContext::new(ctx)); @@ -197,10 +202,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "xdp.frags/cpumap"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "xdp.frags/cpumap")] fn prog(ctx: *mut ::aya_ebpf::bindings::xdp_md) -> u32 { return prog(::aya_ebpf::programs::XdpContext::new(ctx)); @@ -223,10 +228,10 @@ mod tests { }, ) .unwrap(); - let expanded = prog.expand().unwrap(); + let expanded = prog.expand(); let expected = quote! { - #[no_mangle] - #[link_section = "xdp.frags/devmap"] + #[unsafe(no_mangle)] + #[unsafe(link_section = "xdp.frags/devmap")] fn prog(ctx: *mut ::aya_ebpf::bindings::xdp_md) -> u32 { return prog(::aya_ebpf::programs::XdpContext::new(ctx)); diff --git a/aya-log-common/CHANGELOG.md b/aya-log-common/CHANGELOG.md index e75c65df..e2e10823 100644 --- a/aya-log-common/CHANGELOG.md +++ b/aya-log-common/CHANGELOG.md @@ -5,6 +5,47 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.1.15 (2024-10-09) + + + +### Other + + - Allow logging `core::net::Ipv4Addr` and `core::net::Ipv6Addr` + IP address types are available in `core`, so they can be used also in + eBPF programs. This change adds support of these types in aya-log. + + * Add implementation of `WriteTuBuf` to these types. + * Support these types in `Ipv4Formatter` and `Ipv6Formatter`. + * Support them with `DisplayHint::Ip`. + * Add support for formatting `[u8; 4]`, to be able to handle + `Ipv4Addr::octets`. + +### Chore + + - Prepare for aya-log-ebpf release + +### Commit Statistics + + + + - 3 commits contributed to the release. + - 223 days passed between releases. + - 2 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Prepare for aya-log-ebpf release ([`c3f0c7d`](https://github.com/aya-rs/aya/commit/c3f0c7dc3fb285da091454426eeda0723389f0f1)) + - Allow logging `core::net::Ipv4Addr` and `core::net::Ipv6Addr` ([`a75fc2f`](https://github.com/aya-rs/aya/commit/a75fc2f7691dad21822c2eff35281abd3c4b5d23)) + - Appease clippy ([`09442c2`](https://github.com/aya-rs/aya/commit/09442c2cbe9513365dfc1df8d4f7cf6f808a67ed)) +
+ ## v0.1.14 (2024-02-28) @@ -190,7 +231,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - - 37 commits contributed to the release over the course of 469 calendar days. + - 38 commits contributed to the release. - 469 days passed between releases. - 18 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages @@ -202,6 +243,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
view details * **Uncategorized** + - Release aya-log-common v0.1.14, aya-log v0.2.0 ([`b6a84b6`](https://github.com/aya-rs/aya/commit/b6a84b658ae00f23d0f1721c30d11f2e57f99eab)) - Add CHANGELOG ([`4f0f095`](https://github.com/aya-rs/aya/commit/4f0f0957758362296c2d0a4749d354edd8dc181e)) - Release aya-log-common v0.1.14, aya-log v0.2.0 ([`c22a696`](https://github.com/aya-rs/aya/commit/c22a6963d44befb5591d4b21c09767c43935cb54)) - Merge pull request #882 from dave-tucker/metadata ([`0fadd69`](https://github.com/aya-rs/aya/commit/0fadd695377b8a3f0d9a3af3bc8140f0f1bed8d2)) @@ -276,7 +318,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - - 12 commits contributed to the release over the course of 110 calendar days. + - 12 commits contributed to the release. - 4 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages diff --git a/aya-log-common/Cargo.toml b/aya-log-common/Cargo.toml index 61efec0b..4ee9d9b2 100644 --- a/aya-log-common/Cargo.toml +++ b/aya-log-common/Cargo.toml @@ -1,14 +1,19 @@ [package] -name = "aya-log-common" -version = "0.1.14" description = "A logging library for eBPF programs." -keywords = ["bpf", "ebpf", "log", "logging"] documentation = "https://docs.rs/aya-log" +keywords = ["bpf", "ebpf", "log", "logging"] +name = "aya-log-common" +version = "0.1.15" + authors.workspace = true +edition.workspace = true +homepage.workspace = true license.workspace = true repository.workspace = true -homepage.workspace = true -edition.workspace = true +rust-version.workspace = true + +[lints] +workspace = true [dependencies] num_enum = { workspace = true } diff --git a/aya-log-common/src/lib.rs b/aya-log-common/src/lib.rs index 24f41610..449c891b 100644 --- a/aya-log-common/src/lib.rs +++ b/aya-log-common/src/lib.rs @@ -1,13 +1,16 @@ +#![cfg_attr( + target_arch = "bpf", + expect(unused_crate_dependencies, reason = "compiler_builtins") +)] #![no_std] -use core::num::{NonZeroUsize, TryFromIntError}; +use core::{ + net::{IpAddr, Ipv4Addr, Ipv6Addr}, + num::TryFromIntError, +}; use num_enum::IntoPrimitive; -pub const LOG_BUF_CAPACITY: usize = 8192; - -pub const LOG_FIELDS: usize = 6; - pub type LogValueLength = u16; #[repr(u8)] @@ -52,7 +55,8 @@ impl_formatter_for_types!( f32, f64, char, str, - &str + &str, + IpAddr, Ipv4Addr, Ipv6Addr } ); @@ -65,6 +69,8 @@ impl_formatter_for_types!( } ); +impl LowerHexFormatter for &[u8; N] {} + pub trait UpperHexFormatter {} impl_formatter_for_types!( UpperHexFormatter: { @@ -74,8 +80,14 @@ impl_formatter_for_types!( } ); +impl UpperHexFormatter for &[u8; N] {} + pub trait IpFormatter {} +impl IpFormatter for IpAddr {} +impl IpFormatter for Ipv4Addr {} +impl IpFormatter for Ipv6Addr {} impl IpFormatter for u32 {} +impl IpFormatter for [u8; 4] {} impl IpFormatter for [u8; 16] {} impl IpFormatter for [u16; 8] {} @@ -85,10 +97,14 @@ impl LowerMacFormatter for [u8; 6] {} pub trait UpperMacFormatter {} impl UpperMacFormatter for [u8; 6] {} +pub trait PointerFormatter {} +impl PointerFormatter for *const T {} +impl PointerFormatter for *mut T {} + #[repr(u8)] #[derive(Copy, Clone, Debug, IntoPrimitive)] -pub enum RecordField { - Target = 1, +pub enum RecordFieldKind { + Target, Level, Module, File, @@ -100,7 +116,7 @@ pub enum RecordField { /// programs to userspace. #[repr(u8)] #[derive(Copy, Clone, Debug, IntoPrimitive)] -pub enum Argument { +pub enum ArgumentKind { DisplayHint, I8, @@ -118,6 +134,11 @@ pub enum Argument { F32, F64, + Ipv4Addr, + Ipv6Addr, + + /// `[u8; 4]` array which represents an IPv4 address. + ArrU8Len4, /// `[u8; 6]` array which represents a MAC address. ArrU8Len6, /// `[u8; 16]` array which represents an IPv6 address. @@ -127,6 +148,8 @@ pub enum Argument { Bytes, Str, + + Pointer, } /// All display hints @@ -145,162 +168,225 @@ pub enum DisplayHint { LowerMac, /// `:MAC` UpperMac, + /// `:p` + Pointer, } -// Must be inlined, else the BPF backend emits: -// -// llvm: :0:0: in function _ZN14aya_log_common5write17hc9ed05433e23a663E { i64, i64 } (i8, ptr, i64, ptr, i64): only integer returns supported -#[inline(always)] -pub(crate) fn write(tag: u8, value: &[u8], buf: &mut [u8]) -> Option { - let wire_len: LogValueLength = match value.len().try_into() { - Ok(wire_len) => Some(wire_len), - Err(TryFromIntError { .. }) => None, - }?; - let mut size = 0; - macro_rules! copy_from_slice { - ($value:expr) => {{ - let buf = buf.get_mut(size..)?; - let buf = buf.get_mut(..$value.len())?; - buf.copy_from_slice($value); - size += $value.len(); - }}; - } - copy_from_slice!(&[tag]); - copy_from_slice!(&wire_len.to_ne_bytes()); - copy_from_slice!(value); - NonZeroUsize::new(size) +mod sealed { + pub trait Sealed {} } -pub trait WriteToBuf { - fn write(self, buf: &mut [u8]) -> Option; +pub trait Argument: sealed::Sealed { + fn as_argument(&self) -> (ArgumentKind, impl AsRef<[u8]>); } -macro_rules! impl_write_to_buf { - ($type:ident, $arg_type:expr) => { - impl WriteToBuf for $type { - // This need not be inlined because the return value is Option where N is - // mem::size_of<$type>, which is a compile-time constant. - #[inline(never)] - fn write(self, buf: &mut [u8]) -> Option { - write($arg_type.into(), &self.to_ne_bytes(), buf) +macro_rules! impl_argument { + ($self:ident, $arg_type:expr) => { + impl sealed::Sealed for $self {} + + impl Argument for $self { + fn as_argument(&self) -> (ArgumentKind, impl AsRef<[u8]>) { + ($arg_type, self.to_ne_bytes()) } } }; } -impl_write_to_buf!(i8, Argument::I8); -impl_write_to_buf!(i16, Argument::I16); -impl_write_to_buf!(i32, Argument::I32); -impl_write_to_buf!(i64, Argument::I64); -impl_write_to_buf!(isize, Argument::Isize); - -impl_write_to_buf!(u8, Argument::U8); -impl_write_to_buf!(u16, Argument::U16); -impl_write_to_buf!(u32, Argument::U32); -impl_write_to_buf!(u64, Argument::U64); -impl_write_to_buf!(usize, Argument::Usize); - -impl_write_to_buf!(f32, Argument::F32); -impl_write_to_buf!(f64, Argument::F64); - -impl WriteToBuf for [u8; 16] { - // This need not be inlined because the return value is Option where N is 16, which is a - // compile-time constant. - #[inline(never)] - fn write(self, buf: &mut [u8]) -> Option { - write(Argument::ArrU8Len16.into(), &self, buf) +impl_argument!(i8, ArgumentKind::I8); +impl_argument!(i16, ArgumentKind::I16); +impl_argument!(i32, ArgumentKind::I32); +impl_argument!(i64, ArgumentKind::I64); +impl_argument!(isize, ArgumentKind::Isize); + +impl_argument!(u8, ArgumentKind::U8); +impl_argument!(u16, ArgumentKind::U16); +impl_argument!(u32, ArgumentKind::U32); +impl_argument!(u64, ArgumentKind::U64); +impl_argument!(usize, ArgumentKind::Usize); + +impl_argument!(f32, ArgumentKind::F32); +impl_argument!(f64, ArgumentKind::F64); + +enum Either { + Left(L), + Right(R), +} + +impl AsRef<[u8]> for Either +where + L: AsRef<[u8]>, + R: AsRef<[u8]>, +{ + fn as_ref(&self) -> &[u8] { + match self { + Self::Left(l) => l.as_ref(), + Self::Right(r) => r.as_ref(), + } + } +} + +impl sealed::Sealed for IpAddr {} +impl Argument for IpAddr { + fn as_argument(&self) -> (ArgumentKind, impl AsRef<[u8]>) { + match self { + Self::V4(ipv4_addr) => { + let (kind, value) = ipv4_addr.as_argument(); + (kind, Either::Left(value)) + } + Self::V6(ipv6_addr) => { + let (kind, value) = ipv6_addr.as_argument(); + (kind, Either::Right(value)) + } + } } } -impl WriteToBuf for [u16; 8] { - // This need not be inlined because the return value is Option where N is 16, which is a - // compile-time constant. - #[inline(never)] - fn write(self, buf: &mut [u8]) -> Option { - let bytes = unsafe { core::mem::transmute::<[u16; 8], [u8; 16]>(self) }; - write(Argument::ArrU16Len8.into(), &bytes, buf) +impl sealed::Sealed for Ipv4Addr {} +impl Argument for Ipv4Addr { + fn as_argument(&self) -> (ArgumentKind, impl AsRef<[u8]>) { + (ArgumentKind::Ipv4Addr, self.octets()) } } -impl WriteToBuf for [u8; 6] { - // This need not be inlined because the return value is Option where N is 6, which is a - // compile-time constant. - #[inline(never)] - fn write(self, buf: &mut [u8]) -> Option { - write(Argument::ArrU8Len6.into(), &self, buf) +impl sealed::Sealed for Ipv6Addr {} +impl Argument for Ipv6Addr { + fn as_argument(&self) -> (ArgumentKind, impl AsRef<[u8]>) { + (ArgumentKind::Ipv6Addr, self.octets()) } } -impl WriteToBuf for &[u8] { - // Must be inlined, else the BPF backend emits: - // - // llvm: :0:0: in function _ZN63_$LT$$RF$$u5b$u8$u5d$$u20$as$u20$aya_log_common..WriteToBuf$GT$5write17h08f30a45f7b9f09dE { i64, i64 } (ptr, i64, ptr, i64): only integer returns supported - #[inline(always)] - fn write(self, buf: &mut [u8]) -> Option { - write(Argument::Bytes.into(), self, buf) +impl sealed::Sealed for [u8; N] {} +impl Argument for [u8; N] { + fn as_argument(&self) -> (ArgumentKind, impl AsRef<[u8]>) { + let kind = match N { + 4 => ArgumentKind::ArrU8Len4, + 6 => ArgumentKind::ArrU8Len6, + 16 => ArgumentKind::ArrU8Len16, + _ => ArgumentKind::Bytes, + }; + (kind, *self) } } -impl WriteToBuf for &str { - // Must be inlined, else the BPF backend emits: - // - // llvm: :0:0: in function _ZN54_$LT$$RF$str$u20$as$u20$aya_log_common..WriteToBuf$GT$5write17h7e2d1ccaa758e2b5E { i64, i64 } (ptr, i64, ptr, i64): only integer returns supported - #[inline(always)] - fn write(self, buf: &mut [u8]) -> Option { - write(Argument::Str.into(), self.as_bytes(), buf) +impl sealed::Sealed for &[u8] {} +impl Argument for &[u8] { + fn as_argument(&self) -> (ArgumentKind, impl AsRef<[u8]>) { + (ArgumentKind::Bytes, *self) } } -impl WriteToBuf for DisplayHint { - // This need not be inlined because the return value is Option where N is 1, which is a - // compile-time constant. - #[inline(never)] - fn write(self, buf: &mut [u8]) -> Option { - let v: u8 = self.into(); - write(Argument::DisplayHint.into(), &v.to_ne_bytes(), buf) +impl sealed::Sealed for &str {} +impl Argument for &str { + fn as_argument(&self) -> (ArgumentKind, impl AsRef<[u8]>) { + (ArgumentKind::Str, self.as_bytes()) + } +} + +impl sealed::Sealed for DisplayHint {} +impl Argument for DisplayHint { + fn as_argument(&self) -> (ArgumentKind, impl AsRef<[u8]>) { + let v: u8 = (*self).into(); + (ArgumentKind::DisplayHint, v.to_ne_bytes()) + } +} + +impl sealed::Sealed for *const T {} +impl Argument for *const T { + fn as_argument(&self) -> (ArgumentKind, impl AsRef<[u8]>) { + (ArgumentKind::Pointer, (*self as usize).to_ne_bytes()) + } +} + +impl sealed::Sealed for *mut T {} +impl Argument for *mut T { + fn as_argument(&self) -> (ArgumentKind, impl AsRef<[u8]>) { + (ArgumentKind::Pointer, (*self as usize).to_ne_bytes()) + } +} + +fn wire_len(value: &[u8]) -> Option<[u8; 2]> { + match LogValueLength::try_from(value.len()) { + Ok(wire_len) => Some(wire_len.to_ne_bytes()), + Err(TryFromIntError { .. }) => None, } } #[doc(hidden)] -#[inline(always)] // This function takes too many arguments to not be inlined. -pub fn write_record_header( - buf: &mut [u8], - target: &str, - level: Level, - module: &str, - file: &str, - line: u32, - num_args: usize, -) -> Option { - let level: u8 = level.into(); - let mut size = 0; - macro_rules! write { - ($tag:expr, $value:expr) => {{ - let buf = buf.get_mut(size..)?; - let len = write($tag.into(), $value, buf)?; - size += len.get(); - }}; +pub struct Field([u8; 1], [u8; 2], T); + +impl> Field { + pub fn new(kind: impl Into, value: T) -> Option { + let wire_len = wire_len(value.as_ref())?; + Some(Self([kind.into()], wire_len, value)) + } + + pub fn with_bytes(&self, op: &mut impl FnMut(&[u8]) -> Option<()>) -> Option<()> { + let Self(kind, wire_len, value) = self; + op(&kind[..])?; + op(&wire_len[..])?; + op(value.as_ref())?; + Some(()) } - write!(RecordField::Target, target.as_bytes()); - write!(RecordField::Level, &level.to_ne_bytes()); - write!(RecordField::Module, module.as_bytes()); - write!(RecordField::File, file.as_bytes()); - write!(RecordField::Line, &line.to_ne_bytes()); - write!(RecordField::NumArgs, &num_args.to_ne_bytes()); - NonZeroUsize::new(size) } -#[cfg(test)] -mod test { - use super::*; - - #[test] - fn log_value_length_sufficient() { - assert!( - LOG_BUF_CAPACITY <= LogValueLength::MAX.into(), - "{} > {}", - LOG_BUF_CAPACITY, - LogValueLength::MAX - ); +#[doc(hidden)] +pub struct Header<'a> { + target: Field<&'a [u8]>, + level: Field<[u8; 1]>, + module: Field<&'a [u8]>, + file: Field<&'a [u8]>, + line: Field<[u8; 4]>, + num_args: Field<[u8; 4]>, +} + +impl<'a> Header<'a> { + pub fn new( + target: &'a str, + level: Level, + module: &'a str, + file: &'a str, + line: u32, + num_args: u32, + ) -> Option { + let target = target.as_bytes(); + let level: u8 = level.into(); + let level = level.to_ne_bytes(); + let module = module.as_bytes(); + let file = file.as_bytes(); + let line = line.to_ne_bytes(); + let num_args = num_args.to_ne_bytes(); + let target = Field::new(RecordFieldKind::Target, target)?; + let level = Field::new(RecordFieldKind::Level, level)?; + let module = Field::new(RecordFieldKind::Module, module)?; + let file = Field::new(RecordFieldKind::File, file)?; + let line = Field::new(RecordFieldKind::Line, line)?; + let num_args = Field::new(RecordFieldKind::NumArgs, num_args)?; + + Some(Self { + target, + level, + module, + file, + line, + num_args, + }) + } + + pub fn with_bytes(&self, op: &mut impl FnMut(&[u8]) -> Option<()>) -> Option<()> { + let Self { + target, + level, + module, + file, + line, + num_args, + } = self; + target.with_bytes(op)?; + level.with_bytes(op)?; + module.with_bytes(op)?; + file.with_bytes(op)?; + line.with_bytes(op)?; + num_args.with_bytes(op)?; + Some(()) } } diff --git a/aya-log-ebpf-macros/Cargo.toml b/aya-log-ebpf-macros/Cargo.toml index 53ba5233..ff6aee04 100644 --- a/aya-log-ebpf-macros/Cargo.toml +++ b/aya-log-ebpf-macros/Cargo.toml @@ -1,12 +1,17 @@ [package] +description = "Proc macros used by aya-log-ebpf" name = "aya-log-ebpf-macros" version = "0.1.0" -description = "Proc macros used by aya-log-ebpf" + authors.workspace = true +edition.workspace = true +homepage.workspace = true license.workspace = true repository.workspace = true -homepage.workspace = true -edition.workspace = true +rust-version.workspace = true + +[lints] +workspace = true [dependencies] aya-log-common = { path = "../aya-log-common", version = "^0.1.14", default-features = false } diff --git a/aya-log-ebpf-macros/src/expand.rs b/aya-log-ebpf-macros/src/expand.rs index fb4630b3..24345092 100644 --- a/aya-log-ebpf-macros/src/expand.rs +++ b/aya-log-ebpf-macros/src/expand.rs @@ -1,11 +1,11 @@ use aya_log_common::DisplayHint; -use aya_log_parser::{parse, Fragment}; +use aya_log_parser::{Fragment, Parameter, parse}; use proc_macro2::{Ident, Span, TokenStream}; use quote::quote; use syn::{ + Error, Expr, LitStr, Result, Token, parse::{Parse, ParseStream}, punctuated::Punctuated, - Error, Expr, LitStr, Result, Token, }; pub(crate) struct LogArgs { @@ -21,7 +21,7 @@ mod kw { } impl Parse for LogArgs { - fn parse(input: ParseStream) -> Result { + fn parse(input: ParseStream<'_>) -> Result { let ctx: Expr = input.parse()?; input.parse::()?; @@ -68,23 +68,28 @@ impl Parse for LogArgs { } } -pub(crate) fn log(args: LogArgs, level: Option) -> Result { - let ctx = args.ctx; - let target = match args.target { +pub(crate) fn log(args: LogArgs, level_expr: Option) -> Result { + let LogArgs { + ctx, + target, + level, + format_string, + formatting_args, + } = args; + let target = match target { Some(t) => quote! { #t }, None => quote! { module_path!() }, }; - let lvl: TokenStream = if let Some(l) = level { - l - } else if let Some(l) = args.level { - quote! { #l } - } else { - return Err(Error::new( - args.format_string.span(), - "missing `level` argument: try passing an `aya_log_ebpf::Level` value", - )); + let level_expr = match level_expr { + Some(level_expr) => level_expr, + None => { + let level_expr = level.ok_or(Error::new( + format_string.span(), + "missing `level` argument: try passing an `aya_log_ebpf::Level` value", + ))?; + quote! { #level_expr } + } }; - let format_string = args.format_string; let format_string_val = format_string.value(); let fragments = parse(&format_string_val).map_err(|e| { @@ -100,12 +105,12 @@ pub(crate) fn log(args: LogArgs, level: Option) -> Result values.push(quote!(#s)), - Fragment::Parameter(p) => { - let arg = match args.formatting_args { - Some(ref args) => args[arg_i].clone(), + Fragment::Parameter(Parameter { hint }) => { + let arg = match &formatting_args { + Some(args) => &args[arg_i], None => return Err(Error::new(format_string.span(), "no arguments provided")), }; - let (hint, formatter) = match p.hint { + let (hint, formatter) = match hint { DisplayHint::Default => { (quote!(DisplayHint::Default), quote!(DefaultFormatter)) } @@ -122,6 +127,9 @@ pub(crate) fn log(args: LogArgs, level: Option) -> Result { (quote!(DisplayHint::UpperMac), quote!(UpperMacFormatter)) } + DisplayHint::Pointer => { + (quote!(DisplayHint::Pointer), quote!(PointerFormatter)) + } }; let hint = quote!(::aya_log_ebpf::macro_support::#hint); let arg = quote!( @@ -139,34 +147,96 @@ pub(crate) fn log(args: LogArgs, level: Option) -> Result = (0..values.len()) + .map(|arg_i| quote::format_ident!("__arg{arg_i}")) + .collect(); + let num_args = values.len(); - let values_iter = values.iter(); - let size = Ident::new("size", Span::mixed_site()); - let len = Ident::new("len", Span::mixed_site()); - let slice = Ident::new("slice", Span::mixed_site()); - let record = Ident::new("record", Span::mixed_site()); + let num_args = u32::try_from(num_args).map_err(|core::num::TryFromIntError { .. }| { + Error::new( + Span::call_site(), + format!("too many arguments: {num_args} overflows u32"), + ) + })?; + let level = Ident::new("level", Span::mixed_site()); + let header = Ident::new("__header", Span::call_site()); + let tmp = Ident::new("__tmp", Span::call_site()); + let kind = Ident::new("__kind", Span::call_site()); + let value = Ident::new("__value", Span::call_site()); + let size = Ident::new("__size", Span::call_site()); + let capacity = Ident::new("__capacity", Span::call_site()); + let pos = Ident::new("__pos", Span::call_site()); + let op = Ident::new("__op", Span::call_site()); + let buf = Ident::new("__buf", Span::call_site()); Ok(quote! { - match unsafe { &mut ::aya_log_ebpf::AYA_LOG_BUF }.get_ptr_mut(0).and_then(|ptr| unsafe { ptr.as_mut() }) { - None => {}, - Some(::aya_log_ebpf::LogBuf { buf }) => { + { + let #level = #level_expr; + if ::aya_log_ebpf::macro_support::level_enabled(#level) { + // Silence unused variable warning; we may need ctx in the future. + let _ = #ctx; let _: Option<()> = (|| { - let #size = ::aya_log_ebpf::write_record_header( - buf, - #target, - #lvl, - module_path!(), - file!(), - line!(), - #num_args, - )?; - let mut #size = #size.get(); + use ::aya_log_ebpf::macro_support::{Header, Field, Argument, AYA_LOGS}; + + let #header = Header::new( + #target, + #level, + module_path!(), + file!(), + line!(), + #num_args, + )?; + #( - let #slice = buf.get_mut(#size..)?; - let #len = ::aya_log_ebpf::WriteToBuf::write(#values_iter, #slice)?; - #size += #len.get(); + let #tmp = #values; + let (#kind, #value) = #tmp.as_argument(); + let #idents = Field::new(#kind, #value)?; )* - let #record = buf.get(..#size)?; - unsafe { &mut ::aya_log_ebpf::AYA_LOGS }.output(#ctx, #record, 0); + + let mut #size = size_of::<::aya_log_ebpf::macro_support::LogValueLength>(); // For the size field itself. + let mut #op = |slice: &[u8]| { + #size += slice.len(); + Some(()) + }; + #header.with_bytes(&mut #op)?; + #( + #idents.with_bytes(&mut #op)?; + )* + + let #size = match ::aya_log_ebpf::macro_support::LogValueLength::try_from(#size) { + Ok(#size) => #size, + Err(core::num::TryFromIntError { .. }) => return None, + }; + let #size = core::hint::black_box(#size); + let mut #capacity = 64; + while #capacity < #size { + #capacity <<= 1; + if #capacity > 8192 { + // The size is too large to log. + return None; + } + } + let mut #buf = core::hint::black_box(AYA_LOGS.reserve_bytes(#capacity.into(), 0)?); + + match (|| { + let mut #pos = 0; + let mut #op = |slice: &[u8]| { + let #buf = #buf.get_mut(#pos..)?; + let #buf = #buf.get_mut(..slice.len())?; + #buf.copy_from_slice(slice); + #pos += slice.len(); + Some(()) + }; + #op(#size.to_ne_bytes().as_ref())?; + #header.with_bytes(&mut #op)?; + #( + #idents.with_bytes(&mut #op)?; + )* + Some(()) + })() { + Some(()) => #buf.submit(0), + None => #buf.discard(0), + } + Some(()) })(); } diff --git a/aya-log-parser/Cargo.toml b/aya-log-parser/Cargo.toml index 38a30d33..502ef3e1 100644 --- a/aya-log-parser/Cargo.toml +++ b/aya-log-parser/Cargo.toml @@ -1,15 +1,23 @@ [package] +description = "A parser for the aya log format strings" name = "aya-log-parser" version = "0.1.13" -description = "A parser for the aya log format strings" + authors.workspace = true +edition.workspace = true +homepage.workspace = true license.workspace = true repository.workspace = true -homepage.workspace = true -edition.workspace = true +rust-version.workspace = true + +[lints] +workspace = true [dependencies] aya-log-common = { path = "../aya-log-common", version = "^0.1.14", default-features = false } +[dev-dependencies] +assert_matches = { workspace = true } + [lib] path = "src/lib.rs" diff --git a/aya-log-parser/src/lib.rs b/aya-log-parser/src/lib.rs index cdce04e0..8f3e9eb9 100644 --- a/aya-log-parser/src/lib.rs +++ b/aya-log-parser/src/lib.rs @@ -52,39 +52,28 @@ fn push_literal(frag: &mut Vec, unescaped_literal: &str) -> Result<(), Ok(()) } -/// Parses the display hint (e.g. the `ipv4` in `{:ipv4}`). -fn parse_display_hint(s: &str) -> Result { - Ok(match s { - "p" | "x" => DisplayHint::LowerHex, - "X" => DisplayHint::UpperHex, - "i" => DisplayHint::Ip, - "mac" => DisplayHint::LowerMac, - "MAC" => DisplayHint::UpperMac, - _ => return Err(format!("unknown display hint: {s:?}")), - }) -} - /// Parse `Param` from the given `&str` which can specify an optional format /// like `:x` or `:ipv4` (without curly braces, which are parsed by the `parse` /// function). -fn parse_param(mut input: &str) -> Result { - const HINT_PREFIX: &str = ":"; - - // Then, optional hint - let mut hint = DisplayHint::Default; - - if input.starts_with(HINT_PREFIX) { - // skip the prefix - input = &input[HINT_PREFIX.len()..]; - if input.is_empty() { - return Err("malformed format string (missing display hint after ':')".into()); +fn parse_param(input: &str) -> Result { + let hint = match input.strip_prefix(":") { + Some(input) => match input { + "" => return Err("malformed format string (missing display hint after ':')".into()), + "x" => DisplayHint::LowerHex, + "X" => DisplayHint::UpperHex, + "i" => DisplayHint::Ip, + "mac" => DisplayHint::LowerMac, + "MAC" => DisplayHint::UpperMac, + "p" => DisplayHint::Pointer, + input => return Err(format!("unknown display hint: {input:?}")), + }, + None => { + if !input.is_empty() { + return Err(format!("unexpected content {input:?} in format string")); + } + DisplayHint::Default } - - hint = parse_display_hint(input)?; - } else if !input.is_empty() { - return Err(format!("unexpected content {input:?} in format string")); - } - + }; Ok(Parameter { hint }) } @@ -140,6 +129,8 @@ pub fn parse(format_string: &str) -> Result, String> { #[cfg(test)] mod test { + use assert_matches::assert_matches; + use super::*; #[test] @@ -165,13 +156,13 @@ mod test { }), Fragment::Literal(" lmao {} {something} ".into()), Fragment::Parameter(Parameter { - hint: DisplayHint::LowerHex + hint: DisplayHint::Pointer }), ]) ); - assert!(parse("foo {:}").is_err()); - assert!(parse("foo { bar").is_err()); - assert!(parse("foo } bar").is_err()); - assert!(parse("foo { bar }").is_err()); + assert_matches!(parse("foo {:}"), Err(_)); + assert_matches!(parse("foo { bar"), Err(_)); + assert_matches!(parse("foo } bar"), Err(_)); + assert_matches!(parse("foo { bar }"), Err(_)); } } diff --git a/aya-log/CHANGELOG.md b/aya-log/CHANGELOG.md index f0792c74..5508046d 100644 --- a/aya-log/CHANGELOG.md +++ b/aya-log/CHANGELOG.md @@ -5,6 +5,141 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### New Features + +- Add eBPF-side log level `AYA_LOG_LEVEL` allowing selective disabling of log + levels at load-time. Disabled levels are eliminated by the verifier, reducing + instruction count and avoiding program size limits when extensive logging is + present. + +### Breaking Changes + +- The implementation is now backed by a ring buffer rather than a perf event array. This should + improve performance but increases the minimum supported kernel version to 5.8. + +- Drop the built-in `tokio` dependency. Users must now BYOR (bring your own runtime). + +## v0.2.1 (2024-10-09) + +### Chore + + - Rename bpf -> ebpf + +### Documentation + + - reword rustdocs a bit + +### New Features + + - Rename Bpf to Ebpf + And BpfLoader to EbpfLoader. + This also adds type aliases to preserve the use of the old names, making + updating to a new Aya release less of a burden. These aliases are marked + as deprecated since we'll likely remove them in a later release. + - Rename BpfLogger to EbpfLogger + +### Bug Fixes + + - print &[u8] using full width + Otherwise `&[1u8, 0u8]` cannot be distinguished from `&[0x10u8]` (they both become 10) + +### Other + + - remove unwrap and NonZero* in info + Addresses the feedback from #1007: + - remove panic from `unwrap` and `expect` + - Option => Option with `0` mapping to `None` + - revamp MapInfo be more friendly with older kernels + Adds detection for whether a field is available in `MapInfo`: + - For `map_type()`, we treturn new enum `MapType` instead of the integer + representation. + - For fields that can't be zero, we return `Option` type. + - For `name_as_str()`, it now uses the feature probe `bpf_name()` to + detect if field is available. + Although the feature probe checks for program name, it can also be + used for map name since they were both introduced in the same commit. + - revamp ProgramInfo be more friendly with older kernels + Purpose of this commit is to add detections for whether a field is + available in `ProgramInfo`. + - For `program_type()`, we return the new enum `ProgramType` instead of + the integer representation. + - For fields that we know cannot be zero, we return `Option` + type. + - For `name_as_str()`, it now also uses the feature probe `bpf_name()` + to detect if field is available or not. + - Two additional feature probes are added for the fields: + - `prog_info_map_ids()` probe -> `map_ids()` field + - `prog_info_gpl_compatible()` probe -> `gpl_compatible()` field + + With the `prog_info_map_ids()` probe, the previous implementation that + I had for `bpf_prog_get_info_by_fd()` is shortened to use the probe + instead of having to make 2 potential syscalls. + + The `test_loaded_at()` test is also moved into info tests since it is + better related to the info tests. + - Allow logging `core::net::Ipv4Addr` and `core::net::Ipv6Addr` + IP address types are available in `core`, so they can be used also in + eBPF programs. This change adds support of these types in aya-log. + + * Add implementation of `WriteTuBuf` to these types. + * Support these types in `Ipv4Formatter` and `Ipv6Formatter`. + * Support them with `DisplayHint::Ip`. + * Add support for formatting `[u8; 4]`, to be able to handle + `Ipv4Addr::octets`. + - allow re-attach and read previously created logs + This feature is useful if someone wants to view the log contents + of a program that is already running. For e.g. a pinned program + or an XDP program attached to a net interface. + +### Test + + - adjust test byte arrays for big endian + Adding support for s390x (big endian architecture) and found that some + of the unit tests have structures and files implemented as byte arrays. + They are all coded as little endian and need a bug endian version to + work properly. + +### Commit Statistics + + + + - 20 commits contributed to the release. + - 223 days passed between releases. + - 11 commits were understood as [conventional](https://www.conventionalcommits.org). + - 1 unique issue was worked on: [#1008](https://github.com/aya-rs/aya/issues/1008) + +### Commit Details + + + +
view details + + * **[#1008](https://github.com/aya-rs/aya/issues/1008)** + - Print &[u8] using full width ([`55ed9e0`](https://github.com/aya-rs/aya/commit/55ed9e054665ba303e1fb381c7ac590056da7724)) + * **Uncategorized** + - Release aya-log-common v0.1.15, aya-log-ebpf v0.1.1 ([`04bbbcc`](https://github.com/aya-rs/aya/commit/04bbbccffa6298dbfeb967ca9967611e283ac81d)) + - Release aya-obj v0.2.0, aya v0.13.0, safety bump aya v0.13.0 ([`c169b72`](https://github.com/aya-rs/aya/commit/c169b727e6b8f8c2dda57f54b8c77f8b551025c6)) + - Reduce duplication in `{nr,possible}_cpus` ([`f3b2744`](https://github.com/aya-rs/aya/commit/f3b27440725a0eb2f1615c92cb0047e3b1548d66)) + - Remove unwrap and NonZero* in info ([`02d1db5`](https://github.com/aya-rs/aya/commit/02d1db5fc043fb7af90c14d13de6419ec5b9bcb5)) + - Merge pull request #1007 from tyrone-wu/aya/info-api ([`15eb935`](https://github.com/aya-rs/aya/commit/15eb935bce6d41fb67189c48ce582b074544e0ed)) + - Revamp MapInfo be more friendly with older kernels ([`fbb0930`](https://github.com/aya-rs/aya/commit/fbb09304a2de0d8baf7ea20c9727fcd2e4fb7f41)) + - Revamp ProgramInfo be more friendly with older kernels ([`88f5ac3`](https://github.com/aya-rs/aya/commit/88f5ac31142f1657b41b1ee0f217dcd9125b210a)) + - Merge pull request #974 from Billy99/billy99-arch-ppc64-s390x ([`ab5e688`](https://github.com/aya-rs/aya/commit/ab5e688fd49fcfb402ad47d51cb445437fbd8cb7)) + - Adjust test byte arrays for big endian ([`eef7346`](https://github.com/aya-rs/aya/commit/eef7346fb2231f8741410381198015cceeebfac9)) + - Revert "Remove unused `allow(dead_code)`" ([`4161993`](https://github.com/aya-rs/aya/commit/41619933d64289bec02c6672bd2248a8075eff3e)) + - Remove unused `allow(dead_code)` ([`5397c1c`](https://github.com/aya-rs/aya/commit/5397c1ca4b77cd27082e96aab9ab931631df7fa8)) + - Allow logging `core::net::Ipv4Addr` and `core::net::Ipv6Addr` ([`a75fc2f`](https://github.com/aya-rs/aya/commit/a75fc2f7691dad21822c2eff35281abd3c4b5d23)) + - Merge pull request #900 from catalin-h/log_init_from_program_id ([`e5d107d`](https://github.com/aya-rs/aya/commit/e5d107dd50b13ccf9783b9af4e79b57b02c1f0f3)) + - Reword rustdocs a bit ([`8830c0b`](https://github.com/aya-rs/aya/commit/8830c0bc20c6e3dbbddf63533d4623fcd45dd9af)) + - Allow re-attach and read previously created logs ([`e66f954`](https://github.com/aya-rs/aya/commit/e66f9540c9196ecce16431542366771b6505124f)) + - Merge pull request #528 from dave-tucker/rename-all-the-things ([`63d8d4d`](https://github.com/aya-rs/aya/commit/63d8d4d34bdbbee149047dc0a5e9c2b191f3b32d)) + - Rename Bpf to Ebpf ([`8c79b71`](https://github.com/aya-rs/aya/commit/8c79b71bd5699a686f33360520aa95c1a2895fa5)) + - Rename BpfLogger to EbpfLogger ([`a93e354`](https://github.com/aya-rs/aya/commit/a93e3546204115631c11bc0601905c205bf8a584)) + - Rename bpf -> ebpf ([`41c6156`](https://github.com/aya-rs/aya/commit/41c61560eae01a30c703ea22c5bfeeff0ecf6b1b)) +
+ ## v0.2.0 (2024-02-28) @@ -37,15 +172,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Documentation -- Add CHANGELOG + - Add CHANGELOG ### New Features -- check format and value type in proc macro + - check format and value type in proc macro ### Bug Fixes -- remove some useless code + - remove some useless code ### Other @@ -127,10 +262,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 -- 37 commits contributed to the release over the course of 469 calendar days. -- 469 days passed between releases. -- 14 commits were understood as [conventional](https://www.conventionalcommits.org). -- 0 issues like '(#ID)' were seen in commit messages + - 38 commits contributed to the release. + - 469 days passed between releases. + - 14 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages ### Commit Details @@ -138,7 +273,45 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
view details -- **Uncategorized** - Add CHANGELOG ([`9abb716`](https://github.com/aya-rs/aya/commit/9abb7160e51dd18c509049b1371acd96515d8f04)) - Release aya-log-common v0.1.14, aya-log v0.2.0 ([`c22a696`](https://github.com/aya-rs/aya/commit/c22a6963d44befb5591d4b21c09767c43935cb54)) - Release aya-obj v0.1.0, aya v0.12.0, safety bump aya-log v0.2.0 ([`0e99fa0`](https://github.com/aya-rs/aya/commit/0e99fa0f340b2fb2e0da3b330aa6555322a77eec)) - Don't use path deps in workspace ([`13b1fc6`](https://github.com/aya-rs/aya/commit/13b1fc63ef2ae083ba03ce9de24cb4f31f989d21)) - Merge pull request #882 from dave-tucker/metadata ([`0fadd69`](https://github.com/aya-rs/aya/commit/0fadd695377b8a3f0d9a3af3bc8140f0f1bed8d2)) - Use the cargo workspace package table ([`b3e7ef7`](https://github.com/aya-rs/aya/commit/b3e7ef741c5b8d09fc7dc8302576f8174be75ff4)) - Appease rustc dead_code lint ([`963dd13`](https://github.com/aya-rs/aya/commit/963dd1321925c95f80c8a2bf656b88a39497ca01)) - Merge pull request #797 from aya-rs/rustfmt-group-imports ([`373fb7b`](https://github.com/aya-rs/aya/commit/373fb7bf06ba80ee4c120d8c112f5e810204c472)) - Group_imports = "StdExternalCrate" ([`d16e607`](https://github.com/aya-rs/aya/commit/d16e607fd4b6258b516913071fdacafeb2bbbff9)) - Merge pull request #736 from aya-rs/logging-better ([`45df251`](https://github.com/aya-rs/aya/commit/45df2519b60613310e8827fbb4076f60c393c3bb)) - Merge pull request #735 from aya-rs/log-option-not-result ([`ecf0dd9`](https://github.com/aya-rs/aya/commit/ecf0dd973985bd442978b202d0fd6f75647cdda3)) - S/Result/Option/ ([`ca3f70b`](https://github.com/aya-rs/aya/commit/ca3f70b16a705bf26d2ccc7ce754de403be36223)) - Remove pointless DefaultLogger ([`00d265c`](https://github.com/aya-rs/aya/commit/00d265c51b69e672457502593fbc63d0ac953e27)) - Merge pull request #667 from vadorovsky/workspace-dependencies ([`f554d42`](https://github.com/aya-rs/aya/commit/f554d421053bc34266afbf8e00b28705ab4b41d2)) - Define dependencies on the workspace level ([`96fa08b`](https://github.com/aya-rs/aya/commit/96fa08bd82233268154edf30b106876f5a4f0e30)) - Merge pull request #666 from aya-rs/toml-fmt ([`dc3b0b8`](https://github.com/aya-rs/aya/commit/dc3b0b87308fdac5ff8f472de9a5e849b52d9fee)) - Add formatter and check in CI ([`c8bf646`](https://github.com/aya-rs/aya/commit/c8bf646ef098a00bc5c6e1cb5ae35ffa6fb5eac5)) - Merge pull request #650 from aya-rs/test-cleanup ([`61608e6`](https://github.com/aya-rs/aya/commit/61608e64583f9dc599eef9b8db098f38a765b285)) - Remove "async" feature ([`fa91fb4`](https://github.com/aya-rs/aya/commit/fa91fb4f59be3505664f8088b6e3e8da2c372253)) - Unify IP format hints into one, repsesent it by `:i` token ([`84e5e28`](https://github.com/aya-rs/aya/commit/84e5e2894f226f4b2c7cb637a6f44d5773b927e6)) - Remove some useless code ([`d999a95`](https://github.com/aya-rs/aya/commit/d999a95b410df79e1d9f6c27462e19a2cede06c2)) - Check format and value type in proc macro ([`0970300`](https://github.com/aya-rs/aya/commit/0970300d1f5659622fa55a18dd7681c608d75b0f)) - Merge pull request #585 from probulate/tag-len-value ([`5165bf2`](https://github.com/aya-rs/aya/commit/5165bf2f99cdc228122bdab505c2059723e95a9f)) - Support logging byte slices ([`d9f966e`](https://github.com/aya-rs/aya/commit/d9f966ec9e49f4439710559cac852bde62810975)) - Aya-log, aya-log-common: economize bytes ([`a4a69a6`](https://github.com/aya-rs/aya/commit/a4a69a6bcfe87d3c066f2cc341b74039f53dcc9e)) - Check errors in tests ([`e4537e3`](https://github.com/aya-rs/aya/commit/e4537e389ad7ac6f09fc89349444e37fe01e4af4)) - Aya-log, aya-log-common: Remove duplicate struct ([`490d7d5`](https://github.com/aya-rs/aya/commit/490d7d587ad90b899aff2a30d65db8641ceb32df)) - Merge pull request #591 from vadorovsky/aya-log-impl-pod ([`3d3ce8b`](https://github.com/aya-rs/aya/commit/3d3ce8bfa2eff19706cc3d8e5f0ce9e81a520a78)) - Move the `Pod` implementations from aya-log-common to aya-log ([`5603d72`](https://github.com/aya-rs/aya/commit/5603d7248a51a16233c249b645e30ea3f6804744)) - Merge pull request #484 from vadorovsky/update-tokio ([`bea0e83`](https://github.com/aya-rs/aya/commit/bea0e83512cc6d45b3e4fb5c3f62432c434139b7)) - Update Tokio and inventory ([`dad75f4`](https://github.com/aya-rs/aya/commit/dad75f45ac357e86eebc92c4f95f6dd4e43d8496)) - Don't panic in init when bpf programs don't log ([`12927cf`](https://github.com/aya-rs/aya/commit/12927cf6992bc0f8b1e4221d48b34f4c0098b93d)) - Merge pull request #456 from dmitris/uninlined_format_args ([`16b029e`](https://github.com/aya-rs/aya/commit/16b029ed3708470afd2a6d67615b30c8d30b5059)) - Fix uninlined_format_args clippy issues ([`055d94f`](https://github.com/aya-rs/aya/commit/055d94f58be4f80ada416b99278a22f600c71285)) - Merge pull request #449 from aya-rs/dependabot/cargo/env_logger-0.10 ([`f9bef9f`](https://github.com/aya-rs/aya/commit/f9bef9f8c0d2c5b21809e037b8e9782f3c761df3)) - Update env_logger requirement from 0.9 to 0.10 ([`1c8088b`](https://github.com/aya-rs/aya/commit/1c8088b16cc255fc188b0b9a84b550a5c50a9003)) - Revert "aya-log, aya-log-common: temporarily revert to old map API so we can release" ([`0b41018`](https://github.com/aya-rs/aya/commit/0b41018ee27bfda9b1ea7dc422b34d3a08fc3fc6)) + * **Uncategorized** + - Release aya-log-common v0.1.14, aya-log v0.2.0 ([`b6a84b6`](https://github.com/aya-rs/aya/commit/b6a84b658ae00f23d0f1721c30d11f2e57f99eab)) + - Add CHANGELOG ([`9abb716`](https://github.com/aya-rs/aya/commit/9abb7160e51dd18c509049b1371acd96515d8f04)) + - Release aya-log-common v0.1.14, aya-log v0.2.0 ([`c22a696`](https://github.com/aya-rs/aya/commit/c22a6963d44befb5591d4b21c09767c43935cb54)) + - Release aya-obj v0.1.0, aya v0.12.0, safety bump aya-log v0.2.0 ([`0e99fa0`](https://github.com/aya-rs/aya/commit/0e99fa0f340b2fb2e0da3b330aa6555322a77eec)) + - Don't use path deps in workspace ([`13b1fc6`](https://github.com/aya-rs/aya/commit/13b1fc63ef2ae083ba03ce9de24cb4f31f989d21)) + - Merge pull request #882 from dave-tucker/metadata ([`0fadd69`](https://github.com/aya-rs/aya/commit/0fadd695377b8a3f0d9a3af3bc8140f0f1bed8d2)) + - Use the cargo workspace package table ([`b3e7ef7`](https://github.com/aya-rs/aya/commit/b3e7ef741c5b8d09fc7dc8302576f8174be75ff4)) + - Appease rustc dead_code lint ([`963dd13`](https://github.com/aya-rs/aya/commit/963dd1321925c95f80c8a2bf656b88a39497ca01)) + - Merge pull request #797 from aya-rs/rustfmt-group-imports ([`373fb7b`](https://github.com/aya-rs/aya/commit/373fb7bf06ba80ee4c120d8c112f5e810204c472)) + - Group_imports = "StdExternalCrate" ([`d16e607`](https://github.com/aya-rs/aya/commit/d16e607fd4b6258b516913071fdacafeb2bbbff9)) + - Merge pull request #736 from aya-rs/logging-better ([`45df251`](https://github.com/aya-rs/aya/commit/45df2519b60613310e8827fbb4076f60c393c3bb)) + - Merge pull request #735 from aya-rs/log-option-not-result ([`ecf0dd9`](https://github.com/aya-rs/aya/commit/ecf0dd973985bd442978b202d0fd6f75647cdda3)) + - S/Result/Option/ ([`ca3f70b`](https://github.com/aya-rs/aya/commit/ca3f70b16a705bf26d2ccc7ce754de403be36223)) + - Remove pointless DefaultLogger ([`00d265c`](https://github.com/aya-rs/aya/commit/00d265c51b69e672457502593fbc63d0ac953e27)) + - Merge pull request #667 from vadorovsky/workspace-dependencies ([`f554d42`](https://github.com/aya-rs/aya/commit/f554d421053bc34266afbf8e00b28705ab4b41d2)) + - Define dependencies on the workspace level ([`96fa08b`](https://github.com/aya-rs/aya/commit/96fa08bd82233268154edf30b106876f5a4f0e30)) + - Merge pull request #666 from aya-rs/toml-fmt ([`dc3b0b8`](https://github.com/aya-rs/aya/commit/dc3b0b87308fdac5ff8f472de9a5e849b52d9fee)) + - Add formatter and check in CI ([`c8bf646`](https://github.com/aya-rs/aya/commit/c8bf646ef098a00bc5c6e1cb5ae35ffa6fb5eac5)) + - Merge pull request #650 from aya-rs/test-cleanup ([`61608e6`](https://github.com/aya-rs/aya/commit/61608e64583f9dc599eef9b8db098f38a765b285)) + - Remove "async" feature ([`fa91fb4`](https://github.com/aya-rs/aya/commit/fa91fb4f59be3505664f8088b6e3e8da2c372253)) + - Unify IP format hints into one, repsesent it by `:i` token ([`84e5e28`](https://github.com/aya-rs/aya/commit/84e5e2894f226f4b2c7cb637a6f44d5773b927e6)) + - Remove some useless code ([`d999a95`](https://github.com/aya-rs/aya/commit/d999a95b410df79e1d9f6c27462e19a2cede06c2)) + - Check format and value type in proc macro ([`0970300`](https://github.com/aya-rs/aya/commit/0970300d1f5659622fa55a18dd7681c608d75b0f)) + - Merge pull request #585 from probulate/tag-len-value ([`5165bf2`](https://github.com/aya-rs/aya/commit/5165bf2f99cdc228122bdab505c2059723e95a9f)) + - Support logging byte slices ([`d9f966e`](https://github.com/aya-rs/aya/commit/d9f966ec9e49f4439710559cac852bde62810975)) + - Aya-log, aya-log-common: economize bytes ([`a4a69a6`](https://github.com/aya-rs/aya/commit/a4a69a6bcfe87d3c066f2cc341b74039f53dcc9e)) + - Check errors in tests ([`e4537e3`](https://github.com/aya-rs/aya/commit/e4537e389ad7ac6f09fc89349444e37fe01e4af4)) + - Aya-log, aya-log-common: Remove duplicate struct ([`490d7d5`](https://github.com/aya-rs/aya/commit/490d7d587ad90b899aff2a30d65db8641ceb32df)) + - Merge pull request #591 from vadorovsky/aya-log-impl-pod ([`3d3ce8b`](https://github.com/aya-rs/aya/commit/3d3ce8bfa2eff19706cc3d8e5f0ce9e81a520a78)) + - Move the `Pod` implementations from aya-log-common to aya-log ([`5603d72`](https://github.com/aya-rs/aya/commit/5603d7248a51a16233c249b645e30ea3f6804744)) + - Merge pull request #484 from vadorovsky/update-tokio ([`bea0e83`](https://github.com/aya-rs/aya/commit/bea0e83512cc6d45b3e4fb5c3f62432c434139b7)) + - Update Tokio and inventory ([`dad75f4`](https://github.com/aya-rs/aya/commit/dad75f45ac357e86eebc92c4f95f6dd4e43d8496)) + - Don't panic in init when bpf programs don't log ([`12927cf`](https://github.com/aya-rs/aya/commit/12927cf6992bc0f8b1e4221d48b34f4c0098b93d)) + - Merge pull request #456 from dmitris/uninlined_format_args ([`16b029e`](https://github.com/aya-rs/aya/commit/16b029ed3708470afd2a6d67615b30c8d30b5059)) + - Fix uninlined_format_args clippy issues ([`055d94f`](https://github.com/aya-rs/aya/commit/055d94f58be4f80ada416b99278a22f600c71285)) + - Merge pull request #449 from aya-rs/dependabot/cargo/env_logger-0.10 ([`f9bef9f`](https://github.com/aya-rs/aya/commit/f9bef9f8c0d2c5b21809e037b8e9782f3c761df3)) + - Update env_logger requirement from 0.9 to 0.10 ([`1c8088b`](https://github.com/aya-rs/aya/commit/1c8088b16cc255fc188b0b9a84b550a5c50a9003)) + - Revert "aya-log, aya-log-common: temporarily revert to old map API so we can release" ([`0b41018`](https://github.com/aya-rs/aya/commit/0b41018ee27bfda9b1ea7dc422b34d3a08fc3fc6))
## v0.1.13 (2022-11-16) @@ -218,9 +391,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 -- 59 commits contributed to the release over the course of 110 calendar days. -- 14 commits were understood as [conventional](https://www.conventionalcommits.org). -- 0 issues like '(#ID)' were seen in commit messages + - 59 commits contributed to the release. + - 14 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages ### Commit Details @@ -228,5 +401,65 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
view details -- **Uncategorized** - Release version 0.1.13 ([`832bdd2`](https://github.com/aya-rs/aya/commit/832bdd280c19095d79ba2d27281c17f0b09adc15)) - Aya-log, aya-log-common: temporarily revert to old map API so we can release ([`0d040d2`](https://github.com/aya-rs/aya/commit/0d040d2290cc1513c979c95538210abd7ee59ebb)) - Merge pull request #436 from vadorovsky/aya-log-mac-addr ([`3adb9b0`](https://github.com/aya-rs/aya/commit/3adb9b049f493ec9b80fcf868a8eac3363d17844)) - Add format hints for MAC addresses ([`2223ab8`](https://github.com/aya-rs/aya/commit/2223ab828d6db40a85cff4737f6164ed8ee9e42d)) - Merge pull request #397 from astoycos/refactor-map-api2 ([`d6cb1a1`](https://github.com/aya-rs/aya/commit/d6cb1a16ad0f8df483e2234fb01ab55bdbeaa8b8)) - Make map APIs return an option ([`f3262e8`](https://github.com/aya-rs/aya/commit/f3262e87bd6ff895537df47fcf5d17c598e564cc)) - Core refactor of Map API ([`1aefa2e`](https://github.com/aya-rs/aya/commit/1aefa2e5e6d22a600cc7339d289d64ab06f842e3)) - Merge pull request #390 from dave-tucker/clippy-up ([`367ab20`](https://github.com/aya-rs/aya/commit/367ab203057329ea32eea34ddc97452e0c03fda6)) - Make miri happy ([`b2924a3`](https://github.com/aya-rs/aya/commit/b2924a3a264732e6de6898a1f03d7cb22d1d0dc5)) - Aya-log, aya-log-common: start next development iteration 0.1.12-dev.0 ([`6f0637a`](https://github.com/aya-rs/aya/commit/6f0637a6c8f3696b226558dc47b2dc2f6680e347)) - Aya-log, aya-log-common: release version 0.1.11 ([`ba927ac`](https://github.com/aya-rs/aya/commit/ba927ac20497fdfd0033fb48f4bfda3fc8dedf42)) - Add display hints ([`83ec27f`](https://github.com/aya-rs/aya/commit/83ec27f06b6859f455f2b2baf985b8fd3fb4adc5)) - Change from Rust edition 2018 to 2021 ([`944d6b8`](https://github.com/aya-rs/aya/commit/944d6b8a1647df36c17cd060b15c37ac9615f4a7)) - Merge pull request #361 from chenhengqi/fix-aya-log-links ([`632ea30`](https://github.com/aya-rs/aya/commit/632ea300ed8dcb3a277447a57b528b8d89b0c10a)) - Fix links to aya-log repo ([`b8b291c`](https://github.com/aya-rs/aya/commit/b8b291c51ba1b43ff27c6aab6b55d6af77334aae)) - Merge pull request #357 from vadorovsky/env_logger ([`3d5ab0b`](https://github.com/aya-rs/aya/commit/3d5ab0b17de0e4f1453a88ed00823d04db0845a6)) - Aya-log, test: Switch from simplelog to env_logger ([`3664e1e`](https://github.com/aya-rs/aya/commit/3664e1ea0d42985bd88129cfd338bacff2456398)) - Merge pull request #353 from vadorovsky/log-remove-u128 ([`d968094`](https://github.com/aya-rs/aya/commit/d968094b662be3449624420b76ea2dd239ef657b)) - Remove i128 and u128 types ([`611f967`](https://github.com/aya-rs/aya/commit/611f967cd14b90e187ca86735f2131fb87e89856)) - Merge pull request #350 from dave-tucker/monorepo ([`f37a514`](https://github.com/aya-rs/aya/commit/f37a51433ff5283205ba5d1e74cdc75fbdeea160)) - Re-organize into a single workspace ([`dc31e11`](https://github.com/aya-rs/aya/commit/dc31e11691bbb8ae916da9da873fdc37ff261c27)) - Fix the log buffer bounds ([`28abaec`](https://github.com/aya-rs/aya/commit/28abaece2af732cf2b2b2f8b12aeb02439e76d4c)) - Ensure log buffer bounds ([`2e07028`](https://github.com/aya-rs/aya/commit/2e0702854b0e2428f6b5b32678f5f79ca341c619)) - Use new PerCpuArray::get_ptr_mut API ([`6aea880`](https://github.com/aya-rs/aya/commit/6aea88089087194c831b259a61eef5ccebcb45bc)) - Aya-log, aya-log-common: start next development iteration 0.1.11-dev.0 ([`526493b`](https://github.com/aya-rs/aya/commit/526493b444ed91f1c315ace494b41b8f4178fe65)) - Aya-log, aya-log-common: release version 0.1.10 ([`3abd973`](https://github.com/aya-rs/aya/commit/3abd97307ef32bfbd384f38f7a0de40cc7afa0b1)) - Update aya requirement from 0.10.7 to 0.11.0 ([`060ba45`](https://github.com/aya-rs/aya/commit/060ba451535b1a90c2faaf2dcd634fa36e784efb)) - Add CI ([`0038b43`](https://github.com/aya-rs/aya/commit/0038b43627e6564b03d9837f535ec64ada6d70f2)) - Add vim/vscode rust-analyzer settings ([`c1bb790`](https://github.com/aya-rs/aya/commit/c1bb790c0d8d467ac41603b15b56823c7ba0f663)) - Add rustfmt.toml ([`3f00851`](https://github.com/aya-rs/aya/commit/3f0085195f178fdba6c214b4129f8321e612d4e7)) - Add example ([`5789585`](https://github.com/aya-rs/aya/commit/5789585994776d18afa58f3bb816cfcb1367298e)) - Add Tests ([`5d82d9a`](https://github.com/aya-rs/aya/commit/5d82d9a73e77d386c8be3dc3764b3dd361fcac71)) - Ensure the bounds of log buffer ([`628b473`](https://github.com/aya-rs/aya/commit/628b473e0937eef94b0b337608a5d6c51ad2fd2a)) - Bump the buffer size ([`70b4e68`](https://github.com/aya-rs/aya/commit/70b4e681301eb23ca776cd703e11f19cc879ac69)) - Aya-log, aya-log-common: start next development iteration 0.1.10-dev.0 ([`bd9a5c8`](https://github.com/aya-rs/aya/commit/bd9a5c8fdff9c20952137908388b1d833ab60fcc)) - Aya-log, aya-log-common: release version 0.1.9 ([`8bc1bbb`](https://github.com/aya-rs/aya/commit/8bc1bbb3abe588e89161e67ad013c34f1ec3ab6d)) - Add cargo-release config ([`a8d133f`](https://github.com/aya-rs/aya/commit/a8d133f6b0919bb7d8e821f1309ee264d8b03a71)) - Do not release ([`d1a0ce5`](https://github.com/aya-rs/aya/commit/d1a0ce51ee4e67cf9b03b695940f356ee950f8c2)) - Use stricter version for the aya-log-common dep ([`c4d89fa`](https://github.com/aya-rs/aya/commit/c4d89fa13cb4e96a62ccd5cae7cf1834c3c582f6)) - Inline write_record_header ([`bdb2750`](https://github.com/aya-rs/aya/commit/bdb2750e66f922ebfbcba7250add38e2c932c293)) - Update aya to 0.10.7 ([`81befa0`](https://github.com/aya-rs/aya/commit/81befa06610b9e771523bceee4871a704851b1f0)) - Format arguments in userspace ([`ca1fe7e`](https://github.com/aya-rs/aya/commit/ca1fe7e05f7b52c5e864680abeda29e640617d40)) - Don't recompute the record length ([`9b229d0`](https://github.com/aya-rs/aya/commit/9b229d00e110a5b3b610ad567f8d15682c0b78e1)) - Initialize AYA_LOGS with max_entries=0 ([`7f8d705`](https://github.com/aya-rs/aya/commit/7f8d7057df11f41d0869f7f713d121785934adca)) - Fix clippy warning ([`2800454`](https://github.com/aya-rs/aya/commit/2800454763f5f0250c46c87f9cfb2e3d1f5f0a7e)) - Add copy of README.md inside aya-log/ ([`8bde15d`](https://github.com/aya-rs/aya/commit/8bde15dad70016f6fb72a77906da341768d59720)) - Add missing manifest fields ([`5e18a71`](https://github.com/aya-rs/aya/commit/5e18a715b2d1cf153de96d9775dfea762c684258)) - (cargo-release) version 0.1.1 ([`31e71f8`](https://github.com/aya-rs/aya/commit/31e71f8db53454ce673bd9891be06fc002af5721)) - (cargo-release) version 0.1.1 ([`29955b2`](https://github.com/aya-rs/aya/commit/29955b22875b865f567079c76aeba70630fa42dd)) - Git add .cargo and xtask ([`6d14a16`](https://github.com/aya-rs/aya/commit/6d14a16d8ed54d90e9dfdbdca1fb2caf0a15c017)) - Update to aya 0.10.5 ([`cced3da`](https://github.com/aya-rs/aya/commit/cced3da5c8ff45df0596e25123071a4a761286d6)) - Simplify BpfLogger::init ([`9ab9c80`](https://github.com/aya-rs/aya/commit/9ab9c80183edcb23297a644d0e63f7c1f28cd968)) - Minor tweaks to make the verifier's job easier ([`2ac4334`](https://github.com/aya-rs/aya/commit/2ac433449cdea32f10c8fc88218799995946032d)) - Switch to aya-ufmt ([`b14d4ba`](https://github.com/aya-rs/aya/commit/b14d4bab2fac894d4e47838d7de8a9b63a5ac4c2)) - Use aya_ebpf::maps::PerfEventByteArray to output logs ([`22d8f86`](https://github.com/aya-rs/aya/commit/22d8f86fbb10ec5e71bca750119f93eb5ba171e5)) - Use aya_log_ebpf::ufmt instead of ::ufmt ([`741957f`](https://github.com/aya-rs/aya/commit/741957f94598d149960a5296b2010a07ffac02e5)) - Add ufmt to readme ([`0d7ac3e`](https://github.com/aya-rs/aya/commit/0d7ac3eb3ee58bd4ba10af9c49f7c9ef80e09143)) - Update readme ([`5df853c`](https://github.com/aya-rs/aya/commit/5df853cfb030c3a37a066b892623546a77c97db2)) - Initial commit ([`b29a061`](https://github.com/aya-rs/aya/commit/b29a061bce99d06971dc977ddc075cbf653971d4)) + * **Uncategorized** + - Release version 0.1.13 ([`832bdd2`](https://github.com/aya-rs/aya/commit/832bdd280c19095d79ba2d27281c17f0b09adc15)) + - Aya-log, aya-log-common: temporarily revert to old map API so we can release ([`0d040d2`](https://github.com/aya-rs/aya/commit/0d040d2290cc1513c979c95538210abd7ee59ebb)) + - Merge pull request #436 from vadorovsky/aya-log-mac-addr ([`3adb9b0`](https://github.com/aya-rs/aya/commit/3adb9b049f493ec9b80fcf868a8eac3363d17844)) + - Add format hints for MAC addresses ([`2223ab8`](https://github.com/aya-rs/aya/commit/2223ab828d6db40a85cff4737f6164ed8ee9e42d)) + - Merge pull request #397 from astoycos/refactor-map-api2 ([`d6cb1a1`](https://github.com/aya-rs/aya/commit/d6cb1a16ad0f8df483e2234fb01ab55bdbeaa8b8)) + - Make map APIs return an option ([`f3262e8`](https://github.com/aya-rs/aya/commit/f3262e87bd6ff895537df47fcf5d17c598e564cc)) + - Core refactor of Map API ([`1aefa2e`](https://github.com/aya-rs/aya/commit/1aefa2e5e6d22a600cc7339d289d64ab06f842e3)) + - Merge pull request #390 from dave-tucker/clippy-up ([`367ab20`](https://github.com/aya-rs/aya/commit/367ab203057329ea32eea34ddc97452e0c03fda6)) + - Make miri happy ([`b2924a3`](https://github.com/aya-rs/aya/commit/b2924a3a264732e6de6898a1f03d7cb22d1d0dc5)) + - Aya-log, aya-log-common: start next development iteration 0.1.12-dev.0 ([`6f0637a`](https://github.com/aya-rs/aya/commit/6f0637a6c8f3696b226558dc47b2dc2f6680e347)) + - Aya-log, aya-log-common: release version 0.1.11 ([`ba927ac`](https://github.com/aya-rs/aya/commit/ba927ac20497fdfd0033fb48f4bfda3fc8dedf42)) + - Add display hints ([`83ec27f`](https://github.com/aya-rs/aya/commit/83ec27f06b6859f455f2b2baf985b8fd3fb4adc5)) + - Change from Rust edition 2018 to 2021 ([`944d6b8`](https://github.com/aya-rs/aya/commit/944d6b8a1647df36c17cd060b15c37ac9615f4a7)) + - Merge pull request #361 from chenhengqi/fix-aya-log-links ([`632ea30`](https://github.com/aya-rs/aya/commit/632ea300ed8dcb3a277447a57b528b8d89b0c10a)) + - Fix links to aya-log repo ([`b8b291c`](https://github.com/aya-rs/aya/commit/b8b291c51ba1b43ff27c6aab6b55d6af77334aae)) + - Merge pull request #357 from vadorovsky/env_logger ([`3d5ab0b`](https://github.com/aya-rs/aya/commit/3d5ab0b17de0e4f1453a88ed00823d04db0845a6)) + - Aya-log, test: Switch from simplelog to env_logger ([`3664e1e`](https://github.com/aya-rs/aya/commit/3664e1ea0d42985bd88129cfd338bacff2456398)) + - Merge pull request #353 from vadorovsky/log-remove-u128 ([`d968094`](https://github.com/aya-rs/aya/commit/d968094b662be3449624420b76ea2dd239ef657b)) + - Remove i128 and u128 types ([`611f967`](https://github.com/aya-rs/aya/commit/611f967cd14b90e187ca86735f2131fb87e89856)) + - Merge pull request #350 from dave-tucker/monorepo ([`f37a514`](https://github.com/aya-rs/aya/commit/f37a51433ff5283205ba5d1e74cdc75fbdeea160)) + - Re-organize into a single workspace ([`dc31e11`](https://github.com/aya-rs/aya/commit/dc31e11691bbb8ae916da9da873fdc37ff261c27)) + - Fix the log buffer bounds ([`28abaec`](https://github.com/aya-rs/aya/commit/28abaece2af732cf2b2b2f8b12aeb02439e76d4c)) + - Ensure log buffer bounds ([`2e07028`](https://github.com/aya-rs/aya/commit/2e0702854b0e2428f6b5b32678f5f79ca341c619)) + - Use new PerCpuArray::get_ptr_mut API ([`6aea880`](https://github.com/aya-rs/aya/commit/6aea88089087194c831b259a61eef5ccebcb45bc)) + - Aya-log, aya-log-common: start next development iteration 0.1.11-dev.0 ([`526493b`](https://github.com/aya-rs/aya/commit/526493b444ed91f1c315ace494b41b8f4178fe65)) + - Aya-log, aya-log-common: release version 0.1.10 ([`3abd973`](https://github.com/aya-rs/aya/commit/3abd97307ef32bfbd384f38f7a0de40cc7afa0b1)) + - Update aya requirement from 0.10.7 to 0.11.0 ([`060ba45`](https://github.com/aya-rs/aya/commit/060ba451535b1a90c2faaf2dcd634fa36e784efb)) + - Add CI ([`0038b43`](https://github.com/aya-rs/aya/commit/0038b43627e6564b03d9837f535ec64ada6d70f2)) + - Add vim/vscode rust-analyzer settings ([`c1bb790`](https://github.com/aya-rs/aya/commit/c1bb790c0d8d467ac41603b15b56823c7ba0f663)) + - Add rustfmt.toml ([`3f00851`](https://github.com/aya-rs/aya/commit/3f0085195f178fdba6c214b4129f8321e612d4e7)) + - Add example ([`5789585`](https://github.com/aya-rs/aya/commit/5789585994776d18afa58f3bb816cfcb1367298e)) + - Add Tests ([`5d82d9a`](https://github.com/aya-rs/aya/commit/5d82d9a73e77d386c8be3dc3764b3dd361fcac71)) + - Ensure the bounds of log buffer ([`628b473`](https://github.com/aya-rs/aya/commit/628b473e0937eef94b0b337608a5d6c51ad2fd2a)) + - Bump the buffer size ([`70b4e68`](https://github.com/aya-rs/aya/commit/70b4e681301eb23ca776cd703e11f19cc879ac69)) + - Aya-log, aya-log-common: start next development iteration 0.1.10-dev.0 ([`bd9a5c8`](https://github.com/aya-rs/aya/commit/bd9a5c8fdff9c20952137908388b1d833ab60fcc)) + - Aya-log, aya-log-common: release version 0.1.9 ([`8bc1bbb`](https://github.com/aya-rs/aya/commit/8bc1bbb3abe588e89161e67ad013c34f1ec3ab6d)) + - Add cargo-release config ([`a8d133f`](https://github.com/aya-rs/aya/commit/a8d133f6b0919bb7d8e821f1309ee264d8b03a71)) + - Do not release ([`d1a0ce5`](https://github.com/aya-rs/aya/commit/d1a0ce51ee4e67cf9b03b695940f356ee950f8c2)) + - Use stricter version for the aya-log-common dep ([`c4d89fa`](https://github.com/aya-rs/aya/commit/c4d89fa13cb4e96a62ccd5cae7cf1834c3c582f6)) + - Inline write_record_header ([`bdb2750`](https://github.com/aya-rs/aya/commit/bdb2750e66f922ebfbcba7250add38e2c932c293)) + - Update aya to 0.10.7 ([`81befa0`](https://github.com/aya-rs/aya/commit/81befa06610b9e771523bceee4871a704851b1f0)) + - Format arguments in userspace ([`ca1fe7e`](https://github.com/aya-rs/aya/commit/ca1fe7e05f7b52c5e864680abeda29e640617d40)) + - Don't recompute the record length ([`9b229d0`](https://github.com/aya-rs/aya/commit/9b229d00e110a5b3b610ad567f8d15682c0b78e1)) + - Initialize AYA_LOGS with max_entries=0 ([`7f8d705`](https://github.com/aya-rs/aya/commit/7f8d7057df11f41d0869f7f713d121785934adca)) + - Fix clippy warning ([`2800454`](https://github.com/aya-rs/aya/commit/2800454763f5f0250c46c87f9cfb2e3d1f5f0a7e)) + - Add copy of README.md inside aya-log/ ([`8bde15d`](https://github.com/aya-rs/aya/commit/8bde15dad70016f6fb72a77906da341768d59720)) + - Add missing manifest fields ([`5e18a71`](https://github.com/aya-rs/aya/commit/5e18a715b2d1cf153de96d9775dfea762c684258)) + - (cargo-release) version 0.1.1 ([`31e71f8`](https://github.com/aya-rs/aya/commit/31e71f8db53454ce673bd9891be06fc002af5721)) + - (cargo-release) version 0.1.1 ([`29955b2`](https://github.com/aya-rs/aya/commit/29955b22875b865f567079c76aeba70630fa42dd)) + - Git add .cargo and xtask ([`6d14a16`](https://github.com/aya-rs/aya/commit/6d14a16d8ed54d90e9dfdbdca1fb2caf0a15c017)) + - Update to aya 0.10.5 ([`cced3da`](https://github.com/aya-rs/aya/commit/cced3da5c8ff45df0596e25123071a4a761286d6)) + - Simplify BpfLogger::init ([`9ab9c80`](https://github.com/aya-rs/aya/commit/9ab9c80183edcb23297a644d0e63f7c1f28cd968)) + - Minor tweaks to make the verifier's job easier ([`2ac4334`](https://github.com/aya-rs/aya/commit/2ac433449cdea32f10c8fc88218799995946032d)) + - Switch to aya-ufmt ([`b14d4ba`](https://github.com/aya-rs/aya/commit/b14d4bab2fac894d4e47838d7de8a9b63a5ac4c2)) + - Use aya_bpf::maps::PerfEventByteArray to output logs ([`22d8f86`](https://github.com/aya-rs/aya/commit/22d8f86fbb10ec5e71bca750119f93eb5ba171e5)) + - Use aya_log_ebpf::ufmt instead of ::ufmt ([`741957f`](https://github.com/aya-rs/aya/commit/741957f94598d149960a5296b2010a07ffac02e5)) + - Add ufmt to readme ([`0d7ac3e`](https://github.com/aya-rs/aya/commit/0d7ac3eb3ee58bd4ba10af9c49f7c9ef80e09143)) + - Update readme ([`5df853c`](https://github.com/aya-rs/aya/commit/5df853cfb030c3a37a066b892623546a77c97db2)) + - Initial commit ([`b29a061`](https://github.com/aya-rs/aya/commit/b29a061bce99d06971dc977ddc075cbf653971d4))
+ diff --git a/aya-log/Cargo.toml b/aya-log/Cargo.toml index 43fc762b..d1e7234c 100644 --- a/aya-log/Cargo.toml +++ b/aya-log/Cargo.toml @@ -1,27 +1,31 @@ [package] -name = "aya-log" -version = "0.2.0" description = "A logging library for eBPF programs." +documentation = "https://docs.rs/aya-log" keywords = ["bpf", "ebpf", "log", "logging"] +name = "aya-log" readme = "README.md" -documentation = "https://docs.rs/aya-log" +version = "0.2.1" + authors.workspace = true +edition.workspace = true +homepage.workspace = true license.workspace = true repository.workspace = true -homepage.workspace = true -edition.workspace = true +rust-version.workspace = true + +[lints] +workspace = true [dependencies] -aya = { path = "../aya", version = "^0.12.0", features = ["async_tokio"] } -aya-log-common = { path = "../aya-log-common", version = "^0.1.14", default-features = false } -bytes = { workspace = true } +aya = { path = "../aya", version = "^0.13.1", default-features = false } +aya-log-common = { path = "../aya-log-common", version = "^0.1.15", default-features = false } log = { workspace = true } thiserror = { workspace = true } -tokio = { workspace = true, features = ["rt"] } [dev-dependencies] env_logger = { workspace = true } testing_logger = { workspace = true } +tokio = { workspace = true, features = ["net", "rt"] } [lib] path = "src/lib.rs" diff --git a/aya-log/README.md b/aya-log/README.md index ee23c5e2..d258b584 100644 --- a/aya-log/README.md +++ b/aya-log/README.md @@ -38,7 +38,15 @@ use aya_log::EbpfLogger; env_logger::init(); // Will log using the default logger, which is TermLogger in this case -EbpfLogger::init(&mut bpf).unwrap(); +let logger = EbpfLogger::init(&mut bpf).unwrap(); +let mut logger = tokio::io::unix::AsyncFd::with_interest(logger, tokio::io::Interest::READABLE).unwrap(); +tokio::task::spawn(async move { + loop { + let mut guard = logger.readable_mut().await.unwrap(); + guard.get_inner_mut().flush(); + guard.clear_ready(); + } +}); ``` ### eBPF code @@ -61,3 +69,33 @@ fn try_xdp_firewall(ctx: XdpContext) -> Result { [aya]: https://github.com/aya-rs/aya [log]: https://docs.rs/log [env_logger]: https://docs.rs/env_logger + +## Disabling log levels at load-time + +eBPF instruction budgets are tight. Even if a log statement never executes at +runtime, the verifier must still evaluate its instructions unless it can prove +they're unreachable. `aya-log` now exposes a global `AYA_LOG_LEVEL` inside the +eBPF object allowing you to selectively enable levels before the program is +loaded. + +By default all bits are set (all logging enabled). To disable all logging: + +```rust +let mut bpf = aya::EbpfLoader::new() + .override_global(aya_log::LEVEL, &0, false /* must_exist */) + .load_file("prog.bpf.o")?; +# Ok::<(), aya::EbpfError>(()) +``` + +Enable only Error and Warn: + +```rust +let level = aya_log::Level::Warn as u8; +let mut bpf = EbpfLoader::new() + .override_global(aya_log::LEVEL, &level, false /* must_exist */) + .load_file("prog.bpf.o")?; +``` + +Because the level is placed in global read-only data, the verifier sees the +disabled branch as unreachable and prunes the logging instructions, reducing +overall instruction count and avoiding potential instruction limit issues. diff --git a/aya-log/src/lib.rs b/aya-log/src/lib.rs index 8c89c115..9c7c6492 100644 --- a/aya-log/src/lib.rs +++ b/aya-log/src/lib.rs @@ -3,8 +3,8 @@ //! This is the user space side of the [Aya] logging framework. For the eBPF //! side, see the `aya-log-ebpf` crate. //! -//! `aya-log` provides the [EbpfLogger] type, which reads log records created by -//! `aya-log-ebpf` and logs them using the [log] crate. Any logger that +//! `aya-log` provides functions which read log records created by +//! `aya-log-ebpf` and log them using the [log] crate. Any logger that //! implements the [Log] trait can be used with this crate. //! //! # Example: @@ -19,7 +19,15 @@ //! env_logger::init(); //! //! // start reading aya-log records and log them using the default logger -//! EbpfLogger::init(&mut bpf).unwrap(); +//! let logger = EbpfLogger::init(&mut bpf).unwrap(); +//! let mut logger = tokio::io::unix::AsyncFd::with_interest(logger, tokio::io::Interest::READABLE).unwrap(); +//! tokio::task::spawn(async move { +//! loop { +//! let mut guard = logger.readable_mut().await.unwrap(); +//! guard.get_inner_mut().flush(); +//! guard.clear_ready(); +//! } +//! }); //! ``` //! //! With the following eBPF code: @@ -48,42 +56,36 @@ //! [env_logger]: https://docs.rs/env_logger //! [Log]: https://docs.rs/log/0.4.14/log/trait.Log.html //! [log]: https://docs.rs/log -//! + +#![cfg_attr(test, expect(unused_crate_dependencies, reason = "used in doctests"))] + use std::{ fmt::{LowerHex, UpperHex}, - io, mem, + mem, net::{Ipv4Addr, Ipv6Addr}, + os::fd::{AsFd, AsRawFd}, ptr, str, - sync::Arc, }; const MAP_NAME: &str = "AYA_LOGS"; +pub const LEVEL: &str = "AYA_LOG_LEVEL"; use aya::{ - loaded_programs, - maps::{ - perf::{AsyncPerfEventArray, Events, PerfBufferError}, - Map, MapData, MapError, MapInfo, - }, - programs::ProgramError, - util::online_cpus, Ebpf, Pod, + maps::{Map, MapData, MapError, MapInfo, RingBuf}, + programs::{ProgramError, loaded_programs}, }; -use aya_log_common::{ - Argument, DisplayHint, Level, LogValueLength, RecordField, LOG_BUF_CAPACITY, LOG_FIELDS, -}; -use bytes::BytesMut; -use log::{error, Log, Record}; +pub use aya_log_common::Level; +use aya_log_common::{ArgumentKind, DisplayHint, LogValueLength, RecordFieldKind}; +use log::{Log, Record, error}; use thiserror::Error; -#[allow(dead_code)] // TODO(https://github.com/rust-lang/rust/issues/120770): Remove when false positive is fixed. #[derive(Copy, Clone)] #[repr(transparent)] -struct RecordFieldWrapper(RecordField); -#[allow(dead_code)] // TODO(https://github.com/rust-lang/rust/issues/120770): Remove when false positive is fixed. +struct RecordFieldWrapper(RecordFieldKind); #[derive(Copy, Clone)] #[repr(transparent)] -struct ArgumentWrapper(Argument); +struct ArgumentWrapper(ArgumentKind); #[derive(Copy, Clone)] #[repr(transparent)] struct DisplayHintWrapper(DisplayHint); @@ -95,88 +97,94 @@ unsafe impl Pod for DisplayHintWrapper {} /// Log messages generated by `aya_log_ebpf` using the [log] crate. /// /// For more details see the [module level documentation](crate). -pub struct EbpfLogger; +#[must_use = "Dropping the logger will close the map FD and cause program loading failure."] +pub struct EbpfLogger { + ring_buf: RingBuf, + logger: T, +} + +impl AsFd for EbpfLogger { + fn as_fd(&self) -> std::os::fd::BorrowedFd<'_> { + let Self { + ring_buf, + logger: _, + } = self; + ring_buf.as_fd() + } +} + +impl AsRawFd for EbpfLogger { + fn as_raw_fd(&self) -> std::os::unix::prelude::RawFd { + let Self { + ring_buf, + logger: _, + } = self; + ring_buf.as_raw_fd() + } +} /// Log messages generated by `aya_log_ebpf` using the [log] crate. #[deprecated(since = "0.2.1", note = "Use `aya_log::EbpfLogger` instead")] -pub type BpfLogger = EbpfLogger; +pub type BpfLogger = EbpfLogger; -impl EbpfLogger { +impl EbpfLogger<&'static dyn Log> { /// Starts reading log records created with `aya-log-ebpf` and logs them /// with the default logger. See [log::logger]. - pub fn init(bpf: &mut Ebpf) -> Result { - EbpfLogger::init_with_logger(bpf, log::logger()) - } - - /// Starts reading log records created with `aya-log-ebpf` and logs them - /// with the given logger. - pub fn init_with_logger( - bpf: &mut Ebpf, - logger: T, - ) -> Result { - let map = bpf.take_map(MAP_NAME).ok_or(Error::MapNotFound)?; - Self::read_logs_async(map, logger)?; - Ok(EbpfLogger {}) + pub fn init(bpf: &mut Ebpf) -> Result { + Self::init_with_logger(bpf, log::logger()) } /// Attaches to an existing `aya-log-ebpf` instance. /// /// Attaches to the logs produced by `program_id`. Can be used to read logs generated by a /// pinned program. The log records will be written to the default logger. See [log::logger]. - pub fn init_from_id(program_id: u32) -> Result { + pub fn init_from_id(program_id: u32) -> Result { Self::init_from_id_with_logger(program_id, log::logger()) } +} + +impl EbpfLogger { + /// Starts reading log records created with `aya-log-ebpf` and logs them + /// with the given logger. + pub fn init_with_logger(bpf: &mut Ebpf, logger: T) -> Result { + let map = bpf.take_map(MAP_NAME).ok_or(Error::MapNotFound)?; + Self::new(map, logger) + } /// Attaches to an existing `aya-log-ebpf` instance and logs with the given logger. /// /// Attaches to the logs produced by `program_id`. Can be used to read logs generated by a /// pinned program. The log records will be written to the given logger. - pub fn init_from_id_with_logger( - program_id: u32, - logger: T, - ) -> Result { + pub fn init_from_id_with_logger(program_id: u32, logger: T) -> Result { let program_info = loaded_programs() .filter_map(|info| info.ok()) .find(|info| info.id() == program_id) .ok_or(Error::ProgramNotFound)?; + let map = program_info - .map_ids() - .map_err(Error::ProgramError)? + .map_ids()? + .ok_or_else(|| Error::MapNotFound)? .iter() .filter_map(|id| MapInfo::from_id(*id).ok()) - .find(|map_info| match map_info.name_as_str() { - Some(name) => name == MAP_NAME, - None => false, - }) + .find(|map_info| map_info.name_as_str() == Some(MAP_NAME)) .ok_or(Error::MapNotFound)?; - let map = MapData::from_id(map.id()).map_err(Error::MapError)?; + let map = MapData::from_id(map.id())?; - Self::read_logs_async(Map::PerfEventArray(map), logger)?; - - Ok(EbpfLogger {}) + Self::new(Map::RingBuf(map), logger) } - fn read_logs_async(map: Map, logger: T) -> Result<(), Error> { - let mut logs: AsyncPerfEventArray<_> = map.try_into()?; - - let logger = Arc::new(logger); - for cpu_id in online_cpus().map_err(Error::InvalidOnlineCpu)? { - let mut buf = logs.open(cpu_id, None)?; + fn new(map: Map, logger: T) -> Result { + let ring_buf: RingBuf<_> = map.try_into()?; - let log = logger.clone(); - tokio::spawn(async move { - let mut buffers = vec![BytesMut::with_capacity(LOG_BUF_CAPACITY); 10]; - - loop { - let Events { read, lost: _ } = buf.read_events(&mut buffers).await.unwrap(); + Ok(Self { ring_buf, logger }) + } - for buf in buffers.iter().take(read) { - log_buf(buf.as_ref(), &*log).unwrap(); - } - } - }); + /// Reads log records from eBPF and writes them to the logger. + pub fn flush(&mut self) { + let Self { ring_buf, logger } = self; + while let Some(buf) = ring_buf.next() { + log_buf(buf.as_ref(), logger).unwrap(); } - Ok(()) } } @@ -204,15 +212,12 @@ where } } -pub struct LowerHexDebugFormatter; -impl Formatter<&[T]> for LowerHexDebugFormatter -where - T: LowerHex, -{ - fn format(v: &[T]) -> String { +pub struct LowerHexBytesFormatter; +impl Formatter<&[u8]> for LowerHexBytesFormatter { + fn format(v: &[u8]) -> String { let mut s = String::new(); for v in v { - let () = core::fmt::write(&mut s, format_args!("{v:x}")).unwrap(); + let () = core::fmt::write(&mut s, format_args!("{v:02x}")).unwrap(); } s } @@ -228,15 +233,12 @@ where } } -pub struct UpperHexDebugFormatter; -impl Formatter<&[T]> for UpperHexDebugFormatter -where - T: UpperHex, -{ - fn format(v: &[T]) -> String { +pub struct UpperHexBytesFormatter; +impl Formatter<&[u8]> for UpperHexBytesFormatter { + fn format(v: &[u8]) -> String { let mut s = String::new(); for v in v { - let () = core::fmt::write(&mut s, format_args!("{v:X}")).unwrap(); + let () = core::fmt::write(&mut s, format_args!("{v:02X}")).unwrap(); } s } @@ -282,6 +284,19 @@ impl Formatter<[u8; 6]> for UpperMacFormatter { } } +pub struct PointerFormatter; +impl Formatter<*const T> for PointerFormatter { + fn format(v: *const T) -> String { + format!("{v:p}") + } +} + +impl Formatter<*mut T> for PointerFormatter { + fn format(v: *mut T) -> String { + format!("{v:p}") + } +} + trait Format { fn format(&self, last_hint: Option) -> Result; } @@ -289,8 +304,8 @@ trait Format { impl Format for &[u8] { fn format(&self, last_hint: Option) -> Result { match last_hint.map(|DisplayHintWrapper(dh)| dh) { - Some(DisplayHint::LowerHex) => Ok(LowerHexDebugFormatter::format(self)), - Some(DisplayHint::UpperHex) => Ok(UpperHexDebugFormatter::format(self)), + Some(DisplayHint::LowerHex) => Ok(LowerHexBytesFormatter::format(self)), + Some(DisplayHint::UpperHex) => Ok(UpperHexBytesFormatter::format(self)), _ => Err(()), } } @@ -305,7 +320,53 @@ impl Format for u32 { Some(DisplayHint::Ip) => Ok(Ipv4Formatter::format(*self)), Some(DisplayHint::LowerMac) => Err(()), Some(DisplayHint::UpperMac) => Err(()), - _ => Ok(DefaultFormatter::format(self)), + Some(DisplayHint::Pointer) => Err(()), + None => Ok(DefaultFormatter::format(self)), + } + } +} + +impl Format for Ipv4Addr { + fn format(&self, last_hint: Option) -> Result { + match last_hint.map(|DisplayHintWrapper(dh)| dh) { + Some(DisplayHint::Default) => Ok(Ipv4Formatter::format(*self)), + Some(DisplayHint::LowerHex) => Err(()), + Some(DisplayHint::UpperHex) => Err(()), + Some(DisplayHint::Ip) => Ok(Ipv4Formatter::format(*self)), + Some(DisplayHint::LowerMac) => Err(()), + Some(DisplayHint::UpperMac) => Err(()), + Some(DisplayHint::Pointer) => Err(()), + None => Ok(Ipv4Formatter::format(*self)), + } + } +} + +impl Format for Ipv6Addr { + fn format(&self, last_hint: Option) -> Result { + match last_hint.map(|DisplayHintWrapper(dh)| dh) { + Some(DisplayHint::Default) => Ok(Ipv6Formatter::format(*self)), + Some(DisplayHint::LowerHex) => Err(()), + Some(DisplayHint::UpperHex) => Err(()), + Some(DisplayHint::Ip) => Ok(Ipv6Formatter::format(*self)), + Some(DisplayHint::LowerMac) => Err(()), + Some(DisplayHint::UpperMac) => Err(()), + Some(DisplayHint::Pointer) => Err(()), + None => Ok(Ipv6Formatter::format(*self)), + } + } +} + +impl Format for [u8; 4] { + fn format(&self, last_hint: Option) -> Result { + match last_hint.map(|DisplayHintWrapper(dh)| dh) { + Some(DisplayHint::Default) => Ok(Ipv4Formatter::format(*self)), + Some(DisplayHint::LowerHex) => Err(()), + Some(DisplayHint::UpperHex) => Err(()), + Some(DisplayHint::Ip) => Ok(Ipv4Formatter::format(*self)), + Some(DisplayHint::LowerMac) => Err(()), + Some(DisplayHint::UpperMac) => Err(()), + Some(DisplayHint::Pointer) => Err(()), + None => Ok(Ipv4Formatter::format(*self)), } } } @@ -319,7 +380,8 @@ impl Format for [u8; 6] { Some(DisplayHint::Ip) => Err(()), Some(DisplayHint::LowerMac) => Ok(LowerMacFormatter::format(*self)), Some(DisplayHint::UpperMac) => Ok(UpperMacFormatter::format(*self)), - _ => Err(()), + Some(DisplayHint::Pointer) => Err(()), + None => Err(()), } } } @@ -333,7 +395,8 @@ impl Format for [u8; 16] { Some(DisplayHint::Ip) => Ok(Ipv6Formatter::format(*self)), Some(DisplayHint::LowerMac) => Err(()), Some(DisplayHint::UpperMac) => Err(()), - _ => Err(()), + Some(DisplayHint::Pointer) => Err(()), + None => Err(()), } } } @@ -347,7 +410,8 @@ impl Format for [u16; 8] { Some(DisplayHint::Ip) => Ok(Ipv6Formatter::format(*self)), Some(DisplayHint::LowerMac) => Err(()), Some(DisplayHint::UpperMac) => Err(()), - _ => Err(()), + Some(DisplayHint::Pointer) => Err(()), + None => Err(()), } } } @@ -363,7 +427,8 @@ macro_rules! impl_format { Some(DisplayHint::Ip) => Err(()), Some(DisplayHint::LowerMac) => Err(()), Some(DisplayHint::UpperMac) => Err(()), - _ => Ok(DefaultFormatter::format(self)), + Some(DisplayHint::Pointer) => Err(()), + None => Ok(DefaultFormatter::format(self)), } } } @@ -392,7 +457,8 @@ macro_rules! impl_format_float { Some(DisplayHint::Ip) => Err(()), Some(DisplayHint::LowerMac) => Err(()), Some(DisplayHint::UpperMac) => Err(()), - _ => Ok(DefaultFormatter::format(self)), + Some(DisplayHint::Pointer) => Err(()), + None => Ok(DefaultFormatter::format(self)), } } } @@ -402,20 +468,32 @@ macro_rules! impl_format_float { impl_format_float!(f32); impl_format_float!(f64); +impl Format for *const T { + fn format(&self, last_hint: Option) -> Result { + match last_hint.map(|DisplayHintWrapper(dh)| dh) { + Some(DisplayHint::Pointer) => Ok(PointerFormatter::format(*self)), + _ => Err(()), + } + } +} + +impl Format for *mut T { + fn format(&self, last_hint: Option) -> Result { + match last_hint.map(|DisplayHintWrapper(dh)| dh) { + Some(DisplayHint::Pointer) => Ok(PointerFormatter::format(*self)), + _ => Err(()), + } + } +} + #[derive(Error, Debug)] pub enum Error { - #[error("log event array {} doesn't exist", MAP_NAME)] + #[error("{} not found", MAP_NAME)] MapNotFound, - #[error("error opening log event array")] + #[error(transparent)] MapError(#[from] MapError), - #[error("error opening log buffer")] - PerfBufferError(#[from] PerfBufferError), - - #[error("invalid /sys/devices/system/cpu/online format")] - InvalidOnlineCpu(#[source] io::Error), - #[error("program not found")] ProgramNotFound, @@ -423,7 +501,16 @@ pub enum Error { ProgramError(#[from] ProgramError), } -fn log_buf(mut buf: &[u8], logger: &dyn Log) -> Result<(), ()> { +fn log_buf(mut buf: &[u8], logger: &T) -> Result<(), ()> { + let size = LogValueLength::from_ne_bytes( + buf.get(..size_of::()) + .ok_or(())? + .try_into() + .map_err(|std::array::TryFromSliceError { .. }| ())?, + ) + .into(); + buf = buf.get(size_of::()..size).ok_or(())?; + let mut target = None; let mut level = None; let mut module = None; @@ -431,16 +518,26 @@ fn log_buf(mut buf: &[u8], logger: &dyn Log) -> Result<(), ()> { let mut line = None; let mut num_args = None; - for _ in 0..LOG_FIELDS { + while target.is_none() + || level.is_none() + || module.is_none() + || file.is_none() + || line.is_none() + || num_args.is_none() + { let (RecordFieldWrapper(tag), value, rest) = try_read(buf)?; match tag { - RecordField::Target => { - target = Some(str::from_utf8(value).map_err(|_| ())?); + RecordFieldKind::Target => { + let target = + target.replace(str::from_utf8(value).map_err(|std::str::Utf8Error { .. }| ())?); + if target.is_some() { + return Err(()); + } } - RecordField::Level => { - level = Some({ - let level = unsafe { ptr::read_unaligned(value.as_ptr() as *const _) }; + RecordFieldKind::Level => { + let level = level.replace({ + let level = unsafe { ptr::read_unaligned(value.as_ptr().cast()) }; match level { Level::Error => log::Level::Error, Level::Warn => log::Level::Warn, @@ -448,19 +545,44 @@ fn log_buf(mut buf: &[u8], logger: &dyn Log) -> Result<(), ()> { Level::Debug => log::Level::Debug, Level::Trace => log::Level::Trace, } - }) + }); + if level.is_some() { + return Err(()); + } } - RecordField::Module => { - module = Some(str::from_utf8(value).map_err(|_| ())?); + RecordFieldKind::Module => { + let module = + module.replace(str::from_utf8(value).map_err(|std::str::Utf8Error { .. }| ())?); + if module.is_some() { + return Err(()); + } } - RecordField::File => { - file = Some(str::from_utf8(value).map_err(|_| ())?); + RecordFieldKind::File => { + let file = + file.replace(str::from_utf8(value).map_err(|std::str::Utf8Error { .. }| ())?); + if file.is_some() { + return Err(()); + } } - RecordField::Line => { - line = Some(u32::from_ne_bytes(value.try_into().map_err(|_| ())?)); + RecordFieldKind::Line => { + let line = line.replace(u32::from_ne_bytes( + value + .try_into() + .map_err(|std::array::TryFromSliceError { .. }| ())?, + )); + if line.is_some() { + return Err(()); + } } - RecordField::NumArgs => { - num_args = Some(usize::from_ne_bytes(value.try_into().map_err(|_| ())?)); + RecordFieldKind::NumArgs => { + let num_args = num_args.replace(u32::from_ne_bytes( + value + .try_into() + .map_err(|std::array::TryFromSliceError { .. }| ())?, + )); + if num_args.is_some() { + return Err(()); + } } } @@ -469,110 +591,194 @@ fn log_buf(mut buf: &[u8], logger: &dyn Log) -> Result<(), ()> { let mut full_log_msg = String::new(); let mut last_hint: Option = None; - for _ in 0..num_args.ok_or(())? { + let num_args = num_args.ok_or(()).and_then(|num_args| { + usize::try_from(num_args).map_err(|std::num::TryFromIntError { .. }| ()) + })?; + for () in std::iter::repeat_n((), num_args) { let (ArgumentWrapper(tag), value, rest) = try_read(buf)?; match tag { - Argument::DisplayHint => { - last_hint = Some(unsafe { ptr::read_unaligned(value.as_ptr() as *const _) }); + ArgumentKind::DisplayHint => { + last_hint = Some(unsafe { ptr::read_unaligned(value.as_ptr().cast()) }); } - Argument::I8 => { + ArgumentKind::I8 => { full_log_msg.push_str( - &i8::from_ne_bytes(value.try_into().map_err(|_| ())?) - .format(last_hint.take())?, + &i8::from_ne_bytes( + value + .try_into() + .map_err(|std::array::TryFromSliceError { .. }| ())?, + ) + .format(last_hint.take())?, ); } - Argument::I16 => { + ArgumentKind::I16 => { full_log_msg.push_str( - &i16::from_ne_bytes(value.try_into().map_err(|_| ())?) - .format(last_hint.take())?, + &i16::from_ne_bytes( + value + .try_into() + .map_err(|std::array::TryFromSliceError { .. }| ())?, + ) + .format(last_hint.take())?, ); } - Argument::I32 => { + ArgumentKind::I32 => { full_log_msg.push_str( - &i32::from_ne_bytes(value.try_into().map_err(|_| ())?) - .format(last_hint.take())?, + &i32::from_ne_bytes( + value + .try_into() + .map_err(|std::array::TryFromSliceError { .. }| ())?, + ) + .format(last_hint.take())?, ); } - Argument::I64 => { + ArgumentKind::I64 => { full_log_msg.push_str( - &i64::from_ne_bytes(value.try_into().map_err(|_| ())?) - .format(last_hint.take())?, + &i64::from_ne_bytes( + value + .try_into() + .map_err(|std::array::TryFromSliceError { .. }| ())?, + ) + .format(last_hint.take())?, ); } - Argument::Isize => { + ArgumentKind::Isize => { full_log_msg.push_str( - &isize::from_ne_bytes(value.try_into().map_err(|_| ())?) - .format(last_hint.take())?, + &isize::from_ne_bytes( + value + .try_into() + .map_err(|std::array::TryFromSliceError { .. }| ())?, + ) + .format(last_hint.take())?, ); } - Argument::U8 => { + ArgumentKind::U8 => { full_log_msg.push_str( - &u8::from_ne_bytes(value.try_into().map_err(|_| ())?) - .format(last_hint.take())?, + &u8::from_ne_bytes( + value + .try_into() + .map_err(|std::array::TryFromSliceError { .. }| ())?, + ) + .format(last_hint.take())?, ); } - Argument::U16 => { + ArgumentKind::U16 => { full_log_msg.push_str( - &u16::from_ne_bytes(value.try_into().map_err(|_| ())?) - .format(last_hint.take())?, + &u16::from_ne_bytes( + value + .try_into() + .map_err(|std::array::TryFromSliceError { .. }| ())?, + ) + .format(last_hint.take())?, ); } - Argument::U32 => { + ArgumentKind::U32 => { full_log_msg.push_str( - &u32::from_ne_bytes(value.try_into().map_err(|_| ())?) - .format(last_hint.take())?, + &u32::from_ne_bytes( + value + .try_into() + .map_err(|std::array::TryFromSliceError { .. }| ())?, + ) + .format(last_hint.take())?, ); } - Argument::U64 => { + ArgumentKind::U64 => { full_log_msg.push_str( - &u64::from_ne_bytes(value.try_into().map_err(|_| ())?) - .format(last_hint.take())?, + &u64::from_ne_bytes( + value + .try_into() + .map_err(|std::array::TryFromSliceError { .. }| ())?, + ) + .format(last_hint.take())?, ); } - Argument::Usize => { + ArgumentKind::Usize => { full_log_msg.push_str( - &usize::from_ne_bytes(value.try_into().map_err(|_| ())?) - .format(last_hint.take())?, + &usize::from_ne_bytes( + value + .try_into() + .map_err(|std::array::TryFromSliceError { .. }| ())?, + ) + .format(last_hint.take())?, ); } - Argument::F32 => { + ArgumentKind::F32 => { full_log_msg.push_str( - &f32::from_ne_bytes(value.try_into().map_err(|_| ())?) - .format(last_hint.take())?, + &f32::from_ne_bytes( + value + .try_into() + .map_err(|std::array::TryFromSliceError { .. }| ())?, + ) + .format(last_hint.take())?, ); } - Argument::F64 => { + ArgumentKind::F64 => { full_log_msg.push_str( - &f64::from_ne_bytes(value.try_into().map_err(|_| ())?) - .format(last_hint.take())?, + &f64::from_ne_bytes( + value + .try_into() + .map_err(|std::array::TryFromSliceError { .. }| ())?, + ) + .format(last_hint.take())?, ); } - Argument::ArrU8Len6 => { - let value: [u8; 6] = value.try_into().map_err(|_| ())?; + ArgumentKind::Ipv4Addr => { + let value: [u8; 4] = value + .try_into() + .map_err(|std::array::TryFromSliceError { .. }| ())?; + let value = Ipv4Addr::from(value); + full_log_msg.push_str(&value.format(last_hint.take())?) + } + ArgumentKind::Ipv6Addr => { + let value: [u8; 16] = value + .try_into() + .map_err(|std::array::TryFromSliceError { .. }| ())?; + let value = Ipv6Addr::from(value); + full_log_msg.push_str(&value.format(last_hint.take())?) + } + ArgumentKind::ArrU8Len4 => { + let value: [u8; 4] = value + .try_into() + .map_err(|std::array::TryFromSliceError { .. }| ())?; full_log_msg.push_str(&value.format(last_hint.take())?); } - Argument::ArrU8Len16 => { - let value: [u8; 16] = value.try_into().map_err(|_| ())?; + ArgumentKind::ArrU8Len6 => { + let value: [u8; 6] = value + .try_into() + .map_err(|std::array::TryFromSliceError { .. }| ())?; full_log_msg.push_str(&value.format(last_hint.take())?); } - Argument::ArrU16Len8 => { - let data: [u8; 16] = value.try_into().map_err(|_| ())?; + ArgumentKind::ArrU8Len16 => { + let value: [u8; 16] = value + .try_into() + .map_err(|std::array::TryFromSliceError { .. }| ())?; + full_log_msg.push_str(&value.format(last_hint.take())?); + } + ArgumentKind::ArrU16Len8 => { + let data: [u8; 16] = value + .try_into() + .map_err(|std::array::TryFromSliceError { .. }| ())?; let mut value: [u16; 8] = Default::default(); for (i, s) in data.chunks_exact(2).enumerate() { - value[i] = ((s[1] as u16) << 8) | s[0] as u16; + value[i] = (u16::from(s[1]) << 8) | u16::from(s[0]); } full_log_msg.push_str(&value.format(last_hint.take())?); } - Argument::Bytes => { + ArgumentKind::Bytes => { full_log_msg.push_str(&value.format(last_hint.take())?); } - Argument::Str => match str::from_utf8(value) { + ArgumentKind::Str => match str::from_utf8(value) { Ok(v) => { full_log_msg.push_str(v); } - Err(e) => error!("received invalid utf8 string: {}", e), + Err(e) => error!("received invalid utf8 string: {e}"), }, + ArgumentKind::Pointer => { + let value = value + .try_into() + .map_err(|std::array::TryFromSliceError { .. }| ())?; + let ptr = usize::from_ne_bytes(value) as *const (); + full_log_msg.push_str(&ptr.format(last_hint.take())?); + } } buf = rest; @@ -597,7 +803,7 @@ fn try_read(mut buf: &[u8]) -> Result<(T, &[u8], &[u8]), ()> { return Err(()); } - let tag = unsafe { ptr::read_unaligned(buf.as_ptr() as *const T) }; + let tag = unsafe { ptr::read_unaligned(buf.as_ptr().cast::()) }; buf = &buf[mem::size_of::()..]; let len = @@ -615,12 +821,57 @@ fn try_read(mut buf: &[u8]) -> Result<(T, &[u8], &[u8]), ()> { #[cfg(test)] mod test { - use aya_log_common::{write_record_header, WriteToBuf}; - use log::{logger, Level}; + use std::{net::IpAddr, num::NonZeroUsize}; + + use aya_log_common::{Argument, Field, Header}; + use log::{Level, logger}; + + trait WriteToBuf { + fn write(self, buf: &mut [u8]) -> Option; + } + + impl WriteToBuf for T { + fn write(self, buf: &mut [u8]) -> Option { + let (kind, value) = self.as_argument(); + let field = Field::new(kind, value)?; + let mut size = 0; + let mut op = |slice: &[u8]| { + let buf = buf.get_mut(size..)?; + let buf = buf.get_mut(..slice.len())?; + buf.copy_from_slice(slice); + size += slice.len(); + Some(()) + }; + field.with_bytes(&mut op)?; + NonZeroUsize::new(size) + } + } use super::*; - fn new_log(args: usize) -> Option<(usize, Vec)> { + fn write_record_header( + buf: &mut [u8], + target: &str, + level: aya_log_common::Level, + module: &str, + file: &str, + line: u32, + num_args: u32, + ) -> Option { + let header = Header::new(target, level, module, file, line, num_args)?; + let mut size = 0; + let mut op = |slice: &[u8]| { + let buf = buf.get_mut(size..)?; + let buf = buf.get_mut(..slice.len())?; + buf.copy_from_slice(slice); + size += slice.len(); + Some(()) + }; + header.with_bytes(&mut op)?; + NonZeroUsize::new(size) + } + + fn new_log(args: u32) -> Option<(usize, Vec)> { let mut buf = vec![0; 8192]; let len = write_record_header( &mut buf, @@ -641,7 +892,8 @@ mod test { len += "test".write(&mut input[len..]).unwrap().get(); - _ = len; + let len = u16::try_from(len).unwrap(); + input.splice(0..0, (len + 2).to_ne_bytes().iter().copied()); let logger = logger(); let () = log_buf(&input, logger).unwrap(); @@ -660,7 +912,8 @@ mod test { len += "hello ".write(&mut input[len..]).unwrap().get(); len += "test".write(&mut input[len..]).unwrap().get(); - _ = len; + let len = u16::try_from(len).unwrap(); + input.splice(0..0, (len + 2).to_ne_bytes().iter().copied()); let logger = logger(); let () = log_buf(&input, logger).unwrap(); @@ -682,7 +935,8 @@ mod test { .get(); len += [0xde, 0xad].write(&mut input[len..]).unwrap().get(); - _ = len; + let len = u16::try_from(len).unwrap(); + input.splice(0..0, (len + 2).to_ne_bytes().iter().copied()); let logger = logger(); let () = log_buf(&input, logger).unwrap(); @@ -712,7 +966,8 @@ mod test { .get(); len += [0xbe, 0xef].write(&mut input[len..]).unwrap().get(); - _ = len; + let len = u16::try_from(len).unwrap(); + input.splice(0..0, (len + 2).to_ne_bytes().iter().copied()); let logger = logger(); let () = log_buf(&input, logger).unwrap(); @@ -723,6 +978,37 @@ mod test { }); } + #[test] + fn test_bytes_unambiguous() { + testing_logger::setup(); + let (mut len, mut input) = new_log(5).unwrap(); + + len += DisplayHint::LowerHex + .write(&mut input[len..]) + .unwrap() + .get(); + len += [0x01, 0x02].write(&mut input[len..]).unwrap().get(); + + len += " ".write(&mut input[len..]).unwrap().get(); + + len += DisplayHint::LowerHex + .write(&mut input[len..]) + .unwrap() + .get(); + len += [0x12].write(&mut input[len..]).unwrap().get(); + + let len = u16::try_from(len).unwrap(); + input.splice(0..0, (len + 2).to_ne_bytes().iter().copied()); + + let logger = logger(); + let () = log_buf(&input, logger).unwrap(); + testing_logger::validate(|captured_logs| { + assert_eq!(captured_logs.len(), 1); + assert_eq!(captured_logs[0].body, "0102 12"); + assert_eq!(captured_logs[0].level, Level::Info); + }); + } + #[test] fn test_display_hint_default() { testing_logger::setup(); @@ -732,7 +1018,8 @@ mod test { len += DisplayHint::Default.write(&mut input[len..]).unwrap().get(); len += 14.write(&mut input[len..]).unwrap().get(); - _ = len; + let len = u16::try_from(len).unwrap(); + input.splice(0..0, (len + 2).to_ne_bytes().iter().copied()); let logger = logger(); let () = log_buf(&input, logger).unwrap(); @@ -755,7 +1042,8 @@ mod test { .get(); len += 200.write(&mut input[len..]).unwrap().get(); - _ = len; + let len = u16::try_from(len).unwrap(); + input.splice(0..0, (len + 2).to_ne_bytes().iter().copied()); let logger = logger(); let () = log_buf(&input, logger).unwrap(); @@ -778,7 +1066,8 @@ mod test { .get(); len += 200.write(&mut input[len..]).unwrap().get(); - _ = len; + let len = u16::try_from(len).unwrap(); + input.splice(0..0, (len + 2).to_ne_bytes().iter().copied()); let logger = logger(); let () = log_buf(&input, logger).unwrap(); @@ -794,12 +1083,61 @@ mod test { testing_logger::setup(); let (mut len, mut input) = new_log(3).unwrap(); + len += "ipv4: ".write(&mut input[len..]).unwrap().get(); + len += DisplayHint::Ip.write(&mut input[len..]).unwrap().get(); + len += Ipv4Addr::new(10, 0, 0, 1) + .write(&mut input[len..]) + .unwrap() + .get(); + + let len = u16::try_from(len).unwrap(); + input.splice(0..0, (len + 2).to_ne_bytes().iter().copied()); + + let logger = logger(); + let () = log_buf(&input, logger).unwrap(); + testing_logger::validate(|captured_logs| { + assert_eq!(captured_logs.len(), 1); + assert_eq!(captured_logs[0].body, "ipv4: 10.0.0.1"); + assert_eq!(captured_logs[0].level, Level::Info); + }); + } + + #[test] + fn test_display_hint_ip_ipv4() { + testing_logger::setup(); + let (mut len, mut input) = new_log(3).unwrap(); + + len += "ipv4: ".write(&mut input[len..]).unwrap().get(); + len += DisplayHint::Ip.write(&mut input[len..]).unwrap().get(); + len += IpAddr::V4(Ipv4Addr::new(10, 0, 0, 1)) + .write(&mut input[len..]) + .unwrap() + .get(); + + let len = u16::try_from(len).unwrap(); + input.splice(0..0, (len + 2).to_ne_bytes().iter().copied()); + + let logger = logger(); + let () = log_buf(&input, logger).unwrap(); + testing_logger::validate(|captured_logs| { + assert_eq!(captured_logs.len(), 1); + assert_eq!(captured_logs[0].body, "ipv4: 10.0.0.1"); + assert_eq!(captured_logs[0].level, Level::Info); + }); + } + + #[test] + fn test_display_hint_ipv4_u32() { + testing_logger::setup(); + let (mut len, mut input) = new_log(3).unwrap(); + len += "ipv4: ".write(&mut input[len..]).unwrap().get(); len += DisplayHint::Ip.write(&mut input[len..]).unwrap().get(); // 10.0.0.1 as u32 len += 167772161u32.write(&mut input[len..]).unwrap().get(); - _ = len; + let len = u16::try_from(len).unwrap(); + input.splice(0..0, (len + 2).to_ne_bytes().iter().copied()); let logger = logger(); let () = log_buf(&input, logger).unwrap(); @@ -810,6 +1148,58 @@ mod test { }); } + #[test] + fn test_display_hint_ipv6() { + testing_logger::setup(); + let (mut len, mut input) = new_log(3).unwrap(); + + len += "ipv6: ".write(&mut input[len..]).unwrap().get(); + len += DisplayHint::Ip.write(&mut input[len..]).unwrap().get(); + len += Ipv6Addr::new( + 0x2001, 0x0db8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0001, + ) + .write(&mut input[len..]) + .unwrap() + .get(); + + let len = u16::try_from(len).unwrap(); + input.splice(0..0, (len + 2).to_ne_bytes().iter().copied()); + + let logger = logger(); + let () = log_buf(&input, logger).unwrap(); + testing_logger::validate(|captured_logs| { + assert_eq!(captured_logs.len(), 1); + assert_eq!(captured_logs[0].body, "ipv6: 2001:db8::1:1"); + assert_eq!(captured_logs[0].level, Level::Info); + }); + } + + #[test] + fn test_display_hint_ip_ipv6() { + testing_logger::setup(); + let (mut len, mut input) = new_log(3).unwrap(); + + len += "ipv6: ".write(&mut input[len..]).unwrap().get(); + len += DisplayHint::Ip.write(&mut input[len..]).unwrap().get(); + len += IpAddr::V6(Ipv6Addr::new( + 0x2001, 0x0db8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0001, + )) + .write(&mut input[len..]) + .unwrap() + .get(); + + let len = u16::try_from(len).unwrap(); + input.splice(0..0, (len + 2).to_ne_bytes().iter().copied()); + + let logger = logger(); + let () = log_buf(&input, logger).unwrap(); + testing_logger::validate(|captured_logs| { + assert_eq!(captured_logs.len(), 1); + assert_eq!(captured_logs[0].body, "ipv6: 2001:db8::1:1"); + assert_eq!(captured_logs[0].level, Level::Info); + }); + } + #[test] fn test_display_hint_ipv6_arr_u8_len_16() { testing_logger::setup(); @@ -824,7 +1214,8 @@ mod test { ]; len += ipv6_arr.write(&mut input[len..]).unwrap().get(); - _ = len; + let len = u16::try_from(len).unwrap(); + input.splice(0..0, (len + 2).to_ne_bytes().iter().copied()); let logger = logger(); let () = log_buf(&input, logger).unwrap(); @@ -842,13 +1233,13 @@ mod test { len += "ipv6: ".write(&mut input[len..]).unwrap().get(); len += DisplayHint::Ip.write(&mut input[len..]).unwrap().get(); - // 2001:db8::1:1 as u16 array - let ipv6_arr: [u16; 8] = [ - 0x2001, 0x0db8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0001, - ]; + + let ipv6 = std::net::Ipv6Addr::new(0x2001, 0xdb8, 0, 0, 0, 0, 0x1, 0x1); + let ipv6_arr = ipv6.octets(); len += ipv6_arr.write(&mut input[len..]).unwrap().get(); - _ = len; + let len = u16::try_from(len).unwrap(); + input.splice(0..0, (len + 2).to_ne_bytes().iter().copied()); let logger = logger(); let () = log_buf(&input, logger).unwrap(); @@ -873,7 +1264,8 @@ mod test { let mac_arr: [u8; 6] = [0x00, 0x00, 0x5e, 0x00, 0x53, 0xaf]; len += mac_arr.write(&mut input[len..]).unwrap().get(); - _ = len; + let len = u16::try_from(len).unwrap(); + input.splice(0..0, (len + 2).to_ne_bytes().iter().copied()); let logger = logger(); let () = log_buf(&input, logger).unwrap(); @@ -898,7 +1290,8 @@ mod test { let mac_arr: [u8; 6] = [0x00, 0x00, 0x5e, 0x00, 0x53, 0xaf]; len += mac_arr.write(&mut input[len..]).unwrap().get(); - _ = len; + let len = u16::try_from(len).unwrap(); + input.splice(0..0, (len + 2).to_ne_bytes().iter().copied()); let logger = logger(); let () = log_buf(&input, logger).unwrap(); diff --git a/aya-obj/CHANGELOG.md b/aya-obj/CHANGELOG.md index 260f6c48..ceadbb1c 100644 --- a/aya-obj/CHANGELOG.md +++ b/aya-obj/CHANGELOG.md @@ -5,6 +5,219 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.2.1 (2024-11-01) + +### New Features + + - Rename Bpf to Ebpf + And BpfLoader to EbpfLoader. + This also adds type aliases to preserve the use of the old names, making + updating to a new Aya release less of a burden. These aliases are marked + as deprecated since we'll likely remove them in a later release. + +### Bug Fixes + + - Fill bss maps with zeros + The loader should fill bss maps with zeros according to the size of the + ELF section. + Failure to do so yields weird verifier messages as follows: + + ``` + cannot access ptr member ops with moff 0 in struct bpf_map with off 0 size 4 + ``` + + Reference to this in the cilium/ebpf code is here [1]. + I could not find a reference in libbpf. + +### Other + + - cgroup_iter_order NFPROTO* nf_inet_hooks + Adds the following to codegen: + - `bpf_cgroup_iter_order`: used in `bpf_link_info.iter.group.order` + - `NFPROTO_*`: used in `bpf_link_info.netfilter.pf` + - `nf_inet_hooks`: used in `bpf_link_info.netfilter.hooknum` + + Include `linux/netfilter.h` in `linux_wrapper.h` for `NFPROTO_*` and + `nf_inet_hooks` to generate. + - revamp MapInfo be more friendly with older kernels + Adds detection for whether a field is available in `MapInfo`: + - For `map_type()`, we treturn new enum `MapType` instead of the integer + representation. + - For fields that can't be zero, we return `Option` type. + - For `name_as_str()`, it now uses the feature probe `bpf_name()` to + detect if field is available. + Although the feature probe checks for program name, it can also be + used for map name since they were both introduced in the same commit. + - revamp ProgramInfo be more friendly with older kernels + Purpose of this commit is to add detections for whether a field is + available in `ProgramInfo`. + - For `program_type()`, we return the new enum `ProgramType` instead of + the integer representation. + - For fields that we know cannot be zero, we return `Option` + type. + - For `name_as_str()`, it now also uses the feature probe `bpf_name()` + to detect if field is available or not. + - Two additional feature probes are added for the fields: + - `prog_info_map_ids()` probe -> `map_ids()` field + - `prog_info_gpl_compatible()` probe -> `gpl_compatible()` field + + With the `prog_info_map_ids()` probe, the previous implementation that + I had for `bpf_prog_get_info_by_fd()` is shortened to use the probe + instead of having to make 2 potential syscalls. + + The `test_loaded_at()` test is also moved into info tests since it is + better related to the info tests. + - add conversion u32 to enum type for prog, link, & attach type + Add conversion from u32 to program type, link type, and attach type. + Additionally, remove duplicate match statement for u32 conversion to + `BPF_MAP_TYPE_BLOOM_FILTER` & `BPF_MAP_TYPE_CGRP_STORAGE`. + + New error `InvalidTypeBinding` is created to represent when a + parsed/received value binding to a type is invalid. + This is used in the new conversions added here, and also replaces + `InvalidMapTypeError` in `TryFrom` for `bpf_map_type`. + - add archs powerpc64 and s390x to aya + bpfman, a project using aya, has a requirement to support powerpc64 and + s390x architectures. Adding these two architectures to aya. + - Generate new bindings + +### Test + + - adjust test to not use byte arrays + Where possible, replace the hardcoded byte arrays in the tests with the + structs they represent, then convert the structs to byte arrays. + - adjust test byte arrays for big endian + Adding support for s390x (big endian architecture) and found that some + of the unit tests have structures and files implemented as byte arrays. + They are all coded as little endian and need a bug endian version to + work properly. + +### New Features (BREAKING) + + - Rename BpfRelocationError -> EbpfRelocationError + - Rename BpfSectionKind to EbpfSectionKind + +### Commit Statistics + + + + - 25 commits contributed to the release over the course of 241 calendar days. + - 247 days passed between releases. + - 12 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Merge pull request #1073 from dave-tucker/reloc-bug ([`b2ac9fe`](https://github.com/aya-rs/aya/commit/b2ac9fe85db6c25d0b8155a75a2df96a80a19811)) + - Fill bss maps with zeros ([`ca0c32d`](https://github.com/aya-rs/aya/commit/ca0c32d1076af81349a52235a4b6fb3937a697b3)) + - Merge pull request #1055 from aya-rs/codegen ([`59b3873`](https://github.com/aya-rs/aya/commit/59b3873a92d1eb49ca1008cb193e962fa95b3e97)) + - [codegen] Update libbpf to 80b16457cb23db4d633b17ba0305f29daa2eb307 ([`f8ad84c`](https://github.com/aya-rs/aya/commit/f8ad84c3d322d414f27375044ba694a169abfa76)) + - Cgroup_iter_order NFPROTO* nf_inet_hooks ([`366c599`](https://github.com/aya-rs/aya/commit/366c599c2083baf72c40c816da2c530dec7fd612)) + - Release aya-obj v0.2.0, aya v0.13.0, safety bump aya v0.13.0 ([`c169b72`](https://github.com/aya-rs/aya/commit/c169b727e6b8f8c2dda57f54b8c77f8b551025c6)) + - Appease clippy ([`aa240ba`](https://github.com/aya-rs/aya/commit/aa240baadf99d3fea0477a9b3966789b0f4ffe57)) + - Merge pull request #1007 from tyrone-wu/aya/info-api ([`15eb935`](https://github.com/aya-rs/aya/commit/15eb935bce6d41fb67189c48ce582b074544e0ed)) + - Revamp MapInfo be more friendly with older kernels ([`fbb0930`](https://github.com/aya-rs/aya/commit/fbb09304a2de0d8baf7ea20c9727fcd2e4fb7f41)) + - Revamp ProgramInfo be more friendly with older kernels ([`88f5ac3`](https://github.com/aya-rs/aya/commit/88f5ac31142f1657b41b1ee0f217dcd9125b210a)) + - Add conversion u32 to enum type for prog, link, & attach type ([`1634fa7`](https://github.com/aya-rs/aya/commit/1634fa7188e40ed75da53517f1fdb7396c348c34)) + - Merge pull request #974 from Billy99/billy99-arch-ppc64-s390x ([`ab5e688`](https://github.com/aya-rs/aya/commit/ab5e688fd49fcfb402ad47d51cb445437fbd8cb7)) + - Adjust test to not use byte arrays ([`4dc4b5c`](https://github.com/aya-rs/aya/commit/4dc4b5ccd48bd86e2cc59ad7386514c1531450af)) + - Add archs powerpc64 and s390x to aya ([`b513af1`](https://github.com/aya-rs/aya/commit/b513af12e8baa5c5097eaf0afdae61a830c3f877)) + - Adjust test byte arrays for big endian ([`eef7346`](https://github.com/aya-rs/aya/commit/eef7346fb2231f8741410381198015cceeebfac9)) + - Merge pull request #989 from aya-rs/codegen ([`8015e10`](https://github.com/aya-rs/aya/commit/8015e100796c550804ccf8fea691c63ec1ac36b8)) + - [codegen] Update libbpf to 686f600bca59e107af4040d0838ca2b02c14ff50 ([`8d7446e`](https://github.com/aya-rs/aya/commit/8d7446e01132fe1751605b87a6b4a0165273de15)) + - Merge pull request #978 from aya-rs/codegen ([`06aa5c8`](https://github.com/aya-rs/aya/commit/06aa5c8ed344bd0d85096a0fd033ff0bd90a2f88)) + - [codegen] Update libbpf to c1a6c770c46c6e78ad6755bf596c23a4e6f6b216 ([`8b50a6a`](https://github.com/aya-rs/aya/commit/8b50a6a5738b5a57121205490d26805c74cb63de)) + - Document miri skip reasons ([`35962a4`](https://github.com/aya-rs/aya/commit/35962a4794484aa3b37dadc98a70a659fd107b75)) + - Generate new bindings ([`b06ff40`](https://github.com/aya-rs/aya/commit/b06ff402780b80862933791831c578e4c339fc96)) + - Merge pull request #528 from dave-tucker/rename-all-the-things ([`63d8d4d`](https://github.com/aya-rs/aya/commit/63d8d4d34bdbbee149047dc0a5e9c2b191f3b32d)) + - Rename Bpf to Ebpf ([`8c79b71`](https://github.com/aya-rs/aya/commit/8c79b71bd5699a686f33360520aa95c1a2895fa5)) + - Rename BpfRelocationError -> EbpfRelocationError ([`fd48c55`](https://github.com/aya-rs/aya/commit/fd48c55466a23953ce7a4912306e1acf059b498b)) + - Rename BpfSectionKind to EbpfSectionKind ([`cf3e2ca`](https://github.com/aya-rs/aya/commit/cf3e2ca677c81224368fb2838ebc5b10ee98419a)) +
+ +## 0.2.0 (2024-10-09) + + + + + + + + + +### New Features + + - Rename Bpf to Ebpf + And BpfLoader to EbpfLoader. + This also adds type aliases to preserve the use of the old names, making + updating to a new Aya release less of a burden. These aliases are marked + as deprecated since we'll likely remove them in a later release. + +### Other + + - revamp MapInfo be more friendly with older kernels + Adds detection for whether a field is available in `MapInfo`: + - For `map_type()`, we treturn new enum `MapType` instead of the integer + representation. + - For fields that can't be zero, we return `Option` type. + - For `name_as_str()`, it now uses the feature probe `bpf_name()` to + detect if field is available. + Although the feature probe checks for program name, it can also be + used for map name since they were both introduced in the same commit. + - revamp ProgramInfo be more friendly with older kernels + Purpose of this commit is to add detections for whether a field is + available in `ProgramInfo`. + - For `program_type()`, we return the new enum `ProgramType` instead of + the integer representation. + - For fields that we know cannot be zero, we return `Option` + type. + - For `name_as_str()`, it now also uses the feature probe `bpf_name()` + to detect if field is available or not. + - Two additional feature probes are added for the fields: + - `prog_info_map_ids()` probe -> `map_ids()` field + - `prog_info_gpl_compatible()` probe -> `gpl_compatible()` field + + With the `prog_info_map_ids()` probe, the previous implementation that + I had for `bpf_prog_get_info_by_fd()` is shortened to use the probe + instead of having to make 2 potential syscalls. + + The `test_loaded_at()` test is also moved into info tests since it is + better related to the info tests. + - add conversion u32 to enum type for prog, link, & attach type + Add conversion from u32 to program type, link type, and attach type. + Additionally, remove duplicate match statement for u32 conversion to + `BPF_MAP_TYPE_BLOOM_FILTER` & `BPF_MAP_TYPE_CGRP_STORAGE`. + + New error `InvalidTypeBinding` is created to represent when a + parsed/received value binding to a type is invalid. + This is used in the new conversions added here, and also replaces + `InvalidMapTypeError` in `TryFrom` for `bpf_map_type`. + - add archs powerpc64 and s390x to aya + bpfman, a project using aya, has a requirement to support powerpc64 and + s390x architectures. Adding these two architectures to aya. + - Generate new bindings + +### Test + + - adjust test to not use byte arrays + Where possible, replace the hardcoded byte arrays in the tests with the + structs they represent, then convert the structs to byte arrays. + - adjust test byte arrays for big endian + Adding support for s390x (big endian architecture) and found that some + of the unit tests have structures and files implemented as byte arrays. + They are all coded as little endian and need a bug endian version to + work properly. + +### New Features (BREAKING) + + - Rename BpfRelocationError -> EbpfRelocationError + - Rename BpfSectionKind to EbpfSectionKind + ## 0.1.0 (2024-02-28) @@ -417,7 +630,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - - 145 commits contributed to the release over the course of 422 calendar days. + - 146 commits contributed to the release. - 63 commits were understood as [conventional](https://www.conventionalcommits.org). - 1 unique issue was worked on: [#608](https://github.com/aya-rs/aya/issues/608) @@ -430,6 +643,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * **[#608](https://github.com/aya-rs/aya/issues/608)** - Fix load errors for empty (but existent) BTF/BTF.ext sections ([`5894c4c`](https://github.com/aya-rs/aya/commit/5894c4ce82948c7e5fe766f41b690d036fcca907)) * **Uncategorized** + - Release aya-obj v0.1.0, aya v0.12.0, safety bump aya-log v0.2.0 ([`0e99fa0`](https://github.com/aya-rs/aya/commit/0e99fa0f340b2fb2e0da3b330aa6555322a77eec)) - Merge pull request #891 from dave-tucker/changelog ([`431ce23`](https://github.com/aya-rs/aya/commit/431ce23f27ef5c36a6b38c73b38f23b1cf007900)) - Add CHANGELOG ([`72e8aab`](https://github.com/aya-rs/aya/commit/72e8aab6c8be8663c5b6ff6b606a51debf512f7d)) - Appease new nightly clippy lints ([`3369169`](https://github.com/aya-rs/aya/commit/3369169aaca6510a47318fc29bbdb801b60b1c21)) diff --git a/aya-obj/Cargo.toml b/aya-obj/Cargo.toml index e18972ba..c3056fe5 100644 --- a/aya-obj/Cargo.toml +++ b/aya-obj/Cargo.toml @@ -1,20 +1,24 @@ [package] -name = "aya-obj" -version = "0.1.0" description = "An eBPF object file parsing library with BTF and relocation support." +documentation = "https://docs.rs/aya-obj" keywords = ["bpf", "btf", "ebpf", "elf", "object"] +name = "aya-obj" readme = "README.md" -documentation = "https://docs.rs/aya-obj" +version = "0.2.1" + authors.workspace = true +edition.workspace = true +homepage.workspace = true license.workspace = true repository.workspace = true -homepage.workspace = true -edition.workspace = true +rust-version.workspace = true + +[lints] +workspace = true [dependencies] bytes = { workspace = true } -core-error = { workspace = true, default-features = true } -hashbrown = { workspace = true, default-features = true } +hashbrown = { workspace = true, features = ["default-hasher", "equivalent"] } log = { workspace = true } object = { workspace = true, features = ["elf", "read_core"] } thiserror = { workspace = true } @@ -24,4 +28,4 @@ assert_matches = { workspace = true } rbpf = { workspace = true } [features] -std = [] +std = ["thiserror/std"] diff --git a/aya-obj/include/linux_wrapper.h b/aya-obj/include/linux_wrapper.h index 8be2459a..fe9498f8 100644 --- a/aya-obj/include/linux_wrapper.h +++ b/aya-obj/include/linux_wrapper.h @@ -1,13 +1,9 @@ -#include #include #include #include +#include #include #include #include #include - -/* workaround the fact that bindgen can't parse the IOC macros */ -int AYA_PERF_EVENT_IOC_ENABLE = PERF_EVENT_IOC_ENABLE; -int AYA_PERF_EVENT_IOC_DISABLE = PERF_EVENT_IOC_DISABLE; -int AYA_PERF_EVENT_IOC_SET_BPF = PERF_EVENT_IOC_SET_BPF; +#include diff --git a/aya-obj/src/btf/btf.rs b/aya-obj/src/btf/btf.rs index ef7217ad..ff28b164 100644 --- a/aya-obj/src/btf/btf.rs +++ b/aya-obj/src/btf/btf.rs @@ -5,27 +5,30 @@ use alloc::{ vec, vec::Vec, }; -use core::{ffi::CStr, mem, ptr}; +use core::{ + cell::OnceCell, + ffi::{CStr, FromBytesUntilNulError}, + mem, ptr, +}; -use bytes::BufMut; +use bytes::BufMut as _; use log::debug; use object::{Endianness, SectionIndex}; -#[cfg(not(feature = "std"))] -use crate::std; use crate::{ + Object, btf::{ + Array, BtfEnum, BtfEnum64, BtfKind, BtfMember, BtfType, Const, DataSec, DataSecEntry, Enum, + Enum64, Enum64Fallback, Enum64VariantFallback, FuncInfo, FuncLinkage, Int, IntEncoding, + LineInfo, Struct, Typedef, Union, Var, VarLinkage, info::{FuncSecInfo, LineSecInfo}, relocation::Relocation, - Array, BtfEnum, BtfKind, BtfMember, BtfType, Const, Enum, FuncInfo, FuncLinkage, Int, - IntEncoding, LineInfo, Struct, Typedef, Union, VarLinkage, }, generated::{btf_ext_header, btf_header}, - util::{bytes_of, HashMap}, - Object, + util::{HashMap, bytes_of}, }; -pub(crate) const MAX_RESOLVE_DEPTH: u8 = 32; +pub(crate) const MAX_RESOLVE_DEPTH: usize = 32; pub(crate) const MAX_SPEC_LEN: usize = 64; /// The error type returned when `BTF` operations fail. @@ -98,21 +101,21 @@ pub enum BtfError { }, /// unknown BTF type id - #[error("Unknown BTF type id `{type_id}`")] + #[error("unknown BTF type id `{type_id}`")] UnknownBtfType { /// type id type_id: u32, }, /// unexpected btf type id - #[error("Unexpected BTF type id `{type_id}`")] + #[error("unexpected BTF type id `{type_id}`")] UnexpectedBtfType { /// type id type_id: u32, }, /// unknown BTF type - #[error("Unknown BTF type `{type_name}`")] + #[error("unknown BTF type `{type_name}`")] UnknownBtfTypeName { /// type name type_name: String, @@ -127,7 +130,7 @@ pub enum BtfError { #[cfg(feature = "std")] /// Loading the btf failed - #[error("the BPF_BTF_LOAD syscall failed. Verifier output: {verifier_log}")] + #[error("the BPF_BTF_LOAD syscall returned {io_error}. Verifier output: {verifier_log}")] LoadError { /// The [`std::io::Error`] returned by the `BPF_BTF_LOAD` syscall. #[source] @@ -157,15 +160,19 @@ pub enum BtfError { /// unable to get symbol name #[error("Unable to get symbol name")] InvalidSymbolName, + + /// BTF map wrapper's layout is unexpected + #[error("BTF map wrapper's layout is unexpected: {0:?}")] + UnexpectedBtfMapWrapperLayout(Struct), } /// Available BTF features #[derive(Default, Debug)] -#[allow(missing_docs)] pub struct BtfFeatures { btf_func: bool, btf_func_global: bool, btf_datasec: bool, + btf_datasec_zero: bool, btf_float: bool, btf_decl_tag: bool, btf_type_tag: bool, @@ -174,19 +181,22 @@ pub struct BtfFeatures { impl BtfFeatures { #[doc(hidden)] + #[expect(clippy::too_many_arguments, reason = "this interface is terrible")] pub fn new( btf_func: bool, btf_func_global: bool, btf_datasec: bool, + btf_datasec_zero: bool, btf_float: bool, btf_decl_tag: bool, btf_type_tag: bool, btf_enum64: bool, ) -> Self { - BtfFeatures { + Self { btf_func, btf_func_global, btf_datasec, + btf_datasec_zero, btf_float, btf_decl_tag, btf_type_tag, @@ -209,6 +219,11 @@ impl BtfFeatures { self.btf_datasec } + /// Returns true if zero-length DATASec entries are accepted. + pub fn btf_datasec_zero(&self) -> bool { + self.btf_datasec_zero + } + /// Returns true if the BTF_FLOAT is supported. pub fn btf_float(&self) -> bool { self.btf_float @@ -251,10 +266,19 @@ pub struct Btf { _endianness: Endianness, } +fn add_type(header: &mut btf_header, types: &mut BtfTypes, btf_type: BtfType) -> u32 { + let size = btf_type.type_info_size() as u32; + let type_id = types.len(); + types.push(btf_type); + header.type_len += size; + header.str_off += size; + type_id as u32 +} + impl Btf { /// Creates a new empty instance with its header initialized - pub fn new() -> Btf { - Btf { + pub fn new() -> Self { + Self { header: btf_header { magic: 0xeb9f, version: 0x01, @@ -282,7 +306,7 @@ impl Btf { /// Adds a string to BTF metadata, returning an offset pub fn add_string(&mut self, name: &str) -> u32 { - let str = name.bytes().chain(std::iter::once(0)); + let str = name.bytes().chain(core::iter::once(0)); let name_offset = self.strings.len(); self.strings.extend(str); self.header.str_len = self.strings.len() as u32; @@ -291,18 +315,13 @@ impl Btf { /// Adds a type to BTF metadata, returning a type id pub fn add_type(&mut self, btf_type: BtfType) -> u32 { - let size = btf_type.type_info_size() as u32; - let type_id = self.types.len(); - self.types.push(btf_type); - self.header.type_len += size; - self.header.str_off += size; - type_id as u32 + add_type(&mut self.header, &mut self.types, btf_type) } /// Loads BTF metadata from `/sys/kernel/btf/vmlinux`. #[cfg(feature = "std")] - pub fn from_sys_fs() -> Result { - Btf::parse_file("/sys/kernel/btf/vmlinux", Endianness::default()) + pub fn from_sys_fs() -> Result { + Self::parse_file("/sys/kernel/btf/vmlinux", Endianness::default()) } /// Loads BTF metadata from the given `path`. @@ -310,10 +329,10 @@ impl Btf { pub fn parse_file>( path: P, endianness: Endianness, - ) -> Result { - use std::{borrow::ToOwned, fs}; + ) -> Result { + use std::{borrow::ToOwned as _, fs}; let path = path.as_ref(); - Btf::parse( + Self::parse( &fs::read(path).map_err(|error| BtfError::FileError { path: path.to_owned(), error, @@ -323,7 +342,7 @@ impl Btf { } /// Parses BTF from binary data of the given endianness - pub fn parse(data: &[u8], endianness: Endianness) -> Result { + pub fn parse(data: &[u8], endianness: Endianness) -> Result { if data.len() < mem::size_of::() { return Err(BtfError::InvalidHeader); } @@ -338,9 +357,9 @@ impl Btf { } let strings = data[str_off..str_off + str_len].to_vec(); - let types = Btf::read_type_info(&header, data, endianness)?; + let types = Self::read_type_info(&header, data, endianness)?; - Ok(Btf { + Ok(Self { header, strings, types, @@ -389,13 +408,9 @@ impl Btf { } let offset = offset as usize; - let nul = self.strings[offset..] - .iter() - .position(|c| *c == 0u8) - .ok_or(BtfError::InvalidStringOffset { offset })?; - let s = CStr::from_bytes_with_nul(&self.strings[offset..=offset + nul]) - .map_err(|_| BtfError::InvalidStringOffset { offset })?; + let s = CStr::from_bytes_until_nul(&self.strings[offset..]) + .map_err(|FromBytesUntilNulError { .. }| BtfError::InvalidStringOffset { offset })?; Ok(s.to_string_lossy()) } @@ -436,7 +451,7 @@ impl Btf { pub(crate) fn type_size(&self, root_type_id: u32) -> Result { let mut type_id = root_type_id; let mut n_elems = 1; - for _ in 0..MAX_RESOLVE_DEPTH { + for () in core::iter::repeat_n((), MAX_RESOLVE_DEPTH) { let ty = self.types.type_by_id(type_id)?; let size = match ty { BtfType::Array(Array { array, .. }) => { @@ -467,7 +482,6 @@ impl Btf { pub fn to_bytes(&self) -> Vec { // Safety: btf_header is POD let mut buf = unsafe { bytes_of::(&self.header).to_vec() }; - // Skip the first type since it's always BtfType::Unknown for type_by_id to work buf.extend(self.types.to_bytes()); buf.put(self.strings.as_slice()); buf @@ -487,19 +501,8 @@ impl Btf { symbol_offsets: &HashMap, features: &BtfFeatures, ) -> Result<(), BtfError> { - // ENUM64 placeholder type needs to be added before we take ownership of - // self.types to ensure that the offsets in the BtfHeader are correct. - let placeholder_name = self.add_string("enum64_placeholder"); - let enum64_placeholder_id = (!features.btf_enum64 - && self.types().any(|t| t.kind() == BtfKind::Enum64)) - .then(|| { - self.add_type(BtfType::Int(Int::new( - placeholder_name, - 1, - IntEncoding::None, - 0, - ))) - }); + let enum64_placeholder_id = OnceCell::new(); + let filler_var_id = OnceCell::new(); let mut types = mem::take(&mut self.types); for i in 0..types.types.len() { let t = &mut types.types[i]; @@ -519,7 +522,7 @@ impl Btf { } // Sanitize DATASEC if they are not supported. BtfType::DataSec(d) if !features.btf_datasec => { - debug!("{}: not supported. replacing with STRUCT", kind); + debug!("{kind}: not supported. replacing with STRUCT"); // STRUCT aren't allowed to have "." in their name, fixup this if needed. let mut name_offset = d.name_offset; @@ -532,7 +535,7 @@ impl Btf { name_offset = self.add_string(&fixed_name); } - let entries = std::mem::take(&mut d.entries); + let entries = core::mem::take(&mut d.entries); let members = entries .iter() @@ -568,7 +571,7 @@ impl Btf { // There are some cases when the compiler does indeed populate the size. if d.size > 0 { - debug!("{} {}: size fixup not required", kind, name); + debug!("{kind} {name}: size fixup not required"); } else { // We need to get the size of the section from the ELF file. // Fortunately, we cached these when parsing it initially @@ -579,7 +582,7 @@ impl Btf { return Err(BtfError::UnknownSectionSize { section_name: name }); } }; - debug!("{} {}: fixup size to {}", kind, name, size); + debug!("{kind} {name}: fixup size to {size}"); d.size = *size as u32; // The Vec contains BTF_KIND_VAR sections @@ -587,17 +590,57 @@ impl Btf { // we need to get the offset from the ELF file. // This was also cached during initial parsing and // we can query by name in symbol_offsets. + let old_size = d.type_info_size(); let mut entries = mem::take(&mut d.entries); - let mut fixed_section = d.clone(); + let mut section_size = d.size; + let name_offset = d.name_offset; + + // Kernels before 5.12 reject zero-length DATASEC. See + // https://github.com/torvalds/linux/commit/13ca51d5eb358edcb673afccb48c3440b9fda21b. + if entries.is_empty() && !features.btf_datasec_zero { + let filler_var_id = *filler_var_id.get_or_init(|| { + let filler_type_name = self.add_string("__aya_datasec_filler_type"); + let filler_type_id = add_type( + &mut self.header, + &mut types, + BtfType::Int(Int::new( + filler_type_name, + 1, + IntEncoding::None, + 0, + )), + ); + + let filler_var_name = self.add_string("__aya_datasec_filler"); + add_type( + &mut self.header, + &mut types, + BtfType::Var(Var::new( + filler_var_name, + filler_type_id, + VarLinkage::Static, + )), + ) + }); + let filler_len = section_size.max(1); + debug!( + "{kind} {name}: injecting filler entry for zero-length DATASEC (len={filler_len})" + ); + entries.push(DataSecEntry { + btf_type: filler_var_id, + offset: 0, + size: filler_len, + }); + if section_size == 0 { + section_size = filler_len; + } + } for e in entries.iter_mut() { if let BtfType::Var(var) = types.type_by_id(e.btf_type)? { let var_name = self.string_at(var.name_offset)?; if var.linkage == VarLinkage::Static { - debug!( - "{} {}: VAR {}: fixup not required", - kind, name, var_name - ); + debug!("{kind} {name}: VAR {var_name}: fixup not required"); continue; } @@ -610,17 +653,20 @@ impl Btf { } }; e.offset = *offset as u32; - debug!( - "{} {}: VAR {}: fixup offset {}", - kind, name, var_name, offset - ); + debug!("{kind} {name}: VAR {var_name}: fixup offset {offset}"); } else { return Err(BtfError::InvalidDatasec); } } - fixed_section.entries = entries; + let fixed_section = DataSec::new(name_offset, entries, section_size); + let new_size = fixed_section.type_info_size(); + if new_size != old_size { + self.header.type_len = + self.header.type_len - old_size as u32 + new_size as u32; + self.header.str_off = self.header.type_len; + } - // Must reborrow here because we borrow `types` immutably above. + // Must reborrow here because we borrow `types` above. let t = &mut types.types[i]; *t = BtfType::DataSec(fixed_section); } @@ -635,7 +681,7 @@ impl Btf { } // Sanitize FUNC_PROTO. BtfType::FuncProto(ty) if !features.btf_func => { - debug!("{}: not supported. replacing with ENUM", kind); + debug!("{kind}: not supported. replacing with ENUM"); let members: Vec = ty .params .iter() @@ -652,7 +698,7 @@ impl Btf { let name = self.string_at(ty.name_offset)?; // Sanitize FUNC. if !features.btf_func { - debug!("{}: not supported. replacing with TYPEDEF", kind); + debug!("{kind}: not supported. replacing with TYPEDEF"); *t = BtfType::Typedef(Typedef::new(ty.name_offset, ty.btf_type)); } else if !features.btf_func_global || name == "memset" @@ -668,8 +714,7 @@ impl Btf { if ty.linkage() == FuncLinkage::Global { if !features.btf_func_global { debug!( - "{}: BTF_FUNC_GLOBAL not supported. replacing with BTF_FUNC_STATIC", - kind + "{kind}: BTF_FUNC_GLOBAL not supported. replacing with BTF_FUNC_STATIC", ); } else { debug!("changing FUNC {name} linkage to BTF_FUNC_STATIC"); @@ -680,39 +725,85 @@ impl Btf { } // Sanitize FLOAT. BtfType::Float(ty) if !features.btf_float => { - debug!("{}: not supported. replacing with STRUCT", kind); + debug!("{kind}: not supported. replacing with STRUCT"); *t = BtfType::Struct(Struct::new(0, vec![], ty.size)); } // Sanitize DECL_TAG. BtfType::DeclTag(ty) if !features.btf_decl_tag => { - debug!("{}: not supported. replacing with INT", kind); + debug!("{kind}: not supported. replacing with INT"); *t = BtfType::Int(Int::new(ty.name_offset, 1, IntEncoding::None, 0)); } // Sanitize TYPE_TAG. BtfType::TypeTag(ty) if !features.btf_type_tag => { - debug!("{}: not supported. replacing with CONST", kind); + debug!("{kind}: not supported. replacing with CONST"); *t = BtfType::Const(Const::new(ty.btf_type)); } // Sanitize Signed ENUMs. BtfType::Enum(ty) if !features.btf_enum64 && ty.is_signed() => { - debug!("{}: signed ENUMs not supported. Marking as unsigned", kind); + debug!("{kind}: signed ENUMs not supported. Marking as unsigned"); ty.set_signed(false); } // Sanitize ENUM64. - BtfType::Enum64(ty) if !features.btf_enum64 => { - debug!("{}: not supported. replacing with UNION", kind); - let placeholder_id = - enum64_placeholder_id.expect("enum64_placeholder_id must be set"); - let members: Vec = ty - .variants - .iter() - .map(|v| BtfMember { - name_offset: v.name_offset, - btf_type: placeholder_id, - offset: 0, - }) - .collect(); - *t = BtfType::Union(Union::new(ty.name_offset, members.len() as u32, members)); + BtfType::Enum64(ty) => { + // Kernels before 6.0 do not support ENUM64. See + // https://github.com/torvalds/linux/commit/6089fb325cf737eeb2c4d236c94697112ca860da. + if !features.btf_enum64 { + debug!("{kind}: not supported. replacing with UNION"); + + // `ty` is borrowed from `types` and we use that borrow + // below, so we must not borrow it again in the + // get_or_init closure. + let is_signed = ty.is_signed(); + let Enum64 { + name_offset, + size, + variants, + .. + } = ty; + let (name_offset, size, variants) = + (*name_offset, *size, mem::take(variants)); + + let fallback = Enum64Fallback { + signed: is_signed, + variants: variants + .iter() + .copied() + .map( + |BtfEnum64 { + name_offset, + value_high, + value_low, + }| Enum64VariantFallback { + name_offset, + value: (u64::from(value_high) << 32) | u64::from(value_low), + }, + ) + .collect(), + }; + + // The rewritten UNION still needs a concrete member type. Share a single + // synthetic INT placeholder between every downgraded ENUM64. + let placeholder_id = enum64_placeholder_id.get_or_init(|| { + let placeholder_name = self.add_string("enum64_placeholder"); + add_type( + &mut self.header, + &mut types, + BtfType::Int(Int::new(placeholder_name, 1, IntEncoding::None, 0)), + ) + }); + let members: Vec = variants + .iter() + .map(|v| BtfMember { + name_offset: v.name_offset, + btf_type: *placeholder_id, + offset: 0, + }) + .collect(); + + // Must reborrow here because we borrow `types` above. + let t = &mut types.types[i]; + *t = BtfType::Union(Union::new(name_offset, size, members, Some(fallback))); + } } // The type does not need fixing up or sanitization. _ => {} @@ -737,7 +828,7 @@ impl Object { &mut self, features: &BtfFeatures, ) -> Result, BtfError> { - if let Some(ref mut obj_btf) = &mut self.btf { + if let Some(obj_btf) = &mut self.btf { if obj_btf.is_empty() { return Ok(None); } @@ -755,8 +846,8 @@ impl Object { } unsafe fn read_btf_header(data: &[u8]) -> btf_header { - // safety: btf_header is POD so read_unaligned is safe - ptr::read_unaligned(data.as_ptr() as *const btf_header) + // Safety: Btf_header is POD so read_unaligned is safe + unsafe { ptr::read_unaligned(data.as_ptr().cast()) } } /// Data in the `.BTF.ext` section @@ -774,11 +865,7 @@ pub struct BtfExt { } impl BtfExt { - pub(crate) fn parse( - data: &[u8], - endianness: Endianness, - btf: &Btf, - ) -> Result { + pub(crate) fn parse(data: &[u8], endianness: Endianness, btf: &Btf) -> Result { #[repr(C)] #[derive(Debug, Copy, Clone)] struct MinimalHeader { @@ -788,7 +875,7 @@ impl BtfExt { pub hdr_len: u32, } - if data.len() < std::mem::size_of::() { + if data.len() < core::mem::size_of::() { return Err(BtfError::InvalidHeader); } @@ -796,7 +883,7 @@ impl BtfExt { // first find the actual size of the header by converting into the minimal valid header // Safety: MinimalHeader is POD so read_unaligned is safe let minimal_header = unsafe { - ptr::read_unaligned::(data.as_ptr() as *const MinimalHeader) + ptr::read_unaligned::(data.as_ptr().cast::()) }; let len_to_read = minimal_header.hdr_len as usize; @@ -809,18 +896,18 @@ impl BtfExt { // forwards compatibility: if newer headers are bigger // than the pre-generated btf_ext_header we should only // read up to btf_ext_header - let len_to_read = len_to_read.min(std::mem::size_of::()); + let len_to_read = len_to_read.min(core::mem::size_of::()); // now create our full-fledge header; but start with it // zeroed out so unavailable fields stay as zero on older // BTF.ext sections - let mut header = std::mem::MaybeUninit::::zeroed(); + let mut header = core::mem::MaybeUninit::::zeroed(); // Safety: we have checked that len_to_read is less than // size_of:: and less than // data.len(). Additionally, we know that the header has // been initialized so it's safe to call for assume_init. unsafe { - std::ptr::copy(data.as_ptr(), header.as_mut_ptr() as *mut u8, len_to_read); + core::ptr::copy(data.as_ptr(), header.as_mut_ptr().cast::(), len_to_read); header.assume_init() } }; @@ -859,7 +946,7 @@ impl BtfExt { }) }; - let mut ext = BtfExt { + let mut ext = Self { header, relocations: Vec::new(), func_info: FuncInfo::new(), @@ -954,8 +1041,8 @@ impl BtfExt { self.info_data(self.header.line_info_off, self.header.line_info_len) } - pub(crate) fn relocations(&self) -> impl Iterator)> { - self.relocations.iter() + pub(crate) fn relocations(&self) -> &[(u32, Vec)] { + self.relocations.as_slice() } pub(crate) fn func_info_rec_size(&self) -> usize { @@ -1056,7 +1143,7 @@ impl BtfTypes { pub(crate) fn resolve_type(&self, root_type_id: u32) -> Result { let mut type_id = root_type_id; - for _ in 0..MAX_RESOLVE_DEPTH { + for () in core::iter::repeat_n((), MAX_RESOLVE_DEPTH) { let ty = self.type_by_id(type_id)?; use BtfType::*; @@ -1110,11 +1197,18 @@ mod tests { #[test] fn test_parse_header() { - let data: &[u8] = &[ - 0x9f, 0xeb, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x54, - 0x2a, 0x00, 0x64, 0x54, 0x2a, 0x00, 0x10, 0x64, 0x1c, 0x00, - ]; - let header = unsafe { read_btf_header(data) }; + let header = btf_header { + magic: 0xeb9f, + version: 0x01, + flags: 0x00, + hdr_len: 0x18, + type_off: 0x00, + type_len: 0x2a5464, + str_off: 0x2a5464, + str_len: 0x1c6410, + }; + let data = unsafe { bytes_of::(&header).to_vec() }; + let header = unsafe { read_btf_header(&data) }; assert_eq!(header.magic, 0xeb9f); assert_eq!(header.version, 0x01); assert_eq!(header.flags, 0x00); @@ -1129,74 +1223,175 @@ mod tests { fn test_parse_btf() { // this generated BTF data is from an XDP program that simply returns XDP_PASS // compiled using clang - let data: &[u8] = &[ - 0x9f, 0xeb, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x01, - 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, - 0x00, 0x04, 0x18, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x04, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x00, 0x0d, 0x06, 0x00, 0x00, 0x00, 0x61, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, - 0x00, 0x01, 0x69, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0c, 0x05, 0x00, 0x00, 0x00, - 0xb7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xbc, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, - 0xd0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x00, 0x00, 0xd9, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x78, - 0x64, 0x70, 0x5f, 0x6d, 0x64, 0x00, 0x64, 0x61, 0x74, 0x61, 0x00, 0x64, 0x61, 0x74, - 0x61, 0x5f, 0x65, 0x6e, 0x64, 0x00, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x65, 0x74, - 0x61, 0x00, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x66, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x00, 0x72, 0x78, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x00, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x66, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x00, 0x5f, 0x5f, 0x75, 0x33, 0x32, 0x00, 0x75, 0x6e, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x00, 0x63, 0x74, 0x78, - 0x00, 0x69, 0x6e, 0x74, 0x00, 0x78, 0x64, 0x70, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x00, - 0x78, 0x64, 0x70, 0x2f, 0x70, 0x61, 0x73, 0x73, 0x00, 0x2f, 0x68, 0x6f, 0x6d, 0x65, - 0x2f, 0x64, 0x61, 0x76, 0x65, 0x2f, 0x64, 0x65, 0x76, 0x2f, 0x62, 0x70, 0x66, 0x64, - 0x2f, 0x62, 0x70, 0x66, 0x2f, 0x78, 0x64, 0x70, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x2e, - 0x62, 0x70, 0x66, 0x2e, 0x63, 0x00, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, - 0x72, 0x6e, 0x20, 0x58, 0x44, 0x50, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x3b, 0x00, 0x63, - 0x68, 0x61, 0x72, 0x00, 0x5f, 0x5f, 0x41, 0x52, 0x52, 0x41, 0x59, 0x5f, 0x53, 0x49, - 0x5a, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x5f, 0x00, 0x5f, 0x6c, 0x69, 0x63, - 0x65, 0x6e, 0x73, 0x65, 0x00, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x00, - ]; + let data: &[u8] = if cfg!(target_endian = "little") { + &[ + 0x9f, 0xeb, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x01, + 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x04, 0x18, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x30, 0x00, + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x04, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, + 0x00, 0x0d, 0x06, 0x00, 0x00, 0x00, 0x61, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, + 0x00, 0x01, 0x69, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0c, 0x05, 0x00, 0x00, 0x00, + 0xb7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xbc, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, + 0xd0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, + 0x00, 0x00, 0xd9, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x78, + 0x64, 0x70, 0x5f, 0x6d, 0x64, 0x00, 0x64, 0x61, 0x74, 0x61, 0x00, 0x64, 0x61, 0x74, + 0x61, 0x5f, 0x65, 0x6e, 0x64, 0x00, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x65, 0x74, + 0x61, 0x00, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x66, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x00, 0x72, 0x78, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x00, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x66, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x00, 0x5f, 0x5f, 0x75, 0x33, 0x32, 0x00, 0x75, 0x6e, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x00, 0x63, 0x74, 0x78, + 0x00, 0x69, 0x6e, 0x74, 0x00, 0x78, 0x64, 0x70, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x00, + 0x78, 0x64, 0x70, 0x2f, 0x70, 0x61, 0x73, 0x73, 0x00, 0x2f, 0x68, 0x6f, 0x6d, 0x65, + 0x2f, 0x64, 0x61, 0x76, 0x65, 0x2f, 0x64, 0x65, 0x76, 0x2f, 0x62, 0x70, 0x66, 0x64, + 0x2f, 0x62, 0x70, 0x66, 0x2f, 0x78, 0x64, 0x70, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x2e, + 0x62, 0x70, 0x66, 0x2e, 0x63, 0x00, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, + 0x72, 0x6e, 0x20, 0x58, 0x44, 0x50, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x3b, 0x00, 0x63, + 0x68, 0x61, 0x72, 0x00, 0x5f, 0x5f, 0x41, 0x52, 0x52, 0x41, 0x59, 0x5f, 0x53, 0x49, + 0x5a, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x5f, 0x00, 0x5f, 0x6c, 0x69, 0x63, + 0x65, 0x6e, 0x73, 0x65, 0x00, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x00, + ] + } else { + &[ + 0xeb, 0x9f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x0c, 0x00, 0x00, 0x01, 0x0c, 0x00, 0x00, 0x00, 0xe1, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x20, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x3f, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x4e, 0x08, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x54, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x61, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x65, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, + 0x00, 0x20, 0x00, 0x00, 0x00, 0x69, 0x0c, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, + 0x00, 0x00, 0x00, 0xb7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, + 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, + 0x00, 0xbc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, + 0x00, 0x00, 0x00, 0xd0, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0xd9, 0x0f, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x78, + 0x64, 0x70, 0x5f, 0x6d, 0x64, 0x00, 0x64, 0x61, 0x74, 0x61, 0x00, 0x64, 0x61, 0x74, + 0x61, 0x5f, 0x65, 0x6e, 0x64, 0x00, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x65, 0x74, + 0x61, 0x00, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x66, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x00, 0x72, 0x78, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x00, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x66, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x00, 0x5f, 0x5f, 0x75, 0x33, 0x32, 0x00, 0x75, 0x6e, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x00, 0x63, 0x74, 0x78, + 0x00, 0x69, 0x6e, 0x74, 0x00, 0x78, 0x64, 0x70, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x00, + 0x78, 0x64, 0x70, 0x2f, 0x70, 0x61, 0x73, 0x73, 0x00, 0x2f, 0x68, 0x6f, 0x6d, 0x65, + 0x2f, 0x64, 0x61, 0x76, 0x65, 0x2f, 0x64, 0x65, 0x76, 0x2f, 0x62, 0x70, 0x66, 0x64, + 0x2f, 0x62, 0x70, 0x66, 0x2f, 0x78, 0x64, 0x70, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x2e, + 0x62, 0x70, 0x66, 0x2e, 0x63, 0x00, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, + 0x72, 0x6e, 0x20, 0x58, 0x44, 0x50, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x3b, 0x00, 0x63, + 0x68, 0x61, 0x72, 0x00, 0x5f, 0x5f, 0x41, 0x52, 0x52, 0x41, 0x59, 0x5f, 0x53, 0x49, + 0x5a, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x5f, 0x00, 0x5f, 0x6c, 0x69, 0x63, + 0x65, 0x6e, 0x73, 0x65, 0x00, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x00, + ] + }; assert_eq!(data.len(), 517); - let btf = Btf::parse(data, Endianness::default()).unwrap_or_else(|e| panic!("{}", e)); + let btf = Btf::parse(data, Endianness::default()).unwrap(); let data2 = btf.to_bytes(); assert_eq!(data2.len(), 517); assert_eq!(data, data2); - let ext_data: &[u8] = &[ - 0x9f, 0xeb, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, - 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x72, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7b, 0x00, - 0x00, 0x00, 0xa2, 0x00, 0x00, 0x00, 0x05, 0x2c, 0x00, 0x00, - ]; + const FUNC_LEN: u32 = 0x14; + const LINE_INFO_LEN: u32 = 0x1c; + const CORE_RELO_LEN: u32 = 0; + const DATA_LEN: u32 = (FUNC_LEN + LINE_INFO_LEN + CORE_RELO_LEN) / 4; + struct TestStruct { + _header: btf_ext_header, + _data: [u32; DATA_LEN as usize], + } + let test_data = TestStruct { + _header: btf_ext_header { + magic: 0xeb9f, + version: 1, + flags: 0, + hdr_len: 0x20, + func_info_off: 0, + func_info_len: FUNC_LEN, + line_info_off: FUNC_LEN, + line_info_len: LINE_INFO_LEN, + core_relo_off: FUNC_LEN + LINE_INFO_LEN, + core_relo_len: CORE_RELO_LEN, + }, + _data: [ + 0x00000008u32, + 0x00000072u32, + 0x00000001u32, + 0x00000000u32, + 0x00000007u32, + 0x00000010u32, + 0x00000072u32, + 0x00000001u32, + 0x00000000u32, + 0x0000007bu32, + 0x000000a2u32, + 0x00002c05u32, + ], + }; + let ext_data = unsafe { bytes_of::(&test_data).to_vec() }; assert_eq!(ext_data.len(), 80); - let _: BtfExt = BtfExt::parse(ext_data, Endianness::default(), &btf) - .unwrap_or_else(|e| panic!("{}", e)); + let _: BtfExt = BtfExt::parse(&ext_data, Endianness::default(), &btf).unwrap(); } #[test] fn parsing_older_ext_data() { - let btf_data = [ - 159, 235, 1, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, - ]; - let btf_ext_data = [ - 159, 235, 1, 0, 24, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 8, 0, 0, - 0, 16, 0, 0, 0, - ]; + const TYPE_LEN: u32 = 0; + const STR_LEN: u32 = 1; + struct BtfTestStruct { + _header: btf_header, + _data: [u8; (TYPE_LEN + STR_LEN) as usize], + } + let btf_test_data = BtfTestStruct { + _header: btf_header { + magic: 0xeb9f, + version: 0x01, + flags: 0x00, + hdr_len: 24, + type_off: 0, + type_len: TYPE_LEN, + str_off: TYPE_LEN, + str_len: TYPE_LEN + STR_LEN, + }, + _data: [0x00u8], + }; + let btf_data = unsafe { bytes_of::(&btf_test_data).to_vec() }; + + const FUNC_INFO_LEN: u32 = 4; + const LINE_INFO_LEN: u32 = 4; + const CORE_RELO_LEN: u32 = 16; + let ext_header = btf_ext_header { + magic: 0xeb9f, + version: 1, + flags: 0, + hdr_len: 24, + func_info_off: 0, + func_info_len: FUNC_INFO_LEN, + line_info_off: FUNC_INFO_LEN, + line_info_len: LINE_INFO_LEN, + core_relo_off: FUNC_INFO_LEN + LINE_INFO_LEN, + core_relo_len: CORE_RELO_LEN, + }; + let btf_ext_data = unsafe { bytes_of::(&ext_header).to_vec() }; + let btf = Btf::parse(&btf_data, Endianness::default()).unwrap(); let btf_ext = BtfExt::parse(&btf_ext_data, Endianness::default(), &btf).unwrap(); assert_eq!(btf_ext.func_info_rec_size(), 8); @@ -1217,7 +1412,7 @@ mod tests { let btf_bytes = btf.to_bytes(); let raw_btf = btf_bytes.as_slice(); - let btf = Btf::parse(raw_btf, Endianness::default()).unwrap_or_else(|e| panic!("{}", e)); + let btf = Btf::parse(raw_btf, Endianness::default()).unwrap(); assert_eq!(btf.string_at(1).unwrap(), "int"); assert_eq!(btf.string_at(5).unwrap(), "widget"); } @@ -1704,6 +1899,10 @@ mod tests { #[test] #[cfg(feature = "std")] #[cfg_attr(miri, ignore = "`open` not available when isolation is enabled")] + #[cfg_attr( + target_endian = "big", + ignore = "Not possible to emulate \"/sys/kernel/btf/vmlinux\" as big endian" + )] fn test_read_btf_from_sys_fs() { let btf = Btf::parse_file("/sys/kernel/btf/vmlinux", Endianness::default()).unwrap(); let task_struct_id = btf diff --git a/aya-obj/src/btf/info.rs b/aya-obj/src/btf/info.rs index aa5a025f..97b43050 100644 --- a/aya-obj/src/btf/info.rs +++ b/aya-obj/src/btf/info.rs @@ -1,12 +1,12 @@ use alloc::{string::String, vec, vec::Vec}; -use bytes::BufMut; +use bytes::BufMut as _; use object::Endianness; use crate::{ generated::{bpf_func_info, bpf_line_info}, relocation::INS_SIZE, - util::{bytes_of, HashMap}, + util::{HashMap, bytes_of}, }; /* The func_info subsection layout: @@ -41,7 +41,7 @@ impl FuncSecInfo { rec_size: usize, func_info_data: &[u8], endianness: Endianness, - ) -> FuncSecInfo { + ) -> Self { let func_info = func_info_data .chunks(rec_size) .map(|data| { @@ -65,7 +65,7 @@ impl FuncSecInfo { }) .collect(); - FuncSecInfo { + Self { _sec_name_offset: sec_name_offset, num_info, func_info, @@ -83,6 +83,7 @@ impl FuncSecInfo { } /// Returns the number of [bpf_func_info] entries. + #[expect(clippy::len_without_is_empty)] pub fn len(&self) -> usize { self.func_info.len() } @@ -100,8 +101,8 @@ pub struct FuncInfo { } impl FuncInfo { - pub(crate) fn new() -> FuncInfo { - FuncInfo { + pub(crate) fn new() -> Self { + Self { data: HashMap::new(), } } @@ -137,7 +138,7 @@ impl LineSecInfo { rec_size: usize, func_info_data: &[u8], endianness: Endianness, - ) -> LineSecInfo { + ) -> Self { let line_info = func_info_data .chunks(rec_size) .map(|data| { @@ -170,7 +171,7 @@ impl LineSecInfo { }) .collect(); - LineSecInfo { + Self { _sec_name_offset: sec_name_offset, num_info, line_info, @@ -188,6 +189,7 @@ impl LineSecInfo { } /// Returns the number of entries. + #[expect(clippy::len_without_is_empty)] pub fn len(&self) -> usize { self.line_info.len() } @@ -199,8 +201,8 @@ pub(crate) struct LineInfo { } impl LineInfo { - pub(crate) fn new() -> LineInfo { - LineInfo { + pub(crate) fn new() -> Self { + Self { data: HashMap::new(), } } diff --git a/aya-obj/src/btf/mod.rs b/aya-obj/src/btf/mod.rs index a5606e5e..a5faf817 100644 --- a/aya-obj/src/btf/mod.rs +++ b/aya-obj/src/btf/mod.rs @@ -1,6 +1,6 @@ //! BTF loading, parsing and relocation. -#[allow(clippy::module_inception)] +#[expect(clippy::module_inception)] mod btf; mod info; mod relocation; diff --git a/aya-obj/src/btf/relocation.rs b/aya-obj/src/btf/relocation.rs index c9412c79..334a5f77 100644 --- a/aya-obj/src/btf/relocation.rs +++ b/aya-obj/src/btf/relocation.rs @@ -2,7 +2,7 @@ use alloc::{ borrow::{Cow, ToOwned as _}, collections::BTreeMap, format, - string::{String, ToString}, + string::{String, ToString as _}, vec, vec::Vec, }; @@ -10,19 +10,17 @@ use core::{mem, ops::Bound::Included, ptr}; use object::SectionIndex; -#[cfg(not(feature = "std"))] -use crate::std; use crate::{ + Function, Object, btf::{ - fields_are_compatible, types_are_compatible, Array, Btf, BtfError, BtfMember, BtfType, - IntEncoding, Struct, Union, MAX_SPEC_LEN, + Array, Btf, BtfError, BtfKind, BtfMember, BtfType, IntEncoding, MAX_SPEC_LEN, Struct, + Union, fields_are_compatible, types_are_compatible, }, generated::{ - bpf_core_relo, bpf_core_relo_kind::*, bpf_insn, BPF_ALU, BPF_ALU64, BPF_B, BPF_CALL, - BPF_DW, BPF_H, BPF_JMP, BPF_K, BPF_LD, BPF_LDX, BPF_ST, BPF_STX, BPF_W, BTF_INT_SIGNED, + BPF_ALU, BPF_ALU64, BPF_B, BPF_CALL, BPF_DW, BPF_H, BPF_JMP, BPF_K, BPF_LD, BPF_LDX, + BPF_ST, BPF_STX, BPF_W, BTF_INT_SIGNED, bpf_core_relo, bpf_core_relo_kind::*, bpf_insn, }, util::HashMap, - Function, Object, }; /// The error type returned by [`Object::relocate_btf`]. @@ -60,7 +58,9 @@ enum RelocationError { }, /// Invalid instruction index referenced by relocation - #[error("invalid instruction index #{index} referenced by relocation #{relocation_number}, the program contains {num_instructions} instructions")] + #[error( + "invalid instruction index #{index} referenced by relocation #{relocation_number}, the program contains {num_instructions} instructions" + )] InvalidInstructionIndex { /// The invalid instruction index index: usize, @@ -71,7 +71,9 @@ enum RelocationError { }, /// Multiple candidate target types found with different memory layouts - #[error("error relocating {type_name}, multiple candidate target types found with different memory layouts: {candidates:?}")] + #[error( + "error relocating {type_name}, multiple candidate target types found with different memory layouts: {candidates:?}" + )] ConflictingCandidates { /// The type name type_name: String, @@ -129,7 +131,9 @@ enum RelocationError { error: Cow<'static, str>, }, - #[error("applying relocation `{kind:?}` missing target BTF info for type `{type_id}` at instruction #{ins_index}")] + #[error( + "applying relocation `{kind:?}` missing target BTF info for type `{type_id}` at instruction #{ins_index}" + )] MissingTargetDefinition { kind: RelocationKind, type_id: u32, @@ -196,15 +200,14 @@ pub(crate) struct Relocation { } impl Relocation { - #[allow(unused_unsafe)] - pub(crate) unsafe fn parse(data: &[u8], number: usize) -> Result { + pub(crate) unsafe fn parse(data: &[u8], number: usize) -> Result { if mem::size_of::() > data.len() { return Err(BtfError::InvalidRelocationInfo); } - let rel = unsafe { ptr::read_unaligned::(data.as_ptr() as *const _) }; + let rel = unsafe { ptr::read_unaligned::(data.as_ptr().cast()) }; - Ok(Relocation { + Ok(Self { kind: rel.kind.try_into()?, ins_offset: rel.insn_off as usize, type_id: rel.type_id, @@ -222,7 +225,7 @@ impl Object { _ => return Ok(()), }; - let mut candidates_cache = HashMap::>::new(); + let mut candidates_cache = HashMap::>>::new(); for (sec_name_off, relos) in btf_ext.relocations() { let section_name = local_btf @@ -248,12 +251,12 @@ impl Object { target_btf, &mut candidates_cache, ) { - Ok(_) => {} + Ok(()) => {} Err(error) => { return Err(BtfRelocationError { section: section_name.to_string(), error, - }) + }); } } } @@ -406,10 +409,26 @@ fn find_candidates<'target>( ) -> Result>, BtfError> { let mut candidates = Vec::new(); let local_name = flavorless_name(local_name); - for (type_id, ty) in target_btf.types().enumerate() { - if local_ty.kind() != ty.kind() { - continue; - } + let local_kind = local_ty.kind(); + + // When we downgrade an ENUM64 to a UNION we still want to match the enum + // definition recorded in the target BTF. If the sanitized type has a + // fallback, allow ENUM64 candidates through the kind check. + // + // Note that we do not sanitize the target BTF so the kinds will not + // naturally match! + let allow_enum_match = matches!( + local_ty, + BtfType::Union(Union { + enum64_fallback: Some(_), + .. + }) + ); + + for (type_id, ty) in target_btf.types().enumerate().filter(|(_, ty)| { + let candidate_kind = ty.kind(); + candidate_kind == local_kind || (allow_enum_match && candidate_kind == BtfKind::Enum64) + }) { let name = &*target_btf.type_name(ty)?; if local_name != flavorless_name(name) { continue; @@ -427,8 +446,8 @@ fn find_candidates<'target>( } fn match_candidate<'target>( - local_spec: &AccessSpec, - candidate: &'target Candidate, + local_spec: &AccessSpec<'_>, + candidate: &'target Candidate<'_>, ) -> Result>, RelocationError> { let mut target_spec = AccessSpec { btf: candidate.btf, @@ -457,18 +476,12 @@ fn match_candidate<'target>( } RelocationKind::EnumVariantExists | RelocationKind::EnumVariantValue => { let target_id = candidate.btf.resolve_type(candidate.type_id)?; - let target_ty = candidate.btf.type_by_id(target_id)?; - // the first accessor is guaranteed to have a name by construction - let local_variant_name = local_spec.accessors[0].name.as_ref().unwrap(); - - fn match_enum<'a>( - iterator: impl Iterator, - candidate: &Candidate, - local_variant_name: &str, - target_id: u32, - mut target_spec: AccessSpec<'a>, - ) -> Result>, RelocationError> { - for (index, name_offset) in iterator { + + let match_enum = |iterator: &mut dyn Iterator| { + // the first accessor is guaranteed to have a name by construction + let local_variant_name = local_spec.accessors[0].name.as_ref().unwrap(); + + for (index, name_offset) in iterator.enumerate() { let target_variant_name = candidate.btf.string_at(name_offset)?; if flavorless_name(local_variant_name) == flavorless_name(&target_variant_name) { @@ -482,29 +495,23 @@ fn match_candidate<'target>( } } Ok(None) - } + }; - match target_ty { - BtfType::Enum(en) => match_enum( - en.variants - .iter() - .map(|member| member.name_offset) - .enumerate(), - candidate, - local_variant_name, - target_id, - target_spec, - ), - BtfType::Enum64(en) => match_enum( - en.variants - .iter() - .map(|member| member.name_offset) - .enumerate(), - candidate, - local_variant_name, - target_id, - target_spec, - ), + match candidate.btf.type_by_id(target_id)? { + BtfType::Enum(en) => { + match_enum(&mut en.variants.iter().map(|member| member.name_offset)) + } + BtfType::Enum64(en) => { + match_enum(&mut en.variants.iter().map(|member| member.name_offset)) + } + BtfType::Union(Union { + enum64_fallback: Some(fallback), + .. + }) => { + // Local ENUM64 types become UNIONs during sanitisation; the fallback retains + // their original variant names so we can line them up with target enums. + match_enum(&mut fallback.variants.iter().map(|variant| variant.name_offset)) + } _ => Ok(None), } } @@ -669,7 +676,7 @@ impl<'a> AccessSpec<'a> { root_type_id: u32, spec: &str, relocation: Relocation, - ) -> Result, RelocationError> { + ) -> Result { let parts = spec .split(':') .map(|s| s.parse::()) @@ -700,60 +707,75 @@ impl<'a> AccessSpec<'a> { bit_offset: 0, } } - RelocationKind::EnumVariantExists | RelocationKind::EnumVariantValue => match ty { - BtfType::Enum(_) | BtfType::Enum64(_) => { - if parts.len() != 1 { - return Err(RelocationError::InvalidAccessString { - access_str: spec.to_string(), - }); - } - let index = parts[0]; + RelocationKind::EnumVariantExists | RelocationKind::EnumVariantValue => { + let index = || match parts.as_slice() { + [index] => Ok(*index), + _ => Err(RelocationError::InvalidAccessString { + access_str: spec.to_string(), + }), + }; - let (n_variants, name_offset) = match ty { - BtfType::Enum(en) => ( + let (n_variants, name_offset, index) = match ty { + BtfType::Enum(en) => { + let index = index()?; + ( en.variants.len(), en.variants.get(index).map(|v| v.name_offset), - ), - BtfType::Enum64(en) => ( + index, + ) + } + BtfType::Enum64(en) => { + let index = index()?; + ( en.variants.len(), en.variants.get(index).map(|v| v.name_offset), - ), - _ => unreachable!(), - }; - - if name_offset.is_none() { - return Err(RelocationError::InvalidAccessIndex { - type_name: btf.err_type_name(ty), - spec: spec.to_string(), index, - max_index: n_variants, - error: "tried to access nonexistant enum variant", + ) + } + BtfType::Union(Union { + enum64_fallback: Some(fallback), + .. + }) => { + let index = index()?; + ( + fallback.variants.len(), + fallback.variants.get(index).map(|v| v.name_offset), + index, + ) + } + _ => { + return Err(RelocationError::InvalidRelocationKindForType { + relocation_number: relocation.number, + relocation_kind: format!("{:?}", relocation.kind), + type_kind: format!("{:?}", ty.kind()), + error: "enum relocation on non-enum type", }); } - let accessors = vec![Accessor { - type_id, + }; + let name_offset = + name_offset.ok_or_else(|| RelocationError::InvalidAccessIndex { + type_name: btf.err_type_name(ty), + spec: spec.to_string(), index, - name: Some(btf.string_at(name_offset.unwrap())?.to_string()), - }]; - - AccessSpec { - btf, - root_type_id, - relocation, - parts, - accessors, - bit_offset: 0, - } - } - _ => { - return Err(RelocationError::InvalidRelocationKindForType { - relocation_number: relocation.number, - relocation_kind: format!("{:?}", relocation.kind), - type_kind: format!("{:?}", ty.kind()), - error: "enum relocation on non-enum type", - }) + max_index: n_variants, + error: "tried to access nonexistant enum variant", + })?; + let name = btf.string_at(name_offset)?; + let accessors = vec![Accessor { + type_id, + index, + name: Some(name.to_string()), + }]; + + AccessSpec { + btf, + root_type_id, + relocation, + parts, + accessors, + bit_offset: 0, } - }, + } RelocationKind::FieldByteOffset | RelocationKind::FieldByteSize @@ -874,7 +896,7 @@ struct ComputedRelocation { target: Option, } -#[derive(Debug)] +#[derive(Clone, Copy, Debug)] struct ComputedRelocationValue { value: u64, size: u32, @@ -892,21 +914,21 @@ fn poison_insn(ins: &mut bpf_insn) { impl ComputedRelocation { fn new( rel: &Relocation, - local_spec: &AccessSpec, - target_spec: Option<&AccessSpec>, - ) -> Result { + local_spec: &AccessSpec<'_>, + target_spec: Option<&AccessSpec<'_>>, + ) -> Result { use RelocationKind::*; let ret = match rel.kind { FieldByteOffset | FieldByteSize | FieldExists | FieldSigned | FieldLShift64 - | FieldRShift64 => ComputedRelocation { + | FieldRShift64 => Self { local: Self::compute_field_relocation(rel, Some(local_spec))?, target: Self::compute_field_relocation(rel, target_spec).ok(), }, - TypeIdLocal | TypeIdTarget | TypeExists | TypeSize => ComputedRelocation { + TypeIdLocal | TypeIdTarget | TypeExists | TypeSize => Self { local: Self::compute_type_relocation(rel, local_spec, target_spec)?, target: Self::compute_type_relocation(rel, local_spec, target_spec).ok(), }, - EnumVariantExists | EnumVariantValue => ComputedRelocation { + EnumVariantExists | EnumVariantValue => Self { local: Self::compute_enum_relocation(rel, Some(local_spec))?, target: Self::compute_enum_relocation(rel, target_spec).ok(), }, @@ -956,7 +978,7 @@ impl ComputedRelocation { return Ok(()); }; - let class = (ins.code & 0x07) as u32; + let class = u32::from(ins.code & 0x07); let target_value = target.value; @@ -1006,7 +1028,7 @@ impl ComputedRelocation { target.size, ) .into(), - }) + }); } } @@ -1020,7 +1042,7 @@ impl ComputedRelocation { relocation_number: rel.number, index: ins_index, error: format!("invalid target size {size}").into(), - }) + }); } } as u8; ins.code = ins.code & 0xE0 | size | ins.code & 0x07; @@ -1043,7 +1065,7 @@ impl ComputedRelocation { relocation_number: rel.number, index: ins_index, error: format!("invalid instruction class {class:x}").into(), - }) + }); } }; @@ -1052,11 +1074,11 @@ impl ComputedRelocation { fn compute_enum_relocation( rel: &Relocation, - spec: Option<&AccessSpec>, + spec: Option<&AccessSpec<'_>>, ) -> Result { use RelocationKind::*; let value = match (rel.kind, spec) { - (EnumVariantExists, spec) => spec.is_some() as u64, + (EnumVariantExists, spec) => u64::from(spec.is_some()), (EnumVariantValue, Some(spec)) => { let accessor = &spec.accessors[0]; match spec.btf.type_by_id(accessor.type_id)? { @@ -1065,12 +1087,23 @@ impl ComputedRelocation { if en.is_signed() { value as i32 as u64 } else { - value as u64 + u64::from(value) } } BtfType::Enum64(en) => { let variant = &en.variants[accessor.index]; - (variant.value_high as u64) << 32 | variant.value_low as u64 + (u64::from(variant.value_high) << 32) | u64::from(variant.value_low) + } + BtfType::Union(Union { + enum64_fallback: Some(fallback), + .. + }) => { + let variant = &fallback.variants[accessor.index]; + if fallback.signed { + (variant.value as i64) as u64 + } else { + variant.value + } } // candidate selection ensures that rel_kind == local_kind == target_kind _ => unreachable!(), @@ -1094,7 +1127,7 @@ impl ComputedRelocation { fn compute_field_relocation( rel: &Relocation, - spec: Option<&AccessSpec>, + spec: Option<&AccessSpec<'_>>, ) -> Result { use RelocationKind::*; @@ -1102,7 +1135,7 @@ impl ComputedRelocation { // this is the bpf_preserve_field_info(member_access, FIELD_EXISTENCE) case. If we // managed to build a spec, it means the field exists. return Ok(ComputedRelocationValue { - value: spec.is_some() as u64, + value: u64::from(spec.is_some()), size: 0, type_id: None, }); @@ -1191,34 +1224,32 @@ impl ComputedRelocation { type_id: None, }; - #[allow(clippy::wildcard_in_or_patterns)] match rel.kind { FieldByteOffset => { - value.value = byte_off as u64; + value.value = u64::from(byte_off); if !is_bitfield { value.size = byte_size; value.type_id = Some(member_type_id); } } FieldByteSize => { - value.value = byte_size as u64; + value.value = u64::from(byte_size); } FieldSigned => match member_ty { - BtfType::Enum(en) => value.value = en.is_signed() as u64, - BtfType::Enum64(en) => value.value = en.is_signed() as u64, + BtfType::Enum(en) => value.value = u64::from(en.is_signed()), + BtfType::Enum64(en) => value.value = u64::from(en.is_signed()), BtfType::Int(i) => value.value = i.encoding() as u64 & IntEncoding::Signed as u64, _ => (), }, - #[cfg(target_endian = "little")] FieldLShift64 => { - value.value = 64 - (bit_off + bit_size - byte_off * 8) as u64; - } - #[cfg(target_endian = "big")] - FieldLShift64 => { - value.value = (8 - byte_size) * 8 + (bit_off - byte_off * 8); + value.value = if cfg!(target_endian = "little") { + 64 - u64::from(bit_off + bit_size - byte_off * 8) + } else { + u64::from((8 - byte_size) * 8 + (bit_off - byte_off * 8)) + } } FieldRShift64 => { - value.value = 64 - bit_size as u64; + value.value = 64 - u64::from(bit_size); } kind @ (FieldExists | TypeIdLocal | TypeIdTarget | TypeExists | TypeSize | EnumVariantExists | EnumVariantValue) => { @@ -1231,15 +1262,15 @@ impl ComputedRelocation { fn compute_type_relocation( rel: &Relocation, - local_spec: &AccessSpec, - target_spec: Option<&AccessSpec>, + local_spec: &AccessSpec<'_>, + target_spec: Option<&AccessSpec<'_>>, ) -> Result { use RelocationKind::*; let value = match (rel.kind, target_spec) { - (TypeIdLocal, _) => local_spec.root_type_id as u64, - (TypeIdTarget, Some(target_spec)) => target_spec.root_type_id as u64, - (TypeExists, target_spec) => target_spec.is_some() as u64, + (TypeIdLocal, _) => u64::from(local_spec.root_type_id), + (TypeIdTarget, Some(target_spec)) => u64::from(target_spec.root_type_id), + (TypeExists, target_spec) => u64::from(target_spec.is_some()), (TypeSize, Some(target_spec)) => { target_spec.btf.type_size(target_spec.root_type_id)? as u64 } diff --git a/aya-obj/src/btf/types.rs b/aya-obj/src/btf/types.rs index 89b1713b..13226bc0 100644 --- a/aya-obj/src/btf/types.rs +++ b/aya-obj/src/btf/types.rs @@ -1,6 +1,6 @@ -#![allow(missing_docs)] +#![expect(missing_docs)] -use alloc::{string::ToString, vec, vec::Vec}; +use alloc::{string::ToString as _, vec, vec::Vec}; use core::{fmt::Display, mem, ptr}; use object::Endianness; @@ -41,7 +41,7 @@ pub struct Fwd { impl Fwd { pub(crate) fn to_bytes(&self) -> Vec { - bytes_of::(self).to_vec() + bytes_of::(self).to_vec() } pub(crate) fn kind(&self) -> BtfKind { @@ -63,7 +63,7 @@ pub struct Const { impl Const { pub(crate) fn to_bytes(&self) -> Vec { - bytes_of::(self).to_vec() + bytes_of::(self).to_vec() } pub(crate) fn kind(&self) -> BtfKind { @@ -94,7 +94,7 @@ pub struct Volatile { impl Volatile { pub(crate) fn to_bytes(&self) -> Vec { - bytes_of::(self).to_vec() + bytes_of::(self).to_vec() } pub(crate) fn kind(&self) -> BtfKind { @@ -115,7 +115,7 @@ pub struct Restrict { impl Restrict { pub(crate) fn to_bytes(&self) -> Vec { - bytes_of::(self).to_vec() + bytes_of::(self).to_vec() } pub(crate) fn kind(&self) -> BtfKind { @@ -239,10 +239,10 @@ pub enum FuncLinkage { impl From for FuncLinkage { fn from(v: u32) -> Self { match v { - 0 => FuncLinkage::Static, - 1 => FuncLinkage::Global, - 2 => FuncLinkage::Extern, - _ => FuncLinkage::Unknown, + 0 => Self::Static, + 1 => Self::Global, + 2 => Self::Extern, + _ => Self::Unknown, } } } @@ -322,11 +322,11 @@ pub enum IntEncoding { impl From for IntEncoding { fn from(v: u32) -> Self { match v { - 0 => IntEncoding::None, - 1 => IntEncoding::Signed, - 2 => IntEncoding::Char, - 4 => IntEncoding::Bool, - _ => IntEncoding::Unknown, + 0 => Self::None, + 1 => Self::Signed, + 2 => Self::Char, + 4 => Self::Bool, + _ => Self::Unknown, } } } @@ -473,7 +473,7 @@ impl Enum { } #[repr(C)] -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Copy)] pub struct BtfEnum64 { pub(crate) name_offset: u32, pub(crate) value_low: u32, @@ -549,7 +549,7 @@ impl Enum64 { info |= 1 << 31 }; info |= (variants.len() as u32) & 0xFFFF; - Enum64 { + Self { name_offset, info, // According to the documentation: @@ -651,6 +651,22 @@ impl Struct { } } +/// Snapshot of a single `ENUM64` variant so we can recover its 64-bit constant +/// after the type is rewritten into a UNION. +#[derive(Clone, Debug)] +pub(crate) struct Enum64VariantFallback { + pub(crate) name_offset: u32, + pub(crate) value: u64, +} + +/// Aggregate of the metadata we need to faithfully reconstruct a downgraded +/// `ENUM64` during CO-RE relocation. +#[derive(Clone, Debug)] +pub(crate) struct Enum64Fallback { + pub(crate) signed: bool, + pub(crate) variants: Vec, +} + #[repr(C)] #[derive(Clone, Debug)] pub struct Union { @@ -658,16 +674,24 @@ pub struct Union { info: u32, pub(crate) size: u32, pub(crate) members: Vec, + pub(crate) enum64_fallback: Option, } impl Union { - pub(crate) fn new(name_offset: u32, size: u32, members: Vec) -> Self { - let info = (BtfKind::Union as u32) << 24; + pub(crate) fn new( + name_offset: u32, + size: u32, + members: Vec, + enum64_fallback: Option, + ) -> Self { + let mut info = (BtfKind::Union as u32) << 24; + info |= (members.len() as u32) & 0xFFFF; Self { name_offset, info, size, members, + enum64_fallback, } } @@ -677,6 +701,7 @@ impl Union { info, size, members, + enum64_fallback: _, } = self; [ bytes_of::(name_offset), @@ -860,10 +885,10 @@ pub enum VarLinkage { impl From for VarLinkage { fn from(v: u32) -> Self { match v { - 0 => VarLinkage::Static, - 1 => VarLinkage::Global, - 2 => VarLinkage::Extern, - _ => VarLinkage::Unknown, + 0 => Self::Static, + 1 => Self::Global, + 2 => Self::Extern, + _ => Self::Unknown, } } } @@ -1087,26 +1112,26 @@ impl TryFrom for BtfKind { impl Display for BtfKind { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { match self { - BtfKind::Unknown => write!(f, "[UNKNOWN]"), - BtfKind::Int => write!(f, "[INT]"), - BtfKind::Float => write!(f, "[FLOAT]"), - BtfKind::Ptr => write!(f, "[PTR]"), - BtfKind::Array => write!(f, "[ARRAY]"), - BtfKind::Struct => write!(f, "[STRUCT]"), - BtfKind::Union => write!(f, "[UNION]"), - BtfKind::Enum => write!(f, "[ENUM]"), - BtfKind::Fwd => write!(f, "[FWD]"), - BtfKind::Typedef => write!(f, "[TYPEDEF]"), - BtfKind::Volatile => write!(f, "[VOLATILE]"), - BtfKind::Const => write!(f, "[CONST]"), - BtfKind::Restrict => write!(f, "[RESTRICT]"), - BtfKind::Func => write!(f, "[FUNC]"), - BtfKind::FuncProto => write!(f, "[FUNC_PROTO]"), - BtfKind::Var => write!(f, "[VAR]"), - BtfKind::DataSec => write!(f, "[DATASEC]"), - BtfKind::DeclTag => write!(f, "[DECL_TAG]"), - BtfKind::TypeTag => write!(f, "[TYPE_TAG]"), - BtfKind::Enum64 => write!(f, "[ENUM64]"), + Self::Unknown => write!(f, "[UNKNOWN]"), + Self::Int => write!(f, "[INT]"), + Self::Float => write!(f, "[FLOAT]"), + Self::Ptr => write!(f, "[PTR]"), + Self::Array => write!(f, "[ARRAY]"), + Self::Struct => write!(f, "[STRUCT]"), + Self::Union => write!(f, "[UNION]"), + Self::Enum => write!(f, "[ENUM]"), + Self::Fwd => write!(f, "[FWD]"), + Self::Typedef => write!(f, "[TYPEDEF]"), + Self::Volatile => write!(f, "[VOLATILE]"), + Self::Const => write!(f, "[CONST]"), + Self::Restrict => write!(f, "[RESTRICT]"), + Self::Func => write!(f, "[FUNC]"), + Self::FuncProto => write!(f, "[FUNC_PROTO]"), + Self::Var => write!(f, "[VAR]"), + Self::DataSec => write!(f, "[DATASEC]"), + Self::DeclTag => write!(f, "[DECL_TAG]"), + Self::TypeTag => write!(f, "[TYPE_TAG]"), + Self::Enum64 => write!(f, "[ENUM64]"), } } } @@ -1116,7 +1141,7 @@ unsafe fn read(data: &[u8]) -> Result { return Err(BtfError::InvalidTypeInfo); } - Ok(ptr::read_unaligned::(data.as_ptr() as *const T)) + Ok(unsafe { ptr::read_unaligned(data.as_ptr().cast()) }) } unsafe fn read_array(data: &[u8], len: usize) -> Result, BtfError> { @@ -1126,50 +1151,49 @@ unsafe fn read_array(data: &[u8], len: usize) -> Result, BtfError> { let data = &data[0..mem::size_of::() * len]; let r = data .chunks(mem::size_of::()) - .map(|chunk| ptr::read_unaligned(chunk.as_ptr() as *const T)) + .map(|chunk| unsafe { ptr::read_unaligned(chunk.as_ptr().cast()) }) .collect(); Ok(r) } impl BtfType { - #[allow(unused_unsafe)] - pub(crate) unsafe fn read(data: &[u8], endianness: Endianness) -> Result { + pub(crate) unsafe fn read(data: &[u8], endianness: Endianness) -> Result { let ty = unsafe { read_array::(data, 3)? }; let data = &data[mem::size_of::() * 3..]; let vlen = type_vlen(ty[1]); Ok(match type_kind(ty[1])? { - BtfKind::Unknown => BtfType::Unknown, - BtfKind::Fwd => BtfType::Fwd(Fwd { + BtfKind::Unknown => Self::Unknown, + BtfKind::Fwd => Self::Fwd(Fwd { name_offset: ty[0], info: ty[1], _unused: 0, }), - BtfKind::Const => BtfType::Const(Const { + BtfKind::Const => Self::Const(Const { name_offset: ty[0], info: ty[1], btf_type: ty[2], }), - BtfKind::Volatile => BtfType::Volatile(Volatile { + BtfKind::Volatile => Self::Volatile(Volatile { name_offset: ty[0], info: ty[1], btf_type: ty[2], }), - BtfKind::Restrict => BtfType::Restrict(Restrict { + BtfKind::Restrict => Self::Restrict(Restrict { name_offset: ty[0], _info: ty[1], btf_type: ty[2], }), - BtfKind::Ptr => BtfType::Ptr(Ptr { + BtfKind::Ptr => Self::Ptr(Ptr { name_offset: ty[0], info: ty[1], btf_type: ty[2], }), - BtfKind::Typedef => BtfType::Typedef(Typedef { + BtfKind::Typedef => Self::Typedef(Typedef { name_offset: ty[0], info: ty[1], btf_type: ty[2], }), - BtfKind::Func => BtfType::Func(Func { + BtfKind::Func => Self::Func(Func { name_offset: ty[0], info: ty[1], btf_type: ty[2], @@ -1183,73 +1207,74 @@ impl BtfType { } else { u32::from_be_bytes }; - BtfType::Int(Int { + Self::Int(Int { name_offset: ty[0], info: ty[1], size: ty[2], data: read_u32(data[..mem::size_of::()].try_into().unwrap()), }) } - BtfKind::Float => BtfType::Float(Float { + BtfKind::Float => Self::Float(Float { name_offset: ty[0], info: ty[1], size: ty[2], }), - BtfKind::Enum => BtfType::Enum(Enum { + BtfKind::Enum => Self::Enum(Enum { name_offset: ty[0], info: ty[1], size: ty[2], variants: unsafe { read_array::(data, vlen)? }, }), - BtfKind::Enum64 => BtfType::Enum64(Enum64 { + BtfKind::Enum64 => Self::Enum64(Enum64 { name_offset: ty[0], info: ty[1], size: ty[2], variants: unsafe { read_array::(data, vlen)? }, }), - BtfKind::Array => BtfType::Array(Array { + BtfKind::Array => Self::Array(Array { name_offset: ty[0], info: ty[1], _unused: 0, array: unsafe { read(data)? }, }), - BtfKind::Struct => BtfType::Struct(Struct { + BtfKind::Struct => Self::Struct(Struct { name_offset: ty[0], info: ty[1], size: ty[2], members: unsafe { read_array::(data, vlen)? }, }), - BtfKind::Union => BtfType::Union(Union { + BtfKind::Union => Self::Union(Union { name_offset: ty[0], info: ty[1], size: ty[2], members: unsafe { read_array::(data, vlen)? }, + enum64_fallback: None, }), - BtfKind::FuncProto => BtfType::FuncProto(FuncProto { + BtfKind::FuncProto => Self::FuncProto(FuncProto { name_offset: ty[0], info: ty[1], return_type: ty[2], params: unsafe { read_array::(data, vlen)? }, }), - BtfKind::Var => BtfType::Var(Var { + BtfKind::Var => Self::Var(Var { name_offset: ty[0], info: ty[1], btf_type: ty[2], linkage: unsafe { read(data)? }, }), - BtfKind::DataSec => BtfType::DataSec(DataSec { + BtfKind::DataSec => Self::DataSec(DataSec { name_offset: ty[0], info: ty[1], size: ty[2], entries: unsafe { read_array::(data, vlen)? }, }), - BtfKind::DeclTag => BtfType::DeclTag(DeclTag { + BtfKind::DeclTag => Self::DeclTag(DeclTag { name_offset: ty[0], info: ty[1], btf_type: ty[2], component_index: unsafe { read(data)? }, }), - BtfKind::TypeTag => BtfType::TypeTag(TypeTag { + BtfKind::TypeTag => Self::TypeTag(TypeTag { name_offset: ty[0], info: ty[1], btf_type: ty[2], @@ -1259,163 +1284,163 @@ impl BtfType { pub(crate) fn to_bytes(&self) -> Vec { match self { - BtfType::Unknown => vec![], - BtfType::Fwd(t) => t.to_bytes(), - BtfType::Const(t) => t.to_bytes(), - BtfType::Volatile(t) => t.to_bytes(), - BtfType::Restrict(t) => t.to_bytes(), - BtfType::Ptr(t) => t.to_bytes(), - BtfType::Typedef(t) => t.to_bytes(), - BtfType::Func(t) => t.to_bytes(), - BtfType::Int(t) => t.to_bytes(), - BtfType::Float(t) => t.to_bytes(), - BtfType::Enum(t) => t.to_bytes(), - BtfType::Enum64(t) => t.to_bytes(), - BtfType::Array(t) => t.to_bytes(), - BtfType::Struct(t) => t.to_bytes(), - BtfType::Union(t) => t.to_bytes(), - BtfType::FuncProto(t) => t.to_bytes(), - BtfType::Var(t) => t.to_bytes(), - BtfType::DataSec(t) => t.to_bytes(), - BtfType::DeclTag(t) => t.to_bytes(), - BtfType::TypeTag(t) => t.to_bytes(), + Self::Unknown => vec![], + Self::Fwd(t) => t.to_bytes(), + Self::Const(t) => t.to_bytes(), + Self::Volatile(t) => t.to_bytes(), + Self::Restrict(t) => t.to_bytes(), + Self::Ptr(t) => t.to_bytes(), + Self::Typedef(t) => t.to_bytes(), + Self::Func(t) => t.to_bytes(), + Self::Int(t) => t.to_bytes(), + Self::Float(t) => t.to_bytes(), + Self::Enum(t) => t.to_bytes(), + Self::Enum64(t) => t.to_bytes(), + Self::Array(t) => t.to_bytes(), + Self::Struct(t) => t.to_bytes(), + Self::Union(t) => t.to_bytes(), + Self::FuncProto(t) => t.to_bytes(), + Self::Var(t) => t.to_bytes(), + Self::DataSec(t) => t.to_bytes(), + Self::DeclTag(t) => t.to_bytes(), + Self::TypeTag(t) => t.to_bytes(), } } pub(crate) fn size(&self) -> Option { match self { - BtfType::Int(t) => Some(t.size), - BtfType::Float(t) => Some(t.size), - BtfType::Enum(t) => Some(t.size), - BtfType::Enum64(t) => Some(t.size), - BtfType::Struct(t) => Some(t.size), - BtfType::Union(t) => Some(t.size), - BtfType::DataSec(t) => Some(t.size), - BtfType::Ptr(_) => Some(mem::size_of::<&()>() as u32), + Self::Int(t) => Some(t.size), + Self::Float(t) => Some(t.size), + Self::Enum(t) => Some(t.size), + Self::Enum64(t) => Some(t.size), + Self::Struct(t) => Some(t.size), + Self::Union(t) => Some(t.size), + Self::DataSec(t) => Some(t.size), + Self::Ptr(_) => Some(mem::size_of::<&()>() as u32), _ => None, } } pub(crate) fn btf_type(&self) -> Option { match self { - BtfType::Const(t) => Some(t.btf_type), - BtfType::Volatile(t) => Some(t.btf_type), - BtfType::Restrict(t) => Some(t.btf_type), - BtfType::Ptr(t) => Some(t.btf_type), - BtfType::Typedef(t) => Some(t.btf_type), + Self::Const(t) => Some(t.btf_type), + Self::Volatile(t) => Some(t.btf_type), + Self::Restrict(t) => Some(t.btf_type), + Self::Ptr(t) => Some(t.btf_type), + Self::Typedef(t) => Some(t.btf_type), // FuncProto contains the return type here, and doesn't directly reference another type - BtfType::FuncProto(t) => Some(t.return_type), - BtfType::Var(t) => Some(t.btf_type), - BtfType::DeclTag(t) => Some(t.btf_type), - BtfType::TypeTag(t) => Some(t.btf_type), + Self::FuncProto(t) => Some(t.return_type), + Self::Var(t) => Some(t.btf_type), + Self::DeclTag(t) => Some(t.btf_type), + Self::TypeTag(t) => Some(t.btf_type), _ => None, } } pub(crate) fn type_info_size(&self) -> usize { match self { - BtfType::Unknown => mem::size_of::(), - BtfType::Fwd(t) => t.type_info_size(), - BtfType::Const(t) => t.type_info_size(), - BtfType::Volatile(t) => t.type_info_size(), - BtfType::Restrict(t) => t.type_info_size(), - BtfType::Ptr(t) => t.type_info_size(), - BtfType::Typedef(t) => t.type_info_size(), - BtfType::Func(t) => t.type_info_size(), - BtfType::Int(t) => t.type_info_size(), - BtfType::Float(t) => t.type_info_size(), - BtfType::Enum(t) => t.type_info_size(), - BtfType::Enum64(t) => t.type_info_size(), - BtfType::Array(t) => t.type_info_size(), - BtfType::Struct(t) => t.type_info_size(), - BtfType::Union(t) => t.type_info_size(), - BtfType::FuncProto(t) => t.type_info_size(), - BtfType::Var(t) => t.type_info_size(), - BtfType::DataSec(t) => t.type_info_size(), - BtfType::DeclTag(t) => t.type_info_size(), - BtfType::TypeTag(t) => t.type_info_size(), + Self::Unknown => mem::size_of::(), + Self::Fwd(t) => t.type_info_size(), + Self::Const(t) => t.type_info_size(), + Self::Volatile(t) => t.type_info_size(), + Self::Restrict(t) => t.type_info_size(), + Self::Ptr(t) => t.type_info_size(), + Self::Typedef(t) => t.type_info_size(), + Self::Func(t) => t.type_info_size(), + Self::Int(t) => t.type_info_size(), + Self::Float(t) => t.type_info_size(), + Self::Enum(t) => t.type_info_size(), + Self::Enum64(t) => t.type_info_size(), + Self::Array(t) => t.type_info_size(), + Self::Struct(t) => t.type_info_size(), + Self::Union(t) => t.type_info_size(), + Self::FuncProto(t) => t.type_info_size(), + Self::Var(t) => t.type_info_size(), + Self::DataSec(t) => t.type_info_size(), + Self::DeclTag(t) => t.type_info_size(), + Self::TypeTag(t) => t.type_info_size(), } } pub(crate) fn name_offset(&self) -> u32 { match self { - BtfType::Unknown => 0, - BtfType::Fwd(t) => t.name_offset, - BtfType::Const(t) => t.name_offset, - BtfType::Volatile(t) => t.name_offset, - BtfType::Restrict(t) => t.name_offset, - BtfType::Ptr(t) => t.name_offset, - BtfType::Typedef(t) => t.name_offset, - BtfType::Func(t) => t.name_offset, - BtfType::Int(t) => t.name_offset, - BtfType::Float(t) => t.name_offset, - BtfType::Enum(t) => t.name_offset, - BtfType::Enum64(t) => t.name_offset, - BtfType::Array(t) => t.name_offset, - BtfType::Struct(t) => t.name_offset, - BtfType::Union(t) => t.name_offset, - BtfType::FuncProto(t) => t.name_offset, - BtfType::Var(t) => t.name_offset, - BtfType::DataSec(t) => t.name_offset, - BtfType::DeclTag(t) => t.name_offset, - BtfType::TypeTag(t) => t.name_offset, + Self::Unknown => 0, + Self::Fwd(t) => t.name_offset, + Self::Const(t) => t.name_offset, + Self::Volatile(t) => t.name_offset, + Self::Restrict(t) => t.name_offset, + Self::Ptr(t) => t.name_offset, + Self::Typedef(t) => t.name_offset, + Self::Func(t) => t.name_offset, + Self::Int(t) => t.name_offset, + Self::Float(t) => t.name_offset, + Self::Enum(t) => t.name_offset, + Self::Enum64(t) => t.name_offset, + Self::Array(t) => t.name_offset, + Self::Struct(t) => t.name_offset, + Self::Union(t) => t.name_offset, + Self::FuncProto(t) => t.name_offset, + Self::Var(t) => t.name_offset, + Self::DataSec(t) => t.name_offset, + Self::DeclTag(t) => t.name_offset, + Self::TypeTag(t) => t.name_offset, } } pub(crate) fn kind(&self) -> BtfKind { match self { - BtfType::Unknown => BtfKind::Unknown, - BtfType::Fwd(t) => t.kind(), - BtfType::Const(t) => t.kind(), - BtfType::Volatile(t) => t.kind(), - BtfType::Restrict(t) => t.kind(), - BtfType::Ptr(t) => t.kind(), - BtfType::Typedef(t) => t.kind(), - BtfType::Func(t) => t.kind(), - BtfType::Int(t) => t.kind(), - BtfType::Float(t) => t.kind(), - BtfType::Enum(t) => t.kind(), - BtfType::Enum64(t) => t.kind(), - BtfType::Array(t) => t.kind(), - BtfType::Struct(t) => t.kind(), - BtfType::Union(t) => t.kind(), - BtfType::FuncProto(t) => t.kind(), - BtfType::Var(t) => t.kind(), - BtfType::DataSec(t) => t.kind(), - BtfType::DeclTag(t) => t.kind(), - BtfType::TypeTag(t) => t.kind(), + Self::Unknown => BtfKind::Unknown, + Self::Fwd(t) => t.kind(), + Self::Const(t) => t.kind(), + Self::Volatile(t) => t.kind(), + Self::Restrict(t) => t.kind(), + Self::Ptr(t) => t.kind(), + Self::Typedef(t) => t.kind(), + Self::Func(t) => t.kind(), + Self::Int(t) => t.kind(), + Self::Float(t) => t.kind(), + Self::Enum(t) => t.kind(), + Self::Enum64(t) => t.kind(), + Self::Array(t) => t.kind(), + Self::Struct(t) => t.kind(), + Self::Union(t) => t.kind(), + Self::FuncProto(t) => t.kind(), + Self::Var(t) => t.kind(), + Self::DataSec(t) => t.kind(), + Self::DeclTag(t) => t.kind(), + Self::TypeTag(t) => t.kind(), } } pub(crate) fn is_composite(&self) -> bool { - matches!(self, BtfType::Struct(_) | BtfType::Union(_)) + matches!(self, Self::Struct(_) | Self::Union(_)) } pub(crate) fn members(&self) -> Option> { match self { - BtfType::Struct(t) => Some(t.members.iter()), - BtfType::Union(t) => Some(t.members.iter()), + Self::Struct(t) => Some(t.members.iter()), + Self::Union(t) => Some(t.members.iter()), _ => None, } } pub(crate) fn member_bit_field_size(&self, member: &BtfMember) -> Option { match self { - BtfType::Struct(t) => Some(t.member_bit_field_size(member)), - BtfType::Union(t) => Some(t.member_bit_field_size(member)), + Self::Struct(t) => Some(t.member_bit_field_size(member)), + Self::Union(t) => Some(t.member_bit_field_size(member)), _ => None, } } pub(crate) fn member_bit_offset(&self, member: &BtfMember) -> Option { match self { - BtfType::Struct(t) => Some(t.member_bit_offset(member)), - BtfType::Union(t) => Some(t.member_bit_offset(member)), + Self::Struct(t) => Some(t.member_bit_offset(member)), + Self::Union(t) => Some(t.member_bit_offset(member)), _ => None, } } - pub(crate) fn is_compatible(&self, other: &BtfType) -> bool { + pub(crate) fn is_compatible(&self, other: &Self) -> bool { if self.kind() == other.kind() { return true; } @@ -1450,7 +1475,7 @@ pub(crate) fn types_are_compatible( return Ok(false); } - for _ in 0..MAX_RESOLVE_DEPTH { + for () in core::iter::repeat_n((), MAX_RESOLVE_DEPTH) { local_id = local_btf.resolve_type(local_id)?; target_id = target_btf.resolve_type(target_id)?; let local_ty = local_btf.type_by_id(local_id)?; @@ -1519,7 +1544,7 @@ pub(crate) fn fields_are_compatible( target_btf: &Btf, mut target_id: u32, ) -> Result { - for _ in 0..MAX_RESOLVE_DEPTH { + for () in core::iter::repeat_n((), MAX_RESOLVE_DEPTH) { local_id = local_btf.resolve_type(local_id)?; target_id = target_btf.resolve_type(target_id)?; let local_ty = local_btf.type_by_id(local_id)?; @@ -1566,8 +1591,12 @@ pub(crate) fn fields_are_compatible( fn bytes_of(val: &T) -> &[u8] { // Safety: all btf types are POD + // + // TODO: This is a fragile assumption and we should stop doing this. We should also remove + // repr(C) from our types, it doesn't make sense to rely on this. unsafe { crate::util::bytes_of(val) } } + #[cfg(test)] mod tests { use assert_matches::assert_matches; @@ -1577,10 +1606,8 @@ mod tests { #[test] fn test_read_btf_type_int() { let endianness = Endianness::default(); - let data: &[u8] = &[ - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, - 0x00, 0x00, - ]; + let bpf_type = BtfType::Int(Int::new(1, 8, IntEncoding::None, 0)); + let data: &[u8] = &bpf_type.to_bytes(); assert_matches!(unsafe { BtfType::read(data, endianness) }.unwrap(), BtfType::Int(new @ Int { name_offset, info: _, @@ -1594,42 +1621,11 @@ mod tests { }); } - #[test] - fn test_write_btf_long_unsigned_int() { - let data: &[u8] = &[ - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, - 0x00, 0x00, - ]; - let int = Int::new(1, 8, IntEncoding::None, 0); - assert_eq!(int.to_bytes(), data); - } - - #[test] - fn test_write_btf_uchar() { - let data: &[u8] = &[ - 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, - 0x00, 0x00, - ]; - let int = Int::new(0x13, 1, IntEncoding::None, 0); - assert_eq!(int.to_bytes(), data); - } - - #[test] - fn test_write_btf_signed_short_int() { - let data: &[u8] = &[ - 0x4a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, - 0x00, 0x01, - ]; - let int = Int::new(0x4a, 2, IntEncoding::Signed, 0); - assert_eq!(int.to_bytes(), data); - } - #[test] fn test_read_btf_type_ptr() { let endianness = Endianness::default(); - let data: &[u8] = &[ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x00, 0x00, 0x00, - ]; + let bpf_type = BtfType::Ptr(Ptr::new(0, 0x06)); + let data: &[u8] = &bpf_type.to_bytes(); assert_matches!(unsafe { BtfType::read(data, endianness) }.unwrap(), BtfType::Ptr(got) => { assert_eq!(got.to_bytes(), data); }); @@ -1638,10 +1634,8 @@ mod tests { #[test] fn test_read_btf_type_array() { let endianness = Endianness::default(); - let data: &[u8] = &[ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, - ]; + let bpf_type = BtfType::Array(Array::new(0, 1, 0x12, 2)); + let data: &[u8] = &bpf_type.to_bytes(); assert_matches!(unsafe { BtfType::read(data, endianness) }.unwrap(), BtfType::Array(got) => { assert_eq!(got.to_bytes(), data); }); @@ -1650,10 +1644,13 @@ mod tests { #[test] fn test_read_btf_type_struct() { let endianness = Endianness::default(); - let data: &[u8] = &[ - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x47, 0x02, - 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - ]; + let members = vec![BtfMember { + name_offset: 0x0247, + btf_type: 0x12, + offset: 0, + }]; + let bpf_type = BtfType::Struct(Struct::new(0, members, 4)); + let data: &[u8] = &bpf_type.to_bytes(); assert_matches!(unsafe { BtfType::read(data, endianness) }.unwrap(), BtfType::Struct(got) => { assert_eq!(got.to_bytes(), data); }); @@ -1662,10 +1659,13 @@ mod tests { #[test] fn test_read_btf_type_union() { let endianness = Endianness::default(); - let data: &[u8] = &[ - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x05, 0x04, 0x00, 0x00, 0x00, 0x0d, 0x04, - 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - ]; + let members = vec![BtfMember { + name_offset: 0x040d, + btf_type: 0x68, + offset: 0, + }]; + let bpf_type = BtfType::Union(Union::new(0, 4, members, None)); + let data: &[u8] = &bpf_type.to_bytes(); assert_matches!(unsafe { BtfType::read(data, endianness) }.unwrap(), BtfType::Union(got) => { assert_eq!(got.to_bytes(), data); }); @@ -1674,10 +1674,11 @@ mod tests { #[test] fn test_read_btf_type_enum() { let endianness = Endianness::default(); - let data: &[u8] = &[ - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x06, 0x04, 0x00, 0x00, 0x00, 0xc9, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - ]; + let enum1 = BtfEnum::new(0xc9, 0); + let enum2 = BtfEnum::new(0xcf, 1); + let variants = vec![enum1, enum2]; + let bpf_type = BtfType::Enum(Enum::new(0, false, variants)); + let data: &[u8] = &bpf_type.to_bytes(); assert_matches!(unsafe { BtfType::read(data, endianness) }.unwrap(), BtfType::Enum(got) => { assert_eq!(got.to_bytes(), data); }); @@ -1686,9 +1687,13 @@ mod tests { #[test] fn test_read_btf_type_fwd() { let endianness = Endianness::default(); - let data: &[u8] = &[ - 0x0b, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, - ]; + let info = (BtfKind::Fwd as u32) << 24; + let bpf_type = BtfType::Fwd(Fwd { + name_offset: 0x550b, + info, + _unused: 0, + }); + let data: &[u8] = &bpf_type.to_bytes(); assert_matches!(unsafe { BtfType::read(data, endianness) }.unwrap(), BtfType::Fwd(got) => { assert_eq!(got.to_bytes(), data); }); @@ -1697,9 +1702,8 @@ mod tests { #[test] fn test_read_btf_type_typedef() { let endianness = Endianness::default(); - let data: &[u8] = &[ - 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0b, 0x00, 0x00, 0x00, - ]; + let bpf_type = BtfType::Typedef(Typedef::new(0x31, 0x0b)); + let data: &[u8] = &bpf_type.to_bytes(); assert_matches!(unsafe { BtfType::read(data, endianness) }.unwrap(), BtfType::Typedef(got) => { assert_eq!(got.to_bytes(), data); }); @@ -1708,9 +1712,13 @@ mod tests { #[test] fn test_read_btf_type_volatile() { let endianness = Endianness::default(); - let data: &[u8] = &[ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x24, 0x00, 0x00, 0x00, - ]; + let info = (BtfKind::Volatile as u32) << 24; + let bpf_type = BtfType::Volatile(Volatile { + name_offset: 0, + info, + btf_type: 0x24, + }); + let data: &[u8] = &bpf_type.to_bytes(); assert_matches!(unsafe { BtfType::read(data, endianness) }.unwrap(), BtfType::Volatile(got) => { assert_eq!(got.to_bytes(), data); }); @@ -1719,9 +1727,8 @@ mod tests { #[test] fn test_read_btf_type_const() { let endianness = Endianness::default(); - let data: &[u8] = &[ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x01, 0x00, 0x00, 0x00, - ]; + let bpf_type = BtfType::Const(Const::new(1)); + let data: &[u8] = &bpf_type.to_bytes(); assert_matches!(unsafe { BtfType::read(data, endianness) }.unwrap(), BtfType::Const(got) => { assert_eq!(got.to_bytes(), data); }); @@ -1730,9 +1737,13 @@ mod tests { #[test] fn test_read_btf_type_restrict() { let endianness = Endianness::default(); - let data: &[u8] = &[ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x04, 0x00, 0x00, 0x00, - ]; + let info = (BtfKind::Restrict as u32) << 24; + let bpf_type = BtfType::Restrict(Restrict { + name_offset: 0, + _info: info, + btf_type: 4, + }); + let data: &[u8] = &bpf_type.to_bytes(); assert_matches!(unsafe { BtfType::read(data, endianness) }.unwrap(), BtfType::Restrict(got) => { assert_eq!(got.to_bytes(), data); }); @@ -1741,9 +1752,8 @@ mod tests { #[test] fn test_read_btf_type_func() { let endianness = Endianness::default(); - let data: &[u8] = &[ - 0x17, 0x8b, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xf0, 0xe4, 0x00, 0x00, - ]; + let bpf_type = BtfType::Func(Func::new(0x000f8b17, 0xe4f0, FuncLinkage::Global)); + let data: &[u8] = &bpf_type.to_bytes(); assert_matches!(unsafe { BtfType::read(data, endianness) }.unwrap(), BtfType::Func(got) => { assert_eq!(got.to_bytes(), data); }); @@ -1752,10 +1762,12 @@ mod tests { #[test] fn test_read_btf_type_func_proto() { let endianness = Endianness::default(); - let data: &[u8] = &[ - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, - ]; + let params = vec![BtfParam { + name_offset: 0, + btf_type: 0x12, + }]; + let bpf_type = BtfType::FuncProto(FuncProto::new(params, 0)); + let data: &[u8] = &bpf_type.to_bytes(); assert_matches!(unsafe { BtfType::read(data, endianness) }.unwrap(), BtfType::FuncProto(got) => { assert_eq!(got.to_bytes(), data); }); @@ -1765,10 +1777,8 @@ mod tests { fn test_read_btf_type_func_var() { let endianness = Endianness::default(); // NOTE: There was no data in /sys/kernell/btf/vmlinux for this type - let data: &[u8] = &[ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, - ]; + let bpf_type = BtfType::Var(Var::new(0, 0xf0, VarLinkage::Static)); + let data: &[u8] = &bpf_type.to_bytes(); assert_matches!(unsafe { BtfType::read(data, endianness) }.unwrap(), BtfType::Var(got) => { assert_eq!(got.to_bytes(), data); }); @@ -1777,10 +1787,13 @@ mod tests { #[test] fn test_read_btf_type_func_datasec() { let endianness = Endianness::default(); - let data: &[u8] = &[ - 0xd9, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, - ]; + let entries = vec![DataSecEntry { + btf_type: 11, + offset: 0, + size: 4, + }]; + let bpf_type = BtfType::DataSec(DataSec::new(0xd9, entries, 0)); + let data: &[u8] = &bpf_type.to_bytes(); assert_matches!(unsafe { BtfType::read(data, endianness) }.unwrap(), BtfType::DataSec(DataSec { name_offset: _, info: _, @@ -1802,9 +1815,8 @@ mod tests { #[test] fn test_read_btf_type_float() { let endianness = Endianness::default(); - let data: &[u8] = &[ - 0x78, 0xfd, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x00, - ]; + let bpf_type = BtfType::Float(Float::new(0x02fd, 8)); + let data: &[u8] = &bpf_type.to_bytes(); assert_matches!(unsafe { BtfType::read(data, endianness) }.unwrap(), BtfType::Float(got) => { assert_eq!(got.to_bytes(), data); }); @@ -1854,17 +1866,11 @@ mod tests { } #[test] - pub fn test_read_btf_type_enum64() { + fn test_read_btf_type_enum64() { let endianness = Endianness::default(); - let data: &[u8] = &[ - 0x00, 0x00, 0x00, 0x00, // name offset - 0x01, 0x00, 0x00, 0x13, // info: vlen, type_kind - 0x08, 0x00, 0x00, 0x00, // size - 0xd7, 0x06, 0x00, 0x00, // enum variant name offset - 0xbb, 0xbb, 0xbb, 0xbb, // enum variant low - 0xaa, 0xaa, 0xaa, 0xaa, // enum variant high - ]; - + let variants = vec![BtfEnum64::new(0, 0xbbbbbbbbaaaaaaaau64)]; + let bpf_type = BtfType::Enum64(Enum64::new(0, false, variants)); + let data: &[u8] = &bpf_type.to_bytes(); assert_matches!(unsafe { BtfType::read(data, endianness) }.unwrap(), BtfType::Enum64(got) => { assert_eq!(got.to_bytes(), data); }); diff --git a/aya-obj/src/generated/btf_internal_bindings.rs b/aya-obj/src/generated/btf_internal_bindings.rs index d551b0f8..e82dd8d0 100644 --- a/aya-obj/src/generated/btf_internal_bindings.rs +++ b/aya-obj/src/generated/btf_internal_bindings.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.69.4 */ +/* automatically generated by rust-bindgen 0.72.1 */ pub type __u8 = ::core::ffi::c_uchar; pub type __u16 = ::core::ffi::c_ushort; diff --git a/aya-obj/src/generated/linux_bindings_aarch64.rs b/aya-obj/src/generated/linux_bindings_aarch64.rs index 95b7e0d8..b76ed850 100644 --- a/aya-obj/src/generated/linux_bindings_aarch64.rs +++ b/aya-obj/src/generated/linux_bindings_aarch64.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.69.4 */ +/* automatically generated by rust-bindgen 0.72.1 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] @@ -16,10 +16,7 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -29,21 +26,46 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; - if val { - *byte |= mask; - } else { - *byte &= !mask; - } + if val { byte | mask } else { byte & !mask } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -64,6 +86,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -79,6 +119,22 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } } #[repr(C)] #[derive(Default)] @@ -110,21 +166,68 @@ impl ::core::fmt::Debug for __IncompleteArrayField { fmt.write_str("__IncompleteArrayField") } } -pub const SO_ATTACH_BPF: u32 = 50; -pub const SO_DETACH_BPF: u32 = 27; pub const BPF_LD: u32 = 0; pub const BPF_LDX: u32 = 1; pub const BPF_ST: u32 = 2; pub const BPF_STX: u32 = 3; pub const BPF_ALU: u32 = 4; pub const BPF_JMP: u32 = 5; +pub const BPF_RET: u32 = 6; +pub const BPF_MISC: u32 = 7; pub const BPF_W: u32 = 0; pub const BPF_H: u32 = 8; pub const BPF_B: u32 = 16; +pub const BPF_IMM: u32 = 0; +pub const BPF_ABS: u32 = 32; +pub const BPF_IND: u32 = 64; +pub const BPF_MEM: u32 = 96; +pub const BPF_LEN: u32 = 128; +pub const BPF_MSH: u32 = 160; +pub const BPF_ADD: u32 = 0; +pub const BPF_SUB: u32 = 16; +pub const BPF_MUL: u32 = 32; +pub const BPF_DIV: u32 = 48; +pub const BPF_OR: u32 = 64; +pub const BPF_AND: u32 = 80; +pub const BPF_LSH: u32 = 96; +pub const BPF_RSH: u32 = 112; +pub const BPF_NEG: u32 = 128; +pub const BPF_MOD: u32 = 144; +pub const BPF_XOR: u32 = 160; +pub const BPF_JA: u32 = 0; +pub const BPF_JEQ: u32 = 16; +pub const BPF_JGT: u32 = 32; +pub const BPF_JGE: u32 = 48; +pub const BPF_JSET: u32 = 64; pub const BPF_K: u32 = 0; +pub const BPF_X: u32 = 8; +pub const BPF_MAXINSNS: u32 = 4096; +pub const BPF_JMP32: u32 = 6; pub const BPF_ALU64: u32 = 7; pub const BPF_DW: u32 = 24; +pub const BPF_MEMSX: u32 = 128; +pub const BPF_ATOMIC: u32 = 192; +pub const BPF_XADD: u32 = 192; +pub const BPF_MOV: u32 = 176; +pub const BPF_ARSH: u32 = 192; +pub const BPF_END: u32 = 208; +pub const BPF_TO_LE: u32 = 0; +pub const BPF_TO_BE: u32 = 8; +pub const BPF_FROM_LE: u32 = 0; +pub const BPF_FROM_BE: u32 = 8; +pub const BPF_JNE: u32 = 80; +pub const BPF_JLT: u32 = 160; +pub const BPF_JLE: u32 = 176; +pub const BPF_JSGT: u32 = 96; +pub const BPF_JSGE: u32 = 112; +pub const BPF_JSLT: u32 = 192; +pub const BPF_JSLE: u32 = 208; +pub const BPF_JCOND: u32 = 224; pub const BPF_CALL: u32 = 128; +pub const BPF_EXIT: u32 = 144; +pub const BPF_FETCH: u32 = 1; +pub const BPF_XCHG: u32 = 225; +pub const BPF_CMPXCHG: u32 = 241; pub const BPF_F_ALLOW_OVERRIDE: u32 = 1; pub const BPF_F_ALLOW_MULTI: u32 = 2; pub const BPF_F_REPLACE: u32 = 4; @@ -151,6 +254,9 @@ pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2; pub const BPF_F_QUERY_EFFECTIVE: u32 = 1; pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1; pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2; +pub const BPF_BUILD_ID_SIZE: u32 = 20; +pub const BPF_OBJ_NAME_LEN: u32 = 16; +pub const BPF_TAG_SIZE: u32 = 8; pub const BTF_INT_SIGNED: u32 = 1; pub const BTF_INT_CHAR: u32 = 2; pub const BTF_INT_BOOL: u32 = 4; @@ -162,6 +268,18 @@ pub const XDP_FLAGS_HW_MODE: u32 = 8; pub const XDP_FLAGS_REPLACE: u32 = 16; pub const XDP_FLAGS_MODES: u32 = 14; pub const XDP_FLAGS_MASK: u32 = 31; +pub const PERF_EVENT_IOC_ENABLE: u32 = 9216; +pub const PERF_EVENT_IOC_DISABLE: u32 = 9217; +pub const PERF_EVENT_IOC_REFRESH: u32 = 9218; +pub const PERF_EVENT_IOC_RESET: u32 = 9219; +pub const PERF_EVENT_IOC_PERIOD: u32 = 1074275332; +pub const PERF_EVENT_IOC_SET_OUTPUT: u32 = 9221; +pub const PERF_EVENT_IOC_SET_FILTER: u32 = 1074275334; +pub const PERF_EVENT_IOC_ID: u32 = 2148017159; +pub const PERF_EVENT_IOC_SET_BPF: u32 = 1074013192; +pub const PERF_EVENT_IOC_PAUSE_OUTPUT: u32 = 1074013193; +pub const PERF_EVENT_IOC_QUERY_BPF: u32 = 3221758986; +pub const PERF_EVENT_IOC_MODIFY_ATTRIBUTES: u32 = 1074275339; pub const PERF_MAX_STACK_DEPTH: u32 = 127; pub const PERF_MAX_CONTEXTS_PER_STACK: u32 = 8; pub const PERF_FLAG_FD_NO_GROUP: u32 = 1; @@ -178,6 +296,8 @@ pub const TC_H_MIN_PRIORITY: u32 = 65504; pub const TC_H_MIN_INGRESS: u32 = 65522; pub const TC_H_MIN_EGRESS: u32 = 65523; pub const TCA_BPF_FLAG_ACT_DIRECT: u32 = 1; +pub const SO_ATTACH_BPF: u32 = 50; +pub const SO_DETACH_BPF: u32 = 27; pub type __u8 = ::core::ffi::c_uchar; pub type __s16 = ::core::ffi::c_short; pub type __u16 = ::core::ffi::c_ushort; @@ -185,6 +305,34 @@ pub type __s32 = ::core::ffi::c_int; pub type __u32 = ::core::ffi::c_uint; pub type __s64 = ::core::ffi::c_longlong; pub type __u64 = ::core::ffi::c_ulonglong; +pub const BPF_REG_0: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_0; +pub const BPF_REG_1: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_1; +pub const BPF_REG_2: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_2; +pub const BPF_REG_3: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_3; +pub const BPF_REG_4: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_4; +pub const BPF_REG_5: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_5; +pub const BPF_REG_6: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_6; +pub const BPF_REG_7: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_7; +pub const BPF_REG_8: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_8; +pub const BPF_REG_9: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_9; +pub const BPF_REG_10: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_10; +pub const __MAX_BPF_REG: _bindgen_ty_1 = _bindgen_ty_1::__MAX_BPF_REG; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { + BPF_REG_0 = 0, + BPF_REG_1 = 1, + BPF_REG_2 = 2, + BPF_REG_3 = 3, + BPF_REG_4 = 4, + BPF_REG_5 = 5, + BPF_REG_6 = 6, + BPF_REG_7 = 7, + BPF_REG_8 = 8, + BPF_REG_9 = 9, + BPF_REG_10 = 10, + __MAX_BPF_REG = 11, +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bpf_insn { @@ -207,6 +355,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn src_reg(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -218,6 +388,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -237,6 +429,15 @@ pub struct bpf_lpm_trie_key { pub prefixlen: __u32, pub data: __IncompleteArrayField<__u8>, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_cgroup_iter_order { + BPF_CGROUP_ITER_ORDER_UNSPEC = 0, + BPF_CGROUP_ITER_SELF_ONLY = 1, + BPF_CGROUP_ITER_DESCENDANTS_PRE = 2, + BPF_CGROUP_ITER_DESCENDANTS_POST = 3, + BPF_CGROUP_ITER_ANCESTORS_UP = 4, +} impl bpf_cmd { pub const BPF_PROG_RUN: bpf_cmd = bpf_cmd::BPF_PROG_TEST_RUN; } @@ -447,6 +648,17 @@ pub enum bpf_link_type { BPF_LINK_TYPE_NETKIT = 13, __MAX_BPF_LINK_TYPE = 14, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_perf_event_type { + BPF_PERF_EVENT_UNSPEC = 0, + BPF_PERF_EVENT_UPROBE = 1, + BPF_PERF_EVENT_URETPROBE = 2, + BPF_PERF_EVENT_KPROBE = 3, + BPF_PERF_EVENT_KRETPROBE = 4, + BPF_PERF_EVENT_TRACEPOINT = 5, + BPF_PERF_EVENT_EVENT = 6, +} pub const BPF_F_KPROBE_MULTI_RETURN: _bindgen_ty_2 = 1; pub type _bindgen_ty_2 = ::core::ffi::c_uint; pub const BPF_F_UPROBE_MULTI_RETURN: _bindgen_ty_3 = 1; @@ -476,6 +688,11 @@ pub const BPF_F_TOKEN_FD: _bindgen_ty_5 = 65536; pub const BPF_F_SEGV_ON_FAULT: _bindgen_ty_5 = 131072; pub const BPF_F_NO_USER_CONV: _bindgen_ty_5 = 262144; pub type _bindgen_ty_5 = ::core::ffi::c_uint; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_stats_type { + BPF_STATS_RUN_TIME = 0, +} #[repr(C)] #[derive(Copy, Clone)] pub union bpf_attr { @@ -884,6 +1101,223 @@ pub struct bpf_attr__bindgen_ty_20 { pub flags: __u32, pub bpffs_fd: __u32, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_func_id { + BPF_FUNC_unspec = 0, + BPF_FUNC_map_lookup_elem = 1, + BPF_FUNC_map_update_elem = 2, + BPF_FUNC_map_delete_elem = 3, + BPF_FUNC_probe_read = 4, + BPF_FUNC_ktime_get_ns = 5, + BPF_FUNC_trace_printk = 6, + BPF_FUNC_get_prandom_u32 = 7, + BPF_FUNC_get_smp_processor_id = 8, + BPF_FUNC_skb_store_bytes = 9, + BPF_FUNC_l3_csum_replace = 10, + BPF_FUNC_l4_csum_replace = 11, + BPF_FUNC_tail_call = 12, + BPF_FUNC_clone_redirect = 13, + BPF_FUNC_get_current_pid_tgid = 14, + BPF_FUNC_get_current_uid_gid = 15, + BPF_FUNC_get_current_comm = 16, + BPF_FUNC_get_cgroup_classid = 17, + BPF_FUNC_skb_vlan_push = 18, + BPF_FUNC_skb_vlan_pop = 19, + BPF_FUNC_skb_get_tunnel_key = 20, + BPF_FUNC_skb_set_tunnel_key = 21, + BPF_FUNC_perf_event_read = 22, + BPF_FUNC_redirect = 23, + BPF_FUNC_get_route_realm = 24, + BPF_FUNC_perf_event_output = 25, + BPF_FUNC_skb_load_bytes = 26, + BPF_FUNC_get_stackid = 27, + BPF_FUNC_csum_diff = 28, + BPF_FUNC_skb_get_tunnel_opt = 29, + BPF_FUNC_skb_set_tunnel_opt = 30, + BPF_FUNC_skb_change_proto = 31, + BPF_FUNC_skb_change_type = 32, + BPF_FUNC_skb_under_cgroup = 33, + BPF_FUNC_get_hash_recalc = 34, + BPF_FUNC_get_current_task = 35, + BPF_FUNC_probe_write_user = 36, + BPF_FUNC_current_task_under_cgroup = 37, + BPF_FUNC_skb_change_tail = 38, + BPF_FUNC_skb_pull_data = 39, + BPF_FUNC_csum_update = 40, + BPF_FUNC_set_hash_invalid = 41, + BPF_FUNC_get_numa_node_id = 42, + BPF_FUNC_skb_change_head = 43, + BPF_FUNC_xdp_adjust_head = 44, + BPF_FUNC_probe_read_str = 45, + BPF_FUNC_get_socket_cookie = 46, + BPF_FUNC_get_socket_uid = 47, + BPF_FUNC_set_hash = 48, + BPF_FUNC_setsockopt = 49, + BPF_FUNC_skb_adjust_room = 50, + BPF_FUNC_redirect_map = 51, + BPF_FUNC_sk_redirect_map = 52, + BPF_FUNC_sock_map_update = 53, + BPF_FUNC_xdp_adjust_meta = 54, + BPF_FUNC_perf_event_read_value = 55, + BPF_FUNC_perf_prog_read_value = 56, + BPF_FUNC_getsockopt = 57, + BPF_FUNC_override_return = 58, + BPF_FUNC_sock_ops_cb_flags_set = 59, + BPF_FUNC_msg_redirect_map = 60, + BPF_FUNC_msg_apply_bytes = 61, + BPF_FUNC_msg_cork_bytes = 62, + BPF_FUNC_msg_pull_data = 63, + BPF_FUNC_bind = 64, + BPF_FUNC_xdp_adjust_tail = 65, + BPF_FUNC_skb_get_xfrm_state = 66, + BPF_FUNC_get_stack = 67, + BPF_FUNC_skb_load_bytes_relative = 68, + BPF_FUNC_fib_lookup = 69, + BPF_FUNC_sock_hash_update = 70, + BPF_FUNC_msg_redirect_hash = 71, + BPF_FUNC_sk_redirect_hash = 72, + BPF_FUNC_lwt_push_encap = 73, + BPF_FUNC_lwt_seg6_store_bytes = 74, + BPF_FUNC_lwt_seg6_adjust_srh = 75, + BPF_FUNC_lwt_seg6_action = 76, + BPF_FUNC_rc_repeat = 77, + BPF_FUNC_rc_keydown = 78, + BPF_FUNC_skb_cgroup_id = 79, + BPF_FUNC_get_current_cgroup_id = 80, + BPF_FUNC_get_local_storage = 81, + BPF_FUNC_sk_select_reuseport = 82, + BPF_FUNC_skb_ancestor_cgroup_id = 83, + BPF_FUNC_sk_lookup_tcp = 84, + BPF_FUNC_sk_lookup_udp = 85, + BPF_FUNC_sk_release = 86, + BPF_FUNC_map_push_elem = 87, + BPF_FUNC_map_pop_elem = 88, + BPF_FUNC_map_peek_elem = 89, + BPF_FUNC_msg_push_data = 90, + BPF_FUNC_msg_pop_data = 91, + BPF_FUNC_rc_pointer_rel = 92, + BPF_FUNC_spin_lock = 93, + BPF_FUNC_spin_unlock = 94, + BPF_FUNC_sk_fullsock = 95, + BPF_FUNC_tcp_sock = 96, + BPF_FUNC_skb_ecn_set_ce = 97, + BPF_FUNC_get_listener_sock = 98, + BPF_FUNC_skc_lookup_tcp = 99, + BPF_FUNC_tcp_check_syncookie = 100, + BPF_FUNC_sysctl_get_name = 101, + BPF_FUNC_sysctl_get_current_value = 102, + BPF_FUNC_sysctl_get_new_value = 103, + BPF_FUNC_sysctl_set_new_value = 104, + BPF_FUNC_strtol = 105, + BPF_FUNC_strtoul = 106, + BPF_FUNC_sk_storage_get = 107, + BPF_FUNC_sk_storage_delete = 108, + BPF_FUNC_send_signal = 109, + BPF_FUNC_tcp_gen_syncookie = 110, + BPF_FUNC_skb_output = 111, + BPF_FUNC_probe_read_user = 112, + BPF_FUNC_probe_read_kernel = 113, + BPF_FUNC_probe_read_user_str = 114, + BPF_FUNC_probe_read_kernel_str = 115, + BPF_FUNC_tcp_send_ack = 116, + BPF_FUNC_send_signal_thread = 117, + BPF_FUNC_jiffies64 = 118, + BPF_FUNC_read_branch_records = 119, + BPF_FUNC_get_ns_current_pid_tgid = 120, + BPF_FUNC_xdp_output = 121, + BPF_FUNC_get_netns_cookie = 122, + BPF_FUNC_get_current_ancestor_cgroup_id = 123, + BPF_FUNC_sk_assign = 124, + BPF_FUNC_ktime_get_boot_ns = 125, + BPF_FUNC_seq_printf = 126, + BPF_FUNC_seq_write = 127, + BPF_FUNC_sk_cgroup_id = 128, + BPF_FUNC_sk_ancestor_cgroup_id = 129, + BPF_FUNC_ringbuf_output = 130, + BPF_FUNC_ringbuf_reserve = 131, + BPF_FUNC_ringbuf_submit = 132, + BPF_FUNC_ringbuf_discard = 133, + BPF_FUNC_ringbuf_query = 134, + BPF_FUNC_csum_level = 135, + BPF_FUNC_skc_to_tcp6_sock = 136, + BPF_FUNC_skc_to_tcp_sock = 137, + BPF_FUNC_skc_to_tcp_timewait_sock = 138, + BPF_FUNC_skc_to_tcp_request_sock = 139, + BPF_FUNC_skc_to_udp6_sock = 140, + BPF_FUNC_get_task_stack = 141, + BPF_FUNC_load_hdr_opt = 142, + BPF_FUNC_store_hdr_opt = 143, + BPF_FUNC_reserve_hdr_opt = 144, + BPF_FUNC_inode_storage_get = 145, + BPF_FUNC_inode_storage_delete = 146, + BPF_FUNC_d_path = 147, + BPF_FUNC_copy_from_user = 148, + BPF_FUNC_snprintf_btf = 149, + BPF_FUNC_seq_printf_btf = 150, + BPF_FUNC_skb_cgroup_classid = 151, + BPF_FUNC_redirect_neigh = 152, + BPF_FUNC_per_cpu_ptr = 153, + BPF_FUNC_this_cpu_ptr = 154, + BPF_FUNC_redirect_peer = 155, + BPF_FUNC_task_storage_get = 156, + BPF_FUNC_task_storage_delete = 157, + BPF_FUNC_get_current_task_btf = 158, + BPF_FUNC_bprm_opts_set = 159, + BPF_FUNC_ktime_get_coarse_ns = 160, + BPF_FUNC_ima_inode_hash = 161, + BPF_FUNC_sock_from_file = 162, + BPF_FUNC_check_mtu = 163, + BPF_FUNC_for_each_map_elem = 164, + BPF_FUNC_snprintf = 165, + BPF_FUNC_sys_bpf = 166, + BPF_FUNC_btf_find_by_name_kind = 167, + BPF_FUNC_sys_close = 168, + BPF_FUNC_timer_init = 169, + BPF_FUNC_timer_set_callback = 170, + BPF_FUNC_timer_start = 171, + BPF_FUNC_timer_cancel = 172, + BPF_FUNC_get_func_ip = 173, + BPF_FUNC_get_attach_cookie = 174, + BPF_FUNC_task_pt_regs = 175, + BPF_FUNC_get_branch_snapshot = 176, + BPF_FUNC_trace_vprintk = 177, + BPF_FUNC_skc_to_unix_sock = 178, + BPF_FUNC_kallsyms_lookup_name = 179, + BPF_FUNC_find_vma = 180, + BPF_FUNC_loop = 181, + BPF_FUNC_strncmp = 182, + BPF_FUNC_get_func_arg = 183, + BPF_FUNC_get_func_ret = 184, + BPF_FUNC_get_func_arg_cnt = 185, + BPF_FUNC_get_retval = 186, + BPF_FUNC_set_retval = 187, + BPF_FUNC_xdp_get_buff_len = 188, + BPF_FUNC_xdp_load_bytes = 189, + BPF_FUNC_xdp_store_bytes = 190, + BPF_FUNC_copy_from_user_task = 191, + BPF_FUNC_skb_set_tstamp = 192, + BPF_FUNC_ima_file_hash = 193, + BPF_FUNC_kptr_xchg = 194, + BPF_FUNC_map_lookup_percpu_elem = 195, + BPF_FUNC_skc_to_mptcp_sock = 196, + BPF_FUNC_dynptr_from_mem = 197, + BPF_FUNC_ringbuf_reserve_dynptr = 198, + BPF_FUNC_ringbuf_submit_dynptr = 199, + BPF_FUNC_ringbuf_discard_dynptr = 200, + BPF_FUNC_dynptr_read = 201, + BPF_FUNC_dynptr_write = 202, + BPF_FUNC_dynptr_data = 203, + BPF_FUNC_tcp_raw_gen_syncookie_ipv4 = 204, + BPF_FUNC_tcp_raw_gen_syncookie_ipv6 = 205, + BPF_FUNC_tcp_raw_check_syncookie_ipv4 = 206, + BPF_FUNC_tcp_raw_check_syncookie_ipv6 = 207, + BPF_FUNC_ktime_get_tai_ns = 208, + BPF_FUNC_user_ringbuf_drain = 209, + BPF_FUNC_cgrp_storage_get = 210, + BPF_FUNC_cgrp_storage_delete = 211, + __BPF_FUNC_MAX_ID = 212, +} pub const BPF_F_RECOMPUTE_CSUM: _bindgen_ty_6 = 1; pub const BPF_F_INVALIDATE_HASH: _bindgen_ty_6 = 2; pub type _bindgen_ty_6 = ::core::ffi::c_uint; @@ -916,6 +1350,18 @@ pub const BPF_F_CTXLEN_MASK: _bindgen_ty_14 = 4503595332403200; pub type _bindgen_ty_14 = ::core::ffi::c_ulong; pub const BPF_F_CURRENT_NETNS: _bindgen_ty_15 = -1; pub type _bindgen_ty_15 = ::core::ffi::c_int; +pub const BPF_CSUM_LEVEL_QUERY: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_QUERY; +pub const BPF_CSUM_LEVEL_INC: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_INC; +pub const BPF_CSUM_LEVEL_DEC: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_DEC; +pub const BPF_CSUM_LEVEL_RESET: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_RESET; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_16 { + BPF_CSUM_LEVEL_QUERY = 0, + BPF_CSUM_LEVEL_INC = 1, + BPF_CSUM_LEVEL_DEC = 2, + BPF_CSUM_LEVEL_RESET = 3, +} pub const BPF_F_ADJ_ROOM_FIXED_GSO: _bindgen_ty_17 = 1; pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: _bindgen_ty_17 = 2; pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: _bindgen_ty_17 = 4; @@ -926,19 +1372,74 @@ pub const BPF_F_ADJ_ROOM_ENCAP_L2_ETH: _bindgen_ty_17 = 64; pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV4: _bindgen_ty_17 = 128; pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV6: _bindgen_ty_17 = 256; pub type _bindgen_ty_17 = ::core::ffi::c_uint; +pub const BPF_ADJ_ROOM_ENCAP_L2_MASK: _bindgen_ty_18 = _bindgen_ty_18::BPF_ADJ_ROOM_ENCAP_L2_MASK; +pub const BPF_ADJ_ROOM_ENCAP_L2_SHIFT: _bindgen_ty_18 = _bindgen_ty_18::BPF_ADJ_ROOM_ENCAP_L2_SHIFT; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_18 { + BPF_ADJ_ROOM_ENCAP_L2_MASK = 255, + BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 56, +} pub const BPF_F_SYSCTL_BASE_NAME: _bindgen_ty_19 = 1; pub type _bindgen_ty_19 = ::core::ffi::c_uint; +pub const BPF_LOCAL_STORAGE_GET_F_CREATE: _bindgen_ty_20 = + _bindgen_ty_20::BPF_LOCAL_STORAGE_GET_F_CREATE; +pub const BPF_SK_STORAGE_GET_F_CREATE: _bindgen_ty_20 = + _bindgen_ty_20::BPF_LOCAL_STORAGE_GET_F_CREATE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_20 { + BPF_LOCAL_STORAGE_GET_F_CREATE = 1, +} pub const BPF_F_GET_BRANCH_RECORDS_SIZE: _bindgen_ty_21 = 1; pub type _bindgen_ty_21 = ::core::ffi::c_uint; +pub const BPF_RB_NO_WAKEUP: _bindgen_ty_22 = _bindgen_ty_22::BPF_RB_NO_WAKEUP; +pub const BPF_RB_FORCE_WAKEUP: _bindgen_ty_22 = _bindgen_ty_22::BPF_RB_FORCE_WAKEUP; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_22 { + BPF_RB_NO_WAKEUP = 1, + BPF_RB_FORCE_WAKEUP = 2, +} +pub const BPF_RB_AVAIL_DATA: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_AVAIL_DATA; +pub const BPF_RB_RING_SIZE: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_RING_SIZE; +pub const BPF_RB_CONS_POS: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_CONS_POS; +pub const BPF_RB_PROD_POS: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_PROD_POS; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_23 { + BPF_RB_AVAIL_DATA = 0, + BPF_RB_RING_SIZE = 1, + BPF_RB_CONS_POS = 2, + BPF_RB_PROD_POS = 3, +} pub const BPF_RINGBUF_BUSY_BIT: _bindgen_ty_24 = 2147483648; pub const BPF_RINGBUF_DISCARD_BIT: _bindgen_ty_24 = 1073741824; pub const BPF_RINGBUF_HDR_SZ: _bindgen_ty_24 = 8; pub type _bindgen_ty_24 = ::core::ffi::c_uint; +pub const BPF_SK_LOOKUP_F_REPLACE: _bindgen_ty_25 = _bindgen_ty_25::BPF_SK_LOOKUP_F_REPLACE; +pub const BPF_SK_LOOKUP_F_NO_REUSEPORT: _bindgen_ty_25 = + _bindgen_ty_25::BPF_SK_LOOKUP_F_NO_REUSEPORT; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_25 { + BPF_SK_LOOKUP_F_REPLACE = 1, + BPF_SK_LOOKUP_F_NO_REUSEPORT = 2, +} pub const BPF_F_BPRM_SECUREEXEC: _bindgen_ty_26 = 1; pub type _bindgen_ty_26 = ::core::ffi::c_uint; pub const BPF_F_BROADCAST: _bindgen_ty_27 = 8; pub const BPF_F_EXCLUDE_INGRESS: _bindgen_ty_27 = 16; pub type _bindgen_ty_27 = ::core::ffi::c_uint; +pub const BPF_SKB_TSTAMP_UNSPEC: _bindgen_ty_28 = _bindgen_ty_28::BPF_SKB_TSTAMP_UNSPEC; +pub const BPF_SKB_TSTAMP_DELIVERY_MONO: _bindgen_ty_28 = + _bindgen_ty_28::BPF_SKB_TSTAMP_DELIVERY_MONO; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_28 { + BPF_SKB_TSTAMP_UNSPEC = 0, + BPF_SKB_TSTAMP_DELIVERY_MONO = 1, +} #[repr(C)] #[derive(Copy, Clone)] pub struct bpf_devmap_val { @@ -1019,6 +1520,28 @@ impl bpf_prog_info { } } #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -1268,6 +1791,201 @@ pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_13 { pub ifindex: __u32, pub attach_type: __u32, } +pub const BPF_SOCK_OPS_RTO_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_RTO_CB_FLAG; +pub const BPF_SOCK_OPS_RETRANS_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_RETRANS_CB_FLAG; +pub const BPF_SOCK_OPS_STATE_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_STATE_CB_FLAG; +pub const BPF_SOCK_OPS_RTT_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_RTT_CB_FLAG; +pub const BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_ALL_CB_FLAGS: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_ALL_CB_FLAGS; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_29 { + BPF_SOCK_OPS_RTO_CB_FLAG = 1, + BPF_SOCK_OPS_RETRANS_CB_FLAG = 2, + BPF_SOCK_OPS_STATE_CB_FLAG = 4, + BPF_SOCK_OPS_RTT_CB_FLAG = 8, + BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG = 16, + BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG = 32, + BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG = 64, + BPF_SOCK_OPS_ALL_CB_FLAGS = 127, +} +pub const BPF_SOCK_OPS_VOID: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_VOID; +pub const BPF_SOCK_OPS_TIMEOUT_INIT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TIMEOUT_INIT; +pub const BPF_SOCK_OPS_RWND_INIT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RWND_INIT; +pub const BPF_SOCK_OPS_TCP_CONNECT_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TCP_CONNECT_CB; +pub const BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB; +pub const BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB; +pub const BPF_SOCK_OPS_NEEDS_ECN: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_NEEDS_ECN; +pub const BPF_SOCK_OPS_BASE_RTT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_BASE_RTT; +pub const BPF_SOCK_OPS_RTO_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RTO_CB; +pub const BPF_SOCK_OPS_RETRANS_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RETRANS_CB; +pub const BPF_SOCK_OPS_STATE_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_STATE_CB; +pub const BPF_SOCK_OPS_TCP_LISTEN_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TCP_LISTEN_CB; +pub const BPF_SOCK_OPS_RTT_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RTT_CB; +pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_PARSE_HDR_OPT_CB; +pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_HDR_OPT_LEN_CB; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_WRITE_HDR_OPT_CB; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_30 { + BPF_SOCK_OPS_VOID = 0, + BPF_SOCK_OPS_TIMEOUT_INIT = 1, + BPF_SOCK_OPS_RWND_INIT = 2, + BPF_SOCK_OPS_TCP_CONNECT_CB = 3, + BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 4, + BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 5, + BPF_SOCK_OPS_NEEDS_ECN = 6, + BPF_SOCK_OPS_BASE_RTT = 7, + BPF_SOCK_OPS_RTO_CB = 8, + BPF_SOCK_OPS_RETRANS_CB = 9, + BPF_SOCK_OPS_STATE_CB = 10, + BPF_SOCK_OPS_TCP_LISTEN_CB = 11, + BPF_SOCK_OPS_RTT_CB = 12, + BPF_SOCK_OPS_PARSE_HDR_OPT_CB = 13, + BPF_SOCK_OPS_HDR_OPT_LEN_CB = 14, + BPF_SOCK_OPS_WRITE_HDR_OPT_CB = 15, +} +pub const BPF_TCP_ESTABLISHED: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_ESTABLISHED; +pub const BPF_TCP_SYN_SENT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_SYN_SENT; +pub const BPF_TCP_SYN_RECV: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_SYN_RECV; +pub const BPF_TCP_FIN_WAIT1: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_FIN_WAIT1; +pub const BPF_TCP_FIN_WAIT2: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_FIN_WAIT2; +pub const BPF_TCP_TIME_WAIT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_TIME_WAIT; +pub const BPF_TCP_CLOSE: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSE; +pub const BPF_TCP_CLOSE_WAIT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSE_WAIT; +pub const BPF_TCP_LAST_ACK: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_LAST_ACK; +pub const BPF_TCP_LISTEN: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_LISTEN; +pub const BPF_TCP_CLOSING: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSING; +pub const BPF_TCP_NEW_SYN_RECV: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_NEW_SYN_RECV; +pub const BPF_TCP_BOUND_INACTIVE: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_BOUND_INACTIVE; +pub const BPF_TCP_MAX_STATES: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_MAX_STATES; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_31 { + BPF_TCP_ESTABLISHED = 1, + BPF_TCP_SYN_SENT = 2, + BPF_TCP_SYN_RECV = 3, + BPF_TCP_FIN_WAIT1 = 4, + BPF_TCP_FIN_WAIT2 = 5, + BPF_TCP_TIME_WAIT = 6, + BPF_TCP_CLOSE = 7, + BPF_TCP_CLOSE_WAIT = 8, + BPF_TCP_LAST_ACK = 9, + BPF_TCP_LISTEN = 10, + BPF_TCP_CLOSING = 11, + BPF_TCP_NEW_SYN_RECV = 12, + BPF_TCP_BOUND_INACTIVE = 13, + BPF_TCP_MAX_STATES = 14, +} +pub const BPF_LOAD_HDR_OPT_TCP_SYN: _bindgen_ty_33 = _bindgen_ty_33::BPF_LOAD_HDR_OPT_TCP_SYN; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_33 { + BPF_LOAD_HDR_OPT_TCP_SYN = 1, +} +pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: _bindgen_ty_34 = + _bindgen_ty_34::BPF_WRITE_HDR_TCP_CURRENT_MSS; +pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: _bindgen_ty_34 = + _bindgen_ty_34::BPF_WRITE_HDR_TCP_SYNACK_COOKIE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_34 { + BPF_WRITE_HDR_TCP_CURRENT_MSS = 1, + BPF_WRITE_HDR_TCP_SYNACK_COOKIE = 2, +} +pub const BPF_DEVCG_ACC_MKNOD: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_MKNOD; +pub const BPF_DEVCG_ACC_READ: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_READ; +pub const BPF_DEVCG_ACC_WRITE: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_WRITE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_35 { + BPF_DEVCG_ACC_MKNOD = 1, + BPF_DEVCG_ACC_READ = 2, + BPF_DEVCG_ACC_WRITE = 4, +} +pub const BPF_DEVCG_DEV_BLOCK: _bindgen_ty_36 = _bindgen_ty_36::BPF_DEVCG_DEV_BLOCK; +pub const BPF_DEVCG_DEV_CHAR: _bindgen_ty_36 = _bindgen_ty_36::BPF_DEVCG_DEV_CHAR; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_36 { + BPF_DEVCG_DEV_BLOCK = 1, + BPF_DEVCG_DEV_CHAR = 2, +} +pub const BPF_FIB_LOOKUP_DIRECT: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_DIRECT; +pub const BPF_FIB_LOOKUP_OUTPUT: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_OUTPUT; +pub const BPF_FIB_LOOKUP_SKIP_NEIGH: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_SKIP_NEIGH; +pub const BPF_FIB_LOOKUP_TBID: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_TBID; +pub const BPF_FIB_LOOKUP_SRC: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_SRC; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_37 { + BPF_FIB_LOOKUP_DIRECT = 1, + BPF_FIB_LOOKUP_OUTPUT = 2, + BPF_FIB_LOOKUP_SKIP_NEIGH = 4, + BPF_FIB_LOOKUP_TBID = 8, + BPF_FIB_LOOKUP_SRC = 16, +} +pub const BPF_FIB_LKUP_RET_SUCCESS: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_SUCCESS; +pub const BPF_FIB_LKUP_RET_BLACKHOLE: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_BLACKHOLE; +pub const BPF_FIB_LKUP_RET_UNREACHABLE: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_UNREACHABLE; +pub const BPF_FIB_LKUP_RET_PROHIBIT: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_PROHIBIT; +pub const BPF_FIB_LKUP_RET_NOT_FWDED: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_NOT_FWDED; +pub const BPF_FIB_LKUP_RET_FWD_DISABLED: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_FWD_DISABLED; +pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_UNSUPP_LWT; +pub const BPF_FIB_LKUP_RET_NO_NEIGH: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_NO_NEIGH; +pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_FRAG_NEEDED; +pub const BPF_FIB_LKUP_RET_NO_SRC_ADDR: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_NO_SRC_ADDR; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_38 { + BPF_FIB_LKUP_RET_SUCCESS = 0, + BPF_FIB_LKUP_RET_BLACKHOLE = 1, + BPF_FIB_LKUP_RET_UNREACHABLE = 2, + BPF_FIB_LKUP_RET_PROHIBIT = 3, + BPF_FIB_LKUP_RET_NOT_FWDED = 4, + BPF_FIB_LKUP_RET_FWD_DISABLED = 5, + BPF_FIB_LKUP_RET_UNSUPP_LWT = 6, + BPF_FIB_LKUP_RET_NO_NEIGH = 7, + BPF_FIB_LKUP_RET_FRAG_NEEDED = 8, + BPF_FIB_LKUP_RET_NO_SRC_ADDR = 9, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_task_fd_type { + BPF_FD_TYPE_RAW_TRACEPOINT = 0, + BPF_FD_TYPE_TRACEPOINT = 1, + BPF_FD_TYPE_KPROBE = 2, + BPF_FD_TYPE_KRETPROBE = 3, + BPF_FD_TYPE_UPROBE = 4, + BPF_FD_TYPE_URETPROBE = 5, +} +pub const BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_39 { + BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 1, + BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 2, + BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 4, +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bpf_func_info { @@ -1387,6 +2105,18 @@ pub struct btf_var_secinfo { pub struct btf_decl_tag { pub component_idx: __s32, } +impl nlmsgerr_attrs { + pub const NLMSGERR_ATTR_MAX: nlmsgerr_attrs = nlmsgerr_attrs::NLMSGERR_ATTR_COOKIE; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum nlmsgerr_attrs { + NLMSGERR_ATTR_UNUSED = 0, + NLMSGERR_ATTR_MSG = 1, + NLMSGERR_ATTR_OFFS = 2, + NLMSGERR_ATTR_COOKIE = 3, + __NLMSGERR_ATTR_MAX = 4, +} pub const IFLA_XDP_UNSPEC: _bindgen_ty_92 = 0; pub const IFLA_XDP_FD: _bindgen_ty_92 = 1; pub const IFLA_XDP_ATTACHED: _bindgen_ty_92 = 2; @@ -1398,6 +2128,29 @@ pub const IFLA_XDP_HW_PROG_ID: _bindgen_ty_92 = 7; pub const IFLA_XDP_EXPECTED_FD: _bindgen_ty_92 = 8; pub const __IFLA_XDP_MAX: _bindgen_ty_92 = 9; pub type _bindgen_ty_92 = ::core::ffi::c_uint; +impl nf_inet_hooks { + pub const NF_INET_INGRESS: nf_inet_hooks = nf_inet_hooks::NF_INET_NUMHOOKS; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum nf_inet_hooks { + NF_INET_PRE_ROUTING = 0, + NF_INET_LOCAL_IN = 1, + NF_INET_FORWARD = 2, + NF_INET_LOCAL_OUT = 3, + NF_INET_POST_ROUTING = 4, + NF_INET_NUMHOOKS = 5, +} +pub const NFPROTO_UNSPEC: _bindgen_ty_99 = 0; +pub const NFPROTO_INET: _bindgen_ty_99 = 1; +pub const NFPROTO_IPV4: _bindgen_ty_99 = 2; +pub const NFPROTO_ARP: _bindgen_ty_99 = 3; +pub const NFPROTO_NETDEV: _bindgen_ty_99 = 5; +pub const NFPROTO_BRIDGE: _bindgen_ty_99 = 7; +pub const NFPROTO_IPV6: _bindgen_ty_99 = 10; +pub const NFPROTO_DECNET: _bindgen_ty_99 = 12; +pub const NFPROTO_NUMPROTO: _bindgen_ty_99 = 13; +pub type _bindgen_ty_99 = ::core::ffi::c_uint; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum perf_type_id { @@ -1567,6 +2320,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn disabled_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_disabled_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } } @@ -1578,6 +2353,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn pinned(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } } @@ -1589,6 +2386,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn pinned_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_pinned_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclusive(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } } @@ -1600,6 +2419,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclusive_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclusive_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_user(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } } @@ -1611,6 +2452,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_kernel(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } } @@ -1622,6 +2485,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_hv(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } } @@ -1633,6 +2518,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_hv_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_hv_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_idle(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } } @@ -1644,6 +2551,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_idle_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_idle_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn mmap(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } } @@ -1655,6 +2584,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn comm(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } } @@ -1666,6 +2617,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn comm_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn freq(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } } @@ -1677,6 +2650,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn freq_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_freq_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit_stat(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } } @@ -1688,17 +2683,61 @@ impl perf_event_attr { } } #[inline] - pub fn enable_on_exec(&self) -> __u64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } + pub unsafe fn inherit_stat_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u64) + } } #[inline] - pub fn set_enable_on_exec(&mut self, val: __u64) { + pub unsafe fn set_inherit_stat_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_on_exec(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } + } + #[inline] + pub fn set_enable_on_exec(&mut self, val: __u64) { unsafe { let val: u64 = ::core::mem::transmute(val); self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] + pub unsafe fn enable_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_enable_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn task(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) } } @@ -1710,6 +2749,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn task_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_task_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn watermark(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) } } @@ -1721,6 +2782,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn watermark_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_watermark_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn precise_ip(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 2u8) as u64) } } @@ -1732,6 +2815,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn precise_ip_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 2u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_precise_ip_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 2u8, + val as u64, + ) + } + } + #[inline] pub fn mmap_data(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } } @@ -1743,6 +2848,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap_data_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_data_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn sample_id_all(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } } @@ -1754,6 +2881,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn sample_id_all_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sample_id_all_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_host(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } } @@ -1765,6 +2914,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_host_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_host_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_guest(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } } @@ -1776,6 +2947,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_guest_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_guest_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_callchain_kernel(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) } } @@ -1787,6 +2980,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_callchain_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 21usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 21usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_callchain_user(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) } } @@ -1798,6 +3013,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_callchain_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 22usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 22usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn mmap2(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) } } @@ -1809,6 +3046,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap2_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 23usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap2_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 23usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn comm_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) } } @@ -1820,6 +3079,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn comm_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 24usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 24usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn use_clockid(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) } } @@ -1831,6 +3112,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn use_clockid_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 25usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_use_clockid_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 25usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn context_switch(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) } } @@ -1842,6 +3145,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn context_switch_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 26usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_context_switch_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 26usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn write_backward(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) } } @@ -1853,6 +3178,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn write_backward_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 27usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_write_backward_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 27usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn namespaces(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) } } @@ -1864,6 +3211,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn namespaces_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 28usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_namespaces_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 28usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn ksymbol(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) } } @@ -1875,6 +3244,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn ksymbol_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 29usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_ksymbol_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 29usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn bpf_event(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u64) } } @@ -1886,6 +3277,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn bpf_event_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 30usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_bpf_event_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 30usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn aux_output(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u64) } } @@ -1897,6 +3310,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn aux_output_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_aux_output_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cgroup(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } } @@ -1908,6 +3343,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn cgroup_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cgroup_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn text_poke(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) } } @@ -1919,6 +3376,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn text_poke_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 33usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_text_poke_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 33usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn build_id(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) } } @@ -1930,6 +3409,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn build_id_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 34usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_build_id_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 34usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit_thread(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) } } @@ -1941,6 +3442,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_thread_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 35usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_thread_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 35usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn remove_on_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) } } @@ -1952,6 +3475,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn remove_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 36usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_remove_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 36usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn sigtrap(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } } @@ -1963,6 +3508,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn sigtrap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 37usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sigtrap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 37usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __reserved_1(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) } } @@ -1974,6 +3541,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn __reserved_1_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 38usize, + 26u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set___reserved_1_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 38usize, + 26u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( disabled: __u64, inherit: __u64, @@ -2227,6 +3816,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_bit0_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_bit0_is_deprecated(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } } @@ -2238,6 +3849,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_bit0_is_deprecated_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_is_deprecated_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_rdpmc(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } } @@ -2249,6 +3882,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_rdpmc_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_rdpmc_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } } @@ -2260,6 +3915,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time_zero(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } } @@ -2271,6 +3948,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_zero_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_zero_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time_short(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } } @@ -2282,6 +3981,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_short_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_short_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_____res(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) } } @@ -2293,6 +4014,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_____res_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 58u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_____res_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 58u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( cap_bit0: __u64, cap_bit0_is_deprecated: __u64, @@ -2368,20 +4111,20 @@ pub enum perf_event_type { PERF_RECORD_AUX_OUTPUT_HW_ID = 21, PERF_RECORD_MAX = 22, } -pub const TCA_BPF_UNSPEC: _bindgen_ty_152 = 0; -pub const TCA_BPF_ACT: _bindgen_ty_152 = 1; -pub const TCA_BPF_POLICE: _bindgen_ty_152 = 2; -pub const TCA_BPF_CLASSID: _bindgen_ty_152 = 3; -pub const TCA_BPF_OPS_LEN: _bindgen_ty_152 = 4; -pub const TCA_BPF_OPS: _bindgen_ty_152 = 5; -pub const TCA_BPF_FD: _bindgen_ty_152 = 6; -pub const TCA_BPF_NAME: _bindgen_ty_152 = 7; -pub const TCA_BPF_FLAGS: _bindgen_ty_152 = 8; -pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_152 = 9; -pub const TCA_BPF_TAG: _bindgen_ty_152 = 10; -pub const TCA_BPF_ID: _bindgen_ty_152 = 11; -pub const __TCA_BPF_MAX: _bindgen_ty_152 = 12; -pub type _bindgen_ty_152 = ::core::ffi::c_uint; +pub const TCA_BPF_UNSPEC: _bindgen_ty_154 = 0; +pub const TCA_BPF_ACT: _bindgen_ty_154 = 1; +pub const TCA_BPF_POLICE: _bindgen_ty_154 = 2; +pub const TCA_BPF_CLASSID: _bindgen_ty_154 = 3; +pub const TCA_BPF_OPS_LEN: _bindgen_ty_154 = 4; +pub const TCA_BPF_OPS: _bindgen_ty_154 = 5; +pub const TCA_BPF_FD: _bindgen_ty_154 = 6; +pub const TCA_BPF_NAME: _bindgen_ty_154 = 7; +pub const TCA_BPF_FLAGS: _bindgen_ty_154 = 8; +pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_154 = 9; +pub const TCA_BPF_TAG: _bindgen_ty_154 = 10; +pub const TCA_BPF_ID: _bindgen_ty_154 = 11; +pub const __TCA_BPF_MAX: _bindgen_ty_154 = 12; +pub type _bindgen_ty_154 = ::core::ffi::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ifinfomsg { @@ -2403,24 +4146,22 @@ pub struct tcmsg { pub tcm_parent: __u32, pub tcm_info: __u32, } -pub const TCA_UNSPEC: _bindgen_ty_172 = 0; -pub const TCA_KIND: _bindgen_ty_172 = 1; -pub const TCA_OPTIONS: _bindgen_ty_172 = 2; -pub const TCA_STATS: _bindgen_ty_172 = 3; -pub const TCA_XSTATS: _bindgen_ty_172 = 4; -pub const TCA_RATE: _bindgen_ty_172 = 5; -pub const TCA_FCNT: _bindgen_ty_172 = 6; -pub const TCA_STATS2: _bindgen_ty_172 = 7; -pub const TCA_STAB: _bindgen_ty_172 = 8; -pub const TCA_PAD: _bindgen_ty_172 = 9; -pub const TCA_DUMP_INVISIBLE: _bindgen_ty_172 = 10; -pub const TCA_CHAIN: _bindgen_ty_172 = 11; -pub const TCA_HW_OFFLOAD: _bindgen_ty_172 = 12; -pub const TCA_INGRESS_BLOCK: _bindgen_ty_172 = 13; -pub const TCA_EGRESS_BLOCK: _bindgen_ty_172 = 14; -pub const TCA_DUMP_FLAGS: _bindgen_ty_172 = 15; -pub const __TCA_MAX: _bindgen_ty_172 = 16; -pub type _bindgen_ty_172 = ::core::ffi::c_uint; -pub const AYA_PERF_EVENT_IOC_ENABLE: ::core::ffi::c_int = 9216; -pub const AYA_PERF_EVENT_IOC_DISABLE: ::core::ffi::c_int = 9217; -pub const AYA_PERF_EVENT_IOC_SET_BPF: ::core::ffi::c_int = 1074013192; +pub const TCA_UNSPEC: _bindgen_ty_174 = 0; +pub const TCA_KIND: _bindgen_ty_174 = 1; +pub const TCA_OPTIONS: _bindgen_ty_174 = 2; +pub const TCA_STATS: _bindgen_ty_174 = 3; +pub const TCA_XSTATS: _bindgen_ty_174 = 4; +pub const TCA_RATE: _bindgen_ty_174 = 5; +pub const TCA_FCNT: _bindgen_ty_174 = 6; +pub const TCA_STATS2: _bindgen_ty_174 = 7; +pub const TCA_STAB: _bindgen_ty_174 = 8; +pub const TCA_PAD: _bindgen_ty_174 = 9; +pub const TCA_DUMP_INVISIBLE: _bindgen_ty_174 = 10; +pub const TCA_CHAIN: _bindgen_ty_174 = 11; +pub const TCA_HW_OFFLOAD: _bindgen_ty_174 = 12; +pub const TCA_INGRESS_BLOCK: _bindgen_ty_174 = 13; +pub const TCA_EGRESS_BLOCK: _bindgen_ty_174 = 14; +pub const TCA_DUMP_FLAGS: _bindgen_ty_174 = 15; +pub const TCA_EXT_WARN_MSG: _bindgen_ty_174 = 16; +pub const __TCA_MAX: _bindgen_ty_174 = 17; +pub type _bindgen_ty_174 = ::core::ffi::c_uint; diff --git a/aya-obj/src/generated/linux_bindings_armv7.rs b/aya-obj/src/generated/linux_bindings_armv7.rs index 4dcfeb80..08b3a162 100644 --- a/aya-obj/src/generated/linux_bindings_armv7.rs +++ b/aya-obj/src/generated/linux_bindings_armv7.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.69.4 */ +/* automatically generated by rust-bindgen 0.72.1 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] @@ -16,10 +16,7 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -29,21 +26,46 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; - if val { - *byte |= mask; - } else { - *byte &= !mask; - } + if val { byte | mask } else { byte & !mask } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -64,6 +86,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -79,6 +119,22 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } } #[repr(C)] #[derive(Default)] @@ -110,21 +166,68 @@ impl ::core::fmt::Debug for __IncompleteArrayField { fmt.write_str("__IncompleteArrayField") } } -pub const SO_ATTACH_BPF: u32 = 50; -pub const SO_DETACH_BPF: u32 = 27; pub const BPF_LD: u32 = 0; pub const BPF_LDX: u32 = 1; pub const BPF_ST: u32 = 2; pub const BPF_STX: u32 = 3; pub const BPF_ALU: u32 = 4; pub const BPF_JMP: u32 = 5; +pub const BPF_RET: u32 = 6; +pub const BPF_MISC: u32 = 7; pub const BPF_W: u32 = 0; pub const BPF_H: u32 = 8; pub const BPF_B: u32 = 16; +pub const BPF_IMM: u32 = 0; +pub const BPF_ABS: u32 = 32; +pub const BPF_IND: u32 = 64; +pub const BPF_MEM: u32 = 96; +pub const BPF_LEN: u32 = 128; +pub const BPF_MSH: u32 = 160; +pub const BPF_ADD: u32 = 0; +pub const BPF_SUB: u32 = 16; +pub const BPF_MUL: u32 = 32; +pub const BPF_DIV: u32 = 48; +pub const BPF_OR: u32 = 64; +pub const BPF_AND: u32 = 80; +pub const BPF_LSH: u32 = 96; +pub const BPF_RSH: u32 = 112; +pub const BPF_NEG: u32 = 128; +pub const BPF_MOD: u32 = 144; +pub const BPF_XOR: u32 = 160; +pub const BPF_JA: u32 = 0; +pub const BPF_JEQ: u32 = 16; +pub const BPF_JGT: u32 = 32; +pub const BPF_JGE: u32 = 48; +pub const BPF_JSET: u32 = 64; pub const BPF_K: u32 = 0; +pub const BPF_X: u32 = 8; +pub const BPF_MAXINSNS: u32 = 4096; +pub const BPF_JMP32: u32 = 6; pub const BPF_ALU64: u32 = 7; pub const BPF_DW: u32 = 24; +pub const BPF_MEMSX: u32 = 128; +pub const BPF_ATOMIC: u32 = 192; +pub const BPF_XADD: u32 = 192; +pub const BPF_MOV: u32 = 176; +pub const BPF_ARSH: u32 = 192; +pub const BPF_END: u32 = 208; +pub const BPF_TO_LE: u32 = 0; +pub const BPF_TO_BE: u32 = 8; +pub const BPF_FROM_LE: u32 = 0; +pub const BPF_FROM_BE: u32 = 8; +pub const BPF_JNE: u32 = 80; +pub const BPF_JLT: u32 = 160; +pub const BPF_JLE: u32 = 176; +pub const BPF_JSGT: u32 = 96; +pub const BPF_JSGE: u32 = 112; +pub const BPF_JSLT: u32 = 192; +pub const BPF_JSLE: u32 = 208; +pub const BPF_JCOND: u32 = 224; pub const BPF_CALL: u32 = 128; +pub const BPF_EXIT: u32 = 144; +pub const BPF_FETCH: u32 = 1; +pub const BPF_XCHG: u32 = 225; +pub const BPF_CMPXCHG: u32 = 241; pub const BPF_F_ALLOW_OVERRIDE: u32 = 1; pub const BPF_F_ALLOW_MULTI: u32 = 2; pub const BPF_F_REPLACE: u32 = 4; @@ -151,6 +254,9 @@ pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2; pub const BPF_F_QUERY_EFFECTIVE: u32 = 1; pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1; pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2; +pub const BPF_BUILD_ID_SIZE: u32 = 20; +pub const BPF_OBJ_NAME_LEN: u32 = 16; +pub const BPF_TAG_SIZE: u32 = 8; pub const BTF_INT_SIGNED: u32 = 1; pub const BTF_INT_CHAR: u32 = 2; pub const BTF_INT_BOOL: u32 = 4; @@ -162,6 +268,18 @@ pub const XDP_FLAGS_HW_MODE: u32 = 8; pub const XDP_FLAGS_REPLACE: u32 = 16; pub const XDP_FLAGS_MODES: u32 = 14; pub const XDP_FLAGS_MASK: u32 = 31; +pub const PERF_EVENT_IOC_ENABLE: u32 = 9216; +pub const PERF_EVENT_IOC_DISABLE: u32 = 9217; +pub const PERF_EVENT_IOC_REFRESH: u32 = 9218; +pub const PERF_EVENT_IOC_RESET: u32 = 9219; +pub const PERF_EVENT_IOC_PERIOD: u32 = 1074275332; +pub const PERF_EVENT_IOC_SET_OUTPUT: u32 = 9221; +pub const PERF_EVENT_IOC_SET_FILTER: u32 = 1074013190; +pub const PERF_EVENT_IOC_ID: u32 = 2147755015; +pub const PERF_EVENT_IOC_SET_BPF: u32 = 1074013192; +pub const PERF_EVENT_IOC_PAUSE_OUTPUT: u32 = 1074013193; +pub const PERF_EVENT_IOC_QUERY_BPF: u32 = 3221496842; +pub const PERF_EVENT_IOC_MODIFY_ATTRIBUTES: u32 = 1074013195; pub const PERF_MAX_STACK_DEPTH: u32 = 127; pub const PERF_MAX_CONTEXTS_PER_STACK: u32 = 8; pub const PERF_FLAG_FD_NO_GROUP: u32 = 1; @@ -178,6 +296,8 @@ pub const TC_H_MIN_PRIORITY: u32 = 65504; pub const TC_H_MIN_INGRESS: u32 = 65522; pub const TC_H_MIN_EGRESS: u32 = 65523; pub const TCA_BPF_FLAG_ACT_DIRECT: u32 = 1; +pub const SO_ATTACH_BPF: u32 = 50; +pub const SO_DETACH_BPF: u32 = 27; pub type __u8 = ::core::ffi::c_uchar; pub type __s16 = ::core::ffi::c_short; pub type __u16 = ::core::ffi::c_ushort; @@ -185,6 +305,34 @@ pub type __s32 = ::core::ffi::c_int; pub type __u32 = ::core::ffi::c_uint; pub type __s64 = ::core::ffi::c_longlong; pub type __u64 = ::core::ffi::c_ulonglong; +pub const BPF_REG_0: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_0; +pub const BPF_REG_1: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_1; +pub const BPF_REG_2: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_2; +pub const BPF_REG_3: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_3; +pub const BPF_REG_4: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_4; +pub const BPF_REG_5: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_5; +pub const BPF_REG_6: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_6; +pub const BPF_REG_7: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_7; +pub const BPF_REG_8: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_8; +pub const BPF_REG_9: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_9; +pub const BPF_REG_10: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_10; +pub const __MAX_BPF_REG: _bindgen_ty_1 = _bindgen_ty_1::__MAX_BPF_REG; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { + BPF_REG_0 = 0, + BPF_REG_1 = 1, + BPF_REG_2 = 2, + BPF_REG_3 = 3, + BPF_REG_4 = 4, + BPF_REG_5 = 5, + BPF_REG_6 = 6, + BPF_REG_7 = 7, + BPF_REG_8 = 8, + BPF_REG_9 = 9, + BPF_REG_10 = 10, + __MAX_BPF_REG = 11, +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bpf_insn { @@ -207,6 +355,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn src_reg(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -218,6 +388,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -237,6 +429,15 @@ pub struct bpf_lpm_trie_key { pub prefixlen: __u32, pub data: __IncompleteArrayField<__u8>, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_cgroup_iter_order { + BPF_CGROUP_ITER_ORDER_UNSPEC = 0, + BPF_CGROUP_ITER_SELF_ONLY = 1, + BPF_CGROUP_ITER_DESCENDANTS_PRE = 2, + BPF_CGROUP_ITER_DESCENDANTS_POST = 3, + BPF_CGROUP_ITER_ANCESTORS_UP = 4, +} impl bpf_cmd { pub const BPF_PROG_RUN: bpf_cmd = bpf_cmd::BPF_PROG_TEST_RUN; } @@ -447,6 +648,17 @@ pub enum bpf_link_type { BPF_LINK_TYPE_NETKIT = 13, __MAX_BPF_LINK_TYPE = 14, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_perf_event_type { + BPF_PERF_EVENT_UNSPEC = 0, + BPF_PERF_EVENT_UPROBE = 1, + BPF_PERF_EVENT_URETPROBE = 2, + BPF_PERF_EVENT_KPROBE = 3, + BPF_PERF_EVENT_KRETPROBE = 4, + BPF_PERF_EVENT_TRACEPOINT = 5, + BPF_PERF_EVENT_EVENT = 6, +} pub const BPF_F_KPROBE_MULTI_RETURN: _bindgen_ty_2 = 1; pub type _bindgen_ty_2 = ::core::ffi::c_uint; pub const BPF_F_UPROBE_MULTI_RETURN: _bindgen_ty_3 = 1; @@ -476,6 +688,11 @@ pub const BPF_F_TOKEN_FD: _bindgen_ty_5 = 65536; pub const BPF_F_SEGV_ON_FAULT: _bindgen_ty_5 = 131072; pub const BPF_F_NO_USER_CONV: _bindgen_ty_5 = 262144; pub type _bindgen_ty_5 = ::core::ffi::c_uint; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_stats_type { + BPF_STATS_RUN_TIME = 0, +} #[repr(C)] #[derive(Copy, Clone)] pub union bpf_attr { @@ -884,6 +1101,223 @@ pub struct bpf_attr__bindgen_ty_20 { pub flags: __u32, pub bpffs_fd: __u32, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_func_id { + BPF_FUNC_unspec = 0, + BPF_FUNC_map_lookup_elem = 1, + BPF_FUNC_map_update_elem = 2, + BPF_FUNC_map_delete_elem = 3, + BPF_FUNC_probe_read = 4, + BPF_FUNC_ktime_get_ns = 5, + BPF_FUNC_trace_printk = 6, + BPF_FUNC_get_prandom_u32 = 7, + BPF_FUNC_get_smp_processor_id = 8, + BPF_FUNC_skb_store_bytes = 9, + BPF_FUNC_l3_csum_replace = 10, + BPF_FUNC_l4_csum_replace = 11, + BPF_FUNC_tail_call = 12, + BPF_FUNC_clone_redirect = 13, + BPF_FUNC_get_current_pid_tgid = 14, + BPF_FUNC_get_current_uid_gid = 15, + BPF_FUNC_get_current_comm = 16, + BPF_FUNC_get_cgroup_classid = 17, + BPF_FUNC_skb_vlan_push = 18, + BPF_FUNC_skb_vlan_pop = 19, + BPF_FUNC_skb_get_tunnel_key = 20, + BPF_FUNC_skb_set_tunnel_key = 21, + BPF_FUNC_perf_event_read = 22, + BPF_FUNC_redirect = 23, + BPF_FUNC_get_route_realm = 24, + BPF_FUNC_perf_event_output = 25, + BPF_FUNC_skb_load_bytes = 26, + BPF_FUNC_get_stackid = 27, + BPF_FUNC_csum_diff = 28, + BPF_FUNC_skb_get_tunnel_opt = 29, + BPF_FUNC_skb_set_tunnel_opt = 30, + BPF_FUNC_skb_change_proto = 31, + BPF_FUNC_skb_change_type = 32, + BPF_FUNC_skb_under_cgroup = 33, + BPF_FUNC_get_hash_recalc = 34, + BPF_FUNC_get_current_task = 35, + BPF_FUNC_probe_write_user = 36, + BPF_FUNC_current_task_under_cgroup = 37, + BPF_FUNC_skb_change_tail = 38, + BPF_FUNC_skb_pull_data = 39, + BPF_FUNC_csum_update = 40, + BPF_FUNC_set_hash_invalid = 41, + BPF_FUNC_get_numa_node_id = 42, + BPF_FUNC_skb_change_head = 43, + BPF_FUNC_xdp_adjust_head = 44, + BPF_FUNC_probe_read_str = 45, + BPF_FUNC_get_socket_cookie = 46, + BPF_FUNC_get_socket_uid = 47, + BPF_FUNC_set_hash = 48, + BPF_FUNC_setsockopt = 49, + BPF_FUNC_skb_adjust_room = 50, + BPF_FUNC_redirect_map = 51, + BPF_FUNC_sk_redirect_map = 52, + BPF_FUNC_sock_map_update = 53, + BPF_FUNC_xdp_adjust_meta = 54, + BPF_FUNC_perf_event_read_value = 55, + BPF_FUNC_perf_prog_read_value = 56, + BPF_FUNC_getsockopt = 57, + BPF_FUNC_override_return = 58, + BPF_FUNC_sock_ops_cb_flags_set = 59, + BPF_FUNC_msg_redirect_map = 60, + BPF_FUNC_msg_apply_bytes = 61, + BPF_FUNC_msg_cork_bytes = 62, + BPF_FUNC_msg_pull_data = 63, + BPF_FUNC_bind = 64, + BPF_FUNC_xdp_adjust_tail = 65, + BPF_FUNC_skb_get_xfrm_state = 66, + BPF_FUNC_get_stack = 67, + BPF_FUNC_skb_load_bytes_relative = 68, + BPF_FUNC_fib_lookup = 69, + BPF_FUNC_sock_hash_update = 70, + BPF_FUNC_msg_redirect_hash = 71, + BPF_FUNC_sk_redirect_hash = 72, + BPF_FUNC_lwt_push_encap = 73, + BPF_FUNC_lwt_seg6_store_bytes = 74, + BPF_FUNC_lwt_seg6_adjust_srh = 75, + BPF_FUNC_lwt_seg6_action = 76, + BPF_FUNC_rc_repeat = 77, + BPF_FUNC_rc_keydown = 78, + BPF_FUNC_skb_cgroup_id = 79, + BPF_FUNC_get_current_cgroup_id = 80, + BPF_FUNC_get_local_storage = 81, + BPF_FUNC_sk_select_reuseport = 82, + BPF_FUNC_skb_ancestor_cgroup_id = 83, + BPF_FUNC_sk_lookup_tcp = 84, + BPF_FUNC_sk_lookup_udp = 85, + BPF_FUNC_sk_release = 86, + BPF_FUNC_map_push_elem = 87, + BPF_FUNC_map_pop_elem = 88, + BPF_FUNC_map_peek_elem = 89, + BPF_FUNC_msg_push_data = 90, + BPF_FUNC_msg_pop_data = 91, + BPF_FUNC_rc_pointer_rel = 92, + BPF_FUNC_spin_lock = 93, + BPF_FUNC_spin_unlock = 94, + BPF_FUNC_sk_fullsock = 95, + BPF_FUNC_tcp_sock = 96, + BPF_FUNC_skb_ecn_set_ce = 97, + BPF_FUNC_get_listener_sock = 98, + BPF_FUNC_skc_lookup_tcp = 99, + BPF_FUNC_tcp_check_syncookie = 100, + BPF_FUNC_sysctl_get_name = 101, + BPF_FUNC_sysctl_get_current_value = 102, + BPF_FUNC_sysctl_get_new_value = 103, + BPF_FUNC_sysctl_set_new_value = 104, + BPF_FUNC_strtol = 105, + BPF_FUNC_strtoul = 106, + BPF_FUNC_sk_storage_get = 107, + BPF_FUNC_sk_storage_delete = 108, + BPF_FUNC_send_signal = 109, + BPF_FUNC_tcp_gen_syncookie = 110, + BPF_FUNC_skb_output = 111, + BPF_FUNC_probe_read_user = 112, + BPF_FUNC_probe_read_kernel = 113, + BPF_FUNC_probe_read_user_str = 114, + BPF_FUNC_probe_read_kernel_str = 115, + BPF_FUNC_tcp_send_ack = 116, + BPF_FUNC_send_signal_thread = 117, + BPF_FUNC_jiffies64 = 118, + BPF_FUNC_read_branch_records = 119, + BPF_FUNC_get_ns_current_pid_tgid = 120, + BPF_FUNC_xdp_output = 121, + BPF_FUNC_get_netns_cookie = 122, + BPF_FUNC_get_current_ancestor_cgroup_id = 123, + BPF_FUNC_sk_assign = 124, + BPF_FUNC_ktime_get_boot_ns = 125, + BPF_FUNC_seq_printf = 126, + BPF_FUNC_seq_write = 127, + BPF_FUNC_sk_cgroup_id = 128, + BPF_FUNC_sk_ancestor_cgroup_id = 129, + BPF_FUNC_ringbuf_output = 130, + BPF_FUNC_ringbuf_reserve = 131, + BPF_FUNC_ringbuf_submit = 132, + BPF_FUNC_ringbuf_discard = 133, + BPF_FUNC_ringbuf_query = 134, + BPF_FUNC_csum_level = 135, + BPF_FUNC_skc_to_tcp6_sock = 136, + BPF_FUNC_skc_to_tcp_sock = 137, + BPF_FUNC_skc_to_tcp_timewait_sock = 138, + BPF_FUNC_skc_to_tcp_request_sock = 139, + BPF_FUNC_skc_to_udp6_sock = 140, + BPF_FUNC_get_task_stack = 141, + BPF_FUNC_load_hdr_opt = 142, + BPF_FUNC_store_hdr_opt = 143, + BPF_FUNC_reserve_hdr_opt = 144, + BPF_FUNC_inode_storage_get = 145, + BPF_FUNC_inode_storage_delete = 146, + BPF_FUNC_d_path = 147, + BPF_FUNC_copy_from_user = 148, + BPF_FUNC_snprintf_btf = 149, + BPF_FUNC_seq_printf_btf = 150, + BPF_FUNC_skb_cgroup_classid = 151, + BPF_FUNC_redirect_neigh = 152, + BPF_FUNC_per_cpu_ptr = 153, + BPF_FUNC_this_cpu_ptr = 154, + BPF_FUNC_redirect_peer = 155, + BPF_FUNC_task_storage_get = 156, + BPF_FUNC_task_storage_delete = 157, + BPF_FUNC_get_current_task_btf = 158, + BPF_FUNC_bprm_opts_set = 159, + BPF_FUNC_ktime_get_coarse_ns = 160, + BPF_FUNC_ima_inode_hash = 161, + BPF_FUNC_sock_from_file = 162, + BPF_FUNC_check_mtu = 163, + BPF_FUNC_for_each_map_elem = 164, + BPF_FUNC_snprintf = 165, + BPF_FUNC_sys_bpf = 166, + BPF_FUNC_btf_find_by_name_kind = 167, + BPF_FUNC_sys_close = 168, + BPF_FUNC_timer_init = 169, + BPF_FUNC_timer_set_callback = 170, + BPF_FUNC_timer_start = 171, + BPF_FUNC_timer_cancel = 172, + BPF_FUNC_get_func_ip = 173, + BPF_FUNC_get_attach_cookie = 174, + BPF_FUNC_task_pt_regs = 175, + BPF_FUNC_get_branch_snapshot = 176, + BPF_FUNC_trace_vprintk = 177, + BPF_FUNC_skc_to_unix_sock = 178, + BPF_FUNC_kallsyms_lookup_name = 179, + BPF_FUNC_find_vma = 180, + BPF_FUNC_loop = 181, + BPF_FUNC_strncmp = 182, + BPF_FUNC_get_func_arg = 183, + BPF_FUNC_get_func_ret = 184, + BPF_FUNC_get_func_arg_cnt = 185, + BPF_FUNC_get_retval = 186, + BPF_FUNC_set_retval = 187, + BPF_FUNC_xdp_get_buff_len = 188, + BPF_FUNC_xdp_load_bytes = 189, + BPF_FUNC_xdp_store_bytes = 190, + BPF_FUNC_copy_from_user_task = 191, + BPF_FUNC_skb_set_tstamp = 192, + BPF_FUNC_ima_file_hash = 193, + BPF_FUNC_kptr_xchg = 194, + BPF_FUNC_map_lookup_percpu_elem = 195, + BPF_FUNC_skc_to_mptcp_sock = 196, + BPF_FUNC_dynptr_from_mem = 197, + BPF_FUNC_ringbuf_reserve_dynptr = 198, + BPF_FUNC_ringbuf_submit_dynptr = 199, + BPF_FUNC_ringbuf_discard_dynptr = 200, + BPF_FUNC_dynptr_read = 201, + BPF_FUNC_dynptr_write = 202, + BPF_FUNC_dynptr_data = 203, + BPF_FUNC_tcp_raw_gen_syncookie_ipv4 = 204, + BPF_FUNC_tcp_raw_gen_syncookie_ipv6 = 205, + BPF_FUNC_tcp_raw_check_syncookie_ipv4 = 206, + BPF_FUNC_tcp_raw_check_syncookie_ipv6 = 207, + BPF_FUNC_ktime_get_tai_ns = 208, + BPF_FUNC_user_ringbuf_drain = 209, + BPF_FUNC_cgrp_storage_get = 210, + BPF_FUNC_cgrp_storage_delete = 211, + __BPF_FUNC_MAX_ID = 212, +} pub const BPF_F_RECOMPUTE_CSUM: _bindgen_ty_6 = 1; pub const BPF_F_INVALIDATE_HASH: _bindgen_ty_6 = 2; pub type _bindgen_ty_6 = ::core::ffi::c_uint; @@ -916,6 +1350,18 @@ pub const BPF_F_CTXLEN_MASK: _bindgen_ty_14 = 4503595332403200; pub type _bindgen_ty_14 = ::core::ffi::c_ulonglong; pub const BPF_F_CURRENT_NETNS: _bindgen_ty_15 = -1; pub type _bindgen_ty_15 = ::core::ffi::c_int; +pub const BPF_CSUM_LEVEL_QUERY: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_QUERY; +pub const BPF_CSUM_LEVEL_INC: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_INC; +pub const BPF_CSUM_LEVEL_DEC: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_DEC; +pub const BPF_CSUM_LEVEL_RESET: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_RESET; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_16 { + BPF_CSUM_LEVEL_QUERY = 0, + BPF_CSUM_LEVEL_INC = 1, + BPF_CSUM_LEVEL_DEC = 2, + BPF_CSUM_LEVEL_RESET = 3, +} pub const BPF_F_ADJ_ROOM_FIXED_GSO: _bindgen_ty_17 = 1; pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: _bindgen_ty_17 = 2; pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: _bindgen_ty_17 = 4; @@ -926,19 +1372,74 @@ pub const BPF_F_ADJ_ROOM_ENCAP_L2_ETH: _bindgen_ty_17 = 64; pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV4: _bindgen_ty_17 = 128; pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV6: _bindgen_ty_17 = 256; pub type _bindgen_ty_17 = ::core::ffi::c_uint; +pub const BPF_ADJ_ROOM_ENCAP_L2_MASK: _bindgen_ty_18 = _bindgen_ty_18::BPF_ADJ_ROOM_ENCAP_L2_MASK; +pub const BPF_ADJ_ROOM_ENCAP_L2_SHIFT: _bindgen_ty_18 = _bindgen_ty_18::BPF_ADJ_ROOM_ENCAP_L2_SHIFT; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_18 { + BPF_ADJ_ROOM_ENCAP_L2_MASK = 255, + BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 56, +} pub const BPF_F_SYSCTL_BASE_NAME: _bindgen_ty_19 = 1; pub type _bindgen_ty_19 = ::core::ffi::c_uint; +pub const BPF_LOCAL_STORAGE_GET_F_CREATE: _bindgen_ty_20 = + _bindgen_ty_20::BPF_LOCAL_STORAGE_GET_F_CREATE; +pub const BPF_SK_STORAGE_GET_F_CREATE: _bindgen_ty_20 = + _bindgen_ty_20::BPF_LOCAL_STORAGE_GET_F_CREATE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_20 { + BPF_LOCAL_STORAGE_GET_F_CREATE = 1, +} pub const BPF_F_GET_BRANCH_RECORDS_SIZE: _bindgen_ty_21 = 1; pub type _bindgen_ty_21 = ::core::ffi::c_uint; +pub const BPF_RB_NO_WAKEUP: _bindgen_ty_22 = _bindgen_ty_22::BPF_RB_NO_WAKEUP; +pub const BPF_RB_FORCE_WAKEUP: _bindgen_ty_22 = _bindgen_ty_22::BPF_RB_FORCE_WAKEUP; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_22 { + BPF_RB_NO_WAKEUP = 1, + BPF_RB_FORCE_WAKEUP = 2, +} +pub const BPF_RB_AVAIL_DATA: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_AVAIL_DATA; +pub const BPF_RB_RING_SIZE: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_RING_SIZE; +pub const BPF_RB_CONS_POS: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_CONS_POS; +pub const BPF_RB_PROD_POS: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_PROD_POS; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_23 { + BPF_RB_AVAIL_DATA = 0, + BPF_RB_RING_SIZE = 1, + BPF_RB_CONS_POS = 2, + BPF_RB_PROD_POS = 3, +} pub const BPF_RINGBUF_BUSY_BIT: _bindgen_ty_24 = 2147483648; pub const BPF_RINGBUF_DISCARD_BIT: _bindgen_ty_24 = 1073741824; pub const BPF_RINGBUF_HDR_SZ: _bindgen_ty_24 = 8; pub type _bindgen_ty_24 = ::core::ffi::c_uint; +pub const BPF_SK_LOOKUP_F_REPLACE: _bindgen_ty_25 = _bindgen_ty_25::BPF_SK_LOOKUP_F_REPLACE; +pub const BPF_SK_LOOKUP_F_NO_REUSEPORT: _bindgen_ty_25 = + _bindgen_ty_25::BPF_SK_LOOKUP_F_NO_REUSEPORT; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_25 { + BPF_SK_LOOKUP_F_REPLACE = 1, + BPF_SK_LOOKUP_F_NO_REUSEPORT = 2, +} pub const BPF_F_BPRM_SECUREEXEC: _bindgen_ty_26 = 1; pub type _bindgen_ty_26 = ::core::ffi::c_uint; pub const BPF_F_BROADCAST: _bindgen_ty_27 = 8; pub const BPF_F_EXCLUDE_INGRESS: _bindgen_ty_27 = 16; pub type _bindgen_ty_27 = ::core::ffi::c_uint; +pub const BPF_SKB_TSTAMP_UNSPEC: _bindgen_ty_28 = _bindgen_ty_28::BPF_SKB_TSTAMP_UNSPEC; +pub const BPF_SKB_TSTAMP_DELIVERY_MONO: _bindgen_ty_28 = + _bindgen_ty_28::BPF_SKB_TSTAMP_DELIVERY_MONO; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_28 { + BPF_SKB_TSTAMP_UNSPEC = 0, + BPF_SKB_TSTAMP_DELIVERY_MONO = 1, +} #[repr(C)] #[derive(Copy, Clone)] pub struct bpf_devmap_val { @@ -1019,6 +1520,28 @@ impl bpf_prog_info { } } #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -1268,6 +1791,201 @@ pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_13 { pub ifindex: __u32, pub attach_type: __u32, } +pub const BPF_SOCK_OPS_RTO_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_RTO_CB_FLAG; +pub const BPF_SOCK_OPS_RETRANS_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_RETRANS_CB_FLAG; +pub const BPF_SOCK_OPS_STATE_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_STATE_CB_FLAG; +pub const BPF_SOCK_OPS_RTT_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_RTT_CB_FLAG; +pub const BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_ALL_CB_FLAGS: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_ALL_CB_FLAGS; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_29 { + BPF_SOCK_OPS_RTO_CB_FLAG = 1, + BPF_SOCK_OPS_RETRANS_CB_FLAG = 2, + BPF_SOCK_OPS_STATE_CB_FLAG = 4, + BPF_SOCK_OPS_RTT_CB_FLAG = 8, + BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG = 16, + BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG = 32, + BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG = 64, + BPF_SOCK_OPS_ALL_CB_FLAGS = 127, +} +pub const BPF_SOCK_OPS_VOID: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_VOID; +pub const BPF_SOCK_OPS_TIMEOUT_INIT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TIMEOUT_INIT; +pub const BPF_SOCK_OPS_RWND_INIT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RWND_INIT; +pub const BPF_SOCK_OPS_TCP_CONNECT_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TCP_CONNECT_CB; +pub const BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB; +pub const BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB; +pub const BPF_SOCK_OPS_NEEDS_ECN: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_NEEDS_ECN; +pub const BPF_SOCK_OPS_BASE_RTT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_BASE_RTT; +pub const BPF_SOCK_OPS_RTO_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RTO_CB; +pub const BPF_SOCK_OPS_RETRANS_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RETRANS_CB; +pub const BPF_SOCK_OPS_STATE_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_STATE_CB; +pub const BPF_SOCK_OPS_TCP_LISTEN_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TCP_LISTEN_CB; +pub const BPF_SOCK_OPS_RTT_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RTT_CB; +pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_PARSE_HDR_OPT_CB; +pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_HDR_OPT_LEN_CB; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_WRITE_HDR_OPT_CB; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_30 { + BPF_SOCK_OPS_VOID = 0, + BPF_SOCK_OPS_TIMEOUT_INIT = 1, + BPF_SOCK_OPS_RWND_INIT = 2, + BPF_SOCK_OPS_TCP_CONNECT_CB = 3, + BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 4, + BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 5, + BPF_SOCK_OPS_NEEDS_ECN = 6, + BPF_SOCK_OPS_BASE_RTT = 7, + BPF_SOCK_OPS_RTO_CB = 8, + BPF_SOCK_OPS_RETRANS_CB = 9, + BPF_SOCK_OPS_STATE_CB = 10, + BPF_SOCK_OPS_TCP_LISTEN_CB = 11, + BPF_SOCK_OPS_RTT_CB = 12, + BPF_SOCK_OPS_PARSE_HDR_OPT_CB = 13, + BPF_SOCK_OPS_HDR_OPT_LEN_CB = 14, + BPF_SOCK_OPS_WRITE_HDR_OPT_CB = 15, +} +pub const BPF_TCP_ESTABLISHED: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_ESTABLISHED; +pub const BPF_TCP_SYN_SENT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_SYN_SENT; +pub const BPF_TCP_SYN_RECV: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_SYN_RECV; +pub const BPF_TCP_FIN_WAIT1: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_FIN_WAIT1; +pub const BPF_TCP_FIN_WAIT2: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_FIN_WAIT2; +pub const BPF_TCP_TIME_WAIT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_TIME_WAIT; +pub const BPF_TCP_CLOSE: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSE; +pub const BPF_TCP_CLOSE_WAIT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSE_WAIT; +pub const BPF_TCP_LAST_ACK: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_LAST_ACK; +pub const BPF_TCP_LISTEN: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_LISTEN; +pub const BPF_TCP_CLOSING: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSING; +pub const BPF_TCP_NEW_SYN_RECV: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_NEW_SYN_RECV; +pub const BPF_TCP_BOUND_INACTIVE: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_BOUND_INACTIVE; +pub const BPF_TCP_MAX_STATES: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_MAX_STATES; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_31 { + BPF_TCP_ESTABLISHED = 1, + BPF_TCP_SYN_SENT = 2, + BPF_TCP_SYN_RECV = 3, + BPF_TCP_FIN_WAIT1 = 4, + BPF_TCP_FIN_WAIT2 = 5, + BPF_TCP_TIME_WAIT = 6, + BPF_TCP_CLOSE = 7, + BPF_TCP_CLOSE_WAIT = 8, + BPF_TCP_LAST_ACK = 9, + BPF_TCP_LISTEN = 10, + BPF_TCP_CLOSING = 11, + BPF_TCP_NEW_SYN_RECV = 12, + BPF_TCP_BOUND_INACTIVE = 13, + BPF_TCP_MAX_STATES = 14, +} +pub const BPF_LOAD_HDR_OPT_TCP_SYN: _bindgen_ty_33 = _bindgen_ty_33::BPF_LOAD_HDR_OPT_TCP_SYN; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_33 { + BPF_LOAD_HDR_OPT_TCP_SYN = 1, +} +pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: _bindgen_ty_34 = + _bindgen_ty_34::BPF_WRITE_HDR_TCP_CURRENT_MSS; +pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: _bindgen_ty_34 = + _bindgen_ty_34::BPF_WRITE_HDR_TCP_SYNACK_COOKIE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_34 { + BPF_WRITE_HDR_TCP_CURRENT_MSS = 1, + BPF_WRITE_HDR_TCP_SYNACK_COOKIE = 2, +} +pub const BPF_DEVCG_ACC_MKNOD: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_MKNOD; +pub const BPF_DEVCG_ACC_READ: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_READ; +pub const BPF_DEVCG_ACC_WRITE: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_WRITE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_35 { + BPF_DEVCG_ACC_MKNOD = 1, + BPF_DEVCG_ACC_READ = 2, + BPF_DEVCG_ACC_WRITE = 4, +} +pub const BPF_DEVCG_DEV_BLOCK: _bindgen_ty_36 = _bindgen_ty_36::BPF_DEVCG_DEV_BLOCK; +pub const BPF_DEVCG_DEV_CHAR: _bindgen_ty_36 = _bindgen_ty_36::BPF_DEVCG_DEV_CHAR; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_36 { + BPF_DEVCG_DEV_BLOCK = 1, + BPF_DEVCG_DEV_CHAR = 2, +} +pub const BPF_FIB_LOOKUP_DIRECT: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_DIRECT; +pub const BPF_FIB_LOOKUP_OUTPUT: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_OUTPUT; +pub const BPF_FIB_LOOKUP_SKIP_NEIGH: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_SKIP_NEIGH; +pub const BPF_FIB_LOOKUP_TBID: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_TBID; +pub const BPF_FIB_LOOKUP_SRC: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_SRC; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_37 { + BPF_FIB_LOOKUP_DIRECT = 1, + BPF_FIB_LOOKUP_OUTPUT = 2, + BPF_FIB_LOOKUP_SKIP_NEIGH = 4, + BPF_FIB_LOOKUP_TBID = 8, + BPF_FIB_LOOKUP_SRC = 16, +} +pub const BPF_FIB_LKUP_RET_SUCCESS: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_SUCCESS; +pub const BPF_FIB_LKUP_RET_BLACKHOLE: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_BLACKHOLE; +pub const BPF_FIB_LKUP_RET_UNREACHABLE: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_UNREACHABLE; +pub const BPF_FIB_LKUP_RET_PROHIBIT: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_PROHIBIT; +pub const BPF_FIB_LKUP_RET_NOT_FWDED: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_NOT_FWDED; +pub const BPF_FIB_LKUP_RET_FWD_DISABLED: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_FWD_DISABLED; +pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_UNSUPP_LWT; +pub const BPF_FIB_LKUP_RET_NO_NEIGH: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_NO_NEIGH; +pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_FRAG_NEEDED; +pub const BPF_FIB_LKUP_RET_NO_SRC_ADDR: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_NO_SRC_ADDR; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_38 { + BPF_FIB_LKUP_RET_SUCCESS = 0, + BPF_FIB_LKUP_RET_BLACKHOLE = 1, + BPF_FIB_LKUP_RET_UNREACHABLE = 2, + BPF_FIB_LKUP_RET_PROHIBIT = 3, + BPF_FIB_LKUP_RET_NOT_FWDED = 4, + BPF_FIB_LKUP_RET_FWD_DISABLED = 5, + BPF_FIB_LKUP_RET_UNSUPP_LWT = 6, + BPF_FIB_LKUP_RET_NO_NEIGH = 7, + BPF_FIB_LKUP_RET_FRAG_NEEDED = 8, + BPF_FIB_LKUP_RET_NO_SRC_ADDR = 9, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_task_fd_type { + BPF_FD_TYPE_RAW_TRACEPOINT = 0, + BPF_FD_TYPE_TRACEPOINT = 1, + BPF_FD_TYPE_KPROBE = 2, + BPF_FD_TYPE_KRETPROBE = 3, + BPF_FD_TYPE_UPROBE = 4, + BPF_FD_TYPE_URETPROBE = 5, +} +pub const BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_39 { + BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 1, + BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 2, + BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 4, +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bpf_func_info { @@ -1387,6 +2105,18 @@ pub struct btf_var_secinfo { pub struct btf_decl_tag { pub component_idx: __s32, } +impl nlmsgerr_attrs { + pub const NLMSGERR_ATTR_MAX: nlmsgerr_attrs = nlmsgerr_attrs::NLMSGERR_ATTR_COOKIE; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum nlmsgerr_attrs { + NLMSGERR_ATTR_UNUSED = 0, + NLMSGERR_ATTR_MSG = 1, + NLMSGERR_ATTR_OFFS = 2, + NLMSGERR_ATTR_COOKIE = 3, + __NLMSGERR_ATTR_MAX = 4, +} pub const IFLA_XDP_UNSPEC: _bindgen_ty_92 = 0; pub const IFLA_XDP_FD: _bindgen_ty_92 = 1; pub const IFLA_XDP_ATTACHED: _bindgen_ty_92 = 2; @@ -1398,6 +2128,29 @@ pub const IFLA_XDP_HW_PROG_ID: _bindgen_ty_92 = 7; pub const IFLA_XDP_EXPECTED_FD: _bindgen_ty_92 = 8; pub const __IFLA_XDP_MAX: _bindgen_ty_92 = 9; pub type _bindgen_ty_92 = ::core::ffi::c_uint; +impl nf_inet_hooks { + pub const NF_INET_INGRESS: nf_inet_hooks = nf_inet_hooks::NF_INET_NUMHOOKS; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum nf_inet_hooks { + NF_INET_PRE_ROUTING = 0, + NF_INET_LOCAL_IN = 1, + NF_INET_FORWARD = 2, + NF_INET_LOCAL_OUT = 3, + NF_INET_POST_ROUTING = 4, + NF_INET_NUMHOOKS = 5, +} +pub const NFPROTO_UNSPEC: _bindgen_ty_99 = 0; +pub const NFPROTO_INET: _bindgen_ty_99 = 1; +pub const NFPROTO_IPV4: _bindgen_ty_99 = 2; +pub const NFPROTO_ARP: _bindgen_ty_99 = 3; +pub const NFPROTO_NETDEV: _bindgen_ty_99 = 5; +pub const NFPROTO_BRIDGE: _bindgen_ty_99 = 7; +pub const NFPROTO_IPV6: _bindgen_ty_99 = 10; +pub const NFPROTO_DECNET: _bindgen_ty_99 = 12; +pub const NFPROTO_NUMPROTO: _bindgen_ty_99 = 13; +pub type _bindgen_ty_99 = ::core::ffi::c_uint; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum perf_type_id { @@ -1567,6 +2320,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn disabled_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_disabled_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } } @@ -1578,6 +2353,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn pinned(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } } @@ -1589,6 +2386,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn pinned_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_pinned_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclusive(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } } @@ -1600,6 +2419,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclusive_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclusive_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_user(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } } @@ -1611,6 +2452,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_kernel(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } } @@ -1622,6 +2485,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_hv(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } } @@ -1633,6 +2518,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_hv_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_hv_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_idle(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } } @@ -1644,6 +2551,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_idle_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_idle_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn mmap(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } } @@ -1655,6 +2584,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn comm(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } } @@ -1666,6 +2617,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn comm_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn freq(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } } @@ -1677,6 +2650,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn freq_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_freq_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit_stat(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } } @@ -1688,17 +2683,61 @@ impl perf_event_attr { } } #[inline] - pub fn enable_on_exec(&self) -> __u64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } + pub unsafe fn inherit_stat_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u64) + } } #[inline] - pub fn set_enable_on_exec(&mut self, val: __u64) { + pub unsafe fn set_inherit_stat_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_on_exec(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } + } + #[inline] + pub fn set_enable_on_exec(&mut self, val: __u64) { unsafe { let val: u64 = ::core::mem::transmute(val); self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] + pub unsafe fn enable_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_enable_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn task(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) } } @@ -1710,6 +2749,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn task_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_task_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn watermark(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) } } @@ -1721,6 +2782,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn watermark_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_watermark_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn precise_ip(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 2u8) as u64) } } @@ -1732,6 +2815,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn precise_ip_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 2u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_precise_ip_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 2u8, + val as u64, + ) + } + } + #[inline] pub fn mmap_data(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } } @@ -1743,6 +2848,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap_data_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_data_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn sample_id_all(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } } @@ -1754,6 +2881,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn sample_id_all_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sample_id_all_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_host(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } } @@ -1765,6 +2914,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_host_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_host_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_guest(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } } @@ -1776,6 +2947,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_guest_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_guest_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_callchain_kernel(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) } } @@ -1787,6 +2980,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_callchain_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 21usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 21usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_callchain_user(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) } } @@ -1798,6 +3013,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_callchain_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 22usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 22usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn mmap2(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) } } @@ -1809,6 +3046,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap2_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 23usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap2_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 23usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn comm_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) } } @@ -1820,6 +3079,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn comm_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 24usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 24usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn use_clockid(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) } } @@ -1831,6 +3112,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn use_clockid_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 25usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_use_clockid_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 25usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn context_switch(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) } } @@ -1842,6 +3145,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn context_switch_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 26usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_context_switch_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 26usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn write_backward(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) } } @@ -1853,6 +3178,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn write_backward_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 27usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_write_backward_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 27usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn namespaces(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) } } @@ -1864,6 +3211,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn namespaces_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 28usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_namespaces_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 28usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn ksymbol(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) } } @@ -1875,6 +3244,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn ksymbol_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 29usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_ksymbol_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 29usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn bpf_event(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u64) } } @@ -1886,6 +3277,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn bpf_event_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 30usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_bpf_event_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 30usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn aux_output(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u64) } } @@ -1897,6 +3310,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn aux_output_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_aux_output_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cgroup(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } } @@ -1908,6 +3343,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn cgroup_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cgroup_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn text_poke(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) } } @@ -1919,6 +3376,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn text_poke_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 33usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_text_poke_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 33usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn build_id(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) } } @@ -1930,6 +3409,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn build_id_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 34usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_build_id_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 34usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit_thread(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) } } @@ -1941,6 +3442,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_thread_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 35usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_thread_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 35usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn remove_on_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) } } @@ -1952,6 +3475,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn remove_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 36usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_remove_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 36usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn sigtrap(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } } @@ -1963,6 +3508,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn sigtrap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 37usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sigtrap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 37usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __reserved_1(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) } } @@ -1974,6 +3541,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn __reserved_1_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 38usize, + 26u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set___reserved_1_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 38usize, + 26u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( disabled: __u64, inherit: __u64, @@ -2227,6 +3816,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_bit0_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_bit0_is_deprecated(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } } @@ -2238,6 +3849,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_bit0_is_deprecated_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_is_deprecated_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_rdpmc(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } } @@ -2249,6 +3882,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_rdpmc_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_rdpmc_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } } @@ -2260,6 +3915,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time_zero(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } } @@ -2271,6 +3948,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_zero_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_zero_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time_short(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } } @@ -2282,6 +3981,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_short_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_short_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_____res(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) } } @@ -2293,6 +4014,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_____res_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 58u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_____res_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 58u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( cap_bit0: __u64, cap_bit0_is_deprecated: __u64, @@ -2368,20 +4111,20 @@ pub enum perf_event_type { PERF_RECORD_AUX_OUTPUT_HW_ID = 21, PERF_RECORD_MAX = 22, } -pub const TCA_BPF_UNSPEC: _bindgen_ty_152 = 0; -pub const TCA_BPF_ACT: _bindgen_ty_152 = 1; -pub const TCA_BPF_POLICE: _bindgen_ty_152 = 2; -pub const TCA_BPF_CLASSID: _bindgen_ty_152 = 3; -pub const TCA_BPF_OPS_LEN: _bindgen_ty_152 = 4; -pub const TCA_BPF_OPS: _bindgen_ty_152 = 5; -pub const TCA_BPF_FD: _bindgen_ty_152 = 6; -pub const TCA_BPF_NAME: _bindgen_ty_152 = 7; -pub const TCA_BPF_FLAGS: _bindgen_ty_152 = 8; -pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_152 = 9; -pub const TCA_BPF_TAG: _bindgen_ty_152 = 10; -pub const TCA_BPF_ID: _bindgen_ty_152 = 11; -pub const __TCA_BPF_MAX: _bindgen_ty_152 = 12; -pub type _bindgen_ty_152 = ::core::ffi::c_uint; +pub const TCA_BPF_UNSPEC: _bindgen_ty_154 = 0; +pub const TCA_BPF_ACT: _bindgen_ty_154 = 1; +pub const TCA_BPF_POLICE: _bindgen_ty_154 = 2; +pub const TCA_BPF_CLASSID: _bindgen_ty_154 = 3; +pub const TCA_BPF_OPS_LEN: _bindgen_ty_154 = 4; +pub const TCA_BPF_OPS: _bindgen_ty_154 = 5; +pub const TCA_BPF_FD: _bindgen_ty_154 = 6; +pub const TCA_BPF_NAME: _bindgen_ty_154 = 7; +pub const TCA_BPF_FLAGS: _bindgen_ty_154 = 8; +pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_154 = 9; +pub const TCA_BPF_TAG: _bindgen_ty_154 = 10; +pub const TCA_BPF_ID: _bindgen_ty_154 = 11; +pub const __TCA_BPF_MAX: _bindgen_ty_154 = 12; +pub type _bindgen_ty_154 = ::core::ffi::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ifinfomsg { @@ -2403,24 +4146,22 @@ pub struct tcmsg { pub tcm_parent: __u32, pub tcm_info: __u32, } -pub const TCA_UNSPEC: _bindgen_ty_172 = 0; -pub const TCA_KIND: _bindgen_ty_172 = 1; -pub const TCA_OPTIONS: _bindgen_ty_172 = 2; -pub const TCA_STATS: _bindgen_ty_172 = 3; -pub const TCA_XSTATS: _bindgen_ty_172 = 4; -pub const TCA_RATE: _bindgen_ty_172 = 5; -pub const TCA_FCNT: _bindgen_ty_172 = 6; -pub const TCA_STATS2: _bindgen_ty_172 = 7; -pub const TCA_STAB: _bindgen_ty_172 = 8; -pub const TCA_PAD: _bindgen_ty_172 = 9; -pub const TCA_DUMP_INVISIBLE: _bindgen_ty_172 = 10; -pub const TCA_CHAIN: _bindgen_ty_172 = 11; -pub const TCA_HW_OFFLOAD: _bindgen_ty_172 = 12; -pub const TCA_INGRESS_BLOCK: _bindgen_ty_172 = 13; -pub const TCA_EGRESS_BLOCK: _bindgen_ty_172 = 14; -pub const TCA_DUMP_FLAGS: _bindgen_ty_172 = 15; -pub const __TCA_MAX: _bindgen_ty_172 = 16; -pub type _bindgen_ty_172 = ::core::ffi::c_uint; -pub const AYA_PERF_EVENT_IOC_ENABLE: ::core::ffi::c_int = 9216; -pub const AYA_PERF_EVENT_IOC_DISABLE: ::core::ffi::c_int = 9217; -pub const AYA_PERF_EVENT_IOC_SET_BPF: ::core::ffi::c_int = 1074013192; +pub const TCA_UNSPEC: _bindgen_ty_174 = 0; +pub const TCA_KIND: _bindgen_ty_174 = 1; +pub const TCA_OPTIONS: _bindgen_ty_174 = 2; +pub const TCA_STATS: _bindgen_ty_174 = 3; +pub const TCA_XSTATS: _bindgen_ty_174 = 4; +pub const TCA_RATE: _bindgen_ty_174 = 5; +pub const TCA_FCNT: _bindgen_ty_174 = 6; +pub const TCA_STATS2: _bindgen_ty_174 = 7; +pub const TCA_STAB: _bindgen_ty_174 = 8; +pub const TCA_PAD: _bindgen_ty_174 = 9; +pub const TCA_DUMP_INVISIBLE: _bindgen_ty_174 = 10; +pub const TCA_CHAIN: _bindgen_ty_174 = 11; +pub const TCA_HW_OFFLOAD: _bindgen_ty_174 = 12; +pub const TCA_INGRESS_BLOCK: _bindgen_ty_174 = 13; +pub const TCA_EGRESS_BLOCK: _bindgen_ty_174 = 14; +pub const TCA_DUMP_FLAGS: _bindgen_ty_174 = 15; +pub const TCA_EXT_WARN_MSG: _bindgen_ty_174 = 16; +pub const __TCA_MAX: _bindgen_ty_174 = 17; +pub type _bindgen_ty_174 = ::core::ffi::c_uint; diff --git a/aya-obj/src/generated/linux_bindings_loongarch64.rs b/aya-obj/src/generated/linux_bindings_loongarch64.rs new file mode 100644 index 00000000..b76ed850 --- /dev/null +++ b/aya-obj/src/generated/linux_bindings_loongarch64.rs @@ -0,0 +1,4167 @@ +/* automatically generated by rust-bindgen 0.72.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { byte | mask } else { byte & !mask } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } +} +#[repr(C)] +#[derive(Default)] +pub struct __IncompleteArrayField(::core::marker::PhantomData, [T; 0]); +impl __IncompleteArrayField { + #[inline] + pub const fn new() -> Self { + __IncompleteArrayField(::core::marker::PhantomData, []) + } + #[inline] + pub fn as_ptr(&self) -> *const T { + self as *const _ as *const T + } + #[inline] + pub fn as_mut_ptr(&mut self) -> *mut T { + self as *mut _ as *mut T + } + #[inline] + pub unsafe fn as_slice(&self, len: usize) -> &[T] { + ::core::slice::from_raw_parts(self.as_ptr(), len) + } + #[inline] + pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { + ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len) + } +} +impl ::core::fmt::Debug for __IncompleteArrayField { + fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + fmt.write_str("__IncompleteArrayField") + } +} +pub const BPF_LD: u32 = 0; +pub const BPF_LDX: u32 = 1; +pub const BPF_ST: u32 = 2; +pub const BPF_STX: u32 = 3; +pub const BPF_ALU: u32 = 4; +pub const BPF_JMP: u32 = 5; +pub const BPF_RET: u32 = 6; +pub const BPF_MISC: u32 = 7; +pub const BPF_W: u32 = 0; +pub const BPF_H: u32 = 8; +pub const BPF_B: u32 = 16; +pub const BPF_IMM: u32 = 0; +pub const BPF_ABS: u32 = 32; +pub const BPF_IND: u32 = 64; +pub const BPF_MEM: u32 = 96; +pub const BPF_LEN: u32 = 128; +pub const BPF_MSH: u32 = 160; +pub const BPF_ADD: u32 = 0; +pub const BPF_SUB: u32 = 16; +pub const BPF_MUL: u32 = 32; +pub const BPF_DIV: u32 = 48; +pub const BPF_OR: u32 = 64; +pub const BPF_AND: u32 = 80; +pub const BPF_LSH: u32 = 96; +pub const BPF_RSH: u32 = 112; +pub const BPF_NEG: u32 = 128; +pub const BPF_MOD: u32 = 144; +pub const BPF_XOR: u32 = 160; +pub const BPF_JA: u32 = 0; +pub const BPF_JEQ: u32 = 16; +pub const BPF_JGT: u32 = 32; +pub const BPF_JGE: u32 = 48; +pub const BPF_JSET: u32 = 64; +pub const BPF_K: u32 = 0; +pub const BPF_X: u32 = 8; +pub const BPF_MAXINSNS: u32 = 4096; +pub const BPF_JMP32: u32 = 6; +pub const BPF_ALU64: u32 = 7; +pub const BPF_DW: u32 = 24; +pub const BPF_MEMSX: u32 = 128; +pub const BPF_ATOMIC: u32 = 192; +pub const BPF_XADD: u32 = 192; +pub const BPF_MOV: u32 = 176; +pub const BPF_ARSH: u32 = 192; +pub const BPF_END: u32 = 208; +pub const BPF_TO_LE: u32 = 0; +pub const BPF_TO_BE: u32 = 8; +pub const BPF_FROM_LE: u32 = 0; +pub const BPF_FROM_BE: u32 = 8; +pub const BPF_JNE: u32 = 80; +pub const BPF_JLT: u32 = 160; +pub const BPF_JLE: u32 = 176; +pub const BPF_JSGT: u32 = 96; +pub const BPF_JSGE: u32 = 112; +pub const BPF_JSLT: u32 = 192; +pub const BPF_JSLE: u32 = 208; +pub const BPF_JCOND: u32 = 224; +pub const BPF_CALL: u32 = 128; +pub const BPF_EXIT: u32 = 144; +pub const BPF_FETCH: u32 = 1; +pub const BPF_XCHG: u32 = 225; +pub const BPF_CMPXCHG: u32 = 241; +pub const BPF_F_ALLOW_OVERRIDE: u32 = 1; +pub const BPF_F_ALLOW_MULTI: u32 = 2; +pub const BPF_F_REPLACE: u32 = 4; +pub const BPF_F_BEFORE: u32 = 8; +pub const BPF_F_AFTER: u32 = 16; +pub const BPF_F_ID: u32 = 32; +pub const BPF_F_STRICT_ALIGNMENT: u32 = 1; +pub const BPF_F_ANY_ALIGNMENT: u32 = 2; +pub const BPF_F_TEST_RND_HI32: u32 = 4; +pub const BPF_F_TEST_STATE_FREQ: u32 = 8; +pub const BPF_F_SLEEPABLE: u32 = 16; +pub const BPF_F_XDP_HAS_FRAGS: u32 = 32; +pub const BPF_F_XDP_DEV_BOUND_ONLY: u32 = 64; +pub const BPF_F_TEST_REG_INVARIANTS: u32 = 128; +pub const BPF_F_NETFILTER_IP_DEFRAG: u32 = 1; +pub const BPF_PSEUDO_MAP_FD: u32 = 1; +pub const BPF_PSEUDO_MAP_IDX: u32 = 5; +pub const BPF_PSEUDO_MAP_VALUE: u32 = 2; +pub const BPF_PSEUDO_MAP_IDX_VALUE: u32 = 6; +pub const BPF_PSEUDO_BTF_ID: u32 = 3; +pub const BPF_PSEUDO_FUNC: u32 = 4; +pub const BPF_PSEUDO_CALL: u32 = 1; +pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2; +pub const BPF_F_QUERY_EFFECTIVE: u32 = 1; +pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1; +pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2; +pub const BPF_BUILD_ID_SIZE: u32 = 20; +pub const BPF_OBJ_NAME_LEN: u32 = 16; +pub const BPF_TAG_SIZE: u32 = 8; +pub const BTF_INT_SIGNED: u32 = 1; +pub const BTF_INT_CHAR: u32 = 2; +pub const BTF_INT_BOOL: u32 = 4; +pub const NLMSG_ALIGNTO: u32 = 4; +pub const XDP_FLAGS_UPDATE_IF_NOEXIST: u32 = 1; +pub const XDP_FLAGS_SKB_MODE: u32 = 2; +pub const XDP_FLAGS_DRV_MODE: u32 = 4; +pub const XDP_FLAGS_HW_MODE: u32 = 8; +pub const XDP_FLAGS_REPLACE: u32 = 16; +pub const XDP_FLAGS_MODES: u32 = 14; +pub const XDP_FLAGS_MASK: u32 = 31; +pub const PERF_EVENT_IOC_ENABLE: u32 = 9216; +pub const PERF_EVENT_IOC_DISABLE: u32 = 9217; +pub const PERF_EVENT_IOC_REFRESH: u32 = 9218; +pub const PERF_EVENT_IOC_RESET: u32 = 9219; +pub const PERF_EVENT_IOC_PERIOD: u32 = 1074275332; +pub const PERF_EVENT_IOC_SET_OUTPUT: u32 = 9221; +pub const PERF_EVENT_IOC_SET_FILTER: u32 = 1074275334; +pub const PERF_EVENT_IOC_ID: u32 = 2148017159; +pub const PERF_EVENT_IOC_SET_BPF: u32 = 1074013192; +pub const PERF_EVENT_IOC_PAUSE_OUTPUT: u32 = 1074013193; +pub const PERF_EVENT_IOC_QUERY_BPF: u32 = 3221758986; +pub const PERF_EVENT_IOC_MODIFY_ATTRIBUTES: u32 = 1074275339; +pub const PERF_MAX_STACK_DEPTH: u32 = 127; +pub const PERF_MAX_CONTEXTS_PER_STACK: u32 = 8; +pub const PERF_FLAG_FD_NO_GROUP: u32 = 1; +pub const PERF_FLAG_FD_OUTPUT: u32 = 2; +pub const PERF_FLAG_PID_CGROUP: u32 = 4; +pub const PERF_FLAG_FD_CLOEXEC: u32 = 8; +pub const TC_H_MAJ_MASK: u32 = 4294901760; +pub const TC_H_MIN_MASK: u32 = 65535; +pub const TC_H_UNSPEC: u32 = 0; +pub const TC_H_ROOT: u32 = 4294967295; +pub const TC_H_INGRESS: u32 = 4294967281; +pub const TC_H_CLSACT: u32 = 4294967281; +pub const TC_H_MIN_PRIORITY: u32 = 65504; +pub const TC_H_MIN_INGRESS: u32 = 65522; +pub const TC_H_MIN_EGRESS: u32 = 65523; +pub const TCA_BPF_FLAG_ACT_DIRECT: u32 = 1; +pub const SO_ATTACH_BPF: u32 = 50; +pub const SO_DETACH_BPF: u32 = 27; +pub type __u8 = ::core::ffi::c_uchar; +pub type __s16 = ::core::ffi::c_short; +pub type __u16 = ::core::ffi::c_ushort; +pub type __s32 = ::core::ffi::c_int; +pub type __u32 = ::core::ffi::c_uint; +pub type __s64 = ::core::ffi::c_longlong; +pub type __u64 = ::core::ffi::c_ulonglong; +pub const BPF_REG_0: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_0; +pub const BPF_REG_1: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_1; +pub const BPF_REG_2: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_2; +pub const BPF_REG_3: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_3; +pub const BPF_REG_4: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_4; +pub const BPF_REG_5: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_5; +pub const BPF_REG_6: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_6; +pub const BPF_REG_7: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_7; +pub const BPF_REG_8: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_8; +pub const BPF_REG_9: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_9; +pub const BPF_REG_10: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_10; +pub const __MAX_BPF_REG: _bindgen_ty_1 = _bindgen_ty_1::__MAX_BPF_REG; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { + BPF_REG_0 = 0, + BPF_REG_1 = 1, + BPF_REG_2 = 2, + BPF_REG_3 = 3, + BPF_REG_4 = 4, + BPF_REG_5 = 5, + BPF_REG_6 = 6, + BPF_REG_7 = 7, + BPF_REG_8 = 8, + BPF_REG_9 = 9, + BPF_REG_10 = 10, + __MAX_BPF_REG = 11, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_insn { + pub code: __u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub off: __s16, + pub imm: __s32, +} +impl bpf_insn { + #[inline] + pub fn dst_reg(&self) -> __u8 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) } + } + #[inline] + pub fn set_dst_reg(&mut self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn src_reg(&self) -> __u8 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } + } + #[inline] + pub fn set_src_reg(&mut self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 4u8, { + let dst_reg: u8 = unsafe { ::core::mem::transmute(dst_reg) }; + dst_reg as u64 + }); + __bindgen_bitfield_unit.set(4usize, 4u8, { + let src_reg: u8 = unsafe { ::core::mem::transmute(src_reg) }; + src_reg as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug)] +pub struct bpf_lpm_trie_key { + pub prefixlen: __u32, + pub data: __IncompleteArrayField<__u8>, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_cgroup_iter_order { + BPF_CGROUP_ITER_ORDER_UNSPEC = 0, + BPF_CGROUP_ITER_SELF_ONLY = 1, + BPF_CGROUP_ITER_DESCENDANTS_PRE = 2, + BPF_CGROUP_ITER_DESCENDANTS_POST = 3, + BPF_CGROUP_ITER_ANCESTORS_UP = 4, +} +impl bpf_cmd { + pub const BPF_PROG_RUN: bpf_cmd = bpf_cmd::BPF_PROG_TEST_RUN; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_cmd { + BPF_MAP_CREATE = 0, + BPF_MAP_LOOKUP_ELEM = 1, + BPF_MAP_UPDATE_ELEM = 2, + BPF_MAP_DELETE_ELEM = 3, + BPF_MAP_GET_NEXT_KEY = 4, + BPF_PROG_LOAD = 5, + BPF_OBJ_PIN = 6, + BPF_OBJ_GET = 7, + BPF_PROG_ATTACH = 8, + BPF_PROG_DETACH = 9, + BPF_PROG_TEST_RUN = 10, + BPF_PROG_GET_NEXT_ID = 11, + BPF_MAP_GET_NEXT_ID = 12, + BPF_PROG_GET_FD_BY_ID = 13, + BPF_MAP_GET_FD_BY_ID = 14, + BPF_OBJ_GET_INFO_BY_FD = 15, + BPF_PROG_QUERY = 16, + BPF_RAW_TRACEPOINT_OPEN = 17, + BPF_BTF_LOAD = 18, + BPF_BTF_GET_FD_BY_ID = 19, + BPF_TASK_FD_QUERY = 20, + BPF_MAP_LOOKUP_AND_DELETE_ELEM = 21, + BPF_MAP_FREEZE = 22, + BPF_BTF_GET_NEXT_ID = 23, + BPF_MAP_LOOKUP_BATCH = 24, + BPF_MAP_LOOKUP_AND_DELETE_BATCH = 25, + BPF_MAP_UPDATE_BATCH = 26, + BPF_MAP_DELETE_BATCH = 27, + BPF_LINK_CREATE = 28, + BPF_LINK_UPDATE = 29, + BPF_LINK_GET_FD_BY_ID = 30, + BPF_LINK_GET_NEXT_ID = 31, + BPF_ENABLE_STATS = 32, + BPF_ITER_CREATE = 33, + BPF_LINK_DETACH = 34, + BPF_PROG_BIND_MAP = 35, + BPF_TOKEN_CREATE = 36, + __MAX_BPF_CMD = 37, +} +impl bpf_map_type { + pub const BPF_MAP_TYPE_CGROUP_STORAGE: bpf_map_type = + bpf_map_type::BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED; +} +impl bpf_map_type { + pub const BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE: bpf_map_type = + bpf_map_type::BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_map_type { + BPF_MAP_TYPE_UNSPEC = 0, + BPF_MAP_TYPE_HASH = 1, + BPF_MAP_TYPE_ARRAY = 2, + BPF_MAP_TYPE_PROG_ARRAY = 3, + BPF_MAP_TYPE_PERF_EVENT_ARRAY = 4, + BPF_MAP_TYPE_PERCPU_HASH = 5, + BPF_MAP_TYPE_PERCPU_ARRAY = 6, + BPF_MAP_TYPE_STACK_TRACE = 7, + BPF_MAP_TYPE_CGROUP_ARRAY = 8, + BPF_MAP_TYPE_LRU_HASH = 9, + BPF_MAP_TYPE_LRU_PERCPU_HASH = 10, + BPF_MAP_TYPE_LPM_TRIE = 11, + BPF_MAP_TYPE_ARRAY_OF_MAPS = 12, + BPF_MAP_TYPE_HASH_OF_MAPS = 13, + BPF_MAP_TYPE_DEVMAP = 14, + BPF_MAP_TYPE_SOCKMAP = 15, + BPF_MAP_TYPE_CPUMAP = 16, + BPF_MAP_TYPE_XSKMAP = 17, + BPF_MAP_TYPE_SOCKHASH = 18, + BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED = 19, + BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 20, + BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED = 21, + BPF_MAP_TYPE_QUEUE = 22, + BPF_MAP_TYPE_STACK = 23, + BPF_MAP_TYPE_SK_STORAGE = 24, + BPF_MAP_TYPE_DEVMAP_HASH = 25, + BPF_MAP_TYPE_STRUCT_OPS = 26, + BPF_MAP_TYPE_RINGBUF = 27, + BPF_MAP_TYPE_INODE_STORAGE = 28, + BPF_MAP_TYPE_TASK_STORAGE = 29, + BPF_MAP_TYPE_BLOOM_FILTER = 30, + BPF_MAP_TYPE_USER_RINGBUF = 31, + BPF_MAP_TYPE_CGRP_STORAGE = 32, + BPF_MAP_TYPE_ARENA = 33, + __MAX_BPF_MAP_TYPE = 34, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_prog_type { + BPF_PROG_TYPE_UNSPEC = 0, + BPF_PROG_TYPE_SOCKET_FILTER = 1, + BPF_PROG_TYPE_KPROBE = 2, + BPF_PROG_TYPE_SCHED_CLS = 3, + BPF_PROG_TYPE_SCHED_ACT = 4, + BPF_PROG_TYPE_TRACEPOINT = 5, + BPF_PROG_TYPE_XDP = 6, + BPF_PROG_TYPE_PERF_EVENT = 7, + BPF_PROG_TYPE_CGROUP_SKB = 8, + BPF_PROG_TYPE_CGROUP_SOCK = 9, + BPF_PROG_TYPE_LWT_IN = 10, + BPF_PROG_TYPE_LWT_OUT = 11, + BPF_PROG_TYPE_LWT_XMIT = 12, + BPF_PROG_TYPE_SOCK_OPS = 13, + BPF_PROG_TYPE_SK_SKB = 14, + BPF_PROG_TYPE_CGROUP_DEVICE = 15, + BPF_PROG_TYPE_SK_MSG = 16, + BPF_PROG_TYPE_RAW_TRACEPOINT = 17, + BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 18, + BPF_PROG_TYPE_LWT_SEG6LOCAL = 19, + BPF_PROG_TYPE_LIRC_MODE2 = 20, + BPF_PROG_TYPE_SK_REUSEPORT = 21, + BPF_PROG_TYPE_FLOW_DISSECTOR = 22, + BPF_PROG_TYPE_CGROUP_SYSCTL = 23, + BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE = 24, + BPF_PROG_TYPE_CGROUP_SOCKOPT = 25, + BPF_PROG_TYPE_TRACING = 26, + BPF_PROG_TYPE_STRUCT_OPS = 27, + BPF_PROG_TYPE_EXT = 28, + BPF_PROG_TYPE_LSM = 29, + BPF_PROG_TYPE_SK_LOOKUP = 30, + BPF_PROG_TYPE_SYSCALL = 31, + BPF_PROG_TYPE_NETFILTER = 32, + __MAX_BPF_PROG_TYPE = 33, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_attach_type { + BPF_CGROUP_INET_INGRESS = 0, + BPF_CGROUP_INET_EGRESS = 1, + BPF_CGROUP_INET_SOCK_CREATE = 2, + BPF_CGROUP_SOCK_OPS = 3, + BPF_SK_SKB_STREAM_PARSER = 4, + BPF_SK_SKB_STREAM_VERDICT = 5, + BPF_CGROUP_DEVICE = 6, + BPF_SK_MSG_VERDICT = 7, + BPF_CGROUP_INET4_BIND = 8, + BPF_CGROUP_INET6_BIND = 9, + BPF_CGROUP_INET4_CONNECT = 10, + BPF_CGROUP_INET6_CONNECT = 11, + BPF_CGROUP_INET4_POST_BIND = 12, + BPF_CGROUP_INET6_POST_BIND = 13, + BPF_CGROUP_UDP4_SENDMSG = 14, + BPF_CGROUP_UDP6_SENDMSG = 15, + BPF_LIRC_MODE2 = 16, + BPF_FLOW_DISSECTOR = 17, + BPF_CGROUP_SYSCTL = 18, + BPF_CGROUP_UDP4_RECVMSG = 19, + BPF_CGROUP_UDP6_RECVMSG = 20, + BPF_CGROUP_GETSOCKOPT = 21, + BPF_CGROUP_SETSOCKOPT = 22, + BPF_TRACE_RAW_TP = 23, + BPF_TRACE_FENTRY = 24, + BPF_TRACE_FEXIT = 25, + BPF_MODIFY_RETURN = 26, + BPF_LSM_MAC = 27, + BPF_TRACE_ITER = 28, + BPF_CGROUP_INET4_GETPEERNAME = 29, + BPF_CGROUP_INET6_GETPEERNAME = 30, + BPF_CGROUP_INET4_GETSOCKNAME = 31, + BPF_CGROUP_INET6_GETSOCKNAME = 32, + BPF_XDP_DEVMAP = 33, + BPF_CGROUP_INET_SOCK_RELEASE = 34, + BPF_XDP_CPUMAP = 35, + BPF_SK_LOOKUP = 36, + BPF_XDP = 37, + BPF_SK_SKB_VERDICT = 38, + BPF_SK_REUSEPORT_SELECT = 39, + BPF_SK_REUSEPORT_SELECT_OR_MIGRATE = 40, + BPF_PERF_EVENT = 41, + BPF_TRACE_KPROBE_MULTI = 42, + BPF_LSM_CGROUP = 43, + BPF_STRUCT_OPS = 44, + BPF_NETFILTER = 45, + BPF_TCX_INGRESS = 46, + BPF_TCX_EGRESS = 47, + BPF_TRACE_UPROBE_MULTI = 48, + BPF_CGROUP_UNIX_CONNECT = 49, + BPF_CGROUP_UNIX_SENDMSG = 50, + BPF_CGROUP_UNIX_RECVMSG = 51, + BPF_CGROUP_UNIX_GETPEERNAME = 52, + BPF_CGROUP_UNIX_GETSOCKNAME = 53, + BPF_NETKIT_PRIMARY = 54, + BPF_NETKIT_PEER = 55, + __MAX_BPF_ATTACH_TYPE = 56, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_link_type { + BPF_LINK_TYPE_UNSPEC = 0, + BPF_LINK_TYPE_RAW_TRACEPOINT = 1, + BPF_LINK_TYPE_TRACING = 2, + BPF_LINK_TYPE_CGROUP = 3, + BPF_LINK_TYPE_ITER = 4, + BPF_LINK_TYPE_NETNS = 5, + BPF_LINK_TYPE_XDP = 6, + BPF_LINK_TYPE_PERF_EVENT = 7, + BPF_LINK_TYPE_KPROBE_MULTI = 8, + BPF_LINK_TYPE_STRUCT_OPS = 9, + BPF_LINK_TYPE_NETFILTER = 10, + BPF_LINK_TYPE_TCX = 11, + BPF_LINK_TYPE_UPROBE_MULTI = 12, + BPF_LINK_TYPE_NETKIT = 13, + __MAX_BPF_LINK_TYPE = 14, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_perf_event_type { + BPF_PERF_EVENT_UNSPEC = 0, + BPF_PERF_EVENT_UPROBE = 1, + BPF_PERF_EVENT_URETPROBE = 2, + BPF_PERF_EVENT_KPROBE = 3, + BPF_PERF_EVENT_KRETPROBE = 4, + BPF_PERF_EVENT_TRACEPOINT = 5, + BPF_PERF_EVENT_EVENT = 6, +} +pub const BPF_F_KPROBE_MULTI_RETURN: _bindgen_ty_2 = 1; +pub type _bindgen_ty_2 = ::core::ffi::c_uint; +pub const BPF_F_UPROBE_MULTI_RETURN: _bindgen_ty_3 = 1; +pub type _bindgen_ty_3 = ::core::ffi::c_uint; +pub const BPF_ANY: _bindgen_ty_4 = 0; +pub const BPF_NOEXIST: _bindgen_ty_4 = 1; +pub const BPF_EXIST: _bindgen_ty_4 = 2; +pub const BPF_F_LOCK: _bindgen_ty_4 = 4; +pub type _bindgen_ty_4 = ::core::ffi::c_uint; +pub const BPF_F_NO_PREALLOC: _bindgen_ty_5 = 1; +pub const BPF_F_NO_COMMON_LRU: _bindgen_ty_5 = 2; +pub const BPF_F_NUMA_NODE: _bindgen_ty_5 = 4; +pub const BPF_F_RDONLY: _bindgen_ty_5 = 8; +pub const BPF_F_WRONLY: _bindgen_ty_5 = 16; +pub const BPF_F_STACK_BUILD_ID: _bindgen_ty_5 = 32; +pub const BPF_F_ZERO_SEED: _bindgen_ty_5 = 64; +pub const BPF_F_RDONLY_PROG: _bindgen_ty_5 = 128; +pub const BPF_F_WRONLY_PROG: _bindgen_ty_5 = 256; +pub const BPF_F_CLONE: _bindgen_ty_5 = 512; +pub const BPF_F_MMAPABLE: _bindgen_ty_5 = 1024; +pub const BPF_F_PRESERVE_ELEMS: _bindgen_ty_5 = 2048; +pub const BPF_F_INNER_MAP: _bindgen_ty_5 = 4096; +pub const BPF_F_LINK: _bindgen_ty_5 = 8192; +pub const BPF_F_PATH_FD: _bindgen_ty_5 = 16384; +pub const BPF_F_VTYPE_BTF_OBJ_FD: _bindgen_ty_5 = 32768; +pub const BPF_F_TOKEN_FD: _bindgen_ty_5 = 65536; +pub const BPF_F_SEGV_ON_FAULT: _bindgen_ty_5 = 131072; +pub const BPF_F_NO_USER_CONV: _bindgen_ty_5 = 262144; +pub type _bindgen_ty_5 = ::core::ffi::c_uint; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_stats_type { + BPF_STATS_RUN_TIME = 0, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_1, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_2, + pub batch: bpf_attr__bindgen_ty_3, + pub __bindgen_anon_3: bpf_attr__bindgen_ty_4, + pub __bindgen_anon_4: bpf_attr__bindgen_ty_5, + pub __bindgen_anon_5: bpf_attr__bindgen_ty_6, + pub test: bpf_attr__bindgen_ty_7, + pub __bindgen_anon_6: bpf_attr__bindgen_ty_8, + pub info: bpf_attr__bindgen_ty_9, + pub query: bpf_attr__bindgen_ty_10, + pub raw_tracepoint: bpf_attr__bindgen_ty_11, + pub __bindgen_anon_7: bpf_attr__bindgen_ty_12, + pub task_fd_query: bpf_attr__bindgen_ty_13, + pub link_create: bpf_attr__bindgen_ty_14, + pub link_update: bpf_attr__bindgen_ty_15, + pub link_detach: bpf_attr__bindgen_ty_16, + pub enable_stats: bpf_attr__bindgen_ty_17, + pub iter_create: bpf_attr__bindgen_ty_18, + pub prog_bind_map: bpf_attr__bindgen_ty_19, + pub token_create: bpf_attr__bindgen_ty_20, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_1 { + pub map_type: __u32, + pub key_size: __u32, + pub value_size: __u32, + pub max_entries: __u32, + pub map_flags: __u32, + pub inner_map_fd: __u32, + pub numa_node: __u32, + pub map_name: [::core::ffi::c_char; 16usize], + pub map_ifindex: __u32, + pub btf_fd: __u32, + pub btf_key_type_id: __u32, + pub btf_value_type_id: __u32, + pub btf_vmlinux_value_type_id: __u32, + pub map_extra: __u64, + pub value_type_btf_obj_fd: __s32, + pub map_token_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_2 { + pub map_fd: __u32, + pub key: __u64, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_2__bindgen_ty_1, + pub flags: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_2__bindgen_ty_1 { + pub value: __u64, + pub next_key: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_3 { + pub in_batch: __u64, + pub out_batch: __u64, + pub keys: __u64, + pub values: __u64, + pub count: __u32, + pub map_fd: __u32, + pub elem_flags: __u64, + pub flags: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_4 { + pub prog_type: __u32, + pub insn_cnt: __u32, + pub insns: __u64, + pub license: __u64, + pub log_level: __u32, + pub log_size: __u32, + pub log_buf: __u64, + pub kern_version: __u32, + pub prog_flags: __u32, + pub prog_name: [::core::ffi::c_char; 16usize], + pub prog_ifindex: __u32, + pub expected_attach_type: __u32, + pub prog_btf_fd: __u32, + pub func_info_rec_size: __u32, + pub func_info: __u64, + pub func_info_cnt: __u32, + pub line_info_rec_size: __u32, + pub line_info: __u64, + pub line_info_cnt: __u32, + pub attach_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_4__bindgen_ty_1, + pub core_relo_cnt: __u32, + pub fd_array: __u64, + pub core_relos: __u64, + pub core_relo_rec_size: __u32, + pub log_true_size: __u32, + pub prog_token_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_4__bindgen_ty_1 { + pub attach_prog_fd: __u32, + pub attach_btf_obj_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_5 { + pub pathname: __u64, + pub bpf_fd: __u32, + pub file_flags: __u32, + pub path_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_6 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_6__bindgen_ty_1, + pub attach_bpf_fd: __u32, + pub attach_type: __u32, + pub attach_flags: __u32, + pub replace_bpf_fd: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_6__bindgen_ty_2, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_6__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_6__bindgen_ty_2 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_7 { + pub prog_fd: __u32, + pub retval: __u32, + pub data_size_in: __u32, + pub data_size_out: __u32, + pub data_in: __u64, + pub data_out: __u64, + pub repeat: __u32, + pub duration: __u32, + pub ctx_size_in: __u32, + pub ctx_size_out: __u32, + pub ctx_in: __u64, + pub ctx_out: __u64, + pub flags: __u32, + pub cpu: __u32, + pub batch_size: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_8 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_8__bindgen_ty_1, + pub next_id: __u32, + pub open_flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_8__bindgen_ty_1 { + pub start_id: __u32, + pub prog_id: __u32, + pub map_id: __u32, + pub btf_id: __u32, + pub link_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_9 { + pub bpf_fd: __u32, + pub info_len: __u32, + pub info: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_10 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_10__bindgen_ty_1, + pub attach_type: __u32, + pub query_flags: __u32, + pub attach_flags: __u32, + pub prog_ids: __u64, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_10__bindgen_ty_2, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub prog_attach_flags: __u64, + pub link_ids: __u64, + pub link_attach_flags: __u64, + pub revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_10__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_10__bindgen_ty_2 { + pub prog_cnt: __u32, + pub count: __u32, +} +impl bpf_attr__bindgen_ty_10 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_11 { + pub name: __u64, + pub prog_fd: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_attr__bindgen_ty_11 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_12 { + pub btf: __u64, + pub btf_log_buf: __u64, + pub btf_size: __u32, + pub btf_log_size: __u32, + pub btf_log_level: __u32, + pub btf_log_true_size: __u32, + pub btf_flags: __u32, + pub btf_token_fd: __s32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_13 { + pub pid: __u32, + pub fd: __u32, + pub flags: __u32, + pub buf_len: __u32, + pub buf: __u64, + pub prog_id: __u32, + pub fd_type: __u32, + pub probe_offset: __u64, + pub probe_addr: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_1, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_14__bindgen_ty_2, + pub attach_type: __u32, + pub flags: __u32, + pub __bindgen_anon_3: bpf_attr__bindgen_ty_14__bindgen_ty_3, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_1 { + pub prog_fd: __u32, + pub map_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3 { + pub target_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1, + pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2, + pub kprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3, + pub tracing: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4, + pub netfilter: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5, + pub tcx: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6, + pub uprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7, + pub netkit: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 { + pub iter_info: __u64, + pub iter_info_len: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 { + pub bpf_cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 { + pub flags: __u32, + pub cnt: __u32, + pub syms: __u64, + pub addrs: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 { + pub target_btf_id: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 { + pub pf: __u32, + pub hooknum: __u32, + pub priority: __s32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 { + pub path: __u64, + pub offsets: __u64, + pub ref_ctr_offsets: __u64, + pub cookies: __u64, + pub cnt: __u32, + pub flags: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_15 { + pub link_fd: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_15__bindgen_ty_1, + pub flags: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_15__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_15__bindgen_ty_1 { + pub new_prog_fd: __u32, + pub new_map_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_15__bindgen_ty_2 { + pub old_prog_fd: __u32, + pub old_map_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_16 { + pub link_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_17 { + pub type_: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_18 { + pub link_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_19 { + pub prog_fd: __u32, + pub map_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_20 { + pub flags: __u32, + pub bpffs_fd: __u32, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_func_id { + BPF_FUNC_unspec = 0, + BPF_FUNC_map_lookup_elem = 1, + BPF_FUNC_map_update_elem = 2, + BPF_FUNC_map_delete_elem = 3, + BPF_FUNC_probe_read = 4, + BPF_FUNC_ktime_get_ns = 5, + BPF_FUNC_trace_printk = 6, + BPF_FUNC_get_prandom_u32 = 7, + BPF_FUNC_get_smp_processor_id = 8, + BPF_FUNC_skb_store_bytes = 9, + BPF_FUNC_l3_csum_replace = 10, + BPF_FUNC_l4_csum_replace = 11, + BPF_FUNC_tail_call = 12, + BPF_FUNC_clone_redirect = 13, + BPF_FUNC_get_current_pid_tgid = 14, + BPF_FUNC_get_current_uid_gid = 15, + BPF_FUNC_get_current_comm = 16, + BPF_FUNC_get_cgroup_classid = 17, + BPF_FUNC_skb_vlan_push = 18, + BPF_FUNC_skb_vlan_pop = 19, + BPF_FUNC_skb_get_tunnel_key = 20, + BPF_FUNC_skb_set_tunnel_key = 21, + BPF_FUNC_perf_event_read = 22, + BPF_FUNC_redirect = 23, + BPF_FUNC_get_route_realm = 24, + BPF_FUNC_perf_event_output = 25, + BPF_FUNC_skb_load_bytes = 26, + BPF_FUNC_get_stackid = 27, + BPF_FUNC_csum_diff = 28, + BPF_FUNC_skb_get_tunnel_opt = 29, + BPF_FUNC_skb_set_tunnel_opt = 30, + BPF_FUNC_skb_change_proto = 31, + BPF_FUNC_skb_change_type = 32, + BPF_FUNC_skb_under_cgroup = 33, + BPF_FUNC_get_hash_recalc = 34, + BPF_FUNC_get_current_task = 35, + BPF_FUNC_probe_write_user = 36, + BPF_FUNC_current_task_under_cgroup = 37, + BPF_FUNC_skb_change_tail = 38, + BPF_FUNC_skb_pull_data = 39, + BPF_FUNC_csum_update = 40, + BPF_FUNC_set_hash_invalid = 41, + BPF_FUNC_get_numa_node_id = 42, + BPF_FUNC_skb_change_head = 43, + BPF_FUNC_xdp_adjust_head = 44, + BPF_FUNC_probe_read_str = 45, + BPF_FUNC_get_socket_cookie = 46, + BPF_FUNC_get_socket_uid = 47, + BPF_FUNC_set_hash = 48, + BPF_FUNC_setsockopt = 49, + BPF_FUNC_skb_adjust_room = 50, + BPF_FUNC_redirect_map = 51, + BPF_FUNC_sk_redirect_map = 52, + BPF_FUNC_sock_map_update = 53, + BPF_FUNC_xdp_adjust_meta = 54, + BPF_FUNC_perf_event_read_value = 55, + BPF_FUNC_perf_prog_read_value = 56, + BPF_FUNC_getsockopt = 57, + BPF_FUNC_override_return = 58, + BPF_FUNC_sock_ops_cb_flags_set = 59, + BPF_FUNC_msg_redirect_map = 60, + BPF_FUNC_msg_apply_bytes = 61, + BPF_FUNC_msg_cork_bytes = 62, + BPF_FUNC_msg_pull_data = 63, + BPF_FUNC_bind = 64, + BPF_FUNC_xdp_adjust_tail = 65, + BPF_FUNC_skb_get_xfrm_state = 66, + BPF_FUNC_get_stack = 67, + BPF_FUNC_skb_load_bytes_relative = 68, + BPF_FUNC_fib_lookup = 69, + BPF_FUNC_sock_hash_update = 70, + BPF_FUNC_msg_redirect_hash = 71, + BPF_FUNC_sk_redirect_hash = 72, + BPF_FUNC_lwt_push_encap = 73, + BPF_FUNC_lwt_seg6_store_bytes = 74, + BPF_FUNC_lwt_seg6_adjust_srh = 75, + BPF_FUNC_lwt_seg6_action = 76, + BPF_FUNC_rc_repeat = 77, + BPF_FUNC_rc_keydown = 78, + BPF_FUNC_skb_cgroup_id = 79, + BPF_FUNC_get_current_cgroup_id = 80, + BPF_FUNC_get_local_storage = 81, + BPF_FUNC_sk_select_reuseport = 82, + BPF_FUNC_skb_ancestor_cgroup_id = 83, + BPF_FUNC_sk_lookup_tcp = 84, + BPF_FUNC_sk_lookup_udp = 85, + BPF_FUNC_sk_release = 86, + BPF_FUNC_map_push_elem = 87, + BPF_FUNC_map_pop_elem = 88, + BPF_FUNC_map_peek_elem = 89, + BPF_FUNC_msg_push_data = 90, + BPF_FUNC_msg_pop_data = 91, + BPF_FUNC_rc_pointer_rel = 92, + BPF_FUNC_spin_lock = 93, + BPF_FUNC_spin_unlock = 94, + BPF_FUNC_sk_fullsock = 95, + BPF_FUNC_tcp_sock = 96, + BPF_FUNC_skb_ecn_set_ce = 97, + BPF_FUNC_get_listener_sock = 98, + BPF_FUNC_skc_lookup_tcp = 99, + BPF_FUNC_tcp_check_syncookie = 100, + BPF_FUNC_sysctl_get_name = 101, + BPF_FUNC_sysctl_get_current_value = 102, + BPF_FUNC_sysctl_get_new_value = 103, + BPF_FUNC_sysctl_set_new_value = 104, + BPF_FUNC_strtol = 105, + BPF_FUNC_strtoul = 106, + BPF_FUNC_sk_storage_get = 107, + BPF_FUNC_sk_storage_delete = 108, + BPF_FUNC_send_signal = 109, + BPF_FUNC_tcp_gen_syncookie = 110, + BPF_FUNC_skb_output = 111, + BPF_FUNC_probe_read_user = 112, + BPF_FUNC_probe_read_kernel = 113, + BPF_FUNC_probe_read_user_str = 114, + BPF_FUNC_probe_read_kernel_str = 115, + BPF_FUNC_tcp_send_ack = 116, + BPF_FUNC_send_signal_thread = 117, + BPF_FUNC_jiffies64 = 118, + BPF_FUNC_read_branch_records = 119, + BPF_FUNC_get_ns_current_pid_tgid = 120, + BPF_FUNC_xdp_output = 121, + BPF_FUNC_get_netns_cookie = 122, + BPF_FUNC_get_current_ancestor_cgroup_id = 123, + BPF_FUNC_sk_assign = 124, + BPF_FUNC_ktime_get_boot_ns = 125, + BPF_FUNC_seq_printf = 126, + BPF_FUNC_seq_write = 127, + BPF_FUNC_sk_cgroup_id = 128, + BPF_FUNC_sk_ancestor_cgroup_id = 129, + BPF_FUNC_ringbuf_output = 130, + BPF_FUNC_ringbuf_reserve = 131, + BPF_FUNC_ringbuf_submit = 132, + BPF_FUNC_ringbuf_discard = 133, + BPF_FUNC_ringbuf_query = 134, + BPF_FUNC_csum_level = 135, + BPF_FUNC_skc_to_tcp6_sock = 136, + BPF_FUNC_skc_to_tcp_sock = 137, + BPF_FUNC_skc_to_tcp_timewait_sock = 138, + BPF_FUNC_skc_to_tcp_request_sock = 139, + BPF_FUNC_skc_to_udp6_sock = 140, + BPF_FUNC_get_task_stack = 141, + BPF_FUNC_load_hdr_opt = 142, + BPF_FUNC_store_hdr_opt = 143, + BPF_FUNC_reserve_hdr_opt = 144, + BPF_FUNC_inode_storage_get = 145, + BPF_FUNC_inode_storage_delete = 146, + BPF_FUNC_d_path = 147, + BPF_FUNC_copy_from_user = 148, + BPF_FUNC_snprintf_btf = 149, + BPF_FUNC_seq_printf_btf = 150, + BPF_FUNC_skb_cgroup_classid = 151, + BPF_FUNC_redirect_neigh = 152, + BPF_FUNC_per_cpu_ptr = 153, + BPF_FUNC_this_cpu_ptr = 154, + BPF_FUNC_redirect_peer = 155, + BPF_FUNC_task_storage_get = 156, + BPF_FUNC_task_storage_delete = 157, + BPF_FUNC_get_current_task_btf = 158, + BPF_FUNC_bprm_opts_set = 159, + BPF_FUNC_ktime_get_coarse_ns = 160, + BPF_FUNC_ima_inode_hash = 161, + BPF_FUNC_sock_from_file = 162, + BPF_FUNC_check_mtu = 163, + BPF_FUNC_for_each_map_elem = 164, + BPF_FUNC_snprintf = 165, + BPF_FUNC_sys_bpf = 166, + BPF_FUNC_btf_find_by_name_kind = 167, + BPF_FUNC_sys_close = 168, + BPF_FUNC_timer_init = 169, + BPF_FUNC_timer_set_callback = 170, + BPF_FUNC_timer_start = 171, + BPF_FUNC_timer_cancel = 172, + BPF_FUNC_get_func_ip = 173, + BPF_FUNC_get_attach_cookie = 174, + BPF_FUNC_task_pt_regs = 175, + BPF_FUNC_get_branch_snapshot = 176, + BPF_FUNC_trace_vprintk = 177, + BPF_FUNC_skc_to_unix_sock = 178, + BPF_FUNC_kallsyms_lookup_name = 179, + BPF_FUNC_find_vma = 180, + BPF_FUNC_loop = 181, + BPF_FUNC_strncmp = 182, + BPF_FUNC_get_func_arg = 183, + BPF_FUNC_get_func_ret = 184, + BPF_FUNC_get_func_arg_cnt = 185, + BPF_FUNC_get_retval = 186, + BPF_FUNC_set_retval = 187, + BPF_FUNC_xdp_get_buff_len = 188, + BPF_FUNC_xdp_load_bytes = 189, + BPF_FUNC_xdp_store_bytes = 190, + BPF_FUNC_copy_from_user_task = 191, + BPF_FUNC_skb_set_tstamp = 192, + BPF_FUNC_ima_file_hash = 193, + BPF_FUNC_kptr_xchg = 194, + BPF_FUNC_map_lookup_percpu_elem = 195, + BPF_FUNC_skc_to_mptcp_sock = 196, + BPF_FUNC_dynptr_from_mem = 197, + BPF_FUNC_ringbuf_reserve_dynptr = 198, + BPF_FUNC_ringbuf_submit_dynptr = 199, + BPF_FUNC_ringbuf_discard_dynptr = 200, + BPF_FUNC_dynptr_read = 201, + BPF_FUNC_dynptr_write = 202, + BPF_FUNC_dynptr_data = 203, + BPF_FUNC_tcp_raw_gen_syncookie_ipv4 = 204, + BPF_FUNC_tcp_raw_gen_syncookie_ipv6 = 205, + BPF_FUNC_tcp_raw_check_syncookie_ipv4 = 206, + BPF_FUNC_tcp_raw_check_syncookie_ipv6 = 207, + BPF_FUNC_ktime_get_tai_ns = 208, + BPF_FUNC_user_ringbuf_drain = 209, + BPF_FUNC_cgrp_storage_get = 210, + BPF_FUNC_cgrp_storage_delete = 211, + __BPF_FUNC_MAX_ID = 212, +} +pub const BPF_F_RECOMPUTE_CSUM: _bindgen_ty_6 = 1; +pub const BPF_F_INVALIDATE_HASH: _bindgen_ty_6 = 2; +pub type _bindgen_ty_6 = ::core::ffi::c_uint; +pub const BPF_F_HDR_FIELD_MASK: _bindgen_ty_7 = 15; +pub type _bindgen_ty_7 = ::core::ffi::c_uint; +pub const BPF_F_PSEUDO_HDR: _bindgen_ty_8 = 16; +pub const BPF_F_MARK_MANGLED_0: _bindgen_ty_8 = 32; +pub const BPF_F_MARK_ENFORCE: _bindgen_ty_8 = 64; +pub type _bindgen_ty_8 = ::core::ffi::c_uint; +pub const BPF_F_INGRESS: _bindgen_ty_9 = 1; +pub type _bindgen_ty_9 = ::core::ffi::c_uint; +pub const BPF_F_TUNINFO_IPV6: _bindgen_ty_10 = 1; +pub type _bindgen_ty_10 = ::core::ffi::c_uint; +pub const BPF_F_SKIP_FIELD_MASK: _bindgen_ty_11 = 255; +pub const BPF_F_USER_STACK: _bindgen_ty_11 = 256; +pub const BPF_F_FAST_STACK_CMP: _bindgen_ty_11 = 512; +pub const BPF_F_REUSE_STACKID: _bindgen_ty_11 = 1024; +pub const BPF_F_USER_BUILD_ID: _bindgen_ty_11 = 2048; +pub type _bindgen_ty_11 = ::core::ffi::c_uint; +pub const BPF_F_ZERO_CSUM_TX: _bindgen_ty_12 = 2; +pub const BPF_F_DONT_FRAGMENT: _bindgen_ty_12 = 4; +pub const BPF_F_SEQ_NUMBER: _bindgen_ty_12 = 8; +pub const BPF_F_NO_TUNNEL_KEY: _bindgen_ty_12 = 16; +pub type _bindgen_ty_12 = ::core::ffi::c_uint; +pub const BPF_F_TUNINFO_FLAGS: _bindgen_ty_13 = 16; +pub type _bindgen_ty_13 = ::core::ffi::c_uint; +pub const BPF_F_INDEX_MASK: _bindgen_ty_14 = 4294967295; +pub const BPF_F_CURRENT_CPU: _bindgen_ty_14 = 4294967295; +pub const BPF_F_CTXLEN_MASK: _bindgen_ty_14 = 4503595332403200; +pub type _bindgen_ty_14 = ::core::ffi::c_ulong; +pub const BPF_F_CURRENT_NETNS: _bindgen_ty_15 = -1; +pub type _bindgen_ty_15 = ::core::ffi::c_int; +pub const BPF_CSUM_LEVEL_QUERY: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_QUERY; +pub const BPF_CSUM_LEVEL_INC: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_INC; +pub const BPF_CSUM_LEVEL_DEC: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_DEC; +pub const BPF_CSUM_LEVEL_RESET: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_RESET; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_16 { + BPF_CSUM_LEVEL_QUERY = 0, + BPF_CSUM_LEVEL_INC = 1, + BPF_CSUM_LEVEL_DEC = 2, + BPF_CSUM_LEVEL_RESET = 3, +} +pub const BPF_F_ADJ_ROOM_FIXED_GSO: _bindgen_ty_17 = 1; +pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: _bindgen_ty_17 = 2; +pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: _bindgen_ty_17 = 4; +pub const BPF_F_ADJ_ROOM_ENCAP_L4_GRE: _bindgen_ty_17 = 8; +pub const BPF_F_ADJ_ROOM_ENCAP_L4_UDP: _bindgen_ty_17 = 16; +pub const BPF_F_ADJ_ROOM_NO_CSUM_RESET: _bindgen_ty_17 = 32; +pub const BPF_F_ADJ_ROOM_ENCAP_L2_ETH: _bindgen_ty_17 = 64; +pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV4: _bindgen_ty_17 = 128; +pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV6: _bindgen_ty_17 = 256; +pub type _bindgen_ty_17 = ::core::ffi::c_uint; +pub const BPF_ADJ_ROOM_ENCAP_L2_MASK: _bindgen_ty_18 = _bindgen_ty_18::BPF_ADJ_ROOM_ENCAP_L2_MASK; +pub const BPF_ADJ_ROOM_ENCAP_L2_SHIFT: _bindgen_ty_18 = _bindgen_ty_18::BPF_ADJ_ROOM_ENCAP_L2_SHIFT; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_18 { + BPF_ADJ_ROOM_ENCAP_L2_MASK = 255, + BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 56, +} +pub const BPF_F_SYSCTL_BASE_NAME: _bindgen_ty_19 = 1; +pub type _bindgen_ty_19 = ::core::ffi::c_uint; +pub const BPF_LOCAL_STORAGE_GET_F_CREATE: _bindgen_ty_20 = + _bindgen_ty_20::BPF_LOCAL_STORAGE_GET_F_CREATE; +pub const BPF_SK_STORAGE_GET_F_CREATE: _bindgen_ty_20 = + _bindgen_ty_20::BPF_LOCAL_STORAGE_GET_F_CREATE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_20 { + BPF_LOCAL_STORAGE_GET_F_CREATE = 1, +} +pub const BPF_F_GET_BRANCH_RECORDS_SIZE: _bindgen_ty_21 = 1; +pub type _bindgen_ty_21 = ::core::ffi::c_uint; +pub const BPF_RB_NO_WAKEUP: _bindgen_ty_22 = _bindgen_ty_22::BPF_RB_NO_WAKEUP; +pub const BPF_RB_FORCE_WAKEUP: _bindgen_ty_22 = _bindgen_ty_22::BPF_RB_FORCE_WAKEUP; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_22 { + BPF_RB_NO_WAKEUP = 1, + BPF_RB_FORCE_WAKEUP = 2, +} +pub const BPF_RB_AVAIL_DATA: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_AVAIL_DATA; +pub const BPF_RB_RING_SIZE: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_RING_SIZE; +pub const BPF_RB_CONS_POS: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_CONS_POS; +pub const BPF_RB_PROD_POS: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_PROD_POS; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_23 { + BPF_RB_AVAIL_DATA = 0, + BPF_RB_RING_SIZE = 1, + BPF_RB_CONS_POS = 2, + BPF_RB_PROD_POS = 3, +} +pub const BPF_RINGBUF_BUSY_BIT: _bindgen_ty_24 = 2147483648; +pub const BPF_RINGBUF_DISCARD_BIT: _bindgen_ty_24 = 1073741824; +pub const BPF_RINGBUF_HDR_SZ: _bindgen_ty_24 = 8; +pub type _bindgen_ty_24 = ::core::ffi::c_uint; +pub const BPF_SK_LOOKUP_F_REPLACE: _bindgen_ty_25 = _bindgen_ty_25::BPF_SK_LOOKUP_F_REPLACE; +pub const BPF_SK_LOOKUP_F_NO_REUSEPORT: _bindgen_ty_25 = + _bindgen_ty_25::BPF_SK_LOOKUP_F_NO_REUSEPORT; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_25 { + BPF_SK_LOOKUP_F_REPLACE = 1, + BPF_SK_LOOKUP_F_NO_REUSEPORT = 2, +} +pub const BPF_F_BPRM_SECUREEXEC: _bindgen_ty_26 = 1; +pub type _bindgen_ty_26 = ::core::ffi::c_uint; +pub const BPF_F_BROADCAST: _bindgen_ty_27 = 8; +pub const BPF_F_EXCLUDE_INGRESS: _bindgen_ty_27 = 16; +pub type _bindgen_ty_27 = ::core::ffi::c_uint; +pub const BPF_SKB_TSTAMP_UNSPEC: _bindgen_ty_28 = _bindgen_ty_28::BPF_SKB_TSTAMP_UNSPEC; +pub const BPF_SKB_TSTAMP_DELIVERY_MONO: _bindgen_ty_28 = + _bindgen_ty_28::BPF_SKB_TSTAMP_DELIVERY_MONO; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_28 { + BPF_SKB_TSTAMP_UNSPEC = 0, + BPF_SKB_TSTAMP_DELIVERY_MONO = 1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_devmap_val { + pub ifindex: __u32, + pub bpf_prog: bpf_devmap_val__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_devmap_val__bindgen_ty_1 { + pub fd: ::core::ffi::c_int, + pub id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_cpumap_val { + pub qsize: __u32, + pub bpf_prog: bpf_cpumap_val__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_cpumap_val__bindgen_ty_1 { + pub fd: ::core::ffi::c_int, + pub id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_prog_info { + pub type_: __u32, + pub id: __u32, + pub tag: [__u8; 8usize], + pub jited_prog_len: __u32, + pub xlated_prog_len: __u32, + pub jited_prog_insns: __u64, + pub xlated_prog_insns: __u64, + pub load_time: __u64, + pub created_by_uid: __u32, + pub nr_map_ids: __u32, + pub map_ids: __u64, + pub name: [::core::ffi::c_char; 16usize], + pub ifindex: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub netns_dev: __u64, + pub netns_ino: __u64, + pub nr_jited_ksyms: __u32, + pub nr_jited_func_lens: __u32, + pub jited_ksyms: __u64, + pub jited_func_lens: __u64, + pub btf_id: __u32, + pub func_info_rec_size: __u32, + pub func_info: __u64, + pub nr_func_info: __u32, + pub nr_line_info: __u32, + pub line_info: __u64, + pub jited_line_info: __u64, + pub nr_jited_line_info: __u32, + pub line_info_rec_size: __u32, + pub jited_line_info_rec_size: __u32, + pub nr_prog_tags: __u32, + pub prog_tags: __u64, + pub run_time_ns: __u64, + pub run_cnt: __u64, + pub recursion_misses: __u64, + pub verified_insns: __u32, + pub attach_btf_obj_id: __u32, + pub attach_btf_id: __u32, +} +impl bpf_prog_info { + #[inline] + pub fn gpl_compatible(&self) -> __u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_gpl_compatible(&mut self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let gpl_compatible: u32 = unsafe { ::core::mem::transmute(gpl_compatible) }; + gpl_compatible as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_map_info { + pub type_: __u32, + pub id: __u32, + pub key_size: __u32, + pub value_size: __u32, + pub max_entries: __u32, + pub map_flags: __u32, + pub name: [::core::ffi::c_char; 16usize], + pub ifindex: __u32, + pub btf_vmlinux_value_type_id: __u32, + pub netns_dev: __u64, + pub netns_ino: __u64, + pub btf_id: __u32, + pub btf_key_type_id: __u32, + pub btf_value_type_id: __u32, + pub btf_vmlinux_id: __u32, + pub map_extra: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_btf_info { + pub btf: __u64, + pub btf_size: __u32, + pub id: __u32, + pub name: __u64, + pub name_len: __u32, + pub kernel_btf: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info { + pub type_: __u32, + pub id: __u32, + pub prog_id: __u32, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1 { + pub raw_tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_1, + pub tracing: bpf_link_info__bindgen_ty_1__bindgen_ty_2, + pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_3, + pub iter: bpf_link_info__bindgen_ty_1__bindgen_ty_4, + pub netns: bpf_link_info__bindgen_ty_1__bindgen_ty_5, + pub xdp: bpf_link_info__bindgen_ty_1__bindgen_ty_6, + pub struct_ops: bpf_link_info__bindgen_ty_1__bindgen_ty_7, + pub netfilter: bpf_link_info__bindgen_ty_1__bindgen_ty_8, + pub kprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_9, + pub uprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_10, + pub perf_event: bpf_link_info__bindgen_ty_1__bindgen_ty_11, + pub tcx: bpf_link_info__bindgen_ty_1__bindgen_ty_12, + pub netkit: bpf_link_info__bindgen_ty_1__bindgen_ty_13, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_1 { + pub tp_name: __u64, + pub tp_name_len: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_2 { + pub attach_type: __u32, + pub target_obj_id: __u32, + pub target_btf_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_3 { + pub cgroup_id: __u64, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4 { + pub target_name: __u64, + pub target_name_len: __u32, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, + pub __bindgen_anon_2: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 { + pub map: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 { + pub map_id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 { + pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1, + pub task: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 { + pub cgroup_id: __u64, + pub order: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 { + pub tid: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_5 { + pub netns_ino: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_6 { + pub ifindex: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_7 { + pub map_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_8 { + pub pf: __u32, + pub hooknum: __u32, + pub priority: __s32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_9 { + pub addrs: __u64, + pub count: __u32, + pub flags: __u32, + pub missed: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_10 { + pub path: __u64, + pub offsets: __u64, + pub ref_ctr_offsets: __u64, + pub cookies: __u64, + pub path_size: __u32, + pub count: __u32, + pub flags: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11 { + pub type_: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 { + pub uprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1, + pub kprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2, + pub tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3, + pub event: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 { + pub file_name: __u64, + pub name_len: __u32, + pub offset: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 { + pub func_name: __u64, + pub name_len: __u32, + pub offset: __u32, + pub addr: __u64, + pub missed: __u64, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 { + pub tp_name: __u64, + pub name_len: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 { + pub config: __u64, + pub type_: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_12 { + pub ifindex: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_13 { + pub ifindex: __u32, + pub attach_type: __u32, +} +pub const BPF_SOCK_OPS_RTO_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_RTO_CB_FLAG; +pub const BPF_SOCK_OPS_RETRANS_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_RETRANS_CB_FLAG; +pub const BPF_SOCK_OPS_STATE_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_STATE_CB_FLAG; +pub const BPF_SOCK_OPS_RTT_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_RTT_CB_FLAG; +pub const BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_ALL_CB_FLAGS: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_ALL_CB_FLAGS; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_29 { + BPF_SOCK_OPS_RTO_CB_FLAG = 1, + BPF_SOCK_OPS_RETRANS_CB_FLAG = 2, + BPF_SOCK_OPS_STATE_CB_FLAG = 4, + BPF_SOCK_OPS_RTT_CB_FLAG = 8, + BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG = 16, + BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG = 32, + BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG = 64, + BPF_SOCK_OPS_ALL_CB_FLAGS = 127, +} +pub const BPF_SOCK_OPS_VOID: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_VOID; +pub const BPF_SOCK_OPS_TIMEOUT_INIT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TIMEOUT_INIT; +pub const BPF_SOCK_OPS_RWND_INIT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RWND_INIT; +pub const BPF_SOCK_OPS_TCP_CONNECT_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TCP_CONNECT_CB; +pub const BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB; +pub const BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB; +pub const BPF_SOCK_OPS_NEEDS_ECN: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_NEEDS_ECN; +pub const BPF_SOCK_OPS_BASE_RTT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_BASE_RTT; +pub const BPF_SOCK_OPS_RTO_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RTO_CB; +pub const BPF_SOCK_OPS_RETRANS_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RETRANS_CB; +pub const BPF_SOCK_OPS_STATE_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_STATE_CB; +pub const BPF_SOCK_OPS_TCP_LISTEN_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TCP_LISTEN_CB; +pub const BPF_SOCK_OPS_RTT_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RTT_CB; +pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_PARSE_HDR_OPT_CB; +pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_HDR_OPT_LEN_CB; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_WRITE_HDR_OPT_CB; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_30 { + BPF_SOCK_OPS_VOID = 0, + BPF_SOCK_OPS_TIMEOUT_INIT = 1, + BPF_SOCK_OPS_RWND_INIT = 2, + BPF_SOCK_OPS_TCP_CONNECT_CB = 3, + BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 4, + BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 5, + BPF_SOCK_OPS_NEEDS_ECN = 6, + BPF_SOCK_OPS_BASE_RTT = 7, + BPF_SOCK_OPS_RTO_CB = 8, + BPF_SOCK_OPS_RETRANS_CB = 9, + BPF_SOCK_OPS_STATE_CB = 10, + BPF_SOCK_OPS_TCP_LISTEN_CB = 11, + BPF_SOCK_OPS_RTT_CB = 12, + BPF_SOCK_OPS_PARSE_HDR_OPT_CB = 13, + BPF_SOCK_OPS_HDR_OPT_LEN_CB = 14, + BPF_SOCK_OPS_WRITE_HDR_OPT_CB = 15, +} +pub const BPF_TCP_ESTABLISHED: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_ESTABLISHED; +pub const BPF_TCP_SYN_SENT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_SYN_SENT; +pub const BPF_TCP_SYN_RECV: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_SYN_RECV; +pub const BPF_TCP_FIN_WAIT1: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_FIN_WAIT1; +pub const BPF_TCP_FIN_WAIT2: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_FIN_WAIT2; +pub const BPF_TCP_TIME_WAIT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_TIME_WAIT; +pub const BPF_TCP_CLOSE: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSE; +pub const BPF_TCP_CLOSE_WAIT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSE_WAIT; +pub const BPF_TCP_LAST_ACK: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_LAST_ACK; +pub const BPF_TCP_LISTEN: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_LISTEN; +pub const BPF_TCP_CLOSING: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSING; +pub const BPF_TCP_NEW_SYN_RECV: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_NEW_SYN_RECV; +pub const BPF_TCP_BOUND_INACTIVE: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_BOUND_INACTIVE; +pub const BPF_TCP_MAX_STATES: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_MAX_STATES; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_31 { + BPF_TCP_ESTABLISHED = 1, + BPF_TCP_SYN_SENT = 2, + BPF_TCP_SYN_RECV = 3, + BPF_TCP_FIN_WAIT1 = 4, + BPF_TCP_FIN_WAIT2 = 5, + BPF_TCP_TIME_WAIT = 6, + BPF_TCP_CLOSE = 7, + BPF_TCP_CLOSE_WAIT = 8, + BPF_TCP_LAST_ACK = 9, + BPF_TCP_LISTEN = 10, + BPF_TCP_CLOSING = 11, + BPF_TCP_NEW_SYN_RECV = 12, + BPF_TCP_BOUND_INACTIVE = 13, + BPF_TCP_MAX_STATES = 14, +} +pub const BPF_LOAD_HDR_OPT_TCP_SYN: _bindgen_ty_33 = _bindgen_ty_33::BPF_LOAD_HDR_OPT_TCP_SYN; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_33 { + BPF_LOAD_HDR_OPT_TCP_SYN = 1, +} +pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: _bindgen_ty_34 = + _bindgen_ty_34::BPF_WRITE_HDR_TCP_CURRENT_MSS; +pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: _bindgen_ty_34 = + _bindgen_ty_34::BPF_WRITE_HDR_TCP_SYNACK_COOKIE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_34 { + BPF_WRITE_HDR_TCP_CURRENT_MSS = 1, + BPF_WRITE_HDR_TCP_SYNACK_COOKIE = 2, +} +pub const BPF_DEVCG_ACC_MKNOD: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_MKNOD; +pub const BPF_DEVCG_ACC_READ: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_READ; +pub const BPF_DEVCG_ACC_WRITE: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_WRITE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_35 { + BPF_DEVCG_ACC_MKNOD = 1, + BPF_DEVCG_ACC_READ = 2, + BPF_DEVCG_ACC_WRITE = 4, +} +pub const BPF_DEVCG_DEV_BLOCK: _bindgen_ty_36 = _bindgen_ty_36::BPF_DEVCG_DEV_BLOCK; +pub const BPF_DEVCG_DEV_CHAR: _bindgen_ty_36 = _bindgen_ty_36::BPF_DEVCG_DEV_CHAR; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_36 { + BPF_DEVCG_DEV_BLOCK = 1, + BPF_DEVCG_DEV_CHAR = 2, +} +pub const BPF_FIB_LOOKUP_DIRECT: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_DIRECT; +pub const BPF_FIB_LOOKUP_OUTPUT: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_OUTPUT; +pub const BPF_FIB_LOOKUP_SKIP_NEIGH: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_SKIP_NEIGH; +pub const BPF_FIB_LOOKUP_TBID: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_TBID; +pub const BPF_FIB_LOOKUP_SRC: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_SRC; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_37 { + BPF_FIB_LOOKUP_DIRECT = 1, + BPF_FIB_LOOKUP_OUTPUT = 2, + BPF_FIB_LOOKUP_SKIP_NEIGH = 4, + BPF_FIB_LOOKUP_TBID = 8, + BPF_FIB_LOOKUP_SRC = 16, +} +pub const BPF_FIB_LKUP_RET_SUCCESS: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_SUCCESS; +pub const BPF_FIB_LKUP_RET_BLACKHOLE: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_BLACKHOLE; +pub const BPF_FIB_LKUP_RET_UNREACHABLE: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_UNREACHABLE; +pub const BPF_FIB_LKUP_RET_PROHIBIT: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_PROHIBIT; +pub const BPF_FIB_LKUP_RET_NOT_FWDED: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_NOT_FWDED; +pub const BPF_FIB_LKUP_RET_FWD_DISABLED: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_FWD_DISABLED; +pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_UNSUPP_LWT; +pub const BPF_FIB_LKUP_RET_NO_NEIGH: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_NO_NEIGH; +pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_FRAG_NEEDED; +pub const BPF_FIB_LKUP_RET_NO_SRC_ADDR: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_NO_SRC_ADDR; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_38 { + BPF_FIB_LKUP_RET_SUCCESS = 0, + BPF_FIB_LKUP_RET_BLACKHOLE = 1, + BPF_FIB_LKUP_RET_UNREACHABLE = 2, + BPF_FIB_LKUP_RET_PROHIBIT = 3, + BPF_FIB_LKUP_RET_NOT_FWDED = 4, + BPF_FIB_LKUP_RET_FWD_DISABLED = 5, + BPF_FIB_LKUP_RET_UNSUPP_LWT = 6, + BPF_FIB_LKUP_RET_NO_NEIGH = 7, + BPF_FIB_LKUP_RET_FRAG_NEEDED = 8, + BPF_FIB_LKUP_RET_NO_SRC_ADDR = 9, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_task_fd_type { + BPF_FD_TYPE_RAW_TRACEPOINT = 0, + BPF_FD_TYPE_TRACEPOINT = 1, + BPF_FD_TYPE_KPROBE = 2, + BPF_FD_TYPE_KRETPROBE = 3, + BPF_FD_TYPE_UPROBE = 4, + BPF_FD_TYPE_URETPROBE = 5, +} +pub const BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_39 { + BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 1, + BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 2, + BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 4, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_func_info { + pub insn_off: __u32, + pub type_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_line_info { + pub insn_off: __u32, + pub file_name_off: __u32, + pub line_off: __u32, + pub line_col: __u32, +} +pub const BPF_F_TIMER_ABS: _bindgen_ty_41 = 1; +pub const BPF_F_TIMER_CPU_PIN: _bindgen_ty_41 = 2; +pub type _bindgen_ty_41 = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_header { + pub magic: __u16, + pub version: __u8, + pub flags: __u8, + pub hdr_len: __u32, + pub type_off: __u32, + pub type_len: __u32, + pub str_off: __u32, + pub str_len: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct btf_type { + pub name_off: __u32, + pub info: __u32, + pub __bindgen_anon_1: btf_type__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union btf_type__bindgen_ty_1 { + pub size: __u32, + pub type_: __u32, +} +pub const BTF_KIND_UNKN: _bindgen_ty_42 = 0; +pub const BTF_KIND_INT: _bindgen_ty_42 = 1; +pub const BTF_KIND_PTR: _bindgen_ty_42 = 2; +pub const BTF_KIND_ARRAY: _bindgen_ty_42 = 3; +pub const BTF_KIND_STRUCT: _bindgen_ty_42 = 4; +pub const BTF_KIND_UNION: _bindgen_ty_42 = 5; +pub const BTF_KIND_ENUM: _bindgen_ty_42 = 6; +pub const BTF_KIND_FWD: _bindgen_ty_42 = 7; +pub const BTF_KIND_TYPEDEF: _bindgen_ty_42 = 8; +pub const BTF_KIND_VOLATILE: _bindgen_ty_42 = 9; +pub const BTF_KIND_CONST: _bindgen_ty_42 = 10; +pub const BTF_KIND_RESTRICT: _bindgen_ty_42 = 11; +pub const BTF_KIND_FUNC: _bindgen_ty_42 = 12; +pub const BTF_KIND_FUNC_PROTO: _bindgen_ty_42 = 13; +pub const BTF_KIND_VAR: _bindgen_ty_42 = 14; +pub const BTF_KIND_DATASEC: _bindgen_ty_42 = 15; +pub const BTF_KIND_FLOAT: _bindgen_ty_42 = 16; +pub const BTF_KIND_DECL_TAG: _bindgen_ty_42 = 17; +pub const BTF_KIND_TYPE_TAG: _bindgen_ty_42 = 18; +pub const BTF_KIND_ENUM64: _bindgen_ty_42 = 19; +pub const NR_BTF_KINDS: _bindgen_ty_42 = 20; +pub const BTF_KIND_MAX: _bindgen_ty_42 = 19; +pub type _bindgen_ty_42 = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_enum { + pub name_off: __u32, + pub val: __s32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_array { + pub type_: __u32, + pub index_type: __u32, + pub nelems: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_member { + pub name_off: __u32, + pub type_: __u32, + pub offset: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_param { + pub name_off: __u32, + pub type_: __u32, +} +pub const BTF_VAR_STATIC: _bindgen_ty_43 = 0; +pub const BTF_VAR_GLOBAL_ALLOCATED: _bindgen_ty_43 = 1; +pub const BTF_VAR_GLOBAL_EXTERN: _bindgen_ty_43 = 2; +pub type _bindgen_ty_43 = ::core::ffi::c_uint; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum btf_func_linkage { + BTF_FUNC_STATIC = 0, + BTF_FUNC_GLOBAL = 1, + BTF_FUNC_EXTERN = 2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_var { + pub linkage: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_var_secinfo { + pub type_: __u32, + pub offset: __u32, + pub size: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_decl_tag { + pub component_idx: __s32, +} +impl nlmsgerr_attrs { + pub const NLMSGERR_ATTR_MAX: nlmsgerr_attrs = nlmsgerr_attrs::NLMSGERR_ATTR_COOKIE; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum nlmsgerr_attrs { + NLMSGERR_ATTR_UNUSED = 0, + NLMSGERR_ATTR_MSG = 1, + NLMSGERR_ATTR_OFFS = 2, + NLMSGERR_ATTR_COOKIE = 3, + __NLMSGERR_ATTR_MAX = 4, +} +pub const IFLA_XDP_UNSPEC: _bindgen_ty_92 = 0; +pub const IFLA_XDP_FD: _bindgen_ty_92 = 1; +pub const IFLA_XDP_ATTACHED: _bindgen_ty_92 = 2; +pub const IFLA_XDP_FLAGS: _bindgen_ty_92 = 3; +pub const IFLA_XDP_PROG_ID: _bindgen_ty_92 = 4; +pub const IFLA_XDP_DRV_PROG_ID: _bindgen_ty_92 = 5; +pub const IFLA_XDP_SKB_PROG_ID: _bindgen_ty_92 = 6; +pub const IFLA_XDP_HW_PROG_ID: _bindgen_ty_92 = 7; +pub const IFLA_XDP_EXPECTED_FD: _bindgen_ty_92 = 8; +pub const __IFLA_XDP_MAX: _bindgen_ty_92 = 9; +pub type _bindgen_ty_92 = ::core::ffi::c_uint; +impl nf_inet_hooks { + pub const NF_INET_INGRESS: nf_inet_hooks = nf_inet_hooks::NF_INET_NUMHOOKS; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum nf_inet_hooks { + NF_INET_PRE_ROUTING = 0, + NF_INET_LOCAL_IN = 1, + NF_INET_FORWARD = 2, + NF_INET_LOCAL_OUT = 3, + NF_INET_POST_ROUTING = 4, + NF_INET_NUMHOOKS = 5, +} +pub const NFPROTO_UNSPEC: _bindgen_ty_99 = 0; +pub const NFPROTO_INET: _bindgen_ty_99 = 1; +pub const NFPROTO_IPV4: _bindgen_ty_99 = 2; +pub const NFPROTO_ARP: _bindgen_ty_99 = 3; +pub const NFPROTO_NETDEV: _bindgen_ty_99 = 5; +pub const NFPROTO_BRIDGE: _bindgen_ty_99 = 7; +pub const NFPROTO_IPV6: _bindgen_ty_99 = 10; +pub const NFPROTO_DECNET: _bindgen_ty_99 = 12; +pub const NFPROTO_NUMPROTO: _bindgen_ty_99 = 13; +pub type _bindgen_ty_99 = ::core::ffi::c_uint; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_type_id { + PERF_TYPE_HARDWARE = 0, + PERF_TYPE_SOFTWARE = 1, + PERF_TYPE_TRACEPOINT = 2, + PERF_TYPE_HW_CACHE = 3, + PERF_TYPE_RAW = 4, + PERF_TYPE_BREAKPOINT = 5, + PERF_TYPE_MAX = 6, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_hw_id { + PERF_COUNT_HW_CPU_CYCLES = 0, + PERF_COUNT_HW_INSTRUCTIONS = 1, + PERF_COUNT_HW_CACHE_REFERENCES = 2, + PERF_COUNT_HW_CACHE_MISSES = 3, + PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 4, + PERF_COUNT_HW_BRANCH_MISSES = 5, + PERF_COUNT_HW_BUS_CYCLES = 6, + PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 7, + PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 8, + PERF_COUNT_HW_REF_CPU_CYCLES = 9, + PERF_COUNT_HW_MAX = 10, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_hw_cache_id { + PERF_COUNT_HW_CACHE_L1D = 0, + PERF_COUNT_HW_CACHE_L1I = 1, + PERF_COUNT_HW_CACHE_LL = 2, + PERF_COUNT_HW_CACHE_DTLB = 3, + PERF_COUNT_HW_CACHE_ITLB = 4, + PERF_COUNT_HW_CACHE_BPU = 5, + PERF_COUNT_HW_CACHE_NODE = 6, + PERF_COUNT_HW_CACHE_MAX = 7, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_hw_cache_op_id { + PERF_COUNT_HW_CACHE_OP_READ = 0, + PERF_COUNT_HW_CACHE_OP_WRITE = 1, + PERF_COUNT_HW_CACHE_OP_PREFETCH = 2, + PERF_COUNT_HW_CACHE_OP_MAX = 3, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_hw_cache_op_result_id { + PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0, + PERF_COUNT_HW_CACHE_RESULT_MISS = 1, + PERF_COUNT_HW_CACHE_RESULT_MAX = 2, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_sw_ids { + PERF_COUNT_SW_CPU_CLOCK = 0, + PERF_COUNT_SW_TASK_CLOCK = 1, + PERF_COUNT_SW_PAGE_FAULTS = 2, + PERF_COUNT_SW_CONTEXT_SWITCHES = 3, + PERF_COUNT_SW_CPU_MIGRATIONS = 4, + PERF_COUNT_SW_PAGE_FAULTS_MIN = 5, + PERF_COUNT_SW_PAGE_FAULTS_MAJ = 6, + PERF_COUNT_SW_ALIGNMENT_FAULTS = 7, + PERF_COUNT_SW_EMULATION_FAULTS = 8, + PERF_COUNT_SW_DUMMY = 9, + PERF_COUNT_SW_BPF_OUTPUT = 10, + PERF_COUNT_SW_CGROUP_SWITCHES = 11, + PERF_COUNT_SW_MAX = 12, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_event_sample_format { + PERF_SAMPLE_IP = 1, + PERF_SAMPLE_TID = 2, + PERF_SAMPLE_TIME = 4, + PERF_SAMPLE_ADDR = 8, + PERF_SAMPLE_READ = 16, + PERF_SAMPLE_CALLCHAIN = 32, + PERF_SAMPLE_ID = 64, + PERF_SAMPLE_CPU = 128, + PERF_SAMPLE_PERIOD = 256, + PERF_SAMPLE_STREAM_ID = 512, + PERF_SAMPLE_RAW = 1024, + PERF_SAMPLE_BRANCH_STACK = 2048, + PERF_SAMPLE_REGS_USER = 4096, + PERF_SAMPLE_STACK_USER = 8192, + PERF_SAMPLE_WEIGHT = 16384, + PERF_SAMPLE_DATA_SRC = 32768, + PERF_SAMPLE_IDENTIFIER = 65536, + PERF_SAMPLE_TRANSACTION = 131072, + PERF_SAMPLE_REGS_INTR = 262144, + PERF_SAMPLE_PHYS_ADDR = 524288, + PERF_SAMPLE_AUX = 1048576, + PERF_SAMPLE_CGROUP = 2097152, + PERF_SAMPLE_DATA_PAGE_SIZE = 4194304, + PERF_SAMPLE_CODE_PAGE_SIZE = 8388608, + PERF_SAMPLE_WEIGHT_STRUCT = 16777216, + PERF_SAMPLE_MAX = 33554432, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct perf_event_attr { + pub type_: __u32, + pub size: __u32, + pub config: __u64, + pub __bindgen_anon_1: perf_event_attr__bindgen_ty_1, + pub sample_type: __u64, + pub read_format: __u64, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, + pub __bindgen_anon_2: perf_event_attr__bindgen_ty_2, + pub bp_type: __u32, + pub __bindgen_anon_3: perf_event_attr__bindgen_ty_3, + pub __bindgen_anon_4: perf_event_attr__bindgen_ty_4, + pub branch_sample_type: __u64, + pub sample_regs_user: __u64, + pub sample_stack_user: __u32, + pub clockid: __s32, + pub sample_regs_intr: __u64, + pub aux_watermark: __u32, + pub sample_max_stack: __u16, + pub __reserved_2: __u16, + pub aux_sample_size: __u32, + pub __reserved_3: __u32, + pub sig_data: __u64, + pub config3: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_attr__bindgen_ty_1 { + pub sample_period: __u64, + pub sample_freq: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_attr__bindgen_ty_2 { + pub wakeup_events: __u32, + pub wakeup_watermark: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_attr__bindgen_ty_3 { + pub bp_addr: __u64, + pub kprobe_func: __u64, + pub uprobe_path: __u64, + pub config1: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_attr__bindgen_ty_4 { + pub bp_len: __u64, + pub kprobe_addr: __u64, + pub probe_offset: __u64, + pub config2: __u64, +} +impl perf_event_attr { + #[inline] + pub fn disabled(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_disabled(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn disabled_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_disabled_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn inherit(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } + } + #[inline] + pub fn set_inherit(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn inherit_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn pinned(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } + } + #[inline] + pub fn set_pinned(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pinned_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_pinned_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclusive(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclusive(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclusive_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclusive_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_user(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_user(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_kernel(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_kernel(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_hv(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_hv(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_hv_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_hv_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_idle(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_idle(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_idle_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_idle_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mmap(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } + } + #[inline] + pub fn set_mmap(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mmap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn comm(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } + } + #[inline] + pub fn set_comm(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn comm_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn freq(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } + } + #[inline] + pub fn set_freq(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn freq_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_freq_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn inherit_stat(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } + } + #[inline] + pub fn set_inherit_stat(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn inherit_stat_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_stat_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_on_exec(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } + } + #[inline] + pub fn set_enable_on_exec(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_enable_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn task(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) } + } + #[inline] + pub fn set_task(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn task_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_task_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn watermark(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) } + } + #[inline] + pub fn set_watermark(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn watermark_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_watermark_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn precise_ip(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 2u8) as u64) } + } + #[inline] + pub fn set_precise_ip(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(15usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn precise_ip_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 2u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_precise_ip_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn mmap_data(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } + } + #[inline] + pub fn set_mmap_data(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mmap_data_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_data_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn sample_id_all(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } + } + #[inline] + pub fn set_sample_id_all(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(18usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn sample_id_all_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sample_id_all_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_host(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_host(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(19usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_host_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_host_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_guest(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_guest(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(20usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_guest_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_guest_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_callchain_kernel(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_callchain_kernel(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(21usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_callchain_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 21usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 21usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_callchain_user(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_callchain_user(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(22usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_callchain_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 22usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 22usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mmap2(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) } + } + #[inline] + pub fn set_mmap2(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(23usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mmap2_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 23usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap2_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 23usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn comm_exec(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) } + } + #[inline] + pub fn set_comm_exec(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(24usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn comm_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 24usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 24usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn use_clockid(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) } + } + #[inline] + pub fn set_use_clockid(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(25usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn use_clockid_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 25usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_use_clockid_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 25usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn context_switch(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) } + } + #[inline] + pub fn set_context_switch(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(26usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn context_switch_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 26usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_context_switch_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 26usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn write_backward(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) } + } + #[inline] + pub fn set_write_backward(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(27usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn write_backward_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 27usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_write_backward_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 27usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn namespaces(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) } + } + #[inline] + pub fn set_namespaces(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(28usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn namespaces_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 28usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_namespaces_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 28usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn ksymbol(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) } + } + #[inline] + pub fn set_ksymbol(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(29usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn ksymbol_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 29usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_ksymbol_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 29usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn bpf_event(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u64) } + } + #[inline] + pub fn set_bpf_event(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(30usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn bpf_event_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 30usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_bpf_event_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 30usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn aux_output(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u64) } + } + #[inline] + pub fn set_aux_output(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(31usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn aux_output_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_aux_output_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cgroup(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } + } + #[inline] + pub fn set_cgroup(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(32usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cgroup_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cgroup_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn text_poke(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) } + } + #[inline] + pub fn set_text_poke(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(33usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn text_poke_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 33usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_text_poke_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 33usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn build_id(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) } + } + #[inline] + pub fn set_build_id(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(34usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn build_id_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 34usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_build_id_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 34usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn inherit_thread(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) } + } + #[inline] + pub fn set_inherit_thread(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(35usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn inherit_thread_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 35usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_thread_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 35usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn remove_on_exec(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) } + } + #[inline] + pub fn set_remove_on_exec(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(36usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn remove_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 36usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_remove_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 36usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn sigtrap(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } + } + #[inline] + pub fn set_sigtrap(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(37usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn sigtrap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 37usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sigtrap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 37usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn __reserved_1(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) } + } + #[inline] + pub fn set___reserved_1(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(38usize, 26u8, val as u64) + } + } + #[inline] + pub unsafe fn __reserved_1_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 38usize, + 26u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set___reserved_1_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 38usize, + 26u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + disabled: __u64, + inherit: __u64, + pinned: __u64, + exclusive: __u64, + exclude_user: __u64, + exclude_kernel: __u64, + exclude_hv: __u64, + exclude_idle: __u64, + mmap: __u64, + comm: __u64, + freq: __u64, + inherit_stat: __u64, + enable_on_exec: __u64, + task: __u64, + watermark: __u64, + precise_ip: __u64, + mmap_data: __u64, + sample_id_all: __u64, + exclude_host: __u64, + exclude_guest: __u64, + exclude_callchain_kernel: __u64, + exclude_callchain_user: __u64, + mmap2: __u64, + comm_exec: __u64, + use_clockid: __u64, + context_switch: __u64, + write_backward: __u64, + namespaces: __u64, + ksymbol: __u64, + bpf_event: __u64, + aux_output: __u64, + cgroup: __u64, + text_poke: __u64, + build_id: __u64, + inherit_thread: __u64, + remove_on_exec: __u64, + sigtrap: __u64, + __reserved_1: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let disabled: u64 = unsafe { ::core::mem::transmute(disabled) }; + disabled as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let inherit: u64 = unsafe { ::core::mem::transmute(inherit) }; + inherit as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let pinned: u64 = unsafe { ::core::mem::transmute(pinned) }; + pinned as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let exclusive: u64 = unsafe { ::core::mem::transmute(exclusive) }; + exclusive as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let exclude_user: u64 = unsafe { ::core::mem::transmute(exclude_user) }; + exclude_user as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let exclude_kernel: u64 = unsafe { ::core::mem::transmute(exclude_kernel) }; + exclude_kernel as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let exclude_hv: u64 = unsafe { ::core::mem::transmute(exclude_hv) }; + exclude_hv as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let exclude_idle: u64 = unsafe { ::core::mem::transmute(exclude_idle) }; + exclude_idle as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let mmap: u64 = unsafe { ::core::mem::transmute(mmap) }; + mmap as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let comm: u64 = unsafe { ::core::mem::transmute(comm) }; + comm as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let freq: u64 = unsafe { ::core::mem::transmute(freq) }; + freq as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let inherit_stat: u64 = unsafe { ::core::mem::transmute(inherit_stat) }; + inherit_stat as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let enable_on_exec: u64 = unsafe { ::core::mem::transmute(enable_on_exec) }; + enable_on_exec as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let task: u64 = unsafe { ::core::mem::transmute(task) }; + task as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let watermark: u64 = unsafe { ::core::mem::transmute(watermark) }; + watermark as u64 + }); + __bindgen_bitfield_unit.set(15usize, 2u8, { + let precise_ip: u64 = unsafe { ::core::mem::transmute(precise_ip) }; + precise_ip as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let mmap_data: u64 = unsafe { ::core::mem::transmute(mmap_data) }; + mmap_data as u64 + }); + __bindgen_bitfield_unit.set(18usize, 1u8, { + let sample_id_all: u64 = unsafe { ::core::mem::transmute(sample_id_all) }; + sample_id_all as u64 + }); + __bindgen_bitfield_unit.set(19usize, 1u8, { + let exclude_host: u64 = unsafe { ::core::mem::transmute(exclude_host) }; + exclude_host as u64 + }); + __bindgen_bitfield_unit.set(20usize, 1u8, { + let exclude_guest: u64 = unsafe { ::core::mem::transmute(exclude_guest) }; + exclude_guest as u64 + }); + __bindgen_bitfield_unit.set(21usize, 1u8, { + let exclude_callchain_kernel: u64 = + unsafe { ::core::mem::transmute(exclude_callchain_kernel) }; + exclude_callchain_kernel as u64 + }); + __bindgen_bitfield_unit.set(22usize, 1u8, { + let exclude_callchain_user: u64 = + unsafe { ::core::mem::transmute(exclude_callchain_user) }; + exclude_callchain_user as u64 + }); + __bindgen_bitfield_unit.set(23usize, 1u8, { + let mmap2: u64 = unsafe { ::core::mem::transmute(mmap2) }; + mmap2 as u64 + }); + __bindgen_bitfield_unit.set(24usize, 1u8, { + let comm_exec: u64 = unsafe { ::core::mem::transmute(comm_exec) }; + comm_exec as u64 + }); + __bindgen_bitfield_unit.set(25usize, 1u8, { + let use_clockid: u64 = unsafe { ::core::mem::transmute(use_clockid) }; + use_clockid as u64 + }); + __bindgen_bitfield_unit.set(26usize, 1u8, { + let context_switch: u64 = unsafe { ::core::mem::transmute(context_switch) }; + context_switch as u64 + }); + __bindgen_bitfield_unit.set(27usize, 1u8, { + let write_backward: u64 = unsafe { ::core::mem::transmute(write_backward) }; + write_backward as u64 + }); + __bindgen_bitfield_unit.set(28usize, 1u8, { + let namespaces: u64 = unsafe { ::core::mem::transmute(namespaces) }; + namespaces as u64 + }); + __bindgen_bitfield_unit.set(29usize, 1u8, { + let ksymbol: u64 = unsafe { ::core::mem::transmute(ksymbol) }; + ksymbol as u64 + }); + __bindgen_bitfield_unit.set(30usize, 1u8, { + let bpf_event: u64 = unsafe { ::core::mem::transmute(bpf_event) }; + bpf_event as u64 + }); + __bindgen_bitfield_unit.set(31usize, 1u8, { + let aux_output: u64 = unsafe { ::core::mem::transmute(aux_output) }; + aux_output as u64 + }); + __bindgen_bitfield_unit.set(32usize, 1u8, { + let cgroup: u64 = unsafe { ::core::mem::transmute(cgroup) }; + cgroup as u64 + }); + __bindgen_bitfield_unit.set(33usize, 1u8, { + let text_poke: u64 = unsafe { ::core::mem::transmute(text_poke) }; + text_poke as u64 + }); + __bindgen_bitfield_unit.set(34usize, 1u8, { + let build_id: u64 = unsafe { ::core::mem::transmute(build_id) }; + build_id as u64 + }); + __bindgen_bitfield_unit.set(35usize, 1u8, { + let inherit_thread: u64 = unsafe { ::core::mem::transmute(inherit_thread) }; + inherit_thread as u64 + }); + __bindgen_bitfield_unit.set(36usize, 1u8, { + let remove_on_exec: u64 = unsafe { ::core::mem::transmute(remove_on_exec) }; + remove_on_exec as u64 + }); + __bindgen_bitfield_unit.set(37usize, 1u8, { + let sigtrap: u64 = unsafe { ::core::mem::transmute(sigtrap) }; + sigtrap as u64 + }); + __bindgen_bitfield_unit.set(38usize, 26u8, { + let __reserved_1: u64 = unsafe { ::core::mem::transmute(__reserved_1) }; + __reserved_1 as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct perf_event_mmap_page { + pub version: __u32, + pub compat_version: __u32, + pub lock: __u32, + pub index: __u32, + pub offset: __s64, + pub time_enabled: __u64, + pub time_running: __u64, + pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1, + pub pmc_width: __u16, + pub time_shift: __u16, + pub time_mult: __u32, + pub time_offset: __u64, + pub time_zero: __u64, + pub size: __u32, + pub __reserved_1: __u32, + pub time_cycles: __u64, + pub time_mask: __u64, + pub __reserved: [__u8; 928usize], + pub data_head: __u64, + pub data_tail: __u64, + pub data_offset: __u64, + pub data_size: __u64, + pub aux_head: __u64, + pub aux_tail: __u64, + pub aux_offset: __u64, + pub aux_size: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_mmap_page__bindgen_ty_1 { + pub capabilities: __u64, + pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u64; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn cap_bit0(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_bit0(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_bit0_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_bit0_is_deprecated(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_bit0_is_deprecated(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_bit0_is_deprecated_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_is_deprecated_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_user_rdpmc(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_user_rdpmc(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_user_rdpmc_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_rdpmc_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_user_time(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_user_time(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_user_time_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_user_time_zero(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_user_time_zero(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_user_time_zero_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_zero_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_user_time_short(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_user_time_short(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_user_time_short_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_short_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_____res(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) } + } + #[inline] + pub fn set_cap_____res(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(6usize, 58u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_____res_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 58u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_____res_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 58u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + cap_bit0: __u64, + cap_bit0_is_deprecated: __u64, + cap_user_rdpmc: __u64, + cap_user_time: __u64, + cap_user_time_zero: __u64, + cap_user_time_short: __u64, + cap_____res: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let cap_bit0: u64 = unsafe { ::core::mem::transmute(cap_bit0) }; + cap_bit0 as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let cap_bit0_is_deprecated: u64 = + unsafe { ::core::mem::transmute(cap_bit0_is_deprecated) }; + cap_bit0_is_deprecated as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let cap_user_rdpmc: u64 = unsafe { ::core::mem::transmute(cap_user_rdpmc) }; + cap_user_rdpmc as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let cap_user_time: u64 = unsafe { ::core::mem::transmute(cap_user_time) }; + cap_user_time as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let cap_user_time_zero: u64 = unsafe { ::core::mem::transmute(cap_user_time_zero) }; + cap_user_time_zero as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let cap_user_time_short: u64 = unsafe { ::core::mem::transmute(cap_user_time_short) }; + cap_user_time_short as u64 + }); + __bindgen_bitfield_unit.set(6usize, 58u8, { + let cap_____res: u64 = unsafe { ::core::mem::transmute(cap_____res) }; + cap_____res as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct perf_event_header { + pub type_: __u32, + pub misc: __u16, + pub size: __u16, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_event_type { + PERF_RECORD_MMAP = 1, + PERF_RECORD_LOST = 2, + PERF_RECORD_COMM = 3, + PERF_RECORD_EXIT = 4, + PERF_RECORD_THROTTLE = 5, + PERF_RECORD_UNTHROTTLE = 6, + PERF_RECORD_FORK = 7, + PERF_RECORD_READ = 8, + PERF_RECORD_SAMPLE = 9, + PERF_RECORD_MMAP2 = 10, + PERF_RECORD_AUX = 11, + PERF_RECORD_ITRACE_START = 12, + PERF_RECORD_LOST_SAMPLES = 13, + PERF_RECORD_SWITCH = 14, + PERF_RECORD_SWITCH_CPU_WIDE = 15, + PERF_RECORD_NAMESPACES = 16, + PERF_RECORD_KSYMBOL = 17, + PERF_RECORD_BPF_EVENT = 18, + PERF_RECORD_CGROUP = 19, + PERF_RECORD_TEXT_POKE = 20, + PERF_RECORD_AUX_OUTPUT_HW_ID = 21, + PERF_RECORD_MAX = 22, +} +pub const TCA_BPF_UNSPEC: _bindgen_ty_154 = 0; +pub const TCA_BPF_ACT: _bindgen_ty_154 = 1; +pub const TCA_BPF_POLICE: _bindgen_ty_154 = 2; +pub const TCA_BPF_CLASSID: _bindgen_ty_154 = 3; +pub const TCA_BPF_OPS_LEN: _bindgen_ty_154 = 4; +pub const TCA_BPF_OPS: _bindgen_ty_154 = 5; +pub const TCA_BPF_FD: _bindgen_ty_154 = 6; +pub const TCA_BPF_NAME: _bindgen_ty_154 = 7; +pub const TCA_BPF_FLAGS: _bindgen_ty_154 = 8; +pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_154 = 9; +pub const TCA_BPF_TAG: _bindgen_ty_154 = 10; +pub const TCA_BPF_ID: _bindgen_ty_154 = 11; +pub const __TCA_BPF_MAX: _bindgen_ty_154 = 12; +pub type _bindgen_ty_154 = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ifinfomsg { + pub ifi_family: ::core::ffi::c_uchar, + pub __ifi_pad: ::core::ffi::c_uchar, + pub ifi_type: ::core::ffi::c_ushort, + pub ifi_index: ::core::ffi::c_int, + pub ifi_flags: ::core::ffi::c_uint, + pub ifi_change: ::core::ffi::c_uint, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcmsg { + pub tcm_family: ::core::ffi::c_uchar, + pub tcm__pad1: ::core::ffi::c_uchar, + pub tcm__pad2: ::core::ffi::c_ushort, + pub tcm_ifindex: ::core::ffi::c_int, + pub tcm_handle: __u32, + pub tcm_parent: __u32, + pub tcm_info: __u32, +} +pub const TCA_UNSPEC: _bindgen_ty_174 = 0; +pub const TCA_KIND: _bindgen_ty_174 = 1; +pub const TCA_OPTIONS: _bindgen_ty_174 = 2; +pub const TCA_STATS: _bindgen_ty_174 = 3; +pub const TCA_XSTATS: _bindgen_ty_174 = 4; +pub const TCA_RATE: _bindgen_ty_174 = 5; +pub const TCA_FCNT: _bindgen_ty_174 = 6; +pub const TCA_STATS2: _bindgen_ty_174 = 7; +pub const TCA_STAB: _bindgen_ty_174 = 8; +pub const TCA_PAD: _bindgen_ty_174 = 9; +pub const TCA_DUMP_INVISIBLE: _bindgen_ty_174 = 10; +pub const TCA_CHAIN: _bindgen_ty_174 = 11; +pub const TCA_HW_OFFLOAD: _bindgen_ty_174 = 12; +pub const TCA_INGRESS_BLOCK: _bindgen_ty_174 = 13; +pub const TCA_EGRESS_BLOCK: _bindgen_ty_174 = 14; +pub const TCA_DUMP_FLAGS: _bindgen_ty_174 = 15; +pub const TCA_EXT_WARN_MSG: _bindgen_ty_174 = 16; +pub const __TCA_MAX: _bindgen_ty_174 = 17; +pub type _bindgen_ty_174 = ::core::ffi::c_uint; diff --git a/aya-obj/src/generated/linux_bindings_mips.rs b/aya-obj/src/generated/linux_bindings_mips.rs new file mode 100644 index 00000000..349653d7 --- /dev/null +++ b/aya-obj/src/generated/linux_bindings_mips.rs @@ -0,0 +1,4167 @@ +/* automatically generated by rust-bindgen 0.72.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { byte | mask } else { byte & !mask } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } +} +#[repr(C)] +#[derive(Default)] +pub struct __IncompleteArrayField(::core::marker::PhantomData, [T; 0]); +impl __IncompleteArrayField { + #[inline] + pub const fn new() -> Self { + __IncompleteArrayField(::core::marker::PhantomData, []) + } + #[inline] + pub fn as_ptr(&self) -> *const T { + self as *const _ as *const T + } + #[inline] + pub fn as_mut_ptr(&mut self) -> *mut T { + self as *mut _ as *mut T + } + #[inline] + pub unsafe fn as_slice(&self, len: usize) -> &[T] { + ::core::slice::from_raw_parts(self.as_ptr(), len) + } + #[inline] + pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { + ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len) + } +} +impl ::core::fmt::Debug for __IncompleteArrayField { + fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + fmt.write_str("__IncompleteArrayField") + } +} +pub const BPF_LD: u32 = 0; +pub const BPF_LDX: u32 = 1; +pub const BPF_ST: u32 = 2; +pub const BPF_STX: u32 = 3; +pub const BPF_ALU: u32 = 4; +pub const BPF_JMP: u32 = 5; +pub const BPF_RET: u32 = 6; +pub const BPF_MISC: u32 = 7; +pub const BPF_W: u32 = 0; +pub const BPF_H: u32 = 8; +pub const BPF_B: u32 = 16; +pub const BPF_IMM: u32 = 0; +pub const BPF_ABS: u32 = 32; +pub const BPF_IND: u32 = 64; +pub const BPF_MEM: u32 = 96; +pub const BPF_LEN: u32 = 128; +pub const BPF_MSH: u32 = 160; +pub const BPF_ADD: u32 = 0; +pub const BPF_SUB: u32 = 16; +pub const BPF_MUL: u32 = 32; +pub const BPF_DIV: u32 = 48; +pub const BPF_OR: u32 = 64; +pub const BPF_AND: u32 = 80; +pub const BPF_LSH: u32 = 96; +pub const BPF_RSH: u32 = 112; +pub const BPF_NEG: u32 = 128; +pub const BPF_MOD: u32 = 144; +pub const BPF_XOR: u32 = 160; +pub const BPF_JA: u32 = 0; +pub const BPF_JEQ: u32 = 16; +pub const BPF_JGT: u32 = 32; +pub const BPF_JGE: u32 = 48; +pub const BPF_JSET: u32 = 64; +pub const BPF_K: u32 = 0; +pub const BPF_X: u32 = 8; +pub const BPF_MAXINSNS: u32 = 4096; +pub const BPF_JMP32: u32 = 6; +pub const BPF_ALU64: u32 = 7; +pub const BPF_DW: u32 = 24; +pub const BPF_MEMSX: u32 = 128; +pub const BPF_ATOMIC: u32 = 192; +pub const BPF_XADD: u32 = 192; +pub const BPF_MOV: u32 = 176; +pub const BPF_ARSH: u32 = 192; +pub const BPF_END: u32 = 208; +pub const BPF_TO_LE: u32 = 0; +pub const BPF_TO_BE: u32 = 8; +pub const BPF_FROM_LE: u32 = 0; +pub const BPF_FROM_BE: u32 = 8; +pub const BPF_JNE: u32 = 80; +pub const BPF_JLT: u32 = 160; +pub const BPF_JLE: u32 = 176; +pub const BPF_JSGT: u32 = 96; +pub const BPF_JSGE: u32 = 112; +pub const BPF_JSLT: u32 = 192; +pub const BPF_JSLE: u32 = 208; +pub const BPF_JCOND: u32 = 224; +pub const BPF_CALL: u32 = 128; +pub const BPF_EXIT: u32 = 144; +pub const BPF_FETCH: u32 = 1; +pub const BPF_XCHG: u32 = 225; +pub const BPF_CMPXCHG: u32 = 241; +pub const BPF_F_ALLOW_OVERRIDE: u32 = 1; +pub const BPF_F_ALLOW_MULTI: u32 = 2; +pub const BPF_F_REPLACE: u32 = 4; +pub const BPF_F_BEFORE: u32 = 8; +pub const BPF_F_AFTER: u32 = 16; +pub const BPF_F_ID: u32 = 32; +pub const BPF_F_STRICT_ALIGNMENT: u32 = 1; +pub const BPF_F_ANY_ALIGNMENT: u32 = 2; +pub const BPF_F_TEST_RND_HI32: u32 = 4; +pub const BPF_F_TEST_STATE_FREQ: u32 = 8; +pub const BPF_F_SLEEPABLE: u32 = 16; +pub const BPF_F_XDP_HAS_FRAGS: u32 = 32; +pub const BPF_F_XDP_DEV_BOUND_ONLY: u32 = 64; +pub const BPF_F_TEST_REG_INVARIANTS: u32 = 128; +pub const BPF_F_NETFILTER_IP_DEFRAG: u32 = 1; +pub const BPF_PSEUDO_MAP_FD: u32 = 1; +pub const BPF_PSEUDO_MAP_IDX: u32 = 5; +pub const BPF_PSEUDO_MAP_VALUE: u32 = 2; +pub const BPF_PSEUDO_MAP_IDX_VALUE: u32 = 6; +pub const BPF_PSEUDO_BTF_ID: u32 = 3; +pub const BPF_PSEUDO_FUNC: u32 = 4; +pub const BPF_PSEUDO_CALL: u32 = 1; +pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2; +pub const BPF_F_QUERY_EFFECTIVE: u32 = 1; +pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1; +pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2; +pub const BPF_BUILD_ID_SIZE: u32 = 20; +pub const BPF_OBJ_NAME_LEN: u32 = 16; +pub const BPF_TAG_SIZE: u32 = 8; +pub const BTF_INT_SIGNED: u32 = 1; +pub const BTF_INT_CHAR: u32 = 2; +pub const BTF_INT_BOOL: u32 = 4; +pub const NLMSG_ALIGNTO: u32 = 4; +pub const XDP_FLAGS_UPDATE_IF_NOEXIST: u32 = 1; +pub const XDP_FLAGS_SKB_MODE: u32 = 2; +pub const XDP_FLAGS_DRV_MODE: u32 = 4; +pub const XDP_FLAGS_HW_MODE: u32 = 8; +pub const XDP_FLAGS_REPLACE: u32 = 16; +pub const XDP_FLAGS_MODES: u32 = 14; +pub const XDP_FLAGS_MASK: u32 = 31; +pub const PERF_EVENT_IOC_ENABLE: u32 = 536880128; +pub const PERF_EVENT_IOC_DISABLE: u32 = 536880129; +pub const PERF_EVENT_IOC_REFRESH: u32 = 536880130; +pub const PERF_EVENT_IOC_RESET: u32 = 536880131; +pub const PERF_EVENT_IOC_PERIOD: u32 = 2148017156; +pub const PERF_EVENT_IOC_SET_OUTPUT: u32 = 536880133; +pub const PERF_EVENT_IOC_SET_FILTER: u32 = 2147755014; +pub const PERF_EVENT_IOC_ID: u32 = 1074013191; +pub const PERF_EVENT_IOC_SET_BPF: u32 = 2147755016; +pub const PERF_EVENT_IOC_PAUSE_OUTPUT: u32 = 2147755017; +pub const PERF_EVENT_IOC_QUERY_BPF: u32 = 3221496842; +pub const PERF_EVENT_IOC_MODIFY_ATTRIBUTES: u32 = 2147755019; +pub const PERF_MAX_STACK_DEPTH: u32 = 127; +pub const PERF_MAX_CONTEXTS_PER_STACK: u32 = 8; +pub const PERF_FLAG_FD_NO_GROUP: u32 = 1; +pub const PERF_FLAG_FD_OUTPUT: u32 = 2; +pub const PERF_FLAG_PID_CGROUP: u32 = 4; +pub const PERF_FLAG_FD_CLOEXEC: u32 = 8; +pub const TC_H_MAJ_MASK: u32 = 4294901760; +pub const TC_H_MIN_MASK: u32 = 65535; +pub const TC_H_UNSPEC: u32 = 0; +pub const TC_H_ROOT: u32 = 4294967295; +pub const TC_H_INGRESS: u32 = 4294967281; +pub const TC_H_CLSACT: u32 = 4294967281; +pub const TC_H_MIN_PRIORITY: u32 = 65504; +pub const TC_H_MIN_INGRESS: u32 = 65522; +pub const TC_H_MIN_EGRESS: u32 = 65523; +pub const TCA_BPF_FLAG_ACT_DIRECT: u32 = 1; +pub const SO_ATTACH_BPF: u32 = 50; +pub const SO_DETACH_BPF: u32 = 27; +pub type __u8 = ::core::ffi::c_uchar; +pub type __s16 = ::core::ffi::c_short; +pub type __u16 = ::core::ffi::c_ushort; +pub type __s32 = ::core::ffi::c_int; +pub type __u32 = ::core::ffi::c_uint; +pub type __s64 = ::core::ffi::c_longlong; +pub type __u64 = ::core::ffi::c_ulonglong; +pub const BPF_REG_0: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_0; +pub const BPF_REG_1: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_1; +pub const BPF_REG_2: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_2; +pub const BPF_REG_3: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_3; +pub const BPF_REG_4: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_4; +pub const BPF_REG_5: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_5; +pub const BPF_REG_6: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_6; +pub const BPF_REG_7: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_7; +pub const BPF_REG_8: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_8; +pub const BPF_REG_9: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_9; +pub const BPF_REG_10: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_10; +pub const __MAX_BPF_REG: _bindgen_ty_1 = _bindgen_ty_1::__MAX_BPF_REG; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { + BPF_REG_0 = 0, + BPF_REG_1 = 1, + BPF_REG_2 = 2, + BPF_REG_3 = 3, + BPF_REG_4 = 4, + BPF_REG_5 = 5, + BPF_REG_6 = 6, + BPF_REG_7 = 7, + BPF_REG_8 = 8, + BPF_REG_9 = 9, + BPF_REG_10 = 10, + __MAX_BPF_REG = 11, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_insn { + pub code: __u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub off: __s16, + pub imm: __s32, +} +impl bpf_insn { + #[inline] + pub fn dst_reg(&self) -> __u8 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) } + } + #[inline] + pub fn set_dst_reg(&mut self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn src_reg(&self) -> __u8 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } + } + #[inline] + pub fn set_src_reg(&mut self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 4u8, { + let dst_reg: u8 = unsafe { ::core::mem::transmute(dst_reg) }; + dst_reg as u64 + }); + __bindgen_bitfield_unit.set(4usize, 4u8, { + let src_reg: u8 = unsafe { ::core::mem::transmute(src_reg) }; + src_reg as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug)] +pub struct bpf_lpm_trie_key { + pub prefixlen: __u32, + pub data: __IncompleteArrayField<__u8>, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_cgroup_iter_order { + BPF_CGROUP_ITER_ORDER_UNSPEC = 0, + BPF_CGROUP_ITER_SELF_ONLY = 1, + BPF_CGROUP_ITER_DESCENDANTS_PRE = 2, + BPF_CGROUP_ITER_DESCENDANTS_POST = 3, + BPF_CGROUP_ITER_ANCESTORS_UP = 4, +} +impl bpf_cmd { + pub const BPF_PROG_RUN: bpf_cmd = bpf_cmd::BPF_PROG_TEST_RUN; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_cmd { + BPF_MAP_CREATE = 0, + BPF_MAP_LOOKUP_ELEM = 1, + BPF_MAP_UPDATE_ELEM = 2, + BPF_MAP_DELETE_ELEM = 3, + BPF_MAP_GET_NEXT_KEY = 4, + BPF_PROG_LOAD = 5, + BPF_OBJ_PIN = 6, + BPF_OBJ_GET = 7, + BPF_PROG_ATTACH = 8, + BPF_PROG_DETACH = 9, + BPF_PROG_TEST_RUN = 10, + BPF_PROG_GET_NEXT_ID = 11, + BPF_MAP_GET_NEXT_ID = 12, + BPF_PROG_GET_FD_BY_ID = 13, + BPF_MAP_GET_FD_BY_ID = 14, + BPF_OBJ_GET_INFO_BY_FD = 15, + BPF_PROG_QUERY = 16, + BPF_RAW_TRACEPOINT_OPEN = 17, + BPF_BTF_LOAD = 18, + BPF_BTF_GET_FD_BY_ID = 19, + BPF_TASK_FD_QUERY = 20, + BPF_MAP_LOOKUP_AND_DELETE_ELEM = 21, + BPF_MAP_FREEZE = 22, + BPF_BTF_GET_NEXT_ID = 23, + BPF_MAP_LOOKUP_BATCH = 24, + BPF_MAP_LOOKUP_AND_DELETE_BATCH = 25, + BPF_MAP_UPDATE_BATCH = 26, + BPF_MAP_DELETE_BATCH = 27, + BPF_LINK_CREATE = 28, + BPF_LINK_UPDATE = 29, + BPF_LINK_GET_FD_BY_ID = 30, + BPF_LINK_GET_NEXT_ID = 31, + BPF_ENABLE_STATS = 32, + BPF_ITER_CREATE = 33, + BPF_LINK_DETACH = 34, + BPF_PROG_BIND_MAP = 35, + BPF_TOKEN_CREATE = 36, + __MAX_BPF_CMD = 37, +} +impl bpf_map_type { + pub const BPF_MAP_TYPE_CGROUP_STORAGE: bpf_map_type = + bpf_map_type::BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED; +} +impl bpf_map_type { + pub const BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE: bpf_map_type = + bpf_map_type::BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_map_type { + BPF_MAP_TYPE_UNSPEC = 0, + BPF_MAP_TYPE_HASH = 1, + BPF_MAP_TYPE_ARRAY = 2, + BPF_MAP_TYPE_PROG_ARRAY = 3, + BPF_MAP_TYPE_PERF_EVENT_ARRAY = 4, + BPF_MAP_TYPE_PERCPU_HASH = 5, + BPF_MAP_TYPE_PERCPU_ARRAY = 6, + BPF_MAP_TYPE_STACK_TRACE = 7, + BPF_MAP_TYPE_CGROUP_ARRAY = 8, + BPF_MAP_TYPE_LRU_HASH = 9, + BPF_MAP_TYPE_LRU_PERCPU_HASH = 10, + BPF_MAP_TYPE_LPM_TRIE = 11, + BPF_MAP_TYPE_ARRAY_OF_MAPS = 12, + BPF_MAP_TYPE_HASH_OF_MAPS = 13, + BPF_MAP_TYPE_DEVMAP = 14, + BPF_MAP_TYPE_SOCKMAP = 15, + BPF_MAP_TYPE_CPUMAP = 16, + BPF_MAP_TYPE_XSKMAP = 17, + BPF_MAP_TYPE_SOCKHASH = 18, + BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED = 19, + BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 20, + BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED = 21, + BPF_MAP_TYPE_QUEUE = 22, + BPF_MAP_TYPE_STACK = 23, + BPF_MAP_TYPE_SK_STORAGE = 24, + BPF_MAP_TYPE_DEVMAP_HASH = 25, + BPF_MAP_TYPE_STRUCT_OPS = 26, + BPF_MAP_TYPE_RINGBUF = 27, + BPF_MAP_TYPE_INODE_STORAGE = 28, + BPF_MAP_TYPE_TASK_STORAGE = 29, + BPF_MAP_TYPE_BLOOM_FILTER = 30, + BPF_MAP_TYPE_USER_RINGBUF = 31, + BPF_MAP_TYPE_CGRP_STORAGE = 32, + BPF_MAP_TYPE_ARENA = 33, + __MAX_BPF_MAP_TYPE = 34, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_prog_type { + BPF_PROG_TYPE_UNSPEC = 0, + BPF_PROG_TYPE_SOCKET_FILTER = 1, + BPF_PROG_TYPE_KPROBE = 2, + BPF_PROG_TYPE_SCHED_CLS = 3, + BPF_PROG_TYPE_SCHED_ACT = 4, + BPF_PROG_TYPE_TRACEPOINT = 5, + BPF_PROG_TYPE_XDP = 6, + BPF_PROG_TYPE_PERF_EVENT = 7, + BPF_PROG_TYPE_CGROUP_SKB = 8, + BPF_PROG_TYPE_CGROUP_SOCK = 9, + BPF_PROG_TYPE_LWT_IN = 10, + BPF_PROG_TYPE_LWT_OUT = 11, + BPF_PROG_TYPE_LWT_XMIT = 12, + BPF_PROG_TYPE_SOCK_OPS = 13, + BPF_PROG_TYPE_SK_SKB = 14, + BPF_PROG_TYPE_CGROUP_DEVICE = 15, + BPF_PROG_TYPE_SK_MSG = 16, + BPF_PROG_TYPE_RAW_TRACEPOINT = 17, + BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 18, + BPF_PROG_TYPE_LWT_SEG6LOCAL = 19, + BPF_PROG_TYPE_LIRC_MODE2 = 20, + BPF_PROG_TYPE_SK_REUSEPORT = 21, + BPF_PROG_TYPE_FLOW_DISSECTOR = 22, + BPF_PROG_TYPE_CGROUP_SYSCTL = 23, + BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE = 24, + BPF_PROG_TYPE_CGROUP_SOCKOPT = 25, + BPF_PROG_TYPE_TRACING = 26, + BPF_PROG_TYPE_STRUCT_OPS = 27, + BPF_PROG_TYPE_EXT = 28, + BPF_PROG_TYPE_LSM = 29, + BPF_PROG_TYPE_SK_LOOKUP = 30, + BPF_PROG_TYPE_SYSCALL = 31, + BPF_PROG_TYPE_NETFILTER = 32, + __MAX_BPF_PROG_TYPE = 33, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_attach_type { + BPF_CGROUP_INET_INGRESS = 0, + BPF_CGROUP_INET_EGRESS = 1, + BPF_CGROUP_INET_SOCK_CREATE = 2, + BPF_CGROUP_SOCK_OPS = 3, + BPF_SK_SKB_STREAM_PARSER = 4, + BPF_SK_SKB_STREAM_VERDICT = 5, + BPF_CGROUP_DEVICE = 6, + BPF_SK_MSG_VERDICT = 7, + BPF_CGROUP_INET4_BIND = 8, + BPF_CGROUP_INET6_BIND = 9, + BPF_CGROUP_INET4_CONNECT = 10, + BPF_CGROUP_INET6_CONNECT = 11, + BPF_CGROUP_INET4_POST_BIND = 12, + BPF_CGROUP_INET6_POST_BIND = 13, + BPF_CGROUP_UDP4_SENDMSG = 14, + BPF_CGROUP_UDP6_SENDMSG = 15, + BPF_LIRC_MODE2 = 16, + BPF_FLOW_DISSECTOR = 17, + BPF_CGROUP_SYSCTL = 18, + BPF_CGROUP_UDP4_RECVMSG = 19, + BPF_CGROUP_UDP6_RECVMSG = 20, + BPF_CGROUP_GETSOCKOPT = 21, + BPF_CGROUP_SETSOCKOPT = 22, + BPF_TRACE_RAW_TP = 23, + BPF_TRACE_FENTRY = 24, + BPF_TRACE_FEXIT = 25, + BPF_MODIFY_RETURN = 26, + BPF_LSM_MAC = 27, + BPF_TRACE_ITER = 28, + BPF_CGROUP_INET4_GETPEERNAME = 29, + BPF_CGROUP_INET6_GETPEERNAME = 30, + BPF_CGROUP_INET4_GETSOCKNAME = 31, + BPF_CGROUP_INET6_GETSOCKNAME = 32, + BPF_XDP_DEVMAP = 33, + BPF_CGROUP_INET_SOCK_RELEASE = 34, + BPF_XDP_CPUMAP = 35, + BPF_SK_LOOKUP = 36, + BPF_XDP = 37, + BPF_SK_SKB_VERDICT = 38, + BPF_SK_REUSEPORT_SELECT = 39, + BPF_SK_REUSEPORT_SELECT_OR_MIGRATE = 40, + BPF_PERF_EVENT = 41, + BPF_TRACE_KPROBE_MULTI = 42, + BPF_LSM_CGROUP = 43, + BPF_STRUCT_OPS = 44, + BPF_NETFILTER = 45, + BPF_TCX_INGRESS = 46, + BPF_TCX_EGRESS = 47, + BPF_TRACE_UPROBE_MULTI = 48, + BPF_CGROUP_UNIX_CONNECT = 49, + BPF_CGROUP_UNIX_SENDMSG = 50, + BPF_CGROUP_UNIX_RECVMSG = 51, + BPF_CGROUP_UNIX_GETPEERNAME = 52, + BPF_CGROUP_UNIX_GETSOCKNAME = 53, + BPF_NETKIT_PRIMARY = 54, + BPF_NETKIT_PEER = 55, + __MAX_BPF_ATTACH_TYPE = 56, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_link_type { + BPF_LINK_TYPE_UNSPEC = 0, + BPF_LINK_TYPE_RAW_TRACEPOINT = 1, + BPF_LINK_TYPE_TRACING = 2, + BPF_LINK_TYPE_CGROUP = 3, + BPF_LINK_TYPE_ITER = 4, + BPF_LINK_TYPE_NETNS = 5, + BPF_LINK_TYPE_XDP = 6, + BPF_LINK_TYPE_PERF_EVENT = 7, + BPF_LINK_TYPE_KPROBE_MULTI = 8, + BPF_LINK_TYPE_STRUCT_OPS = 9, + BPF_LINK_TYPE_NETFILTER = 10, + BPF_LINK_TYPE_TCX = 11, + BPF_LINK_TYPE_UPROBE_MULTI = 12, + BPF_LINK_TYPE_NETKIT = 13, + __MAX_BPF_LINK_TYPE = 14, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_perf_event_type { + BPF_PERF_EVENT_UNSPEC = 0, + BPF_PERF_EVENT_UPROBE = 1, + BPF_PERF_EVENT_URETPROBE = 2, + BPF_PERF_EVENT_KPROBE = 3, + BPF_PERF_EVENT_KRETPROBE = 4, + BPF_PERF_EVENT_TRACEPOINT = 5, + BPF_PERF_EVENT_EVENT = 6, +} +pub const BPF_F_KPROBE_MULTI_RETURN: _bindgen_ty_2 = 1; +pub type _bindgen_ty_2 = ::core::ffi::c_uint; +pub const BPF_F_UPROBE_MULTI_RETURN: _bindgen_ty_3 = 1; +pub type _bindgen_ty_3 = ::core::ffi::c_uint; +pub const BPF_ANY: _bindgen_ty_4 = 0; +pub const BPF_NOEXIST: _bindgen_ty_4 = 1; +pub const BPF_EXIST: _bindgen_ty_4 = 2; +pub const BPF_F_LOCK: _bindgen_ty_4 = 4; +pub type _bindgen_ty_4 = ::core::ffi::c_uint; +pub const BPF_F_NO_PREALLOC: _bindgen_ty_5 = 1; +pub const BPF_F_NO_COMMON_LRU: _bindgen_ty_5 = 2; +pub const BPF_F_NUMA_NODE: _bindgen_ty_5 = 4; +pub const BPF_F_RDONLY: _bindgen_ty_5 = 8; +pub const BPF_F_WRONLY: _bindgen_ty_5 = 16; +pub const BPF_F_STACK_BUILD_ID: _bindgen_ty_5 = 32; +pub const BPF_F_ZERO_SEED: _bindgen_ty_5 = 64; +pub const BPF_F_RDONLY_PROG: _bindgen_ty_5 = 128; +pub const BPF_F_WRONLY_PROG: _bindgen_ty_5 = 256; +pub const BPF_F_CLONE: _bindgen_ty_5 = 512; +pub const BPF_F_MMAPABLE: _bindgen_ty_5 = 1024; +pub const BPF_F_PRESERVE_ELEMS: _bindgen_ty_5 = 2048; +pub const BPF_F_INNER_MAP: _bindgen_ty_5 = 4096; +pub const BPF_F_LINK: _bindgen_ty_5 = 8192; +pub const BPF_F_PATH_FD: _bindgen_ty_5 = 16384; +pub const BPF_F_VTYPE_BTF_OBJ_FD: _bindgen_ty_5 = 32768; +pub const BPF_F_TOKEN_FD: _bindgen_ty_5 = 65536; +pub const BPF_F_SEGV_ON_FAULT: _bindgen_ty_5 = 131072; +pub const BPF_F_NO_USER_CONV: _bindgen_ty_5 = 262144; +pub type _bindgen_ty_5 = ::core::ffi::c_uint; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_stats_type { + BPF_STATS_RUN_TIME = 0, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_1, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_2, + pub batch: bpf_attr__bindgen_ty_3, + pub __bindgen_anon_3: bpf_attr__bindgen_ty_4, + pub __bindgen_anon_4: bpf_attr__bindgen_ty_5, + pub __bindgen_anon_5: bpf_attr__bindgen_ty_6, + pub test: bpf_attr__bindgen_ty_7, + pub __bindgen_anon_6: bpf_attr__bindgen_ty_8, + pub info: bpf_attr__bindgen_ty_9, + pub query: bpf_attr__bindgen_ty_10, + pub raw_tracepoint: bpf_attr__bindgen_ty_11, + pub __bindgen_anon_7: bpf_attr__bindgen_ty_12, + pub task_fd_query: bpf_attr__bindgen_ty_13, + pub link_create: bpf_attr__bindgen_ty_14, + pub link_update: bpf_attr__bindgen_ty_15, + pub link_detach: bpf_attr__bindgen_ty_16, + pub enable_stats: bpf_attr__bindgen_ty_17, + pub iter_create: bpf_attr__bindgen_ty_18, + pub prog_bind_map: bpf_attr__bindgen_ty_19, + pub token_create: bpf_attr__bindgen_ty_20, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_1 { + pub map_type: __u32, + pub key_size: __u32, + pub value_size: __u32, + pub max_entries: __u32, + pub map_flags: __u32, + pub inner_map_fd: __u32, + pub numa_node: __u32, + pub map_name: [::core::ffi::c_char; 16usize], + pub map_ifindex: __u32, + pub btf_fd: __u32, + pub btf_key_type_id: __u32, + pub btf_value_type_id: __u32, + pub btf_vmlinux_value_type_id: __u32, + pub map_extra: __u64, + pub value_type_btf_obj_fd: __s32, + pub map_token_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_2 { + pub map_fd: __u32, + pub key: __u64, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_2__bindgen_ty_1, + pub flags: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_2__bindgen_ty_1 { + pub value: __u64, + pub next_key: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_3 { + pub in_batch: __u64, + pub out_batch: __u64, + pub keys: __u64, + pub values: __u64, + pub count: __u32, + pub map_fd: __u32, + pub elem_flags: __u64, + pub flags: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_4 { + pub prog_type: __u32, + pub insn_cnt: __u32, + pub insns: __u64, + pub license: __u64, + pub log_level: __u32, + pub log_size: __u32, + pub log_buf: __u64, + pub kern_version: __u32, + pub prog_flags: __u32, + pub prog_name: [::core::ffi::c_char; 16usize], + pub prog_ifindex: __u32, + pub expected_attach_type: __u32, + pub prog_btf_fd: __u32, + pub func_info_rec_size: __u32, + pub func_info: __u64, + pub func_info_cnt: __u32, + pub line_info_rec_size: __u32, + pub line_info: __u64, + pub line_info_cnt: __u32, + pub attach_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_4__bindgen_ty_1, + pub core_relo_cnt: __u32, + pub fd_array: __u64, + pub core_relos: __u64, + pub core_relo_rec_size: __u32, + pub log_true_size: __u32, + pub prog_token_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_4__bindgen_ty_1 { + pub attach_prog_fd: __u32, + pub attach_btf_obj_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_5 { + pub pathname: __u64, + pub bpf_fd: __u32, + pub file_flags: __u32, + pub path_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_6 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_6__bindgen_ty_1, + pub attach_bpf_fd: __u32, + pub attach_type: __u32, + pub attach_flags: __u32, + pub replace_bpf_fd: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_6__bindgen_ty_2, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_6__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_6__bindgen_ty_2 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_7 { + pub prog_fd: __u32, + pub retval: __u32, + pub data_size_in: __u32, + pub data_size_out: __u32, + pub data_in: __u64, + pub data_out: __u64, + pub repeat: __u32, + pub duration: __u32, + pub ctx_size_in: __u32, + pub ctx_size_out: __u32, + pub ctx_in: __u64, + pub ctx_out: __u64, + pub flags: __u32, + pub cpu: __u32, + pub batch_size: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_8 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_8__bindgen_ty_1, + pub next_id: __u32, + pub open_flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_8__bindgen_ty_1 { + pub start_id: __u32, + pub prog_id: __u32, + pub map_id: __u32, + pub btf_id: __u32, + pub link_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_9 { + pub bpf_fd: __u32, + pub info_len: __u32, + pub info: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_10 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_10__bindgen_ty_1, + pub attach_type: __u32, + pub query_flags: __u32, + pub attach_flags: __u32, + pub prog_ids: __u64, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_10__bindgen_ty_2, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub prog_attach_flags: __u64, + pub link_ids: __u64, + pub link_attach_flags: __u64, + pub revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_10__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_10__bindgen_ty_2 { + pub prog_cnt: __u32, + pub count: __u32, +} +impl bpf_attr__bindgen_ty_10 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_11 { + pub name: __u64, + pub prog_fd: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_attr__bindgen_ty_11 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_12 { + pub btf: __u64, + pub btf_log_buf: __u64, + pub btf_size: __u32, + pub btf_log_size: __u32, + pub btf_log_level: __u32, + pub btf_log_true_size: __u32, + pub btf_flags: __u32, + pub btf_token_fd: __s32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_13 { + pub pid: __u32, + pub fd: __u32, + pub flags: __u32, + pub buf_len: __u32, + pub buf: __u64, + pub prog_id: __u32, + pub fd_type: __u32, + pub probe_offset: __u64, + pub probe_addr: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_1, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_14__bindgen_ty_2, + pub attach_type: __u32, + pub flags: __u32, + pub __bindgen_anon_3: bpf_attr__bindgen_ty_14__bindgen_ty_3, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_1 { + pub prog_fd: __u32, + pub map_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3 { + pub target_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1, + pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2, + pub kprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3, + pub tracing: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4, + pub netfilter: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5, + pub tcx: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6, + pub uprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7, + pub netkit: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 { + pub iter_info: __u64, + pub iter_info_len: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 { + pub bpf_cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 { + pub flags: __u32, + pub cnt: __u32, + pub syms: __u64, + pub addrs: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 { + pub target_btf_id: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 { + pub pf: __u32, + pub hooknum: __u32, + pub priority: __s32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 { + pub path: __u64, + pub offsets: __u64, + pub ref_ctr_offsets: __u64, + pub cookies: __u64, + pub cnt: __u32, + pub flags: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_15 { + pub link_fd: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_15__bindgen_ty_1, + pub flags: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_15__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_15__bindgen_ty_1 { + pub new_prog_fd: __u32, + pub new_map_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_15__bindgen_ty_2 { + pub old_prog_fd: __u32, + pub old_map_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_16 { + pub link_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_17 { + pub type_: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_18 { + pub link_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_19 { + pub prog_fd: __u32, + pub map_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_20 { + pub flags: __u32, + pub bpffs_fd: __u32, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_func_id { + BPF_FUNC_unspec = 0, + BPF_FUNC_map_lookup_elem = 1, + BPF_FUNC_map_update_elem = 2, + BPF_FUNC_map_delete_elem = 3, + BPF_FUNC_probe_read = 4, + BPF_FUNC_ktime_get_ns = 5, + BPF_FUNC_trace_printk = 6, + BPF_FUNC_get_prandom_u32 = 7, + BPF_FUNC_get_smp_processor_id = 8, + BPF_FUNC_skb_store_bytes = 9, + BPF_FUNC_l3_csum_replace = 10, + BPF_FUNC_l4_csum_replace = 11, + BPF_FUNC_tail_call = 12, + BPF_FUNC_clone_redirect = 13, + BPF_FUNC_get_current_pid_tgid = 14, + BPF_FUNC_get_current_uid_gid = 15, + BPF_FUNC_get_current_comm = 16, + BPF_FUNC_get_cgroup_classid = 17, + BPF_FUNC_skb_vlan_push = 18, + BPF_FUNC_skb_vlan_pop = 19, + BPF_FUNC_skb_get_tunnel_key = 20, + BPF_FUNC_skb_set_tunnel_key = 21, + BPF_FUNC_perf_event_read = 22, + BPF_FUNC_redirect = 23, + BPF_FUNC_get_route_realm = 24, + BPF_FUNC_perf_event_output = 25, + BPF_FUNC_skb_load_bytes = 26, + BPF_FUNC_get_stackid = 27, + BPF_FUNC_csum_diff = 28, + BPF_FUNC_skb_get_tunnel_opt = 29, + BPF_FUNC_skb_set_tunnel_opt = 30, + BPF_FUNC_skb_change_proto = 31, + BPF_FUNC_skb_change_type = 32, + BPF_FUNC_skb_under_cgroup = 33, + BPF_FUNC_get_hash_recalc = 34, + BPF_FUNC_get_current_task = 35, + BPF_FUNC_probe_write_user = 36, + BPF_FUNC_current_task_under_cgroup = 37, + BPF_FUNC_skb_change_tail = 38, + BPF_FUNC_skb_pull_data = 39, + BPF_FUNC_csum_update = 40, + BPF_FUNC_set_hash_invalid = 41, + BPF_FUNC_get_numa_node_id = 42, + BPF_FUNC_skb_change_head = 43, + BPF_FUNC_xdp_adjust_head = 44, + BPF_FUNC_probe_read_str = 45, + BPF_FUNC_get_socket_cookie = 46, + BPF_FUNC_get_socket_uid = 47, + BPF_FUNC_set_hash = 48, + BPF_FUNC_setsockopt = 49, + BPF_FUNC_skb_adjust_room = 50, + BPF_FUNC_redirect_map = 51, + BPF_FUNC_sk_redirect_map = 52, + BPF_FUNC_sock_map_update = 53, + BPF_FUNC_xdp_adjust_meta = 54, + BPF_FUNC_perf_event_read_value = 55, + BPF_FUNC_perf_prog_read_value = 56, + BPF_FUNC_getsockopt = 57, + BPF_FUNC_override_return = 58, + BPF_FUNC_sock_ops_cb_flags_set = 59, + BPF_FUNC_msg_redirect_map = 60, + BPF_FUNC_msg_apply_bytes = 61, + BPF_FUNC_msg_cork_bytes = 62, + BPF_FUNC_msg_pull_data = 63, + BPF_FUNC_bind = 64, + BPF_FUNC_xdp_adjust_tail = 65, + BPF_FUNC_skb_get_xfrm_state = 66, + BPF_FUNC_get_stack = 67, + BPF_FUNC_skb_load_bytes_relative = 68, + BPF_FUNC_fib_lookup = 69, + BPF_FUNC_sock_hash_update = 70, + BPF_FUNC_msg_redirect_hash = 71, + BPF_FUNC_sk_redirect_hash = 72, + BPF_FUNC_lwt_push_encap = 73, + BPF_FUNC_lwt_seg6_store_bytes = 74, + BPF_FUNC_lwt_seg6_adjust_srh = 75, + BPF_FUNC_lwt_seg6_action = 76, + BPF_FUNC_rc_repeat = 77, + BPF_FUNC_rc_keydown = 78, + BPF_FUNC_skb_cgroup_id = 79, + BPF_FUNC_get_current_cgroup_id = 80, + BPF_FUNC_get_local_storage = 81, + BPF_FUNC_sk_select_reuseport = 82, + BPF_FUNC_skb_ancestor_cgroup_id = 83, + BPF_FUNC_sk_lookup_tcp = 84, + BPF_FUNC_sk_lookup_udp = 85, + BPF_FUNC_sk_release = 86, + BPF_FUNC_map_push_elem = 87, + BPF_FUNC_map_pop_elem = 88, + BPF_FUNC_map_peek_elem = 89, + BPF_FUNC_msg_push_data = 90, + BPF_FUNC_msg_pop_data = 91, + BPF_FUNC_rc_pointer_rel = 92, + BPF_FUNC_spin_lock = 93, + BPF_FUNC_spin_unlock = 94, + BPF_FUNC_sk_fullsock = 95, + BPF_FUNC_tcp_sock = 96, + BPF_FUNC_skb_ecn_set_ce = 97, + BPF_FUNC_get_listener_sock = 98, + BPF_FUNC_skc_lookup_tcp = 99, + BPF_FUNC_tcp_check_syncookie = 100, + BPF_FUNC_sysctl_get_name = 101, + BPF_FUNC_sysctl_get_current_value = 102, + BPF_FUNC_sysctl_get_new_value = 103, + BPF_FUNC_sysctl_set_new_value = 104, + BPF_FUNC_strtol = 105, + BPF_FUNC_strtoul = 106, + BPF_FUNC_sk_storage_get = 107, + BPF_FUNC_sk_storage_delete = 108, + BPF_FUNC_send_signal = 109, + BPF_FUNC_tcp_gen_syncookie = 110, + BPF_FUNC_skb_output = 111, + BPF_FUNC_probe_read_user = 112, + BPF_FUNC_probe_read_kernel = 113, + BPF_FUNC_probe_read_user_str = 114, + BPF_FUNC_probe_read_kernel_str = 115, + BPF_FUNC_tcp_send_ack = 116, + BPF_FUNC_send_signal_thread = 117, + BPF_FUNC_jiffies64 = 118, + BPF_FUNC_read_branch_records = 119, + BPF_FUNC_get_ns_current_pid_tgid = 120, + BPF_FUNC_xdp_output = 121, + BPF_FUNC_get_netns_cookie = 122, + BPF_FUNC_get_current_ancestor_cgroup_id = 123, + BPF_FUNC_sk_assign = 124, + BPF_FUNC_ktime_get_boot_ns = 125, + BPF_FUNC_seq_printf = 126, + BPF_FUNC_seq_write = 127, + BPF_FUNC_sk_cgroup_id = 128, + BPF_FUNC_sk_ancestor_cgroup_id = 129, + BPF_FUNC_ringbuf_output = 130, + BPF_FUNC_ringbuf_reserve = 131, + BPF_FUNC_ringbuf_submit = 132, + BPF_FUNC_ringbuf_discard = 133, + BPF_FUNC_ringbuf_query = 134, + BPF_FUNC_csum_level = 135, + BPF_FUNC_skc_to_tcp6_sock = 136, + BPF_FUNC_skc_to_tcp_sock = 137, + BPF_FUNC_skc_to_tcp_timewait_sock = 138, + BPF_FUNC_skc_to_tcp_request_sock = 139, + BPF_FUNC_skc_to_udp6_sock = 140, + BPF_FUNC_get_task_stack = 141, + BPF_FUNC_load_hdr_opt = 142, + BPF_FUNC_store_hdr_opt = 143, + BPF_FUNC_reserve_hdr_opt = 144, + BPF_FUNC_inode_storage_get = 145, + BPF_FUNC_inode_storage_delete = 146, + BPF_FUNC_d_path = 147, + BPF_FUNC_copy_from_user = 148, + BPF_FUNC_snprintf_btf = 149, + BPF_FUNC_seq_printf_btf = 150, + BPF_FUNC_skb_cgroup_classid = 151, + BPF_FUNC_redirect_neigh = 152, + BPF_FUNC_per_cpu_ptr = 153, + BPF_FUNC_this_cpu_ptr = 154, + BPF_FUNC_redirect_peer = 155, + BPF_FUNC_task_storage_get = 156, + BPF_FUNC_task_storage_delete = 157, + BPF_FUNC_get_current_task_btf = 158, + BPF_FUNC_bprm_opts_set = 159, + BPF_FUNC_ktime_get_coarse_ns = 160, + BPF_FUNC_ima_inode_hash = 161, + BPF_FUNC_sock_from_file = 162, + BPF_FUNC_check_mtu = 163, + BPF_FUNC_for_each_map_elem = 164, + BPF_FUNC_snprintf = 165, + BPF_FUNC_sys_bpf = 166, + BPF_FUNC_btf_find_by_name_kind = 167, + BPF_FUNC_sys_close = 168, + BPF_FUNC_timer_init = 169, + BPF_FUNC_timer_set_callback = 170, + BPF_FUNC_timer_start = 171, + BPF_FUNC_timer_cancel = 172, + BPF_FUNC_get_func_ip = 173, + BPF_FUNC_get_attach_cookie = 174, + BPF_FUNC_task_pt_regs = 175, + BPF_FUNC_get_branch_snapshot = 176, + BPF_FUNC_trace_vprintk = 177, + BPF_FUNC_skc_to_unix_sock = 178, + BPF_FUNC_kallsyms_lookup_name = 179, + BPF_FUNC_find_vma = 180, + BPF_FUNC_loop = 181, + BPF_FUNC_strncmp = 182, + BPF_FUNC_get_func_arg = 183, + BPF_FUNC_get_func_ret = 184, + BPF_FUNC_get_func_arg_cnt = 185, + BPF_FUNC_get_retval = 186, + BPF_FUNC_set_retval = 187, + BPF_FUNC_xdp_get_buff_len = 188, + BPF_FUNC_xdp_load_bytes = 189, + BPF_FUNC_xdp_store_bytes = 190, + BPF_FUNC_copy_from_user_task = 191, + BPF_FUNC_skb_set_tstamp = 192, + BPF_FUNC_ima_file_hash = 193, + BPF_FUNC_kptr_xchg = 194, + BPF_FUNC_map_lookup_percpu_elem = 195, + BPF_FUNC_skc_to_mptcp_sock = 196, + BPF_FUNC_dynptr_from_mem = 197, + BPF_FUNC_ringbuf_reserve_dynptr = 198, + BPF_FUNC_ringbuf_submit_dynptr = 199, + BPF_FUNC_ringbuf_discard_dynptr = 200, + BPF_FUNC_dynptr_read = 201, + BPF_FUNC_dynptr_write = 202, + BPF_FUNC_dynptr_data = 203, + BPF_FUNC_tcp_raw_gen_syncookie_ipv4 = 204, + BPF_FUNC_tcp_raw_gen_syncookie_ipv6 = 205, + BPF_FUNC_tcp_raw_check_syncookie_ipv4 = 206, + BPF_FUNC_tcp_raw_check_syncookie_ipv6 = 207, + BPF_FUNC_ktime_get_tai_ns = 208, + BPF_FUNC_user_ringbuf_drain = 209, + BPF_FUNC_cgrp_storage_get = 210, + BPF_FUNC_cgrp_storage_delete = 211, + __BPF_FUNC_MAX_ID = 212, +} +pub const BPF_F_RECOMPUTE_CSUM: _bindgen_ty_6 = 1; +pub const BPF_F_INVALIDATE_HASH: _bindgen_ty_6 = 2; +pub type _bindgen_ty_6 = ::core::ffi::c_uint; +pub const BPF_F_HDR_FIELD_MASK: _bindgen_ty_7 = 15; +pub type _bindgen_ty_7 = ::core::ffi::c_uint; +pub const BPF_F_PSEUDO_HDR: _bindgen_ty_8 = 16; +pub const BPF_F_MARK_MANGLED_0: _bindgen_ty_8 = 32; +pub const BPF_F_MARK_ENFORCE: _bindgen_ty_8 = 64; +pub type _bindgen_ty_8 = ::core::ffi::c_uint; +pub const BPF_F_INGRESS: _bindgen_ty_9 = 1; +pub type _bindgen_ty_9 = ::core::ffi::c_uint; +pub const BPF_F_TUNINFO_IPV6: _bindgen_ty_10 = 1; +pub type _bindgen_ty_10 = ::core::ffi::c_uint; +pub const BPF_F_SKIP_FIELD_MASK: _bindgen_ty_11 = 255; +pub const BPF_F_USER_STACK: _bindgen_ty_11 = 256; +pub const BPF_F_FAST_STACK_CMP: _bindgen_ty_11 = 512; +pub const BPF_F_REUSE_STACKID: _bindgen_ty_11 = 1024; +pub const BPF_F_USER_BUILD_ID: _bindgen_ty_11 = 2048; +pub type _bindgen_ty_11 = ::core::ffi::c_uint; +pub const BPF_F_ZERO_CSUM_TX: _bindgen_ty_12 = 2; +pub const BPF_F_DONT_FRAGMENT: _bindgen_ty_12 = 4; +pub const BPF_F_SEQ_NUMBER: _bindgen_ty_12 = 8; +pub const BPF_F_NO_TUNNEL_KEY: _bindgen_ty_12 = 16; +pub type _bindgen_ty_12 = ::core::ffi::c_uint; +pub const BPF_F_TUNINFO_FLAGS: _bindgen_ty_13 = 16; +pub type _bindgen_ty_13 = ::core::ffi::c_uint; +pub const BPF_F_INDEX_MASK: _bindgen_ty_14 = 4294967295; +pub const BPF_F_CURRENT_CPU: _bindgen_ty_14 = 4294967295; +pub const BPF_F_CTXLEN_MASK: _bindgen_ty_14 = 4503595332403200; +pub type _bindgen_ty_14 = ::core::ffi::c_ulonglong; +pub const BPF_F_CURRENT_NETNS: _bindgen_ty_15 = -1; +pub type _bindgen_ty_15 = ::core::ffi::c_int; +pub const BPF_CSUM_LEVEL_QUERY: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_QUERY; +pub const BPF_CSUM_LEVEL_INC: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_INC; +pub const BPF_CSUM_LEVEL_DEC: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_DEC; +pub const BPF_CSUM_LEVEL_RESET: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_RESET; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_16 { + BPF_CSUM_LEVEL_QUERY = 0, + BPF_CSUM_LEVEL_INC = 1, + BPF_CSUM_LEVEL_DEC = 2, + BPF_CSUM_LEVEL_RESET = 3, +} +pub const BPF_F_ADJ_ROOM_FIXED_GSO: _bindgen_ty_17 = 1; +pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: _bindgen_ty_17 = 2; +pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: _bindgen_ty_17 = 4; +pub const BPF_F_ADJ_ROOM_ENCAP_L4_GRE: _bindgen_ty_17 = 8; +pub const BPF_F_ADJ_ROOM_ENCAP_L4_UDP: _bindgen_ty_17 = 16; +pub const BPF_F_ADJ_ROOM_NO_CSUM_RESET: _bindgen_ty_17 = 32; +pub const BPF_F_ADJ_ROOM_ENCAP_L2_ETH: _bindgen_ty_17 = 64; +pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV4: _bindgen_ty_17 = 128; +pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV6: _bindgen_ty_17 = 256; +pub type _bindgen_ty_17 = ::core::ffi::c_uint; +pub const BPF_ADJ_ROOM_ENCAP_L2_MASK: _bindgen_ty_18 = _bindgen_ty_18::BPF_ADJ_ROOM_ENCAP_L2_MASK; +pub const BPF_ADJ_ROOM_ENCAP_L2_SHIFT: _bindgen_ty_18 = _bindgen_ty_18::BPF_ADJ_ROOM_ENCAP_L2_SHIFT; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_18 { + BPF_ADJ_ROOM_ENCAP_L2_MASK = 255, + BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 56, +} +pub const BPF_F_SYSCTL_BASE_NAME: _bindgen_ty_19 = 1; +pub type _bindgen_ty_19 = ::core::ffi::c_uint; +pub const BPF_LOCAL_STORAGE_GET_F_CREATE: _bindgen_ty_20 = + _bindgen_ty_20::BPF_LOCAL_STORAGE_GET_F_CREATE; +pub const BPF_SK_STORAGE_GET_F_CREATE: _bindgen_ty_20 = + _bindgen_ty_20::BPF_LOCAL_STORAGE_GET_F_CREATE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_20 { + BPF_LOCAL_STORAGE_GET_F_CREATE = 1, +} +pub const BPF_F_GET_BRANCH_RECORDS_SIZE: _bindgen_ty_21 = 1; +pub type _bindgen_ty_21 = ::core::ffi::c_uint; +pub const BPF_RB_NO_WAKEUP: _bindgen_ty_22 = _bindgen_ty_22::BPF_RB_NO_WAKEUP; +pub const BPF_RB_FORCE_WAKEUP: _bindgen_ty_22 = _bindgen_ty_22::BPF_RB_FORCE_WAKEUP; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_22 { + BPF_RB_NO_WAKEUP = 1, + BPF_RB_FORCE_WAKEUP = 2, +} +pub const BPF_RB_AVAIL_DATA: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_AVAIL_DATA; +pub const BPF_RB_RING_SIZE: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_RING_SIZE; +pub const BPF_RB_CONS_POS: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_CONS_POS; +pub const BPF_RB_PROD_POS: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_PROD_POS; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_23 { + BPF_RB_AVAIL_DATA = 0, + BPF_RB_RING_SIZE = 1, + BPF_RB_CONS_POS = 2, + BPF_RB_PROD_POS = 3, +} +pub const BPF_RINGBUF_BUSY_BIT: _bindgen_ty_24 = 2147483648; +pub const BPF_RINGBUF_DISCARD_BIT: _bindgen_ty_24 = 1073741824; +pub const BPF_RINGBUF_HDR_SZ: _bindgen_ty_24 = 8; +pub type _bindgen_ty_24 = ::core::ffi::c_uint; +pub const BPF_SK_LOOKUP_F_REPLACE: _bindgen_ty_25 = _bindgen_ty_25::BPF_SK_LOOKUP_F_REPLACE; +pub const BPF_SK_LOOKUP_F_NO_REUSEPORT: _bindgen_ty_25 = + _bindgen_ty_25::BPF_SK_LOOKUP_F_NO_REUSEPORT; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_25 { + BPF_SK_LOOKUP_F_REPLACE = 1, + BPF_SK_LOOKUP_F_NO_REUSEPORT = 2, +} +pub const BPF_F_BPRM_SECUREEXEC: _bindgen_ty_26 = 1; +pub type _bindgen_ty_26 = ::core::ffi::c_uint; +pub const BPF_F_BROADCAST: _bindgen_ty_27 = 8; +pub const BPF_F_EXCLUDE_INGRESS: _bindgen_ty_27 = 16; +pub type _bindgen_ty_27 = ::core::ffi::c_uint; +pub const BPF_SKB_TSTAMP_UNSPEC: _bindgen_ty_28 = _bindgen_ty_28::BPF_SKB_TSTAMP_UNSPEC; +pub const BPF_SKB_TSTAMP_DELIVERY_MONO: _bindgen_ty_28 = + _bindgen_ty_28::BPF_SKB_TSTAMP_DELIVERY_MONO; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_28 { + BPF_SKB_TSTAMP_UNSPEC = 0, + BPF_SKB_TSTAMP_DELIVERY_MONO = 1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_devmap_val { + pub ifindex: __u32, + pub bpf_prog: bpf_devmap_val__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_devmap_val__bindgen_ty_1 { + pub fd: ::core::ffi::c_int, + pub id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_cpumap_val { + pub qsize: __u32, + pub bpf_prog: bpf_cpumap_val__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_cpumap_val__bindgen_ty_1 { + pub fd: ::core::ffi::c_int, + pub id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_prog_info { + pub type_: __u32, + pub id: __u32, + pub tag: [__u8; 8usize], + pub jited_prog_len: __u32, + pub xlated_prog_len: __u32, + pub jited_prog_insns: __u64, + pub xlated_prog_insns: __u64, + pub load_time: __u64, + pub created_by_uid: __u32, + pub nr_map_ids: __u32, + pub map_ids: __u64, + pub name: [::core::ffi::c_char; 16usize], + pub ifindex: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub netns_dev: __u64, + pub netns_ino: __u64, + pub nr_jited_ksyms: __u32, + pub nr_jited_func_lens: __u32, + pub jited_ksyms: __u64, + pub jited_func_lens: __u64, + pub btf_id: __u32, + pub func_info_rec_size: __u32, + pub func_info: __u64, + pub nr_func_info: __u32, + pub nr_line_info: __u32, + pub line_info: __u64, + pub jited_line_info: __u64, + pub nr_jited_line_info: __u32, + pub line_info_rec_size: __u32, + pub jited_line_info_rec_size: __u32, + pub nr_prog_tags: __u32, + pub prog_tags: __u64, + pub run_time_ns: __u64, + pub run_cnt: __u64, + pub recursion_misses: __u64, + pub verified_insns: __u32, + pub attach_btf_obj_id: __u32, + pub attach_btf_id: __u32, +} +impl bpf_prog_info { + #[inline] + pub fn gpl_compatible(&self) -> __u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_gpl_compatible(&mut self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let gpl_compatible: u32 = unsafe { ::core::mem::transmute(gpl_compatible) }; + gpl_compatible as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_map_info { + pub type_: __u32, + pub id: __u32, + pub key_size: __u32, + pub value_size: __u32, + pub max_entries: __u32, + pub map_flags: __u32, + pub name: [::core::ffi::c_char; 16usize], + pub ifindex: __u32, + pub btf_vmlinux_value_type_id: __u32, + pub netns_dev: __u64, + pub netns_ino: __u64, + pub btf_id: __u32, + pub btf_key_type_id: __u32, + pub btf_value_type_id: __u32, + pub btf_vmlinux_id: __u32, + pub map_extra: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_btf_info { + pub btf: __u64, + pub btf_size: __u32, + pub id: __u32, + pub name: __u64, + pub name_len: __u32, + pub kernel_btf: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info { + pub type_: __u32, + pub id: __u32, + pub prog_id: __u32, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1 { + pub raw_tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_1, + pub tracing: bpf_link_info__bindgen_ty_1__bindgen_ty_2, + pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_3, + pub iter: bpf_link_info__bindgen_ty_1__bindgen_ty_4, + pub netns: bpf_link_info__bindgen_ty_1__bindgen_ty_5, + pub xdp: bpf_link_info__bindgen_ty_1__bindgen_ty_6, + pub struct_ops: bpf_link_info__bindgen_ty_1__bindgen_ty_7, + pub netfilter: bpf_link_info__bindgen_ty_1__bindgen_ty_8, + pub kprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_9, + pub uprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_10, + pub perf_event: bpf_link_info__bindgen_ty_1__bindgen_ty_11, + pub tcx: bpf_link_info__bindgen_ty_1__bindgen_ty_12, + pub netkit: bpf_link_info__bindgen_ty_1__bindgen_ty_13, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_1 { + pub tp_name: __u64, + pub tp_name_len: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_2 { + pub attach_type: __u32, + pub target_obj_id: __u32, + pub target_btf_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_3 { + pub cgroup_id: __u64, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4 { + pub target_name: __u64, + pub target_name_len: __u32, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, + pub __bindgen_anon_2: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 { + pub map: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 { + pub map_id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 { + pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1, + pub task: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 { + pub cgroup_id: __u64, + pub order: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 { + pub tid: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_5 { + pub netns_ino: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_6 { + pub ifindex: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_7 { + pub map_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_8 { + pub pf: __u32, + pub hooknum: __u32, + pub priority: __s32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_9 { + pub addrs: __u64, + pub count: __u32, + pub flags: __u32, + pub missed: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_10 { + pub path: __u64, + pub offsets: __u64, + pub ref_ctr_offsets: __u64, + pub cookies: __u64, + pub path_size: __u32, + pub count: __u32, + pub flags: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11 { + pub type_: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 { + pub uprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1, + pub kprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2, + pub tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3, + pub event: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 { + pub file_name: __u64, + pub name_len: __u32, + pub offset: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 { + pub func_name: __u64, + pub name_len: __u32, + pub offset: __u32, + pub addr: __u64, + pub missed: __u64, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 { + pub tp_name: __u64, + pub name_len: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 { + pub config: __u64, + pub type_: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_12 { + pub ifindex: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_13 { + pub ifindex: __u32, + pub attach_type: __u32, +} +pub const BPF_SOCK_OPS_RTO_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_RTO_CB_FLAG; +pub const BPF_SOCK_OPS_RETRANS_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_RETRANS_CB_FLAG; +pub const BPF_SOCK_OPS_STATE_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_STATE_CB_FLAG; +pub const BPF_SOCK_OPS_RTT_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_RTT_CB_FLAG; +pub const BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_ALL_CB_FLAGS: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_ALL_CB_FLAGS; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_29 { + BPF_SOCK_OPS_RTO_CB_FLAG = 1, + BPF_SOCK_OPS_RETRANS_CB_FLAG = 2, + BPF_SOCK_OPS_STATE_CB_FLAG = 4, + BPF_SOCK_OPS_RTT_CB_FLAG = 8, + BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG = 16, + BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG = 32, + BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG = 64, + BPF_SOCK_OPS_ALL_CB_FLAGS = 127, +} +pub const BPF_SOCK_OPS_VOID: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_VOID; +pub const BPF_SOCK_OPS_TIMEOUT_INIT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TIMEOUT_INIT; +pub const BPF_SOCK_OPS_RWND_INIT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RWND_INIT; +pub const BPF_SOCK_OPS_TCP_CONNECT_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TCP_CONNECT_CB; +pub const BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB; +pub const BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB; +pub const BPF_SOCK_OPS_NEEDS_ECN: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_NEEDS_ECN; +pub const BPF_SOCK_OPS_BASE_RTT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_BASE_RTT; +pub const BPF_SOCK_OPS_RTO_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RTO_CB; +pub const BPF_SOCK_OPS_RETRANS_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RETRANS_CB; +pub const BPF_SOCK_OPS_STATE_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_STATE_CB; +pub const BPF_SOCK_OPS_TCP_LISTEN_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TCP_LISTEN_CB; +pub const BPF_SOCK_OPS_RTT_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RTT_CB; +pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_PARSE_HDR_OPT_CB; +pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_HDR_OPT_LEN_CB; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_WRITE_HDR_OPT_CB; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_30 { + BPF_SOCK_OPS_VOID = 0, + BPF_SOCK_OPS_TIMEOUT_INIT = 1, + BPF_SOCK_OPS_RWND_INIT = 2, + BPF_SOCK_OPS_TCP_CONNECT_CB = 3, + BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 4, + BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 5, + BPF_SOCK_OPS_NEEDS_ECN = 6, + BPF_SOCK_OPS_BASE_RTT = 7, + BPF_SOCK_OPS_RTO_CB = 8, + BPF_SOCK_OPS_RETRANS_CB = 9, + BPF_SOCK_OPS_STATE_CB = 10, + BPF_SOCK_OPS_TCP_LISTEN_CB = 11, + BPF_SOCK_OPS_RTT_CB = 12, + BPF_SOCK_OPS_PARSE_HDR_OPT_CB = 13, + BPF_SOCK_OPS_HDR_OPT_LEN_CB = 14, + BPF_SOCK_OPS_WRITE_HDR_OPT_CB = 15, +} +pub const BPF_TCP_ESTABLISHED: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_ESTABLISHED; +pub const BPF_TCP_SYN_SENT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_SYN_SENT; +pub const BPF_TCP_SYN_RECV: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_SYN_RECV; +pub const BPF_TCP_FIN_WAIT1: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_FIN_WAIT1; +pub const BPF_TCP_FIN_WAIT2: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_FIN_WAIT2; +pub const BPF_TCP_TIME_WAIT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_TIME_WAIT; +pub const BPF_TCP_CLOSE: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSE; +pub const BPF_TCP_CLOSE_WAIT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSE_WAIT; +pub const BPF_TCP_LAST_ACK: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_LAST_ACK; +pub const BPF_TCP_LISTEN: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_LISTEN; +pub const BPF_TCP_CLOSING: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSING; +pub const BPF_TCP_NEW_SYN_RECV: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_NEW_SYN_RECV; +pub const BPF_TCP_BOUND_INACTIVE: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_BOUND_INACTIVE; +pub const BPF_TCP_MAX_STATES: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_MAX_STATES; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_31 { + BPF_TCP_ESTABLISHED = 1, + BPF_TCP_SYN_SENT = 2, + BPF_TCP_SYN_RECV = 3, + BPF_TCP_FIN_WAIT1 = 4, + BPF_TCP_FIN_WAIT2 = 5, + BPF_TCP_TIME_WAIT = 6, + BPF_TCP_CLOSE = 7, + BPF_TCP_CLOSE_WAIT = 8, + BPF_TCP_LAST_ACK = 9, + BPF_TCP_LISTEN = 10, + BPF_TCP_CLOSING = 11, + BPF_TCP_NEW_SYN_RECV = 12, + BPF_TCP_BOUND_INACTIVE = 13, + BPF_TCP_MAX_STATES = 14, +} +pub const BPF_LOAD_HDR_OPT_TCP_SYN: _bindgen_ty_33 = _bindgen_ty_33::BPF_LOAD_HDR_OPT_TCP_SYN; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_33 { + BPF_LOAD_HDR_OPT_TCP_SYN = 1, +} +pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: _bindgen_ty_34 = + _bindgen_ty_34::BPF_WRITE_HDR_TCP_CURRENT_MSS; +pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: _bindgen_ty_34 = + _bindgen_ty_34::BPF_WRITE_HDR_TCP_SYNACK_COOKIE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_34 { + BPF_WRITE_HDR_TCP_CURRENT_MSS = 1, + BPF_WRITE_HDR_TCP_SYNACK_COOKIE = 2, +} +pub const BPF_DEVCG_ACC_MKNOD: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_MKNOD; +pub const BPF_DEVCG_ACC_READ: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_READ; +pub const BPF_DEVCG_ACC_WRITE: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_WRITE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_35 { + BPF_DEVCG_ACC_MKNOD = 1, + BPF_DEVCG_ACC_READ = 2, + BPF_DEVCG_ACC_WRITE = 4, +} +pub const BPF_DEVCG_DEV_BLOCK: _bindgen_ty_36 = _bindgen_ty_36::BPF_DEVCG_DEV_BLOCK; +pub const BPF_DEVCG_DEV_CHAR: _bindgen_ty_36 = _bindgen_ty_36::BPF_DEVCG_DEV_CHAR; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_36 { + BPF_DEVCG_DEV_BLOCK = 1, + BPF_DEVCG_DEV_CHAR = 2, +} +pub const BPF_FIB_LOOKUP_DIRECT: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_DIRECT; +pub const BPF_FIB_LOOKUP_OUTPUT: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_OUTPUT; +pub const BPF_FIB_LOOKUP_SKIP_NEIGH: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_SKIP_NEIGH; +pub const BPF_FIB_LOOKUP_TBID: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_TBID; +pub const BPF_FIB_LOOKUP_SRC: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_SRC; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_37 { + BPF_FIB_LOOKUP_DIRECT = 1, + BPF_FIB_LOOKUP_OUTPUT = 2, + BPF_FIB_LOOKUP_SKIP_NEIGH = 4, + BPF_FIB_LOOKUP_TBID = 8, + BPF_FIB_LOOKUP_SRC = 16, +} +pub const BPF_FIB_LKUP_RET_SUCCESS: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_SUCCESS; +pub const BPF_FIB_LKUP_RET_BLACKHOLE: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_BLACKHOLE; +pub const BPF_FIB_LKUP_RET_UNREACHABLE: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_UNREACHABLE; +pub const BPF_FIB_LKUP_RET_PROHIBIT: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_PROHIBIT; +pub const BPF_FIB_LKUP_RET_NOT_FWDED: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_NOT_FWDED; +pub const BPF_FIB_LKUP_RET_FWD_DISABLED: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_FWD_DISABLED; +pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_UNSUPP_LWT; +pub const BPF_FIB_LKUP_RET_NO_NEIGH: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_NO_NEIGH; +pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_FRAG_NEEDED; +pub const BPF_FIB_LKUP_RET_NO_SRC_ADDR: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_NO_SRC_ADDR; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_38 { + BPF_FIB_LKUP_RET_SUCCESS = 0, + BPF_FIB_LKUP_RET_BLACKHOLE = 1, + BPF_FIB_LKUP_RET_UNREACHABLE = 2, + BPF_FIB_LKUP_RET_PROHIBIT = 3, + BPF_FIB_LKUP_RET_NOT_FWDED = 4, + BPF_FIB_LKUP_RET_FWD_DISABLED = 5, + BPF_FIB_LKUP_RET_UNSUPP_LWT = 6, + BPF_FIB_LKUP_RET_NO_NEIGH = 7, + BPF_FIB_LKUP_RET_FRAG_NEEDED = 8, + BPF_FIB_LKUP_RET_NO_SRC_ADDR = 9, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_task_fd_type { + BPF_FD_TYPE_RAW_TRACEPOINT = 0, + BPF_FD_TYPE_TRACEPOINT = 1, + BPF_FD_TYPE_KPROBE = 2, + BPF_FD_TYPE_KRETPROBE = 3, + BPF_FD_TYPE_UPROBE = 4, + BPF_FD_TYPE_URETPROBE = 5, +} +pub const BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_39 { + BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 1, + BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 2, + BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 4, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_func_info { + pub insn_off: __u32, + pub type_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_line_info { + pub insn_off: __u32, + pub file_name_off: __u32, + pub line_off: __u32, + pub line_col: __u32, +} +pub const BPF_F_TIMER_ABS: _bindgen_ty_41 = 1; +pub const BPF_F_TIMER_CPU_PIN: _bindgen_ty_41 = 2; +pub type _bindgen_ty_41 = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_header { + pub magic: __u16, + pub version: __u8, + pub flags: __u8, + pub hdr_len: __u32, + pub type_off: __u32, + pub type_len: __u32, + pub str_off: __u32, + pub str_len: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct btf_type { + pub name_off: __u32, + pub info: __u32, + pub __bindgen_anon_1: btf_type__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union btf_type__bindgen_ty_1 { + pub size: __u32, + pub type_: __u32, +} +pub const BTF_KIND_UNKN: _bindgen_ty_42 = 0; +pub const BTF_KIND_INT: _bindgen_ty_42 = 1; +pub const BTF_KIND_PTR: _bindgen_ty_42 = 2; +pub const BTF_KIND_ARRAY: _bindgen_ty_42 = 3; +pub const BTF_KIND_STRUCT: _bindgen_ty_42 = 4; +pub const BTF_KIND_UNION: _bindgen_ty_42 = 5; +pub const BTF_KIND_ENUM: _bindgen_ty_42 = 6; +pub const BTF_KIND_FWD: _bindgen_ty_42 = 7; +pub const BTF_KIND_TYPEDEF: _bindgen_ty_42 = 8; +pub const BTF_KIND_VOLATILE: _bindgen_ty_42 = 9; +pub const BTF_KIND_CONST: _bindgen_ty_42 = 10; +pub const BTF_KIND_RESTRICT: _bindgen_ty_42 = 11; +pub const BTF_KIND_FUNC: _bindgen_ty_42 = 12; +pub const BTF_KIND_FUNC_PROTO: _bindgen_ty_42 = 13; +pub const BTF_KIND_VAR: _bindgen_ty_42 = 14; +pub const BTF_KIND_DATASEC: _bindgen_ty_42 = 15; +pub const BTF_KIND_FLOAT: _bindgen_ty_42 = 16; +pub const BTF_KIND_DECL_TAG: _bindgen_ty_42 = 17; +pub const BTF_KIND_TYPE_TAG: _bindgen_ty_42 = 18; +pub const BTF_KIND_ENUM64: _bindgen_ty_42 = 19; +pub const NR_BTF_KINDS: _bindgen_ty_42 = 20; +pub const BTF_KIND_MAX: _bindgen_ty_42 = 19; +pub type _bindgen_ty_42 = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_enum { + pub name_off: __u32, + pub val: __s32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_array { + pub type_: __u32, + pub index_type: __u32, + pub nelems: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_member { + pub name_off: __u32, + pub type_: __u32, + pub offset: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_param { + pub name_off: __u32, + pub type_: __u32, +} +pub const BTF_VAR_STATIC: _bindgen_ty_43 = 0; +pub const BTF_VAR_GLOBAL_ALLOCATED: _bindgen_ty_43 = 1; +pub const BTF_VAR_GLOBAL_EXTERN: _bindgen_ty_43 = 2; +pub type _bindgen_ty_43 = ::core::ffi::c_uint; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum btf_func_linkage { + BTF_FUNC_STATIC = 0, + BTF_FUNC_GLOBAL = 1, + BTF_FUNC_EXTERN = 2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_var { + pub linkage: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_var_secinfo { + pub type_: __u32, + pub offset: __u32, + pub size: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_decl_tag { + pub component_idx: __s32, +} +impl nlmsgerr_attrs { + pub const NLMSGERR_ATTR_MAX: nlmsgerr_attrs = nlmsgerr_attrs::NLMSGERR_ATTR_COOKIE; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum nlmsgerr_attrs { + NLMSGERR_ATTR_UNUSED = 0, + NLMSGERR_ATTR_MSG = 1, + NLMSGERR_ATTR_OFFS = 2, + NLMSGERR_ATTR_COOKIE = 3, + __NLMSGERR_ATTR_MAX = 4, +} +pub const IFLA_XDP_UNSPEC: _bindgen_ty_92 = 0; +pub const IFLA_XDP_FD: _bindgen_ty_92 = 1; +pub const IFLA_XDP_ATTACHED: _bindgen_ty_92 = 2; +pub const IFLA_XDP_FLAGS: _bindgen_ty_92 = 3; +pub const IFLA_XDP_PROG_ID: _bindgen_ty_92 = 4; +pub const IFLA_XDP_DRV_PROG_ID: _bindgen_ty_92 = 5; +pub const IFLA_XDP_SKB_PROG_ID: _bindgen_ty_92 = 6; +pub const IFLA_XDP_HW_PROG_ID: _bindgen_ty_92 = 7; +pub const IFLA_XDP_EXPECTED_FD: _bindgen_ty_92 = 8; +pub const __IFLA_XDP_MAX: _bindgen_ty_92 = 9; +pub type _bindgen_ty_92 = ::core::ffi::c_uint; +impl nf_inet_hooks { + pub const NF_INET_INGRESS: nf_inet_hooks = nf_inet_hooks::NF_INET_NUMHOOKS; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum nf_inet_hooks { + NF_INET_PRE_ROUTING = 0, + NF_INET_LOCAL_IN = 1, + NF_INET_FORWARD = 2, + NF_INET_LOCAL_OUT = 3, + NF_INET_POST_ROUTING = 4, + NF_INET_NUMHOOKS = 5, +} +pub const NFPROTO_UNSPEC: _bindgen_ty_99 = 0; +pub const NFPROTO_INET: _bindgen_ty_99 = 1; +pub const NFPROTO_IPV4: _bindgen_ty_99 = 2; +pub const NFPROTO_ARP: _bindgen_ty_99 = 3; +pub const NFPROTO_NETDEV: _bindgen_ty_99 = 5; +pub const NFPROTO_BRIDGE: _bindgen_ty_99 = 7; +pub const NFPROTO_IPV6: _bindgen_ty_99 = 10; +pub const NFPROTO_DECNET: _bindgen_ty_99 = 12; +pub const NFPROTO_NUMPROTO: _bindgen_ty_99 = 13; +pub type _bindgen_ty_99 = ::core::ffi::c_uint; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_type_id { + PERF_TYPE_HARDWARE = 0, + PERF_TYPE_SOFTWARE = 1, + PERF_TYPE_TRACEPOINT = 2, + PERF_TYPE_HW_CACHE = 3, + PERF_TYPE_RAW = 4, + PERF_TYPE_BREAKPOINT = 5, + PERF_TYPE_MAX = 6, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_hw_id { + PERF_COUNT_HW_CPU_CYCLES = 0, + PERF_COUNT_HW_INSTRUCTIONS = 1, + PERF_COUNT_HW_CACHE_REFERENCES = 2, + PERF_COUNT_HW_CACHE_MISSES = 3, + PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 4, + PERF_COUNT_HW_BRANCH_MISSES = 5, + PERF_COUNT_HW_BUS_CYCLES = 6, + PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 7, + PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 8, + PERF_COUNT_HW_REF_CPU_CYCLES = 9, + PERF_COUNT_HW_MAX = 10, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_hw_cache_id { + PERF_COUNT_HW_CACHE_L1D = 0, + PERF_COUNT_HW_CACHE_L1I = 1, + PERF_COUNT_HW_CACHE_LL = 2, + PERF_COUNT_HW_CACHE_DTLB = 3, + PERF_COUNT_HW_CACHE_ITLB = 4, + PERF_COUNT_HW_CACHE_BPU = 5, + PERF_COUNT_HW_CACHE_NODE = 6, + PERF_COUNT_HW_CACHE_MAX = 7, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_hw_cache_op_id { + PERF_COUNT_HW_CACHE_OP_READ = 0, + PERF_COUNT_HW_CACHE_OP_WRITE = 1, + PERF_COUNT_HW_CACHE_OP_PREFETCH = 2, + PERF_COUNT_HW_CACHE_OP_MAX = 3, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_hw_cache_op_result_id { + PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0, + PERF_COUNT_HW_CACHE_RESULT_MISS = 1, + PERF_COUNT_HW_CACHE_RESULT_MAX = 2, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_sw_ids { + PERF_COUNT_SW_CPU_CLOCK = 0, + PERF_COUNT_SW_TASK_CLOCK = 1, + PERF_COUNT_SW_PAGE_FAULTS = 2, + PERF_COUNT_SW_CONTEXT_SWITCHES = 3, + PERF_COUNT_SW_CPU_MIGRATIONS = 4, + PERF_COUNT_SW_PAGE_FAULTS_MIN = 5, + PERF_COUNT_SW_PAGE_FAULTS_MAJ = 6, + PERF_COUNT_SW_ALIGNMENT_FAULTS = 7, + PERF_COUNT_SW_EMULATION_FAULTS = 8, + PERF_COUNT_SW_DUMMY = 9, + PERF_COUNT_SW_BPF_OUTPUT = 10, + PERF_COUNT_SW_CGROUP_SWITCHES = 11, + PERF_COUNT_SW_MAX = 12, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_event_sample_format { + PERF_SAMPLE_IP = 1, + PERF_SAMPLE_TID = 2, + PERF_SAMPLE_TIME = 4, + PERF_SAMPLE_ADDR = 8, + PERF_SAMPLE_READ = 16, + PERF_SAMPLE_CALLCHAIN = 32, + PERF_SAMPLE_ID = 64, + PERF_SAMPLE_CPU = 128, + PERF_SAMPLE_PERIOD = 256, + PERF_SAMPLE_STREAM_ID = 512, + PERF_SAMPLE_RAW = 1024, + PERF_SAMPLE_BRANCH_STACK = 2048, + PERF_SAMPLE_REGS_USER = 4096, + PERF_SAMPLE_STACK_USER = 8192, + PERF_SAMPLE_WEIGHT = 16384, + PERF_SAMPLE_DATA_SRC = 32768, + PERF_SAMPLE_IDENTIFIER = 65536, + PERF_SAMPLE_TRANSACTION = 131072, + PERF_SAMPLE_REGS_INTR = 262144, + PERF_SAMPLE_PHYS_ADDR = 524288, + PERF_SAMPLE_AUX = 1048576, + PERF_SAMPLE_CGROUP = 2097152, + PERF_SAMPLE_DATA_PAGE_SIZE = 4194304, + PERF_SAMPLE_CODE_PAGE_SIZE = 8388608, + PERF_SAMPLE_WEIGHT_STRUCT = 16777216, + PERF_SAMPLE_MAX = 33554432, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct perf_event_attr { + pub type_: __u32, + pub size: __u32, + pub config: __u64, + pub __bindgen_anon_1: perf_event_attr__bindgen_ty_1, + pub sample_type: __u64, + pub read_format: __u64, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, + pub __bindgen_anon_2: perf_event_attr__bindgen_ty_2, + pub bp_type: __u32, + pub __bindgen_anon_3: perf_event_attr__bindgen_ty_3, + pub __bindgen_anon_4: perf_event_attr__bindgen_ty_4, + pub branch_sample_type: __u64, + pub sample_regs_user: __u64, + pub sample_stack_user: __u32, + pub clockid: __s32, + pub sample_regs_intr: __u64, + pub aux_watermark: __u32, + pub sample_max_stack: __u16, + pub __reserved_2: __u16, + pub aux_sample_size: __u32, + pub __reserved_3: __u32, + pub sig_data: __u64, + pub config3: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_attr__bindgen_ty_1 { + pub sample_period: __u64, + pub sample_freq: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_attr__bindgen_ty_2 { + pub wakeup_events: __u32, + pub wakeup_watermark: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_attr__bindgen_ty_3 { + pub bp_addr: __u64, + pub kprobe_func: __u64, + pub uprobe_path: __u64, + pub config1: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_attr__bindgen_ty_4 { + pub bp_len: __u64, + pub kprobe_addr: __u64, + pub probe_offset: __u64, + pub config2: __u64, +} +impl perf_event_attr { + #[inline] + pub fn disabled(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_disabled(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn disabled_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_disabled_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn inherit(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } + } + #[inline] + pub fn set_inherit(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn inherit_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn pinned(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } + } + #[inline] + pub fn set_pinned(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pinned_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_pinned_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclusive(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclusive(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclusive_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclusive_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_user(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_user(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_kernel(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_kernel(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_hv(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_hv(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_hv_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_hv_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_idle(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_idle(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_idle_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_idle_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mmap(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } + } + #[inline] + pub fn set_mmap(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mmap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn comm(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } + } + #[inline] + pub fn set_comm(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn comm_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn freq(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } + } + #[inline] + pub fn set_freq(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn freq_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_freq_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn inherit_stat(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } + } + #[inline] + pub fn set_inherit_stat(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn inherit_stat_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_stat_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_on_exec(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } + } + #[inline] + pub fn set_enable_on_exec(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_enable_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn task(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) } + } + #[inline] + pub fn set_task(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn task_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_task_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn watermark(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) } + } + #[inline] + pub fn set_watermark(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn watermark_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_watermark_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn precise_ip(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 2u8) as u64) } + } + #[inline] + pub fn set_precise_ip(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(15usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn precise_ip_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 2u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_precise_ip_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn mmap_data(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } + } + #[inline] + pub fn set_mmap_data(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mmap_data_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_data_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn sample_id_all(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } + } + #[inline] + pub fn set_sample_id_all(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(18usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn sample_id_all_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sample_id_all_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_host(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_host(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(19usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_host_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_host_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_guest(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_guest(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(20usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_guest_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_guest_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_callchain_kernel(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_callchain_kernel(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(21usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_callchain_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 21usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 21usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_callchain_user(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_callchain_user(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(22usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_callchain_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 22usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 22usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mmap2(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) } + } + #[inline] + pub fn set_mmap2(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(23usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mmap2_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 23usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap2_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 23usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn comm_exec(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) } + } + #[inline] + pub fn set_comm_exec(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(24usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn comm_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 24usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 24usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn use_clockid(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) } + } + #[inline] + pub fn set_use_clockid(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(25usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn use_clockid_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 25usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_use_clockid_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 25usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn context_switch(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) } + } + #[inline] + pub fn set_context_switch(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(26usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn context_switch_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 26usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_context_switch_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 26usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn write_backward(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) } + } + #[inline] + pub fn set_write_backward(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(27usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn write_backward_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 27usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_write_backward_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 27usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn namespaces(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) } + } + #[inline] + pub fn set_namespaces(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(28usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn namespaces_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 28usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_namespaces_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 28usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn ksymbol(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) } + } + #[inline] + pub fn set_ksymbol(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(29usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn ksymbol_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 29usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_ksymbol_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 29usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn bpf_event(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u64) } + } + #[inline] + pub fn set_bpf_event(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(30usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn bpf_event_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 30usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_bpf_event_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 30usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn aux_output(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u64) } + } + #[inline] + pub fn set_aux_output(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(31usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn aux_output_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_aux_output_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cgroup(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } + } + #[inline] + pub fn set_cgroup(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(32usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cgroup_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cgroup_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn text_poke(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) } + } + #[inline] + pub fn set_text_poke(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(33usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn text_poke_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 33usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_text_poke_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 33usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn build_id(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) } + } + #[inline] + pub fn set_build_id(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(34usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn build_id_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 34usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_build_id_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 34usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn inherit_thread(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) } + } + #[inline] + pub fn set_inherit_thread(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(35usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn inherit_thread_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 35usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_thread_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 35usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn remove_on_exec(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) } + } + #[inline] + pub fn set_remove_on_exec(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(36usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn remove_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 36usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_remove_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 36usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn sigtrap(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } + } + #[inline] + pub fn set_sigtrap(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(37usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn sigtrap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 37usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sigtrap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 37usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn __reserved_1(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) } + } + #[inline] + pub fn set___reserved_1(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(38usize, 26u8, val as u64) + } + } + #[inline] + pub unsafe fn __reserved_1_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 38usize, + 26u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set___reserved_1_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 38usize, + 26u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + disabled: __u64, + inherit: __u64, + pinned: __u64, + exclusive: __u64, + exclude_user: __u64, + exclude_kernel: __u64, + exclude_hv: __u64, + exclude_idle: __u64, + mmap: __u64, + comm: __u64, + freq: __u64, + inherit_stat: __u64, + enable_on_exec: __u64, + task: __u64, + watermark: __u64, + precise_ip: __u64, + mmap_data: __u64, + sample_id_all: __u64, + exclude_host: __u64, + exclude_guest: __u64, + exclude_callchain_kernel: __u64, + exclude_callchain_user: __u64, + mmap2: __u64, + comm_exec: __u64, + use_clockid: __u64, + context_switch: __u64, + write_backward: __u64, + namespaces: __u64, + ksymbol: __u64, + bpf_event: __u64, + aux_output: __u64, + cgroup: __u64, + text_poke: __u64, + build_id: __u64, + inherit_thread: __u64, + remove_on_exec: __u64, + sigtrap: __u64, + __reserved_1: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let disabled: u64 = unsafe { ::core::mem::transmute(disabled) }; + disabled as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let inherit: u64 = unsafe { ::core::mem::transmute(inherit) }; + inherit as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let pinned: u64 = unsafe { ::core::mem::transmute(pinned) }; + pinned as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let exclusive: u64 = unsafe { ::core::mem::transmute(exclusive) }; + exclusive as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let exclude_user: u64 = unsafe { ::core::mem::transmute(exclude_user) }; + exclude_user as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let exclude_kernel: u64 = unsafe { ::core::mem::transmute(exclude_kernel) }; + exclude_kernel as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let exclude_hv: u64 = unsafe { ::core::mem::transmute(exclude_hv) }; + exclude_hv as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let exclude_idle: u64 = unsafe { ::core::mem::transmute(exclude_idle) }; + exclude_idle as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let mmap: u64 = unsafe { ::core::mem::transmute(mmap) }; + mmap as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let comm: u64 = unsafe { ::core::mem::transmute(comm) }; + comm as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let freq: u64 = unsafe { ::core::mem::transmute(freq) }; + freq as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let inherit_stat: u64 = unsafe { ::core::mem::transmute(inherit_stat) }; + inherit_stat as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let enable_on_exec: u64 = unsafe { ::core::mem::transmute(enable_on_exec) }; + enable_on_exec as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let task: u64 = unsafe { ::core::mem::transmute(task) }; + task as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let watermark: u64 = unsafe { ::core::mem::transmute(watermark) }; + watermark as u64 + }); + __bindgen_bitfield_unit.set(15usize, 2u8, { + let precise_ip: u64 = unsafe { ::core::mem::transmute(precise_ip) }; + precise_ip as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let mmap_data: u64 = unsafe { ::core::mem::transmute(mmap_data) }; + mmap_data as u64 + }); + __bindgen_bitfield_unit.set(18usize, 1u8, { + let sample_id_all: u64 = unsafe { ::core::mem::transmute(sample_id_all) }; + sample_id_all as u64 + }); + __bindgen_bitfield_unit.set(19usize, 1u8, { + let exclude_host: u64 = unsafe { ::core::mem::transmute(exclude_host) }; + exclude_host as u64 + }); + __bindgen_bitfield_unit.set(20usize, 1u8, { + let exclude_guest: u64 = unsafe { ::core::mem::transmute(exclude_guest) }; + exclude_guest as u64 + }); + __bindgen_bitfield_unit.set(21usize, 1u8, { + let exclude_callchain_kernel: u64 = + unsafe { ::core::mem::transmute(exclude_callchain_kernel) }; + exclude_callchain_kernel as u64 + }); + __bindgen_bitfield_unit.set(22usize, 1u8, { + let exclude_callchain_user: u64 = + unsafe { ::core::mem::transmute(exclude_callchain_user) }; + exclude_callchain_user as u64 + }); + __bindgen_bitfield_unit.set(23usize, 1u8, { + let mmap2: u64 = unsafe { ::core::mem::transmute(mmap2) }; + mmap2 as u64 + }); + __bindgen_bitfield_unit.set(24usize, 1u8, { + let comm_exec: u64 = unsafe { ::core::mem::transmute(comm_exec) }; + comm_exec as u64 + }); + __bindgen_bitfield_unit.set(25usize, 1u8, { + let use_clockid: u64 = unsafe { ::core::mem::transmute(use_clockid) }; + use_clockid as u64 + }); + __bindgen_bitfield_unit.set(26usize, 1u8, { + let context_switch: u64 = unsafe { ::core::mem::transmute(context_switch) }; + context_switch as u64 + }); + __bindgen_bitfield_unit.set(27usize, 1u8, { + let write_backward: u64 = unsafe { ::core::mem::transmute(write_backward) }; + write_backward as u64 + }); + __bindgen_bitfield_unit.set(28usize, 1u8, { + let namespaces: u64 = unsafe { ::core::mem::transmute(namespaces) }; + namespaces as u64 + }); + __bindgen_bitfield_unit.set(29usize, 1u8, { + let ksymbol: u64 = unsafe { ::core::mem::transmute(ksymbol) }; + ksymbol as u64 + }); + __bindgen_bitfield_unit.set(30usize, 1u8, { + let bpf_event: u64 = unsafe { ::core::mem::transmute(bpf_event) }; + bpf_event as u64 + }); + __bindgen_bitfield_unit.set(31usize, 1u8, { + let aux_output: u64 = unsafe { ::core::mem::transmute(aux_output) }; + aux_output as u64 + }); + __bindgen_bitfield_unit.set(32usize, 1u8, { + let cgroup: u64 = unsafe { ::core::mem::transmute(cgroup) }; + cgroup as u64 + }); + __bindgen_bitfield_unit.set(33usize, 1u8, { + let text_poke: u64 = unsafe { ::core::mem::transmute(text_poke) }; + text_poke as u64 + }); + __bindgen_bitfield_unit.set(34usize, 1u8, { + let build_id: u64 = unsafe { ::core::mem::transmute(build_id) }; + build_id as u64 + }); + __bindgen_bitfield_unit.set(35usize, 1u8, { + let inherit_thread: u64 = unsafe { ::core::mem::transmute(inherit_thread) }; + inherit_thread as u64 + }); + __bindgen_bitfield_unit.set(36usize, 1u8, { + let remove_on_exec: u64 = unsafe { ::core::mem::transmute(remove_on_exec) }; + remove_on_exec as u64 + }); + __bindgen_bitfield_unit.set(37usize, 1u8, { + let sigtrap: u64 = unsafe { ::core::mem::transmute(sigtrap) }; + sigtrap as u64 + }); + __bindgen_bitfield_unit.set(38usize, 26u8, { + let __reserved_1: u64 = unsafe { ::core::mem::transmute(__reserved_1) }; + __reserved_1 as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct perf_event_mmap_page { + pub version: __u32, + pub compat_version: __u32, + pub lock: __u32, + pub index: __u32, + pub offset: __s64, + pub time_enabled: __u64, + pub time_running: __u64, + pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1, + pub pmc_width: __u16, + pub time_shift: __u16, + pub time_mult: __u32, + pub time_offset: __u64, + pub time_zero: __u64, + pub size: __u32, + pub __reserved_1: __u32, + pub time_cycles: __u64, + pub time_mask: __u64, + pub __reserved: [__u8; 928usize], + pub data_head: __u64, + pub data_tail: __u64, + pub data_offset: __u64, + pub data_size: __u64, + pub aux_head: __u64, + pub aux_tail: __u64, + pub aux_offset: __u64, + pub aux_size: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_mmap_page__bindgen_ty_1 { + pub capabilities: __u64, + pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u64; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn cap_bit0(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_bit0(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_bit0_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_bit0_is_deprecated(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_bit0_is_deprecated(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_bit0_is_deprecated_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_is_deprecated_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_user_rdpmc(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_user_rdpmc(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_user_rdpmc_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_rdpmc_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_user_time(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_user_time(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_user_time_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_user_time_zero(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_user_time_zero(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_user_time_zero_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_zero_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_user_time_short(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_user_time_short(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_user_time_short_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_short_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_____res(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) } + } + #[inline] + pub fn set_cap_____res(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(6usize, 58u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_____res_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 58u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_____res_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 58u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + cap_bit0: __u64, + cap_bit0_is_deprecated: __u64, + cap_user_rdpmc: __u64, + cap_user_time: __u64, + cap_user_time_zero: __u64, + cap_user_time_short: __u64, + cap_____res: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let cap_bit0: u64 = unsafe { ::core::mem::transmute(cap_bit0) }; + cap_bit0 as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let cap_bit0_is_deprecated: u64 = + unsafe { ::core::mem::transmute(cap_bit0_is_deprecated) }; + cap_bit0_is_deprecated as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let cap_user_rdpmc: u64 = unsafe { ::core::mem::transmute(cap_user_rdpmc) }; + cap_user_rdpmc as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let cap_user_time: u64 = unsafe { ::core::mem::transmute(cap_user_time) }; + cap_user_time as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let cap_user_time_zero: u64 = unsafe { ::core::mem::transmute(cap_user_time_zero) }; + cap_user_time_zero as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let cap_user_time_short: u64 = unsafe { ::core::mem::transmute(cap_user_time_short) }; + cap_user_time_short as u64 + }); + __bindgen_bitfield_unit.set(6usize, 58u8, { + let cap_____res: u64 = unsafe { ::core::mem::transmute(cap_____res) }; + cap_____res as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct perf_event_header { + pub type_: __u32, + pub misc: __u16, + pub size: __u16, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_event_type { + PERF_RECORD_MMAP = 1, + PERF_RECORD_LOST = 2, + PERF_RECORD_COMM = 3, + PERF_RECORD_EXIT = 4, + PERF_RECORD_THROTTLE = 5, + PERF_RECORD_UNTHROTTLE = 6, + PERF_RECORD_FORK = 7, + PERF_RECORD_READ = 8, + PERF_RECORD_SAMPLE = 9, + PERF_RECORD_MMAP2 = 10, + PERF_RECORD_AUX = 11, + PERF_RECORD_ITRACE_START = 12, + PERF_RECORD_LOST_SAMPLES = 13, + PERF_RECORD_SWITCH = 14, + PERF_RECORD_SWITCH_CPU_WIDE = 15, + PERF_RECORD_NAMESPACES = 16, + PERF_RECORD_KSYMBOL = 17, + PERF_RECORD_BPF_EVENT = 18, + PERF_RECORD_CGROUP = 19, + PERF_RECORD_TEXT_POKE = 20, + PERF_RECORD_AUX_OUTPUT_HW_ID = 21, + PERF_RECORD_MAX = 22, +} +pub const TCA_BPF_UNSPEC: _bindgen_ty_154 = 0; +pub const TCA_BPF_ACT: _bindgen_ty_154 = 1; +pub const TCA_BPF_POLICE: _bindgen_ty_154 = 2; +pub const TCA_BPF_CLASSID: _bindgen_ty_154 = 3; +pub const TCA_BPF_OPS_LEN: _bindgen_ty_154 = 4; +pub const TCA_BPF_OPS: _bindgen_ty_154 = 5; +pub const TCA_BPF_FD: _bindgen_ty_154 = 6; +pub const TCA_BPF_NAME: _bindgen_ty_154 = 7; +pub const TCA_BPF_FLAGS: _bindgen_ty_154 = 8; +pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_154 = 9; +pub const TCA_BPF_TAG: _bindgen_ty_154 = 10; +pub const TCA_BPF_ID: _bindgen_ty_154 = 11; +pub const __TCA_BPF_MAX: _bindgen_ty_154 = 12; +pub type _bindgen_ty_154 = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ifinfomsg { + pub ifi_family: ::core::ffi::c_uchar, + pub __ifi_pad: ::core::ffi::c_uchar, + pub ifi_type: ::core::ffi::c_ushort, + pub ifi_index: ::core::ffi::c_int, + pub ifi_flags: ::core::ffi::c_uint, + pub ifi_change: ::core::ffi::c_uint, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcmsg { + pub tcm_family: ::core::ffi::c_uchar, + pub tcm__pad1: ::core::ffi::c_uchar, + pub tcm__pad2: ::core::ffi::c_ushort, + pub tcm_ifindex: ::core::ffi::c_int, + pub tcm_handle: __u32, + pub tcm_parent: __u32, + pub tcm_info: __u32, +} +pub const TCA_UNSPEC: _bindgen_ty_174 = 0; +pub const TCA_KIND: _bindgen_ty_174 = 1; +pub const TCA_OPTIONS: _bindgen_ty_174 = 2; +pub const TCA_STATS: _bindgen_ty_174 = 3; +pub const TCA_XSTATS: _bindgen_ty_174 = 4; +pub const TCA_RATE: _bindgen_ty_174 = 5; +pub const TCA_FCNT: _bindgen_ty_174 = 6; +pub const TCA_STATS2: _bindgen_ty_174 = 7; +pub const TCA_STAB: _bindgen_ty_174 = 8; +pub const TCA_PAD: _bindgen_ty_174 = 9; +pub const TCA_DUMP_INVISIBLE: _bindgen_ty_174 = 10; +pub const TCA_CHAIN: _bindgen_ty_174 = 11; +pub const TCA_HW_OFFLOAD: _bindgen_ty_174 = 12; +pub const TCA_INGRESS_BLOCK: _bindgen_ty_174 = 13; +pub const TCA_EGRESS_BLOCK: _bindgen_ty_174 = 14; +pub const TCA_DUMP_FLAGS: _bindgen_ty_174 = 15; +pub const TCA_EXT_WARN_MSG: _bindgen_ty_174 = 16; +pub const __TCA_MAX: _bindgen_ty_174 = 17; +pub type _bindgen_ty_174 = ::core::ffi::c_uint; diff --git a/aya-obj/src/generated/linux_bindings_powerpc64.rs b/aya-obj/src/generated/linux_bindings_powerpc64.rs new file mode 100644 index 00000000..50d01b86 --- /dev/null +++ b/aya-obj/src/generated/linux_bindings_powerpc64.rs @@ -0,0 +1,4167 @@ +/* automatically generated by rust-bindgen 0.72.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { byte | mask } else { byte & !mask } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } +} +#[repr(C)] +#[derive(Default)] +pub struct __IncompleteArrayField(::core::marker::PhantomData, [T; 0]); +impl __IncompleteArrayField { + #[inline] + pub const fn new() -> Self { + __IncompleteArrayField(::core::marker::PhantomData, []) + } + #[inline] + pub fn as_ptr(&self) -> *const T { + self as *const _ as *const T + } + #[inline] + pub fn as_mut_ptr(&mut self) -> *mut T { + self as *mut _ as *mut T + } + #[inline] + pub unsafe fn as_slice(&self, len: usize) -> &[T] { + ::core::slice::from_raw_parts(self.as_ptr(), len) + } + #[inline] + pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { + ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len) + } +} +impl ::core::fmt::Debug for __IncompleteArrayField { + fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + fmt.write_str("__IncompleteArrayField") + } +} +pub const BPF_LD: u32 = 0; +pub const BPF_LDX: u32 = 1; +pub const BPF_ST: u32 = 2; +pub const BPF_STX: u32 = 3; +pub const BPF_ALU: u32 = 4; +pub const BPF_JMP: u32 = 5; +pub const BPF_RET: u32 = 6; +pub const BPF_MISC: u32 = 7; +pub const BPF_W: u32 = 0; +pub const BPF_H: u32 = 8; +pub const BPF_B: u32 = 16; +pub const BPF_IMM: u32 = 0; +pub const BPF_ABS: u32 = 32; +pub const BPF_IND: u32 = 64; +pub const BPF_MEM: u32 = 96; +pub const BPF_LEN: u32 = 128; +pub const BPF_MSH: u32 = 160; +pub const BPF_ADD: u32 = 0; +pub const BPF_SUB: u32 = 16; +pub const BPF_MUL: u32 = 32; +pub const BPF_DIV: u32 = 48; +pub const BPF_OR: u32 = 64; +pub const BPF_AND: u32 = 80; +pub const BPF_LSH: u32 = 96; +pub const BPF_RSH: u32 = 112; +pub const BPF_NEG: u32 = 128; +pub const BPF_MOD: u32 = 144; +pub const BPF_XOR: u32 = 160; +pub const BPF_JA: u32 = 0; +pub const BPF_JEQ: u32 = 16; +pub const BPF_JGT: u32 = 32; +pub const BPF_JGE: u32 = 48; +pub const BPF_JSET: u32 = 64; +pub const BPF_K: u32 = 0; +pub const BPF_X: u32 = 8; +pub const BPF_MAXINSNS: u32 = 4096; +pub const BPF_JMP32: u32 = 6; +pub const BPF_ALU64: u32 = 7; +pub const BPF_DW: u32 = 24; +pub const BPF_MEMSX: u32 = 128; +pub const BPF_ATOMIC: u32 = 192; +pub const BPF_XADD: u32 = 192; +pub const BPF_MOV: u32 = 176; +pub const BPF_ARSH: u32 = 192; +pub const BPF_END: u32 = 208; +pub const BPF_TO_LE: u32 = 0; +pub const BPF_TO_BE: u32 = 8; +pub const BPF_FROM_LE: u32 = 0; +pub const BPF_FROM_BE: u32 = 8; +pub const BPF_JNE: u32 = 80; +pub const BPF_JLT: u32 = 160; +pub const BPF_JLE: u32 = 176; +pub const BPF_JSGT: u32 = 96; +pub const BPF_JSGE: u32 = 112; +pub const BPF_JSLT: u32 = 192; +pub const BPF_JSLE: u32 = 208; +pub const BPF_JCOND: u32 = 224; +pub const BPF_CALL: u32 = 128; +pub const BPF_EXIT: u32 = 144; +pub const BPF_FETCH: u32 = 1; +pub const BPF_XCHG: u32 = 225; +pub const BPF_CMPXCHG: u32 = 241; +pub const BPF_F_ALLOW_OVERRIDE: u32 = 1; +pub const BPF_F_ALLOW_MULTI: u32 = 2; +pub const BPF_F_REPLACE: u32 = 4; +pub const BPF_F_BEFORE: u32 = 8; +pub const BPF_F_AFTER: u32 = 16; +pub const BPF_F_ID: u32 = 32; +pub const BPF_F_STRICT_ALIGNMENT: u32 = 1; +pub const BPF_F_ANY_ALIGNMENT: u32 = 2; +pub const BPF_F_TEST_RND_HI32: u32 = 4; +pub const BPF_F_TEST_STATE_FREQ: u32 = 8; +pub const BPF_F_SLEEPABLE: u32 = 16; +pub const BPF_F_XDP_HAS_FRAGS: u32 = 32; +pub const BPF_F_XDP_DEV_BOUND_ONLY: u32 = 64; +pub const BPF_F_TEST_REG_INVARIANTS: u32 = 128; +pub const BPF_F_NETFILTER_IP_DEFRAG: u32 = 1; +pub const BPF_PSEUDO_MAP_FD: u32 = 1; +pub const BPF_PSEUDO_MAP_IDX: u32 = 5; +pub const BPF_PSEUDO_MAP_VALUE: u32 = 2; +pub const BPF_PSEUDO_MAP_IDX_VALUE: u32 = 6; +pub const BPF_PSEUDO_BTF_ID: u32 = 3; +pub const BPF_PSEUDO_FUNC: u32 = 4; +pub const BPF_PSEUDO_CALL: u32 = 1; +pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2; +pub const BPF_F_QUERY_EFFECTIVE: u32 = 1; +pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1; +pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2; +pub const BPF_BUILD_ID_SIZE: u32 = 20; +pub const BPF_OBJ_NAME_LEN: u32 = 16; +pub const BPF_TAG_SIZE: u32 = 8; +pub const BTF_INT_SIGNED: u32 = 1; +pub const BTF_INT_CHAR: u32 = 2; +pub const BTF_INT_BOOL: u32 = 4; +pub const NLMSG_ALIGNTO: u32 = 4; +pub const XDP_FLAGS_UPDATE_IF_NOEXIST: u32 = 1; +pub const XDP_FLAGS_SKB_MODE: u32 = 2; +pub const XDP_FLAGS_DRV_MODE: u32 = 4; +pub const XDP_FLAGS_HW_MODE: u32 = 8; +pub const XDP_FLAGS_REPLACE: u32 = 16; +pub const XDP_FLAGS_MODES: u32 = 14; +pub const XDP_FLAGS_MASK: u32 = 31; +pub const PERF_EVENT_IOC_ENABLE: u32 = 536880128; +pub const PERF_EVENT_IOC_DISABLE: u32 = 536880129; +pub const PERF_EVENT_IOC_REFRESH: u32 = 536880130; +pub const PERF_EVENT_IOC_RESET: u32 = 536880131; +pub const PERF_EVENT_IOC_PERIOD: u32 = 2148017156; +pub const PERF_EVENT_IOC_SET_OUTPUT: u32 = 536880133; +pub const PERF_EVENT_IOC_SET_FILTER: u32 = 2148017158; +pub const PERF_EVENT_IOC_ID: u32 = 1074275335; +pub const PERF_EVENT_IOC_SET_BPF: u32 = 2147755016; +pub const PERF_EVENT_IOC_PAUSE_OUTPUT: u32 = 2147755017; +pub const PERF_EVENT_IOC_QUERY_BPF: u32 = 3221758986; +pub const PERF_EVENT_IOC_MODIFY_ATTRIBUTES: u32 = 2148017163; +pub const PERF_MAX_STACK_DEPTH: u32 = 127; +pub const PERF_MAX_CONTEXTS_PER_STACK: u32 = 8; +pub const PERF_FLAG_FD_NO_GROUP: u32 = 1; +pub const PERF_FLAG_FD_OUTPUT: u32 = 2; +pub const PERF_FLAG_PID_CGROUP: u32 = 4; +pub const PERF_FLAG_FD_CLOEXEC: u32 = 8; +pub const TC_H_MAJ_MASK: u32 = 4294901760; +pub const TC_H_MIN_MASK: u32 = 65535; +pub const TC_H_UNSPEC: u32 = 0; +pub const TC_H_ROOT: u32 = 4294967295; +pub const TC_H_INGRESS: u32 = 4294967281; +pub const TC_H_CLSACT: u32 = 4294967281; +pub const TC_H_MIN_PRIORITY: u32 = 65504; +pub const TC_H_MIN_INGRESS: u32 = 65522; +pub const TC_H_MIN_EGRESS: u32 = 65523; +pub const TCA_BPF_FLAG_ACT_DIRECT: u32 = 1; +pub const SO_ATTACH_BPF: u32 = 50; +pub const SO_DETACH_BPF: u32 = 27; +pub type __u8 = ::core::ffi::c_uchar; +pub type __s16 = ::core::ffi::c_short; +pub type __u16 = ::core::ffi::c_ushort; +pub type __s32 = ::core::ffi::c_int; +pub type __u32 = ::core::ffi::c_uint; +pub type __s64 = ::core::ffi::c_long; +pub type __u64 = ::core::ffi::c_ulong; +pub const BPF_REG_0: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_0; +pub const BPF_REG_1: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_1; +pub const BPF_REG_2: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_2; +pub const BPF_REG_3: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_3; +pub const BPF_REG_4: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_4; +pub const BPF_REG_5: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_5; +pub const BPF_REG_6: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_6; +pub const BPF_REG_7: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_7; +pub const BPF_REG_8: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_8; +pub const BPF_REG_9: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_9; +pub const BPF_REG_10: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_10; +pub const __MAX_BPF_REG: _bindgen_ty_1 = _bindgen_ty_1::__MAX_BPF_REG; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { + BPF_REG_0 = 0, + BPF_REG_1 = 1, + BPF_REG_2 = 2, + BPF_REG_3 = 3, + BPF_REG_4 = 4, + BPF_REG_5 = 5, + BPF_REG_6 = 6, + BPF_REG_7 = 7, + BPF_REG_8 = 8, + BPF_REG_9 = 9, + BPF_REG_10 = 10, + __MAX_BPF_REG = 11, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_insn { + pub code: __u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub off: __s16, + pub imm: __s32, +} +impl bpf_insn { + #[inline] + pub fn dst_reg(&self) -> __u8 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) } + } + #[inline] + pub fn set_dst_reg(&mut self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn src_reg(&self) -> __u8 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } + } + #[inline] + pub fn set_src_reg(&mut self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 4u8, { + let dst_reg: u8 = unsafe { ::core::mem::transmute(dst_reg) }; + dst_reg as u64 + }); + __bindgen_bitfield_unit.set(4usize, 4u8, { + let src_reg: u8 = unsafe { ::core::mem::transmute(src_reg) }; + src_reg as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug)] +pub struct bpf_lpm_trie_key { + pub prefixlen: __u32, + pub data: __IncompleteArrayField<__u8>, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_cgroup_iter_order { + BPF_CGROUP_ITER_ORDER_UNSPEC = 0, + BPF_CGROUP_ITER_SELF_ONLY = 1, + BPF_CGROUP_ITER_DESCENDANTS_PRE = 2, + BPF_CGROUP_ITER_DESCENDANTS_POST = 3, + BPF_CGROUP_ITER_ANCESTORS_UP = 4, +} +impl bpf_cmd { + pub const BPF_PROG_RUN: bpf_cmd = bpf_cmd::BPF_PROG_TEST_RUN; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_cmd { + BPF_MAP_CREATE = 0, + BPF_MAP_LOOKUP_ELEM = 1, + BPF_MAP_UPDATE_ELEM = 2, + BPF_MAP_DELETE_ELEM = 3, + BPF_MAP_GET_NEXT_KEY = 4, + BPF_PROG_LOAD = 5, + BPF_OBJ_PIN = 6, + BPF_OBJ_GET = 7, + BPF_PROG_ATTACH = 8, + BPF_PROG_DETACH = 9, + BPF_PROG_TEST_RUN = 10, + BPF_PROG_GET_NEXT_ID = 11, + BPF_MAP_GET_NEXT_ID = 12, + BPF_PROG_GET_FD_BY_ID = 13, + BPF_MAP_GET_FD_BY_ID = 14, + BPF_OBJ_GET_INFO_BY_FD = 15, + BPF_PROG_QUERY = 16, + BPF_RAW_TRACEPOINT_OPEN = 17, + BPF_BTF_LOAD = 18, + BPF_BTF_GET_FD_BY_ID = 19, + BPF_TASK_FD_QUERY = 20, + BPF_MAP_LOOKUP_AND_DELETE_ELEM = 21, + BPF_MAP_FREEZE = 22, + BPF_BTF_GET_NEXT_ID = 23, + BPF_MAP_LOOKUP_BATCH = 24, + BPF_MAP_LOOKUP_AND_DELETE_BATCH = 25, + BPF_MAP_UPDATE_BATCH = 26, + BPF_MAP_DELETE_BATCH = 27, + BPF_LINK_CREATE = 28, + BPF_LINK_UPDATE = 29, + BPF_LINK_GET_FD_BY_ID = 30, + BPF_LINK_GET_NEXT_ID = 31, + BPF_ENABLE_STATS = 32, + BPF_ITER_CREATE = 33, + BPF_LINK_DETACH = 34, + BPF_PROG_BIND_MAP = 35, + BPF_TOKEN_CREATE = 36, + __MAX_BPF_CMD = 37, +} +impl bpf_map_type { + pub const BPF_MAP_TYPE_CGROUP_STORAGE: bpf_map_type = + bpf_map_type::BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED; +} +impl bpf_map_type { + pub const BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE: bpf_map_type = + bpf_map_type::BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_map_type { + BPF_MAP_TYPE_UNSPEC = 0, + BPF_MAP_TYPE_HASH = 1, + BPF_MAP_TYPE_ARRAY = 2, + BPF_MAP_TYPE_PROG_ARRAY = 3, + BPF_MAP_TYPE_PERF_EVENT_ARRAY = 4, + BPF_MAP_TYPE_PERCPU_HASH = 5, + BPF_MAP_TYPE_PERCPU_ARRAY = 6, + BPF_MAP_TYPE_STACK_TRACE = 7, + BPF_MAP_TYPE_CGROUP_ARRAY = 8, + BPF_MAP_TYPE_LRU_HASH = 9, + BPF_MAP_TYPE_LRU_PERCPU_HASH = 10, + BPF_MAP_TYPE_LPM_TRIE = 11, + BPF_MAP_TYPE_ARRAY_OF_MAPS = 12, + BPF_MAP_TYPE_HASH_OF_MAPS = 13, + BPF_MAP_TYPE_DEVMAP = 14, + BPF_MAP_TYPE_SOCKMAP = 15, + BPF_MAP_TYPE_CPUMAP = 16, + BPF_MAP_TYPE_XSKMAP = 17, + BPF_MAP_TYPE_SOCKHASH = 18, + BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED = 19, + BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 20, + BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED = 21, + BPF_MAP_TYPE_QUEUE = 22, + BPF_MAP_TYPE_STACK = 23, + BPF_MAP_TYPE_SK_STORAGE = 24, + BPF_MAP_TYPE_DEVMAP_HASH = 25, + BPF_MAP_TYPE_STRUCT_OPS = 26, + BPF_MAP_TYPE_RINGBUF = 27, + BPF_MAP_TYPE_INODE_STORAGE = 28, + BPF_MAP_TYPE_TASK_STORAGE = 29, + BPF_MAP_TYPE_BLOOM_FILTER = 30, + BPF_MAP_TYPE_USER_RINGBUF = 31, + BPF_MAP_TYPE_CGRP_STORAGE = 32, + BPF_MAP_TYPE_ARENA = 33, + __MAX_BPF_MAP_TYPE = 34, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_prog_type { + BPF_PROG_TYPE_UNSPEC = 0, + BPF_PROG_TYPE_SOCKET_FILTER = 1, + BPF_PROG_TYPE_KPROBE = 2, + BPF_PROG_TYPE_SCHED_CLS = 3, + BPF_PROG_TYPE_SCHED_ACT = 4, + BPF_PROG_TYPE_TRACEPOINT = 5, + BPF_PROG_TYPE_XDP = 6, + BPF_PROG_TYPE_PERF_EVENT = 7, + BPF_PROG_TYPE_CGROUP_SKB = 8, + BPF_PROG_TYPE_CGROUP_SOCK = 9, + BPF_PROG_TYPE_LWT_IN = 10, + BPF_PROG_TYPE_LWT_OUT = 11, + BPF_PROG_TYPE_LWT_XMIT = 12, + BPF_PROG_TYPE_SOCK_OPS = 13, + BPF_PROG_TYPE_SK_SKB = 14, + BPF_PROG_TYPE_CGROUP_DEVICE = 15, + BPF_PROG_TYPE_SK_MSG = 16, + BPF_PROG_TYPE_RAW_TRACEPOINT = 17, + BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 18, + BPF_PROG_TYPE_LWT_SEG6LOCAL = 19, + BPF_PROG_TYPE_LIRC_MODE2 = 20, + BPF_PROG_TYPE_SK_REUSEPORT = 21, + BPF_PROG_TYPE_FLOW_DISSECTOR = 22, + BPF_PROG_TYPE_CGROUP_SYSCTL = 23, + BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE = 24, + BPF_PROG_TYPE_CGROUP_SOCKOPT = 25, + BPF_PROG_TYPE_TRACING = 26, + BPF_PROG_TYPE_STRUCT_OPS = 27, + BPF_PROG_TYPE_EXT = 28, + BPF_PROG_TYPE_LSM = 29, + BPF_PROG_TYPE_SK_LOOKUP = 30, + BPF_PROG_TYPE_SYSCALL = 31, + BPF_PROG_TYPE_NETFILTER = 32, + __MAX_BPF_PROG_TYPE = 33, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_attach_type { + BPF_CGROUP_INET_INGRESS = 0, + BPF_CGROUP_INET_EGRESS = 1, + BPF_CGROUP_INET_SOCK_CREATE = 2, + BPF_CGROUP_SOCK_OPS = 3, + BPF_SK_SKB_STREAM_PARSER = 4, + BPF_SK_SKB_STREAM_VERDICT = 5, + BPF_CGROUP_DEVICE = 6, + BPF_SK_MSG_VERDICT = 7, + BPF_CGROUP_INET4_BIND = 8, + BPF_CGROUP_INET6_BIND = 9, + BPF_CGROUP_INET4_CONNECT = 10, + BPF_CGROUP_INET6_CONNECT = 11, + BPF_CGROUP_INET4_POST_BIND = 12, + BPF_CGROUP_INET6_POST_BIND = 13, + BPF_CGROUP_UDP4_SENDMSG = 14, + BPF_CGROUP_UDP6_SENDMSG = 15, + BPF_LIRC_MODE2 = 16, + BPF_FLOW_DISSECTOR = 17, + BPF_CGROUP_SYSCTL = 18, + BPF_CGROUP_UDP4_RECVMSG = 19, + BPF_CGROUP_UDP6_RECVMSG = 20, + BPF_CGROUP_GETSOCKOPT = 21, + BPF_CGROUP_SETSOCKOPT = 22, + BPF_TRACE_RAW_TP = 23, + BPF_TRACE_FENTRY = 24, + BPF_TRACE_FEXIT = 25, + BPF_MODIFY_RETURN = 26, + BPF_LSM_MAC = 27, + BPF_TRACE_ITER = 28, + BPF_CGROUP_INET4_GETPEERNAME = 29, + BPF_CGROUP_INET6_GETPEERNAME = 30, + BPF_CGROUP_INET4_GETSOCKNAME = 31, + BPF_CGROUP_INET6_GETSOCKNAME = 32, + BPF_XDP_DEVMAP = 33, + BPF_CGROUP_INET_SOCK_RELEASE = 34, + BPF_XDP_CPUMAP = 35, + BPF_SK_LOOKUP = 36, + BPF_XDP = 37, + BPF_SK_SKB_VERDICT = 38, + BPF_SK_REUSEPORT_SELECT = 39, + BPF_SK_REUSEPORT_SELECT_OR_MIGRATE = 40, + BPF_PERF_EVENT = 41, + BPF_TRACE_KPROBE_MULTI = 42, + BPF_LSM_CGROUP = 43, + BPF_STRUCT_OPS = 44, + BPF_NETFILTER = 45, + BPF_TCX_INGRESS = 46, + BPF_TCX_EGRESS = 47, + BPF_TRACE_UPROBE_MULTI = 48, + BPF_CGROUP_UNIX_CONNECT = 49, + BPF_CGROUP_UNIX_SENDMSG = 50, + BPF_CGROUP_UNIX_RECVMSG = 51, + BPF_CGROUP_UNIX_GETPEERNAME = 52, + BPF_CGROUP_UNIX_GETSOCKNAME = 53, + BPF_NETKIT_PRIMARY = 54, + BPF_NETKIT_PEER = 55, + __MAX_BPF_ATTACH_TYPE = 56, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_link_type { + BPF_LINK_TYPE_UNSPEC = 0, + BPF_LINK_TYPE_RAW_TRACEPOINT = 1, + BPF_LINK_TYPE_TRACING = 2, + BPF_LINK_TYPE_CGROUP = 3, + BPF_LINK_TYPE_ITER = 4, + BPF_LINK_TYPE_NETNS = 5, + BPF_LINK_TYPE_XDP = 6, + BPF_LINK_TYPE_PERF_EVENT = 7, + BPF_LINK_TYPE_KPROBE_MULTI = 8, + BPF_LINK_TYPE_STRUCT_OPS = 9, + BPF_LINK_TYPE_NETFILTER = 10, + BPF_LINK_TYPE_TCX = 11, + BPF_LINK_TYPE_UPROBE_MULTI = 12, + BPF_LINK_TYPE_NETKIT = 13, + __MAX_BPF_LINK_TYPE = 14, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_perf_event_type { + BPF_PERF_EVENT_UNSPEC = 0, + BPF_PERF_EVENT_UPROBE = 1, + BPF_PERF_EVENT_URETPROBE = 2, + BPF_PERF_EVENT_KPROBE = 3, + BPF_PERF_EVENT_KRETPROBE = 4, + BPF_PERF_EVENT_TRACEPOINT = 5, + BPF_PERF_EVENT_EVENT = 6, +} +pub const BPF_F_KPROBE_MULTI_RETURN: _bindgen_ty_2 = 1; +pub type _bindgen_ty_2 = ::core::ffi::c_uint; +pub const BPF_F_UPROBE_MULTI_RETURN: _bindgen_ty_3 = 1; +pub type _bindgen_ty_3 = ::core::ffi::c_uint; +pub const BPF_ANY: _bindgen_ty_4 = 0; +pub const BPF_NOEXIST: _bindgen_ty_4 = 1; +pub const BPF_EXIST: _bindgen_ty_4 = 2; +pub const BPF_F_LOCK: _bindgen_ty_4 = 4; +pub type _bindgen_ty_4 = ::core::ffi::c_uint; +pub const BPF_F_NO_PREALLOC: _bindgen_ty_5 = 1; +pub const BPF_F_NO_COMMON_LRU: _bindgen_ty_5 = 2; +pub const BPF_F_NUMA_NODE: _bindgen_ty_5 = 4; +pub const BPF_F_RDONLY: _bindgen_ty_5 = 8; +pub const BPF_F_WRONLY: _bindgen_ty_5 = 16; +pub const BPF_F_STACK_BUILD_ID: _bindgen_ty_5 = 32; +pub const BPF_F_ZERO_SEED: _bindgen_ty_5 = 64; +pub const BPF_F_RDONLY_PROG: _bindgen_ty_5 = 128; +pub const BPF_F_WRONLY_PROG: _bindgen_ty_5 = 256; +pub const BPF_F_CLONE: _bindgen_ty_5 = 512; +pub const BPF_F_MMAPABLE: _bindgen_ty_5 = 1024; +pub const BPF_F_PRESERVE_ELEMS: _bindgen_ty_5 = 2048; +pub const BPF_F_INNER_MAP: _bindgen_ty_5 = 4096; +pub const BPF_F_LINK: _bindgen_ty_5 = 8192; +pub const BPF_F_PATH_FD: _bindgen_ty_5 = 16384; +pub const BPF_F_VTYPE_BTF_OBJ_FD: _bindgen_ty_5 = 32768; +pub const BPF_F_TOKEN_FD: _bindgen_ty_5 = 65536; +pub const BPF_F_SEGV_ON_FAULT: _bindgen_ty_5 = 131072; +pub const BPF_F_NO_USER_CONV: _bindgen_ty_5 = 262144; +pub type _bindgen_ty_5 = ::core::ffi::c_uint; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_stats_type { + BPF_STATS_RUN_TIME = 0, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_1, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_2, + pub batch: bpf_attr__bindgen_ty_3, + pub __bindgen_anon_3: bpf_attr__bindgen_ty_4, + pub __bindgen_anon_4: bpf_attr__bindgen_ty_5, + pub __bindgen_anon_5: bpf_attr__bindgen_ty_6, + pub test: bpf_attr__bindgen_ty_7, + pub __bindgen_anon_6: bpf_attr__bindgen_ty_8, + pub info: bpf_attr__bindgen_ty_9, + pub query: bpf_attr__bindgen_ty_10, + pub raw_tracepoint: bpf_attr__bindgen_ty_11, + pub __bindgen_anon_7: bpf_attr__bindgen_ty_12, + pub task_fd_query: bpf_attr__bindgen_ty_13, + pub link_create: bpf_attr__bindgen_ty_14, + pub link_update: bpf_attr__bindgen_ty_15, + pub link_detach: bpf_attr__bindgen_ty_16, + pub enable_stats: bpf_attr__bindgen_ty_17, + pub iter_create: bpf_attr__bindgen_ty_18, + pub prog_bind_map: bpf_attr__bindgen_ty_19, + pub token_create: bpf_attr__bindgen_ty_20, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_1 { + pub map_type: __u32, + pub key_size: __u32, + pub value_size: __u32, + pub max_entries: __u32, + pub map_flags: __u32, + pub inner_map_fd: __u32, + pub numa_node: __u32, + pub map_name: [::core::ffi::c_char; 16usize], + pub map_ifindex: __u32, + pub btf_fd: __u32, + pub btf_key_type_id: __u32, + pub btf_value_type_id: __u32, + pub btf_vmlinux_value_type_id: __u32, + pub map_extra: __u64, + pub value_type_btf_obj_fd: __s32, + pub map_token_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_2 { + pub map_fd: __u32, + pub key: __u64, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_2__bindgen_ty_1, + pub flags: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_2__bindgen_ty_1 { + pub value: __u64, + pub next_key: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_3 { + pub in_batch: __u64, + pub out_batch: __u64, + pub keys: __u64, + pub values: __u64, + pub count: __u32, + pub map_fd: __u32, + pub elem_flags: __u64, + pub flags: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_4 { + pub prog_type: __u32, + pub insn_cnt: __u32, + pub insns: __u64, + pub license: __u64, + pub log_level: __u32, + pub log_size: __u32, + pub log_buf: __u64, + pub kern_version: __u32, + pub prog_flags: __u32, + pub prog_name: [::core::ffi::c_char; 16usize], + pub prog_ifindex: __u32, + pub expected_attach_type: __u32, + pub prog_btf_fd: __u32, + pub func_info_rec_size: __u32, + pub func_info: __u64, + pub func_info_cnt: __u32, + pub line_info_rec_size: __u32, + pub line_info: __u64, + pub line_info_cnt: __u32, + pub attach_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_4__bindgen_ty_1, + pub core_relo_cnt: __u32, + pub fd_array: __u64, + pub core_relos: __u64, + pub core_relo_rec_size: __u32, + pub log_true_size: __u32, + pub prog_token_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_4__bindgen_ty_1 { + pub attach_prog_fd: __u32, + pub attach_btf_obj_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_5 { + pub pathname: __u64, + pub bpf_fd: __u32, + pub file_flags: __u32, + pub path_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_6 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_6__bindgen_ty_1, + pub attach_bpf_fd: __u32, + pub attach_type: __u32, + pub attach_flags: __u32, + pub replace_bpf_fd: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_6__bindgen_ty_2, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_6__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_6__bindgen_ty_2 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_7 { + pub prog_fd: __u32, + pub retval: __u32, + pub data_size_in: __u32, + pub data_size_out: __u32, + pub data_in: __u64, + pub data_out: __u64, + pub repeat: __u32, + pub duration: __u32, + pub ctx_size_in: __u32, + pub ctx_size_out: __u32, + pub ctx_in: __u64, + pub ctx_out: __u64, + pub flags: __u32, + pub cpu: __u32, + pub batch_size: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_8 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_8__bindgen_ty_1, + pub next_id: __u32, + pub open_flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_8__bindgen_ty_1 { + pub start_id: __u32, + pub prog_id: __u32, + pub map_id: __u32, + pub btf_id: __u32, + pub link_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_9 { + pub bpf_fd: __u32, + pub info_len: __u32, + pub info: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_10 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_10__bindgen_ty_1, + pub attach_type: __u32, + pub query_flags: __u32, + pub attach_flags: __u32, + pub prog_ids: __u64, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_10__bindgen_ty_2, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub prog_attach_flags: __u64, + pub link_ids: __u64, + pub link_attach_flags: __u64, + pub revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_10__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_10__bindgen_ty_2 { + pub prog_cnt: __u32, + pub count: __u32, +} +impl bpf_attr__bindgen_ty_10 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_11 { + pub name: __u64, + pub prog_fd: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_attr__bindgen_ty_11 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_12 { + pub btf: __u64, + pub btf_log_buf: __u64, + pub btf_size: __u32, + pub btf_log_size: __u32, + pub btf_log_level: __u32, + pub btf_log_true_size: __u32, + pub btf_flags: __u32, + pub btf_token_fd: __s32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_13 { + pub pid: __u32, + pub fd: __u32, + pub flags: __u32, + pub buf_len: __u32, + pub buf: __u64, + pub prog_id: __u32, + pub fd_type: __u32, + pub probe_offset: __u64, + pub probe_addr: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_1, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_14__bindgen_ty_2, + pub attach_type: __u32, + pub flags: __u32, + pub __bindgen_anon_3: bpf_attr__bindgen_ty_14__bindgen_ty_3, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_1 { + pub prog_fd: __u32, + pub map_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3 { + pub target_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1, + pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2, + pub kprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3, + pub tracing: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4, + pub netfilter: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5, + pub tcx: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6, + pub uprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7, + pub netkit: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 { + pub iter_info: __u64, + pub iter_info_len: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 { + pub bpf_cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 { + pub flags: __u32, + pub cnt: __u32, + pub syms: __u64, + pub addrs: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 { + pub target_btf_id: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 { + pub pf: __u32, + pub hooknum: __u32, + pub priority: __s32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 { + pub path: __u64, + pub offsets: __u64, + pub ref_ctr_offsets: __u64, + pub cookies: __u64, + pub cnt: __u32, + pub flags: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_15 { + pub link_fd: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_15__bindgen_ty_1, + pub flags: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_15__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_15__bindgen_ty_1 { + pub new_prog_fd: __u32, + pub new_map_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_15__bindgen_ty_2 { + pub old_prog_fd: __u32, + pub old_map_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_16 { + pub link_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_17 { + pub type_: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_18 { + pub link_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_19 { + pub prog_fd: __u32, + pub map_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_20 { + pub flags: __u32, + pub bpffs_fd: __u32, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_func_id { + BPF_FUNC_unspec = 0, + BPF_FUNC_map_lookup_elem = 1, + BPF_FUNC_map_update_elem = 2, + BPF_FUNC_map_delete_elem = 3, + BPF_FUNC_probe_read = 4, + BPF_FUNC_ktime_get_ns = 5, + BPF_FUNC_trace_printk = 6, + BPF_FUNC_get_prandom_u32 = 7, + BPF_FUNC_get_smp_processor_id = 8, + BPF_FUNC_skb_store_bytes = 9, + BPF_FUNC_l3_csum_replace = 10, + BPF_FUNC_l4_csum_replace = 11, + BPF_FUNC_tail_call = 12, + BPF_FUNC_clone_redirect = 13, + BPF_FUNC_get_current_pid_tgid = 14, + BPF_FUNC_get_current_uid_gid = 15, + BPF_FUNC_get_current_comm = 16, + BPF_FUNC_get_cgroup_classid = 17, + BPF_FUNC_skb_vlan_push = 18, + BPF_FUNC_skb_vlan_pop = 19, + BPF_FUNC_skb_get_tunnel_key = 20, + BPF_FUNC_skb_set_tunnel_key = 21, + BPF_FUNC_perf_event_read = 22, + BPF_FUNC_redirect = 23, + BPF_FUNC_get_route_realm = 24, + BPF_FUNC_perf_event_output = 25, + BPF_FUNC_skb_load_bytes = 26, + BPF_FUNC_get_stackid = 27, + BPF_FUNC_csum_diff = 28, + BPF_FUNC_skb_get_tunnel_opt = 29, + BPF_FUNC_skb_set_tunnel_opt = 30, + BPF_FUNC_skb_change_proto = 31, + BPF_FUNC_skb_change_type = 32, + BPF_FUNC_skb_under_cgroup = 33, + BPF_FUNC_get_hash_recalc = 34, + BPF_FUNC_get_current_task = 35, + BPF_FUNC_probe_write_user = 36, + BPF_FUNC_current_task_under_cgroup = 37, + BPF_FUNC_skb_change_tail = 38, + BPF_FUNC_skb_pull_data = 39, + BPF_FUNC_csum_update = 40, + BPF_FUNC_set_hash_invalid = 41, + BPF_FUNC_get_numa_node_id = 42, + BPF_FUNC_skb_change_head = 43, + BPF_FUNC_xdp_adjust_head = 44, + BPF_FUNC_probe_read_str = 45, + BPF_FUNC_get_socket_cookie = 46, + BPF_FUNC_get_socket_uid = 47, + BPF_FUNC_set_hash = 48, + BPF_FUNC_setsockopt = 49, + BPF_FUNC_skb_adjust_room = 50, + BPF_FUNC_redirect_map = 51, + BPF_FUNC_sk_redirect_map = 52, + BPF_FUNC_sock_map_update = 53, + BPF_FUNC_xdp_adjust_meta = 54, + BPF_FUNC_perf_event_read_value = 55, + BPF_FUNC_perf_prog_read_value = 56, + BPF_FUNC_getsockopt = 57, + BPF_FUNC_override_return = 58, + BPF_FUNC_sock_ops_cb_flags_set = 59, + BPF_FUNC_msg_redirect_map = 60, + BPF_FUNC_msg_apply_bytes = 61, + BPF_FUNC_msg_cork_bytes = 62, + BPF_FUNC_msg_pull_data = 63, + BPF_FUNC_bind = 64, + BPF_FUNC_xdp_adjust_tail = 65, + BPF_FUNC_skb_get_xfrm_state = 66, + BPF_FUNC_get_stack = 67, + BPF_FUNC_skb_load_bytes_relative = 68, + BPF_FUNC_fib_lookup = 69, + BPF_FUNC_sock_hash_update = 70, + BPF_FUNC_msg_redirect_hash = 71, + BPF_FUNC_sk_redirect_hash = 72, + BPF_FUNC_lwt_push_encap = 73, + BPF_FUNC_lwt_seg6_store_bytes = 74, + BPF_FUNC_lwt_seg6_adjust_srh = 75, + BPF_FUNC_lwt_seg6_action = 76, + BPF_FUNC_rc_repeat = 77, + BPF_FUNC_rc_keydown = 78, + BPF_FUNC_skb_cgroup_id = 79, + BPF_FUNC_get_current_cgroup_id = 80, + BPF_FUNC_get_local_storage = 81, + BPF_FUNC_sk_select_reuseport = 82, + BPF_FUNC_skb_ancestor_cgroup_id = 83, + BPF_FUNC_sk_lookup_tcp = 84, + BPF_FUNC_sk_lookup_udp = 85, + BPF_FUNC_sk_release = 86, + BPF_FUNC_map_push_elem = 87, + BPF_FUNC_map_pop_elem = 88, + BPF_FUNC_map_peek_elem = 89, + BPF_FUNC_msg_push_data = 90, + BPF_FUNC_msg_pop_data = 91, + BPF_FUNC_rc_pointer_rel = 92, + BPF_FUNC_spin_lock = 93, + BPF_FUNC_spin_unlock = 94, + BPF_FUNC_sk_fullsock = 95, + BPF_FUNC_tcp_sock = 96, + BPF_FUNC_skb_ecn_set_ce = 97, + BPF_FUNC_get_listener_sock = 98, + BPF_FUNC_skc_lookup_tcp = 99, + BPF_FUNC_tcp_check_syncookie = 100, + BPF_FUNC_sysctl_get_name = 101, + BPF_FUNC_sysctl_get_current_value = 102, + BPF_FUNC_sysctl_get_new_value = 103, + BPF_FUNC_sysctl_set_new_value = 104, + BPF_FUNC_strtol = 105, + BPF_FUNC_strtoul = 106, + BPF_FUNC_sk_storage_get = 107, + BPF_FUNC_sk_storage_delete = 108, + BPF_FUNC_send_signal = 109, + BPF_FUNC_tcp_gen_syncookie = 110, + BPF_FUNC_skb_output = 111, + BPF_FUNC_probe_read_user = 112, + BPF_FUNC_probe_read_kernel = 113, + BPF_FUNC_probe_read_user_str = 114, + BPF_FUNC_probe_read_kernel_str = 115, + BPF_FUNC_tcp_send_ack = 116, + BPF_FUNC_send_signal_thread = 117, + BPF_FUNC_jiffies64 = 118, + BPF_FUNC_read_branch_records = 119, + BPF_FUNC_get_ns_current_pid_tgid = 120, + BPF_FUNC_xdp_output = 121, + BPF_FUNC_get_netns_cookie = 122, + BPF_FUNC_get_current_ancestor_cgroup_id = 123, + BPF_FUNC_sk_assign = 124, + BPF_FUNC_ktime_get_boot_ns = 125, + BPF_FUNC_seq_printf = 126, + BPF_FUNC_seq_write = 127, + BPF_FUNC_sk_cgroup_id = 128, + BPF_FUNC_sk_ancestor_cgroup_id = 129, + BPF_FUNC_ringbuf_output = 130, + BPF_FUNC_ringbuf_reserve = 131, + BPF_FUNC_ringbuf_submit = 132, + BPF_FUNC_ringbuf_discard = 133, + BPF_FUNC_ringbuf_query = 134, + BPF_FUNC_csum_level = 135, + BPF_FUNC_skc_to_tcp6_sock = 136, + BPF_FUNC_skc_to_tcp_sock = 137, + BPF_FUNC_skc_to_tcp_timewait_sock = 138, + BPF_FUNC_skc_to_tcp_request_sock = 139, + BPF_FUNC_skc_to_udp6_sock = 140, + BPF_FUNC_get_task_stack = 141, + BPF_FUNC_load_hdr_opt = 142, + BPF_FUNC_store_hdr_opt = 143, + BPF_FUNC_reserve_hdr_opt = 144, + BPF_FUNC_inode_storage_get = 145, + BPF_FUNC_inode_storage_delete = 146, + BPF_FUNC_d_path = 147, + BPF_FUNC_copy_from_user = 148, + BPF_FUNC_snprintf_btf = 149, + BPF_FUNC_seq_printf_btf = 150, + BPF_FUNC_skb_cgroup_classid = 151, + BPF_FUNC_redirect_neigh = 152, + BPF_FUNC_per_cpu_ptr = 153, + BPF_FUNC_this_cpu_ptr = 154, + BPF_FUNC_redirect_peer = 155, + BPF_FUNC_task_storage_get = 156, + BPF_FUNC_task_storage_delete = 157, + BPF_FUNC_get_current_task_btf = 158, + BPF_FUNC_bprm_opts_set = 159, + BPF_FUNC_ktime_get_coarse_ns = 160, + BPF_FUNC_ima_inode_hash = 161, + BPF_FUNC_sock_from_file = 162, + BPF_FUNC_check_mtu = 163, + BPF_FUNC_for_each_map_elem = 164, + BPF_FUNC_snprintf = 165, + BPF_FUNC_sys_bpf = 166, + BPF_FUNC_btf_find_by_name_kind = 167, + BPF_FUNC_sys_close = 168, + BPF_FUNC_timer_init = 169, + BPF_FUNC_timer_set_callback = 170, + BPF_FUNC_timer_start = 171, + BPF_FUNC_timer_cancel = 172, + BPF_FUNC_get_func_ip = 173, + BPF_FUNC_get_attach_cookie = 174, + BPF_FUNC_task_pt_regs = 175, + BPF_FUNC_get_branch_snapshot = 176, + BPF_FUNC_trace_vprintk = 177, + BPF_FUNC_skc_to_unix_sock = 178, + BPF_FUNC_kallsyms_lookup_name = 179, + BPF_FUNC_find_vma = 180, + BPF_FUNC_loop = 181, + BPF_FUNC_strncmp = 182, + BPF_FUNC_get_func_arg = 183, + BPF_FUNC_get_func_ret = 184, + BPF_FUNC_get_func_arg_cnt = 185, + BPF_FUNC_get_retval = 186, + BPF_FUNC_set_retval = 187, + BPF_FUNC_xdp_get_buff_len = 188, + BPF_FUNC_xdp_load_bytes = 189, + BPF_FUNC_xdp_store_bytes = 190, + BPF_FUNC_copy_from_user_task = 191, + BPF_FUNC_skb_set_tstamp = 192, + BPF_FUNC_ima_file_hash = 193, + BPF_FUNC_kptr_xchg = 194, + BPF_FUNC_map_lookup_percpu_elem = 195, + BPF_FUNC_skc_to_mptcp_sock = 196, + BPF_FUNC_dynptr_from_mem = 197, + BPF_FUNC_ringbuf_reserve_dynptr = 198, + BPF_FUNC_ringbuf_submit_dynptr = 199, + BPF_FUNC_ringbuf_discard_dynptr = 200, + BPF_FUNC_dynptr_read = 201, + BPF_FUNC_dynptr_write = 202, + BPF_FUNC_dynptr_data = 203, + BPF_FUNC_tcp_raw_gen_syncookie_ipv4 = 204, + BPF_FUNC_tcp_raw_gen_syncookie_ipv6 = 205, + BPF_FUNC_tcp_raw_check_syncookie_ipv4 = 206, + BPF_FUNC_tcp_raw_check_syncookie_ipv6 = 207, + BPF_FUNC_ktime_get_tai_ns = 208, + BPF_FUNC_user_ringbuf_drain = 209, + BPF_FUNC_cgrp_storage_get = 210, + BPF_FUNC_cgrp_storage_delete = 211, + __BPF_FUNC_MAX_ID = 212, +} +pub const BPF_F_RECOMPUTE_CSUM: _bindgen_ty_6 = 1; +pub const BPF_F_INVALIDATE_HASH: _bindgen_ty_6 = 2; +pub type _bindgen_ty_6 = ::core::ffi::c_uint; +pub const BPF_F_HDR_FIELD_MASK: _bindgen_ty_7 = 15; +pub type _bindgen_ty_7 = ::core::ffi::c_uint; +pub const BPF_F_PSEUDO_HDR: _bindgen_ty_8 = 16; +pub const BPF_F_MARK_MANGLED_0: _bindgen_ty_8 = 32; +pub const BPF_F_MARK_ENFORCE: _bindgen_ty_8 = 64; +pub type _bindgen_ty_8 = ::core::ffi::c_uint; +pub const BPF_F_INGRESS: _bindgen_ty_9 = 1; +pub type _bindgen_ty_9 = ::core::ffi::c_uint; +pub const BPF_F_TUNINFO_IPV6: _bindgen_ty_10 = 1; +pub type _bindgen_ty_10 = ::core::ffi::c_uint; +pub const BPF_F_SKIP_FIELD_MASK: _bindgen_ty_11 = 255; +pub const BPF_F_USER_STACK: _bindgen_ty_11 = 256; +pub const BPF_F_FAST_STACK_CMP: _bindgen_ty_11 = 512; +pub const BPF_F_REUSE_STACKID: _bindgen_ty_11 = 1024; +pub const BPF_F_USER_BUILD_ID: _bindgen_ty_11 = 2048; +pub type _bindgen_ty_11 = ::core::ffi::c_uint; +pub const BPF_F_ZERO_CSUM_TX: _bindgen_ty_12 = 2; +pub const BPF_F_DONT_FRAGMENT: _bindgen_ty_12 = 4; +pub const BPF_F_SEQ_NUMBER: _bindgen_ty_12 = 8; +pub const BPF_F_NO_TUNNEL_KEY: _bindgen_ty_12 = 16; +pub type _bindgen_ty_12 = ::core::ffi::c_uint; +pub const BPF_F_TUNINFO_FLAGS: _bindgen_ty_13 = 16; +pub type _bindgen_ty_13 = ::core::ffi::c_uint; +pub const BPF_F_INDEX_MASK: _bindgen_ty_14 = 4294967295; +pub const BPF_F_CURRENT_CPU: _bindgen_ty_14 = 4294967295; +pub const BPF_F_CTXLEN_MASK: _bindgen_ty_14 = 4503595332403200; +pub type _bindgen_ty_14 = ::core::ffi::c_ulong; +pub const BPF_F_CURRENT_NETNS: _bindgen_ty_15 = -1; +pub type _bindgen_ty_15 = ::core::ffi::c_int; +pub const BPF_CSUM_LEVEL_QUERY: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_QUERY; +pub const BPF_CSUM_LEVEL_INC: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_INC; +pub const BPF_CSUM_LEVEL_DEC: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_DEC; +pub const BPF_CSUM_LEVEL_RESET: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_RESET; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_16 { + BPF_CSUM_LEVEL_QUERY = 0, + BPF_CSUM_LEVEL_INC = 1, + BPF_CSUM_LEVEL_DEC = 2, + BPF_CSUM_LEVEL_RESET = 3, +} +pub const BPF_F_ADJ_ROOM_FIXED_GSO: _bindgen_ty_17 = 1; +pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: _bindgen_ty_17 = 2; +pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: _bindgen_ty_17 = 4; +pub const BPF_F_ADJ_ROOM_ENCAP_L4_GRE: _bindgen_ty_17 = 8; +pub const BPF_F_ADJ_ROOM_ENCAP_L4_UDP: _bindgen_ty_17 = 16; +pub const BPF_F_ADJ_ROOM_NO_CSUM_RESET: _bindgen_ty_17 = 32; +pub const BPF_F_ADJ_ROOM_ENCAP_L2_ETH: _bindgen_ty_17 = 64; +pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV4: _bindgen_ty_17 = 128; +pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV6: _bindgen_ty_17 = 256; +pub type _bindgen_ty_17 = ::core::ffi::c_uint; +pub const BPF_ADJ_ROOM_ENCAP_L2_MASK: _bindgen_ty_18 = _bindgen_ty_18::BPF_ADJ_ROOM_ENCAP_L2_MASK; +pub const BPF_ADJ_ROOM_ENCAP_L2_SHIFT: _bindgen_ty_18 = _bindgen_ty_18::BPF_ADJ_ROOM_ENCAP_L2_SHIFT; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_18 { + BPF_ADJ_ROOM_ENCAP_L2_MASK = 255, + BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 56, +} +pub const BPF_F_SYSCTL_BASE_NAME: _bindgen_ty_19 = 1; +pub type _bindgen_ty_19 = ::core::ffi::c_uint; +pub const BPF_LOCAL_STORAGE_GET_F_CREATE: _bindgen_ty_20 = + _bindgen_ty_20::BPF_LOCAL_STORAGE_GET_F_CREATE; +pub const BPF_SK_STORAGE_GET_F_CREATE: _bindgen_ty_20 = + _bindgen_ty_20::BPF_LOCAL_STORAGE_GET_F_CREATE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_20 { + BPF_LOCAL_STORAGE_GET_F_CREATE = 1, +} +pub const BPF_F_GET_BRANCH_RECORDS_SIZE: _bindgen_ty_21 = 1; +pub type _bindgen_ty_21 = ::core::ffi::c_uint; +pub const BPF_RB_NO_WAKEUP: _bindgen_ty_22 = _bindgen_ty_22::BPF_RB_NO_WAKEUP; +pub const BPF_RB_FORCE_WAKEUP: _bindgen_ty_22 = _bindgen_ty_22::BPF_RB_FORCE_WAKEUP; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_22 { + BPF_RB_NO_WAKEUP = 1, + BPF_RB_FORCE_WAKEUP = 2, +} +pub const BPF_RB_AVAIL_DATA: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_AVAIL_DATA; +pub const BPF_RB_RING_SIZE: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_RING_SIZE; +pub const BPF_RB_CONS_POS: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_CONS_POS; +pub const BPF_RB_PROD_POS: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_PROD_POS; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_23 { + BPF_RB_AVAIL_DATA = 0, + BPF_RB_RING_SIZE = 1, + BPF_RB_CONS_POS = 2, + BPF_RB_PROD_POS = 3, +} +pub const BPF_RINGBUF_BUSY_BIT: _bindgen_ty_24 = 2147483648; +pub const BPF_RINGBUF_DISCARD_BIT: _bindgen_ty_24 = 1073741824; +pub const BPF_RINGBUF_HDR_SZ: _bindgen_ty_24 = 8; +pub type _bindgen_ty_24 = ::core::ffi::c_uint; +pub const BPF_SK_LOOKUP_F_REPLACE: _bindgen_ty_25 = _bindgen_ty_25::BPF_SK_LOOKUP_F_REPLACE; +pub const BPF_SK_LOOKUP_F_NO_REUSEPORT: _bindgen_ty_25 = + _bindgen_ty_25::BPF_SK_LOOKUP_F_NO_REUSEPORT; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_25 { + BPF_SK_LOOKUP_F_REPLACE = 1, + BPF_SK_LOOKUP_F_NO_REUSEPORT = 2, +} +pub const BPF_F_BPRM_SECUREEXEC: _bindgen_ty_26 = 1; +pub type _bindgen_ty_26 = ::core::ffi::c_uint; +pub const BPF_F_BROADCAST: _bindgen_ty_27 = 8; +pub const BPF_F_EXCLUDE_INGRESS: _bindgen_ty_27 = 16; +pub type _bindgen_ty_27 = ::core::ffi::c_uint; +pub const BPF_SKB_TSTAMP_UNSPEC: _bindgen_ty_28 = _bindgen_ty_28::BPF_SKB_TSTAMP_UNSPEC; +pub const BPF_SKB_TSTAMP_DELIVERY_MONO: _bindgen_ty_28 = + _bindgen_ty_28::BPF_SKB_TSTAMP_DELIVERY_MONO; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_28 { + BPF_SKB_TSTAMP_UNSPEC = 0, + BPF_SKB_TSTAMP_DELIVERY_MONO = 1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_devmap_val { + pub ifindex: __u32, + pub bpf_prog: bpf_devmap_val__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_devmap_val__bindgen_ty_1 { + pub fd: ::core::ffi::c_int, + pub id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_cpumap_val { + pub qsize: __u32, + pub bpf_prog: bpf_cpumap_val__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_cpumap_val__bindgen_ty_1 { + pub fd: ::core::ffi::c_int, + pub id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_prog_info { + pub type_: __u32, + pub id: __u32, + pub tag: [__u8; 8usize], + pub jited_prog_len: __u32, + pub xlated_prog_len: __u32, + pub jited_prog_insns: __u64, + pub xlated_prog_insns: __u64, + pub load_time: __u64, + pub created_by_uid: __u32, + pub nr_map_ids: __u32, + pub map_ids: __u64, + pub name: [::core::ffi::c_char; 16usize], + pub ifindex: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub netns_dev: __u64, + pub netns_ino: __u64, + pub nr_jited_ksyms: __u32, + pub nr_jited_func_lens: __u32, + pub jited_ksyms: __u64, + pub jited_func_lens: __u64, + pub btf_id: __u32, + pub func_info_rec_size: __u32, + pub func_info: __u64, + pub nr_func_info: __u32, + pub nr_line_info: __u32, + pub line_info: __u64, + pub jited_line_info: __u64, + pub nr_jited_line_info: __u32, + pub line_info_rec_size: __u32, + pub jited_line_info_rec_size: __u32, + pub nr_prog_tags: __u32, + pub prog_tags: __u64, + pub run_time_ns: __u64, + pub run_cnt: __u64, + pub recursion_misses: __u64, + pub verified_insns: __u32, + pub attach_btf_obj_id: __u32, + pub attach_btf_id: __u32, +} +impl bpf_prog_info { + #[inline] + pub fn gpl_compatible(&self) -> __u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_gpl_compatible(&mut self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let gpl_compatible: u32 = unsafe { ::core::mem::transmute(gpl_compatible) }; + gpl_compatible as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_map_info { + pub type_: __u32, + pub id: __u32, + pub key_size: __u32, + pub value_size: __u32, + pub max_entries: __u32, + pub map_flags: __u32, + pub name: [::core::ffi::c_char; 16usize], + pub ifindex: __u32, + pub btf_vmlinux_value_type_id: __u32, + pub netns_dev: __u64, + pub netns_ino: __u64, + pub btf_id: __u32, + pub btf_key_type_id: __u32, + pub btf_value_type_id: __u32, + pub btf_vmlinux_id: __u32, + pub map_extra: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_btf_info { + pub btf: __u64, + pub btf_size: __u32, + pub id: __u32, + pub name: __u64, + pub name_len: __u32, + pub kernel_btf: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info { + pub type_: __u32, + pub id: __u32, + pub prog_id: __u32, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1 { + pub raw_tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_1, + pub tracing: bpf_link_info__bindgen_ty_1__bindgen_ty_2, + pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_3, + pub iter: bpf_link_info__bindgen_ty_1__bindgen_ty_4, + pub netns: bpf_link_info__bindgen_ty_1__bindgen_ty_5, + pub xdp: bpf_link_info__bindgen_ty_1__bindgen_ty_6, + pub struct_ops: bpf_link_info__bindgen_ty_1__bindgen_ty_7, + pub netfilter: bpf_link_info__bindgen_ty_1__bindgen_ty_8, + pub kprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_9, + pub uprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_10, + pub perf_event: bpf_link_info__bindgen_ty_1__bindgen_ty_11, + pub tcx: bpf_link_info__bindgen_ty_1__bindgen_ty_12, + pub netkit: bpf_link_info__bindgen_ty_1__bindgen_ty_13, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_1 { + pub tp_name: __u64, + pub tp_name_len: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_2 { + pub attach_type: __u32, + pub target_obj_id: __u32, + pub target_btf_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_3 { + pub cgroup_id: __u64, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4 { + pub target_name: __u64, + pub target_name_len: __u32, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, + pub __bindgen_anon_2: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 { + pub map: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 { + pub map_id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 { + pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1, + pub task: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 { + pub cgroup_id: __u64, + pub order: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 { + pub tid: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_5 { + pub netns_ino: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_6 { + pub ifindex: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_7 { + pub map_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_8 { + pub pf: __u32, + pub hooknum: __u32, + pub priority: __s32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_9 { + pub addrs: __u64, + pub count: __u32, + pub flags: __u32, + pub missed: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_10 { + pub path: __u64, + pub offsets: __u64, + pub ref_ctr_offsets: __u64, + pub cookies: __u64, + pub path_size: __u32, + pub count: __u32, + pub flags: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11 { + pub type_: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 { + pub uprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1, + pub kprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2, + pub tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3, + pub event: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 { + pub file_name: __u64, + pub name_len: __u32, + pub offset: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 { + pub func_name: __u64, + pub name_len: __u32, + pub offset: __u32, + pub addr: __u64, + pub missed: __u64, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 { + pub tp_name: __u64, + pub name_len: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 { + pub config: __u64, + pub type_: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_12 { + pub ifindex: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_13 { + pub ifindex: __u32, + pub attach_type: __u32, +} +pub const BPF_SOCK_OPS_RTO_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_RTO_CB_FLAG; +pub const BPF_SOCK_OPS_RETRANS_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_RETRANS_CB_FLAG; +pub const BPF_SOCK_OPS_STATE_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_STATE_CB_FLAG; +pub const BPF_SOCK_OPS_RTT_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_RTT_CB_FLAG; +pub const BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_ALL_CB_FLAGS: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_ALL_CB_FLAGS; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_29 { + BPF_SOCK_OPS_RTO_CB_FLAG = 1, + BPF_SOCK_OPS_RETRANS_CB_FLAG = 2, + BPF_SOCK_OPS_STATE_CB_FLAG = 4, + BPF_SOCK_OPS_RTT_CB_FLAG = 8, + BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG = 16, + BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG = 32, + BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG = 64, + BPF_SOCK_OPS_ALL_CB_FLAGS = 127, +} +pub const BPF_SOCK_OPS_VOID: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_VOID; +pub const BPF_SOCK_OPS_TIMEOUT_INIT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TIMEOUT_INIT; +pub const BPF_SOCK_OPS_RWND_INIT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RWND_INIT; +pub const BPF_SOCK_OPS_TCP_CONNECT_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TCP_CONNECT_CB; +pub const BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB; +pub const BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB; +pub const BPF_SOCK_OPS_NEEDS_ECN: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_NEEDS_ECN; +pub const BPF_SOCK_OPS_BASE_RTT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_BASE_RTT; +pub const BPF_SOCK_OPS_RTO_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RTO_CB; +pub const BPF_SOCK_OPS_RETRANS_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RETRANS_CB; +pub const BPF_SOCK_OPS_STATE_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_STATE_CB; +pub const BPF_SOCK_OPS_TCP_LISTEN_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TCP_LISTEN_CB; +pub const BPF_SOCK_OPS_RTT_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RTT_CB; +pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_PARSE_HDR_OPT_CB; +pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_HDR_OPT_LEN_CB; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_WRITE_HDR_OPT_CB; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_30 { + BPF_SOCK_OPS_VOID = 0, + BPF_SOCK_OPS_TIMEOUT_INIT = 1, + BPF_SOCK_OPS_RWND_INIT = 2, + BPF_SOCK_OPS_TCP_CONNECT_CB = 3, + BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 4, + BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 5, + BPF_SOCK_OPS_NEEDS_ECN = 6, + BPF_SOCK_OPS_BASE_RTT = 7, + BPF_SOCK_OPS_RTO_CB = 8, + BPF_SOCK_OPS_RETRANS_CB = 9, + BPF_SOCK_OPS_STATE_CB = 10, + BPF_SOCK_OPS_TCP_LISTEN_CB = 11, + BPF_SOCK_OPS_RTT_CB = 12, + BPF_SOCK_OPS_PARSE_HDR_OPT_CB = 13, + BPF_SOCK_OPS_HDR_OPT_LEN_CB = 14, + BPF_SOCK_OPS_WRITE_HDR_OPT_CB = 15, +} +pub const BPF_TCP_ESTABLISHED: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_ESTABLISHED; +pub const BPF_TCP_SYN_SENT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_SYN_SENT; +pub const BPF_TCP_SYN_RECV: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_SYN_RECV; +pub const BPF_TCP_FIN_WAIT1: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_FIN_WAIT1; +pub const BPF_TCP_FIN_WAIT2: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_FIN_WAIT2; +pub const BPF_TCP_TIME_WAIT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_TIME_WAIT; +pub const BPF_TCP_CLOSE: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSE; +pub const BPF_TCP_CLOSE_WAIT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSE_WAIT; +pub const BPF_TCP_LAST_ACK: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_LAST_ACK; +pub const BPF_TCP_LISTEN: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_LISTEN; +pub const BPF_TCP_CLOSING: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSING; +pub const BPF_TCP_NEW_SYN_RECV: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_NEW_SYN_RECV; +pub const BPF_TCP_BOUND_INACTIVE: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_BOUND_INACTIVE; +pub const BPF_TCP_MAX_STATES: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_MAX_STATES; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_31 { + BPF_TCP_ESTABLISHED = 1, + BPF_TCP_SYN_SENT = 2, + BPF_TCP_SYN_RECV = 3, + BPF_TCP_FIN_WAIT1 = 4, + BPF_TCP_FIN_WAIT2 = 5, + BPF_TCP_TIME_WAIT = 6, + BPF_TCP_CLOSE = 7, + BPF_TCP_CLOSE_WAIT = 8, + BPF_TCP_LAST_ACK = 9, + BPF_TCP_LISTEN = 10, + BPF_TCP_CLOSING = 11, + BPF_TCP_NEW_SYN_RECV = 12, + BPF_TCP_BOUND_INACTIVE = 13, + BPF_TCP_MAX_STATES = 14, +} +pub const BPF_LOAD_HDR_OPT_TCP_SYN: _bindgen_ty_33 = _bindgen_ty_33::BPF_LOAD_HDR_OPT_TCP_SYN; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_33 { + BPF_LOAD_HDR_OPT_TCP_SYN = 1, +} +pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: _bindgen_ty_34 = + _bindgen_ty_34::BPF_WRITE_HDR_TCP_CURRENT_MSS; +pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: _bindgen_ty_34 = + _bindgen_ty_34::BPF_WRITE_HDR_TCP_SYNACK_COOKIE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_34 { + BPF_WRITE_HDR_TCP_CURRENT_MSS = 1, + BPF_WRITE_HDR_TCP_SYNACK_COOKIE = 2, +} +pub const BPF_DEVCG_ACC_MKNOD: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_MKNOD; +pub const BPF_DEVCG_ACC_READ: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_READ; +pub const BPF_DEVCG_ACC_WRITE: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_WRITE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_35 { + BPF_DEVCG_ACC_MKNOD = 1, + BPF_DEVCG_ACC_READ = 2, + BPF_DEVCG_ACC_WRITE = 4, +} +pub const BPF_DEVCG_DEV_BLOCK: _bindgen_ty_36 = _bindgen_ty_36::BPF_DEVCG_DEV_BLOCK; +pub const BPF_DEVCG_DEV_CHAR: _bindgen_ty_36 = _bindgen_ty_36::BPF_DEVCG_DEV_CHAR; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_36 { + BPF_DEVCG_DEV_BLOCK = 1, + BPF_DEVCG_DEV_CHAR = 2, +} +pub const BPF_FIB_LOOKUP_DIRECT: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_DIRECT; +pub const BPF_FIB_LOOKUP_OUTPUT: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_OUTPUT; +pub const BPF_FIB_LOOKUP_SKIP_NEIGH: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_SKIP_NEIGH; +pub const BPF_FIB_LOOKUP_TBID: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_TBID; +pub const BPF_FIB_LOOKUP_SRC: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_SRC; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_37 { + BPF_FIB_LOOKUP_DIRECT = 1, + BPF_FIB_LOOKUP_OUTPUT = 2, + BPF_FIB_LOOKUP_SKIP_NEIGH = 4, + BPF_FIB_LOOKUP_TBID = 8, + BPF_FIB_LOOKUP_SRC = 16, +} +pub const BPF_FIB_LKUP_RET_SUCCESS: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_SUCCESS; +pub const BPF_FIB_LKUP_RET_BLACKHOLE: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_BLACKHOLE; +pub const BPF_FIB_LKUP_RET_UNREACHABLE: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_UNREACHABLE; +pub const BPF_FIB_LKUP_RET_PROHIBIT: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_PROHIBIT; +pub const BPF_FIB_LKUP_RET_NOT_FWDED: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_NOT_FWDED; +pub const BPF_FIB_LKUP_RET_FWD_DISABLED: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_FWD_DISABLED; +pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_UNSUPP_LWT; +pub const BPF_FIB_LKUP_RET_NO_NEIGH: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_NO_NEIGH; +pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_FRAG_NEEDED; +pub const BPF_FIB_LKUP_RET_NO_SRC_ADDR: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_NO_SRC_ADDR; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_38 { + BPF_FIB_LKUP_RET_SUCCESS = 0, + BPF_FIB_LKUP_RET_BLACKHOLE = 1, + BPF_FIB_LKUP_RET_UNREACHABLE = 2, + BPF_FIB_LKUP_RET_PROHIBIT = 3, + BPF_FIB_LKUP_RET_NOT_FWDED = 4, + BPF_FIB_LKUP_RET_FWD_DISABLED = 5, + BPF_FIB_LKUP_RET_UNSUPP_LWT = 6, + BPF_FIB_LKUP_RET_NO_NEIGH = 7, + BPF_FIB_LKUP_RET_FRAG_NEEDED = 8, + BPF_FIB_LKUP_RET_NO_SRC_ADDR = 9, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_task_fd_type { + BPF_FD_TYPE_RAW_TRACEPOINT = 0, + BPF_FD_TYPE_TRACEPOINT = 1, + BPF_FD_TYPE_KPROBE = 2, + BPF_FD_TYPE_KRETPROBE = 3, + BPF_FD_TYPE_UPROBE = 4, + BPF_FD_TYPE_URETPROBE = 5, +} +pub const BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_39 { + BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 1, + BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 2, + BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 4, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_func_info { + pub insn_off: __u32, + pub type_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_line_info { + pub insn_off: __u32, + pub file_name_off: __u32, + pub line_off: __u32, + pub line_col: __u32, +} +pub const BPF_F_TIMER_ABS: _bindgen_ty_41 = 1; +pub const BPF_F_TIMER_CPU_PIN: _bindgen_ty_41 = 2; +pub type _bindgen_ty_41 = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_header { + pub magic: __u16, + pub version: __u8, + pub flags: __u8, + pub hdr_len: __u32, + pub type_off: __u32, + pub type_len: __u32, + pub str_off: __u32, + pub str_len: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct btf_type { + pub name_off: __u32, + pub info: __u32, + pub __bindgen_anon_1: btf_type__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union btf_type__bindgen_ty_1 { + pub size: __u32, + pub type_: __u32, +} +pub const BTF_KIND_UNKN: _bindgen_ty_42 = 0; +pub const BTF_KIND_INT: _bindgen_ty_42 = 1; +pub const BTF_KIND_PTR: _bindgen_ty_42 = 2; +pub const BTF_KIND_ARRAY: _bindgen_ty_42 = 3; +pub const BTF_KIND_STRUCT: _bindgen_ty_42 = 4; +pub const BTF_KIND_UNION: _bindgen_ty_42 = 5; +pub const BTF_KIND_ENUM: _bindgen_ty_42 = 6; +pub const BTF_KIND_FWD: _bindgen_ty_42 = 7; +pub const BTF_KIND_TYPEDEF: _bindgen_ty_42 = 8; +pub const BTF_KIND_VOLATILE: _bindgen_ty_42 = 9; +pub const BTF_KIND_CONST: _bindgen_ty_42 = 10; +pub const BTF_KIND_RESTRICT: _bindgen_ty_42 = 11; +pub const BTF_KIND_FUNC: _bindgen_ty_42 = 12; +pub const BTF_KIND_FUNC_PROTO: _bindgen_ty_42 = 13; +pub const BTF_KIND_VAR: _bindgen_ty_42 = 14; +pub const BTF_KIND_DATASEC: _bindgen_ty_42 = 15; +pub const BTF_KIND_FLOAT: _bindgen_ty_42 = 16; +pub const BTF_KIND_DECL_TAG: _bindgen_ty_42 = 17; +pub const BTF_KIND_TYPE_TAG: _bindgen_ty_42 = 18; +pub const BTF_KIND_ENUM64: _bindgen_ty_42 = 19; +pub const NR_BTF_KINDS: _bindgen_ty_42 = 20; +pub const BTF_KIND_MAX: _bindgen_ty_42 = 19; +pub type _bindgen_ty_42 = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_enum { + pub name_off: __u32, + pub val: __s32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_array { + pub type_: __u32, + pub index_type: __u32, + pub nelems: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_member { + pub name_off: __u32, + pub type_: __u32, + pub offset: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_param { + pub name_off: __u32, + pub type_: __u32, +} +pub const BTF_VAR_STATIC: _bindgen_ty_43 = 0; +pub const BTF_VAR_GLOBAL_ALLOCATED: _bindgen_ty_43 = 1; +pub const BTF_VAR_GLOBAL_EXTERN: _bindgen_ty_43 = 2; +pub type _bindgen_ty_43 = ::core::ffi::c_uint; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum btf_func_linkage { + BTF_FUNC_STATIC = 0, + BTF_FUNC_GLOBAL = 1, + BTF_FUNC_EXTERN = 2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_var { + pub linkage: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_var_secinfo { + pub type_: __u32, + pub offset: __u32, + pub size: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_decl_tag { + pub component_idx: __s32, +} +impl nlmsgerr_attrs { + pub const NLMSGERR_ATTR_MAX: nlmsgerr_attrs = nlmsgerr_attrs::NLMSGERR_ATTR_COOKIE; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum nlmsgerr_attrs { + NLMSGERR_ATTR_UNUSED = 0, + NLMSGERR_ATTR_MSG = 1, + NLMSGERR_ATTR_OFFS = 2, + NLMSGERR_ATTR_COOKIE = 3, + __NLMSGERR_ATTR_MAX = 4, +} +pub const IFLA_XDP_UNSPEC: _bindgen_ty_92 = 0; +pub const IFLA_XDP_FD: _bindgen_ty_92 = 1; +pub const IFLA_XDP_ATTACHED: _bindgen_ty_92 = 2; +pub const IFLA_XDP_FLAGS: _bindgen_ty_92 = 3; +pub const IFLA_XDP_PROG_ID: _bindgen_ty_92 = 4; +pub const IFLA_XDP_DRV_PROG_ID: _bindgen_ty_92 = 5; +pub const IFLA_XDP_SKB_PROG_ID: _bindgen_ty_92 = 6; +pub const IFLA_XDP_HW_PROG_ID: _bindgen_ty_92 = 7; +pub const IFLA_XDP_EXPECTED_FD: _bindgen_ty_92 = 8; +pub const __IFLA_XDP_MAX: _bindgen_ty_92 = 9; +pub type _bindgen_ty_92 = ::core::ffi::c_uint; +impl nf_inet_hooks { + pub const NF_INET_INGRESS: nf_inet_hooks = nf_inet_hooks::NF_INET_NUMHOOKS; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum nf_inet_hooks { + NF_INET_PRE_ROUTING = 0, + NF_INET_LOCAL_IN = 1, + NF_INET_FORWARD = 2, + NF_INET_LOCAL_OUT = 3, + NF_INET_POST_ROUTING = 4, + NF_INET_NUMHOOKS = 5, +} +pub const NFPROTO_UNSPEC: _bindgen_ty_99 = 0; +pub const NFPROTO_INET: _bindgen_ty_99 = 1; +pub const NFPROTO_IPV4: _bindgen_ty_99 = 2; +pub const NFPROTO_ARP: _bindgen_ty_99 = 3; +pub const NFPROTO_NETDEV: _bindgen_ty_99 = 5; +pub const NFPROTO_BRIDGE: _bindgen_ty_99 = 7; +pub const NFPROTO_IPV6: _bindgen_ty_99 = 10; +pub const NFPROTO_DECNET: _bindgen_ty_99 = 12; +pub const NFPROTO_NUMPROTO: _bindgen_ty_99 = 13; +pub type _bindgen_ty_99 = ::core::ffi::c_uint; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_type_id { + PERF_TYPE_HARDWARE = 0, + PERF_TYPE_SOFTWARE = 1, + PERF_TYPE_TRACEPOINT = 2, + PERF_TYPE_HW_CACHE = 3, + PERF_TYPE_RAW = 4, + PERF_TYPE_BREAKPOINT = 5, + PERF_TYPE_MAX = 6, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_hw_id { + PERF_COUNT_HW_CPU_CYCLES = 0, + PERF_COUNT_HW_INSTRUCTIONS = 1, + PERF_COUNT_HW_CACHE_REFERENCES = 2, + PERF_COUNT_HW_CACHE_MISSES = 3, + PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 4, + PERF_COUNT_HW_BRANCH_MISSES = 5, + PERF_COUNT_HW_BUS_CYCLES = 6, + PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 7, + PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 8, + PERF_COUNT_HW_REF_CPU_CYCLES = 9, + PERF_COUNT_HW_MAX = 10, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_hw_cache_id { + PERF_COUNT_HW_CACHE_L1D = 0, + PERF_COUNT_HW_CACHE_L1I = 1, + PERF_COUNT_HW_CACHE_LL = 2, + PERF_COUNT_HW_CACHE_DTLB = 3, + PERF_COUNT_HW_CACHE_ITLB = 4, + PERF_COUNT_HW_CACHE_BPU = 5, + PERF_COUNT_HW_CACHE_NODE = 6, + PERF_COUNT_HW_CACHE_MAX = 7, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_hw_cache_op_id { + PERF_COUNT_HW_CACHE_OP_READ = 0, + PERF_COUNT_HW_CACHE_OP_WRITE = 1, + PERF_COUNT_HW_CACHE_OP_PREFETCH = 2, + PERF_COUNT_HW_CACHE_OP_MAX = 3, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_hw_cache_op_result_id { + PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0, + PERF_COUNT_HW_CACHE_RESULT_MISS = 1, + PERF_COUNT_HW_CACHE_RESULT_MAX = 2, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_sw_ids { + PERF_COUNT_SW_CPU_CLOCK = 0, + PERF_COUNT_SW_TASK_CLOCK = 1, + PERF_COUNT_SW_PAGE_FAULTS = 2, + PERF_COUNT_SW_CONTEXT_SWITCHES = 3, + PERF_COUNT_SW_CPU_MIGRATIONS = 4, + PERF_COUNT_SW_PAGE_FAULTS_MIN = 5, + PERF_COUNT_SW_PAGE_FAULTS_MAJ = 6, + PERF_COUNT_SW_ALIGNMENT_FAULTS = 7, + PERF_COUNT_SW_EMULATION_FAULTS = 8, + PERF_COUNT_SW_DUMMY = 9, + PERF_COUNT_SW_BPF_OUTPUT = 10, + PERF_COUNT_SW_CGROUP_SWITCHES = 11, + PERF_COUNT_SW_MAX = 12, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_event_sample_format { + PERF_SAMPLE_IP = 1, + PERF_SAMPLE_TID = 2, + PERF_SAMPLE_TIME = 4, + PERF_SAMPLE_ADDR = 8, + PERF_SAMPLE_READ = 16, + PERF_SAMPLE_CALLCHAIN = 32, + PERF_SAMPLE_ID = 64, + PERF_SAMPLE_CPU = 128, + PERF_SAMPLE_PERIOD = 256, + PERF_SAMPLE_STREAM_ID = 512, + PERF_SAMPLE_RAW = 1024, + PERF_SAMPLE_BRANCH_STACK = 2048, + PERF_SAMPLE_REGS_USER = 4096, + PERF_SAMPLE_STACK_USER = 8192, + PERF_SAMPLE_WEIGHT = 16384, + PERF_SAMPLE_DATA_SRC = 32768, + PERF_SAMPLE_IDENTIFIER = 65536, + PERF_SAMPLE_TRANSACTION = 131072, + PERF_SAMPLE_REGS_INTR = 262144, + PERF_SAMPLE_PHYS_ADDR = 524288, + PERF_SAMPLE_AUX = 1048576, + PERF_SAMPLE_CGROUP = 2097152, + PERF_SAMPLE_DATA_PAGE_SIZE = 4194304, + PERF_SAMPLE_CODE_PAGE_SIZE = 8388608, + PERF_SAMPLE_WEIGHT_STRUCT = 16777216, + PERF_SAMPLE_MAX = 33554432, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct perf_event_attr { + pub type_: __u32, + pub size: __u32, + pub config: __u64, + pub __bindgen_anon_1: perf_event_attr__bindgen_ty_1, + pub sample_type: __u64, + pub read_format: __u64, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, + pub __bindgen_anon_2: perf_event_attr__bindgen_ty_2, + pub bp_type: __u32, + pub __bindgen_anon_3: perf_event_attr__bindgen_ty_3, + pub __bindgen_anon_4: perf_event_attr__bindgen_ty_4, + pub branch_sample_type: __u64, + pub sample_regs_user: __u64, + pub sample_stack_user: __u32, + pub clockid: __s32, + pub sample_regs_intr: __u64, + pub aux_watermark: __u32, + pub sample_max_stack: __u16, + pub __reserved_2: __u16, + pub aux_sample_size: __u32, + pub __reserved_3: __u32, + pub sig_data: __u64, + pub config3: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_attr__bindgen_ty_1 { + pub sample_period: __u64, + pub sample_freq: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_attr__bindgen_ty_2 { + pub wakeup_events: __u32, + pub wakeup_watermark: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_attr__bindgen_ty_3 { + pub bp_addr: __u64, + pub kprobe_func: __u64, + pub uprobe_path: __u64, + pub config1: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_attr__bindgen_ty_4 { + pub bp_len: __u64, + pub kprobe_addr: __u64, + pub probe_offset: __u64, + pub config2: __u64, +} +impl perf_event_attr { + #[inline] + pub fn disabled(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_disabled(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn disabled_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_disabled_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn inherit(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } + } + #[inline] + pub fn set_inherit(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn inherit_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn pinned(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } + } + #[inline] + pub fn set_pinned(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pinned_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_pinned_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclusive(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclusive(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclusive_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclusive_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_user(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_user(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_kernel(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_kernel(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_hv(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_hv(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_hv_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_hv_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_idle(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_idle(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_idle_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_idle_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mmap(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } + } + #[inline] + pub fn set_mmap(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mmap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn comm(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } + } + #[inline] + pub fn set_comm(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn comm_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn freq(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } + } + #[inline] + pub fn set_freq(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn freq_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_freq_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn inherit_stat(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } + } + #[inline] + pub fn set_inherit_stat(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn inherit_stat_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_stat_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_on_exec(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } + } + #[inline] + pub fn set_enable_on_exec(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_enable_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn task(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) } + } + #[inline] + pub fn set_task(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn task_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_task_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn watermark(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) } + } + #[inline] + pub fn set_watermark(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn watermark_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_watermark_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn precise_ip(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 2u8) as u64) } + } + #[inline] + pub fn set_precise_ip(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(15usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn precise_ip_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 2u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_precise_ip_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn mmap_data(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } + } + #[inline] + pub fn set_mmap_data(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mmap_data_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_data_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn sample_id_all(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } + } + #[inline] + pub fn set_sample_id_all(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(18usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn sample_id_all_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sample_id_all_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_host(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_host(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(19usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_host_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_host_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_guest(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_guest(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(20usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_guest_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_guest_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_callchain_kernel(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_callchain_kernel(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(21usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_callchain_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 21usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 21usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_callchain_user(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_callchain_user(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(22usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_callchain_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 22usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 22usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mmap2(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) } + } + #[inline] + pub fn set_mmap2(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(23usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mmap2_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 23usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap2_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 23usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn comm_exec(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) } + } + #[inline] + pub fn set_comm_exec(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(24usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn comm_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 24usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 24usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn use_clockid(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) } + } + #[inline] + pub fn set_use_clockid(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(25usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn use_clockid_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 25usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_use_clockid_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 25usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn context_switch(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) } + } + #[inline] + pub fn set_context_switch(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(26usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn context_switch_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 26usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_context_switch_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 26usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn write_backward(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) } + } + #[inline] + pub fn set_write_backward(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(27usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn write_backward_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 27usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_write_backward_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 27usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn namespaces(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) } + } + #[inline] + pub fn set_namespaces(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(28usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn namespaces_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 28usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_namespaces_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 28usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn ksymbol(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) } + } + #[inline] + pub fn set_ksymbol(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(29usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn ksymbol_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 29usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_ksymbol_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 29usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn bpf_event(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u64) } + } + #[inline] + pub fn set_bpf_event(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(30usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn bpf_event_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 30usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_bpf_event_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 30usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn aux_output(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u64) } + } + #[inline] + pub fn set_aux_output(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(31usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn aux_output_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_aux_output_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cgroup(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } + } + #[inline] + pub fn set_cgroup(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(32usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cgroup_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cgroup_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn text_poke(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) } + } + #[inline] + pub fn set_text_poke(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(33usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn text_poke_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 33usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_text_poke_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 33usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn build_id(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) } + } + #[inline] + pub fn set_build_id(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(34usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn build_id_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 34usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_build_id_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 34usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn inherit_thread(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) } + } + #[inline] + pub fn set_inherit_thread(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(35usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn inherit_thread_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 35usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_thread_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 35usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn remove_on_exec(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) } + } + #[inline] + pub fn set_remove_on_exec(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(36usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn remove_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 36usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_remove_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 36usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn sigtrap(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } + } + #[inline] + pub fn set_sigtrap(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(37usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn sigtrap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 37usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sigtrap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 37usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn __reserved_1(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) } + } + #[inline] + pub fn set___reserved_1(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(38usize, 26u8, val as u64) + } + } + #[inline] + pub unsafe fn __reserved_1_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 38usize, + 26u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set___reserved_1_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 38usize, + 26u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + disabled: __u64, + inherit: __u64, + pinned: __u64, + exclusive: __u64, + exclude_user: __u64, + exclude_kernel: __u64, + exclude_hv: __u64, + exclude_idle: __u64, + mmap: __u64, + comm: __u64, + freq: __u64, + inherit_stat: __u64, + enable_on_exec: __u64, + task: __u64, + watermark: __u64, + precise_ip: __u64, + mmap_data: __u64, + sample_id_all: __u64, + exclude_host: __u64, + exclude_guest: __u64, + exclude_callchain_kernel: __u64, + exclude_callchain_user: __u64, + mmap2: __u64, + comm_exec: __u64, + use_clockid: __u64, + context_switch: __u64, + write_backward: __u64, + namespaces: __u64, + ksymbol: __u64, + bpf_event: __u64, + aux_output: __u64, + cgroup: __u64, + text_poke: __u64, + build_id: __u64, + inherit_thread: __u64, + remove_on_exec: __u64, + sigtrap: __u64, + __reserved_1: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let disabled: u64 = unsafe { ::core::mem::transmute(disabled) }; + disabled as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let inherit: u64 = unsafe { ::core::mem::transmute(inherit) }; + inherit as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let pinned: u64 = unsafe { ::core::mem::transmute(pinned) }; + pinned as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let exclusive: u64 = unsafe { ::core::mem::transmute(exclusive) }; + exclusive as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let exclude_user: u64 = unsafe { ::core::mem::transmute(exclude_user) }; + exclude_user as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let exclude_kernel: u64 = unsafe { ::core::mem::transmute(exclude_kernel) }; + exclude_kernel as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let exclude_hv: u64 = unsafe { ::core::mem::transmute(exclude_hv) }; + exclude_hv as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let exclude_idle: u64 = unsafe { ::core::mem::transmute(exclude_idle) }; + exclude_idle as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let mmap: u64 = unsafe { ::core::mem::transmute(mmap) }; + mmap as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let comm: u64 = unsafe { ::core::mem::transmute(comm) }; + comm as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let freq: u64 = unsafe { ::core::mem::transmute(freq) }; + freq as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let inherit_stat: u64 = unsafe { ::core::mem::transmute(inherit_stat) }; + inherit_stat as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let enable_on_exec: u64 = unsafe { ::core::mem::transmute(enable_on_exec) }; + enable_on_exec as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let task: u64 = unsafe { ::core::mem::transmute(task) }; + task as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let watermark: u64 = unsafe { ::core::mem::transmute(watermark) }; + watermark as u64 + }); + __bindgen_bitfield_unit.set(15usize, 2u8, { + let precise_ip: u64 = unsafe { ::core::mem::transmute(precise_ip) }; + precise_ip as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let mmap_data: u64 = unsafe { ::core::mem::transmute(mmap_data) }; + mmap_data as u64 + }); + __bindgen_bitfield_unit.set(18usize, 1u8, { + let sample_id_all: u64 = unsafe { ::core::mem::transmute(sample_id_all) }; + sample_id_all as u64 + }); + __bindgen_bitfield_unit.set(19usize, 1u8, { + let exclude_host: u64 = unsafe { ::core::mem::transmute(exclude_host) }; + exclude_host as u64 + }); + __bindgen_bitfield_unit.set(20usize, 1u8, { + let exclude_guest: u64 = unsafe { ::core::mem::transmute(exclude_guest) }; + exclude_guest as u64 + }); + __bindgen_bitfield_unit.set(21usize, 1u8, { + let exclude_callchain_kernel: u64 = + unsafe { ::core::mem::transmute(exclude_callchain_kernel) }; + exclude_callchain_kernel as u64 + }); + __bindgen_bitfield_unit.set(22usize, 1u8, { + let exclude_callchain_user: u64 = + unsafe { ::core::mem::transmute(exclude_callchain_user) }; + exclude_callchain_user as u64 + }); + __bindgen_bitfield_unit.set(23usize, 1u8, { + let mmap2: u64 = unsafe { ::core::mem::transmute(mmap2) }; + mmap2 as u64 + }); + __bindgen_bitfield_unit.set(24usize, 1u8, { + let comm_exec: u64 = unsafe { ::core::mem::transmute(comm_exec) }; + comm_exec as u64 + }); + __bindgen_bitfield_unit.set(25usize, 1u8, { + let use_clockid: u64 = unsafe { ::core::mem::transmute(use_clockid) }; + use_clockid as u64 + }); + __bindgen_bitfield_unit.set(26usize, 1u8, { + let context_switch: u64 = unsafe { ::core::mem::transmute(context_switch) }; + context_switch as u64 + }); + __bindgen_bitfield_unit.set(27usize, 1u8, { + let write_backward: u64 = unsafe { ::core::mem::transmute(write_backward) }; + write_backward as u64 + }); + __bindgen_bitfield_unit.set(28usize, 1u8, { + let namespaces: u64 = unsafe { ::core::mem::transmute(namespaces) }; + namespaces as u64 + }); + __bindgen_bitfield_unit.set(29usize, 1u8, { + let ksymbol: u64 = unsafe { ::core::mem::transmute(ksymbol) }; + ksymbol as u64 + }); + __bindgen_bitfield_unit.set(30usize, 1u8, { + let bpf_event: u64 = unsafe { ::core::mem::transmute(bpf_event) }; + bpf_event as u64 + }); + __bindgen_bitfield_unit.set(31usize, 1u8, { + let aux_output: u64 = unsafe { ::core::mem::transmute(aux_output) }; + aux_output as u64 + }); + __bindgen_bitfield_unit.set(32usize, 1u8, { + let cgroup: u64 = unsafe { ::core::mem::transmute(cgroup) }; + cgroup as u64 + }); + __bindgen_bitfield_unit.set(33usize, 1u8, { + let text_poke: u64 = unsafe { ::core::mem::transmute(text_poke) }; + text_poke as u64 + }); + __bindgen_bitfield_unit.set(34usize, 1u8, { + let build_id: u64 = unsafe { ::core::mem::transmute(build_id) }; + build_id as u64 + }); + __bindgen_bitfield_unit.set(35usize, 1u8, { + let inherit_thread: u64 = unsafe { ::core::mem::transmute(inherit_thread) }; + inherit_thread as u64 + }); + __bindgen_bitfield_unit.set(36usize, 1u8, { + let remove_on_exec: u64 = unsafe { ::core::mem::transmute(remove_on_exec) }; + remove_on_exec as u64 + }); + __bindgen_bitfield_unit.set(37usize, 1u8, { + let sigtrap: u64 = unsafe { ::core::mem::transmute(sigtrap) }; + sigtrap as u64 + }); + __bindgen_bitfield_unit.set(38usize, 26u8, { + let __reserved_1: u64 = unsafe { ::core::mem::transmute(__reserved_1) }; + __reserved_1 as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct perf_event_mmap_page { + pub version: __u32, + pub compat_version: __u32, + pub lock: __u32, + pub index: __u32, + pub offset: __s64, + pub time_enabled: __u64, + pub time_running: __u64, + pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1, + pub pmc_width: __u16, + pub time_shift: __u16, + pub time_mult: __u32, + pub time_offset: __u64, + pub time_zero: __u64, + pub size: __u32, + pub __reserved_1: __u32, + pub time_cycles: __u64, + pub time_mask: __u64, + pub __reserved: [__u8; 928usize], + pub data_head: __u64, + pub data_tail: __u64, + pub data_offset: __u64, + pub data_size: __u64, + pub aux_head: __u64, + pub aux_tail: __u64, + pub aux_offset: __u64, + pub aux_size: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_mmap_page__bindgen_ty_1 { + pub capabilities: __u64, + pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u64; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn cap_bit0(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_bit0(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_bit0_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_bit0_is_deprecated(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_bit0_is_deprecated(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_bit0_is_deprecated_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_is_deprecated_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_user_rdpmc(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_user_rdpmc(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_user_rdpmc_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_rdpmc_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_user_time(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_user_time(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_user_time_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_user_time_zero(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_user_time_zero(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_user_time_zero_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_zero_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_user_time_short(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_user_time_short(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_user_time_short_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_short_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_____res(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) } + } + #[inline] + pub fn set_cap_____res(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(6usize, 58u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_____res_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 58u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_____res_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 58u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + cap_bit0: __u64, + cap_bit0_is_deprecated: __u64, + cap_user_rdpmc: __u64, + cap_user_time: __u64, + cap_user_time_zero: __u64, + cap_user_time_short: __u64, + cap_____res: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let cap_bit0: u64 = unsafe { ::core::mem::transmute(cap_bit0) }; + cap_bit0 as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let cap_bit0_is_deprecated: u64 = + unsafe { ::core::mem::transmute(cap_bit0_is_deprecated) }; + cap_bit0_is_deprecated as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let cap_user_rdpmc: u64 = unsafe { ::core::mem::transmute(cap_user_rdpmc) }; + cap_user_rdpmc as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let cap_user_time: u64 = unsafe { ::core::mem::transmute(cap_user_time) }; + cap_user_time as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let cap_user_time_zero: u64 = unsafe { ::core::mem::transmute(cap_user_time_zero) }; + cap_user_time_zero as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let cap_user_time_short: u64 = unsafe { ::core::mem::transmute(cap_user_time_short) }; + cap_user_time_short as u64 + }); + __bindgen_bitfield_unit.set(6usize, 58u8, { + let cap_____res: u64 = unsafe { ::core::mem::transmute(cap_____res) }; + cap_____res as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct perf_event_header { + pub type_: __u32, + pub misc: __u16, + pub size: __u16, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_event_type { + PERF_RECORD_MMAP = 1, + PERF_RECORD_LOST = 2, + PERF_RECORD_COMM = 3, + PERF_RECORD_EXIT = 4, + PERF_RECORD_THROTTLE = 5, + PERF_RECORD_UNTHROTTLE = 6, + PERF_RECORD_FORK = 7, + PERF_RECORD_READ = 8, + PERF_RECORD_SAMPLE = 9, + PERF_RECORD_MMAP2 = 10, + PERF_RECORD_AUX = 11, + PERF_RECORD_ITRACE_START = 12, + PERF_RECORD_LOST_SAMPLES = 13, + PERF_RECORD_SWITCH = 14, + PERF_RECORD_SWITCH_CPU_WIDE = 15, + PERF_RECORD_NAMESPACES = 16, + PERF_RECORD_KSYMBOL = 17, + PERF_RECORD_BPF_EVENT = 18, + PERF_RECORD_CGROUP = 19, + PERF_RECORD_TEXT_POKE = 20, + PERF_RECORD_AUX_OUTPUT_HW_ID = 21, + PERF_RECORD_MAX = 22, +} +pub const TCA_BPF_UNSPEC: _bindgen_ty_154 = 0; +pub const TCA_BPF_ACT: _bindgen_ty_154 = 1; +pub const TCA_BPF_POLICE: _bindgen_ty_154 = 2; +pub const TCA_BPF_CLASSID: _bindgen_ty_154 = 3; +pub const TCA_BPF_OPS_LEN: _bindgen_ty_154 = 4; +pub const TCA_BPF_OPS: _bindgen_ty_154 = 5; +pub const TCA_BPF_FD: _bindgen_ty_154 = 6; +pub const TCA_BPF_NAME: _bindgen_ty_154 = 7; +pub const TCA_BPF_FLAGS: _bindgen_ty_154 = 8; +pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_154 = 9; +pub const TCA_BPF_TAG: _bindgen_ty_154 = 10; +pub const TCA_BPF_ID: _bindgen_ty_154 = 11; +pub const __TCA_BPF_MAX: _bindgen_ty_154 = 12; +pub type _bindgen_ty_154 = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ifinfomsg { + pub ifi_family: ::core::ffi::c_uchar, + pub __ifi_pad: ::core::ffi::c_uchar, + pub ifi_type: ::core::ffi::c_ushort, + pub ifi_index: ::core::ffi::c_int, + pub ifi_flags: ::core::ffi::c_uint, + pub ifi_change: ::core::ffi::c_uint, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcmsg { + pub tcm_family: ::core::ffi::c_uchar, + pub tcm__pad1: ::core::ffi::c_uchar, + pub tcm__pad2: ::core::ffi::c_ushort, + pub tcm_ifindex: ::core::ffi::c_int, + pub tcm_handle: __u32, + pub tcm_parent: __u32, + pub tcm_info: __u32, +} +pub const TCA_UNSPEC: _bindgen_ty_174 = 0; +pub const TCA_KIND: _bindgen_ty_174 = 1; +pub const TCA_OPTIONS: _bindgen_ty_174 = 2; +pub const TCA_STATS: _bindgen_ty_174 = 3; +pub const TCA_XSTATS: _bindgen_ty_174 = 4; +pub const TCA_RATE: _bindgen_ty_174 = 5; +pub const TCA_FCNT: _bindgen_ty_174 = 6; +pub const TCA_STATS2: _bindgen_ty_174 = 7; +pub const TCA_STAB: _bindgen_ty_174 = 8; +pub const TCA_PAD: _bindgen_ty_174 = 9; +pub const TCA_DUMP_INVISIBLE: _bindgen_ty_174 = 10; +pub const TCA_CHAIN: _bindgen_ty_174 = 11; +pub const TCA_HW_OFFLOAD: _bindgen_ty_174 = 12; +pub const TCA_INGRESS_BLOCK: _bindgen_ty_174 = 13; +pub const TCA_EGRESS_BLOCK: _bindgen_ty_174 = 14; +pub const TCA_DUMP_FLAGS: _bindgen_ty_174 = 15; +pub const TCA_EXT_WARN_MSG: _bindgen_ty_174 = 16; +pub const __TCA_MAX: _bindgen_ty_174 = 17; +pub type _bindgen_ty_174 = ::core::ffi::c_uint; diff --git a/aya-obj/src/generated/linux_bindings_riscv64.rs b/aya-obj/src/generated/linux_bindings_riscv64.rs index 95b7e0d8..b76ed850 100644 --- a/aya-obj/src/generated/linux_bindings_riscv64.rs +++ b/aya-obj/src/generated/linux_bindings_riscv64.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.69.4 */ +/* automatically generated by rust-bindgen 0.72.1 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] @@ -16,10 +16,7 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -29,21 +26,46 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; - if val { - *byte |= mask; - } else { - *byte &= !mask; - } + if val { byte | mask } else { byte & !mask } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -64,6 +86,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -79,6 +119,22 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } } #[repr(C)] #[derive(Default)] @@ -110,21 +166,68 @@ impl ::core::fmt::Debug for __IncompleteArrayField { fmt.write_str("__IncompleteArrayField") } } -pub const SO_ATTACH_BPF: u32 = 50; -pub const SO_DETACH_BPF: u32 = 27; pub const BPF_LD: u32 = 0; pub const BPF_LDX: u32 = 1; pub const BPF_ST: u32 = 2; pub const BPF_STX: u32 = 3; pub const BPF_ALU: u32 = 4; pub const BPF_JMP: u32 = 5; +pub const BPF_RET: u32 = 6; +pub const BPF_MISC: u32 = 7; pub const BPF_W: u32 = 0; pub const BPF_H: u32 = 8; pub const BPF_B: u32 = 16; +pub const BPF_IMM: u32 = 0; +pub const BPF_ABS: u32 = 32; +pub const BPF_IND: u32 = 64; +pub const BPF_MEM: u32 = 96; +pub const BPF_LEN: u32 = 128; +pub const BPF_MSH: u32 = 160; +pub const BPF_ADD: u32 = 0; +pub const BPF_SUB: u32 = 16; +pub const BPF_MUL: u32 = 32; +pub const BPF_DIV: u32 = 48; +pub const BPF_OR: u32 = 64; +pub const BPF_AND: u32 = 80; +pub const BPF_LSH: u32 = 96; +pub const BPF_RSH: u32 = 112; +pub const BPF_NEG: u32 = 128; +pub const BPF_MOD: u32 = 144; +pub const BPF_XOR: u32 = 160; +pub const BPF_JA: u32 = 0; +pub const BPF_JEQ: u32 = 16; +pub const BPF_JGT: u32 = 32; +pub const BPF_JGE: u32 = 48; +pub const BPF_JSET: u32 = 64; pub const BPF_K: u32 = 0; +pub const BPF_X: u32 = 8; +pub const BPF_MAXINSNS: u32 = 4096; +pub const BPF_JMP32: u32 = 6; pub const BPF_ALU64: u32 = 7; pub const BPF_DW: u32 = 24; +pub const BPF_MEMSX: u32 = 128; +pub const BPF_ATOMIC: u32 = 192; +pub const BPF_XADD: u32 = 192; +pub const BPF_MOV: u32 = 176; +pub const BPF_ARSH: u32 = 192; +pub const BPF_END: u32 = 208; +pub const BPF_TO_LE: u32 = 0; +pub const BPF_TO_BE: u32 = 8; +pub const BPF_FROM_LE: u32 = 0; +pub const BPF_FROM_BE: u32 = 8; +pub const BPF_JNE: u32 = 80; +pub const BPF_JLT: u32 = 160; +pub const BPF_JLE: u32 = 176; +pub const BPF_JSGT: u32 = 96; +pub const BPF_JSGE: u32 = 112; +pub const BPF_JSLT: u32 = 192; +pub const BPF_JSLE: u32 = 208; +pub const BPF_JCOND: u32 = 224; pub const BPF_CALL: u32 = 128; +pub const BPF_EXIT: u32 = 144; +pub const BPF_FETCH: u32 = 1; +pub const BPF_XCHG: u32 = 225; +pub const BPF_CMPXCHG: u32 = 241; pub const BPF_F_ALLOW_OVERRIDE: u32 = 1; pub const BPF_F_ALLOW_MULTI: u32 = 2; pub const BPF_F_REPLACE: u32 = 4; @@ -151,6 +254,9 @@ pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2; pub const BPF_F_QUERY_EFFECTIVE: u32 = 1; pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1; pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2; +pub const BPF_BUILD_ID_SIZE: u32 = 20; +pub const BPF_OBJ_NAME_LEN: u32 = 16; +pub const BPF_TAG_SIZE: u32 = 8; pub const BTF_INT_SIGNED: u32 = 1; pub const BTF_INT_CHAR: u32 = 2; pub const BTF_INT_BOOL: u32 = 4; @@ -162,6 +268,18 @@ pub const XDP_FLAGS_HW_MODE: u32 = 8; pub const XDP_FLAGS_REPLACE: u32 = 16; pub const XDP_FLAGS_MODES: u32 = 14; pub const XDP_FLAGS_MASK: u32 = 31; +pub const PERF_EVENT_IOC_ENABLE: u32 = 9216; +pub const PERF_EVENT_IOC_DISABLE: u32 = 9217; +pub const PERF_EVENT_IOC_REFRESH: u32 = 9218; +pub const PERF_EVENT_IOC_RESET: u32 = 9219; +pub const PERF_EVENT_IOC_PERIOD: u32 = 1074275332; +pub const PERF_EVENT_IOC_SET_OUTPUT: u32 = 9221; +pub const PERF_EVENT_IOC_SET_FILTER: u32 = 1074275334; +pub const PERF_EVENT_IOC_ID: u32 = 2148017159; +pub const PERF_EVENT_IOC_SET_BPF: u32 = 1074013192; +pub const PERF_EVENT_IOC_PAUSE_OUTPUT: u32 = 1074013193; +pub const PERF_EVENT_IOC_QUERY_BPF: u32 = 3221758986; +pub const PERF_EVENT_IOC_MODIFY_ATTRIBUTES: u32 = 1074275339; pub const PERF_MAX_STACK_DEPTH: u32 = 127; pub const PERF_MAX_CONTEXTS_PER_STACK: u32 = 8; pub const PERF_FLAG_FD_NO_GROUP: u32 = 1; @@ -178,6 +296,8 @@ pub const TC_H_MIN_PRIORITY: u32 = 65504; pub const TC_H_MIN_INGRESS: u32 = 65522; pub const TC_H_MIN_EGRESS: u32 = 65523; pub const TCA_BPF_FLAG_ACT_DIRECT: u32 = 1; +pub const SO_ATTACH_BPF: u32 = 50; +pub const SO_DETACH_BPF: u32 = 27; pub type __u8 = ::core::ffi::c_uchar; pub type __s16 = ::core::ffi::c_short; pub type __u16 = ::core::ffi::c_ushort; @@ -185,6 +305,34 @@ pub type __s32 = ::core::ffi::c_int; pub type __u32 = ::core::ffi::c_uint; pub type __s64 = ::core::ffi::c_longlong; pub type __u64 = ::core::ffi::c_ulonglong; +pub const BPF_REG_0: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_0; +pub const BPF_REG_1: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_1; +pub const BPF_REG_2: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_2; +pub const BPF_REG_3: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_3; +pub const BPF_REG_4: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_4; +pub const BPF_REG_5: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_5; +pub const BPF_REG_6: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_6; +pub const BPF_REG_7: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_7; +pub const BPF_REG_8: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_8; +pub const BPF_REG_9: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_9; +pub const BPF_REG_10: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_10; +pub const __MAX_BPF_REG: _bindgen_ty_1 = _bindgen_ty_1::__MAX_BPF_REG; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { + BPF_REG_0 = 0, + BPF_REG_1 = 1, + BPF_REG_2 = 2, + BPF_REG_3 = 3, + BPF_REG_4 = 4, + BPF_REG_5 = 5, + BPF_REG_6 = 6, + BPF_REG_7 = 7, + BPF_REG_8 = 8, + BPF_REG_9 = 9, + BPF_REG_10 = 10, + __MAX_BPF_REG = 11, +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bpf_insn { @@ -207,6 +355,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn src_reg(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -218,6 +388,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -237,6 +429,15 @@ pub struct bpf_lpm_trie_key { pub prefixlen: __u32, pub data: __IncompleteArrayField<__u8>, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_cgroup_iter_order { + BPF_CGROUP_ITER_ORDER_UNSPEC = 0, + BPF_CGROUP_ITER_SELF_ONLY = 1, + BPF_CGROUP_ITER_DESCENDANTS_PRE = 2, + BPF_CGROUP_ITER_DESCENDANTS_POST = 3, + BPF_CGROUP_ITER_ANCESTORS_UP = 4, +} impl bpf_cmd { pub const BPF_PROG_RUN: bpf_cmd = bpf_cmd::BPF_PROG_TEST_RUN; } @@ -447,6 +648,17 @@ pub enum bpf_link_type { BPF_LINK_TYPE_NETKIT = 13, __MAX_BPF_LINK_TYPE = 14, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_perf_event_type { + BPF_PERF_EVENT_UNSPEC = 0, + BPF_PERF_EVENT_UPROBE = 1, + BPF_PERF_EVENT_URETPROBE = 2, + BPF_PERF_EVENT_KPROBE = 3, + BPF_PERF_EVENT_KRETPROBE = 4, + BPF_PERF_EVENT_TRACEPOINT = 5, + BPF_PERF_EVENT_EVENT = 6, +} pub const BPF_F_KPROBE_MULTI_RETURN: _bindgen_ty_2 = 1; pub type _bindgen_ty_2 = ::core::ffi::c_uint; pub const BPF_F_UPROBE_MULTI_RETURN: _bindgen_ty_3 = 1; @@ -476,6 +688,11 @@ pub const BPF_F_TOKEN_FD: _bindgen_ty_5 = 65536; pub const BPF_F_SEGV_ON_FAULT: _bindgen_ty_5 = 131072; pub const BPF_F_NO_USER_CONV: _bindgen_ty_5 = 262144; pub type _bindgen_ty_5 = ::core::ffi::c_uint; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_stats_type { + BPF_STATS_RUN_TIME = 0, +} #[repr(C)] #[derive(Copy, Clone)] pub union bpf_attr { @@ -884,6 +1101,223 @@ pub struct bpf_attr__bindgen_ty_20 { pub flags: __u32, pub bpffs_fd: __u32, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_func_id { + BPF_FUNC_unspec = 0, + BPF_FUNC_map_lookup_elem = 1, + BPF_FUNC_map_update_elem = 2, + BPF_FUNC_map_delete_elem = 3, + BPF_FUNC_probe_read = 4, + BPF_FUNC_ktime_get_ns = 5, + BPF_FUNC_trace_printk = 6, + BPF_FUNC_get_prandom_u32 = 7, + BPF_FUNC_get_smp_processor_id = 8, + BPF_FUNC_skb_store_bytes = 9, + BPF_FUNC_l3_csum_replace = 10, + BPF_FUNC_l4_csum_replace = 11, + BPF_FUNC_tail_call = 12, + BPF_FUNC_clone_redirect = 13, + BPF_FUNC_get_current_pid_tgid = 14, + BPF_FUNC_get_current_uid_gid = 15, + BPF_FUNC_get_current_comm = 16, + BPF_FUNC_get_cgroup_classid = 17, + BPF_FUNC_skb_vlan_push = 18, + BPF_FUNC_skb_vlan_pop = 19, + BPF_FUNC_skb_get_tunnel_key = 20, + BPF_FUNC_skb_set_tunnel_key = 21, + BPF_FUNC_perf_event_read = 22, + BPF_FUNC_redirect = 23, + BPF_FUNC_get_route_realm = 24, + BPF_FUNC_perf_event_output = 25, + BPF_FUNC_skb_load_bytes = 26, + BPF_FUNC_get_stackid = 27, + BPF_FUNC_csum_diff = 28, + BPF_FUNC_skb_get_tunnel_opt = 29, + BPF_FUNC_skb_set_tunnel_opt = 30, + BPF_FUNC_skb_change_proto = 31, + BPF_FUNC_skb_change_type = 32, + BPF_FUNC_skb_under_cgroup = 33, + BPF_FUNC_get_hash_recalc = 34, + BPF_FUNC_get_current_task = 35, + BPF_FUNC_probe_write_user = 36, + BPF_FUNC_current_task_under_cgroup = 37, + BPF_FUNC_skb_change_tail = 38, + BPF_FUNC_skb_pull_data = 39, + BPF_FUNC_csum_update = 40, + BPF_FUNC_set_hash_invalid = 41, + BPF_FUNC_get_numa_node_id = 42, + BPF_FUNC_skb_change_head = 43, + BPF_FUNC_xdp_adjust_head = 44, + BPF_FUNC_probe_read_str = 45, + BPF_FUNC_get_socket_cookie = 46, + BPF_FUNC_get_socket_uid = 47, + BPF_FUNC_set_hash = 48, + BPF_FUNC_setsockopt = 49, + BPF_FUNC_skb_adjust_room = 50, + BPF_FUNC_redirect_map = 51, + BPF_FUNC_sk_redirect_map = 52, + BPF_FUNC_sock_map_update = 53, + BPF_FUNC_xdp_adjust_meta = 54, + BPF_FUNC_perf_event_read_value = 55, + BPF_FUNC_perf_prog_read_value = 56, + BPF_FUNC_getsockopt = 57, + BPF_FUNC_override_return = 58, + BPF_FUNC_sock_ops_cb_flags_set = 59, + BPF_FUNC_msg_redirect_map = 60, + BPF_FUNC_msg_apply_bytes = 61, + BPF_FUNC_msg_cork_bytes = 62, + BPF_FUNC_msg_pull_data = 63, + BPF_FUNC_bind = 64, + BPF_FUNC_xdp_adjust_tail = 65, + BPF_FUNC_skb_get_xfrm_state = 66, + BPF_FUNC_get_stack = 67, + BPF_FUNC_skb_load_bytes_relative = 68, + BPF_FUNC_fib_lookup = 69, + BPF_FUNC_sock_hash_update = 70, + BPF_FUNC_msg_redirect_hash = 71, + BPF_FUNC_sk_redirect_hash = 72, + BPF_FUNC_lwt_push_encap = 73, + BPF_FUNC_lwt_seg6_store_bytes = 74, + BPF_FUNC_lwt_seg6_adjust_srh = 75, + BPF_FUNC_lwt_seg6_action = 76, + BPF_FUNC_rc_repeat = 77, + BPF_FUNC_rc_keydown = 78, + BPF_FUNC_skb_cgroup_id = 79, + BPF_FUNC_get_current_cgroup_id = 80, + BPF_FUNC_get_local_storage = 81, + BPF_FUNC_sk_select_reuseport = 82, + BPF_FUNC_skb_ancestor_cgroup_id = 83, + BPF_FUNC_sk_lookup_tcp = 84, + BPF_FUNC_sk_lookup_udp = 85, + BPF_FUNC_sk_release = 86, + BPF_FUNC_map_push_elem = 87, + BPF_FUNC_map_pop_elem = 88, + BPF_FUNC_map_peek_elem = 89, + BPF_FUNC_msg_push_data = 90, + BPF_FUNC_msg_pop_data = 91, + BPF_FUNC_rc_pointer_rel = 92, + BPF_FUNC_spin_lock = 93, + BPF_FUNC_spin_unlock = 94, + BPF_FUNC_sk_fullsock = 95, + BPF_FUNC_tcp_sock = 96, + BPF_FUNC_skb_ecn_set_ce = 97, + BPF_FUNC_get_listener_sock = 98, + BPF_FUNC_skc_lookup_tcp = 99, + BPF_FUNC_tcp_check_syncookie = 100, + BPF_FUNC_sysctl_get_name = 101, + BPF_FUNC_sysctl_get_current_value = 102, + BPF_FUNC_sysctl_get_new_value = 103, + BPF_FUNC_sysctl_set_new_value = 104, + BPF_FUNC_strtol = 105, + BPF_FUNC_strtoul = 106, + BPF_FUNC_sk_storage_get = 107, + BPF_FUNC_sk_storage_delete = 108, + BPF_FUNC_send_signal = 109, + BPF_FUNC_tcp_gen_syncookie = 110, + BPF_FUNC_skb_output = 111, + BPF_FUNC_probe_read_user = 112, + BPF_FUNC_probe_read_kernel = 113, + BPF_FUNC_probe_read_user_str = 114, + BPF_FUNC_probe_read_kernel_str = 115, + BPF_FUNC_tcp_send_ack = 116, + BPF_FUNC_send_signal_thread = 117, + BPF_FUNC_jiffies64 = 118, + BPF_FUNC_read_branch_records = 119, + BPF_FUNC_get_ns_current_pid_tgid = 120, + BPF_FUNC_xdp_output = 121, + BPF_FUNC_get_netns_cookie = 122, + BPF_FUNC_get_current_ancestor_cgroup_id = 123, + BPF_FUNC_sk_assign = 124, + BPF_FUNC_ktime_get_boot_ns = 125, + BPF_FUNC_seq_printf = 126, + BPF_FUNC_seq_write = 127, + BPF_FUNC_sk_cgroup_id = 128, + BPF_FUNC_sk_ancestor_cgroup_id = 129, + BPF_FUNC_ringbuf_output = 130, + BPF_FUNC_ringbuf_reserve = 131, + BPF_FUNC_ringbuf_submit = 132, + BPF_FUNC_ringbuf_discard = 133, + BPF_FUNC_ringbuf_query = 134, + BPF_FUNC_csum_level = 135, + BPF_FUNC_skc_to_tcp6_sock = 136, + BPF_FUNC_skc_to_tcp_sock = 137, + BPF_FUNC_skc_to_tcp_timewait_sock = 138, + BPF_FUNC_skc_to_tcp_request_sock = 139, + BPF_FUNC_skc_to_udp6_sock = 140, + BPF_FUNC_get_task_stack = 141, + BPF_FUNC_load_hdr_opt = 142, + BPF_FUNC_store_hdr_opt = 143, + BPF_FUNC_reserve_hdr_opt = 144, + BPF_FUNC_inode_storage_get = 145, + BPF_FUNC_inode_storage_delete = 146, + BPF_FUNC_d_path = 147, + BPF_FUNC_copy_from_user = 148, + BPF_FUNC_snprintf_btf = 149, + BPF_FUNC_seq_printf_btf = 150, + BPF_FUNC_skb_cgroup_classid = 151, + BPF_FUNC_redirect_neigh = 152, + BPF_FUNC_per_cpu_ptr = 153, + BPF_FUNC_this_cpu_ptr = 154, + BPF_FUNC_redirect_peer = 155, + BPF_FUNC_task_storage_get = 156, + BPF_FUNC_task_storage_delete = 157, + BPF_FUNC_get_current_task_btf = 158, + BPF_FUNC_bprm_opts_set = 159, + BPF_FUNC_ktime_get_coarse_ns = 160, + BPF_FUNC_ima_inode_hash = 161, + BPF_FUNC_sock_from_file = 162, + BPF_FUNC_check_mtu = 163, + BPF_FUNC_for_each_map_elem = 164, + BPF_FUNC_snprintf = 165, + BPF_FUNC_sys_bpf = 166, + BPF_FUNC_btf_find_by_name_kind = 167, + BPF_FUNC_sys_close = 168, + BPF_FUNC_timer_init = 169, + BPF_FUNC_timer_set_callback = 170, + BPF_FUNC_timer_start = 171, + BPF_FUNC_timer_cancel = 172, + BPF_FUNC_get_func_ip = 173, + BPF_FUNC_get_attach_cookie = 174, + BPF_FUNC_task_pt_regs = 175, + BPF_FUNC_get_branch_snapshot = 176, + BPF_FUNC_trace_vprintk = 177, + BPF_FUNC_skc_to_unix_sock = 178, + BPF_FUNC_kallsyms_lookup_name = 179, + BPF_FUNC_find_vma = 180, + BPF_FUNC_loop = 181, + BPF_FUNC_strncmp = 182, + BPF_FUNC_get_func_arg = 183, + BPF_FUNC_get_func_ret = 184, + BPF_FUNC_get_func_arg_cnt = 185, + BPF_FUNC_get_retval = 186, + BPF_FUNC_set_retval = 187, + BPF_FUNC_xdp_get_buff_len = 188, + BPF_FUNC_xdp_load_bytes = 189, + BPF_FUNC_xdp_store_bytes = 190, + BPF_FUNC_copy_from_user_task = 191, + BPF_FUNC_skb_set_tstamp = 192, + BPF_FUNC_ima_file_hash = 193, + BPF_FUNC_kptr_xchg = 194, + BPF_FUNC_map_lookup_percpu_elem = 195, + BPF_FUNC_skc_to_mptcp_sock = 196, + BPF_FUNC_dynptr_from_mem = 197, + BPF_FUNC_ringbuf_reserve_dynptr = 198, + BPF_FUNC_ringbuf_submit_dynptr = 199, + BPF_FUNC_ringbuf_discard_dynptr = 200, + BPF_FUNC_dynptr_read = 201, + BPF_FUNC_dynptr_write = 202, + BPF_FUNC_dynptr_data = 203, + BPF_FUNC_tcp_raw_gen_syncookie_ipv4 = 204, + BPF_FUNC_tcp_raw_gen_syncookie_ipv6 = 205, + BPF_FUNC_tcp_raw_check_syncookie_ipv4 = 206, + BPF_FUNC_tcp_raw_check_syncookie_ipv6 = 207, + BPF_FUNC_ktime_get_tai_ns = 208, + BPF_FUNC_user_ringbuf_drain = 209, + BPF_FUNC_cgrp_storage_get = 210, + BPF_FUNC_cgrp_storage_delete = 211, + __BPF_FUNC_MAX_ID = 212, +} pub const BPF_F_RECOMPUTE_CSUM: _bindgen_ty_6 = 1; pub const BPF_F_INVALIDATE_HASH: _bindgen_ty_6 = 2; pub type _bindgen_ty_6 = ::core::ffi::c_uint; @@ -916,6 +1350,18 @@ pub const BPF_F_CTXLEN_MASK: _bindgen_ty_14 = 4503595332403200; pub type _bindgen_ty_14 = ::core::ffi::c_ulong; pub const BPF_F_CURRENT_NETNS: _bindgen_ty_15 = -1; pub type _bindgen_ty_15 = ::core::ffi::c_int; +pub const BPF_CSUM_LEVEL_QUERY: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_QUERY; +pub const BPF_CSUM_LEVEL_INC: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_INC; +pub const BPF_CSUM_LEVEL_DEC: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_DEC; +pub const BPF_CSUM_LEVEL_RESET: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_RESET; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_16 { + BPF_CSUM_LEVEL_QUERY = 0, + BPF_CSUM_LEVEL_INC = 1, + BPF_CSUM_LEVEL_DEC = 2, + BPF_CSUM_LEVEL_RESET = 3, +} pub const BPF_F_ADJ_ROOM_FIXED_GSO: _bindgen_ty_17 = 1; pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: _bindgen_ty_17 = 2; pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: _bindgen_ty_17 = 4; @@ -926,19 +1372,74 @@ pub const BPF_F_ADJ_ROOM_ENCAP_L2_ETH: _bindgen_ty_17 = 64; pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV4: _bindgen_ty_17 = 128; pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV6: _bindgen_ty_17 = 256; pub type _bindgen_ty_17 = ::core::ffi::c_uint; +pub const BPF_ADJ_ROOM_ENCAP_L2_MASK: _bindgen_ty_18 = _bindgen_ty_18::BPF_ADJ_ROOM_ENCAP_L2_MASK; +pub const BPF_ADJ_ROOM_ENCAP_L2_SHIFT: _bindgen_ty_18 = _bindgen_ty_18::BPF_ADJ_ROOM_ENCAP_L2_SHIFT; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_18 { + BPF_ADJ_ROOM_ENCAP_L2_MASK = 255, + BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 56, +} pub const BPF_F_SYSCTL_BASE_NAME: _bindgen_ty_19 = 1; pub type _bindgen_ty_19 = ::core::ffi::c_uint; +pub const BPF_LOCAL_STORAGE_GET_F_CREATE: _bindgen_ty_20 = + _bindgen_ty_20::BPF_LOCAL_STORAGE_GET_F_CREATE; +pub const BPF_SK_STORAGE_GET_F_CREATE: _bindgen_ty_20 = + _bindgen_ty_20::BPF_LOCAL_STORAGE_GET_F_CREATE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_20 { + BPF_LOCAL_STORAGE_GET_F_CREATE = 1, +} pub const BPF_F_GET_BRANCH_RECORDS_SIZE: _bindgen_ty_21 = 1; pub type _bindgen_ty_21 = ::core::ffi::c_uint; +pub const BPF_RB_NO_WAKEUP: _bindgen_ty_22 = _bindgen_ty_22::BPF_RB_NO_WAKEUP; +pub const BPF_RB_FORCE_WAKEUP: _bindgen_ty_22 = _bindgen_ty_22::BPF_RB_FORCE_WAKEUP; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_22 { + BPF_RB_NO_WAKEUP = 1, + BPF_RB_FORCE_WAKEUP = 2, +} +pub const BPF_RB_AVAIL_DATA: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_AVAIL_DATA; +pub const BPF_RB_RING_SIZE: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_RING_SIZE; +pub const BPF_RB_CONS_POS: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_CONS_POS; +pub const BPF_RB_PROD_POS: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_PROD_POS; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_23 { + BPF_RB_AVAIL_DATA = 0, + BPF_RB_RING_SIZE = 1, + BPF_RB_CONS_POS = 2, + BPF_RB_PROD_POS = 3, +} pub const BPF_RINGBUF_BUSY_BIT: _bindgen_ty_24 = 2147483648; pub const BPF_RINGBUF_DISCARD_BIT: _bindgen_ty_24 = 1073741824; pub const BPF_RINGBUF_HDR_SZ: _bindgen_ty_24 = 8; pub type _bindgen_ty_24 = ::core::ffi::c_uint; +pub const BPF_SK_LOOKUP_F_REPLACE: _bindgen_ty_25 = _bindgen_ty_25::BPF_SK_LOOKUP_F_REPLACE; +pub const BPF_SK_LOOKUP_F_NO_REUSEPORT: _bindgen_ty_25 = + _bindgen_ty_25::BPF_SK_LOOKUP_F_NO_REUSEPORT; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_25 { + BPF_SK_LOOKUP_F_REPLACE = 1, + BPF_SK_LOOKUP_F_NO_REUSEPORT = 2, +} pub const BPF_F_BPRM_SECUREEXEC: _bindgen_ty_26 = 1; pub type _bindgen_ty_26 = ::core::ffi::c_uint; pub const BPF_F_BROADCAST: _bindgen_ty_27 = 8; pub const BPF_F_EXCLUDE_INGRESS: _bindgen_ty_27 = 16; pub type _bindgen_ty_27 = ::core::ffi::c_uint; +pub const BPF_SKB_TSTAMP_UNSPEC: _bindgen_ty_28 = _bindgen_ty_28::BPF_SKB_TSTAMP_UNSPEC; +pub const BPF_SKB_TSTAMP_DELIVERY_MONO: _bindgen_ty_28 = + _bindgen_ty_28::BPF_SKB_TSTAMP_DELIVERY_MONO; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_28 { + BPF_SKB_TSTAMP_UNSPEC = 0, + BPF_SKB_TSTAMP_DELIVERY_MONO = 1, +} #[repr(C)] #[derive(Copy, Clone)] pub struct bpf_devmap_val { @@ -1019,6 +1520,28 @@ impl bpf_prog_info { } } #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -1268,6 +1791,201 @@ pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_13 { pub ifindex: __u32, pub attach_type: __u32, } +pub const BPF_SOCK_OPS_RTO_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_RTO_CB_FLAG; +pub const BPF_SOCK_OPS_RETRANS_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_RETRANS_CB_FLAG; +pub const BPF_SOCK_OPS_STATE_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_STATE_CB_FLAG; +pub const BPF_SOCK_OPS_RTT_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_RTT_CB_FLAG; +pub const BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_ALL_CB_FLAGS: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_ALL_CB_FLAGS; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_29 { + BPF_SOCK_OPS_RTO_CB_FLAG = 1, + BPF_SOCK_OPS_RETRANS_CB_FLAG = 2, + BPF_SOCK_OPS_STATE_CB_FLAG = 4, + BPF_SOCK_OPS_RTT_CB_FLAG = 8, + BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG = 16, + BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG = 32, + BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG = 64, + BPF_SOCK_OPS_ALL_CB_FLAGS = 127, +} +pub const BPF_SOCK_OPS_VOID: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_VOID; +pub const BPF_SOCK_OPS_TIMEOUT_INIT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TIMEOUT_INIT; +pub const BPF_SOCK_OPS_RWND_INIT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RWND_INIT; +pub const BPF_SOCK_OPS_TCP_CONNECT_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TCP_CONNECT_CB; +pub const BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB; +pub const BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB; +pub const BPF_SOCK_OPS_NEEDS_ECN: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_NEEDS_ECN; +pub const BPF_SOCK_OPS_BASE_RTT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_BASE_RTT; +pub const BPF_SOCK_OPS_RTO_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RTO_CB; +pub const BPF_SOCK_OPS_RETRANS_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RETRANS_CB; +pub const BPF_SOCK_OPS_STATE_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_STATE_CB; +pub const BPF_SOCK_OPS_TCP_LISTEN_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TCP_LISTEN_CB; +pub const BPF_SOCK_OPS_RTT_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RTT_CB; +pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_PARSE_HDR_OPT_CB; +pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_HDR_OPT_LEN_CB; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_WRITE_HDR_OPT_CB; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_30 { + BPF_SOCK_OPS_VOID = 0, + BPF_SOCK_OPS_TIMEOUT_INIT = 1, + BPF_SOCK_OPS_RWND_INIT = 2, + BPF_SOCK_OPS_TCP_CONNECT_CB = 3, + BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 4, + BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 5, + BPF_SOCK_OPS_NEEDS_ECN = 6, + BPF_SOCK_OPS_BASE_RTT = 7, + BPF_SOCK_OPS_RTO_CB = 8, + BPF_SOCK_OPS_RETRANS_CB = 9, + BPF_SOCK_OPS_STATE_CB = 10, + BPF_SOCK_OPS_TCP_LISTEN_CB = 11, + BPF_SOCK_OPS_RTT_CB = 12, + BPF_SOCK_OPS_PARSE_HDR_OPT_CB = 13, + BPF_SOCK_OPS_HDR_OPT_LEN_CB = 14, + BPF_SOCK_OPS_WRITE_HDR_OPT_CB = 15, +} +pub const BPF_TCP_ESTABLISHED: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_ESTABLISHED; +pub const BPF_TCP_SYN_SENT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_SYN_SENT; +pub const BPF_TCP_SYN_RECV: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_SYN_RECV; +pub const BPF_TCP_FIN_WAIT1: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_FIN_WAIT1; +pub const BPF_TCP_FIN_WAIT2: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_FIN_WAIT2; +pub const BPF_TCP_TIME_WAIT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_TIME_WAIT; +pub const BPF_TCP_CLOSE: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSE; +pub const BPF_TCP_CLOSE_WAIT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSE_WAIT; +pub const BPF_TCP_LAST_ACK: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_LAST_ACK; +pub const BPF_TCP_LISTEN: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_LISTEN; +pub const BPF_TCP_CLOSING: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSING; +pub const BPF_TCP_NEW_SYN_RECV: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_NEW_SYN_RECV; +pub const BPF_TCP_BOUND_INACTIVE: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_BOUND_INACTIVE; +pub const BPF_TCP_MAX_STATES: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_MAX_STATES; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_31 { + BPF_TCP_ESTABLISHED = 1, + BPF_TCP_SYN_SENT = 2, + BPF_TCP_SYN_RECV = 3, + BPF_TCP_FIN_WAIT1 = 4, + BPF_TCP_FIN_WAIT2 = 5, + BPF_TCP_TIME_WAIT = 6, + BPF_TCP_CLOSE = 7, + BPF_TCP_CLOSE_WAIT = 8, + BPF_TCP_LAST_ACK = 9, + BPF_TCP_LISTEN = 10, + BPF_TCP_CLOSING = 11, + BPF_TCP_NEW_SYN_RECV = 12, + BPF_TCP_BOUND_INACTIVE = 13, + BPF_TCP_MAX_STATES = 14, +} +pub const BPF_LOAD_HDR_OPT_TCP_SYN: _bindgen_ty_33 = _bindgen_ty_33::BPF_LOAD_HDR_OPT_TCP_SYN; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_33 { + BPF_LOAD_HDR_OPT_TCP_SYN = 1, +} +pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: _bindgen_ty_34 = + _bindgen_ty_34::BPF_WRITE_HDR_TCP_CURRENT_MSS; +pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: _bindgen_ty_34 = + _bindgen_ty_34::BPF_WRITE_HDR_TCP_SYNACK_COOKIE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_34 { + BPF_WRITE_HDR_TCP_CURRENT_MSS = 1, + BPF_WRITE_HDR_TCP_SYNACK_COOKIE = 2, +} +pub const BPF_DEVCG_ACC_MKNOD: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_MKNOD; +pub const BPF_DEVCG_ACC_READ: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_READ; +pub const BPF_DEVCG_ACC_WRITE: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_WRITE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_35 { + BPF_DEVCG_ACC_MKNOD = 1, + BPF_DEVCG_ACC_READ = 2, + BPF_DEVCG_ACC_WRITE = 4, +} +pub const BPF_DEVCG_DEV_BLOCK: _bindgen_ty_36 = _bindgen_ty_36::BPF_DEVCG_DEV_BLOCK; +pub const BPF_DEVCG_DEV_CHAR: _bindgen_ty_36 = _bindgen_ty_36::BPF_DEVCG_DEV_CHAR; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_36 { + BPF_DEVCG_DEV_BLOCK = 1, + BPF_DEVCG_DEV_CHAR = 2, +} +pub const BPF_FIB_LOOKUP_DIRECT: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_DIRECT; +pub const BPF_FIB_LOOKUP_OUTPUT: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_OUTPUT; +pub const BPF_FIB_LOOKUP_SKIP_NEIGH: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_SKIP_NEIGH; +pub const BPF_FIB_LOOKUP_TBID: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_TBID; +pub const BPF_FIB_LOOKUP_SRC: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_SRC; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_37 { + BPF_FIB_LOOKUP_DIRECT = 1, + BPF_FIB_LOOKUP_OUTPUT = 2, + BPF_FIB_LOOKUP_SKIP_NEIGH = 4, + BPF_FIB_LOOKUP_TBID = 8, + BPF_FIB_LOOKUP_SRC = 16, +} +pub const BPF_FIB_LKUP_RET_SUCCESS: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_SUCCESS; +pub const BPF_FIB_LKUP_RET_BLACKHOLE: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_BLACKHOLE; +pub const BPF_FIB_LKUP_RET_UNREACHABLE: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_UNREACHABLE; +pub const BPF_FIB_LKUP_RET_PROHIBIT: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_PROHIBIT; +pub const BPF_FIB_LKUP_RET_NOT_FWDED: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_NOT_FWDED; +pub const BPF_FIB_LKUP_RET_FWD_DISABLED: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_FWD_DISABLED; +pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_UNSUPP_LWT; +pub const BPF_FIB_LKUP_RET_NO_NEIGH: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_NO_NEIGH; +pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_FRAG_NEEDED; +pub const BPF_FIB_LKUP_RET_NO_SRC_ADDR: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_NO_SRC_ADDR; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_38 { + BPF_FIB_LKUP_RET_SUCCESS = 0, + BPF_FIB_LKUP_RET_BLACKHOLE = 1, + BPF_FIB_LKUP_RET_UNREACHABLE = 2, + BPF_FIB_LKUP_RET_PROHIBIT = 3, + BPF_FIB_LKUP_RET_NOT_FWDED = 4, + BPF_FIB_LKUP_RET_FWD_DISABLED = 5, + BPF_FIB_LKUP_RET_UNSUPP_LWT = 6, + BPF_FIB_LKUP_RET_NO_NEIGH = 7, + BPF_FIB_LKUP_RET_FRAG_NEEDED = 8, + BPF_FIB_LKUP_RET_NO_SRC_ADDR = 9, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_task_fd_type { + BPF_FD_TYPE_RAW_TRACEPOINT = 0, + BPF_FD_TYPE_TRACEPOINT = 1, + BPF_FD_TYPE_KPROBE = 2, + BPF_FD_TYPE_KRETPROBE = 3, + BPF_FD_TYPE_UPROBE = 4, + BPF_FD_TYPE_URETPROBE = 5, +} +pub const BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_39 { + BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 1, + BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 2, + BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 4, +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bpf_func_info { @@ -1387,6 +2105,18 @@ pub struct btf_var_secinfo { pub struct btf_decl_tag { pub component_idx: __s32, } +impl nlmsgerr_attrs { + pub const NLMSGERR_ATTR_MAX: nlmsgerr_attrs = nlmsgerr_attrs::NLMSGERR_ATTR_COOKIE; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum nlmsgerr_attrs { + NLMSGERR_ATTR_UNUSED = 0, + NLMSGERR_ATTR_MSG = 1, + NLMSGERR_ATTR_OFFS = 2, + NLMSGERR_ATTR_COOKIE = 3, + __NLMSGERR_ATTR_MAX = 4, +} pub const IFLA_XDP_UNSPEC: _bindgen_ty_92 = 0; pub const IFLA_XDP_FD: _bindgen_ty_92 = 1; pub const IFLA_XDP_ATTACHED: _bindgen_ty_92 = 2; @@ -1398,6 +2128,29 @@ pub const IFLA_XDP_HW_PROG_ID: _bindgen_ty_92 = 7; pub const IFLA_XDP_EXPECTED_FD: _bindgen_ty_92 = 8; pub const __IFLA_XDP_MAX: _bindgen_ty_92 = 9; pub type _bindgen_ty_92 = ::core::ffi::c_uint; +impl nf_inet_hooks { + pub const NF_INET_INGRESS: nf_inet_hooks = nf_inet_hooks::NF_INET_NUMHOOKS; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum nf_inet_hooks { + NF_INET_PRE_ROUTING = 0, + NF_INET_LOCAL_IN = 1, + NF_INET_FORWARD = 2, + NF_INET_LOCAL_OUT = 3, + NF_INET_POST_ROUTING = 4, + NF_INET_NUMHOOKS = 5, +} +pub const NFPROTO_UNSPEC: _bindgen_ty_99 = 0; +pub const NFPROTO_INET: _bindgen_ty_99 = 1; +pub const NFPROTO_IPV4: _bindgen_ty_99 = 2; +pub const NFPROTO_ARP: _bindgen_ty_99 = 3; +pub const NFPROTO_NETDEV: _bindgen_ty_99 = 5; +pub const NFPROTO_BRIDGE: _bindgen_ty_99 = 7; +pub const NFPROTO_IPV6: _bindgen_ty_99 = 10; +pub const NFPROTO_DECNET: _bindgen_ty_99 = 12; +pub const NFPROTO_NUMPROTO: _bindgen_ty_99 = 13; +pub type _bindgen_ty_99 = ::core::ffi::c_uint; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum perf_type_id { @@ -1567,6 +2320,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn disabled_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_disabled_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } } @@ -1578,6 +2353,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn pinned(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } } @@ -1589,6 +2386,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn pinned_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_pinned_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclusive(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } } @@ -1600,6 +2419,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclusive_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclusive_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_user(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } } @@ -1611,6 +2452,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_kernel(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } } @@ -1622,6 +2485,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_hv(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } } @@ -1633,6 +2518,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_hv_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_hv_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_idle(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } } @@ -1644,6 +2551,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_idle_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_idle_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn mmap(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } } @@ -1655,6 +2584,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn comm(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } } @@ -1666,6 +2617,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn comm_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn freq(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } } @@ -1677,6 +2650,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn freq_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_freq_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit_stat(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } } @@ -1688,17 +2683,61 @@ impl perf_event_attr { } } #[inline] - pub fn enable_on_exec(&self) -> __u64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } + pub unsafe fn inherit_stat_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u64) + } } #[inline] - pub fn set_enable_on_exec(&mut self, val: __u64) { + pub unsafe fn set_inherit_stat_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_on_exec(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } + } + #[inline] + pub fn set_enable_on_exec(&mut self, val: __u64) { unsafe { let val: u64 = ::core::mem::transmute(val); self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] + pub unsafe fn enable_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_enable_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn task(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) } } @@ -1710,6 +2749,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn task_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_task_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn watermark(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) } } @@ -1721,6 +2782,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn watermark_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_watermark_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn precise_ip(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 2u8) as u64) } } @@ -1732,6 +2815,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn precise_ip_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 2u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_precise_ip_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 2u8, + val as u64, + ) + } + } + #[inline] pub fn mmap_data(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } } @@ -1743,6 +2848,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap_data_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_data_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn sample_id_all(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } } @@ -1754,6 +2881,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn sample_id_all_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sample_id_all_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_host(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } } @@ -1765,6 +2914,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_host_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_host_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_guest(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } } @@ -1776,6 +2947,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_guest_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_guest_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_callchain_kernel(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) } } @@ -1787,6 +2980,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_callchain_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 21usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 21usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_callchain_user(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) } } @@ -1798,6 +3013,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_callchain_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 22usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 22usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn mmap2(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) } } @@ -1809,6 +3046,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap2_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 23usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap2_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 23usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn comm_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) } } @@ -1820,6 +3079,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn comm_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 24usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 24usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn use_clockid(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) } } @@ -1831,6 +3112,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn use_clockid_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 25usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_use_clockid_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 25usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn context_switch(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) } } @@ -1842,6 +3145,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn context_switch_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 26usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_context_switch_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 26usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn write_backward(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) } } @@ -1853,6 +3178,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn write_backward_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 27usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_write_backward_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 27usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn namespaces(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) } } @@ -1864,6 +3211,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn namespaces_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 28usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_namespaces_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 28usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn ksymbol(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) } } @@ -1875,6 +3244,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn ksymbol_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 29usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_ksymbol_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 29usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn bpf_event(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u64) } } @@ -1886,6 +3277,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn bpf_event_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 30usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_bpf_event_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 30usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn aux_output(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u64) } } @@ -1897,6 +3310,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn aux_output_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_aux_output_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cgroup(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } } @@ -1908,6 +3343,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn cgroup_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cgroup_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn text_poke(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) } } @@ -1919,6 +3376,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn text_poke_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 33usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_text_poke_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 33usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn build_id(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) } } @@ -1930,6 +3409,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn build_id_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 34usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_build_id_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 34usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit_thread(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) } } @@ -1941,6 +3442,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_thread_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 35usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_thread_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 35usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn remove_on_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) } } @@ -1952,6 +3475,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn remove_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 36usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_remove_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 36usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn sigtrap(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } } @@ -1963,6 +3508,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn sigtrap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 37usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sigtrap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 37usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __reserved_1(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) } } @@ -1974,6 +3541,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn __reserved_1_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 38usize, + 26u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set___reserved_1_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 38usize, + 26u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( disabled: __u64, inherit: __u64, @@ -2227,6 +3816,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_bit0_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_bit0_is_deprecated(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } } @@ -2238,6 +3849,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_bit0_is_deprecated_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_is_deprecated_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_rdpmc(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } } @@ -2249,6 +3882,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_rdpmc_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_rdpmc_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } } @@ -2260,6 +3915,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time_zero(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } } @@ -2271,6 +3948,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_zero_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_zero_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time_short(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } } @@ -2282,6 +3981,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_short_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_short_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_____res(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) } } @@ -2293,6 +4014,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_____res_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 58u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_____res_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 58u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( cap_bit0: __u64, cap_bit0_is_deprecated: __u64, @@ -2368,20 +4111,20 @@ pub enum perf_event_type { PERF_RECORD_AUX_OUTPUT_HW_ID = 21, PERF_RECORD_MAX = 22, } -pub const TCA_BPF_UNSPEC: _bindgen_ty_152 = 0; -pub const TCA_BPF_ACT: _bindgen_ty_152 = 1; -pub const TCA_BPF_POLICE: _bindgen_ty_152 = 2; -pub const TCA_BPF_CLASSID: _bindgen_ty_152 = 3; -pub const TCA_BPF_OPS_LEN: _bindgen_ty_152 = 4; -pub const TCA_BPF_OPS: _bindgen_ty_152 = 5; -pub const TCA_BPF_FD: _bindgen_ty_152 = 6; -pub const TCA_BPF_NAME: _bindgen_ty_152 = 7; -pub const TCA_BPF_FLAGS: _bindgen_ty_152 = 8; -pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_152 = 9; -pub const TCA_BPF_TAG: _bindgen_ty_152 = 10; -pub const TCA_BPF_ID: _bindgen_ty_152 = 11; -pub const __TCA_BPF_MAX: _bindgen_ty_152 = 12; -pub type _bindgen_ty_152 = ::core::ffi::c_uint; +pub const TCA_BPF_UNSPEC: _bindgen_ty_154 = 0; +pub const TCA_BPF_ACT: _bindgen_ty_154 = 1; +pub const TCA_BPF_POLICE: _bindgen_ty_154 = 2; +pub const TCA_BPF_CLASSID: _bindgen_ty_154 = 3; +pub const TCA_BPF_OPS_LEN: _bindgen_ty_154 = 4; +pub const TCA_BPF_OPS: _bindgen_ty_154 = 5; +pub const TCA_BPF_FD: _bindgen_ty_154 = 6; +pub const TCA_BPF_NAME: _bindgen_ty_154 = 7; +pub const TCA_BPF_FLAGS: _bindgen_ty_154 = 8; +pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_154 = 9; +pub const TCA_BPF_TAG: _bindgen_ty_154 = 10; +pub const TCA_BPF_ID: _bindgen_ty_154 = 11; +pub const __TCA_BPF_MAX: _bindgen_ty_154 = 12; +pub type _bindgen_ty_154 = ::core::ffi::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ifinfomsg { @@ -2403,24 +4146,22 @@ pub struct tcmsg { pub tcm_parent: __u32, pub tcm_info: __u32, } -pub const TCA_UNSPEC: _bindgen_ty_172 = 0; -pub const TCA_KIND: _bindgen_ty_172 = 1; -pub const TCA_OPTIONS: _bindgen_ty_172 = 2; -pub const TCA_STATS: _bindgen_ty_172 = 3; -pub const TCA_XSTATS: _bindgen_ty_172 = 4; -pub const TCA_RATE: _bindgen_ty_172 = 5; -pub const TCA_FCNT: _bindgen_ty_172 = 6; -pub const TCA_STATS2: _bindgen_ty_172 = 7; -pub const TCA_STAB: _bindgen_ty_172 = 8; -pub const TCA_PAD: _bindgen_ty_172 = 9; -pub const TCA_DUMP_INVISIBLE: _bindgen_ty_172 = 10; -pub const TCA_CHAIN: _bindgen_ty_172 = 11; -pub const TCA_HW_OFFLOAD: _bindgen_ty_172 = 12; -pub const TCA_INGRESS_BLOCK: _bindgen_ty_172 = 13; -pub const TCA_EGRESS_BLOCK: _bindgen_ty_172 = 14; -pub const TCA_DUMP_FLAGS: _bindgen_ty_172 = 15; -pub const __TCA_MAX: _bindgen_ty_172 = 16; -pub type _bindgen_ty_172 = ::core::ffi::c_uint; -pub const AYA_PERF_EVENT_IOC_ENABLE: ::core::ffi::c_int = 9216; -pub const AYA_PERF_EVENT_IOC_DISABLE: ::core::ffi::c_int = 9217; -pub const AYA_PERF_EVENT_IOC_SET_BPF: ::core::ffi::c_int = 1074013192; +pub const TCA_UNSPEC: _bindgen_ty_174 = 0; +pub const TCA_KIND: _bindgen_ty_174 = 1; +pub const TCA_OPTIONS: _bindgen_ty_174 = 2; +pub const TCA_STATS: _bindgen_ty_174 = 3; +pub const TCA_XSTATS: _bindgen_ty_174 = 4; +pub const TCA_RATE: _bindgen_ty_174 = 5; +pub const TCA_FCNT: _bindgen_ty_174 = 6; +pub const TCA_STATS2: _bindgen_ty_174 = 7; +pub const TCA_STAB: _bindgen_ty_174 = 8; +pub const TCA_PAD: _bindgen_ty_174 = 9; +pub const TCA_DUMP_INVISIBLE: _bindgen_ty_174 = 10; +pub const TCA_CHAIN: _bindgen_ty_174 = 11; +pub const TCA_HW_OFFLOAD: _bindgen_ty_174 = 12; +pub const TCA_INGRESS_BLOCK: _bindgen_ty_174 = 13; +pub const TCA_EGRESS_BLOCK: _bindgen_ty_174 = 14; +pub const TCA_DUMP_FLAGS: _bindgen_ty_174 = 15; +pub const TCA_EXT_WARN_MSG: _bindgen_ty_174 = 16; +pub const __TCA_MAX: _bindgen_ty_174 = 17; +pub type _bindgen_ty_174 = ::core::ffi::c_uint; diff --git a/aya-obj/src/generated/linux_bindings_s390x.rs b/aya-obj/src/generated/linux_bindings_s390x.rs new file mode 100644 index 00000000..b76ed850 --- /dev/null +++ b/aya-obj/src/generated/linux_bindings_s390x.rs @@ -0,0 +1,4167 @@ +/* automatically generated by rust-bindgen 0.72.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { byte | mask } else { byte & !mask } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } +} +#[repr(C)] +#[derive(Default)] +pub struct __IncompleteArrayField(::core::marker::PhantomData, [T; 0]); +impl __IncompleteArrayField { + #[inline] + pub const fn new() -> Self { + __IncompleteArrayField(::core::marker::PhantomData, []) + } + #[inline] + pub fn as_ptr(&self) -> *const T { + self as *const _ as *const T + } + #[inline] + pub fn as_mut_ptr(&mut self) -> *mut T { + self as *mut _ as *mut T + } + #[inline] + pub unsafe fn as_slice(&self, len: usize) -> &[T] { + ::core::slice::from_raw_parts(self.as_ptr(), len) + } + #[inline] + pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { + ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len) + } +} +impl ::core::fmt::Debug for __IncompleteArrayField { + fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + fmt.write_str("__IncompleteArrayField") + } +} +pub const BPF_LD: u32 = 0; +pub const BPF_LDX: u32 = 1; +pub const BPF_ST: u32 = 2; +pub const BPF_STX: u32 = 3; +pub const BPF_ALU: u32 = 4; +pub const BPF_JMP: u32 = 5; +pub const BPF_RET: u32 = 6; +pub const BPF_MISC: u32 = 7; +pub const BPF_W: u32 = 0; +pub const BPF_H: u32 = 8; +pub const BPF_B: u32 = 16; +pub const BPF_IMM: u32 = 0; +pub const BPF_ABS: u32 = 32; +pub const BPF_IND: u32 = 64; +pub const BPF_MEM: u32 = 96; +pub const BPF_LEN: u32 = 128; +pub const BPF_MSH: u32 = 160; +pub const BPF_ADD: u32 = 0; +pub const BPF_SUB: u32 = 16; +pub const BPF_MUL: u32 = 32; +pub const BPF_DIV: u32 = 48; +pub const BPF_OR: u32 = 64; +pub const BPF_AND: u32 = 80; +pub const BPF_LSH: u32 = 96; +pub const BPF_RSH: u32 = 112; +pub const BPF_NEG: u32 = 128; +pub const BPF_MOD: u32 = 144; +pub const BPF_XOR: u32 = 160; +pub const BPF_JA: u32 = 0; +pub const BPF_JEQ: u32 = 16; +pub const BPF_JGT: u32 = 32; +pub const BPF_JGE: u32 = 48; +pub const BPF_JSET: u32 = 64; +pub const BPF_K: u32 = 0; +pub const BPF_X: u32 = 8; +pub const BPF_MAXINSNS: u32 = 4096; +pub const BPF_JMP32: u32 = 6; +pub const BPF_ALU64: u32 = 7; +pub const BPF_DW: u32 = 24; +pub const BPF_MEMSX: u32 = 128; +pub const BPF_ATOMIC: u32 = 192; +pub const BPF_XADD: u32 = 192; +pub const BPF_MOV: u32 = 176; +pub const BPF_ARSH: u32 = 192; +pub const BPF_END: u32 = 208; +pub const BPF_TO_LE: u32 = 0; +pub const BPF_TO_BE: u32 = 8; +pub const BPF_FROM_LE: u32 = 0; +pub const BPF_FROM_BE: u32 = 8; +pub const BPF_JNE: u32 = 80; +pub const BPF_JLT: u32 = 160; +pub const BPF_JLE: u32 = 176; +pub const BPF_JSGT: u32 = 96; +pub const BPF_JSGE: u32 = 112; +pub const BPF_JSLT: u32 = 192; +pub const BPF_JSLE: u32 = 208; +pub const BPF_JCOND: u32 = 224; +pub const BPF_CALL: u32 = 128; +pub const BPF_EXIT: u32 = 144; +pub const BPF_FETCH: u32 = 1; +pub const BPF_XCHG: u32 = 225; +pub const BPF_CMPXCHG: u32 = 241; +pub const BPF_F_ALLOW_OVERRIDE: u32 = 1; +pub const BPF_F_ALLOW_MULTI: u32 = 2; +pub const BPF_F_REPLACE: u32 = 4; +pub const BPF_F_BEFORE: u32 = 8; +pub const BPF_F_AFTER: u32 = 16; +pub const BPF_F_ID: u32 = 32; +pub const BPF_F_STRICT_ALIGNMENT: u32 = 1; +pub const BPF_F_ANY_ALIGNMENT: u32 = 2; +pub const BPF_F_TEST_RND_HI32: u32 = 4; +pub const BPF_F_TEST_STATE_FREQ: u32 = 8; +pub const BPF_F_SLEEPABLE: u32 = 16; +pub const BPF_F_XDP_HAS_FRAGS: u32 = 32; +pub const BPF_F_XDP_DEV_BOUND_ONLY: u32 = 64; +pub const BPF_F_TEST_REG_INVARIANTS: u32 = 128; +pub const BPF_F_NETFILTER_IP_DEFRAG: u32 = 1; +pub const BPF_PSEUDO_MAP_FD: u32 = 1; +pub const BPF_PSEUDO_MAP_IDX: u32 = 5; +pub const BPF_PSEUDO_MAP_VALUE: u32 = 2; +pub const BPF_PSEUDO_MAP_IDX_VALUE: u32 = 6; +pub const BPF_PSEUDO_BTF_ID: u32 = 3; +pub const BPF_PSEUDO_FUNC: u32 = 4; +pub const BPF_PSEUDO_CALL: u32 = 1; +pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2; +pub const BPF_F_QUERY_EFFECTIVE: u32 = 1; +pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1; +pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2; +pub const BPF_BUILD_ID_SIZE: u32 = 20; +pub const BPF_OBJ_NAME_LEN: u32 = 16; +pub const BPF_TAG_SIZE: u32 = 8; +pub const BTF_INT_SIGNED: u32 = 1; +pub const BTF_INT_CHAR: u32 = 2; +pub const BTF_INT_BOOL: u32 = 4; +pub const NLMSG_ALIGNTO: u32 = 4; +pub const XDP_FLAGS_UPDATE_IF_NOEXIST: u32 = 1; +pub const XDP_FLAGS_SKB_MODE: u32 = 2; +pub const XDP_FLAGS_DRV_MODE: u32 = 4; +pub const XDP_FLAGS_HW_MODE: u32 = 8; +pub const XDP_FLAGS_REPLACE: u32 = 16; +pub const XDP_FLAGS_MODES: u32 = 14; +pub const XDP_FLAGS_MASK: u32 = 31; +pub const PERF_EVENT_IOC_ENABLE: u32 = 9216; +pub const PERF_EVENT_IOC_DISABLE: u32 = 9217; +pub const PERF_EVENT_IOC_REFRESH: u32 = 9218; +pub const PERF_EVENT_IOC_RESET: u32 = 9219; +pub const PERF_EVENT_IOC_PERIOD: u32 = 1074275332; +pub const PERF_EVENT_IOC_SET_OUTPUT: u32 = 9221; +pub const PERF_EVENT_IOC_SET_FILTER: u32 = 1074275334; +pub const PERF_EVENT_IOC_ID: u32 = 2148017159; +pub const PERF_EVENT_IOC_SET_BPF: u32 = 1074013192; +pub const PERF_EVENT_IOC_PAUSE_OUTPUT: u32 = 1074013193; +pub const PERF_EVENT_IOC_QUERY_BPF: u32 = 3221758986; +pub const PERF_EVENT_IOC_MODIFY_ATTRIBUTES: u32 = 1074275339; +pub const PERF_MAX_STACK_DEPTH: u32 = 127; +pub const PERF_MAX_CONTEXTS_PER_STACK: u32 = 8; +pub const PERF_FLAG_FD_NO_GROUP: u32 = 1; +pub const PERF_FLAG_FD_OUTPUT: u32 = 2; +pub const PERF_FLAG_PID_CGROUP: u32 = 4; +pub const PERF_FLAG_FD_CLOEXEC: u32 = 8; +pub const TC_H_MAJ_MASK: u32 = 4294901760; +pub const TC_H_MIN_MASK: u32 = 65535; +pub const TC_H_UNSPEC: u32 = 0; +pub const TC_H_ROOT: u32 = 4294967295; +pub const TC_H_INGRESS: u32 = 4294967281; +pub const TC_H_CLSACT: u32 = 4294967281; +pub const TC_H_MIN_PRIORITY: u32 = 65504; +pub const TC_H_MIN_INGRESS: u32 = 65522; +pub const TC_H_MIN_EGRESS: u32 = 65523; +pub const TCA_BPF_FLAG_ACT_DIRECT: u32 = 1; +pub const SO_ATTACH_BPF: u32 = 50; +pub const SO_DETACH_BPF: u32 = 27; +pub type __u8 = ::core::ffi::c_uchar; +pub type __s16 = ::core::ffi::c_short; +pub type __u16 = ::core::ffi::c_ushort; +pub type __s32 = ::core::ffi::c_int; +pub type __u32 = ::core::ffi::c_uint; +pub type __s64 = ::core::ffi::c_longlong; +pub type __u64 = ::core::ffi::c_ulonglong; +pub const BPF_REG_0: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_0; +pub const BPF_REG_1: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_1; +pub const BPF_REG_2: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_2; +pub const BPF_REG_3: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_3; +pub const BPF_REG_4: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_4; +pub const BPF_REG_5: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_5; +pub const BPF_REG_6: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_6; +pub const BPF_REG_7: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_7; +pub const BPF_REG_8: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_8; +pub const BPF_REG_9: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_9; +pub const BPF_REG_10: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_10; +pub const __MAX_BPF_REG: _bindgen_ty_1 = _bindgen_ty_1::__MAX_BPF_REG; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { + BPF_REG_0 = 0, + BPF_REG_1 = 1, + BPF_REG_2 = 2, + BPF_REG_3 = 3, + BPF_REG_4 = 4, + BPF_REG_5 = 5, + BPF_REG_6 = 6, + BPF_REG_7 = 7, + BPF_REG_8 = 8, + BPF_REG_9 = 9, + BPF_REG_10 = 10, + __MAX_BPF_REG = 11, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_insn { + pub code: __u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub off: __s16, + pub imm: __s32, +} +impl bpf_insn { + #[inline] + pub fn dst_reg(&self) -> __u8 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) } + } + #[inline] + pub fn set_dst_reg(&mut self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn src_reg(&self) -> __u8 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } + } + #[inline] + pub fn set_src_reg(&mut self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 4u8, { + let dst_reg: u8 = unsafe { ::core::mem::transmute(dst_reg) }; + dst_reg as u64 + }); + __bindgen_bitfield_unit.set(4usize, 4u8, { + let src_reg: u8 = unsafe { ::core::mem::transmute(src_reg) }; + src_reg as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug)] +pub struct bpf_lpm_trie_key { + pub prefixlen: __u32, + pub data: __IncompleteArrayField<__u8>, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_cgroup_iter_order { + BPF_CGROUP_ITER_ORDER_UNSPEC = 0, + BPF_CGROUP_ITER_SELF_ONLY = 1, + BPF_CGROUP_ITER_DESCENDANTS_PRE = 2, + BPF_CGROUP_ITER_DESCENDANTS_POST = 3, + BPF_CGROUP_ITER_ANCESTORS_UP = 4, +} +impl bpf_cmd { + pub const BPF_PROG_RUN: bpf_cmd = bpf_cmd::BPF_PROG_TEST_RUN; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_cmd { + BPF_MAP_CREATE = 0, + BPF_MAP_LOOKUP_ELEM = 1, + BPF_MAP_UPDATE_ELEM = 2, + BPF_MAP_DELETE_ELEM = 3, + BPF_MAP_GET_NEXT_KEY = 4, + BPF_PROG_LOAD = 5, + BPF_OBJ_PIN = 6, + BPF_OBJ_GET = 7, + BPF_PROG_ATTACH = 8, + BPF_PROG_DETACH = 9, + BPF_PROG_TEST_RUN = 10, + BPF_PROG_GET_NEXT_ID = 11, + BPF_MAP_GET_NEXT_ID = 12, + BPF_PROG_GET_FD_BY_ID = 13, + BPF_MAP_GET_FD_BY_ID = 14, + BPF_OBJ_GET_INFO_BY_FD = 15, + BPF_PROG_QUERY = 16, + BPF_RAW_TRACEPOINT_OPEN = 17, + BPF_BTF_LOAD = 18, + BPF_BTF_GET_FD_BY_ID = 19, + BPF_TASK_FD_QUERY = 20, + BPF_MAP_LOOKUP_AND_DELETE_ELEM = 21, + BPF_MAP_FREEZE = 22, + BPF_BTF_GET_NEXT_ID = 23, + BPF_MAP_LOOKUP_BATCH = 24, + BPF_MAP_LOOKUP_AND_DELETE_BATCH = 25, + BPF_MAP_UPDATE_BATCH = 26, + BPF_MAP_DELETE_BATCH = 27, + BPF_LINK_CREATE = 28, + BPF_LINK_UPDATE = 29, + BPF_LINK_GET_FD_BY_ID = 30, + BPF_LINK_GET_NEXT_ID = 31, + BPF_ENABLE_STATS = 32, + BPF_ITER_CREATE = 33, + BPF_LINK_DETACH = 34, + BPF_PROG_BIND_MAP = 35, + BPF_TOKEN_CREATE = 36, + __MAX_BPF_CMD = 37, +} +impl bpf_map_type { + pub const BPF_MAP_TYPE_CGROUP_STORAGE: bpf_map_type = + bpf_map_type::BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED; +} +impl bpf_map_type { + pub const BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE: bpf_map_type = + bpf_map_type::BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_map_type { + BPF_MAP_TYPE_UNSPEC = 0, + BPF_MAP_TYPE_HASH = 1, + BPF_MAP_TYPE_ARRAY = 2, + BPF_MAP_TYPE_PROG_ARRAY = 3, + BPF_MAP_TYPE_PERF_EVENT_ARRAY = 4, + BPF_MAP_TYPE_PERCPU_HASH = 5, + BPF_MAP_TYPE_PERCPU_ARRAY = 6, + BPF_MAP_TYPE_STACK_TRACE = 7, + BPF_MAP_TYPE_CGROUP_ARRAY = 8, + BPF_MAP_TYPE_LRU_HASH = 9, + BPF_MAP_TYPE_LRU_PERCPU_HASH = 10, + BPF_MAP_TYPE_LPM_TRIE = 11, + BPF_MAP_TYPE_ARRAY_OF_MAPS = 12, + BPF_MAP_TYPE_HASH_OF_MAPS = 13, + BPF_MAP_TYPE_DEVMAP = 14, + BPF_MAP_TYPE_SOCKMAP = 15, + BPF_MAP_TYPE_CPUMAP = 16, + BPF_MAP_TYPE_XSKMAP = 17, + BPF_MAP_TYPE_SOCKHASH = 18, + BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED = 19, + BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 20, + BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED = 21, + BPF_MAP_TYPE_QUEUE = 22, + BPF_MAP_TYPE_STACK = 23, + BPF_MAP_TYPE_SK_STORAGE = 24, + BPF_MAP_TYPE_DEVMAP_HASH = 25, + BPF_MAP_TYPE_STRUCT_OPS = 26, + BPF_MAP_TYPE_RINGBUF = 27, + BPF_MAP_TYPE_INODE_STORAGE = 28, + BPF_MAP_TYPE_TASK_STORAGE = 29, + BPF_MAP_TYPE_BLOOM_FILTER = 30, + BPF_MAP_TYPE_USER_RINGBUF = 31, + BPF_MAP_TYPE_CGRP_STORAGE = 32, + BPF_MAP_TYPE_ARENA = 33, + __MAX_BPF_MAP_TYPE = 34, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_prog_type { + BPF_PROG_TYPE_UNSPEC = 0, + BPF_PROG_TYPE_SOCKET_FILTER = 1, + BPF_PROG_TYPE_KPROBE = 2, + BPF_PROG_TYPE_SCHED_CLS = 3, + BPF_PROG_TYPE_SCHED_ACT = 4, + BPF_PROG_TYPE_TRACEPOINT = 5, + BPF_PROG_TYPE_XDP = 6, + BPF_PROG_TYPE_PERF_EVENT = 7, + BPF_PROG_TYPE_CGROUP_SKB = 8, + BPF_PROG_TYPE_CGROUP_SOCK = 9, + BPF_PROG_TYPE_LWT_IN = 10, + BPF_PROG_TYPE_LWT_OUT = 11, + BPF_PROG_TYPE_LWT_XMIT = 12, + BPF_PROG_TYPE_SOCK_OPS = 13, + BPF_PROG_TYPE_SK_SKB = 14, + BPF_PROG_TYPE_CGROUP_DEVICE = 15, + BPF_PROG_TYPE_SK_MSG = 16, + BPF_PROG_TYPE_RAW_TRACEPOINT = 17, + BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 18, + BPF_PROG_TYPE_LWT_SEG6LOCAL = 19, + BPF_PROG_TYPE_LIRC_MODE2 = 20, + BPF_PROG_TYPE_SK_REUSEPORT = 21, + BPF_PROG_TYPE_FLOW_DISSECTOR = 22, + BPF_PROG_TYPE_CGROUP_SYSCTL = 23, + BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE = 24, + BPF_PROG_TYPE_CGROUP_SOCKOPT = 25, + BPF_PROG_TYPE_TRACING = 26, + BPF_PROG_TYPE_STRUCT_OPS = 27, + BPF_PROG_TYPE_EXT = 28, + BPF_PROG_TYPE_LSM = 29, + BPF_PROG_TYPE_SK_LOOKUP = 30, + BPF_PROG_TYPE_SYSCALL = 31, + BPF_PROG_TYPE_NETFILTER = 32, + __MAX_BPF_PROG_TYPE = 33, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_attach_type { + BPF_CGROUP_INET_INGRESS = 0, + BPF_CGROUP_INET_EGRESS = 1, + BPF_CGROUP_INET_SOCK_CREATE = 2, + BPF_CGROUP_SOCK_OPS = 3, + BPF_SK_SKB_STREAM_PARSER = 4, + BPF_SK_SKB_STREAM_VERDICT = 5, + BPF_CGROUP_DEVICE = 6, + BPF_SK_MSG_VERDICT = 7, + BPF_CGROUP_INET4_BIND = 8, + BPF_CGROUP_INET6_BIND = 9, + BPF_CGROUP_INET4_CONNECT = 10, + BPF_CGROUP_INET6_CONNECT = 11, + BPF_CGROUP_INET4_POST_BIND = 12, + BPF_CGROUP_INET6_POST_BIND = 13, + BPF_CGROUP_UDP4_SENDMSG = 14, + BPF_CGROUP_UDP6_SENDMSG = 15, + BPF_LIRC_MODE2 = 16, + BPF_FLOW_DISSECTOR = 17, + BPF_CGROUP_SYSCTL = 18, + BPF_CGROUP_UDP4_RECVMSG = 19, + BPF_CGROUP_UDP6_RECVMSG = 20, + BPF_CGROUP_GETSOCKOPT = 21, + BPF_CGROUP_SETSOCKOPT = 22, + BPF_TRACE_RAW_TP = 23, + BPF_TRACE_FENTRY = 24, + BPF_TRACE_FEXIT = 25, + BPF_MODIFY_RETURN = 26, + BPF_LSM_MAC = 27, + BPF_TRACE_ITER = 28, + BPF_CGROUP_INET4_GETPEERNAME = 29, + BPF_CGROUP_INET6_GETPEERNAME = 30, + BPF_CGROUP_INET4_GETSOCKNAME = 31, + BPF_CGROUP_INET6_GETSOCKNAME = 32, + BPF_XDP_DEVMAP = 33, + BPF_CGROUP_INET_SOCK_RELEASE = 34, + BPF_XDP_CPUMAP = 35, + BPF_SK_LOOKUP = 36, + BPF_XDP = 37, + BPF_SK_SKB_VERDICT = 38, + BPF_SK_REUSEPORT_SELECT = 39, + BPF_SK_REUSEPORT_SELECT_OR_MIGRATE = 40, + BPF_PERF_EVENT = 41, + BPF_TRACE_KPROBE_MULTI = 42, + BPF_LSM_CGROUP = 43, + BPF_STRUCT_OPS = 44, + BPF_NETFILTER = 45, + BPF_TCX_INGRESS = 46, + BPF_TCX_EGRESS = 47, + BPF_TRACE_UPROBE_MULTI = 48, + BPF_CGROUP_UNIX_CONNECT = 49, + BPF_CGROUP_UNIX_SENDMSG = 50, + BPF_CGROUP_UNIX_RECVMSG = 51, + BPF_CGROUP_UNIX_GETPEERNAME = 52, + BPF_CGROUP_UNIX_GETSOCKNAME = 53, + BPF_NETKIT_PRIMARY = 54, + BPF_NETKIT_PEER = 55, + __MAX_BPF_ATTACH_TYPE = 56, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_link_type { + BPF_LINK_TYPE_UNSPEC = 0, + BPF_LINK_TYPE_RAW_TRACEPOINT = 1, + BPF_LINK_TYPE_TRACING = 2, + BPF_LINK_TYPE_CGROUP = 3, + BPF_LINK_TYPE_ITER = 4, + BPF_LINK_TYPE_NETNS = 5, + BPF_LINK_TYPE_XDP = 6, + BPF_LINK_TYPE_PERF_EVENT = 7, + BPF_LINK_TYPE_KPROBE_MULTI = 8, + BPF_LINK_TYPE_STRUCT_OPS = 9, + BPF_LINK_TYPE_NETFILTER = 10, + BPF_LINK_TYPE_TCX = 11, + BPF_LINK_TYPE_UPROBE_MULTI = 12, + BPF_LINK_TYPE_NETKIT = 13, + __MAX_BPF_LINK_TYPE = 14, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_perf_event_type { + BPF_PERF_EVENT_UNSPEC = 0, + BPF_PERF_EVENT_UPROBE = 1, + BPF_PERF_EVENT_URETPROBE = 2, + BPF_PERF_EVENT_KPROBE = 3, + BPF_PERF_EVENT_KRETPROBE = 4, + BPF_PERF_EVENT_TRACEPOINT = 5, + BPF_PERF_EVENT_EVENT = 6, +} +pub const BPF_F_KPROBE_MULTI_RETURN: _bindgen_ty_2 = 1; +pub type _bindgen_ty_2 = ::core::ffi::c_uint; +pub const BPF_F_UPROBE_MULTI_RETURN: _bindgen_ty_3 = 1; +pub type _bindgen_ty_3 = ::core::ffi::c_uint; +pub const BPF_ANY: _bindgen_ty_4 = 0; +pub const BPF_NOEXIST: _bindgen_ty_4 = 1; +pub const BPF_EXIST: _bindgen_ty_4 = 2; +pub const BPF_F_LOCK: _bindgen_ty_4 = 4; +pub type _bindgen_ty_4 = ::core::ffi::c_uint; +pub const BPF_F_NO_PREALLOC: _bindgen_ty_5 = 1; +pub const BPF_F_NO_COMMON_LRU: _bindgen_ty_5 = 2; +pub const BPF_F_NUMA_NODE: _bindgen_ty_5 = 4; +pub const BPF_F_RDONLY: _bindgen_ty_5 = 8; +pub const BPF_F_WRONLY: _bindgen_ty_5 = 16; +pub const BPF_F_STACK_BUILD_ID: _bindgen_ty_5 = 32; +pub const BPF_F_ZERO_SEED: _bindgen_ty_5 = 64; +pub const BPF_F_RDONLY_PROG: _bindgen_ty_5 = 128; +pub const BPF_F_WRONLY_PROG: _bindgen_ty_5 = 256; +pub const BPF_F_CLONE: _bindgen_ty_5 = 512; +pub const BPF_F_MMAPABLE: _bindgen_ty_5 = 1024; +pub const BPF_F_PRESERVE_ELEMS: _bindgen_ty_5 = 2048; +pub const BPF_F_INNER_MAP: _bindgen_ty_5 = 4096; +pub const BPF_F_LINK: _bindgen_ty_5 = 8192; +pub const BPF_F_PATH_FD: _bindgen_ty_5 = 16384; +pub const BPF_F_VTYPE_BTF_OBJ_FD: _bindgen_ty_5 = 32768; +pub const BPF_F_TOKEN_FD: _bindgen_ty_5 = 65536; +pub const BPF_F_SEGV_ON_FAULT: _bindgen_ty_5 = 131072; +pub const BPF_F_NO_USER_CONV: _bindgen_ty_5 = 262144; +pub type _bindgen_ty_5 = ::core::ffi::c_uint; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_stats_type { + BPF_STATS_RUN_TIME = 0, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_1, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_2, + pub batch: bpf_attr__bindgen_ty_3, + pub __bindgen_anon_3: bpf_attr__bindgen_ty_4, + pub __bindgen_anon_4: bpf_attr__bindgen_ty_5, + pub __bindgen_anon_5: bpf_attr__bindgen_ty_6, + pub test: bpf_attr__bindgen_ty_7, + pub __bindgen_anon_6: bpf_attr__bindgen_ty_8, + pub info: bpf_attr__bindgen_ty_9, + pub query: bpf_attr__bindgen_ty_10, + pub raw_tracepoint: bpf_attr__bindgen_ty_11, + pub __bindgen_anon_7: bpf_attr__bindgen_ty_12, + pub task_fd_query: bpf_attr__bindgen_ty_13, + pub link_create: bpf_attr__bindgen_ty_14, + pub link_update: bpf_attr__bindgen_ty_15, + pub link_detach: bpf_attr__bindgen_ty_16, + pub enable_stats: bpf_attr__bindgen_ty_17, + pub iter_create: bpf_attr__bindgen_ty_18, + pub prog_bind_map: bpf_attr__bindgen_ty_19, + pub token_create: bpf_attr__bindgen_ty_20, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_1 { + pub map_type: __u32, + pub key_size: __u32, + pub value_size: __u32, + pub max_entries: __u32, + pub map_flags: __u32, + pub inner_map_fd: __u32, + pub numa_node: __u32, + pub map_name: [::core::ffi::c_char; 16usize], + pub map_ifindex: __u32, + pub btf_fd: __u32, + pub btf_key_type_id: __u32, + pub btf_value_type_id: __u32, + pub btf_vmlinux_value_type_id: __u32, + pub map_extra: __u64, + pub value_type_btf_obj_fd: __s32, + pub map_token_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_2 { + pub map_fd: __u32, + pub key: __u64, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_2__bindgen_ty_1, + pub flags: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_2__bindgen_ty_1 { + pub value: __u64, + pub next_key: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_3 { + pub in_batch: __u64, + pub out_batch: __u64, + pub keys: __u64, + pub values: __u64, + pub count: __u32, + pub map_fd: __u32, + pub elem_flags: __u64, + pub flags: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_4 { + pub prog_type: __u32, + pub insn_cnt: __u32, + pub insns: __u64, + pub license: __u64, + pub log_level: __u32, + pub log_size: __u32, + pub log_buf: __u64, + pub kern_version: __u32, + pub prog_flags: __u32, + pub prog_name: [::core::ffi::c_char; 16usize], + pub prog_ifindex: __u32, + pub expected_attach_type: __u32, + pub prog_btf_fd: __u32, + pub func_info_rec_size: __u32, + pub func_info: __u64, + pub func_info_cnt: __u32, + pub line_info_rec_size: __u32, + pub line_info: __u64, + pub line_info_cnt: __u32, + pub attach_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_4__bindgen_ty_1, + pub core_relo_cnt: __u32, + pub fd_array: __u64, + pub core_relos: __u64, + pub core_relo_rec_size: __u32, + pub log_true_size: __u32, + pub prog_token_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_4__bindgen_ty_1 { + pub attach_prog_fd: __u32, + pub attach_btf_obj_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_5 { + pub pathname: __u64, + pub bpf_fd: __u32, + pub file_flags: __u32, + pub path_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_6 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_6__bindgen_ty_1, + pub attach_bpf_fd: __u32, + pub attach_type: __u32, + pub attach_flags: __u32, + pub replace_bpf_fd: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_6__bindgen_ty_2, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_6__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_6__bindgen_ty_2 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_7 { + pub prog_fd: __u32, + pub retval: __u32, + pub data_size_in: __u32, + pub data_size_out: __u32, + pub data_in: __u64, + pub data_out: __u64, + pub repeat: __u32, + pub duration: __u32, + pub ctx_size_in: __u32, + pub ctx_size_out: __u32, + pub ctx_in: __u64, + pub ctx_out: __u64, + pub flags: __u32, + pub cpu: __u32, + pub batch_size: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_8 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_8__bindgen_ty_1, + pub next_id: __u32, + pub open_flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_8__bindgen_ty_1 { + pub start_id: __u32, + pub prog_id: __u32, + pub map_id: __u32, + pub btf_id: __u32, + pub link_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_9 { + pub bpf_fd: __u32, + pub info_len: __u32, + pub info: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_10 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_10__bindgen_ty_1, + pub attach_type: __u32, + pub query_flags: __u32, + pub attach_flags: __u32, + pub prog_ids: __u64, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_10__bindgen_ty_2, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub prog_attach_flags: __u64, + pub link_ids: __u64, + pub link_attach_flags: __u64, + pub revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_10__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_10__bindgen_ty_2 { + pub prog_cnt: __u32, + pub count: __u32, +} +impl bpf_attr__bindgen_ty_10 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_11 { + pub name: __u64, + pub prog_fd: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_attr__bindgen_ty_11 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_12 { + pub btf: __u64, + pub btf_log_buf: __u64, + pub btf_size: __u32, + pub btf_log_size: __u32, + pub btf_log_level: __u32, + pub btf_log_true_size: __u32, + pub btf_flags: __u32, + pub btf_token_fd: __s32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_13 { + pub pid: __u32, + pub fd: __u32, + pub flags: __u32, + pub buf_len: __u32, + pub buf: __u64, + pub prog_id: __u32, + pub fd_type: __u32, + pub probe_offset: __u64, + pub probe_addr: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_1, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_14__bindgen_ty_2, + pub attach_type: __u32, + pub flags: __u32, + pub __bindgen_anon_3: bpf_attr__bindgen_ty_14__bindgen_ty_3, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_1 { + pub prog_fd: __u32, + pub map_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3 { + pub target_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1, + pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2, + pub kprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3, + pub tracing: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4, + pub netfilter: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5, + pub tcx: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6, + pub uprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7, + pub netkit: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 { + pub iter_info: __u64, + pub iter_info_len: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 { + pub bpf_cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 { + pub flags: __u32, + pub cnt: __u32, + pub syms: __u64, + pub addrs: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 { + pub target_btf_id: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 { + pub pf: __u32, + pub hooknum: __u32, + pub priority: __s32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 { + pub path: __u64, + pub offsets: __u64, + pub ref_ctr_offsets: __u64, + pub cookies: __u64, + pub cnt: __u32, + pub flags: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_15 { + pub link_fd: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_15__bindgen_ty_1, + pub flags: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_15__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_15__bindgen_ty_1 { + pub new_prog_fd: __u32, + pub new_map_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_15__bindgen_ty_2 { + pub old_prog_fd: __u32, + pub old_map_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_16 { + pub link_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_17 { + pub type_: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_18 { + pub link_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_19 { + pub prog_fd: __u32, + pub map_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_20 { + pub flags: __u32, + pub bpffs_fd: __u32, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_func_id { + BPF_FUNC_unspec = 0, + BPF_FUNC_map_lookup_elem = 1, + BPF_FUNC_map_update_elem = 2, + BPF_FUNC_map_delete_elem = 3, + BPF_FUNC_probe_read = 4, + BPF_FUNC_ktime_get_ns = 5, + BPF_FUNC_trace_printk = 6, + BPF_FUNC_get_prandom_u32 = 7, + BPF_FUNC_get_smp_processor_id = 8, + BPF_FUNC_skb_store_bytes = 9, + BPF_FUNC_l3_csum_replace = 10, + BPF_FUNC_l4_csum_replace = 11, + BPF_FUNC_tail_call = 12, + BPF_FUNC_clone_redirect = 13, + BPF_FUNC_get_current_pid_tgid = 14, + BPF_FUNC_get_current_uid_gid = 15, + BPF_FUNC_get_current_comm = 16, + BPF_FUNC_get_cgroup_classid = 17, + BPF_FUNC_skb_vlan_push = 18, + BPF_FUNC_skb_vlan_pop = 19, + BPF_FUNC_skb_get_tunnel_key = 20, + BPF_FUNC_skb_set_tunnel_key = 21, + BPF_FUNC_perf_event_read = 22, + BPF_FUNC_redirect = 23, + BPF_FUNC_get_route_realm = 24, + BPF_FUNC_perf_event_output = 25, + BPF_FUNC_skb_load_bytes = 26, + BPF_FUNC_get_stackid = 27, + BPF_FUNC_csum_diff = 28, + BPF_FUNC_skb_get_tunnel_opt = 29, + BPF_FUNC_skb_set_tunnel_opt = 30, + BPF_FUNC_skb_change_proto = 31, + BPF_FUNC_skb_change_type = 32, + BPF_FUNC_skb_under_cgroup = 33, + BPF_FUNC_get_hash_recalc = 34, + BPF_FUNC_get_current_task = 35, + BPF_FUNC_probe_write_user = 36, + BPF_FUNC_current_task_under_cgroup = 37, + BPF_FUNC_skb_change_tail = 38, + BPF_FUNC_skb_pull_data = 39, + BPF_FUNC_csum_update = 40, + BPF_FUNC_set_hash_invalid = 41, + BPF_FUNC_get_numa_node_id = 42, + BPF_FUNC_skb_change_head = 43, + BPF_FUNC_xdp_adjust_head = 44, + BPF_FUNC_probe_read_str = 45, + BPF_FUNC_get_socket_cookie = 46, + BPF_FUNC_get_socket_uid = 47, + BPF_FUNC_set_hash = 48, + BPF_FUNC_setsockopt = 49, + BPF_FUNC_skb_adjust_room = 50, + BPF_FUNC_redirect_map = 51, + BPF_FUNC_sk_redirect_map = 52, + BPF_FUNC_sock_map_update = 53, + BPF_FUNC_xdp_adjust_meta = 54, + BPF_FUNC_perf_event_read_value = 55, + BPF_FUNC_perf_prog_read_value = 56, + BPF_FUNC_getsockopt = 57, + BPF_FUNC_override_return = 58, + BPF_FUNC_sock_ops_cb_flags_set = 59, + BPF_FUNC_msg_redirect_map = 60, + BPF_FUNC_msg_apply_bytes = 61, + BPF_FUNC_msg_cork_bytes = 62, + BPF_FUNC_msg_pull_data = 63, + BPF_FUNC_bind = 64, + BPF_FUNC_xdp_adjust_tail = 65, + BPF_FUNC_skb_get_xfrm_state = 66, + BPF_FUNC_get_stack = 67, + BPF_FUNC_skb_load_bytes_relative = 68, + BPF_FUNC_fib_lookup = 69, + BPF_FUNC_sock_hash_update = 70, + BPF_FUNC_msg_redirect_hash = 71, + BPF_FUNC_sk_redirect_hash = 72, + BPF_FUNC_lwt_push_encap = 73, + BPF_FUNC_lwt_seg6_store_bytes = 74, + BPF_FUNC_lwt_seg6_adjust_srh = 75, + BPF_FUNC_lwt_seg6_action = 76, + BPF_FUNC_rc_repeat = 77, + BPF_FUNC_rc_keydown = 78, + BPF_FUNC_skb_cgroup_id = 79, + BPF_FUNC_get_current_cgroup_id = 80, + BPF_FUNC_get_local_storage = 81, + BPF_FUNC_sk_select_reuseport = 82, + BPF_FUNC_skb_ancestor_cgroup_id = 83, + BPF_FUNC_sk_lookup_tcp = 84, + BPF_FUNC_sk_lookup_udp = 85, + BPF_FUNC_sk_release = 86, + BPF_FUNC_map_push_elem = 87, + BPF_FUNC_map_pop_elem = 88, + BPF_FUNC_map_peek_elem = 89, + BPF_FUNC_msg_push_data = 90, + BPF_FUNC_msg_pop_data = 91, + BPF_FUNC_rc_pointer_rel = 92, + BPF_FUNC_spin_lock = 93, + BPF_FUNC_spin_unlock = 94, + BPF_FUNC_sk_fullsock = 95, + BPF_FUNC_tcp_sock = 96, + BPF_FUNC_skb_ecn_set_ce = 97, + BPF_FUNC_get_listener_sock = 98, + BPF_FUNC_skc_lookup_tcp = 99, + BPF_FUNC_tcp_check_syncookie = 100, + BPF_FUNC_sysctl_get_name = 101, + BPF_FUNC_sysctl_get_current_value = 102, + BPF_FUNC_sysctl_get_new_value = 103, + BPF_FUNC_sysctl_set_new_value = 104, + BPF_FUNC_strtol = 105, + BPF_FUNC_strtoul = 106, + BPF_FUNC_sk_storage_get = 107, + BPF_FUNC_sk_storage_delete = 108, + BPF_FUNC_send_signal = 109, + BPF_FUNC_tcp_gen_syncookie = 110, + BPF_FUNC_skb_output = 111, + BPF_FUNC_probe_read_user = 112, + BPF_FUNC_probe_read_kernel = 113, + BPF_FUNC_probe_read_user_str = 114, + BPF_FUNC_probe_read_kernel_str = 115, + BPF_FUNC_tcp_send_ack = 116, + BPF_FUNC_send_signal_thread = 117, + BPF_FUNC_jiffies64 = 118, + BPF_FUNC_read_branch_records = 119, + BPF_FUNC_get_ns_current_pid_tgid = 120, + BPF_FUNC_xdp_output = 121, + BPF_FUNC_get_netns_cookie = 122, + BPF_FUNC_get_current_ancestor_cgroup_id = 123, + BPF_FUNC_sk_assign = 124, + BPF_FUNC_ktime_get_boot_ns = 125, + BPF_FUNC_seq_printf = 126, + BPF_FUNC_seq_write = 127, + BPF_FUNC_sk_cgroup_id = 128, + BPF_FUNC_sk_ancestor_cgroup_id = 129, + BPF_FUNC_ringbuf_output = 130, + BPF_FUNC_ringbuf_reserve = 131, + BPF_FUNC_ringbuf_submit = 132, + BPF_FUNC_ringbuf_discard = 133, + BPF_FUNC_ringbuf_query = 134, + BPF_FUNC_csum_level = 135, + BPF_FUNC_skc_to_tcp6_sock = 136, + BPF_FUNC_skc_to_tcp_sock = 137, + BPF_FUNC_skc_to_tcp_timewait_sock = 138, + BPF_FUNC_skc_to_tcp_request_sock = 139, + BPF_FUNC_skc_to_udp6_sock = 140, + BPF_FUNC_get_task_stack = 141, + BPF_FUNC_load_hdr_opt = 142, + BPF_FUNC_store_hdr_opt = 143, + BPF_FUNC_reserve_hdr_opt = 144, + BPF_FUNC_inode_storage_get = 145, + BPF_FUNC_inode_storage_delete = 146, + BPF_FUNC_d_path = 147, + BPF_FUNC_copy_from_user = 148, + BPF_FUNC_snprintf_btf = 149, + BPF_FUNC_seq_printf_btf = 150, + BPF_FUNC_skb_cgroup_classid = 151, + BPF_FUNC_redirect_neigh = 152, + BPF_FUNC_per_cpu_ptr = 153, + BPF_FUNC_this_cpu_ptr = 154, + BPF_FUNC_redirect_peer = 155, + BPF_FUNC_task_storage_get = 156, + BPF_FUNC_task_storage_delete = 157, + BPF_FUNC_get_current_task_btf = 158, + BPF_FUNC_bprm_opts_set = 159, + BPF_FUNC_ktime_get_coarse_ns = 160, + BPF_FUNC_ima_inode_hash = 161, + BPF_FUNC_sock_from_file = 162, + BPF_FUNC_check_mtu = 163, + BPF_FUNC_for_each_map_elem = 164, + BPF_FUNC_snprintf = 165, + BPF_FUNC_sys_bpf = 166, + BPF_FUNC_btf_find_by_name_kind = 167, + BPF_FUNC_sys_close = 168, + BPF_FUNC_timer_init = 169, + BPF_FUNC_timer_set_callback = 170, + BPF_FUNC_timer_start = 171, + BPF_FUNC_timer_cancel = 172, + BPF_FUNC_get_func_ip = 173, + BPF_FUNC_get_attach_cookie = 174, + BPF_FUNC_task_pt_regs = 175, + BPF_FUNC_get_branch_snapshot = 176, + BPF_FUNC_trace_vprintk = 177, + BPF_FUNC_skc_to_unix_sock = 178, + BPF_FUNC_kallsyms_lookup_name = 179, + BPF_FUNC_find_vma = 180, + BPF_FUNC_loop = 181, + BPF_FUNC_strncmp = 182, + BPF_FUNC_get_func_arg = 183, + BPF_FUNC_get_func_ret = 184, + BPF_FUNC_get_func_arg_cnt = 185, + BPF_FUNC_get_retval = 186, + BPF_FUNC_set_retval = 187, + BPF_FUNC_xdp_get_buff_len = 188, + BPF_FUNC_xdp_load_bytes = 189, + BPF_FUNC_xdp_store_bytes = 190, + BPF_FUNC_copy_from_user_task = 191, + BPF_FUNC_skb_set_tstamp = 192, + BPF_FUNC_ima_file_hash = 193, + BPF_FUNC_kptr_xchg = 194, + BPF_FUNC_map_lookup_percpu_elem = 195, + BPF_FUNC_skc_to_mptcp_sock = 196, + BPF_FUNC_dynptr_from_mem = 197, + BPF_FUNC_ringbuf_reserve_dynptr = 198, + BPF_FUNC_ringbuf_submit_dynptr = 199, + BPF_FUNC_ringbuf_discard_dynptr = 200, + BPF_FUNC_dynptr_read = 201, + BPF_FUNC_dynptr_write = 202, + BPF_FUNC_dynptr_data = 203, + BPF_FUNC_tcp_raw_gen_syncookie_ipv4 = 204, + BPF_FUNC_tcp_raw_gen_syncookie_ipv6 = 205, + BPF_FUNC_tcp_raw_check_syncookie_ipv4 = 206, + BPF_FUNC_tcp_raw_check_syncookie_ipv6 = 207, + BPF_FUNC_ktime_get_tai_ns = 208, + BPF_FUNC_user_ringbuf_drain = 209, + BPF_FUNC_cgrp_storage_get = 210, + BPF_FUNC_cgrp_storage_delete = 211, + __BPF_FUNC_MAX_ID = 212, +} +pub const BPF_F_RECOMPUTE_CSUM: _bindgen_ty_6 = 1; +pub const BPF_F_INVALIDATE_HASH: _bindgen_ty_6 = 2; +pub type _bindgen_ty_6 = ::core::ffi::c_uint; +pub const BPF_F_HDR_FIELD_MASK: _bindgen_ty_7 = 15; +pub type _bindgen_ty_7 = ::core::ffi::c_uint; +pub const BPF_F_PSEUDO_HDR: _bindgen_ty_8 = 16; +pub const BPF_F_MARK_MANGLED_0: _bindgen_ty_8 = 32; +pub const BPF_F_MARK_ENFORCE: _bindgen_ty_8 = 64; +pub type _bindgen_ty_8 = ::core::ffi::c_uint; +pub const BPF_F_INGRESS: _bindgen_ty_9 = 1; +pub type _bindgen_ty_9 = ::core::ffi::c_uint; +pub const BPF_F_TUNINFO_IPV6: _bindgen_ty_10 = 1; +pub type _bindgen_ty_10 = ::core::ffi::c_uint; +pub const BPF_F_SKIP_FIELD_MASK: _bindgen_ty_11 = 255; +pub const BPF_F_USER_STACK: _bindgen_ty_11 = 256; +pub const BPF_F_FAST_STACK_CMP: _bindgen_ty_11 = 512; +pub const BPF_F_REUSE_STACKID: _bindgen_ty_11 = 1024; +pub const BPF_F_USER_BUILD_ID: _bindgen_ty_11 = 2048; +pub type _bindgen_ty_11 = ::core::ffi::c_uint; +pub const BPF_F_ZERO_CSUM_TX: _bindgen_ty_12 = 2; +pub const BPF_F_DONT_FRAGMENT: _bindgen_ty_12 = 4; +pub const BPF_F_SEQ_NUMBER: _bindgen_ty_12 = 8; +pub const BPF_F_NO_TUNNEL_KEY: _bindgen_ty_12 = 16; +pub type _bindgen_ty_12 = ::core::ffi::c_uint; +pub const BPF_F_TUNINFO_FLAGS: _bindgen_ty_13 = 16; +pub type _bindgen_ty_13 = ::core::ffi::c_uint; +pub const BPF_F_INDEX_MASK: _bindgen_ty_14 = 4294967295; +pub const BPF_F_CURRENT_CPU: _bindgen_ty_14 = 4294967295; +pub const BPF_F_CTXLEN_MASK: _bindgen_ty_14 = 4503595332403200; +pub type _bindgen_ty_14 = ::core::ffi::c_ulong; +pub const BPF_F_CURRENT_NETNS: _bindgen_ty_15 = -1; +pub type _bindgen_ty_15 = ::core::ffi::c_int; +pub const BPF_CSUM_LEVEL_QUERY: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_QUERY; +pub const BPF_CSUM_LEVEL_INC: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_INC; +pub const BPF_CSUM_LEVEL_DEC: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_DEC; +pub const BPF_CSUM_LEVEL_RESET: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_RESET; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_16 { + BPF_CSUM_LEVEL_QUERY = 0, + BPF_CSUM_LEVEL_INC = 1, + BPF_CSUM_LEVEL_DEC = 2, + BPF_CSUM_LEVEL_RESET = 3, +} +pub const BPF_F_ADJ_ROOM_FIXED_GSO: _bindgen_ty_17 = 1; +pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: _bindgen_ty_17 = 2; +pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: _bindgen_ty_17 = 4; +pub const BPF_F_ADJ_ROOM_ENCAP_L4_GRE: _bindgen_ty_17 = 8; +pub const BPF_F_ADJ_ROOM_ENCAP_L4_UDP: _bindgen_ty_17 = 16; +pub const BPF_F_ADJ_ROOM_NO_CSUM_RESET: _bindgen_ty_17 = 32; +pub const BPF_F_ADJ_ROOM_ENCAP_L2_ETH: _bindgen_ty_17 = 64; +pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV4: _bindgen_ty_17 = 128; +pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV6: _bindgen_ty_17 = 256; +pub type _bindgen_ty_17 = ::core::ffi::c_uint; +pub const BPF_ADJ_ROOM_ENCAP_L2_MASK: _bindgen_ty_18 = _bindgen_ty_18::BPF_ADJ_ROOM_ENCAP_L2_MASK; +pub const BPF_ADJ_ROOM_ENCAP_L2_SHIFT: _bindgen_ty_18 = _bindgen_ty_18::BPF_ADJ_ROOM_ENCAP_L2_SHIFT; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_18 { + BPF_ADJ_ROOM_ENCAP_L2_MASK = 255, + BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 56, +} +pub const BPF_F_SYSCTL_BASE_NAME: _bindgen_ty_19 = 1; +pub type _bindgen_ty_19 = ::core::ffi::c_uint; +pub const BPF_LOCAL_STORAGE_GET_F_CREATE: _bindgen_ty_20 = + _bindgen_ty_20::BPF_LOCAL_STORAGE_GET_F_CREATE; +pub const BPF_SK_STORAGE_GET_F_CREATE: _bindgen_ty_20 = + _bindgen_ty_20::BPF_LOCAL_STORAGE_GET_F_CREATE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_20 { + BPF_LOCAL_STORAGE_GET_F_CREATE = 1, +} +pub const BPF_F_GET_BRANCH_RECORDS_SIZE: _bindgen_ty_21 = 1; +pub type _bindgen_ty_21 = ::core::ffi::c_uint; +pub const BPF_RB_NO_WAKEUP: _bindgen_ty_22 = _bindgen_ty_22::BPF_RB_NO_WAKEUP; +pub const BPF_RB_FORCE_WAKEUP: _bindgen_ty_22 = _bindgen_ty_22::BPF_RB_FORCE_WAKEUP; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_22 { + BPF_RB_NO_WAKEUP = 1, + BPF_RB_FORCE_WAKEUP = 2, +} +pub const BPF_RB_AVAIL_DATA: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_AVAIL_DATA; +pub const BPF_RB_RING_SIZE: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_RING_SIZE; +pub const BPF_RB_CONS_POS: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_CONS_POS; +pub const BPF_RB_PROD_POS: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_PROD_POS; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_23 { + BPF_RB_AVAIL_DATA = 0, + BPF_RB_RING_SIZE = 1, + BPF_RB_CONS_POS = 2, + BPF_RB_PROD_POS = 3, +} +pub const BPF_RINGBUF_BUSY_BIT: _bindgen_ty_24 = 2147483648; +pub const BPF_RINGBUF_DISCARD_BIT: _bindgen_ty_24 = 1073741824; +pub const BPF_RINGBUF_HDR_SZ: _bindgen_ty_24 = 8; +pub type _bindgen_ty_24 = ::core::ffi::c_uint; +pub const BPF_SK_LOOKUP_F_REPLACE: _bindgen_ty_25 = _bindgen_ty_25::BPF_SK_LOOKUP_F_REPLACE; +pub const BPF_SK_LOOKUP_F_NO_REUSEPORT: _bindgen_ty_25 = + _bindgen_ty_25::BPF_SK_LOOKUP_F_NO_REUSEPORT; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_25 { + BPF_SK_LOOKUP_F_REPLACE = 1, + BPF_SK_LOOKUP_F_NO_REUSEPORT = 2, +} +pub const BPF_F_BPRM_SECUREEXEC: _bindgen_ty_26 = 1; +pub type _bindgen_ty_26 = ::core::ffi::c_uint; +pub const BPF_F_BROADCAST: _bindgen_ty_27 = 8; +pub const BPF_F_EXCLUDE_INGRESS: _bindgen_ty_27 = 16; +pub type _bindgen_ty_27 = ::core::ffi::c_uint; +pub const BPF_SKB_TSTAMP_UNSPEC: _bindgen_ty_28 = _bindgen_ty_28::BPF_SKB_TSTAMP_UNSPEC; +pub const BPF_SKB_TSTAMP_DELIVERY_MONO: _bindgen_ty_28 = + _bindgen_ty_28::BPF_SKB_TSTAMP_DELIVERY_MONO; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_28 { + BPF_SKB_TSTAMP_UNSPEC = 0, + BPF_SKB_TSTAMP_DELIVERY_MONO = 1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_devmap_val { + pub ifindex: __u32, + pub bpf_prog: bpf_devmap_val__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_devmap_val__bindgen_ty_1 { + pub fd: ::core::ffi::c_int, + pub id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_cpumap_val { + pub qsize: __u32, + pub bpf_prog: bpf_cpumap_val__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_cpumap_val__bindgen_ty_1 { + pub fd: ::core::ffi::c_int, + pub id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_prog_info { + pub type_: __u32, + pub id: __u32, + pub tag: [__u8; 8usize], + pub jited_prog_len: __u32, + pub xlated_prog_len: __u32, + pub jited_prog_insns: __u64, + pub xlated_prog_insns: __u64, + pub load_time: __u64, + pub created_by_uid: __u32, + pub nr_map_ids: __u32, + pub map_ids: __u64, + pub name: [::core::ffi::c_char; 16usize], + pub ifindex: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub netns_dev: __u64, + pub netns_ino: __u64, + pub nr_jited_ksyms: __u32, + pub nr_jited_func_lens: __u32, + pub jited_ksyms: __u64, + pub jited_func_lens: __u64, + pub btf_id: __u32, + pub func_info_rec_size: __u32, + pub func_info: __u64, + pub nr_func_info: __u32, + pub nr_line_info: __u32, + pub line_info: __u64, + pub jited_line_info: __u64, + pub nr_jited_line_info: __u32, + pub line_info_rec_size: __u32, + pub jited_line_info_rec_size: __u32, + pub nr_prog_tags: __u32, + pub prog_tags: __u64, + pub run_time_ns: __u64, + pub run_cnt: __u64, + pub recursion_misses: __u64, + pub verified_insns: __u32, + pub attach_btf_obj_id: __u32, + pub attach_btf_id: __u32, +} +impl bpf_prog_info { + #[inline] + pub fn gpl_compatible(&self) -> __u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_gpl_compatible(&mut self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let gpl_compatible: u32 = unsafe { ::core::mem::transmute(gpl_compatible) }; + gpl_compatible as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_map_info { + pub type_: __u32, + pub id: __u32, + pub key_size: __u32, + pub value_size: __u32, + pub max_entries: __u32, + pub map_flags: __u32, + pub name: [::core::ffi::c_char; 16usize], + pub ifindex: __u32, + pub btf_vmlinux_value_type_id: __u32, + pub netns_dev: __u64, + pub netns_ino: __u64, + pub btf_id: __u32, + pub btf_key_type_id: __u32, + pub btf_value_type_id: __u32, + pub btf_vmlinux_id: __u32, + pub map_extra: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_btf_info { + pub btf: __u64, + pub btf_size: __u32, + pub id: __u32, + pub name: __u64, + pub name_len: __u32, + pub kernel_btf: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info { + pub type_: __u32, + pub id: __u32, + pub prog_id: __u32, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1 { + pub raw_tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_1, + pub tracing: bpf_link_info__bindgen_ty_1__bindgen_ty_2, + pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_3, + pub iter: bpf_link_info__bindgen_ty_1__bindgen_ty_4, + pub netns: bpf_link_info__bindgen_ty_1__bindgen_ty_5, + pub xdp: bpf_link_info__bindgen_ty_1__bindgen_ty_6, + pub struct_ops: bpf_link_info__bindgen_ty_1__bindgen_ty_7, + pub netfilter: bpf_link_info__bindgen_ty_1__bindgen_ty_8, + pub kprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_9, + pub uprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_10, + pub perf_event: bpf_link_info__bindgen_ty_1__bindgen_ty_11, + pub tcx: bpf_link_info__bindgen_ty_1__bindgen_ty_12, + pub netkit: bpf_link_info__bindgen_ty_1__bindgen_ty_13, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_1 { + pub tp_name: __u64, + pub tp_name_len: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_2 { + pub attach_type: __u32, + pub target_obj_id: __u32, + pub target_btf_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_3 { + pub cgroup_id: __u64, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4 { + pub target_name: __u64, + pub target_name_len: __u32, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, + pub __bindgen_anon_2: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 { + pub map: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 { + pub map_id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 { + pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1, + pub task: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 { + pub cgroup_id: __u64, + pub order: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 { + pub tid: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_5 { + pub netns_ino: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_6 { + pub ifindex: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_7 { + pub map_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_8 { + pub pf: __u32, + pub hooknum: __u32, + pub priority: __s32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_9 { + pub addrs: __u64, + pub count: __u32, + pub flags: __u32, + pub missed: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_10 { + pub path: __u64, + pub offsets: __u64, + pub ref_ctr_offsets: __u64, + pub cookies: __u64, + pub path_size: __u32, + pub count: __u32, + pub flags: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11 { + pub type_: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 { + pub uprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1, + pub kprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2, + pub tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3, + pub event: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 { + pub file_name: __u64, + pub name_len: __u32, + pub offset: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 { + pub func_name: __u64, + pub name_len: __u32, + pub offset: __u32, + pub addr: __u64, + pub missed: __u64, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 { + pub tp_name: __u64, + pub name_len: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 { + pub config: __u64, + pub type_: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_12 { + pub ifindex: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_13 { + pub ifindex: __u32, + pub attach_type: __u32, +} +pub const BPF_SOCK_OPS_RTO_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_RTO_CB_FLAG; +pub const BPF_SOCK_OPS_RETRANS_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_RETRANS_CB_FLAG; +pub const BPF_SOCK_OPS_STATE_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_STATE_CB_FLAG; +pub const BPF_SOCK_OPS_RTT_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_RTT_CB_FLAG; +pub const BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_ALL_CB_FLAGS: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_ALL_CB_FLAGS; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_29 { + BPF_SOCK_OPS_RTO_CB_FLAG = 1, + BPF_SOCK_OPS_RETRANS_CB_FLAG = 2, + BPF_SOCK_OPS_STATE_CB_FLAG = 4, + BPF_SOCK_OPS_RTT_CB_FLAG = 8, + BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG = 16, + BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG = 32, + BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG = 64, + BPF_SOCK_OPS_ALL_CB_FLAGS = 127, +} +pub const BPF_SOCK_OPS_VOID: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_VOID; +pub const BPF_SOCK_OPS_TIMEOUT_INIT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TIMEOUT_INIT; +pub const BPF_SOCK_OPS_RWND_INIT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RWND_INIT; +pub const BPF_SOCK_OPS_TCP_CONNECT_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TCP_CONNECT_CB; +pub const BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB; +pub const BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB; +pub const BPF_SOCK_OPS_NEEDS_ECN: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_NEEDS_ECN; +pub const BPF_SOCK_OPS_BASE_RTT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_BASE_RTT; +pub const BPF_SOCK_OPS_RTO_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RTO_CB; +pub const BPF_SOCK_OPS_RETRANS_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RETRANS_CB; +pub const BPF_SOCK_OPS_STATE_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_STATE_CB; +pub const BPF_SOCK_OPS_TCP_LISTEN_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TCP_LISTEN_CB; +pub const BPF_SOCK_OPS_RTT_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RTT_CB; +pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_PARSE_HDR_OPT_CB; +pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_HDR_OPT_LEN_CB; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_WRITE_HDR_OPT_CB; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_30 { + BPF_SOCK_OPS_VOID = 0, + BPF_SOCK_OPS_TIMEOUT_INIT = 1, + BPF_SOCK_OPS_RWND_INIT = 2, + BPF_SOCK_OPS_TCP_CONNECT_CB = 3, + BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 4, + BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 5, + BPF_SOCK_OPS_NEEDS_ECN = 6, + BPF_SOCK_OPS_BASE_RTT = 7, + BPF_SOCK_OPS_RTO_CB = 8, + BPF_SOCK_OPS_RETRANS_CB = 9, + BPF_SOCK_OPS_STATE_CB = 10, + BPF_SOCK_OPS_TCP_LISTEN_CB = 11, + BPF_SOCK_OPS_RTT_CB = 12, + BPF_SOCK_OPS_PARSE_HDR_OPT_CB = 13, + BPF_SOCK_OPS_HDR_OPT_LEN_CB = 14, + BPF_SOCK_OPS_WRITE_HDR_OPT_CB = 15, +} +pub const BPF_TCP_ESTABLISHED: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_ESTABLISHED; +pub const BPF_TCP_SYN_SENT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_SYN_SENT; +pub const BPF_TCP_SYN_RECV: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_SYN_RECV; +pub const BPF_TCP_FIN_WAIT1: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_FIN_WAIT1; +pub const BPF_TCP_FIN_WAIT2: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_FIN_WAIT2; +pub const BPF_TCP_TIME_WAIT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_TIME_WAIT; +pub const BPF_TCP_CLOSE: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSE; +pub const BPF_TCP_CLOSE_WAIT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSE_WAIT; +pub const BPF_TCP_LAST_ACK: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_LAST_ACK; +pub const BPF_TCP_LISTEN: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_LISTEN; +pub const BPF_TCP_CLOSING: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSING; +pub const BPF_TCP_NEW_SYN_RECV: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_NEW_SYN_RECV; +pub const BPF_TCP_BOUND_INACTIVE: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_BOUND_INACTIVE; +pub const BPF_TCP_MAX_STATES: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_MAX_STATES; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_31 { + BPF_TCP_ESTABLISHED = 1, + BPF_TCP_SYN_SENT = 2, + BPF_TCP_SYN_RECV = 3, + BPF_TCP_FIN_WAIT1 = 4, + BPF_TCP_FIN_WAIT2 = 5, + BPF_TCP_TIME_WAIT = 6, + BPF_TCP_CLOSE = 7, + BPF_TCP_CLOSE_WAIT = 8, + BPF_TCP_LAST_ACK = 9, + BPF_TCP_LISTEN = 10, + BPF_TCP_CLOSING = 11, + BPF_TCP_NEW_SYN_RECV = 12, + BPF_TCP_BOUND_INACTIVE = 13, + BPF_TCP_MAX_STATES = 14, +} +pub const BPF_LOAD_HDR_OPT_TCP_SYN: _bindgen_ty_33 = _bindgen_ty_33::BPF_LOAD_HDR_OPT_TCP_SYN; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_33 { + BPF_LOAD_HDR_OPT_TCP_SYN = 1, +} +pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: _bindgen_ty_34 = + _bindgen_ty_34::BPF_WRITE_HDR_TCP_CURRENT_MSS; +pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: _bindgen_ty_34 = + _bindgen_ty_34::BPF_WRITE_HDR_TCP_SYNACK_COOKIE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_34 { + BPF_WRITE_HDR_TCP_CURRENT_MSS = 1, + BPF_WRITE_HDR_TCP_SYNACK_COOKIE = 2, +} +pub const BPF_DEVCG_ACC_MKNOD: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_MKNOD; +pub const BPF_DEVCG_ACC_READ: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_READ; +pub const BPF_DEVCG_ACC_WRITE: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_WRITE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_35 { + BPF_DEVCG_ACC_MKNOD = 1, + BPF_DEVCG_ACC_READ = 2, + BPF_DEVCG_ACC_WRITE = 4, +} +pub const BPF_DEVCG_DEV_BLOCK: _bindgen_ty_36 = _bindgen_ty_36::BPF_DEVCG_DEV_BLOCK; +pub const BPF_DEVCG_DEV_CHAR: _bindgen_ty_36 = _bindgen_ty_36::BPF_DEVCG_DEV_CHAR; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_36 { + BPF_DEVCG_DEV_BLOCK = 1, + BPF_DEVCG_DEV_CHAR = 2, +} +pub const BPF_FIB_LOOKUP_DIRECT: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_DIRECT; +pub const BPF_FIB_LOOKUP_OUTPUT: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_OUTPUT; +pub const BPF_FIB_LOOKUP_SKIP_NEIGH: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_SKIP_NEIGH; +pub const BPF_FIB_LOOKUP_TBID: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_TBID; +pub const BPF_FIB_LOOKUP_SRC: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_SRC; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_37 { + BPF_FIB_LOOKUP_DIRECT = 1, + BPF_FIB_LOOKUP_OUTPUT = 2, + BPF_FIB_LOOKUP_SKIP_NEIGH = 4, + BPF_FIB_LOOKUP_TBID = 8, + BPF_FIB_LOOKUP_SRC = 16, +} +pub const BPF_FIB_LKUP_RET_SUCCESS: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_SUCCESS; +pub const BPF_FIB_LKUP_RET_BLACKHOLE: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_BLACKHOLE; +pub const BPF_FIB_LKUP_RET_UNREACHABLE: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_UNREACHABLE; +pub const BPF_FIB_LKUP_RET_PROHIBIT: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_PROHIBIT; +pub const BPF_FIB_LKUP_RET_NOT_FWDED: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_NOT_FWDED; +pub const BPF_FIB_LKUP_RET_FWD_DISABLED: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_FWD_DISABLED; +pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_UNSUPP_LWT; +pub const BPF_FIB_LKUP_RET_NO_NEIGH: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_NO_NEIGH; +pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_FRAG_NEEDED; +pub const BPF_FIB_LKUP_RET_NO_SRC_ADDR: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_NO_SRC_ADDR; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_38 { + BPF_FIB_LKUP_RET_SUCCESS = 0, + BPF_FIB_LKUP_RET_BLACKHOLE = 1, + BPF_FIB_LKUP_RET_UNREACHABLE = 2, + BPF_FIB_LKUP_RET_PROHIBIT = 3, + BPF_FIB_LKUP_RET_NOT_FWDED = 4, + BPF_FIB_LKUP_RET_FWD_DISABLED = 5, + BPF_FIB_LKUP_RET_UNSUPP_LWT = 6, + BPF_FIB_LKUP_RET_NO_NEIGH = 7, + BPF_FIB_LKUP_RET_FRAG_NEEDED = 8, + BPF_FIB_LKUP_RET_NO_SRC_ADDR = 9, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_task_fd_type { + BPF_FD_TYPE_RAW_TRACEPOINT = 0, + BPF_FD_TYPE_TRACEPOINT = 1, + BPF_FD_TYPE_KPROBE = 2, + BPF_FD_TYPE_KRETPROBE = 3, + BPF_FD_TYPE_UPROBE = 4, + BPF_FD_TYPE_URETPROBE = 5, +} +pub const BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_39 { + BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 1, + BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 2, + BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 4, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_func_info { + pub insn_off: __u32, + pub type_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_line_info { + pub insn_off: __u32, + pub file_name_off: __u32, + pub line_off: __u32, + pub line_col: __u32, +} +pub const BPF_F_TIMER_ABS: _bindgen_ty_41 = 1; +pub const BPF_F_TIMER_CPU_PIN: _bindgen_ty_41 = 2; +pub type _bindgen_ty_41 = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_header { + pub magic: __u16, + pub version: __u8, + pub flags: __u8, + pub hdr_len: __u32, + pub type_off: __u32, + pub type_len: __u32, + pub str_off: __u32, + pub str_len: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct btf_type { + pub name_off: __u32, + pub info: __u32, + pub __bindgen_anon_1: btf_type__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union btf_type__bindgen_ty_1 { + pub size: __u32, + pub type_: __u32, +} +pub const BTF_KIND_UNKN: _bindgen_ty_42 = 0; +pub const BTF_KIND_INT: _bindgen_ty_42 = 1; +pub const BTF_KIND_PTR: _bindgen_ty_42 = 2; +pub const BTF_KIND_ARRAY: _bindgen_ty_42 = 3; +pub const BTF_KIND_STRUCT: _bindgen_ty_42 = 4; +pub const BTF_KIND_UNION: _bindgen_ty_42 = 5; +pub const BTF_KIND_ENUM: _bindgen_ty_42 = 6; +pub const BTF_KIND_FWD: _bindgen_ty_42 = 7; +pub const BTF_KIND_TYPEDEF: _bindgen_ty_42 = 8; +pub const BTF_KIND_VOLATILE: _bindgen_ty_42 = 9; +pub const BTF_KIND_CONST: _bindgen_ty_42 = 10; +pub const BTF_KIND_RESTRICT: _bindgen_ty_42 = 11; +pub const BTF_KIND_FUNC: _bindgen_ty_42 = 12; +pub const BTF_KIND_FUNC_PROTO: _bindgen_ty_42 = 13; +pub const BTF_KIND_VAR: _bindgen_ty_42 = 14; +pub const BTF_KIND_DATASEC: _bindgen_ty_42 = 15; +pub const BTF_KIND_FLOAT: _bindgen_ty_42 = 16; +pub const BTF_KIND_DECL_TAG: _bindgen_ty_42 = 17; +pub const BTF_KIND_TYPE_TAG: _bindgen_ty_42 = 18; +pub const BTF_KIND_ENUM64: _bindgen_ty_42 = 19; +pub const NR_BTF_KINDS: _bindgen_ty_42 = 20; +pub const BTF_KIND_MAX: _bindgen_ty_42 = 19; +pub type _bindgen_ty_42 = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_enum { + pub name_off: __u32, + pub val: __s32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_array { + pub type_: __u32, + pub index_type: __u32, + pub nelems: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_member { + pub name_off: __u32, + pub type_: __u32, + pub offset: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_param { + pub name_off: __u32, + pub type_: __u32, +} +pub const BTF_VAR_STATIC: _bindgen_ty_43 = 0; +pub const BTF_VAR_GLOBAL_ALLOCATED: _bindgen_ty_43 = 1; +pub const BTF_VAR_GLOBAL_EXTERN: _bindgen_ty_43 = 2; +pub type _bindgen_ty_43 = ::core::ffi::c_uint; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum btf_func_linkage { + BTF_FUNC_STATIC = 0, + BTF_FUNC_GLOBAL = 1, + BTF_FUNC_EXTERN = 2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_var { + pub linkage: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_var_secinfo { + pub type_: __u32, + pub offset: __u32, + pub size: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_decl_tag { + pub component_idx: __s32, +} +impl nlmsgerr_attrs { + pub const NLMSGERR_ATTR_MAX: nlmsgerr_attrs = nlmsgerr_attrs::NLMSGERR_ATTR_COOKIE; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum nlmsgerr_attrs { + NLMSGERR_ATTR_UNUSED = 0, + NLMSGERR_ATTR_MSG = 1, + NLMSGERR_ATTR_OFFS = 2, + NLMSGERR_ATTR_COOKIE = 3, + __NLMSGERR_ATTR_MAX = 4, +} +pub const IFLA_XDP_UNSPEC: _bindgen_ty_92 = 0; +pub const IFLA_XDP_FD: _bindgen_ty_92 = 1; +pub const IFLA_XDP_ATTACHED: _bindgen_ty_92 = 2; +pub const IFLA_XDP_FLAGS: _bindgen_ty_92 = 3; +pub const IFLA_XDP_PROG_ID: _bindgen_ty_92 = 4; +pub const IFLA_XDP_DRV_PROG_ID: _bindgen_ty_92 = 5; +pub const IFLA_XDP_SKB_PROG_ID: _bindgen_ty_92 = 6; +pub const IFLA_XDP_HW_PROG_ID: _bindgen_ty_92 = 7; +pub const IFLA_XDP_EXPECTED_FD: _bindgen_ty_92 = 8; +pub const __IFLA_XDP_MAX: _bindgen_ty_92 = 9; +pub type _bindgen_ty_92 = ::core::ffi::c_uint; +impl nf_inet_hooks { + pub const NF_INET_INGRESS: nf_inet_hooks = nf_inet_hooks::NF_INET_NUMHOOKS; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum nf_inet_hooks { + NF_INET_PRE_ROUTING = 0, + NF_INET_LOCAL_IN = 1, + NF_INET_FORWARD = 2, + NF_INET_LOCAL_OUT = 3, + NF_INET_POST_ROUTING = 4, + NF_INET_NUMHOOKS = 5, +} +pub const NFPROTO_UNSPEC: _bindgen_ty_99 = 0; +pub const NFPROTO_INET: _bindgen_ty_99 = 1; +pub const NFPROTO_IPV4: _bindgen_ty_99 = 2; +pub const NFPROTO_ARP: _bindgen_ty_99 = 3; +pub const NFPROTO_NETDEV: _bindgen_ty_99 = 5; +pub const NFPROTO_BRIDGE: _bindgen_ty_99 = 7; +pub const NFPROTO_IPV6: _bindgen_ty_99 = 10; +pub const NFPROTO_DECNET: _bindgen_ty_99 = 12; +pub const NFPROTO_NUMPROTO: _bindgen_ty_99 = 13; +pub type _bindgen_ty_99 = ::core::ffi::c_uint; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_type_id { + PERF_TYPE_HARDWARE = 0, + PERF_TYPE_SOFTWARE = 1, + PERF_TYPE_TRACEPOINT = 2, + PERF_TYPE_HW_CACHE = 3, + PERF_TYPE_RAW = 4, + PERF_TYPE_BREAKPOINT = 5, + PERF_TYPE_MAX = 6, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_hw_id { + PERF_COUNT_HW_CPU_CYCLES = 0, + PERF_COUNT_HW_INSTRUCTIONS = 1, + PERF_COUNT_HW_CACHE_REFERENCES = 2, + PERF_COUNT_HW_CACHE_MISSES = 3, + PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 4, + PERF_COUNT_HW_BRANCH_MISSES = 5, + PERF_COUNT_HW_BUS_CYCLES = 6, + PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 7, + PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 8, + PERF_COUNT_HW_REF_CPU_CYCLES = 9, + PERF_COUNT_HW_MAX = 10, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_hw_cache_id { + PERF_COUNT_HW_CACHE_L1D = 0, + PERF_COUNT_HW_CACHE_L1I = 1, + PERF_COUNT_HW_CACHE_LL = 2, + PERF_COUNT_HW_CACHE_DTLB = 3, + PERF_COUNT_HW_CACHE_ITLB = 4, + PERF_COUNT_HW_CACHE_BPU = 5, + PERF_COUNT_HW_CACHE_NODE = 6, + PERF_COUNT_HW_CACHE_MAX = 7, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_hw_cache_op_id { + PERF_COUNT_HW_CACHE_OP_READ = 0, + PERF_COUNT_HW_CACHE_OP_WRITE = 1, + PERF_COUNT_HW_CACHE_OP_PREFETCH = 2, + PERF_COUNT_HW_CACHE_OP_MAX = 3, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_hw_cache_op_result_id { + PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0, + PERF_COUNT_HW_CACHE_RESULT_MISS = 1, + PERF_COUNT_HW_CACHE_RESULT_MAX = 2, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_sw_ids { + PERF_COUNT_SW_CPU_CLOCK = 0, + PERF_COUNT_SW_TASK_CLOCK = 1, + PERF_COUNT_SW_PAGE_FAULTS = 2, + PERF_COUNT_SW_CONTEXT_SWITCHES = 3, + PERF_COUNT_SW_CPU_MIGRATIONS = 4, + PERF_COUNT_SW_PAGE_FAULTS_MIN = 5, + PERF_COUNT_SW_PAGE_FAULTS_MAJ = 6, + PERF_COUNT_SW_ALIGNMENT_FAULTS = 7, + PERF_COUNT_SW_EMULATION_FAULTS = 8, + PERF_COUNT_SW_DUMMY = 9, + PERF_COUNT_SW_BPF_OUTPUT = 10, + PERF_COUNT_SW_CGROUP_SWITCHES = 11, + PERF_COUNT_SW_MAX = 12, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_event_sample_format { + PERF_SAMPLE_IP = 1, + PERF_SAMPLE_TID = 2, + PERF_SAMPLE_TIME = 4, + PERF_SAMPLE_ADDR = 8, + PERF_SAMPLE_READ = 16, + PERF_SAMPLE_CALLCHAIN = 32, + PERF_SAMPLE_ID = 64, + PERF_SAMPLE_CPU = 128, + PERF_SAMPLE_PERIOD = 256, + PERF_SAMPLE_STREAM_ID = 512, + PERF_SAMPLE_RAW = 1024, + PERF_SAMPLE_BRANCH_STACK = 2048, + PERF_SAMPLE_REGS_USER = 4096, + PERF_SAMPLE_STACK_USER = 8192, + PERF_SAMPLE_WEIGHT = 16384, + PERF_SAMPLE_DATA_SRC = 32768, + PERF_SAMPLE_IDENTIFIER = 65536, + PERF_SAMPLE_TRANSACTION = 131072, + PERF_SAMPLE_REGS_INTR = 262144, + PERF_SAMPLE_PHYS_ADDR = 524288, + PERF_SAMPLE_AUX = 1048576, + PERF_SAMPLE_CGROUP = 2097152, + PERF_SAMPLE_DATA_PAGE_SIZE = 4194304, + PERF_SAMPLE_CODE_PAGE_SIZE = 8388608, + PERF_SAMPLE_WEIGHT_STRUCT = 16777216, + PERF_SAMPLE_MAX = 33554432, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct perf_event_attr { + pub type_: __u32, + pub size: __u32, + pub config: __u64, + pub __bindgen_anon_1: perf_event_attr__bindgen_ty_1, + pub sample_type: __u64, + pub read_format: __u64, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, + pub __bindgen_anon_2: perf_event_attr__bindgen_ty_2, + pub bp_type: __u32, + pub __bindgen_anon_3: perf_event_attr__bindgen_ty_3, + pub __bindgen_anon_4: perf_event_attr__bindgen_ty_4, + pub branch_sample_type: __u64, + pub sample_regs_user: __u64, + pub sample_stack_user: __u32, + pub clockid: __s32, + pub sample_regs_intr: __u64, + pub aux_watermark: __u32, + pub sample_max_stack: __u16, + pub __reserved_2: __u16, + pub aux_sample_size: __u32, + pub __reserved_3: __u32, + pub sig_data: __u64, + pub config3: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_attr__bindgen_ty_1 { + pub sample_period: __u64, + pub sample_freq: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_attr__bindgen_ty_2 { + pub wakeup_events: __u32, + pub wakeup_watermark: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_attr__bindgen_ty_3 { + pub bp_addr: __u64, + pub kprobe_func: __u64, + pub uprobe_path: __u64, + pub config1: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_attr__bindgen_ty_4 { + pub bp_len: __u64, + pub kprobe_addr: __u64, + pub probe_offset: __u64, + pub config2: __u64, +} +impl perf_event_attr { + #[inline] + pub fn disabled(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_disabled(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn disabled_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_disabled_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn inherit(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } + } + #[inline] + pub fn set_inherit(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn inherit_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn pinned(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } + } + #[inline] + pub fn set_pinned(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pinned_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_pinned_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclusive(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclusive(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclusive_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclusive_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_user(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_user(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_kernel(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_kernel(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_hv(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_hv(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_hv_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_hv_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_idle(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_idle(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_idle_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_idle_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mmap(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } + } + #[inline] + pub fn set_mmap(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mmap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn comm(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } + } + #[inline] + pub fn set_comm(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn comm_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn freq(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } + } + #[inline] + pub fn set_freq(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn freq_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_freq_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn inherit_stat(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } + } + #[inline] + pub fn set_inherit_stat(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn inherit_stat_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_stat_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_on_exec(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } + } + #[inline] + pub fn set_enable_on_exec(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_enable_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn task(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) } + } + #[inline] + pub fn set_task(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn task_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_task_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn watermark(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) } + } + #[inline] + pub fn set_watermark(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn watermark_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_watermark_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn precise_ip(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 2u8) as u64) } + } + #[inline] + pub fn set_precise_ip(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(15usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn precise_ip_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 2u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_precise_ip_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn mmap_data(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } + } + #[inline] + pub fn set_mmap_data(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mmap_data_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_data_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn sample_id_all(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } + } + #[inline] + pub fn set_sample_id_all(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(18usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn sample_id_all_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sample_id_all_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_host(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_host(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(19usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_host_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_host_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_guest(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_guest(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(20usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_guest_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_guest_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_callchain_kernel(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_callchain_kernel(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(21usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_callchain_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 21usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 21usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_callchain_user(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_callchain_user(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(22usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_callchain_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 22usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 22usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mmap2(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) } + } + #[inline] + pub fn set_mmap2(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(23usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mmap2_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 23usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap2_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 23usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn comm_exec(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) } + } + #[inline] + pub fn set_comm_exec(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(24usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn comm_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 24usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 24usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn use_clockid(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) } + } + #[inline] + pub fn set_use_clockid(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(25usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn use_clockid_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 25usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_use_clockid_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 25usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn context_switch(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) } + } + #[inline] + pub fn set_context_switch(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(26usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn context_switch_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 26usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_context_switch_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 26usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn write_backward(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) } + } + #[inline] + pub fn set_write_backward(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(27usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn write_backward_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 27usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_write_backward_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 27usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn namespaces(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) } + } + #[inline] + pub fn set_namespaces(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(28usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn namespaces_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 28usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_namespaces_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 28usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn ksymbol(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) } + } + #[inline] + pub fn set_ksymbol(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(29usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn ksymbol_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 29usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_ksymbol_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 29usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn bpf_event(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u64) } + } + #[inline] + pub fn set_bpf_event(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(30usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn bpf_event_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 30usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_bpf_event_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 30usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn aux_output(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u64) } + } + #[inline] + pub fn set_aux_output(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(31usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn aux_output_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_aux_output_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cgroup(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } + } + #[inline] + pub fn set_cgroup(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(32usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cgroup_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cgroup_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn text_poke(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) } + } + #[inline] + pub fn set_text_poke(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(33usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn text_poke_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 33usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_text_poke_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 33usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn build_id(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) } + } + #[inline] + pub fn set_build_id(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(34usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn build_id_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 34usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_build_id_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 34usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn inherit_thread(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) } + } + #[inline] + pub fn set_inherit_thread(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(35usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn inherit_thread_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 35usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_thread_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 35usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn remove_on_exec(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) } + } + #[inline] + pub fn set_remove_on_exec(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(36usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn remove_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 36usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_remove_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 36usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn sigtrap(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } + } + #[inline] + pub fn set_sigtrap(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(37usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn sigtrap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 37usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sigtrap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 37usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn __reserved_1(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) } + } + #[inline] + pub fn set___reserved_1(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(38usize, 26u8, val as u64) + } + } + #[inline] + pub unsafe fn __reserved_1_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 38usize, + 26u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set___reserved_1_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 38usize, + 26u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + disabled: __u64, + inherit: __u64, + pinned: __u64, + exclusive: __u64, + exclude_user: __u64, + exclude_kernel: __u64, + exclude_hv: __u64, + exclude_idle: __u64, + mmap: __u64, + comm: __u64, + freq: __u64, + inherit_stat: __u64, + enable_on_exec: __u64, + task: __u64, + watermark: __u64, + precise_ip: __u64, + mmap_data: __u64, + sample_id_all: __u64, + exclude_host: __u64, + exclude_guest: __u64, + exclude_callchain_kernel: __u64, + exclude_callchain_user: __u64, + mmap2: __u64, + comm_exec: __u64, + use_clockid: __u64, + context_switch: __u64, + write_backward: __u64, + namespaces: __u64, + ksymbol: __u64, + bpf_event: __u64, + aux_output: __u64, + cgroup: __u64, + text_poke: __u64, + build_id: __u64, + inherit_thread: __u64, + remove_on_exec: __u64, + sigtrap: __u64, + __reserved_1: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let disabled: u64 = unsafe { ::core::mem::transmute(disabled) }; + disabled as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let inherit: u64 = unsafe { ::core::mem::transmute(inherit) }; + inherit as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let pinned: u64 = unsafe { ::core::mem::transmute(pinned) }; + pinned as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let exclusive: u64 = unsafe { ::core::mem::transmute(exclusive) }; + exclusive as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let exclude_user: u64 = unsafe { ::core::mem::transmute(exclude_user) }; + exclude_user as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let exclude_kernel: u64 = unsafe { ::core::mem::transmute(exclude_kernel) }; + exclude_kernel as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let exclude_hv: u64 = unsafe { ::core::mem::transmute(exclude_hv) }; + exclude_hv as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let exclude_idle: u64 = unsafe { ::core::mem::transmute(exclude_idle) }; + exclude_idle as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let mmap: u64 = unsafe { ::core::mem::transmute(mmap) }; + mmap as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let comm: u64 = unsafe { ::core::mem::transmute(comm) }; + comm as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let freq: u64 = unsafe { ::core::mem::transmute(freq) }; + freq as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let inherit_stat: u64 = unsafe { ::core::mem::transmute(inherit_stat) }; + inherit_stat as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let enable_on_exec: u64 = unsafe { ::core::mem::transmute(enable_on_exec) }; + enable_on_exec as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let task: u64 = unsafe { ::core::mem::transmute(task) }; + task as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let watermark: u64 = unsafe { ::core::mem::transmute(watermark) }; + watermark as u64 + }); + __bindgen_bitfield_unit.set(15usize, 2u8, { + let precise_ip: u64 = unsafe { ::core::mem::transmute(precise_ip) }; + precise_ip as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let mmap_data: u64 = unsafe { ::core::mem::transmute(mmap_data) }; + mmap_data as u64 + }); + __bindgen_bitfield_unit.set(18usize, 1u8, { + let sample_id_all: u64 = unsafe { ::core::mem::transmute(sample_id_all) }; + sample_id_all as u64 + }); + __bindgen_bitfield_unit.set(19usize, 1u8, { + let exclude_host: u64 = unsafe { ::core::mem::transmute(exclude_host) }; + exclude_host as u64 + }); + __bindgen_bitfield_unit.set(20usize, 1u8, { + let exclude_guest: u64 = unsafe { ::core::mem::transmute(exclude_guest) }; + exclude_guest as u64 + }); + __bindgen_bitfield_unit.set(21usize, 1u8, { + let exclude_callchain_kernel: u64 = + unsafe { ::core::mem::transmute(exclude_callchain_kernel) }; + exclude_callchain_kernel as u64 + }); + __bindgen_bitfield_unit.set(22usize, 1u8, { + let exclude_callchain_user: u64 = + unsafe { ::core::mem::transmute(exclude_callchain_user) }; + exclude_callchain_user as u64 + }); + __bindgen_bitfield_unit.set(23usize, 1u8, { + let mmap2: u64 = unsafe { ::core::mem::transmute(mmap2) }; + mmap2 as u64 + }); + __bindgen_bitfield_unit.set(24usize, 1u8, { + let comm_exec: u64 = unsafe { ::core::mem::transmute(comm_exec) }; + comm_exec as u64 + }); + __bindgen_bitfield_unit.set(25usize, 1u8, { + let use_clockid: u64 = unsafe { ::core::mem::transmute(use_clockid) }; + use_clockid as u64 + }); + __bindgen_bitfield_unit.set(26usize, 1u8, { + let context_switch: u64 = unsafe { ::core::mem::transmute(context_switch) }; + context_switch as u64 + }); + __bindgen_bitfield_unit.set(27usize, 1u8, { + let write_backward: u64 = unsafe { ::core::mem::transmute(write_backward) }; + write_backward as u64 + }); + __bindgen_bitfield_unit.set(28usize, 1u8, { + let namespaces: u64 = unsafe { ::core::mem::transmute(namespaces) }; + namespaces as u64 + }); + __bindgen_bitfield_unit.set(29usize, 1u8, { + let ksymbol: u64 = unsafe { ::core::mem::transmute(ksymbol) }; + ksymbol as u64 + }); + __bindgen_bitfield_unit.set(30usize, 1u8, { + let bpf_event: u64 = unsafe { ::core::mem::transmute(bpf_event) }; + bpf_event as u64 + }); + __bindgen_bitfield_unit.set(31usize, 1u8, { + let aux_output: u64 = unsafe { ::core::mem::transmute(aux_output) }; + aux_output as u64 + }); + __bindgen_bitfield_unit.set(32usize, 1u8, { + let cgroup: u64 = unsafe { ::core::mem::transmute(cgroup) }; + cgroup as u64 + }); + __bindgen_bitfield_unit.set(33usize, 1u8, { + let text_poke: u64 = unsafe { ::core::mem::transmute(text_poke) }; + text_poke as u64 + }); + __bindgen_bitfield_unit.set(34usize, 1u8, { + let build_id: u64 = unsafe { ::core::mem::transmute(build_id) }; + build_id as u64 + }); + __bindgen_bitfield_unit.set(35usize, 1u8, { + let inherit_thread: u64 = unsafe { ::core::mem::transmute(inherit_thread) }; + inherit_thread as u64 + }); + __bindgen_bitfield_unit.set(36usize, 1u8, { + let remove_on_exec: u64 = unsafe { ::core::mem::transmute(remove_on_exec) }; + remove_on_exec as u64 + }); + __bindgen_bitfield_unit.set(37usize, 1u8, { + let sigtrap: u64 = unsafe { ::core::mem::transmute(sigtrap) }; + sigtrap as u64 + }); + __bindgen_bitfield_unit.set(38usize, 26u8, { + let __reserved_1: u64 = unsafe { ::core::mem::transmute(__reserved_1) }; + __reserved_1 as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct perf_event_mmap_page { + pub version: __u32, + pub compat_version: __u32, + pub lock: __u32, + pub index: __u32, + pub offset: __s64, + pub time_enabled: __u64, + pub time_running: __u64, + pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1, + pub pmc_width: __u16, + pub time_shift: __u16, + pub time_mult: __u32, + pub time_offset: __u64, + pub time_zero: __u64, + pub size: __u32, + pub __reserved_1: __u32, + pub time_cycles: __u64, + pub time_mask: __u64, + pub __reserved: [__u8; 928usize], + pub data_head: __u64, + pub data_tail: __u64, + pub data_offset: __u64, + pub data_size: __u64, + pub aux_head: __u64, + pub aux_tail: __u64, + pub aux_offset: __u64, + pub aux_size: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_mmap_page__bindgen_ty_1 { + pub capabilities: __u64, + pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u64; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn cap_bit0(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_bit0(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_bit0_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_bit0_is_deprecated(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_bit0_is_deprecated(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_bit0_is_deprecated_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_is_deprecated_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_user_rdpmc(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_user_rdpmc(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_user_rdpmc_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_rdpmc_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_user_time(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_user_time(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_user_time_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_user_time_zero(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_user_time_zero(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_user_time_zero_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_zero_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_user_time_short(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_user_time_short(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_user_time_short_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_short_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_____res(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) } + } + #[inline] + pub fn set_cap_____res(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(6usize, 58u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_____res_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 58u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_____res_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 58u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + cap_bit0: __u64, + cap_bit0_is_deprecated: __u64, + cap_user_rdpmc: __u64, + cap_user_time: __u64, + cap_user_time_zero: __u64, + cap_user_time_short: __u64, + cap_____res: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let cap_bit0: u64 = unsafe { ::core::mem::transmute(cap_bit0) }; + cap_bit0 as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let cap_bit0_is_deprecated: u64 = + unsafe { ::core::mem::transmute(cap_bit0_is_deprecated) }; + cap_bit0_is_deprecated as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let cap_user_rdpmc: u64 = unsafe { ::core::mem::transmute(cap_user_rdpmc) }; + cap_user_rdpmc as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let cap_user_time: u64 = unsafe { ::core::mem::transmute(cap_user_time) }; + cap_user_time as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let cap_user_time_zero: u64 = unsafe { ::core::mem::transmute(cap_user_time_zero) }; + cap_user_time_zero as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let cap_user_time_short: u64 = unsafe { ::core::mem::transmute(cap_user_time_short) }; + cap_user_time_short as u64 + }); + __bindgen_bitfield_unit.set(6usize, 58u8, { + let cap_____res: u64 = unsafe { ::core::mem::transmute(cap_____res) }; + cap_____res as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct perf_event_header { + pub type_: __u32, + pub misc: __u16, + pub size: __u16, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_event_type { + PERF_RECORD_MMAP = 1, + PERF_RECORD_LOST = 2, + PERF_RECORD_COMM = 3, + PERF_RECORD_EXIT = 4, + PERF_RECORD_THROTTLE = 5, + PERF_RECORD_UNTHROTTLE = 6, + PERF_RECORD_FORK = 7, + PERF_RECORD_READ = 8, + PERF_RECORD_SAMPLE = 9, + PERF_RECORD_MMAP2 = 10, + PERF_RECORD_AUX = 11, + PERF_RECORD_ITRACE_START = 12, + PERF_RECORD_LOST_SAMPLES = 13, + PERF_RECORD_SWITCH = 14, + PERF_RECORD_SWITCH_CPU_WIDE = 15, + PERF_RECORD_NAMESPACES = 16, + PERF_RECORD_KSYMBOL = 17, + PERF_RECORD_BPF_EVENT = 18, + PERF_RECORD_CGROUP = 19, + PERF_RECORD_TEXT_POKE = 20, + PERF_RECORD_AUX_OUTPUT_HW_ID = 21, + PERF_RECORD_MAX = 22, +} +pub const TCA_BPF_UNSPEC: _bindgen_ty_154 = 0; +pub const TCA_BPF_ACT: _bindgen_ty_154 = 1; +pub const TCA_BPF_POLICE: _bindgen_ty_154 = 2; +pub const TCA_BPF_CLASSID: _bindgen_ty_154 = 3; +pub const TCA_BPF_OPS_LEN: _bindgen_ty_154 = 4; +pub const TCA_BPF_OPS: _bindgen_ty_154 = 5; +pub const TCA_BPF_FD: _bindgen_ty_154 = 6; +pub const TCA_BPF_NAME: _bindgen_ty_154 = 7; +pub const TCA_BPF_FLAGS: _bindgen_ty_154 = 8; +pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_154 = 9; +pub const TCA_BPF_TAG: _bindgen_ty_154 = 10; +pub const TCA_BPF_ID: _bindgen_ty_154 = 11; +pub const __TCA_BPF_MAX: _bindgen_ty_154 = 12; +pub type _bindgen_ty_154 = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ifinfomsg { + pub ifi_family: ::core::ffi::c_uchar, + pub __ifi_pad: ::core::ffi::c_uchar, + pub ifi_type: ::core::ffi::c_ushort, + pub ifi_index: ::core::ffi::c_int, + pub ifi_flags: ::core::ffi::c_uint, + pub ifi_change: ::core::ffi::c_uint, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcmsg { + pub tcm_family: ::core::ffi::c_uchar, + pub tcm__pad1: ::core::ffi::c_uchar, + pub tcm__pad2: ::core::ffi::c_ushort, + pub tcm_ifindex: ::core::ffi::c_int, + pub tcm_handle: __u32, + pub tcm_parent: __u32, + pub tcm_info: __u32, +} +pub const TCA_UNSPEC: _bindgen_ty_174 = 0; +pub const TCA_KIND: _bindgen_ty_174 = 1; +pub const TCA_OPTIONS: _bindgen_ty_174 = 2; +pub const TCA_STATS: _bindgen_ty_174 = 3; +pub const TCA_XSTATS: _bindgen_ty_174 = 4; +pub const TCA_RATE: _bindgen_ty_174 = 5; +pub const TCA_FCNT: _bindgen_ty_174 = 6; +pub const TCA_STATS2: _bindgen_ty_174 = 7; +pub const TCA_STAB: _bindgen_ty_174 = 8; +pub const TCA_PAD: _bindgen_ty_174 = 9; +pub const TCA_DUMP_INVISIBLE: _bindgen_ty_174 = 10; +pub const TCA_CHAIN: _bindgen_ty_174 = 11; +pub const TCA_HW_OFFLOAD: _bindgen_ty_174 = 12; +pub const TCA_INGRESS_BLOCK: _bindgen_ty_174 = 13; +pub const TCA_EGRESS_BLOCK: _bindgen_ty_174 = 14; +pub const TCA_DUMP_FLAGS: _bindgen_ty_174 = 15; +pub const TCA_EXT_WARN_MSG: _bindgen_ty_174 = 16; +pub const __TCA_MAX: _bindgen_ty_174 = 17; +pub type _bindgen_ty_174 = ::core::ffi::c_uint; diff --git a/aya-obj/src/generated/linux_bindings_x86_64.rs b/aya-obj/src/generated/linux_bindings_x86_64.rs index 95b7e0d8..b76ed850 100644 --- a/aya-obj/src/generated/linux_bindings_x86_64.rs +++ b/aya-obj/src/generated/linux_bindings_x86_64.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.69.4 */ +/* automatically generated by rust-bindgen 0.72.1 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] @@ -16,10 +16,7 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -29,21 +26,46 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; - if val { - *byte |= mask; - } else { - *byte &= !mask; - } + if val { byte | mask } else { byte & !mask } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -64,6 +86,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -79,6 +119,22 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } } #[repr(C)] #[derive(Default)] @@ -110,21 +166,68 @@ impl ::core::fmt::Debug for __IncompleteArrayField { fmt.write_str("__IncompleteArrayField") } } -pub const SO_ATTACH_BPF: u32 = 50; -pub const SO_DETACH_BPF: u32 = 27; pub const BPF_LD: u32 = 0; pub const BPF_LDX: u32 = 1; pub const BPF_ST: u32 = 2; pub const BPF_STX: u32 = 3; pub const BPF_ALU: u32 = 4; pub const BPF_JMP: u32 = 5; +pub const BPF_RET: u32 = 6; +pub const BPF_MISC: u32 = 7; pub const BPF_W: u32 = 0; pub const BPF_H: u32 = 8; pub const BPF_B: u32 = 16; +pub const BPF_IMM: u32 = 0; +pub const BPF_ABS: u32 = 32; +pub const BPF_IND: u32 = 64; +pub const BPF_MEM: u32 = 96; +pub const BPF_LEN: u32 = 128; +pub const BPF_MSH: u32 = 160; +pub const BPF_ADD: u32 = 0; +pub const BPF_SUB: u32 = 16; +pub const BPF_MUL: u32 = 32; +pub const BPF_DIV: u32 = 48; +pub const BPF_OR: u32 = 64; +pub const BPF_AND: u32 = 80; +pub const BPF_LSH: u32 = 96; +pub const BPF_RSH: u32 = 112; +pub const BPF_NEG: u32 = 128; +pub const BPF_MOD: u32 = 144; +pub const BPF_XOR: u32 = 160; +pub const BPF_JA: u32 = 0; +pub const BPF_JEQ: u32 = 16; +pub const BPF_JGT: u32 = 32; +pub const BPF_JGE: u32 = 48; +pub const BPF_JSET: u32 = 64; pub const BPF_K: u32 = 0; +pub const BPF_X: u32 = 8; +pub const BPF_MAXINSNS: u32 = 4096; +pub const BPF_JMP32: u32 = 6; pub const BPF_ALU64: u32 = 7; pub const BPF_DW: u32 = 24; +pub const BPF_MEMSX: u32 = 128; +pub const BPF_ATOMIC: u32 = 192; +pub const BPF_XADD: u32 = 192; +pub const BPF_MOV: u32 = 176; +pub const BPF_ARSH: u32 = 192; +pub const BPF_END: u32 = 208; +pub const BPF_TO_LE: u32 = 0; +pub const BPF_TO_BE: u32 = 8; +pub const BPF_FROM_LE: u32 = 0; +pub const BPF_FROM_BE: u32 = 8; +pub const BPF_JNE: u32 = 80; +pub const BPF_JLT: u32 = 160; +pub const BPF_JLE: u32 = 176; +pub const BPF_JSGT: u32 = 96; +pub const BPF_JSGE: u32 = 112; +pub const BPF_JSLT: u32 = 192; +pub const BPF_JSLE: u32 = 208; +pub const BPF_JCOND: u32 = 224; pub const BPF_CALL: u32 = 128; +pub const BPF_EXIT: u32 = 144; +pub const BPF_FETCH: u32 = 1; +pub const BPF_XCHG: u32 = 225; +pub const BPF_CMPXCHG: u32 = 241; pub const BPF_F_ALLOW_OVERRIDE: u32 = 1; pub const BPF_F_ALLOW_MULTI: u32 = 2; pub const BPF_F_REPLACE: u32 = 4; @@ -151,6 +254,9 @@ pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2; pub const BPF_F_QUERY_EFFECTIVE: u32 = 1; pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1; pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2; +pub const BPF_BUILD_ID_SIZE: u32 = 20; +pub const BPF_OBJ_NAME_LEN: u32 = 16; +pub const BPF_TAG_SIZE: u32 = 8; pub const BTF_INT_SIGNED: u32 = 1; pub const BTF_INT_CHAR: u32 = 2; pub const BTF_INT_BOOL: u32 = 4; @@ -162,6 +268,18 @@ pub const XDP_FLAGS_HW_MODE: u32 = 8; pub const XDP_FLAGS_REPLACE: u32 = 16; pub const XDP_FLAGS_MODES: u32 = 14; pub const XDP_FLAGS_MASK: u32 = 31; +pub const PERF_EVENT_IOC_ENABLE: u32 = 9216; +pub const PERF_EVENT_IOC_DISABLE: u32 = 9217; +pub const PERF_EVENT_IOC_REFRESH: u32 = 9218; +pub const PERF_EVENT_IOC_RESET: u32 = 9219; +pub const PERF_EVENT_IOC_PERIOD: u32 = 1074275332; +pub const PERF_EVENT_IOC_SET_OUTPUT: u32 = 9221; +pub const PERF_EVENT_IOC_SET_FILTER: u32 = 1074275334; +pub const PERF_EVENT_IOC_ID: u32 = 2148017159; +pub const PERF_EVENT_IOC_SET_BPF: u32 = 1074013192; +pub const PERF_EVENT_IOC_PAUSE_OUTPUT: u32 = 1074013193; +pub const PERF_EVENT_IOC_QUERY_BPF: u32 = 3221758986; +pub const PERF_EVENT_IOC_MODIFY_ATTRIBUTES: u32 = 1074275339; pub const PERF_MAX_STACK_DEPTH: u32 = 127; pub const PERF_MAX_CONTEXTS_PER_STACK: u32 = 8; pub const PERF_FLAG_FD_NO_GROUP: u32 = 1; @@ -178,6 +296,8 @@ pub const TC_H_MIN_PRIORITY: u32 = 65504; pub const TC_H_MIN_INGRESS: u32 = 65522; pub const TC_H_MIN_EGRESS: u32 = 65523; pub const TCA_BPF_FLAG_ACT_DIRECT: u32 = 1; +pub const SO_ATTACH_BPF: u32 = 50; +pub const SO_DETACH_BPF: u32 = 27; pub type __u8 = ::core::ffi::c_uchar; pub type __s16 = ::core::ffi::c_short; pub type __u16 = ::core::ffi::c_ushort; @@ -185,6 +305,34 @@ pub type __s32 = ::core::ffi::c_int; pub type __u32 = ::core::ffi::c_uint; pub type __s64 = ::core::ffi::c_longlong; pub type __u64 = ::core::ffi::c_ulonglong; +pub const BPF_REG_0: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_0; +pub const BPF_REG_1: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_1; +pub const BPF_REG_2: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_2; +pub const BPF_REG_3: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_3; +pub const BPF_REG_4: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_4; +pub const BPF_REG_5: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_5; +pub const BPF_REG_6: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_6; +pub const BPF_REG_7: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_7; +pub const BPF_REG_8: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_8; +pub const BPF_REG_9: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_9; +pub const BPF_REG_10: _bindgen_ty_1 = _bindgen_ty_1::BPF_REG_10; +pub const __MAX_BPF_REG: _bindgen_ty_1 = _bindgen_ty_1::__MAX_BPF_REG; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { + BPF_REG_0 = 0, + BPF_REG_1 = 1, + BPF_REG_2 = 2, + BPF_REG_3 = 3, + BPF_REG_4 = 4, + BPF_REG_5 = 5, + BPF_REG_6 = 6, + BPF_REG_7 = 7, + BPF_REG_8 = 8, + BPF_REG_9 = 9, + BPF_REG_10 = 10, + __MAX_BPF_REG = 11, +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bpf_insn { @@ -207,6 +355,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn src_reg(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -218,6 +388,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -237,6 +429,15 @@ pub struct bpf_lpm_trie_key { pub prefixlen: __u32, pub data: __IncompleteArrayField<__u8>, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_cgroup_iter_order { + BPF_CGROUP_ITER_ORDER_UNSPEC = 0, + BPF_CGROUP_ITER_SELF_ONLY = 1, + BPF_CGROUP_ITER_DESCENDANTS_PRE = 2, + BPF_CGROUP_ITER_DESCENDANTS_POST = 3, + BPF_CGROUP_ITER_ANCESTORS_UP = 4, +} impl bpf_cmd { pub const BPF_PROG_RUN: bpf_cmd = bpf_cmd::BPF_PROG_TEST_RUN; } @@ -447,6 +648,17 @@ pub enum bpf_link_type { BPF_LINK_TYPE_NETKIT = 13, __MAX_BPF_LINK_TYPE = 14, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_perf_event_type { + BPF_PERF_EVENT_UNSPEC = 0, + BPF_PERF_EVENT_UPROBE = 1, + BPF_PERF_EVENT_URETPROBE = 2, + BPF_PERF_EVENT_KPROBE = 3, + BPF_PERF_EVENT_KRETPROBE = 4, + BPF_PERF_EVENT_TRACEPOINT = 5, + BPF_PERF_EVENT_EVENT = 6, +} pub const BPF_F_KPROBE_MULTI_RETURN: _bindgen_ty_2 = 1; pub type _bindgen_ty_2 = ::core::ffi::c_uint; pub const BPF_F_UPROBE_MULTI_RETURN: _bindgen_ty_3 = 1; @@ -476,6 +688,11 @@ pub const BPF_F_TOKEN_FD: _bindgen_ty_5 = 65536; pub const BPF_F_SEGV_ON_FAULT: _bindgen_ty_5 = 131072; pub const BPF_F_NO_USER_CONV: _bindgen_ty_5 = 262144; pub type _bindgen_ty_5 = ::core::ffi::c_uint; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_stats_type { + BPF_STATS_RUN_TIME = 0, +} #[repr(C)] #[derive(Copy, Clone)] pub union bpf_attr { @@ -884,6 +1101,223 @@ pub struct bpf_attr__bindgen_ty_20 { pub flags: __u32, pub bpffs_fd: __u32, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_func_id { + BPF_FUNC_unspec = 0, + BPF_FUNC_map_lookup_elem = 1, + BPF_FUNC_map_update_elem = 2, + BPF_FUNC_map_delete_elem = 3, + BPF_FUNC_probe_read = 4, + BPF_FUNC_ktime_get_ns = 5, + BPF_FUNC_trace_printk = 6, + BPF_FUNC_get_prandom_u32 = 7, + BPF_FUNC_get_smp_processor_id = 8, + BPF_FUNC_skb_store_bytes = 9, + BPF_FUNC_l3_csum_replace = 10, + BPF_FUNC_l4_csum_replace = 11, + BPF_FUNC_tail_call = 12, + BPF_FUNC_clone_redirect = 13, + BPF_FUNC_get_current_pid_tgid = 14, + BPF_FUNC_get_current_uid_gid = 15, + BPF_FUNC_get_current_comm = 16, + BPF_FUNC_get_cgroup_classid = 17, + BPF_FUNC_skb_vlan_push = 18, + BPF_FUNC_skb_vlan_pop = 19, + BPF_FUNC_skb_get_tunnel_key = 20, + BPF_FUNC_skb_set_tunnel_key = 21, + BPF_FUNC_perf_event_read = 22, + BPF_FUNC_redirect = 23, + BPF_FUNC_get_route_realm = 24, + BPF_FUNC_perf_event_output = 25, + BPF_FUNC_skb_load_bytes = 26, + BPF_FUNC_get_stackid = 27, + BPF_FUNC_csum_diff = 28, + BPF_FUNC_skb_get_tunnel_opt = 29, + BPF_FUNC_skb_set_tunnel_opt = 30, + BPF_FUNC_skb_change_proto = 31, + BPF_FUNC_skb_change_type = 32, + BPF_FUNC_skb_under_cgroup = 33, + BPF_FUNC_get_hash_recalc = 34, + BPF_FUNC_get_current_task = 35, + BPF_FUNC_probe_write_user = 36, + BPF_FUNC_current_task_under_cgroup = 37, + BPF_FUNC_skb_change_tail = 38, + BPF_FUNC_skb_pull_data = 39, + BPF_FUNC_csum_update = 40, + BPF_FUNC_set_hash_invalid = 41, + BPF_FUNC_get_numa_node_id = 42, + BPF_FUNC_skb_change_head = 43, + BPF_FUNC_xdp_adjust_head = 44, + BPF_FUNC_probe_read_str = 45, + BPF_FUNC_get_socket_cookie = 46, + BPF_FUNC_get_socket_uid = 47, + BPF_FUNC_set_hash = 48, + BPF_FUNC_setsockopt = 49, + BPF_FUNC_skb_adjust_room = 50, + BPF_FUNC_redirect_map = 51, + BPF_FUNC_sk_redirect_map = 52, + BPF_FUNC_sock_map_update = 53, + BPF_FUNC_xdp_adjust_meta = 54, + BPF_FUNC_perf_event_read_value = 55, + BPF_FUNC_perf_prog_read_value = 56, + BPF_FUNC_getsockopt = 57, + BPF_FUNC_override_return = 58, + BPF_FUNC_sock_ops_cb_flags_set = 59, + BPF_FUNC_msg_redirect_map = 60, + BPF_FUNC_msg_apply_bytes = 61, + BPF_FUNC_msg_cork_bytes = 62, + BPF_FUNC_msg_pull_data = 63, + BPF_FUNC_bind = 64, + BPF_FUNC_xdp_adjust_tail = 65, + BPF_FUNC_skb_get_xfrm_state = 66, + BPF_FUNC_get_stack = 67, + BPF_FUNC_skb_load_bytes_relative = 68, + BPF_FUNC_fib_lookup = 69, + BPF_FUNC_sock_hash_update = 70, + BPF_FUNC_msg_redirect_hash = 71, + BPF_FUNC_sk_redirect_hash = 72, + BPF_FUNC_lwt_push_encap = 73, + BPF_FUNC_lwt_seg6_store_bytes = 74, + BPF_FUNC_lwt_seg6_adjust_srh = 75, + BPF_FUNC_lwt_seg6_action = 76, + BPF_FUNC_rc_repeat = 77, + BPF_FUNC_rc_keydown = 78, + BPF_FUNC_skb_cgroup_id = 79, + BPF_FUNC_get_current_cgroup_id = 80, + BPF_FUNC_get_local_storage = 81, + BPF_FUNC_sk_select_reuseport = 82, + BPF_FUNC_skb_ancestor_cgroup_id = 83, + BPF_FUNC_sk_lookup_tcp = 84, + BPF_FUNC_sk_lookup_udp = 85, + BPF_FUNC_sk_release = 86, + BPF_FUNC_map_push_elem = 87, + BPF_FUNC_map_pop_elem = 88, + BPF_FUNC_map_peek_elem = 89, + BPF_FUNC_msg_push_data = 90, + BPF_FUNC_msg_pop_data = 91, + BPF_FUNC_rc_pointer_rel = 92, + BPF_FUNC_spin_lock = 93, + BPF_FUNC_spin_unlock = 94, + BPF_FUNC_sk_fullsock = 95, + BPF_FUNC_tcp_sock = 96, + BPF_FUNC_skb_ecn_set_ce = 97, + BPF_FUNC_get_listener_sock = 98, + BPF_FUNC_skc_lookup_tcp = 99, + BPF_FUNC_tcp_check_syncookie = 100, + BPF_FUNC_sysctl_get_name = 101, + BPF_FUNC_sysctl_get_current_value = 102, + BPF_FUNC_sysctl_get_new_value = 103, + BPF_FUNC_sysctl_set_new_value = 104, + BPF_FUNC_strtol = 105, + BPF_FUNC_strtoul = 106, + BPF_FUNC_sk_storage_get = 107, + BPF_FUNC_sk_storage_delete = 108, + BPF_FUNC_send_signal = 109, + BPF_FUNC_tcp_gen_syncookie = 110, + BPF_FUNC_skb_output = 111, + BPF_FUNC_probe_read_user = 112, + BPF_FUNC_probe_read_kernel = 113, + BPF_FUNC_probe_read_user_str = 114, + BPF_FUNC_probe_read_kernel_str = 115, + BPF_FUNC_tcp_send_ack = 116, + BPF_FUNC_send_signal_thread = 117, + BPF_FUNC_jiffies64 = 118, + BPF_FUNC_read_branch_records = 119, + BPF_FUNC_get_ns_current_pid_tgid = 120, + BPF_FUNC_xdp_output = 121, + BPF_FUNC_get_netns_cookie = 122, + BPF_FUNC_get_current_ancestor_cgroup_id = 123, + BPF_FUNC_sk_assign = 124, + BPF_FUNC_ktime_get_boot_ns = 125, + BPF_FUNC_seq_printf = 126, + BPF_FUNC_seq_write = 127, + BPF_FUNC_sk_cgroup_id = 128, + BPF_FUNC_sk_ancestor_cgroup_id = 129, + BPF_FUNC_ringbuf_output = 130, + BPF_FUNC_ringbuf_reserve = 131, + BPF_FUNC_ringbuf_submit = 132, + BPF_FUNC_ringbuf_discard = 133, + BPF_FUNC_ringbuf_query = 134, + BPF_FUNC_csum_level = 135, + BPF_FUNC_skc_to_tcp6_sock = 136, + BPF_FUNC_skc_to_tcp_sock = 137, + BPF_FUNC_skc_to_tcp_timewait_sock = 138, + BPF_FUNC_skc_to_tcp_request_sock = 139, + BPF_FUNC_skc_to_udp6_sock = 140, + BPF_FUNC_get_task_stack = 141, + BPF_FUNC_load_hdr_opt = 142, + BPF_FUNC_store_hdr_opt = 143, + BPF_FUNC_reserve_hdr_opt = 144, + BPF_FUNC_inode_storage_get = 145, + BPF_FUNC_inode_storage_delete = 146, + BPF_FUNC_d_path = 147, + BPF_FUNC_copy_from_user = 148, + BPF_FUNC_snprintf_btf = 149, + BPF_FUNC_seq_printf_btf = 150, + BPF_FUNC_skb_cgroup_classid = 151, + BPF_FUNC_redirect_neigh = 152, + BPF_FUNC_per_cpu_ptr = 153, + BPF_FUNC_this_cpu_ptr = 154, + BPF_FUNC_redirect_peer = 155, + BPF_FUNC_task_storage_get = 156, + BPF_FUNC_task_storage_delete = 157, + BPF_FUNC_get_current_task_btf = 158, + BPF_FUNC_bprm_opts_set = 159, + BPF_FUNC_ktime_get_coarse_ns = 160, + BPF_FUNC_ima_inode_hash = 161, + BPF_FUNC_sock_from_file = 162, + BPF_FUNC_check_mtu = 163, + BPF_FUNC_for_each_map_elem = 164, + BPF_FUNC_snprintf = 165, + BPF_FUNC_sys_bpf = 166, + BPF_FUNC_btf_find_by_name_kind = 167, + BPF_FUNC_sys_close = 168, + BPF_FUNC_timer_init = 169, + BPF_FUNC_timer_set_callback = 170, + BPF_FUNC_timer_start = 171, + BPF_FUNC_timer_cancel = 172, + BPF_FUNC_get_func_ip = 173, + BPF_FUNC_get_attach_cookie = 174, + BPF_FUNC_task_pt_regs = 175, + BPF_FUNC_get_branch_snapshot = 176, + BPF_FUNC_trace_vprintk = 177, + BPF_FUNC_skc_to_unix_sock = 178, + BPF_FUNC_kallsyms_lookup_name = 179, + BPF_FUNC_find_vma = 180, + BPF_FUNC_loop = 181, + BPF_FUNC_strncmp = 182, + BPF_FUNC_get_func_arg = 183, + BPF_FUNC_get_func_ret = 184, + BPF_FUNC_get_func_arg_cnt = 185, + BPF_FUNC_get_retval = 186, + BPF_FUNC_set_retval = 187, + BPF_FUNC_xdp_get_buff_len = 188, + BPF_FUNC_xdp_load_bytes = 189, + BPF_FUNC_xdp_store_bytes = 190, + BPF_FUNC_copy_from_user_task = 191, + BPF_FUNC_skb_set_tstamp = 192, + BPF_FUNC_ima_file_hash = 193, + BPF_FUNC_kptr_xchg = 194, + BPF_FUNC_map_lookup_percpu_elem = 195, + BPF_FUNC_skc_to_mptcp_sock = 196, + BPF_FUNC_dynptr_from_mem = 197, + BPF_FUNC_ringbuf_reserve_dynptr = 198, + BPF_FUNC_ringbuf_submit_dynptr = 199, + BPF_FUNC_ringbuf_discard_dynptr = 200, + BPF_FUNC_dynptr_read = 201, + BPF_FUNC_dynptr_write = 202, + BPF_FUNC_dynptr_data = 203, + BPF_FUNC_tcp_raw_gen_syncookie_ipv4 = 204, + BPF_FUNC_tcp_raw_gen_syncookie_ipv6 = 205, + BPF_FUNC_tcp_raw_check_syncookie_ipv4 = 206, + BPF_FUNC_tcp_raw_check_syncookie_ipv6 = 207, + BPF_FUNC_ktime_get_tai_ns = 208, + BPF_FUNC_user_ringbuf_drain = 209, + BPF_FUNC_cgrp_storage_get = 210, + BPF_FUNC_cgrp_storage_delete = 211, + __BPF_FUNC_MAX_ID = 212, +} pub const BPF_F_RECOMPUTE_CSUM: _bindgen_ty_6 = 1; pub const BPF_F_INVALIDATE_HASH: _bindgen_ty_6 = 2; pub type _bindgen_ty_6 = ::core::ffi::c_uint; @@ -916,6 +1350,18 @@ pub const BPF_F_CTXLEN_MASK: _bindgen_ty_14 = 4503595332403200; pub type _bindgen_ty_14 = ::core::ffi::c_ulong; pub const BPF_F_CURRENT_NETNS: _bindgen_ty_15 = -1; pub type _bindgen_ty_15 = ::core::ffi::c_int; +pub const BPF_CSUM_LEVEL_QUERY: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_QUERY; +pub const BPF_CSUM_LEVEL_INC: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_INC; +pub const BPF_CSUM_LEVEL_DEC: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_DEC; +pub const BPF_CSUM_LEVEL_RESET: _bindgen_ty_16 = _bindgen_ty_16::BPF_CSUM_LEVEL_RESET; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_16 { + BPF_CSUM_LEVEL_QUERY = 0, + BPF_CSUM_LEVEL_INC = 1, + BPF_CSUM_LEVEL_DEC = 2, + BPF_CSUM_LEVEL_RESET = 3, +} pub const BPF_F_ADJ_ROOM_FIXED_GSO: _bindgen_ty_17 = 1; pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: _bindgen_ty_17 = 2; pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: _bindgen_ty_17 = 4; @@ -926,19 +1372,74 @@ pub const BPF_F_ADJ_ROOM_ENCAP_L2_ETH: _bindgen_ty_17 = 64; pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV4: _bindgen_ty_17 = 128; pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV6: _bindgen_ty_17 = 256; pub type _bindgen_ty_17 = ::core::ffi::c_uint; +pub const BPF_ADJ_ROOM_ENCAP_L2_MASK: _bindgen_ty_18 = _bindgen_ty_18::BPF_ADJ_ROOM_ENCAP_L2_MASK; +pub const BPF_ADJ_ROOM_ENCAP_L2_SHIFT: _bindgen_ty_18 = _bindgen_ty_18::BPF_ADJ_ROOM_ENCAP_L2_SHIFT; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_18 { + BPF_ADJ_ROOM_ENCAP_L2_MASK = 255, + BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 56, +} pub const BPF_F_SYSCTL_BASE_NAME: _bindgen_ty_19 = 1; pub type _bindgen_ty_19 = ::core::ffi::c_uint; +pub const BPF_LOCAL_STORAGE_GET_F_CREATE: _bindgen_ty_20 = + _bindgen_ty_20::BPF_LOCAL_STORAGE_GET_F_CREATE; +pub const BPF_SK_STORAGE_GET_F_CREATE: _bindgen_ty_20 = + _bindgen_ty_20::BPF_LOCAL_STORAGE_GET_F_CREATE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_20 { + BPF_LOCAL_STORAGE_GET_F_CREATE = 1, +} pub const BPF_F_GET_BRANCH_RECORDS_SIZE: _bindgen_ty_21 = 1; pub type _bindgen_ty_21 = ::core::ffi::c_uint; +pub const BPF_RB_NO_WAKEUP: _bindgen_ty_22 = _bindgen_ty_22::BPF_RB_NO_WAKEUP; +pub const BPF_RB_FORCE_WAKEUP: _bindgen_ty_22 = _bindgen_ty_22::BPF_RB_FORCE_WAKEUP; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_22 { + BPF_RB_NO_WAKEUP = 1, + BPF_RB_FORCE_WAKEUP = 2, +} +pub const BPF_RB_AVAIL_DATA: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_AVAIL_DATA; +pub const BPF_RB_RING_SIZE: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_RING_SIZE; +pub const BPF_RB_CONS_POS: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_CONS_POS; +pub const BPF_RB_PROD_POS: _bindgen_ty_23 = _bindgen_ty_23::BPF_RB_PROD_POS; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_23 { + BPF_RB_AVAIL_DATA = 0, + BPF_RB_RING_SIZE = 1, + BPF_RB_CONS_POS = 2, + BPF_RB_PROD_POS = 3, +} pub const BPF_RINGBUF_BUSY_BIT: _bindgen_ty_24 = 2147483648; pub const BPF_RINGBUF_DISCARD_BIT: _bindgen_ty_24 = 1073741824; pub const BPF_RINGBUF_HDR_SZ: _bindgen_ty_24 = 8; pub type _bindgen_ty_24 = ::core::ffi::c_uint; +pub const BPF_SK_LOOKUP_F_REPLACE: _bindgen_ty_25 = _bindgen_ty_25::BPF_SK_LOOKUP_F_REPLACE; +pub const BPF_SK_LOOKUP_F_NO_REUSEPORT: _bindgen_ty_25 = + _bindgen_ty_25::BPF_SK_LOOKUP_F_NO_REUSEPORT; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_25 { + BPF_SK_LOOKUP_F_REPLACE = 1, + BPF_SK_LOOKUP_F_NO_REUSEPORT = 2, +} pub const BPF_F_BPRM_SECUREEXEC: _bindgen_ty_26 = 1; pub type _bindgen_ty_26 = ::core::ffi::c_uint; pub const BPF_F_BROADCAST: _bindgen_ty_27 = 8; pub const BPF_F_EXCLUDE_INGRESS: _bindgen_ty_27 = 16; pub type _bindgen_ty_27 = ::core::ffi::c_uint; +pub const BPF_SKB_TSTAMP_UNSPEC: _bindgen_ty_28 = _bindgen_ty_28::BPF_SKB_TSTAMP_UNSPEC; +pub const BPF_SKB_TSTAMP_DELIVERY_MONO: _bindgen_ty_28 = + _bindgen_ty_28::BPF_SKB_TSTAMP_DELIVERY_MONO; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_28 { + BPF_SKB_TSTAMP_UNSPEC = 0, + BPF_SKB_TSTAMP_DELIVERY_MONO = 1, +} #[repr(C)] #[derive(Copy, Clone)] pub struct bpf_devmap_val { @@ -1019,6 +1520,28 @@ impl bpf_prog_info { } } #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -1268,6 +1791,201 @@ pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_13 { pub ifindex: __u32, pub attach_type: __u32, } +pub const BPF_SOCK_OPS_RTO_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_RTO_CB_FLAG; +pub const BPF_SOCK_OPS_RETRANS_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_RETRANS_CB_FLAG; +pub const BPF_SOCK_OPS_STATE_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_STATE_CB_FLAG; +pub const BPF_SOCK_OPS_RTT_CB_FLAG: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_RTT_CB_FLAG; +pub const BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: _bindgen_ty_29 = + _bindgen_ty_29::BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG; +pub const BPF_SOCK_OPS_ALL_CB_FLAGS: _bindgen_ty_29 = _bindgen_ty_29::BPF_SOCK_OPS_ALL_CB_FLAGS; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_29 { + BPF_SOCK_OPS_RTO_CB_FLAG = 1, + BPF_SOCK_OPS_RETRANS_CB_FLAG = 2, + BPF_SOCK_OPS_STATE_CB_FLAG = 4, + BPF_SOCK_OPS_RTT_CB_FLAG = 8, + BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG = 16, + BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG = 32, + BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG = 64, + BPF_SOCK_OPS_ALL_CB_FLAGS = 127, +} +pub const BPF_SOCK_OPS_VOID: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_VOID; +pub const BPF_SOCK_OPS_TIMEOUT_INIT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TIMEOUT_INIT; +pub const BPF_SOCK_OPS_RWND_INIT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RWND_INIT; +pub const BPF_SOCK_OPS_TCP_CONNECT_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TCP_CONNECT_CB; +pub const BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB; +pub const BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB; +pub const BPF_SOCK_OPS_NEEDS_ECN: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_NEEDS_ECN; +pub const BPF_SOCK_OPS_BASE_RTT: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_BASE_RTT; +pub const BPF_SOCK_OPS_RTO_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RTO_CB; +pub const BPF_SOCK_OPS_RETRANS_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RETRANS_CB; +pub const BPF_SOCK_OPS_STATE_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_STATE_CB; +pub const BPF_SOCK_OPS_TCP_LISTEN_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_TCP_LISTEN_CB; +pub const BPF_SOCK_OPS_RTT_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_RTT_CB; +pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_PARSE_HDR_OPT_CB; +pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: _bindgen_ty_30 = _bindgen_ty_30::BPF_SOCK_OPS_HDR_OPT_LEN_CB; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: _bindgen_ty_30 = + _bindgen_ty_30::BPF_SOCK_OPS_WRITE_HDR_OPT_CB; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_30 { + BPF_SOCK_OPS_VOID = 0, + BPF_SOCK_OPS_TIMEOUT_INIT = 1, + BPF_SOCK_OPS_RWND_INIT = 2, + BPF_SOCK_OPS_TCP_CONNECT_CB = 3, + BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 4, + BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 5, + BPF_SOCK_OPS_NEEDS_ECN = 6, + BPF_SOCK_OPS_BASE_RTT = 7, + BPF_SOCK_OPS_RTO_CB = 8, + BPF_SOCK_OPS_RETRANS_CB = 9, + BPF_SOCK_OPS_STATE_CB = 10, + BPF_SOCK_OPS_TCP_LISTEN_CB = 11, + BPF_SOCK_OPS_RTT_CB = 12, + BPF_SOCK_OPS_PARSE_HDR_OPT_CB = 13, + BPF_SOCK_OPS_HDR_OPT_LEN_CB = 14, + BPF_SOCK_OPS_WRITE_HDR_OPT_CB = 15, +} +pub const BPF_TCP_ESTABLISHED: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_ESTABLISHED; +pub const BPF_TCP_SYN_SENT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_SYN_SENT; +pub const BPF_TCP_SYN_RECV: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_SYN_RECV; +pub const BPF_TCP_FIN_WAIT1: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_FIN_WAIT1; +pub const BPF_TCP_FIN_WAIT2: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_FIN_WAIT2; +pub const BPF_TCP_TIME_WAIT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_TIME_WAIT; +pub const BPF_TCP_CLOSE: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSE; +pub const BPF_TCP_CLOSE_WAIT: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSE_WAIT; +pub const BPF_TCP_LAST_ACK: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_LAST_ACK; +pub const BPF_TCP_LISTEN: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_LISTEN; +pub const BPF_TCP_CLOSING: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_CLOSING; +pub const BPF_TCP_NEW_SYN_RECV: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_NEW_SYN_RECV; +pub const BPF_TCP_BOUND_INACTIVE: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_BOUND_INACTIVE; +pub const BPF_TCP_MAX_STATES: _bindgen_ty_31 = _bindgen_ty_31::BPF_TCP_MAX_STATES; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_31 { + BPF_TCP_ESTABLISHED = 1, + BPF_TCP_SYN_SENT = 2, + BPF_TCP_SYN_RECV = 3, + BPF_TCP_FIN_WAIT1 = 4, + BPF_TCP_FIN_WAIT2 = 5, + BPF_TCP_TIME_WAIT = 6, + BPF_TCP_CLOSE = 7, + BPF_TCP_CLOSE_WAIT = 8, + BPF_TCP_LAST_ACK = 9, + BPF_TCP_LISTEN = 10, + BPF_TCP_CLOSING = 11, + BPF_TCP_NEW_SYN_RECV = 12, + BPF_TCP_BOUND_INACTIVE = 13, + BPF_TCP_MAX_STATES = 14, +} +pub const BPF_LOAD_HDR_OPT_TCP_SYN: _bindgen_ty_33 = _bindgen_ty_33::BPF_LOAD_HDR_OPT_TCP_SYN; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_33 { + BPF_LOAD_HDR_OPT_TCP_SYN = 1, +} +pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: _bindgen_ty_34 = + _bindgen_ty_34::BPF_WRITE_HDR_TCP_CURRENT_MSS; +pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: _bindgen_ty_34 = + _bindgen_ty_34::BPF_WRITE_HDR_TCP_SYNACK_COOKIE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_34 { + BPF_WRITE_HDR_TCP_CURRENT_MSS = 1, + BPF_WRITE_HDR_TCP_SYNACK_COOKIE = 2, +} +pub const BPF_DEVCG_ACC_MKNOD: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_MKNOD; +pub const BPF_DEVCG_ACC_READ: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_READ; +pub const BPF_DEVCG_ACC_WRITE: _bindgen_ty_35 = _bindgen_ty_35::BPF_DEVCG_ACC_WRITE; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_35 { + BPF_DEVCG_ACC_MKNOD = 1, + BPF_DEVCG_ACC_READ = 2, + BPF_DEVCG_ACC_WRITE = 4, +} +pub const BPF_DEVCG_DEV_BLOCK: _bindgen_ty_36 = _bindgen_ty_36::BPF_DEVCG_DEV_BLOCK; +pub const BPF_DEVCG_DEV_CHAR: _bindgen_ty_36 = _bindgen_ty_36::BPF_DEVCG_DEV_CHAR; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_36 { + BPF_DEVCG_DEV_BLOCK = 1, + BPF_DEVCG_DEV_CHAR = 2, +} +pub const BPF_FIB_LOOKUP_DIRECT: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_DIRECT; +pub const BPF_FIB_LOOKUP_OUTPUT: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_OUTPUT; +pub const BPF_FIB_LOOKUP_SKIP_NEIGH: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_SKIP_NEIGH; +pub const BPF_FIB_LOOKUP_TBID: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_TBID; +pub const BPF_FIB_LOOKUP_SRC: _bindgen_ty_37 = _bindgen_ty_37::BPF_FIB_LOOKUP_SRC; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_37 { + BPF_FIB_LOOKUP_DIRECT = 1, + BPF_FIB_LOOKUP_OUTPUT = 2, + BPF_FIB_LOOKUP_SKIP_NEIGH = 4, + BPF_FIB_LOOKUP_TBID = 8, + BPF_FIB_LOOKUP_SRC = 16, +} +pub const BPF_FIB_LKUP_RET_SUCCESS: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_SUCCESS; +pub const BPF_FIB_LKUP_RET_BLACKHOLE: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_BLACKHOLE; +pub const BPF_FIB_LKUP_RET_UNREACHABLE: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_UNREACHABLE; +pub const BPF_FIB_LKUP_RET_PROHIBIT: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_PROHIBIT; +pub const BPF_FIB_LKUP_RET_NOT_FWDED: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_NOT_FWDED; +pub const BPF_FIB_LKUP_RET_FWD_DISABLED: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_FWD_DISABLED; +pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_UNSUPP_LWT; +pub const BPF_FIB_LKUP_RET_NO_NEIGH: _bindgen_ty_38 = _bindgen_ty_38::BPF_FIB_LKUP_RET_NO_NEIGH; +pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_FRAG_NEEDED; +pub const BPF_FIB_LKUP_RET_NO_SRC_ADDR: _bindgen_ty_38 = + _bindgen_ty_38::BPF_FIB_LKUP_RET_NO_SRC_ADDR; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_38 { + BPF_FIB_LKUP_RET_SUCCESS = 0, + BPF_FIB_LKUP_RET_BLACKHOLE = 1, + BPF_FIB_LKUP_RET_UNREACHABLE = 2, + BPF_FIB_LKUP_RET_PROHIBIT = 3, + BPF_FIB_LKUP_RET_NOT_FWDED = 4, + BPF_FIB_LKUP_RET_FWD_DISABLED = 5, + BPF_FIB_LKUP_RET_UNSUPP_LWT = 6, + BPF_FIB_LKUP_RET_NO_NEIGH = 7, + BPF_FIB_LKUP_RET_FRAG_NEEDED = 8, + BPF_FIB_LKUP_RET_NO_SRC_ADDR = 9, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_task_fd_type { + BPF_FD_TYPE_RAW_TRACEPOINT = 0, + BPF_FD_TYPE_TRACEPOINT = 1, + BPF_FD_TYPE_KPROBE = 2, + BPF_FD_TYPE_KRETPROBE = 3, + BPF_FD_TYPE_UPROBE = 4, + BPF_FD_TYPE_URETPROBE = 5, +} +pub const BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: _bindgen_ty_39 = + _bindgen_ty_39::BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_39 { + BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 1, + BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 2, + BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 4, +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bpf_func_info { @@ -1387,6 +2105,18 @@ pub struct btf_var_secinfo { pub struct btf_decl_tag { pub component_idx: __s32, } +impl nlmsgerr_attrs { + pub const NLMSGERR_ATTR_MAX: nlmsgerr_attrs = nlmsgerr_attrs::NLMSGERR_ATTR_COOKIE; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum nlmsgerr_attrs { + NLMSGERR_ATTR_UNUSED = 0, + NLMSGERR_ATTR_MSG = 1, + NLMSGERR_ATTR_OFFS = 2, + NLMSGERR_ATTR_COOKIE = 3, + __NLMSGERR_ATTR_MAX = 4, +} pub const IFLA_XDP_UNSPEC: _bindgen_ty_92 = 0; pub const IFLA_XDP_FD: _bindgen_ty_92 = 1; pub const IFLA_XDP_ATTACHED: _bindgen_ty_92 = 2; @@ -1398,6 +2128,29 @@ pub const IFLA_XDP_HW_PROG_ID: _bindgen_ty_92 = 7; pub const IFLA_XDP_EXPECTED_FD: _bindgen_ty_92 = 8; pub const __IFLA_XDP_MAX: _bindgen_ty_92 = 9; pub type _bindgen_ty_92 = ::core::ffi::c_uint; +impl nf_inet_hooks { + pub const NF_INET_INGRESS: nf_inet_hooks = nf_inet_hooks::NF_INET_NUMHOOKS; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum nf_inet_hooks { + NF_INET_PRE_ROUTING = 0, + NF_INET_LOCAL_IN = 1, + NF_INET_FORWARD = 2, + NF_INET_LOCAL_OUT = 3, + NF_INET_POST_ROUTING = 4, + NF_INET_NUMHOOKS = 5, +} +pub const NFPROTO_UNSPEC: _bindgen_ty_99 = 0; +pub const NFPROTO_INET: _bindgen_ty_99 = 1; +pub const NFPROTO_IPV4: _bindgen_ty_99 = 2; +pub const NFPROTO_ARP: _bindgen_ty_99 = 3; +pub const NFPROTO_NETDEV: _bindgen_ty_99 = 5; +pub const NFPROTO_BRIDGE: _bindgen_ty_99 = 7; +pub const NFPROTO_IPV6: _bindgen_ty_99 = 10; +pub const NFPROTO_DECNET: _bindgen_ty_99 = 12; +pub const NFPROTO_NUMPROTO: _bindgen_ty_99 = 13; +pub type _bindgen_ty_99 = ::core::ffi::c_uint; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum perf_type_id { @@ -1567,6 +2320,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn disabled_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_disabled_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } } @@ -1578,6 +2353,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn pinned(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } } @@ -1589,6 +2386,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn pinned_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_pinned_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclusive(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } } @@ -1600,6 +2419,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclusive_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclusive_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_user(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } } @@ -1611,6 +2452,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_kernel(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } } @@ -1622,6 +2485,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_hv(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } } @@ -1633,6 +2518,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_hv_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_hv_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_idle(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } } @@ -1644,6 +2551,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_idle_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_idle_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn mmap(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } } @@ -1655,6 +2584,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn comm(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } } @@ -1666,6 +2617,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn comm_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn freq(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } } @@ -1677,6 +2650,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn freq_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_freq_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit_stat(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } } @@ -1688,17 +2683,61 @@ impl perf_event_attr { } } #[inline] - pub fn enable_on_exec(&self) -> __u64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } + pub unsafe fn inherit_stat_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u64) + } } #[inline] - pub fn set_enable_on_exec(&mut self, val: __u64) { + pub unsafe fn set_inherit_stat_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_on_exec(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } + } + #[inline] + pub fn set_enable_on_exec(&mut self, val: __u64) { unsafe { let val: u64 = ::core::mem::transmute(val); self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] + pub unsafe fn enable_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_enable_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn task(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) } } @@ -1710,6 +2749,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn task_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_task_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn watermark(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) } } @@ -1721,6 +2782,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn watermark_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_watermark_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn precise_ip(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 2u8) as u64) } } @@ -1732,6 +2815,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn precise_ip_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 2u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_precise_ip_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 2u8, + val as u64, + ) + } + } + #[inline] pub fn mmap_data(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } } @@ -1743,6 +2848,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap_data_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_data_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn sample_id_all(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } } @@ -1754,6 +2881,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn sample_id_all_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sample_id_all_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_host(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } } @@ -1765,6 +2914,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_host_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_host_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_guest(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } } @@ -1776,6 +2947,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_guest_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_guest_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_callchain_kernel(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) } } @@ -1787,6 +2980,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_callchain_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 21usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 21usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_callchain_user(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) } } @@ -1798,6 +3013,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_callchain_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 22usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 22usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn mmap2(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) } } @@ -1809,6 +3046,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap2_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 23usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap2_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 23usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn comm_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) } } @@ -1820,6 +3079,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn comm_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 24usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 24usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn use_clockid(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) } } @@ -1831,6 +3112,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn use_clockid_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 25usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_use_clockid_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 25usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn context_switch(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) } } @@ -1842,6 +3145,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn context_switch_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 26usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_context_switch_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 26usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn write_backward(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) } } @@ -1853,6 +3178,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn write_backward_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 27usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_write_backward_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 27usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn namespaces(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) } } @@ -1864,6 +3211,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn namespaces_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 28usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_namespaces_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 28usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn ksymbol(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) } } @@ -1875,6 +3244,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn ksymbol_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 29usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_ksymbol_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 29usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn bpf_event(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u64) } } @@ -1886,6 +3277,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn bpf_event_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 30usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_bpf_event_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 30usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn aux_output(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u64) } } @@ -1897,6 +3310,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn aux_output_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_aux_output_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cgroup(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } } @@ -1908,6 +3343,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn cgroup_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cgroup_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn text_poke(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) } } @@ -1919,6 +3376,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn text_poke_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 33usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_text_poke_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 33usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn build_id(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) } } @@ -1930,6 +3409,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn build_id_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 34usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_build_id_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 34usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit_thread(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) } } @@ -1941,6 +3442,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_thread_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 35usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_thread_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 35usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn remove_on_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) } } @@ -1952,6 +3475,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn remove_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 36usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_remove_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 36usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn sigtrap(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } } @@ -1963,6 +3508,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn sigtrap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 37usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sigtrap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 37usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __reserved_1(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) } } @@ -1974,6 +3541,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn __reserved_1_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 38usize, + 26u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set___reserved_1_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 38usize, + 26u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( disabled: __u64, inherit: __u64, @@ -2227,6 +3816,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_bit0_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_bit0_is_deprecated(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } } @@ -2238,6 +3849,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_bit0_is_deprecated_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_is_deprecated_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_rdpmc(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } } @@ -2249,6 +3882,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_rdpmc_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_rdpmc_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } } @@ -2260,6 +3915,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time_zero(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } } @@ -2271,6 +3948,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_zero_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_zero_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time_short(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } } @@ -2282,6 +3981,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_short_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_short_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_____res(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) } } @@ -2293,6 +4014,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_____res_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 58u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_____res_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 58u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( cap_bit0: __u64, cap_bit0_is_deprecated: __u64, @@ -2368,20 +4111,20 @@ pub enum perf_event_type { PERF_RECORD_AUX_OUTPUT_HW_ID = 21, PERF_RECORD_MAX = 22, } -pub const TCA_BPF_UNSPEC: _bindgen_ty_152 = 0; -pub const TCA_BPF_ACT: _bindgen_ty_152 = 1; -pub const TCA_BPF_POLICE: _bindgen_ty_152 = 2; -pub const TCA_BPF_CLASSID: _bindgen_ty_152 = 3; -pub const TCA_BPF_OPS_LEN: _bindgen_ty_152 = 4; -pub const TCA_BPF_OPS: _bindgen_ty_152 = 5; -pub const TCA_BPF_FD: _bindgen_ty_152 = 6; -pub const TCA_BPF_NAME: _bindgen_ty_152 = 7; -pub const TCA_BPF_FLAGS: _bindgen_ty_152 = 8; -pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_152 = 9; -pub const TCA_BPF_TAG: _bindgen_ty_152 = 10; -pub const TCA_BPF_ID: _bindgen_ty_152 = 11; -pub const __TCA_BPF_MAX: _bindgen_ty_152 = 12; -pub type _bindgen_ty_152 = ::core::ffi::c_uint; +pub const TCA_BPF_UNSPEC: _bindgen_ty_154 = 0; +pub const TCA_BPF_ACT: _bindgen_ty_154 = 1; +pub const TCA_BPF_POLICE: _bindgen_ty_154 = 2; +pub const TCA_BPF_CLASSID: _bindgen_ty_154 = 3; +pub const TCA_BPF_OPS_LEN: _bindgen_ty_154 = 4; +pub const TCA_BPF_OPS: _bindgen_ty_154 = 5; +pub const TCA_BPF_FD: _bindgen_ty_154 = 6; +pub const TCA_BPF_NAME: _bindgen_ty_154 = 7; +pub const TCA_BPF_FLAGS: _bindgen_ty_154 = 8; +pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_154 = 9; +pub const TCA_BPF_TAG: _bindgen_ty_154 = 10; +pub const TCA_BPF_ID: _bindgen_ty_154 = 11; +pub const __TCA_BPF_MAX: _bindgen_ty_154 = 12; +pub type _bindgen_ty_154 = ::core::ffi::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ifinfomsg { @@ -2403,24 +4146,22 @@ pub struct tcmsg { pub tcm_parent: __u32, pub tcm_info: __u32, } -pub const TCA_UNSPEC: _bindgen_ty_172 = 0; -pub const TCA_KIND: _bindgen_ty_172 = 1; -pub const TCA_OPTIONS: _bindgen_ty_172 = 2; -pub const TCA_STATS: _bindgen_ty_172 = 3; -pub const TCA_XSTATS: _bindgen_ty_172 = 4; -pub const TCA_RATE: _bindgen_ty_172 = 5; -pub const TCA_FCNT: _bindgen_ty_172 = 6; -pub const TCA_STATS2: _bindgen_ty_172 = 7; -pub const TCA_STAB: _bindgen_ty_172 = 8; -pub const TCA_PAD: _bindgen_ty_172 = 9; -pub const TCA_DUMP_INVISIBLE: _bindgen_ty_172 = 10; -pub const TCA_CHAIN: _bindgen_ty_172 = 11; -pub const TCA_HW_OFFLOAD: _bindgen_ty_172 = 12; -pub const TCA_INGRESS_BLOCK: _bindgen_ty_172 = 13; -pub const TCA_EGRESS_BLOCK: _bindgen_ty_172 = 14; -pub const TCA_DUMP_FLAGS: _bindgen_ty_172 = 15; -pub const __TCA_MAX: _bindgen_ty_172 = 16; -pub type _bindgen_ty_172 = ::core::ffi::c_uint; -pub const AYA_PERF_EVENT_IOC_ENABLE: ::core::ffi::c_int = 9216; -pub const AYA_PERF_EVENT_IOC_DISABLE: ::core::ffi::c_int = 9217; -pub const AYA_PERF_EVENT_IOC_SET_BPF: ::core::ffi::c_int = 1074013192; +pub const TCA_UNSPEC: _bindgen_ty_174 = 0; +pub const TCA_KIND: _bindgen_ty_174 = 1; +pub const TCA_OPTIONS: _bindgen_ty_174 = 2; +pub const TCA_STATS: _bindgen_ty_174 = 3; +pub const TCA_XSTATS: _bindgen_ty_174 = 4; +pub const TCA_RATE: _bindgen_ty_174 = 5; +pub const TCA_FCNT: _bindgen_ty_174 = 6; +pub const TCA_STATS2: _bindgen_ty_174 = 7; +pub const TCA_STAB: _bindgen_ty_174 = 8; +pub const TCA_PAD: _bindgen_ty_174 = 9; +pub const TCA_DUMP_INVISIBLE: _bindgen_ty_174 = 10; +pub const TCA_CHAIN: _bindgen_ty_174 = 11; +pub const TCA_HW_OFFLOAD: _bindgen_ty_174 = 12; +pub const TCA_INGRESS_BLOCK: _bindgen_ty_174 = 13; +pub const TCA_EGRESS_BLOCK: _bindgen_ty_174 = 14; +pub const TCA_DUMP_FLAGS: _bindgen_ty_174 = 15; +pub const TCA_EXT_WARN_MSG: _bindgen_ty_174 = 16; +pub const __TCA_MAX: _bindgen_ty_174 = 17; +pub type _bindgen_ty_174 = ::core::ffi::c_uint; diff --git a/aya-obj/src/generated/mod.rs b/aya-obj/src/generated/mod.rs index f9097937..f49fe2ba 100644 --- a/aya-obj/src/generated/mod.rs +++ b/aya-obj/src/generated/mod.rs @@ -1,31 +1,41 @@ //! eBPF bindings generated by rust-bindgen -#![allow( - dead_code, - non_camel_case_types, - non_snake_case, - clippy::all, - missing_docs -)] - mod btf_internal_bindings; + +// don't re-export __u8 __u16 etc which are already exported by the +// linux_bindings_* module +pub use btf_internal_bindings::{bpf_core_relo, bpf_core_relo_kind, btf_ext_header}; + #[cfg(target_arch = "aarch64")] mod linux_bindings_aarch64; #[cfg(target_arch = "arm")] mod linux_bindings_armv7; +#[cfg(target_arch = "loongarch64")] +mod linux_bindings_loongarch64; +#[cfg(target_arch = "mips")] +mod linux_bindings_mips; +#[cfg(target_arch = "powerpc64")] +mod linux_bindings_powerpc64; #[cfg(target_arch = "riscv64")] mod linux_bindings_riscv64; +#[cfg(target_arch = "s390x")] +mod linux_bindings_s390x; #[cfg(target_arch = "x86_64")] mod linux_bindings_x86_64; -// don't re-export __u8 __u16 etc which are already exported by the -// linux_bindings_* module -pub use btf_internal_bindings::{bpf_core_relo, bpf_core_relo_kind, btf_ext_header}; #[cfg(target_arch = "aarch64")] pub use linux_bindings_aarch64::*; #[cfg(target_arch = "arm")] pub use linux_bindings_armv7::*; +#[cfg(target_arch = "loongarch64")] +pub use linux_bindings_loongarch64::*; +#[cfg(target_arch = "mips")] +pub use linux_bindings_mips::*; +#[cfg(target_arch = "powerpc64")] +pub use linux_bindings_powerpc64::*; #[cfg(target_arch = "riscv64")] pub use linux_bindings_riscv64::*; +#[cfg(target_arch = "s390x")] +pub use linux_bindings_s390x::*; #[cfg(target_arch = "x86_64")] pub use linux_bindings_x86_64::*; diff --git a/aya-obj/src/lib.rs b/aya-obj/src/lib.rs index ea0e5670..6a6f4479 100644 --- a/aya-obj/src/lib.rs +++ b/aya-obj/src/lib.rs @@ -49,7 +49,7 @@ //! let instructions = &function.instructions; //! let data = unsafe { //! core::slice::from_raw_parts( -//! instructions.as_ptr() as *const u8, +//! instructions.as_ptr().cast(), //! instructions.len() * core::mem::size_of::(), //! ) //! }; @@ -65,28 +65,32 @@ html_favicon_url = "https://aya-rs.dev/assets/images/crabby.svg" )] #![cfg_attr(docsrs, feature(doc_cfg))] -#![deny(clippy::all, missing_docs)] -#![allow(clippy::missing_safety_doc, clippy::len_without_is_empty)] +#![deny(missing_docs)] +#![cfg_attr( + any(feature = "std", test), + expect(unused_crate_dependencies, reason = "used in doctests") +)] extern crate alloc; #[cfg(feature = "std")] extern crate std; -#[cfg(not(feature = "std"))] -mod std { - pub mod error { - pub use core_error::Error; - } - pub use core::*; - - pub mod os { - pub mod fd { - pub type RawFd = core::ffi::c_int; - } - } -} pub mod btf; +#[expect( + clippy::all, + clippy::cast_lossless, + clippy::ptr_as_ptr, + clippy::ref_as_ptr, + clippy::use_self, + missing_docs, + non_camel_case_types, + non_snake_case, + trivial_numeric_casts, + unreachable_pub, + unsafe_op_in_unsafe_fn +)] pub mod generated; +pub mod links; pub mod maps; pub mod obj; pub mod programs; @@ -108,15 +112,15 @@ impl VerifierLog { } } -impl std::fmt::Debug for VerifierLog { +impl core::fmt::Debug for VerifierLog { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let Self(log) = self; f.write_str(log) } } -impl std::fmt::Display for VerifierLog { +impl core::fmt::Display for VerifierLog { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - ::fmt(self, f) + ::fmt(self, f) } } diff --git a/aya-obj/src/links.rs b/aya-obj/src/links.rs new file mode 100644 index 00000000..74db028e --- /dev/null +++ b/aya-obj/src/links.rs @@ -0,0 +1,100 @@ +//! Link type bindings. + +use crate::{ + InvalidTypeBinding, + generated::{bpf_attach_type, bpf_link_type}, +}; + +impl TryFrom for bpf_link_type { + type Error = InvalidTypeBinding; + + fn try_from(link_type: u32) -> Result { + use bpf_link_type::*; + Ok(match link_type { + x if x == BPF_LINK_TYPE_UNSPEC as u32 => BPF_LINK_TYPE_UNSPEC, + x if x == BPF_LINK_TYPE_RAW_TRACEPOINT as u32 => BPF_LINK_TYPE_RAW_TRACEPOINT, + x if x == BPF_LINK_TYPE_TRACING as u32 => BPF_LINK_TYPE_TRACING, + x if x == BPF_LINK_TYPE_CGROUP as u32 => BPF_LINK_TYPE_CGROUP, + x if x == BPF_LINK_TYPE_ITER as u32 => BPF_LINK_TYPE_ITER, + x if x == BPF_LINK_TYPE_NETNS as u32 => BPF_LINK_TYPE_NETNS, + x if x == BPF_LINK_TYPE_XDP as u32 => BPF_LINK_TYPE_XDP, + x if x == BPF_LINK_TYPE_PERF_EVENT as u32 => BPF_LINK_TYPE_PERF_EVENT, + x if x == BPF_LINK_TYPE_KPROBE_MULTI as u32 => BPF_LINK_TYPE_KPROBE_MULTI, + x if x == BPF_LINK_TYPE_STRUCT_OPS as u32 => BPF_LINK_TYPE_STRUCT_OPS, + x if x == BPF_LINK_TYPE_NETFILTER as u32 => BPF_LINK_TYPE_NETFILTER, + x if x == BPF_LINK_TYPE_TCX as u32 => BPF_LINK_TYPE_TCX, + x if x == BPF_LINK_TYPE_UPROBE_MULTI as u32 => BPF_LINK_TYPE_UPROBE_MULTI, + x if x == BPF_LINK_TYPE_NETKIT as u32 => BPF_LINK_TYPE_NETKIT, + _ => return Err(InvalidTypeBinding { value: link_type }), + }) + } +} + +impl TryFrom for bpf_attach_type { + type Error = InvalidTypeBinding; + + fn try_from(attach_type: u32) -> Result { + use bpf_attach_type::*; + Ok(match attach_type { + x if x == BPF_CGROUP_INET_INGRESS as u32 => BPF_CGROUP_INET_INGRESS, + x if x == BPF_CGROUP_INET_EGRESS as u32 => BPF_CGROUP_INET_EGRESS, + x if x == BPF_CGROUP_INET_SOCK_CREATE as u32 => BPF_CGROUP_INET_SOCK_CREATE, + x if x == BPF_CGROUP_SOCK_OPS as u32 => BPF_CGROUP_SOCK_OPS, + x if x == BPF_SK_SKB_STREAM_PARSER as u32 => BPF_SK_SKB_STREAM_PARSER, + x if x == BPF_SK_SKB_STREAM_VERDICT as u32 => BPF_SK_SKB_STREAM_VERDICT, + x if x == BPF_CGROUP_DEVICE as u32 => BPF_CGROUP_DEVICE, + x if x == BPF_SK_MSG_VERDICT as u32 => BPF_SK_MSG_VERDICT, + x if x == BPF_CGROUP_INET4_BIND as u32 => BPF_CGROUP_INET4_BIND, + x if x == BPF_CGROUP_INET6_BIND as u32 => BPF_CGROUP_INET6_BIND, + x if x == BPF_CGROUP_INET4_CONNECT as u32 => BPF_CGROUP_INET4_CONNECT, + x if x == BPF_CGROUP_INET6_CONNECT as u32 => BPF_CGROUP_INET6_CONNECT, + x if x == BPF_CGROUP_INET4_POST_BIND as u32 => BPF_CGROUP_INET4_POST_BIND, + x if x == BPF_CGROUP_INET6_POST_BIND as u32 => BPF_CGROUP_INET6_POST_BIND, + x if x == BPF_CGROUP_UDP4_SENDMSG as u32 => BPF_CGROUP_UDP4_SENDMSG, + x if x == BPF_CGROUP_UDP6_SENDMSG as u32 => BPF_CGROUP_UDP6_SENDMSG, + x if x == BPF_LIRC_MODE2 as u32 => BPF_LIRC_MODE2, + x if x == BPF_FLOW_DISSECTOR as u32 => BPF_FLOW_DISSECTOR, + x if x == BPF_CGROUP_SYSCTL as u32 => BPF_CGROUP_SYSCTL, + x if x == BPF_CGROUP_UDP4_RECVMSG as u32 => BPF_CGROUP_UDP4_RECVMSG, + x if x == BPF_CGROUP_UDP6_RECVMSG as u32 => BPF_CGROUP_UDP6_RECVMSG, + x if x == BPF_CGROUP_GETSOCKOPT as u32 => BPF_CGROUP_GETSOCKOPT, + x if x == BPF_CGROUP_SETSOCKOPT as u32 => BPF_CGROUP_SETSOCKOPT, + x if x == BPF_TRACE_RAW_TP as u32 => BPF_TRACE_RAW_TP, + x if x == BPF_TRACE_FENTRY as u32 => BPF_TRACE_FENTRY, + x if x == BPF_TRACE_FEXIT as u32 => BPF_TRACE_FEXIT, + x if x == BPF_MODIFY_RETURN as u32 => BPF_MODIFY_RETURN, + x if x == BPF_LSM_MAC as u32 => BPF_LSM_MAC, + x if x == BPF_TRACE_ITER as u32 => BPF_TRACE_ITER, + x if x == BPF_CGROUP_INET4_GETPEERNAME as u32 => BPF_CGROUP_INET4_GETPEERNAME, + x if x == BPF_CGROUP_INET6_GETPEERNAME as u32 => BPF_CGROUP_INET6_GETPEERNAME, + x if x == BPF_CGROUP_INET4_GETSOCKNAME as u32 => BPF_CGROUP_INET4_GETSOCKNAME, + x if x == BPF_CGROUP_INET6_GETSOCKNAME as u32 => BPF_CGROUP_INET6_GETSOCKNAME, + x if x == BPF_XDP_DEVMAP as u32 => BPF_XDP_DEVMAP, + x if x == BPF_CGROUP_INET_SOCK_RELEASE as u32 => BPF_CGROUP_INET_SOCK_RELEASE, + x if x == BPF_XDP_CPUMAP as u32 => BPF_XDP_CPUMAP, + x if x == BPF_SK_LOOKUP as u32 => BPF_SK_LOOKUP, + x if x == BPF_XDP as u32 => BPF_XDP, + x if x == BPF_SK_SKB_VERDICT as u32 => BPF_SK_SKB_VERDICT, + x if x == BPF_SK_REUSEPORT_SELECT as u32 => BPF_SK_REUSEPORT_SELECT, + x if x == BPF_SK_REUSEPORT_SELECT_OR_MIGRATE as u32 => { + BPF_SK_REUSEPORT_SELECT_OR_MIGRATE + } + x if x == BPF_PERF_EVENT as u32 => BPF_PERF_EVENT, + x if x == BPF_TRACE_KPROBE_MULTI as u32 => BPF_TRACE_KPROBE_MULTI, + x if x == BPF_LSM_CGROUP as u32 => BPF_LSM_CGROUP, + x if x == BPF_STRUCT_OPS as u32 => BPF_STRUCT_OPS, + x if x == BPF_NETFILTER as u32 => BPF_NETFILTER, + x if x == BPF_TCX_INGRESS as u32 => BPF_TCX_INGRESS, + x if x == BPF_TCX_EGRESS as u32 => BPF_TCX_EGRESS, + x if x == BPF_TRACE_UPROBE_MULTI as u32 => BPF_TRACE_UPROBE_MULTI, + x if x == BPF_CGROUP_UNIX_CONNECT as u32 => BPF_CGROUP_UNIX_CONNECT, + x if x == BPF_CGROUP_UNIX_SENDMSG as u32 => BPF_CGROUP_UNIX_SENDMSG, + x if x == BPF_CGROUP_UNIX_RECVMSG as u32 => BPF_CGROUP_UNIX_RECVMSG, + x if x == BPF_CGROUP_UNIX_GETPEERNAME as u32 => BPF_CGROUP_UNIX_GETPEERNAME, + x if x == BPF_CGROUP_UNIX_GETSOCKNAME as u32 => BPF_CGROUP_UNIX_GETSOCKNAME, + x if x == BPF_NETKIT_PRIMARY as u32 => BPF_NETKIT_PRIMARY, + x if x == BPF_NETKIT_PEER as u32 => BPF_NETKIT_PEER, + _ => return Err(InvalidTypeBinding { value: attach_type }), + }) + } +} diff --git a/aya-obj/src/maps.rs b/aya-obj/src/maps.rs index ca85bba7..217b401b 100644 --- a/aya-obj/src/maps.rs +++ b/aya-obj/src/maps.rs @@ -3,18 +3,10 @@ use alloc::vec::Vec; use core::mem; -#[cfg(not(feature = "std"))] -use crate::std; -use crate::EbpfSectionKind; - -/// Invalid map type encontered -pub struct InvalidMapTypeError { - /// The map type - pub map_type: u32, -} +use crate::{EbpfSectionKind, InvalidTypeBinding}; impl TryFrom for crate::generated::bpf_map_type { - type Error = InvalidMapTypeError; + type Error = InvalidTypeBinding; fn try_from(map_type: u32) -> Result { use crate::generated::bpf_map_type::*; @@ -31,7 +23,6 @@ impl TryFrom for crate::generated::bpf_map_type { x if x == BPF_MAP_TYPE_LRU_HASH as u32 => BPF_MAP_TYPE_LRU_HASH, x if x == BPF_MAP_TYPE_LRU_PERCPU_HASH as u32 => BPF_MAP_TYPE_LRU_PERCPU_HASH, x if x == BPF_MAP_TYPE_LPM_TRIE as u32 => BPF_MAP_TYPE_LPM_TRIE, - x if x == BPF_MAP_TYPE_BLOOM_FILTER as u32 => BPF_MAP_TYPE_BLOOM_FILTER, x if x == BPF_MAP_TYPE_ARRAY_OF_MAPS as u32 => BPF_MAP_TYPE_ARRAY_OF_MAPS, x if x == BPF_MAP_TYPE_HASH_OF_MAPS as u32 => BPF_MAP_TYPE_HASH_OF_MAPS, x if x == BPF_MAP_TYPE_DEVMAP as u32 => BPF_MAP_TYPE_DEVMAP, @@ -42,7 +33,6 @@ impl TryFrom for crate::generated::bpf_map_type { x if x == BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED as u32 => { BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED } - x if x == BPF_MAP_TYPE_CGRP_STORAGE as u32 => BPF_MAP_TYPE_CGRP_STORAGE, x if x == BPF_MAP_TYPE_REUSEPORT_SOCKARRAY as u32 => BPF_MAP_TYPE_REUSEPORT_SOCKARRAY, x if x == BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED as u32 => { BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED @@ -58,7 +48,8 @@ impl TryFrom for crate::generated::bpf_map_type { x if x == BPF_MAP_TYPE_BLOOM_FILTER as u32 => BPF_MAP_TYPE_BLOOM_FILTER, x if x == BPF_MAP_TYPE_USER_RINGBUF as u32 => BPF_MAP_TYPE_USER_RINGBUF, x if x == BPF_MAP_TYPE_CGRP_STORAGE as u32 => BPF_MAP_TYPE_CGRP_STORAGE, - _ => return Err(InvalidMapTypeError { map_type }), + x if x == BPF_MAP_TYPE_ARENA as u32 => BPF_MAP_TYPE_ARENA, + _ => return Err(InvalidTypeBinding { value: map_type }), }) } } @@ -108,15 +99,14 @@ impl TryFrom for PinningType { fn try_from(value: u32) -> Result { match value { - 0 => Ok(PinningType::None), - 1 => Ok(PinningType::ByName), + 0 => Ok(Self::None), + 1 => Ok(Self::ByName), pinning_type => Err(PinningError::Unsupported { pinning_type }), } } } /// Map definition in legacy BPF map declaration style -#[allow(non_camel_case_types)] #[repr(C)] #[derive(Copy, Clone, Debug, Default, PartialEq, Eq)] pub struct bpf_map_def { @@ -154,96 +144,96 @@ impl Map { /// Returns the map type pub fn map_type(&self) -> u32 { match self { - Map::Legacy(m) => m.def.map_type, - Map::Btf(m) => m.def.map_type, + Self::Legacy(m) => m.def.map_type, + Self::Btf(m) => m.def.map_type, } } /// Returns the key size in bytes pub fn key_size(&self) -> u32 { match self { - Map::Legacy(m) => m.def.key_size, - Map::Btf(m) => m.def.key_size, + Self::Legacy(m) => m.def.key_size, + Self::Btf(m) => m.def.key_size, } } /// Returns the value size in bytes pub fn value_size(&self) -> u32 { match self { - Map::Legacy(m) => m.def.value_size, - Map::Btf(m) => m.def.value_size, + Self::Legacy(m) => m.def.value_size, + Self::Btf(m) => m.def.value_size, } } /// Set the value size in bytes pub fn set_value_size(&mut self, size: u32) { match self { - Map::Legacy(m) => m.def.value_size = size, - Map::Btf(m) => m.def.value_size = size, + Self::Legacy(m) => m.def.value_size = size, + Self::Btf(m) => m.def.value_size = size, } } /// Returns the max entry number pub fn max_entries(&self) -> u32 { match self { - Map::Legacy(m) => m.def.max_entries, - Map::Btf(m) => m.def.max_entries, + Self::Legacy(m) => m.def.max_entries, + Self::Btf(m) => m.def.max_entries, } } /// Sets the max entry number pub fn set_max_entries(&mut self, v: u32) { match self { - Map::Legacy(m) => m.def.max_entries = v, - Map::Btf(m) => m.def.max_entries = v, + Self::Legacy(m) => m.def.max_entries = v, + Self::Btf(m) => m.def.max_entries = v, } } /// Returns the map flags pub fn map_flags(&self) -> u32 { match self { - Map::Legacy(m) => m.def.map_flags, - Map::Btf(m) => m.def.map_flags, + Self::Legacy(m) => m.def.map_flags, + Self::Btf(m) => m.def.map_flags, } } /// Returns the pinning type of the map pub fn pinning(&self) -> PinningType { match self { - Map::Legacy(m) => m.def.pinning, - Map::Btf(m) => m.def.pinning, + Self::Legacy(m) => m.def.pinning, + Self::Btf(m) => m.def.pinning, } } /// Returns the map data pub fn data(&self) -> &[u8] { match self { - Map::Legacy(m) => &m.data, - Map::Btf(m) => &m.data, + Self::Legacy(m) => &m.data, + Self::Btf(m) => &m.data, } } /// Returns the map data as mutable pub fn data_mut(&mut self) -> &mut Vec { match self { - Map::Legacy(m) => m.data.as_mut(), - Map::Btf(m) => m.data.as_mut(), + Self::Legacy(m) => m.data.as_mut(), + Self::Btf(m) => m.data.as_mut(), } } /// Returns the section index pub fn section_index(&self) -> usize { match self { - Map::Legacy(m) => m.section_index, - Map::Btf(m) => m.section_index, + Self::Legacy(m) => m.section_index, + Self::Btf(m) => m.section_index, } } /// Returns the section kind. pub fn section_kind(&self) -> EbpfSectionKind { match self { - Map::Legacy(m) => m.section_kind, - Map::Btf(_) => EbpfSectionKind::BtfMaps, + Self::Legacy(m) => m.section_kind, + Self::Btf(_) => EbpfSectionKind::BtfMaps, } } @@ -253,8 +243,8 @@ impl Map { /// need symbols in order to be relocated. pub fn symbol_index(&self) -> Option { match self { - Map::Legacy(m) => m.symbol_index, - Map::Btf(m) => Some(m.symbol_index), + Self::Legacy(m) => m.symbol_index, + Self::Btf(m) => Some(m.symbol_index), } } } diff --git a/aya-obj/src/obj.rs b/aya-obj/src/obj.rs index f6f4fc8b..c3d0d107 100644 --- a/aya-obj/src/obj.rs +++ b/aya-obj/src/obj.rs @@ -1,32 +1,31 @@ //! Object file loading, parsing, and relocation. use alloc::{ - borrow::ToOwned, + borrow::ToOwned as _, collections::BTreeMap, ffi::CString, - string::{String, ToString}, + string::{String, ToString as _}, + vec, vec::Vec, }; use core::{ffi::CStr, mem, ptr, slice::from_raw_parts_mut, str::FromStr}; use log::debug; use object::{ - read::{Object as ElfObject, ObjectSection, Section as ObjSection}, - Endianness, ObjectSymbol, ObjectSymbolTable, RelocationTarget, SectionIndex, SectionKind, - SymbolKind, + Endianness, ObjectSymbol as _, ObjectSymbolTable as _, RelocationTarget, SectionIndex, + SectionKind, SymbolKind, + read::{Object as _, ObjectSection as _, Section as ObjSection}, }; -#[cfg(not(feature = "std"))] -use crate::std; use crate::{ btf::{ Array, Btf, BtfError, BtfExt, BtfFeatures, BtfType, DataSecEntry, FuncSecInfo, LineSecInfo, }, generated::{ - bpf_insn, bpf_map_info, bpf_map_type::BPF_MAP_TYPE_ARRAY, BPF_CALL, BPF_F_RDONLY_PROG, - BPF_JMP, BPF_K, + BPF_CALL, BPF_F_RDONLY_PROG, BPF_JMP, BPF_K, bpf_func_id::*, bpf_insn, bpf_map_info, + bpf_map_type::BPF_MAP_TYPE_ARRAY, }, - maps::{bpf_map_def, BtfMap, BtfMapDef, LegacyMap, Map, PinningType, MINIMUM_MAP_SIZE}, + maps::{BtfMap, BtfMapDef, LegacyMap, MINIMUM_MAP_SIZE, Map, PinningType, bpf_map_def}, programs::{ CgroupSockAddrAttachType, CgroupSockAttachType, CgroupSockoptAttachType, XdpAttachType, }, @@ -38,7 +37,6 @@ const KERNEL_VERSION_ANY: u32 = 0xFFFF_FFFE; /// Features implements BPF and BTF feature detection #[derive(Default, Debug)] -#[allow(missing_docs)] pub struct Features { bpf_name: bool, bpf_probe_read_kernel: bool, @@ -52,7 +50,7 @@ pub struct Features { impl Features { #[doc(hidden)] - #[allow(clippy::too_many_arguments)] + #[expect(clippy::too_many_arguments)] pub fn new( bpf_name: bool, bpf_probe_read_kernel: bool, @@ -75,7 +73,10 @@ impl Features { } } - /// Returns whether BPF program names are supported. + /// Returns whether BPF program names and map names are supported. + /// + /// Although the feature probe performs the check for program name, we can use this to also + /// detect if map name is supported since they were both introduced in the same commit. pub fn bpf_name(&self) -> bool { self.bpf_name } @@ -220,7 +221,7 @@ pub struct Function { /// - `fmod_ret+`, `fmod_ret.s+` /// - `iter+`, `iter.s+` #[derive(Debug, Clone)] -#[allow(missing_docs)] +#[expect(missing_docs)] pub enum ProgramSection { KRetProbe, KProbe, @@ -257,6 +258,7 @@ pub enum ProgramSection { Lsm { sleepable: bool, }, + LsmCgroup, BtfTracePoint, FEntry { sleepable: bool, @@ -264,20 +266,22 @@ pub enum ProgramSection { FExit { sleepable: bool, }, + FlowDissector, Extension, SkLookup, CgroupSock { attach_type: CgroupSockAttachType, }, CgroupDevice, + Iter { + sleepable: bool, + }, } impl FromStr for ProgramSection { type Err = ParseError; - fn from_str(section: &str) -> Result { - use ProgramSection::*; - + fn from_str(section: &str) -> Result { // parse the common case, eg "xdp/program_name" or // "sk_skb/stream_verdict/program_name" let mut pieces = section.split('/'); @@ -291,13 +295,13 @@ impl FromStr for ProgramSection { let kind = next()?; Ok(match kind { - "kprobe" => KProbe, - "kretprobe" => KRetProbe, - "uprobe" => UProbe { sleepable: false }, - "uprobe.s" => UProbe { sleepable: true }, - "uretprobe" => URetProbe { sleepable: false }, - "uretprobe.s" => URetProbe { sleepable: true }, - "xdp" | "xdp.frags" => Xdp { + "kprobe" => Self::KProbe, + "kretprobe" => Self::KRetProbe, + "uprobe" => Self::UProbe { sleepable: false }, + "uprobe.s" => Self::UProbe { sleepable: true }, + "uretprobe" => Self::URetProbe { sleepable: false }, + "uretprobe.s" => Self::URetProbe { sleepable: true }, + "xdp" | "xdp.frags" => Self::Xdp { frags: kind == "xdp.frags", attach_type: match pieces.next() { None => XdpAttachType::Interface, @@ -306,101 +310,101 @@ impl FromStr for ProgramSection { Some(_) => { return Err(ParseError::InvalidProgramSection { section: section.to_owned(), - }) + }); } }, }, - "tp_btf" => BtfTracePoint, - "tracepoint" | "tp" => TracePoint, - "socket" => SocketFilter, - "sk_msg" => SkMsg, + "tp_btf" => Self::BtfTracePoint, + "tracepoint" | "tp" => Self::TracePoint, + "socket" => Self::SocketFilter, + "sk_msg" => Self::SkMsg, "sk_skb" => { let name = next()?; match name { - "stream_parser" => SkSkbStreamParser, - "stream_verdict" => SkSkbStreamVerdict, + "stream_parser" => Self::SkSkbStreamParser, + "stream_verdict" => Self::SkSkbStreamVerdict, _ => { return Err(ParseError::InvalidProgramSection { section: section.to_owned(), - }) + }); } } } - "sockops" => SockOps, - "classifier" => SchedClassifier, + "sockops" => Self::SockOps, + "classifier" => Self::SchedClassifier, "cgroup_skb" => { let name = next()?; match name { - "ingress" => CgroupSkbIngress, - "egress" => CgroupSkbEgress, + "ingress" => Self::CgroupSkbIngress, + "egress" => Self::CgroupSkbEgress, _ => { return Err(ParseError::InvalidProgramSection { section: section.to_owned(), - }) + }); } } } "cgroup" => { let name = next()?; match name { - "skb" => CgroupSkb, - "sysctl" => CgroupSysctl, - "dev" => CgroupDevice, - "getsockopt" => CgroupSockopt { + "skb" => Self::CgroupSkb, + "sysctl" => Self::CgroupSysctl, + "dev" => Self::CgroupDevice, + "getsockopt" => Self::CgroupSockopt { attach_type: CgroupSockoptAttachType::Get, }, - "setsockopt" => CgroupSockopt { + "setsockopt" => Self::CgroupSockopt { attach_type: CgroupSockoptAttachType::Set, }, - "sock" => CgroupSock { + "sock" => Self::CgroupSock { attach_type: CgroupSockAttachType::default(), }, - "post_bind4" => CgroupSock { + "post_bind4" => Self::CgroupSock { attach_type: CgroupSockAttachType::PostBind4, }, - "post_bind6" => CgroupSock { + "post_bind6" => Self::CgroupSock { attach_type: CgroupSockAttachType::PostBind6, }, - "sock_create" => CgroupSock { + "sock_create" => Self::CgroupSock { attach_type: CgroupSockAttachType::SockCreate, }, - "sock_release" => CgroupSock { + "sock_release" => Self::CgroupSock { attach_type: CgroupSockAttachType::SockRelease, }, - "bind4" => CgroupSockAddr { + "bind4" => Self::CgroupSockAddr { attach_type: CgroupSockAddrAttachType::Bind4, }, - "bind6" => CgroupSockAddr { + "bind6" => Self::CgroupSockAddr { attach_type: CgroupSockAddrAttachType::Bind6, }, - "connect4" => CgroupSockAddr { + "connect4" => Self::CgroupSockAddr { attach_type: CgroupSockAddrAttachType::Connect4, }, - "connect6" => CgroupSockAddr { + "connect6" => Self::CgroupSockAddr { attach_type: CgroupSockAddrAttachType::Connect6, }, - "getpeername4" => CgroupSockAddr { + "getpeername4" => Self::CgroupSockAddr { attach_type: CgroupSockAddrAttachType::GetPeerName4, }, - "getpeername6" => CgroupSockAddr { + "getpeername6" => Self::CgroupSockAddr { attach_type: CgroupSockAddrAttachType::GetPeerName6, }, - "getsockname4" => CgroupSockAddr { + "getsockname4" => Self::CgroupSockAddr { attach_type: CgroupSockAddrAttachType::GetSockName4, }, - "getsockname6" => CgroupSockAddr { + "getsockname6" => Self::CgroupSockAddr { attach_type: CgroupSockAddrAttachType::GetSockName6, }, - "sendmsg4" => CgroupSockAddr { + "sendmsg4" => Self::CgroupSockAddr { attach_type: CgroupSockAddrAttachType::UDPSendMsg4, }, - "sendmsg6" => CgroupSockAddr { + "sendmsg6" => Self::CgroupSockAddr { attach_type: CgroupSockAddrAttachType::UDPSendMsg6, }, - "recvmsg4" => CgroupSockAddr { + "recvmsg4" => Self::CgroupSockAddr { attach_type: CgroupSockAddrAttachType::UDPRecvMsg4, }, - "recvmsg6" => CgroupSockAddr { + "recvmsg6" => Self::CgroupSockAddr { attach_type: CgroupSockAddrAttachType::UDPRecvMsg6, }, _ => { @@ -410,21 +414,25 @@ impl FromStr for ProgramSection { } } } - "lirc_mode2" => LircMode2, - "perf_event" => PerfEvent, - "raw_tp" | "raw_tracepoint" => RawTracePoint, - "lsm" => Lsm { sleepable: false }, - "lsm.s" => Lsm { sleepable: true }, - "fentry" => FEntry { sleepable: false }, - "fentry.s" => FEntry { sleepable: true }, - "fexit" => FExit { sleepable: false }, - "fexit.s" => FExit { sleepable: true }, - "freplace" => Extension, - "sk_lookup" => SkLookup, + "lirc_mode2" => Self::LircMode2, + "perf_event" => Self::PerfEvent, + "raw_tp" | "raw_tracepoint" => Self::RawTracePoint, + "lsm" => Self::Lsm { sleepable: false }, + "lsm.s" => Self::Lsm { sleepable: true }, + "lsm_cgroup" => Self::LsmCgroup, + "fentry" => Self::FEntry { sleepable: false }, + "fentry.s" => Self::FEntry { sleepable: true }, + "fexit" => Self::FExit { sleepable: false }, + "fexit.s" => Self::FExit { sleepable: true }, + "flow_dissector" => Self::FlowDissector, + "freplace" => Self::Extension, + "sk_lookup" => Self::SkLookup, + "iter" => Self::Iter { sleepable: false }, + "iter.s" => Self::Iter { sleepable: true }, _ => { return Err(ParseError::InvalidProgramSection { section: section.to_owned(), - }) + }); } }) } @@ -432,7 +440,7 @@ impl FromStr for ProgramSection { impl Object { /// Parses the binary data as an object file into an [Object] - pub fn parse(data: &[u8]) -> Result { + pub fn parse(data: &[u8]) -> Result { let obj = object::read::File::parse(data).map_err(ParseError::ElfError)?; let endianness = obj.endianness(); @@ -448,7 +456,7 @@ impl Object { None }; - let mut bpf_obj = Object::new(endianness, license, kernel_version); + let mut bpf_obj = Self::new(endianness, license, kernel_version); if let Some(symbol_table) = obj.symbol_table() { for symbol in symbol_table.symbols() { @@ -503,8 +511,8 @@ impl Object { Ok(bpf_obj) } - fn new(endianness: Endianness, license: CString, kernel_version: Option) -> Object { - Object { + fn new(endianness: Endianness, license: CString, kernel_version: Option) -> Self { + Self { endianness, license, kernel_version, @@ -521,6 +529,13 @@ impl Object { } } + /// Returns true if this object contains CO-RE relocations. + pub fn has_btf_relocations(&self) -> bool { + self.btf_ext + .as_ref() + .is_some_and(|ext| !ext.relocations().is_empty()) + } + /// Patches map data pub fn patch_map_data( &mut self, @@ -570,13 +585,13 @@ impl Object { Ok(()) } - fn parse_btf(&mut self, section: &Section) -> Result<(), BtfError> { + fn parse_btf(&mut self, section: &Section<'_>) -> Result<(), BtfError> { self.btf = Some(Btf::parse(section.data, self.endianness)?); Ok(()) } - fn parse_btf_ext(&mut self, section: &Section) -> Result<(), BtfError> { + fn parse_btf_ext(&mut self, section: &Section<'_>) -> Result<(), BtfError> { self.btf_ext = Some(BtfExt::parse( section.data, self.endianness, @@ -585,7 +600,7 @@ impl Object { Ok(()) } - fn parse_programs(&mut self, section: &Section) -> Result<(), ParseError> { + fn parse_programs(&mut self, section: &Section<'_>) -> Result<(), ParseError> { let program_section = ProgramSection::from_str(section.name)?; let syms = self.symbols_by_section @@ -616,7 +631,7 @@ impl Object { fn parse_program( &self, - section: &Section, + section: &Section<'_>, program_section: ProgramSection, name: String, symbol: &Symbol, @@ -652,7 +667,7 @@ impl Object { )) } - fn parse_text_section(&mut self, section: Section) -> Result<(), ParseError> { + fn parse_text_section(&mut self, section: Section<'_>) -> Result<(), ParseError> { let mut symbols_by_address = HashMap::new(); for sym in self.symbol_table.values() { @@ -723,7 +738,7 @@ impl Object { Ok(()) } - fn parse_btf_maps(&mut self, section: &Section) -> Result<(), ParseError> { + fn parse_btf_maps(&mut self, section: &Section<'_>) -> Result<(), ParseError> { if self.btf.is_none() { return Err(ParseError::NoBTF); } @@ -778,7 +793,7 @@ impl Object { fn parse_maps_section<'a, I: Iterator>( &self, maps: &mut HashMap, - section: &Section, + section: &Section<'_>, symbols: I, ) -> Result<(), ParseError> { let mut have_symbols = false; @@ -816,7 +831,7 @@ impl Object { Ok(()) } - fn parse_section(&mut self, section: Section) -> Result<(), ParseError> { + fn parse_section(&mut self, section: Section<'_>) -> Result<(), ParseError> { self.section_infos .insert(section.name.to_owned(), (section.index, section.size)); match section.kind { @@ -878,20 +893,13 @@ impl Object { } fn insn_is_helper_call(ins: &bpf_insn) -> bool { - let klass = (ins.code & 0x07) as u32; - let op = (ins.code & 0xF0) as u32; - let src = (ins.code & 0x08) as u32; + let klass = u32::from(ins.code & 0x07); + let op = u32::from(ins.code & 0xF0); + let src = u32::from(ins.code & 0x08); klass == BPF_JMP && op == BPF_CALL && src == BPF_K && ins.src_reg() == 0 && ins.dst_reg() == 0 } -const BPF_FUNC_PROBE_READ: i32 = 4; -const BPF_FUNC_PROBE_READ_STR: i32 = 45; -const BPF_FUNC_PROBE_READ_USER: i32 = 112; -const BPF_FUNC_PROBE_READ_KERNEL: i32 = 113; -const BPF_FUNC_PROBE_READ_USER_STR: i32 = 114; -const BPF_FUNC_PROBE_READ_KERNEL_STR: i32 = 115; - impl Function { fn sanitize(&mut self, features: &Features) { for inst in &mut self.instructions { @@ -899,18 +907,23 @@ impl Function { continue; } - match inst.imm { - BPF_FUNC_PROBE_READ_USER | BPF_FUNC_PROBE_READ_KERNEL - if !features.bpf_probe_read_kernel => - { - inst.imm = BPF_FUNC_PROBE_READ; - } - BPF_FUNC_PROBE_READ_USER_STR | BPF_FUNC_PROBE_READ_KERNEL_STR - if !features.bpf_probe_read_kernel => - { - inst.imm = BPF_FUNC_PROBE_READ_STR; + if !features.bpf_probe_read_kernel { + const BPF_FUNC_PROBE_READ_KERNEL: i32 = BPF_FUNC_probe_read_kernel as i32; + const BPF_FUNC_PROBE_READ_USER: i32 = BPF_FUNC_probe_read_user as i32; + const BPF_FUNC_PROBE_READ: i32 = BPF_FUNC_probe_read as i32; + const BPF_FUNC_PROBE_READ_KERNEL_STR: i32 = BPF_FUNC_probe_read_kernel_str as i32; + const BPF_FUNC_PROBE_READ_USER_STR: i32 = BPF_FUNC_probe_read_user_str as i32; + const BPF_FUNC_PROBE_READ_STR: i32 = BPF_FUNC_probe_read_str as i32; + + match inst.imm { + BPF_FUNC_PROBE_READ_KERNEL | BPF_FUNC_PROBE_READ_USER => { + inst.imm = BPF_FUNC_PROBE_READ; + } + BPF_FUNC_PROBE_READ_KERNEL_STR | BPF_FUNC_PROBE_READ_USER_STR => { + inst.imm = BPF_FUNC_PROBE_READ_STR; + } + _ => {} } - _ => {} } } } @@ -918,7 +931,7 @@ impl Function { /// Errors caught during parsing the object file #[derive(Debug, thiserror::Error)] -#[allow(missing_docs)] +#[expect(missing_docs)] pub enum ParseError { #[error("error parsing ELF data")] ElfError(object::read::Error), @@ -987,6 +1000,12 @@ pub enum ParseError { NoBTF, } +/// Invalid bindings to the bpf type from the parsed/received value. +pub struct InvalidTypeBinding { + /// The value parsed/received. + pub value: T, +} + /// The kind of an ELF section. #[derive(Debug, Copy, Clone, Eq, PartialEq)] pub enum EbpfSectionKind { @@ -1017,29 +1036,29 @@ pub enum EbpfSectionKind { } impl EbpfSectionKind { - fn from_name(name: &str) -> EbpfSectionKind { + fn from_name(name: &str) -> Self { if name.starts_with("license") { - EbpfSectionKind::License + Self::License } else if name.starts_with("version") { - EbpfSectionKind::Version + Self::Version } else if name.starts_with("maps") { - EbpfSectionKind::Maps + Self::Maps } else if name.starts_with(".maps") { - EbpfSectionKind::BtfMaps + Self::BtfMaps } else if name.starts_with(".text") { - EbpfSectionKind::Text + Self::Text } else if name.starts_with(".bss") { - EbpfSectionKind::Bss + Self::Bss } else if name.starts_with(".data") { - EbpfSectionKind::Data + Self::Data } else if name.starts_with(".rodata") { - EbpfSectionKind::Rodata + Self::Rodata } else if name == ".BTF" { - EbpfSectionKind::Btf + Self::Btf } else if name == ".BTF.ext" { - EbpfSectionKind::BtfExt + Self::BtfExt } else { - EbpfSectionKind::Undefined + Self::Undefined } } } @@ -1055,10 +1074,10 @@ struct Section<'a> { relocations: Vec, } -impl<'data, 'file, 'a> TryFrom<&'a ObjSection<'data, 'file>> for Section<'a> { +impl<'a> TryFrom<&'a ObjSection<'_, '_>> for Section<'a> { type Error = ParseError; - fn try_from(section: &'a ObjSection) -> Result, ParseError> { + fn try_from(section: &'a ObjSection<'_, '_>) -> Result { let index = section.index(); let map_err = |error| ParseError::SectionError { index: index.0, @@ -1124,7 +1143,7 @@ fn parse_version(data: &[u8], endianness: object::Endianness) -> Result { return Err(ParseError::InvalidKernelVersion { data: data.to_vec(), - }) + }); } }; @@ -1149,16 +1168,15 @@ fn get_map_field(btf: &Btf, type_id: u32) -> Result { other => { return Err(BtfError::UnexpectedBtfType { type_id: other.btf_type().unwrap_or(0), - }) + }); } }; - // Safety: union let arr = match &btf.type_by_id(pty.btf_type)? { BtfType::Array(Array { array, .. }) => array, other => { return Err(BtfError::UnexpectedBtfType { type_id: other.btf_type().unwrap_or(0), - }) + }); } }; Ok(arr.len) @@ -1166,9 +1184,9 @@ fn get_map_field(btf: &Btf, type_id: u32) -> Result { // Parsed '.bss' '.data' and '.rodata' sections. These sections are arrays of // bytes and are relocated based on their section index. -fn parse_data_map_section(section: &Section) -> Result { +fn parse_data_map_section(section: &Section<'_>) -> Result { let (def, data) = match section.kind { - EbpfSectionKind::Bss | EbpfSectionKind::Data | EbpfSectionKind::Rodata => { + EbpfSectionKind::Data | EbpfSectionKind::Rodata => { let def = bpf_map_def { map_type: BPF_MAP_TYPE_ARRAY as u32, key_size: mem::size_of::() as u32, @@ -1185,6 +1203,17 @@ fn parse_data_map_section(section: &Section) -> Result { }; (def, section.data.to_vec()) } + EbpfSectionKind::Bss => { + let def = bpf_map_def { + map_type: BPF_MAP_TYPE_ARRAY as u32, + key_size: mem::size_of::() as u32, + value_size: section.size as u32, + max_entries: 1, + map_flags: 0, + ..Default::default() + }; + (def, vec![0; section.size as usize]) + } _ => unreachable!(), }; Ok(Map::Legacy(LegacyMap { @@ -1207,13 +1236,12 @@ fn parse_map_def(name: &str, data: &[u8]) -> Result { if data.len() < mem::size_of::() { let mut map_def = bpf_map_def::default(); unsafe { - let map_def_ptr = - from_raw_parts_mut(&mut map_def as *mut bpf_map_def as *mut u8, data.len()); + let map_def_ptr = from_raw_parts_mut(ptr::from_mut(&mut map_def).cast(), data.len()); map_def_ptr.copy_from_slice(data); } Ok(map_def) } else { - Ok(unsafe { ptr::read_unaligned(data.as_ptr() as *const bpf_map_def) }) + Ok(unsafe { ptr::read_unaligned(data.as_ptr().cast()) }) } } @@ -1223,23 +1251,65 @@ fn parse_btf_map_def(btf: &Btf, info: &DataSecEntry) -> Result<(String, BtfMapDe other => { return Err(BtfError::UnexpectedBtfType { type_id: other.btf_type().unwrap_or(0), - }) + }); } }; let map_name = btf.string_at(ty.name_offset)?; let mut map_def = BtfMapDef::default(); - // Safety: union let root_type = btf.resolve_type(ty.btf_type)?; let s = match btf.type_by_id(root_type)? { BtfType::Struct(s) => s, other => { return Err(BtfError::UnexpectedBtfType { type_id: other.btf_type().unwrap_or(0), - }) + }); } }; + // In aya-ebpf, the BTF map definition types are not used directly in the + // map variables. Instead, they are wrapped in two nested types: + // + // * A struct representing the map type (e.g., `Array`, `HashMap`) that + // provides methods for interacting with the map type (e.g. + // `HashMap::get`, `RingBuf::reserve`). + // * It has a single field with name `__0`. + // * An `UnsafeCell`, which informs the Rust compiler that the type is + // thread-safe and can be safely mutated even as a global variable. The + // kernel guarantees map operation safety. + // * It has a single field with name `value`. + // + // Therefore, the traversal to the actual map definition looks like: + // + // HashMap -> __0 -> value + let mut s = s; + for (index, expected_field_name) in ["__0", "value"].into_iter().enumerate() { + match s.members.as_slice() { + [m] => { + let field_name = btf.string_at(m.name_offset)?; + if field_name.as_ref() != expected_field_name { + return Err(BtfError::UnexpectedBtfMapWrapperLayout(s.clone())); + } + s = match btf.type_by_id(m.btf_type)? { + BtfType::Struct(s) => s, + _ => { + return Err(BtfError::UnexpectedBtfType { + type_id: m.btf_type, + }); + } + }; + } + // If the first wrapper level is missing, use the original struct. + _ => { + if index == 0 { + break; + } else { + return Err(BtfError::UnexpectedBtfMapWrapperLayout(s.clone())); + } + } + } + } + for m in &s.members { match btf.string_at(m.name_offset)?.as_ref() { "type" => { @@ -1247,7 +1317,6 @@ fn parse_btf_map_def(btf: &Btf, info: &DataSecEntry) -> Result<(String, BtfMapDe } "key" => { if let BtfType::Ptr(pty) = btf.type_by_id(m.btf_type)? { - // Safety: union let t = pty.btf_type; map_def.key_size = btf.type_size(t)? as u32; map_def.btf_key_type_id = t; @@ -1283,12 +1352,12 @@ fn parse_btf_map_def(btf: &Btf, info: &DataSecEntry) -> Result<(String, BtfMapDe "pinning" => { let pinning = get_map_field(btf, m.btf_type)?; map_def.pinning = PinningType::try_from(pinning).unwrap_or_else(|_| { - debug!("{} is not a valid pin type. using PIN_NONE", pinning); + debug!("{pinning} is not a valid pin type. using PIN_NONE"); PinningType::None }); } other => { - debug!("skipping unknown map section: {}", other); + debug!("skipping unknown map section: {other}"); continue; } } @@ -1335,12 +1404,12 @@ pub fn parse_map_info(info: bpf_map_info, pinned: PinningType) -> Map { /// Copies a block of eBPF instructions pub fn copy_instructions(data: &[u8]) -> Result, ParseError> { - if data.len() % mem::size_of::() > 0 { + if !data.len().is_multiple_of(mem::size_of::()) { return Err(ParseError::InvalidProgramCode); } let instructions = data .chunks_exact(mem::size_of::()) - .map(|d| unsafe { ptr::read_unaligned(d.as_ptr() as *const bpf_insn) }) + .map(|d| unsafe { ptr::read_unaligned(d.as_ptr().cast()) }) .collect::>(); Ok(instructions) } @@ -1348,7 +1417,7 @@ pub fn copy_instructions(data: &[u8]) -> Result, ParseError> { fn get_func_and_line_info( btf_ext: Option<&BtfExt>, symbol: &Symbol, - section: &Section, + section: &Section<'_>, offset: usize, rewrite_insn_off: bool, ) -> (FuncSecInfo, LineSecInfo, usize, usize) { @@ -1396,6 +1465,7 @@ mod tests { use assert_matches::assert_matches; use super::*; + use crate::generated::btf_ext_header; const FAKE_INS_LEN: u64 = 8; @@ -1552,7 +1622,7 @@ mod tests { pinning: PinningType::ByName, }; let mut buf = [0u8; 128]; - unsafe { ptr::write_unaligned(buf.as_mut_ptr() as *mut _, def) }; + unsafe { ptr::write_unaligned(buf.as_mut_ptr().cast(), def) }; assert_eq!(parse_map_def("foo", &buf).unwrap(), def); } @@ -1594,22 +1664,32 @@ mod tests { #[test] fn sanitizes_empty_btf_files_to_none() { let mut obj = fake_obj(); - obj.parse_section(fake_section( - EbpfSectionKind::Btf, - ".BTF", - &[ - 159, 235, 1, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, - ], - None, - )) - .unwrap(); + + let btf = Btf::new(); + let btf_bytes = btf.to_bytes(); + obj.parse_section(fake_section(EbpfSectionKind::Btf, ".BTF", &btf_bytes, None)) + .unwrap(); + + const FUNC_INFO_LEN: u32 = 4; + const LINE_INFO_LEN: u32 = 4; + const CORE_RELO_LEN: u32 = 16; + let ext_header = btf_ext_header { + magic: 0xeb9f, + version: 1, + flags: 0, + hdr_len: 24, + func_info_off: 0, + func_info_len: FUNC_INFO_LEN, + line_info_off: FUNC_INFO_LEN, + line_info_len: LINE_INFO_LEN, + core_relo_off: FUNC_INFO_LEN + LINE_INFO_LEN, + core_relo_len: CORE_RELO_LEN, + }; + let btf_ext_bytes = bytes_of::(&ext_header).to_vec(); obj.parse_section(fake_section( EbpfSectionKind::BtfExt, ".BTF.ext", - &[ - 159, 235, 1, 0, 24, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 8, 0, - 0, 0, 16, 0, 0, 0, - ], + &btf_ext_bytes, None, )) .unwrap(); @@ -1628,7 +1708,7 @@ mod tests { "kprobe/foo", &42u32.to_ne_bytes(), None, - ),), + )), Err(ParseError::InvalidProgramCode) ); } @@ -1651,7 +1731,7 @@ mod tests { assert_matches!(prog_foo, Program { license, kernel_version: None, - section: ProgramSection::KProbe { .. }, + section: ProgramSection::KProbe, .. } => assert_eq!(license.to_str().unwrap(), "GPL")); @@ -1715,7 +1795,7 @@ mod tests { assert_matches!(prog_foo, Program { license, kernel_version: None, - section: ProgramSection::KProbe { .. }, + section: ProgramSection::KProbe, .. } => assert_eq!(license.to_str().unwrap(), "GPL")); assert_matches!( @@ -1733,7 +1813,7 @@ mod tests { assert_matches!(prog_bar, Program { license, kernel_version: None, - section: ProgramSection::KProbe { .. }, + section: ProgramSection::KProbe , .. } => assert_eq!(license.to_str().unwrap(), "GPL")); assert_matches!( @@ -1865,7 +1945,7 @@ mod tests { assert_matches!( obj.programs.get("foo"), Some(Program { - section: ProgramSection::KProbe { .. }, + section: ProgramSection::KProbe, .. }) ); @@ -1987,7 +2067,7 @@ mod tests { assert_matches!( obj.programs.get("foo"), Some(Program { - section: ProgramSection::TracePoint { .. }, + section: ProgramSection::TracePoint, .. }) ); @@ -2004,7 +2084,7 @@ mod tests { assert_matches!( obj.programs.get("bar"), Some(Program { - section: ProgramSection::TracePoint { .. }, + section: ProgramSection::TracePoint, .. }) ); @@ -2027,7 +2107,7 @@ mod tests { assert_matches!( obj.programs.get("foo"), Some(Program { - section: ProgramSection::SocketFilter { .. }, + section: ProgramSection::SocketFilter, .. }) ); @@ -2097,7 +2177,7 @@ mod tests { assert_matches!( obj.programs.get("foo"), Some(Program { - section: ProgramSection::RawTracePoint { .. }, + section: ProgramSection::RawTracePoint, .. }) ); @@ -2114,7 +2194,7 @@ mod tests { assert_matches!( obj.programs.get("bar"), Some(Program { - section: ProgramSection::RawTracePoint { .. }, + section: ProgramSection::RawTracePoint, .. }) ); @@ -2137,10 +2217,7 @@ mod tests { assert_matches!( obj.programs.get("foo"), Some(Program { - section: ProgramSection::Lsm { - sleepable: false, - .. - }, + section: ProgramSection::Lsm { sleepable: false }, .. }) ); @@ -2172,6 +2249,29 @@ mod tests { ); } + #[test] + fn test_parse_section_lsm_cgroup() { + let mut obj = fake_obj(); + fake_sym(&mut obj, 0, 0, "foo", FAKE_INS_LEN); + + assert_matches!( + obj.parse_section(fake_section( + EbpfSectionKind::Program, + "lsm_cgroup/foo", + bytes_of(&fake_ins()), + None + )), + Ok(()) + ); + assert_matches!( + obj.programs.get("foo"), + Some(Program { + section: ProgramSection::LsmCgroup, + .. + }) + ); + } + #[test] fn test_parse_section_btf_tracepoint() { let mut obj = fake_obj(); @@ -2189,7 +2289,7 @@ mod tests { assert_matches!( obj.programs.get("foo"), Some(Program { - section: ProgramSection::BtfTracePoint { .. }, + section: ProgramSection::BtfTracePoint, .. }) ); @@ -2212,7 +2312,7 @@ mod tests { assert_matches!( obj.programs.get("stream_parser"), Some(Program { - section: ProgramSection::SkSkbStreamParser { .. }, + section: ProgramSection::SkSkbStreamParser, .. }) ); @@ -2235,7 +2335,7 @@ mod tests { assert_matches!( obj.programs.get("my_parser"), Some(Program { - section: ProgramSection::SkSkbStreamParser { .. }, + section: ProgramSection::SkSkbStreamParser, .. }) ); @@ -2356,7 +2456,7 @@ mod tests { assert_matches!( obj.programs.get("ingress"), Some(Program { - section: ProgramSection::CgroupSkbIngress { .. }, + section: ProgramSection::CgroupSkbIngress, .. }) ); @@ -2379,7 +2479,7 @@ mod tests { assert_matches!( obj.programs.get("foo"), Some(Program { - section: ProgramSection::CgroupSkbIngress { .. }, + section: ProgramSection::CgroupSkbIngress, .. }) ); @@ -2402,7 +2502,7 @@ mod tests { assert_matches!( obj.programs.get("skb"), Some(Program { - section: ProgramSection::CgroupSkb { .. }, + section: ProgramSection::CgroupSkb, .. }) ); @@ -2425,7 +2525,7 @@ mod tests { assert_matches!( obj.programs.get("foo"), Some(Program { - section: ProgramSection::CgroupSkb { .. }, + section: ProgramSection::CgroupSkb, .. }) ); @@ -2588,78 +2688,153 @@ mod tests { // generated from: // objcopy --dump-section .BTF=test.btf ./target/bpfel-unknown-none/debug/multimap-btf.bpf.o // hexdump -v -e '7/1 "0x%02X, " 1/1 " 0x%02X,\n"' test.btf - let data: &[u8] = &[ - 0x9F, 0xEB, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x01, - 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0xCC, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x06, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x07, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, - 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x09, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x00, - 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0C, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x20, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x00, 0x00, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x4E, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0xC0, 0x00, - 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x0D, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x20, 0x00, - 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x4A, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x4E, 0x00, - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, - 0x0B, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x0E, 0x0F, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x00, 0x0D, 0x02, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, - 0x70, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0C, 0x12, 0x00, 0x00, 0x00, 0xB0, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xB5, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x0E, 0x15, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xBE, 0x01, - 0x00, 0x00, 0x02, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0xC4, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x69, 0x6E, 0x74, 0x00, 0x5F, 0x5F, 0x41, 0x52, 0x52, 0x41, 0x59, - 0x5F, 0x53, 0x49, 0x5A, 0x45, 0x5F, 0x54, 0x59, 0x50, 0x45, 0x5F, 0x5F, 0x00, 0x5F, - 0x5F, 0x75, 0x33, 0x32, 0x00, 0x75, 0x6E, 0x73, 0x69, 0x67, 0x6E, 0x65, 0x64, 0x20, - 0x69, 0x6E, 0x74, 0x00, 0x5F, 0x5F, 0x75, 0x36, 0x34, 0x00, 0x75, 0x6E, 0x73, 0x69, - 0x67, 0x6E, 0x65, 0x64, 0x20, 0x6C, 0x6F, 0x6E, 0x67, 0x20, 0x6C, 0x6F, 0x6E, 0x67, - 0x00, 0x74, 0x79, 0x70, 0x65, 0x00, 0x6B, 0x65, 0x79, 0x00, 0x76, 0x61, 0x6C, 0x75, - 0x65, 0x00, 0x6D, 0x61, 0x78, 0x5F, 0x65, 0x6E, 0x74, 0x72, 0x69, 0x65, 0x73, 0x00, - 0x6D, 0x61, 0x70, 0x5F, 0x31, 0x00, 0x6D, 0x61, 0x70, 0x5F, 0x32, 0x00, 0x63, 0x74, - 0x78, 0x00, 0x62, 0x70, 0x66, 0x5F, 0x70, 0x72, 0x6F, 0x67, 0x00, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x70, 0x6F, 0x69, 0x6E, 0x74, 0x00, 0x2F, 0x76, 0x61, 0x72, 0x2F, 0x68, - 0x6F, 0x6D, 0x65, 0x2F, 0x64, 0x61, 0x76, 0x65, 0x2F, 0x64, 0x65, 0x76, 0x2F, 0x61, - 0x79, 0x61, 0x2D, 0x72, 0x73, 0x2F, 0x61, 0x79, 0x61, 0x2F, 0x74, 0x65, 0x73, 0x74, - 0x2F, 0x69, 0x6E, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2D, 0x65, - 0x62, 0x70, 0x66, 0x2F, 0x73, 0x72, 0x63, 0x2F, 0x62, 0x70, 0x66, 0x2F, 0x6D, 0x75, - 0x6C, 0x74, 0x69, 0x6D, 0x61, 0x70, 0x2D, 0x62, 0x74, 0x66, 0x2E, 0x62, 0x70, 0x66, - 0x2E, 0x63, 0x00, 0x69, 0x6E, 0x74, 0x20, 0x62, 0x70, 0x66, 0x5F, 0x70, 0x72, 0x6F, - 0x67, 0x28, 0x76, 0x6F, 0x69, 0x64, 0x20, 0x2A, 0x63, 0x74, 0x78, 0x29, 0x00, 0x09, - 0x5F, 0x5F, 0x75, 0x33, 0x32, 0x20, 0x6B, 0x65, 0x79, 0x20, 0x3D, 0x20, 0x30, 0x3B, - 0x00, 0x09, 0x5F, 0x5F, 0x75, 0x36, 0x34, 0x20, 0x74, 0x77, 0x65, 0x6E, 0x74, 0x79, - 0x5F, 0x66, 0x6F, 0x75, 0x72, 0x20, 0x3D, 0x20, 0x32, 0x34, 0x3B, 0x00, 0x09, 0x5F, - 0x5F, 0x75, 0x36, 0x34, 0x20, 0x66, 0x6F, 0x72, 0x74, 0x79, 0x5F, 0x74, 0x77, 0x6F, - 0x20, 0x3D, 0x20, 0x34, 0x32, 0x3B, 0x00, 0x20, 0x20, 0x20, 0x20, 0x62, 0x70, 0x66, - 0x5F, 0x6D, 0x61, 0x70, 0x5F, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5F, 0x65, 0x6C, - 0x65, 0x6D, 0x28, 0x26, 0x6D, 0x61, 0x70, 0x5F, 0x31, 0x2C, 0x20, 0x26, 0x6B, 0x65, - 0x79, 0x2C, 0x20, 0x26, 0x74, 0x77, 0x65, 0x6E, 0x74, 0x79, 0x5F, 0x66, 0x6F, 0x75, - 0x72, 0x2C, 0x20, 0x42, 0x50, 0x46, 0x5F, 0x41, 0x4E, 0x59, 0x29, 0x3B, 0x00, 0x20, - 0x20, 0x20, 0x20, 0x62, 0x70, 0x66, 0x5F, 0x6D, 0x61, 0x70, 0x5F, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x5F, 0x65, 0x6C, 0x65, 0x6D, 0x28, 0x26, 0x6D, 0x61, 0x70, 0x5F, - 0x32, 0x2C, 0x20, 0x26, 0x6B, 0x65, 0x79, 0x2C, 0x20, 0x26, 0x66, 0x6F, 0x72, 0x74, - 0x79, 0x5F, 0x74, 0x77, 0x6F, 0x2C, 0x20, 0x42, 0x50, 0x46, 0x5F, 0x41, 0x4E, 0x59, - 0x29, 0x3B, 0x00, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6E, 0x20, 0x30, 0x3B, 0x00, - 0x63, 0x68, 0x61, 0x72, 0x00, 0x5F, 0x6C, 0x69, 0x63, 0x65, 0x6E, 0x73, 0x65, 0x00, - 0x2E, 0x6D, 0x61, 0x70, 0x73, 0x00, 0x6C, 0x69, 0x63, 0x65, 0x6E, 0x73, 0x65, 0x00, - ]; + let data: &[u8] = if cfg!(target_endian = "little") { + &[ + 0x9F, 0xEB, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x01, + 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0xCC, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x06, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, + 0x07, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, + 0x09, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x00, + 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0C, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x20, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x00, 0x00, 0x00, 0x05, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x4E, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0xC0, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x0D, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x20, 0x00, + 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x4A, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x4E, 0x00, + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, + 0x0B, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0E, 0x0F, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, + 0x00, 0x0D, 0x02, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, + 0x70, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0C, 0x12, 0x00, 0x00, 0x00, 0xB0, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xB5, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0E, 0x15, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xBE, 0x01, + 0x00, 0x00, 0x02, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0xC4, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0F, + 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x69, 0x6E, 0x74, 0x00, 0x5F, 0x5F, 0x41, 0x52, 0x52, 0x41, 0x59, + 0x5F, 0x53, 0x49, 0x5A, 0x45, 0x5F, 0x54, 0x59, 0x50, 0x45, 0x5F, 0x5F, 0x00, 0x5F, + 0x5F, 0x75, 0x33, 0x32, 0x00, 0x75, 0x6E, 0x73, 0x69, 0x67, 0x6E, 0x65, 0x64, 0x20, + 0x69, 0x6E, 0x74, 0x00, 0x5F, 0x5F, 0x75, 0x36, 0x34, 0x00, 0x75, 0x6E, 0x73, 0x69, + 0x67, 0x6E, 0x65, 0x64, 0x20, 0x6C, 0x6F, 0x6E, 0x67, 0x20, 0x6C, 0x6F, 0x6E, 0x67, + 0x00, 0x74, 0x79, 0x70, 0x65, 0x00, 0x6B, 0x65, 0x79, 0x00, 0x76, 0x61, 0x6C, 0x75, + 0x65, 0x00, 0x6D, 0x61, 0x78, 0x5F, 0x65, 0x6E, 0x74, 0x72, 0x69, 0x65, 0x73, 0x00, + 0x6D, 0x61, 0x70, 0x5F, 0x31, 0x00, 0x6D, 0x61, 0x70, 0x5F, 0x32, 0x00, 0x63, 0x74, + 0x78, 0x00, 0x62, 0x70, 0x66, 0x5F, 0x70, 0x72, 0x6F, 0x67, 0x00, 0x74, 0x72, 0x61, + 0x63, 0x65, 0x70, 0x6F, 0x69, 0x6E, 0x74, 0x00, 0x2F, 0x76, 0x61, 0x72, 0x2F, 0x68, + 0x6F, 0x6D, 0x65, 0x2F, 0x64, 0x61, 0x76, 0x65, 0x2F, 0x64, 0x65, 0x76, 0x2F, 0x61, + 0x79, 0x61, 0x2D, 0x72, 0x73, 0x2F, 0x61, 0x79, 0x61, 0x2F, 0x74, 0x65, 0x73, 0x74, + 0x2F, 0x69, 0x6E, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2D, 0x65, + 0x62, 0x70, 0x66, 0x2F, 0x73, 0x72, 0x63, 0x2F, 0x62, 0x70, 0x66, 0x2F, 0x6D, 0x75, + 0x6C, 0x74, 0x69, 0x6D, 0x61, 0x70, 0x2D, 0x62, 0x74, 0x66, 0x2E, 0x62, 0x70, 0x66, + 0x2E, 0x63, 0x00, 0x69, 0x6E, 0x74, 0x20, 0x62, 0x70, 0x66, 0x5F, 0x70, 0x72, 0x6F, + 0x67, 0x28, 0x76, 0x6F, 0x69, 0x64, 0x20, 0x2A, 0x63, 0x74, 0x78, 0x29, 0x00, 0x09, + 0x5F, 0x5F, 0x75, 0x33, 0x32, 0x20, 0x6B, 0x65, 0x79, 0x20, 0x3D, 0x20, 0x30, 0x3B, + 0x00, 0x09, 0x5F, 0x5F, 0x75, 0x36, 0x34, 0x20, 0x74, 0x77, 0x65, 0x6E, 0x74, 0x79, + 0x5F, 0x66, 0x6F, 0x75, 0x72, 0x20, 0x3D, 0x20, 0x32, 0x34, 0x3B, 0x00, 0x09, 0x5F, + 0x5F, 0x75, 0x36, 0x34, 0x20, 0x66, 0x6F, 0x72, 0x74, 0x79, 0x5F, 0x74, 0x77, 0x6F, + 0x20, 0x3D, 0x20, 0x34, 0x32, 0x3B, 0x00, 0x20, 0x20, 0x20, 0x20, 0x62, 0x70, 0x66, + 0x5F, 0x6D, 0x61, 0x70, 0x5F, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5F, 0x65, 0x6C, + 0x65, 0x6D, 0x28, 0x26, 0x6D, 0x61, 0x70, 0x5F, 0x31, 0x2C, 0x20, 0x26, 0x6B, 0x65, + 0x79, 0x2C, 0x20, 0x26, 0x74, 0x77, 0x65, 0x6E, 0x74, 0x79, 0x5F, 0x66, 0x6F, 0x75, + 0x72, 0x2C, 0x20, 0x42, 0x50, 0x46, 0x5F, 0x41, 0x4E, 0x59, 0x29, 0x3B, 0x00, 0x20, + 0x20, 0x20, 0x20, 0x62, 0x70, 0x66, 0x5F, 0x6D, 0x61, 0x70, 0x5F, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x5F, 0x65, 0x6C, 0x65, 0x6D, 0x28, 0x26, 0x6D, 0x61, 0x70, 0x5F, + 0x32, 0x2C, 0x20, 0x26, 0x6B, 0x65, 0x79, 0x2C, 0x20, 0x26, 0x66, 0x6F, 0x72, 0x74, + 0x79, 0x5F, 0x74, 0x77, 0x6F, 0x2C, 0x20, 0x42, 0x50, 0x46, 0x5F, 0x41, 0x4E, 0x59, + 0x29, 0x3B, 0x00, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6E, 0x20, 0x30, 0x3B, 0x00, + 0x63, 0x68, 0x61, 0x72, 0x00, 0x5F, 0x6C, 0x69, 0x63, 0x65, 0x6E, 0x73, 0x65, 0x00, + 0x2E, 0x6D, 0x61, 0x70, 0x73, 0x00, 0x6C, 0x69, 0x63, 0x65, 0x6E, 0x73, 0x65, 0x00, + ] + } else { + &[ + 0xEB, 0x9F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0xF0, 0x00, 0x00, 0x01, 0xF0, 0x00, 0x00, 0x01, 0xCC, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x19, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x2C, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0A, 0x00, 0x00, 0x00, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x45, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x00, 0x00, + 0x00, 0x05, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x4E, 0x00, 0x00, 0x00, 0x08, + 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, + 0x00, 0xC0, 0x00, 0x00, 0x00, 0x60, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, + 0x00, 0x20, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x4A, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x4E, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x54, + 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x66, 0x0E, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, 0x11, + 0x00, 0x00, 0x00, 0x70, 0x0C, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, + 0x01, 0xB0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x14, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0xB5, + 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x01, 0xBE, 0x0F, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x01, 0xC4, 0x0F, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x69, 0x6E, 0x74, 0x00, 0x5F, 0x5F, 0x41, 0x52, 0x52, 0x41, 0x59, + 0x5F, 0x53, 0x49, 0x5A, 0x45, 0x5F, 0x54, 0x59, 0x50, 0x45, 0x5F, 0x5F, 0x00, 0x5F, + 0x5F, 0x75, 0x33, 0x32, 0x00, 0x75, 0x6E, 0x73, 0x69, 0x67, 0x6E, 0x65, 0x64, 0x20, + 0x69, 0x6E, 0x74, 0x00, 0x5F, 0x5F, 0x75, 0x36, 0x34, 0x00, 0x75, 0x6E, 0x73, 0x69, + 0x67, 0x6E, 0x65, 0x64, 0x20, 0x6C, 0x6F, 0x6E, 0x67, 0x20, 0x6C, 0x6F, 0x6E, 0x67, + 0x00, 0x74, 0x79, 0x70, 0x65, 0x00, 0x6B, 0x65, 0x79, 0x00, 0x76, 0x61, 0x6C, 0x75, + 0x65, 0x00, 0x6D, 0x61, 0x78, 0x5F, 0x65, 0x6E, 0x74, 0x72, 0x69, 0x65, 0x73, 0x00, + 0x6D, 0x61, 0x70, 0x5F, 0x31, 0x00, 0x6D, 0x61, 0x70, 0x5F, 0x32, 0x00, 0x63, 0x74, + 0x78, 0x00, 0x62, 0x70, 0x66, 0x5F, 0x70, 0x72, 0x6F, 0x67, 0x00, 0x74, 0x72, 0x61, + 0x63, 0x65, 0x70, 0x6F, 0x69, 0x6E, 0x74, 0x00, 0x2F, 0x76, 0x61, 0x72, 0x2F, 0x68, + 0x6F, 0x6D, 0x65, 0x2F, 0x64, 0x61, 0x76, 0x65, 0x2F, 0x64, 0x65, 0x76, 0x2F, 0x61, + 0x79, 0x61, 0x2D, 0x72, 0x73, 0x2F, 0x61, 0x79, 0x61, 0x2F, 0x74, 0x65, 0x73, 0x74, + 0x2F, 0x69, 0x6E, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2D, 0x65, + 0x62, 0x70, 0x66, 0x2F, 0x73, 0x72, 0x63, 0x2F, 0x62, 0x70, 0x66, 0x2F, 0x6D, 0x75, + 0x6C, 0x74, 0x69, 0x6D, 0x61, 0x70, 0x2D, 0x62, 0x74, 0x66, 0x2E, 0x62, 0x70, 0x66, + 0x2E, 0x63, 0x00, 0x69, 0x6E, 0x74, 0x20, 0x62, 0x70, 0x66, 0x5F, 0x70, 0x72, 0x6F, + 0x67, 0x28, 0x76, 0x6F, 0x69, 0x64, 0x20, 0x2A, 0x63, 0x74, 0x78, 0x29, 0x00, 0x09, + 0x5F, 0x5F, 0x75, 0x33, 0x32, 0x20, 0x6B, 0x65, 0x79, 0x20, 0x3D, 0x20, 0x30, 0x3B, + 0x00, 0x09, 0x5F, 0x5F, 0x75, 0x36, 0x34, 0x20, 0x74, 0x77, 0x65, 0x6E, 0x74, 0x79, + 0x5F, 0x66, 0x6F, 0x75, 0x72, 0x20, 0x3D, 0x20, 0x32, 0x34, 0x3B, 0x00, 0x09, 0x5F, + 0x5F, 0x75, 0x36, 0x34, 0x20, 0x66, 0x6F, 0x72, 0x74, 0x79, 0x5F, 0x74, 0x77, 0x6F, + 0x20, 0x3D, 0x20, 0x34, 0x32, 0x3B, 0x00, 0x20, 0x20, 0x20, 0x20, 0x62, 0x70, 0x66, + 0x5F, 0x6D, 0x61, 0x70, 0x5F, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5F, 0x65, 0x6C, + 0x65, 0x6D, 0x28, 0x26, 0x6D, 0x61, 0x70, 0x5F, 0x31, 0x2C, 0x20, 0x26, 0x6B, 0x65, + 0x79, 0x2C, 0x20, 0x26, 0x74, 0x77, 0x65, 0x6E, 0x74, 0x79, 0x5F, 0x66, 0x6F, 0x75, + 0x72, 0x2C, 0x20, 0x42, 0x50, 0x46, 0x5F, 0x41, 0x4E, 0x59, 0x29, 0x3B, 0x00, 0x20, + 0x20, 0x20, 0x20, 0x62, 0x70, 0x66, 0x5F, 0x6D, 0x61, 0x70, 0x5F, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x5F, 0x65, 0x6C, 0x65, 0x6D, 0x28, 0x26, 0x6D, 0x61, 0x70, 0x5F, + 0x32, 0x2C, 0x20, 0x26, 0x6B, 0x65, 0x79, 0x2C, 0x20, 0x26, 0x66, 0x6F, 0x72, 0x74, + 0x79, 0x5F, 0x74, 0x77, 0x6F, 0x2C, 0x20, 0x42, 0x50, 0x46, 0x5F, 0x41, 0x4E, 0x59, + 0x29, 0x3B, 0x00, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6E, 0x20, 0x30, 0x3B, 0x00, + 0x63, 0x68, 0x61, 0x72, 0x00, 0x5F, 0x6C, 0x69, 0x63, 0x65, 0x6E, 0x73, 0x65, 0x00, + 0x2E, 0x6D, 0x61, 0x70, 0x73, 0x00, 0x6C, 0x69, 0x63, 0x65, 0x6E, 0x73, 0x65, 0x00, + ] + }; let btf_section = fake_section(EbpfSectionKind::Btf, ".BTF", data, None); obj.parse_section(btf_section).unwrap(); diff --git a/aya-obj/src/programs/cgroup_sock.rs b/aya-obj/src/programs/cgroup_sock.rs index 545dee2e..5c39f659 100644 --- a/aya-obj/src/programs/cgroup_sock.rs +++ b/aya-obj/src/programs/cgroup_sock.rs @@ -16,12 +16,12 @@ pub enum CgroupSockAttachType { } impl From for bpf_attach_type { - fn from(s: CgroupSockAttachType) -> bpf_attach_type { + fn from(s: CgroupSockAttachType) -> Self { match s { - CgroupSockAttachType::PostBind4 => bpf_attach_type::BPF_CGROUP_INET4_POST_BIND, - CgroupSockAttachType::PostBind6 => bpf_attach_type::BPF_CGROUP_INET6_POST_BIND, - CgroupSockAttachType::SockCreate => bpf_attach_type::BPF_CGROUP_INET_SOCK_CREATE, - CgroupSockAttachType::SockRelease => bpf_attach_type::BPF_CGROUP_INET_SOCK_RELEASE, + CgroupSockAttachType::PostBind4 => Self::BPF_CGROUP_INET4_POST_BIND, + CgroupSockAttachType::PostBind6 => Self::BPF_CGROUP_INET6_POST_BIND, + CgroupSockAttachType::SockCreate => Self::BPF_CGROUP_INET_SOCK_CREATE, + CgroupSockAttachType::SockRelease => Self::BPF_CGROUP_INET_SOCK_RELEASE, } } } diff --git a/aya-obj/src/programs/cgroup_sock_addr.rs b/aya-obj/src/programs/cgroup_sock_addr.rs index 13d5c1c5..902f203e 100644 --- a/aya-obj/src/programs/cgroup_sock_addr.rs +++ b/aya-obj/src/programs/cgroup_sock_addr.rs @@ -31,20 +31,20 @@ pub enum CgroupSockAddrAttachType { } impl From for bpf_attach_type { - fn from(s: CgroupSockAddrAttachType) -> bpf_attach_type { + fn from(s: CgroupSockAddrAttachType) -> Self { match s { - CgroupSockAddrAttachType::Bind4 => bpf_attach_type::BPF_CGROUP_INET4_BIND, - CgroupSockAddrAttachType::Bind6 => bpf_attach_type::BPF_CGROUP_INET6_BIND, - CgroupSockAddrAttachType::Connect4 => bpf_attach_type::BPF_CGROUP_INET4_CONNECT, - CgroupSockAddrAttachType::Connect6 => bpf_attach_type::BPF_CGROUP_INET6_CONNECT, - CgroupSockAddrAttachType::GetPeerName4 => bpf_attach_type::BPF_CGROUP_INET4_GETPEERNAME, - CgroupSockAddrAttachType::GetPeerName6 => bpf_attach_type::BPF_CGROUP_INET6_GETPEERNAME, - CgroupSockAddrAttachType::GetSockName4 => bpf_attach_type::BPF_CGROUP_INET4_GETSOCKNAME, - CgroupSockAddrAttachType::GetSockName6 => bpf_attach_type::BPF_CGROUP_INET6_GETSOCKNAME, - CgroupSockAddrAttachType::UDPSendMsg4 => bpf_attach_type::BPF_CGROUP_UDP4_SENDMSG, - CgroupSockAddrAttachType::UDPSendMsg6 => bpf_attach_type::BPF_CGROUP_UDP6_SENDMSG, - CgroupSockAddrAttachType::UDPRecvMsg4 => bpf_attach_type::BPF_CGROUP_UDP4_RECVMSG, - CgroupSockAddrAttachType::UDPRecvMsg6 => bpf_attach_type::BPF_CGROUP_UDP6_RECVMSG, + CgroupSockAddrAttachType::Bind4 => Self::BPF_CGROUP_INET4_BIND, + CgroupSockAddrAttachType::Bind6 => Self::BPF_CGROUP_INET6_BIND, + CgroupSockAddrAttachType::Connect4 => Self::BPF_CGROUP_INET4_CONNECT, + CgroupSockAddrAttachType::Connect6 => Self::BPF_CGROUP_INET6_CONNECT, + CgroupSockAddrAttachType::GetPeerName4 => Self::BPF_CGROUP_INET4_GETPEERNAME, + CgroupSockAddrAttachType::GetPeerName6 => Self::BPF_CGROUP_INET6_GETPEERNAME, + CgroupSockAddrAttachType::GetSockName4 => Self::BPF_CGROUP_INET4_GETSOCKNAME, + CgroupSockAddrAttachType::GetSockName6 => Self::BPF_CGROUP_INET6_GETSOCKNAME, + CgroupSockAddrAttachType::UDPSendMsg4 => Self::BPF_CGROUP_UDP4_SENDMSG, + CgroupSockAddrAttachType::UDPSendMsg6 => Self::BPF_CGROUP_UDP6_SENDMSG, + CgroupSockAddrAttachType::UDPRecvMsg4 => Self::BPF_CGROUP_UDP4_RECVMSG, + CgroupSockAddrAttachType::UDPRecvMsg6 => Self::BPF_CGROUP_UDP6_RECVMSG, } } } diff --git a/aya-obj/src/programs/cgroup_sockopt.rs b/aya-obj/src/programs/cgroup_sockopt.rs index 3794c8cc..be12735c 100644 --- a/aya-obj/src/programs/cgroup_sockopt.rs +++ b/aya-obj/src/programs/cgroup_sockopt.rs @@ -11,10 +11,10 @@ pub enum CgroupSockoptAttachType { } impl From for bpf_attach_type { - fn from(s: CgroupSockoptAttachType) -> bpf_attach_type { + fn from(s: CgroupSockoptAttachType) -> Self { match s { - CgroupSockoptAttachType::Get => bpf_attach_type::BPF_CGROUP_GETSOCKOPT, - CgroupSockoptAttachType::Set => bpf_attach_type::BPF_CGROUP_SETSOCKOPT, + CgroupSockoptAttachType::Get => Self::BPF_CGROUP_GETSOCKOPT, + CgroupSockoptAttachType::Set => Self::BPF_CGROUP_SETSOCKOPT, } } } diff --git a/aya-obj/src/programs/mod.rs b/aya-obj/src/programs/mod.rs index 6b66b005..b6e91e7a 100644 --- a/aya-obj/src/programs/mod.rs +++ b/aya-obj/src/programs/mod.rs @@ -3,6 +3,7 @@ pub mod cgroup_sock; pub mod cgroup_sock_addr; pub mod cgroup_sockopt; +mod types; pub mod xdp; pub use cgroup_sock::CgroupSockAttachType; diff --git a/aya-obj/src/programs/types.rs b/aya-obj/src/programs/types.rs new file mode 100644 index 00000000..92829f88 --- /dev/null +++ b/aya-obj/src/programs/types.rs @@ -0,0 +1,51 @@ +//! Program type bindings. + +use crate::{ + InvalidTypeBinding, + generated::bpf_prog_type::{self, *}, +}; + +impl TryFrom for bpf_prog_type { + type Error = InvalidTypeBinding; + + fn try_from(prog_type: u32) -> Result { + Ok(match prog_type { + x if x == BPF_PROG_TYPE_UNSPEC as u32 => BPF_PROG_TYPE_UNSPEC, + x if x == BPF_PROG_TYPE_SOCKET_FILTER as u32 => BPF_PROG_TYPE_SOCKET_FILTER, + x if x == BPF_PROG_TYPE_KPROBE as u32 => BPF_PROG_TYPE_KPROBE, + x if x == BPF_PROG_TYPE_SCHED_CLS as u32 => BPF_PROG_TYPE_SCHED_CLS, + x if x == BPF_PROG_TYPE_SCHED_ACT as u32 => BPF_PROG_TYPE_SCHED_ACT, + x if x == BPF_PROG_TYPE_TRACEPOINT as u32 => BPF_PROG_TYPE_TRACEPOINT, + x if x == BPF_PROG_TYPE_XDP as u32 => BPF_PROG_TYPE_XDP, + x if x == BPF_PROG_TYPE_PERF_EVENT as u32 => BPF_PROG_TYPE_PERF_EVENT, + x if x == BPF_PROG_TYPE_CGROUP_SKB as u32 => BPF_PROG_TYPE_CGROUP_SKB, + x if x == BPF_PROG_TYPE_CGROUP_SOCK as u32 => BPF_PROG_TYPE_CGROUP_SOCK, + x if x == BPF_PROG_TYPE_LWT_IN as u32 => BPF_PROG_TYPE_LWT_IN, + x if x == BPF_PROG_TYPE_LWT_OUT as u32 => BPF_PROG_TYPE_LWT_OUT, + x if x == BPF_PROG_TYPE_LWT_XMIT as u32 => BPF_PROG_TYPE_LWT_XMIT, + x if x == BPF_PROG_TYPE_SOCK_OPS as u32 => BPF_PROG_TYPE_SOCK_OPS, + x if x == BPF_PROG_TYPE_SK_SKB as u32 => BPF_PROG_TYPE_SK_SKB, + x if x == BPF_PROG_TYPE_CGROUP_DEVICE as u32 => BPF_PROG_TYPE_CGROUP_DEVICE, + x if x == BPF_PROG_TYPE_SK_MSG as u32 => BPF_PROG_TYPE_SK_MSG, + x if x == BPF_PROG_TYPE_RAW_TRACEPOINT as u32 => BPF_PROG_TYPE_RAW_TRACEPOINT, + x if x == BPF_PROG_TYPE_CGROUP_SOCK_ADDR as u32 => BPF_PROG_TYPE_CGROUP_SOCK_ADDR, + x if x == BPF_PROG_TYPE_LWT_SEG6LOCAL as u32 => BPF_PROG_TYPE_LWT_SEG6LOCAL, + x if x == BPF_PROG_TYPE_LIRC_MODE2 as u32 => BPF_PROG_TYPE_LIRC_MODE2, + x if x == BPF_PROG_TYPE_SK_REUSEPORT as u32 => BPF_PROG_TYPE_SK_REUSEPORT, + x if x == BPF_PROG_TYPE_FLOW_DISSECTOR as u32 => BPF_PROG_TYPE_FLOW_DISSECTOR, + x if x == BPF_PROG_TYPE_CGROUP_SYSCTL as u32 => BPF_PROG_TYPE_CGROUP_SYSCTL, + x if x == BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE as u32 => { + BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE + } + x if x == BPF_PROG_TYPE_CGROUP_SOCKOPT as u32 => BPF_PROG_TYPE_CGROUP_SOCKOPT, + x if x == BPF_PROG_TYPE_TRACING as u32 => BPF_PROG_TYPE_TRACING, + x if x == BPF_PROG_TYPE_STRUCT_OPS as u32 => BPF_PROG_TYPE_STRUCT_OPS, + x if x == BPF_PROG_TYPE_EXT as u32 => BPF_PROG_TYPE_EXT, + x if x == BPF_PROG_TYPE_LSM as u32 => BPF_PROG_TYPE_LSM, + x if x == BPF_PROG_TYPE_SK_LOOKUP as u32 => BPF_PROG_TYPE_SK_LOOKUP, + x if x == BPF_PROG_TYPE_SYSCALL as u32 => BPF_PROG_TYPE_SYSCALL, + x if x == BPF_PROG_TYPE_NETFILTER as u32 => BPF_PROG_TYPE_NETFILTER, + _ => return Err(InvalidTypeBinding { value: prog_type }), + }) + } +} diff --git a/aya-obj/src/programs/xdp.rs b/aya-obj/src/programs/xdp.rs index 17fab6ab..49f53497 100644 --- a/aya-obj/src/programs/xdp.rs +++ b/aya-obj/src/programs/xdp.rs @@ -16,9 +16,9 @@ pub enum XdpAttachType { impl From for bpf_attach_type { fn from(value: XdpAttachType) -> Self { match value { - XdpAttachType::Interface => bpf_attach_type::BPF_XDP, - XdpAttachType::CpuMap => bpf_attach_type::BPF_XDP_CPUMAP, - XdpAttachType::DevMap => bpf_attach_type::BPF_XDP_DEVMAP, + XdpAttachType::Interface => Self::BPF_XDP, + XdpAttachType::CpuMap => Self::BPF_XDP_CPUMAP, + XdpAttachType::DevMap => Self::BPF_XDP_DEVMAP, } } } diff --git a/aya-obj/src/relocation.rs b/aya-obj/src/relocation.rs index b05648ba..d035339b 100644 --- a/aya-obj/src/relocation.rs +++ b/aya-obj/src/relocation.rs @@ -1,24 +1,27 @@ //! Program relocation handling. -use alloc::{borrow::ToOwned, collections::BTreeMap, string::String}; +use alloc::{borrow::ToOwned as _, collections::BTreeMap, string::String}; use core::mem; use log::debug; use object::{SectionIndex, SymbolKind}; -#[cfg(not(feature = "std"))] -use crate::std; use crate::{ + EbpfSectionKind, generated::{ - bpf_insn, BPF_CALL, BPF_JMP, BPF_K, BPF_PSEUDO_CALL, BPF_PSEUDO_FUNC, BPF_PSEUDO_MAP_FD, - BPF_PSEUDO_MAP_VALUE, + BPF_CALL, BPF_JMP, BPF_K, BPF_PSEUDO_CALL, BPF_PSEUDO_FUNC, BPF_PSEUDO_MAP_FD, + BPF_PSEUDO_MAP_VALUE, bpf_insn, }, maps::Map, obj::{Function, Object}, util::{HashMap, HashSet}, - EbpfSectionKind, }; +#[cfg(feature = "std")] +type RawFd = std::os::fd::RawFd; +#[cfg(not(feature = "std"))] +type RawFd = core::ffi::c_int; + pub(crate) const INS_SIZE: usize = mem::size_of::(); /// The error type returned by [`Object::relocate_maps`] and [`Object::relocate_calls`] @@ -64,7 +67,9 @@ pub enum RelocationError { }, /// Unknown function - #[error("program at section {section_index} and address {address:#x} was not found while relocating")] + #[error( + "program at section {section_index} and address {address:#x} was not found while relocating" + )] UnknownProgram { /// The function section index section_index: usize, @@ -104,7 +109,7 @@ pub(crate) struct Symbol { impl Object { /// Relocates the map references - pub fn relocate_maps<'a, I: Iterator>( + pub fn relocate_maps<'a, I: Iterator>( &mut self, maps: I, text_sections: &HashSet, @@ -179,8 +184,8 @@ impl Object { fn relocate_maps<'a, I: Iterator>( fun: &mut Function, relocations: I, - maps_by_section: &HashMap, - maps_by_symbol: &HashMap, + maps_by_section: &HashMap, + maps_by_symbol: &HashMap, symbol_table: &HashMap, text_sections: &HashSet, ) -> Result<(), RelocationError> { @@ -197,7 +202,7 @@ fn relocate_maps<'a, I: Iterator>( // make sure that the relocation offset is properly aligned let ins_offset = rel_offset - section_offset; - if ins_offset % INS_SIZE != 0 { + if !ins_offset.is_multiple_of(INS_SIZE) { return Err(RelocationError::InvalidRelocationOffset { offset: rel.offset, relocation_number: rel_n, @@ -234,7 +239,7 @@ fn relocate_maps<'a, I: Iterator>( m } else { let Some(m) = maps_by_section.get(§ion_index) else { - debug!("failed relocating map by section index {}", section_index); + debug!("failed relocating map by section index {section_index}"); return Err(RelocationError::SectionNotFound { symbol_index: rel.symbol_index, symbol_name: sym.name.clone(), @@ -284,8 +289,8 @@ impl<'a> FunctionLinker<'a> { relocations: &'a HashMap>, symbol_table: &'a HashMap, text_sections: &'a HashSet, - ) -> FunctionLinker<'a> { - FunctionLinker { + ) -> Self { + Self { functions, linked_functions: HashMap::new(), relocations, @@ -398,7 +403,7 @@ impl<'a> FunctionLinker<'a> { fun.section_index.0, (fun.section_offset as i64 + ((ins_index - start_ins) as i64) * ins_size - + (ins.imm + 1) as i64 * ins_size) as u64, + + i64::from(ins.imm + 1) * ins_size) as u64, ) }; @@ -483,21 +488,21 @@ impl<'a> FunctionLinker<'a> { } fn insn_is_call(ins: &bpf_insn) -> bool { - let klass = (ins.code & 0x07) as u32; - let op = (ins.code & 0xF0) as u32; - let src = (ins.code & 0x08) as u32; + let klass = u32::from(ins.code & 0x07); + let op = u32::from(ins.code & 0xF0); + let src = u32::from(ins.code & 0x08); klass == BPF_JMP && op == BPF_CALL && src == BPF_K - && ins.src_reg() as u32 == BPF_PSEUDO_CALL + && u32::from(ins.src_reg()) == BPF_PSEUDO_CALL && ins.dst_reg() == 0 && ins.off == 0 } #[cfg(test)] mod test { - use alloc::{string::ToString, vec, vec::Vec}; + use alloc::{string::ToString as _, vec, vec::Vec}; use super::*; use crate::maps::{BtfMap, LegacyMap}; @@ -515,7 +520,7 @@ mod test { } fn ins(bytes: &[u8]) -> bpf_insn { - unsafe { core::ptr::read_unaligned(bytes.as_ptr() as *const _) } + unsafe { core::ptr::read_unaligned(bytes.as_ptr().cast()) } } fn fake_legacy_map(symbol_index: usize) -> Map { diff --git a/aya-obj/src/util.rs b/aya-obj/src/util.rs index 80d0179d..b73b7c86 100644 --- a/aya-obj/src/util.rs +++ b/aya-obj/src/util.rs @@ -1,4 +1,4 @@ -use core::{mem, slice}; +use core::{mem, ptr, slice}; #[cfg(feature = "std")] pub(crate) use std::collections::HashMap; #[cfg(feature = "std")] @@ -11,6 +11,5 @@ pub(crate) use hashbrown::HashSet; /// bytes_of converts a to a byte slice pub(crate) unsafe fn bytes_of(val: &T) -> &[u8] { - let size = mem::size_of::(); - slice::from_raw_parts(slice::from_ref(val).as_ptr().cast(), size) + unsafe { slice::from_raw_parts(ptr::from_ref(val).cast(), mem::size_of_val(val)) } } diff --git a/aya-tool/Cargo.toml b/aya-tool/Cargo.toml index e8dfdd4e..402cc323 100644 --- a/aya-tool/Cargo.toml +++ b/aya-tool/Cargo.toml @@ -1,17 +1,22 @@ [package] +description = "A tool for generating bindings for Linux Kernel types" name = "aya-tool" -version = "0.1.0" publish = false -description = "A tool for generating bindings for Linux Kernel types" +version = "0.1.0" + authors.workspace = true +edition.workspace = true +homepage.workspace = true license.workspace = true repository.workspace = true -homepage.workspace = true -edition.workspace = true +rust-version.workspace = true + +[lints] +workspace = true [dependencies] +anyhow = { workspace = true, default-features = true } bindgen = { workspace = true, default-features = true } clap = { workspace = true, default-features = true, features = ["derive"] } -anyhow = { workspace = true, default-features = true } -thiserror = { workspace = true } tempfile = { workspace = true } +thiserror = { workspace = true } diff --git a/aya-tool/src/bin/aya-tool.rs b/aya-tool/src/bin/aya-tool.rs index 759131d3..671d1de6 100644 --- a/aya-tool/src/bin/aya-tool.rs +++ b/aya-tool/src/bin/aya-tool.rs @@ -1,6 +1,8 @@ +#![expect(unused_crate_dependencies, reason = "used in lib")] + use std::{path::PathBuf, process::exit}; -use aya_tool::generate::{generate, InputFile}; +use aya_tool::generate::{InputFile, generate}; use clap::Parser; #[derive(Parser)] diff --git a/aya-tool/src/bindgen.rs b/aya-tool/src/bindgen.rs index 87f73102..d138ddf3 100644 --- a/aya-tool/src/bindgen.rs +++ b/aya-tool/src/bindgen.rs @@ -1,23 +1,23 @@ use bindgen::{Builder, EnumVariation}; -pub fn user_builder() -> Builder { +fn common_builder() -> Builder { bindgen::builder() .use_core() .layout_tests(false) .generate_comments(false) .prepend_enum_name(false) - .default_enum_style(EnumVariation::Rust { - non_exhaustive: false, - }) + .clang_macro_fallback() +} + +pub fn user_builder() -> Builder { + common_builder().default_enum_style(EnumVariation::Rust { + non_exhaustive: false, + }) } pub fn bpf_builder() -> Builder { - bindgen::builder() - .use_core() + common_builder() .ctypes_prefix("::aya_ebpf::cty") - .layout_tests(false) - .generate_comments(false) .clang_arg("-Wno-unknown-attributes") .default_enum_style(EnumVariation::ModuleConsts) - .prepend_enum_name(false) } diff --git a/aya-tool/src/generate.rs b/aya-tool/src/generate.rs index 69658a04..815fbf2a 100644 --- a/aya-tool/src/generate.rs +++ b/aya-tool/src/generate.rs @@ -1,32 +1,27 @@ use std::{ fs::{self, File}, - io::{self, Write}, + io::{self, Write as _}, path::{Path, PathBuf}, - process::Command, + process::{Command, Output}, str, }; use tempfile::tempdir; use thiserror::Error; -use crate::bindgen; - #[derive(Error, Debug)] pub enum Error { #[error("error executing bpftool")] BpfTool(#[source] io::Error), - #[error("{stderr}\nbpftool failed with exit code {code}")] - BpfToolExit { code: i32, stderr: String }, + #[error("bpftool failed: {0:?}")] + BpfToolExit(Output), #[error("bindgen failed")] Bindgen(#[source] io::Error), - #[error("{stderr}\nbindgen failed with exit code {code}")] - BindgenExit { code: i32, stderr: String }, - - #[error("rustfmt failed")] - Rustfmt(#[source] io::Error), + #[error("bindgen failed: {0:?}")] + BindgenExit(Output), #[error("error reading header file")] ReadHeaderFile(#[source] io::Error), @@ -47,7 +42,7 @@ pub fn generate>( .map(|s| s.as_ref().into()) .collect::>(); - let mut bindgen = bindgen::bpf_builder(); + let mut bindgen = crate::bindgen::bpf_builder(); let (additional_flags, ctypes_prefix) = extract_ctypes_prefix(&additional_flags); if let Some(prefix) = ctypes_prefix { @@ -69,7 +64,7 @@ pub fn generate>( let dir = tempdir().unwrap(); let file_path = dir.path().join(name); let mut file = File::create(&file_path).unwrap(); - let _ = file.write(c_header.as_bytes()).unwrap(); + let () = file.write_all(c_header.as_bytes()).unwrap(); let flags = combine_flags(&bindgen.command_line_flags(), &additional_flags); @@ -79,14 +74,13 @@ pub fn generate>( .output() .map_err(Error::Bindgen)?; - if !output.status.success() { - return Err(Error::BindgenExit { - code: output.status.code().unwrap(), - stderr: str::from_utf8(&output.stderr).unwrap().to_owned(), - }); + let Output { status, .. } = &output; + if !status.success() { + return Err(Error::BindgenExit(output)); } + let Output { stdout, .. } = output; - Ok(str::from_utf8(&output.stdout).unwrap().to_owned()) + Ok(String::from_utf8(stdout).unwrap()) } fn c_header_from_btf(path: &Path) -> Result { @@ -97,14 +91,13 @@ fn c_header_from_btf(path: &Path) -> Result { .output() .map_err(Error::BpfTool)?; - if !output.status.success() { - return Err(Error::BpfToolExit { - code: output.status.code().unwrap(), - stderr: str::from_utf8(&output.stderr).unwrap().to_owned(), - }); + let Output { status, .. } = &output; + if !status.success() { + return Err(Error::BpfToolExit(output)); } + let Output { stdout, .. } = output; - Ok(str::from_utf8(&output.stdout).unwrap().to_owned()) + Ok(String::from_utf8(stdout).unwrap()) } fn extract_ctypes_prefix(s: &[String]) -> (Vec, Option) { @@ -179,32 +172,32 @@ mod test { #[test] fn test_combine_flags() { assert_eq!( - combine_flags(&to_vec("a b"), &to_vec("c d"),).join(" "), + combine_flags(&to_vec("a b"), &to_vec("c d")).join(" "), "a b c d", ); assert_eq!( - combine_flags(&to_vec("a -- b"), &to_vec("a b"),).join(" "), + combine_flags(&to_vec("a -- b"), &to_vec("a b")).join(" "), "a a b -- b", ); assert_eq!( - combine_flags(&to_vec("a -- b"), &to_vec("c d"),).join(" "), + combine_flags(&to_vec("a -- b"), &to_vec("c d")).join(" "), "a c d -- b", ); assert_eq!( - combine_flags(&to_vec("a b"), &to_vec("c -- d"),).join(" "), + combine_flags(&to_vec("a b"), &to_vec("c -- d")).join(" "), "a b c -- d", ); assert_eq!( - combine_flags(&to_vec("a -- b"), &to_vec("c -- d"),).join(" "), + combine_flags(&to_vec("a -- b"), &to_vec("c -- d")).join(" "), "a c -- b d", ); assert_eq!( - combine_flags(&to_vec("a -- b"), &to_vec("-- c d"),).join(" "), + combine_flags(&to_vec("a -- b"), &to_vec("-- c d")).join(" "), "a -- b c d", ); } diff --git a/aya-tool/src/lib.rs b/aya-tool/src/lib.rs index c220e524..e9fd7900 100644 --- a/aya-tool/src/lib.rs +++ b/aya-tool/src/lib.rs @@ -1,20 +1,4 @@ -use std::{ - fs::File, - io::{self, Write}, - path::Path, -}; +#![expect(unused_crate_dependencies, reason = "used in bin")] pub mod bindgen; pub mod generate; -pub mod rustfmt; - -pub use generate::{generate, InputFile}; - -pub fn write_to_file>(path: T, code: &str) -> Result<(), io::Error> { - let mut file = File::create(path)?; - file.write_all(code.as_bytes()) -} - -pub fn write_to_file_fmt>(path: T, code: &str) -> Result<(), io::Error> { - write_to_file(path, &rustfmt::format(code)?) -} diff --git a/aya-tool/src/rustfmt.rs b/aya-tool/src/rustfmt.rs deleted file mode 100644 index cc7ac292..00000000 --- a/aya-tool/src/rustfmt.rs +++ /dev/null @@ -1,25 +0,0 @@ -use std::{ - io::{self, Write}, - process::{Command, Stdio}, -}; - -pub fn format(code: &str) -> Result { - let mut child = Command::new("rustfmt") - .stdin(Stdio::piped()) - .stdout(Stdio::piped()) - .spawn()?; - let stdin = child.stdin.as_mut().unwrap(); - stdin.write_all(code.as_bytes())?; - - let output = child.wait_with_output()?; - if !output.status.success() { - return Err(io::Error::new( - io::ErrorKind::Other, - format!( - "rustfmt failed with exit code: {}", - output.status.code().unwrap() - ), - )); - } - Ok(String::from_utf8(output.stdout).unwrap()) -} diff --git a/aya/BREAKING-CHANGES.md b/aya/BREAKING-CHANGES.md index bd312da1..00afba62 100644 --- a/aya/BREAKING-CHANGES.md +++ b/aya/BREAKING-CHANGES.md @@ -8,6 +8,9 @@ history and changelog. We also tag PRs on github with a [breaking change] label. ## Summary +- [v0.14.0](#v0140) + - MSRV has been bumped to 1.85.0. + - [v0.12.0](#v0120) - In `aya::Bpf::programs`, `name` uses the function name from the ELF file. - Maps API has been reworked. @@ -17,6 +20,15 @@ history and changelog. We also tag PRs on github with a [breaking change] label. - BTF types have moved to the `aya-obj` crate. - `aya::PerfEvent::attach` and `detach` signatures have changed. +## v0.14.0 + +### MSRV has been bumped to 1.85.0 + +The minimum supported Rust version has been bumped to 1.85.0. This is due to +the move to edition 2024 which was first available in this version. + +To migrate you will need to ensure that you are using rustc 1.85.0 or later. + ## v0.12.0 ### In `aya::Bpf::programs`, `name` uses the function name from the ELF file diff --git a/aya/CHANGELOG.md b/aya/CHANGELOG.md index 9ce08d15..efd3d42e 100644 --- a/aya/CHANGELOG.md +++ b/aya/CHANGELOG.md @@ -5,6 +5,647 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Breaking Changes + + - Remove `AsyncPerfEventArray` and `AsyncPerfEventArrayBuffer` These types have been removed to + avoid maintaining support for multiple async runtimes. Use `PerfEventArrayBuffer`, which + implements `As{,Raw}Fd` for integration with async executors. + - Rename `EbpfLoader::map_pin_path` to `EbpfLoader::default_map_pin_directory`. + - Rename `EbpfLoader::set_global` to `EbpfLoader::override_global`. + - Rename `EbpfLoader::set_max_entries` to `EbpfLoader::map_max_entries`. + +### Other + + - Provide deprecated aliases to ease migration, these will be removed in a future release; + - `EbpfLoader::set_global` calls `EbpfLoader::override_global`, and + - `EbpfLoader::set_max_entries` calls `EbpfLoader::map_max_entries`. + +## 0.13.1 (2024-11-01) + +### Chore + + - Add comments in `*_wrong_map` tests + - Rename bpf -> ebpf + - Fix unused_qualifications lints + This was failing the docs build. + +### Documentation + + - fix typo + - Use `Ebpf` instead of `Bpf` + +### New Features + + - Implement TCX + This commit adds the initial support for TCX + bpf links. This is a new, multi-program, attachment + type allows for the caller to specify where + they would like to be attached relative to other + programs at the attachment point using the LinkOrder + type. + - Provide a deprecated `BpfError` alias + - Rename Bpf to Ebpf + And BpfLoader to EbpfLoader. + This also adds type aliases to preserve the use of the old names, making + updating to a new Aya release less of a burden. These aliases are marked + as deprecated since we'll likely remove them in a later release. + +### Bug Fixes + + - Fill bss maps with zeros + The loader should fill bss maps with zeros according to the size of the + ELF section. + Failure to do so yields weird verifier messages as follows: + + ``` + cannot access ptr member ops with moff 0 in struct bpf_map with off 0 size 4 + ``` + + Reference to this in the cilium/ebpf code is here [1]. + I could not find a reference in libbpf. + - Fix PerfEventArray resize logic + There was a logic bug in the previously merged patch where we + set the correctly calculated max_entries size with the original. + + To fix this and prevent regressions a unit test was added. + This highlighted that the original map definition needs to be + mutated in order for the max_entries change to be properly applied. + + As such, this resize logic moved out of aya::sys into aya::maps + - Set PerfEventArray max_entries to nCPUs + Both libbpf and cilium/ebpf have will set the max_entries of a + BPF_MAP_TYPE_PERF_EVENT_ARRAY to the number of online CPUs if + it was omitted at map definition time. This adds that same + logic to Aya. + - fix panic when creating map on custom ubuntu kernel + - fix rustdocs-args ordering in taplo to -D warnings + This fixes the current rustdoc build error by correcting the ordering of + `rustdoc-args` to `-D warnings`. Additionally, this also removes the + `recorder_arrays` field (defaults to false) so that the order is not + modified, which is what caused the error in the first place. + +### Other + + - use FdLink in SockOps programs + - remove unwrap and NonZero* in info + Addresses the feedback from #1007: + - remove panic from `unwrap` and `expect` + - Option => Option with `0` mapping to `None` + - revamp MapInfo be more friendly with older kernels + Adds detection for whether a field is available in `MapInfo`: + - For `map_type()`, we treturn new enum `MapType` instead of the integer + representation. + - For fields that can't be zero, we return `Option` type. + - For `name_as_str()`, it now uses the feature probe `bpf_name()` to + detect if field is available. + Although the feature probe checks for program name, it can also be + used for map name since they were both introduced in the same commit. + - revamp ProgramInfo be more friendly with older kernels + Purpose of this commit is to add detections for whether a field is + available in `ProgramInfo`. + - For `program_type()`, we return the new enum `ProgramType` instead of + the integer representation. + - For fields that we know cannot be zero, we return `Option` + type. + - For `name_as_str()`, it now also uses the feature probe `bpf_name()` + to detect if field is available or not. + - Two additional feature probes are added for the fields: + - `prog_info_map_ids()` probe -> `map_ids()` field + - `prog_info_gpl_compatible()` probe -> `gpl_compatible()` field + + With the `prog_info_map_ids()` probe, the previous implementation that + I had for `bpf_prog_get_info_by_fd()` is shortened to use the probe + instead of having to make 2 potential syscalls. + + The `test_loaded_at()` test is also moved into info tests since it is + better related to the info tests. + - add conversion u32 to enum type for prog, link, & attach type + Add conversion from u32 to program type, link type, and attach type. + Additionally, remove duplicate match statement for u32 conversion to + `BPF_MAP_TYPE_BLOOM_FILTER` & `BPF_MAP_TYPE_CGRP_STORAGE`. + + New error `InvalidTypeBinding` is created to represent when a + parsed/received value binding to a type is invalid. + This is used in the new conversions added here, and also replaces + `InvalidMapTypeError` in `TryFrom` for `bpf_map_type`. + - improve integration tests for info API + Improves the existing integraiton tests for `loaded_programs()` and + `loaded_maps()` in consideration for older kernels: + - Opt for `SocketFilter` program in tests since XDP requires v4.8 and + fragments requires v5.18. + - For assertion tests, first perform the assertion, if the assertion + fails, then it checks the host kernel version to see if it is above + the minimum version requirement. If not, then continue with test, + otherwise fail. + For assertions that are skipped, they're logged in stderr which can + be observed with `-- --nocapture`. + + This also fixes the `bpf_prog_get_info_by_fd()` call for kernels below + v4.15. If calling syscall on kernels below v4.15, it can produce an + `E2BIG` error because `check_uarg_tail_zero()` expects the entire + struct to all-zero bytes (which is caused from the map info). + + Instead, we first attempt the syscall with the map info filled, if it + returns `E2BIG`, then perform syscall again with empty closure. + + Also adds doc for which version a kernel feature was introduced for + better awareness. + + The tests have been verified kernel versions: + - 4.13.0 + - 4.15.0 + - 6.1.0 + - adjust bpf programs for big endian + In aya/src/sys/bpf.rs, there are several simple bpf programs written as + byte arrays. These need to be adjusted to account for big endian. + - expose run_time_ns and run_cnt fields in ProgramInfo + Added functions to expose `run_time_ns` & `run_cnt` statistics from + ProgramInfo/bpf_prog_info. + - add BPF_ENABLE_STATS syscall function + Add bpf syscall function for BPF_ENABLE_STATS to enable stats tracking + for benchmarking purposes. + + Additionally, move `#[cfg(test)]` annotation around the `Drop` trait + instead. Having separate functions causes some complications when + needing ownership/moving of the inner value `OwnedFd` when `Drop` is + manually implemented. + - :programs::uprobe: fix bad variable name + The variable fn_name was very much *not* the fn_name, but rather the + object file path. + - adjust symbol lookup tests for object crate alignment requirements + The object::File::parse API requires parameter to be aligned with 8 bytes. + Adjusted the Vec in the tests with miri to meet this requirement. + - add symbol lookup in associated debug files + This change enhances the logic for symbol lookup in uprobe or uretprobe. + If the symbol is not found in the original binary, the search continues + in the debug file associated through the debuglink section. Before + searching the symbol table, it compares the build IDs of the two files. + The symbol lookup will only be terminated if both build IDs exist and do + not match. This modification does not affect the existing symbol lookup + logic. + - Generate new bindings + - include license in crate workspace + This PR includes the licenses files in the crate workspace subdirectory. + Without this, they won't be showing on crates.io and would be giving out + errors on tooling such as rust2rpm. + - appease new nightly clippy lints + ``` + error: unnecessary qualification + --> aya/src/maps/ring_buf.rs:434:22 + | + 434 | ptr: ptr::NonNull::new(ptr).ok_or( + | ^^^^^^^^^^^^^^^^^ + | + note: the lint level is defined here + --> aya/src/lib.rs:72:5 + | + 72 | unused_qualifications, + | ^^^^^^^^^^^^^^^^^^^^^ + help: remove the unnecessary path segments + | + 434 - ptr: ptr::NonNull::new(ptr).ok_or( + 434 + ptr: NonNull::new(ptr).ok_or( + | + + error: unnecessary qualification + --> aya/src/maps/mod.rs:225:21 + | + 225 | let mut limit = std::mem::MaybeUninit::::uninit(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + help: remove the unnecessary path segments + | + 225 - let mut limit = std::mem::MaybeUninit::::uninit(); + 225 + let mut limit = mem::MaybeUninit::::uninit(); + | + + error: unnecessary qualification + --> aya/src/programs/mod.rs:614:9 + | + 614 | crate::obj::Program { + | ^^^^^^^^^^^^^^^^^^^ + | + help: remove the unnecessary path segments + | + 614 - crate::obj::Program { + 614 + obj::Program { + | + + error: unnecessary qualification + --> aya/src/util.rs:373:14 + | + 373 | unsafe { std::slice::from_raw_parts(bpf_name.as_ptr() as + *const _, length) } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + help: remove the unnecessary path segments + | + 373 - unsafe { std::slice::from_raw_parts(bpf_name.as_ptr() as + *const _, length) } + 373 + unsafe { slice::from_raw_parts(bpf_name.as_ptr() as *const _, + length) } + | + + error: unnecessary qualification + --> aya/src/maps/mod.rs:1130:47 + | + 1130 | .copy_from_slice(unsafe { + std::mem::transmute(TEST_NAME) }); + | ^^^^^^^^^^^^^^^^^^^ + | + note: the lint level is defined here + --> aya/src/lib.rs:72:5 + | + 72 | unused_qualifications, + | ^^^^^^^^^^^^^^^^^^^^^ + help: remove the unnecessary path segments + | + 1130 - .copy_from_slice(unsafe { + std::mem::transmute(TEST_NAME) }); + 1130 + .copy_from_slice(unsafe { + mem::transmute(TEST_NAME) }); + | + ``` + +### Performance + + - cache `nr_cpus` in a thread_local + +### Test + + - adjust test byte arrays for big endian + Adding support for s390x (big endian architecture) and found that some + of the unit tests have structures and files implemented as byte arrays. + They are all coded as little endian and need a bug endian version to + work properly. + +### New Features (BREAKING) + + - Rename BpfRelocationError -> EbpfRelocationError + - Rename BpfSectionKind to EbpfSectionKind + +### Commit Statistics + + + + - 69 commits contributed to the release over the course of 241 calendar days. + - 247 days passed between releases. + - 32 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Release aya-obj v0.2.1 ([`c6a34ca`](https://github.com/aya-rs/aya/commit/c6a34cade195d682e1eece5b71e3ab48e48f3cda)) + - Merge pull request #1073 from dave-tucker/reloc-bug ([`b2ac9fe`](https://github.com/aya-rs/aya/commit/b2ac9fe85db6c25d0b8155a75a2df96a80a19811)) + - Fill bss maps with zeros ([`ca0c32d`](https://github.com/aya-rs/aya/commit/ca0c32d1076af81349a52235a4b6fb3937a697b3)) + - Release aya-obj v0.2.0, aya v0.13.0, safety bump aya v0.13.0 ([`c169b72`](https://github.com/aya-rs/aya/commit/c169b727e6b8f8c2dda57f54b8c77f8b551025c6)) + - Implement TCX ([`5478cac`](https://github.com/aya-rs/aya/commit/5478cac008471bdb80aa30733e4456b70ec1a5bd)) + - Cache `nr_cpus` in a thread_local ([`d05110f`](https://github.com/aya-rs/aya/commit/d05110fd86f9b317d47ffb7cf5c00e588635d4cd)) + - Clarify `Arc` usage ([`afd777b`](https://github.com/aya-rs/aya/commit/afd777b705312b7bafec2a116041a2318d3aa70f)) + - Replace `Arc` with `&'static` ([`e992c28`](https://github.com/aya-rs/aya/commit/e992c280cbae7af7e484767a0b79314b14a4de84)) + - Avoid intermediate allocations in parse_cpu_ranges ([`0e86757`](https://github.com/aya-rs/aya/commit/0e867572ff8e009bbcd1a63037b4ab5b80e35549)) + - Reduce duplication in `{nr,possible}_cpus` ([`f3b2744`](https://github.com/aya-rs/aya/commit/f3b27440725a0eb2f1615c92cb0047e3b1548d66)) + - Replace `lazy_static` with `std::sync::LazyLock` ([`2b299d4`](https://github.com/aya-rs/aya/commit/2b299d4fba1ddda70c2e8af324f999cb23683559)) + - Appease clippy ([`0f16363`](https://github.com/aya-rs/aya/commit/0f163633e3d73c59f857880c967c27e9f52e8610)) + - Merge pull request #1023 from l2dy/fdlink/sockops ([`2cd3576`](https://github.com/aya-rs/aya/commit/2cd35769dce05b46a4dd07381c990c6acd4cfe0d)) + - Use FdLink in SockOps programs ([`c44f8b0`](https://github.com/aya-rs/aya/commit/c44f8b0f5bddd820a4a98cff293126c0146b827a)) + - Remove unwrap and NonZero* in info ([`02d1db5`](https://github.com/aya-rs/aya/commit/02d1db5fc043fb7af90c14d13de6419ec5b9bcb5)) + - Merge pull request #985 from reyzell/main ([`40f3032`](https://github.com/aya-rs/aya/commit/40f303205f7a800877fe3f9a4fb1893141741e13)) + - Add the option to support multiple and overrideable programs per cgroup ([`f790685`](https://github.com/aya-rs/aya/commit/f790685d759cbd97cb09ad48d87cdece28fbe579)) + - Merge pull request #1007 from tyrone-wu/aya/info-api ([`15eb935`](https://github.com/aya-rs/aya/commit/15eb935bce6d41fb67189c48ce582b074544e0ed)) + - Revamp MapInfo be more friendly with older kernels ([`fbb0930`](https://github.com/aya-rs/aya/commit/fbb09304a2de0d8baf7ea20c9727fcd2e4fb7f41)) + - Revamp ProgramInfo be more friendly with older kernels ([`88f5ac3`](https://github.com/aya-rs/aya/commit/88f5ac31142f1657b41b1ee0f217dcd9125b210a)) + - Add conversion u32 to enum type for prog, link, & attach type ([`1634fa7`](https://github.com/aya-rs/aya/commit/1634fa7188e40ed75da53517f1fdb7396c348c34)) + - Improve integration tests for info API ([`cb8e478`](https://github.com/aya-rs/aya/commit/cb8e47880082ccfcd75b02209b686e15426e9b6a)) + - Merge pull request #959 from tyrone-wu/aya/program_info_stats ([`ab000ad`](https://github.com/aya-rs/aya/commit/ab000ad7c3b0715c3cdd9798bd08fc834b114f1a)) + - Merge pull request #974 from Billy99/billy99-arch-ppc64-s390x ([`ab5e688`](https://github.com/aya-rs/aya/commit/ab5e688fd49fcfb402ad47d51cb445437fbd8cb7)) + - Adjust bpf programs for big endian ([`cd1db86`](https://github.com/aya-rs/aya/commit/cd1db86fd490b3c0f03229bd8999a2e67ccecfc4)) + - Adjust test byte arrays for big endian ([`eef7346`](https://github.com/aya-rs/aya/commit/eef7346fb2231f8741410381198015cceeebfac9)) + - Simplify doctest ([`4362020`](https://github.com/aya-rs/aya/commit/43620206918facbf003d8b878ae28c5b07955167)) + - Appease nightly clippy ([`bce3c4f`](https://github.com/aya-rs/aya/commit/bce3c4fb1d0cd6e8f9f64420c59e02a42c96b2c8)) + - Expose run_time_ns and run_cnt fields in ProgramInfo ([`a25f501`](https://github.com/aya-rs/aya/commit/a25f501ecebaceaacdd1212fac34f528b51ad0fd)) + - Add BPF_ENABLE_STATS syscall function ([`fa6af6a`](https://github.com/aya-rs/aya/commit/fa6af6a20439cccd8ab961f83dce545fb5884dd4)) + - Fix PerfEventArray resize logic ([`3d57d35`](https://github.com/aya-rs/aya/commit/3d57d358e40591acf23dfde740697fbfff026410)) + - Add comments in `*_wrong_map` tests ([`e575712`](https://github.com/aya-rs/aya/commit/e575712c596d03b93f75d160e3d95241eb895d39)) + - Set PerfEventArray max_entries to nCPUs ([`25d986a`](https://github.com/aya-rs/aya/commit/25d986a26d9c88cd499a8b795054d583f01476b2)) + - Use MockableFd everywhere ([`e12fcf4`](https://github.com/aya-rs/aya/commit/e12fcf46cb1e0856a8105ed43fda184fa4648713)) + - Merge pull request #991 from l2dy/typo-1 ([`2cd9858`](https://github.com/aya-rs/aya/commit/2cd9858ea9381232acaffcb5a08bc74e90a8863e)) + - Fix typo ([`f1773d5`](https://github.com/aya-rs/aya/commit/f1773d5af43f5f29b100572e65a60d58f2ce7fac)) + - Merge pull request #983 from ajwerner/fix-variable-name ([`d5414bf`](https://github.com/aya-rs/aya/commit/d5414bf10c80ae8cef757f0cdf06bfdd38746daa)) + - :programs::uprobe: fix bad variable name ([`d413e2f`](https://github.com/aya-rs/aya/commit/d413e2f285643cbeb665fd3c517e2c9d93d45825)) + - Fix panic when creating map on custom ubuntu kernel ([`38d8e32`](https://github.com/aya-rs/aya/commit/38d8e32baa5a4538de9daa6fae634aea6372573c)) + - Appease clippy ([`78acd74`](https://github.com/aya-rs/aya/commit/78acd74badb6aa2463f89fbdf713325dad75dc9e)) + - Don't deny unused_qualifications ([`781914f`](https://github.com/aya-rs/aya/commit/781914f058ef805bd0780ff72a2a66c63255bc07)) + - Fix rustdocs-args ordering in taplo to -D warnings ([`5e13283`](https://github.com/aya-rs/aya/commit/5e13283f59b0c3b4cb47de1e31d8d0960e80b4cc)) + - Remove deny(pointer_structural_match) ([`4e843a3`](https://github.com/aya-rs/aya/commit/4e843a35237c2de49d17621dccb4a2a35bb4030c)) + - Merge pull request #938 from swananan/enhance_urpobe_symbol_lookup ([`bde4b5f`](https://github.com/aya-rs/aya/commit/bde4b5f86b12a3e4ac2f99898edb1b564fe9dd7e)) + - Fix clippy ([`c7898c5`](https://github.com/aya-rs/aya/commit/c7898c596f2f74f29570101d0f71f35b0ab4104b)) + - Adjust symbol lookup tests for object crate alignment requirements ([`462514e`](https://github.com/aya-rs/aya/commit/462514ed4c4c06e9618d029a57708c7fa14ab748)) + - Add symbol lookup in associated debug files ([`e6e1bfe`](https://github.com/aya-rs/aya/commit/e6e1bfeb58ac392637061640365b057182ee1b39)) + - Merge pull request #928 from seanyoung/io-error ([`d0e9b95`](https://github.com/aya-rs/aya/commit/d0e9b95aa5edc6c056687caeb950e1ce44b18d66)) + - S/MiriSafeFd/MockableFd/ ([`a11b61e`](https://github.com/aya-rs/aya/commit/a11b61ebfde8713c35b6f2a760e470d3586803a7)) + - Remove miri ignores ([`cb6d3bd`](https://github.com/aya-rs/aya/commit/cb6d3bd75d162e4928fdf4daa7f515e1ad85ae85)) + - Document miri skip reasons ([`35962a4`](https://github.com/aya-rs/aya/commit/35962a4794484aa3b37dadc98a70a659fd107b75)) + - Avoid crashing under Miri ([`7a7d168`](https://github.com/aya-rs/aya/commit/7a7d16885a89af8c10a52e5aba0927784d42f551)) + - Deduplicate test helpers ([`7e1666f`](https://github.com/aya-rs/aya/commit/7e1666fb83e5c2b270cb24becb84adebbe29be1a)) + - Reduce duplication ([`58e154e`](https://github.com/aya-rs/aya/commit/58e154e1bc4846a6a2afcb8397aa599cfb7ea6fd)) + - Expose io_error in SyscallError ([`a6c45f6`](https://github.com/aya-rs/aya/commit/a6c45f61c77c4bbec4409debb8447cd606f0db5d)) + - Appease clippy ([`09442c2`](https://github.com/aya-rs/aya/commit/09442c2cbe9513365dfc1df8d4f7cf6f808a67ed)) + - Generate new bindings ([`b06ff40`](https://github.com/aya-rs/aya/commit/b06ff402780b80862933791831c578e4c339fc96)) + - Appease clippy ([`0a32dac`](https://github.com/aya-rs/aya/commit/0a32dacd2fd2f225f4a3709ac4ea2838a9937378)) + - Merge pull request #528 from dave-tucker/rename-all-the-things ([`63d8d4d`](https://github.com/aya-rs/aya/commit/63d8d4d34bdbbee149047dc0a5e9c2b191f3b32d)) + - Include license in crate workspace ([`a4e68eb`](https://github.com/aya-rs/aya/commit/a4e68ebdbf0e0b591509f36316d12d9689d23f89)) + - Use `Ebpf` instead of `Bpf` ([`57a69fe`](https://github.com/aya-rs/aya/commit/57a69fe9d28e858562a429bacd9a0a7700b96726)) + - Provide a deprecated `BpfError` alias ([`110a76c`](https://github.com/aya-rs/aya/commit/110a76cb9a1b2ab5c5ad3b6c0828a4ae670e67a0)) + - Rename Bpf to Ebpf ([`8c79b71`](https://github.com/aya-rs/aya/commit/8c79b71bd5699a686f33360520aa95c1a2895fa5)) + - Rename BpfRelocationError -> EbpfRelocationError ([`fd48c55`](https://github.com/aya-rs/aya/commit/fd48c55466a23953ce7a4912306e1acf059b498b)) + - Rename BpfSectionKind to EbpfSectionKind ([`cf3e2ca`](https://github.com/aya-rs/aya/commit/cf3e2ca677c81224368fb2838ebc5b10ee98419a)) + - Rename bpf -> ebpf ([`70ac91d`](https://github.com/aya-rs/aya/commit/70ac91dc1e6f209a701cd868db215763d65efa73)) + - Fix unused_qualifications lints ([`481b73b`](https://github.com/aya-rs/aya/commit/481b73b6d8dd9a796d891bba137400c2a43a0afe)) + - Add `CgroupDevice::query` ([`542306d`](https://github.com/aya-rs/aya/commit/542306d295e51ac1ec117ce453544f201875af3d)) + - Appease new nightly clippy lints ([`e38eac6`](https://github.com/aya-rs/aya/commit/e38eac6352ccb5c2b44d621161a27898744ea397)) +
+ +## 0.13.0 (2024-10-09) + + + + + + + + + + + + + + + + + + + + + +### Chore + + - Add comments in `*_wrong_map` tests + - Rename bpf -> ebpf + - Fix unused_qualifications lints + This was failing the docs build. + +### Documentation + + - fix typo + - Use `Ebpf` instead of `Bpf` + +### New Features + + - Implement TCX + This commit adds the initial support for TCX + bpf links. This is a new, multi-program, attachment + type allows for the caller to specify where + they would like to be attached relative to other + programs at the attachment point using the LinkOrder + type. + - Provide a deprecated `BpfError` alias + - Rename Bpf to Ebpf + And BpfLoader to EbpfLoader. + This also adds type aliases to preserve the use of the old names, making + updating to a new Aya release less of a burden. These aliases are marked + as deprecated since we'll likely remove them in a later release. + +### Bug Fixes + + - Fix PerfEventArray resize logic + There was a logic bug in the previously merged patch where we + set the correctly calculated max_entries size with the original. + + To fix this and prevent regressions a unit test was added. + This highlighted that the original map definition needs to be + mutated in order for the max_entries change to be properly applied. + + As such, this resize logic moved out of aya::sys into aya::maps + - Set PerfEventArray max_entries to nCPUs + Both libbpf and cilium/ebpf have will set the max_entries of a + BPF_MAP_TYPE_PERF_EVENT_ARRAY to the number of online CPUs if + it was omitted at map definition time. This adds that same + logic to Aya. + - fix panic when creating map on custom ubuntu kernel + - fix rustdocs-args ordering in taplo to -D warnings + This fixes the current rustdoc build error by correcting the ordering of + `rustdoc-args` to `-D warnings`. Additionally, this also removes the + `recorder_arrays` field (defaults to false) so that the order is not + modified, which is what caused the error in the first place. + +### Other + + - use FdLink in SockOps programs + - remove unwrap and NonZero* in info + Addresses the feedback from #1007: + - remove panic from `unwrap` and `expect` + - Option => Option with `0` mapping to `None` + - revamp MapInfo be more friendly with older kernels + Adds detection for whether a field is available in `MapInfo`: + - For `map_type()`, we treturn new enum `MapType` instead of the integer + representation. + - For fields that can't be zero, we return `Option` type. + - For `name_as_str()`, it now uses the feature probe `bpf_name()` to + detect if field is available. + Although the feature probe checks for program name, it can also be + used for map name since they were both introduced in the same commit. + - revamp ProgramInfo be more friendly with older kernels + Purpose of this commit is to add detections for whether a field is + available in `ProgramInfo`. + - For `program_type()`, we return the new enum `ProgramType` instead of + the integer representation. + - For fields that we know cannot be zero, we return `Option` + type. + - For `name_as_str()`, it now also uses the feature probe `bpf_name()` + to detect if field is available or not. + - Two additional feature probes are added for the fields: + - `prog_info_map_ids()` probe -> `map_ids()` field + - `prog_info_gpl_compatible()` probe -> `gpl_compatible()` field + + With the `prog_info_map_ids()` probe, the previous implementation that + I had for `bpf_prog_get_info_by_fd()` is shortened to use the probe + instead of having to make 2 potential syscalls. + + The `test_loaded_at()` test is also moved into info tests since it is + better related to the info tests. + - add conversion u32 to enum type for prog, link, & attach type + Add conversion from u32 to program type, link type, and attach type. + Additionally, remove duplicate match statement for u32 conversion to + `BPF_MAP_TYPE_BLOOM_FILTER` & `BPF_MAP_TYPE_CGRP_STORAGE`. + + New error `InvalidTypeBinding` is created to represent when a + parsed/received value binding to a type is invalid. + This is used in the new conversions added here, and also replaces + `InvalidMapTypeError` in `TryFrom` for `bpf_map_type`. + - improve integration tests for info API + Improves the existing integraiton tests for `loaded_programs()` and + `loaded_maps()` in consideration for older kernels: + - Opt for `SocketFilter` program in tests since XDP requires v4.8 and + fragments requires v5.18. + - For assertion tests, first perform the assertion, if the assertion + fails, then it checks the host kernel version to see if it is above + the minimum version requirement. If not, then continue with test, + otherwise fail. + For assertions that are skipped, they're logged in stderr which can + be observed with `-- --nocapture`. + + This also fixes the `bpf_prog_get_info_by_fd()` call for kernels below + v4.15. If calling syscall on kernels below v4.15, it can produce an + `E2BIG` error because `check_uarg_tail_zero()` expects the entire + struct to all-zero bytes (which is caused from the map info). + + Instead, we first attempt the syscall with the map info filled, if it + returns `E2BIG`, then perform syscall again with empty closure. + + Also adds doc for which version a kernel feature was introduced for + better awareness. + + The tests have been verified kernel versions: + - 4.13.0 + - 4.15.0 + - 6.1.0 + - adjust bpf programs for big endian + In aya/src/sys/bpf.rs, there are several simple bpf programs written as + byte arrays. These need to be adjusted to account for big endian. + - expose run_time_ns and run_cnt fields in ProgramInfo + Added functions to expose `run_time_ns` & `run_cnt` statistics from + ProgramInfo/bpf_prog_info. + - add BPF_ENABLE_STATS syscall function + Add bpf syscall function for BPF_ENABLE_STATS to enable stats tracking + for benchmarking purposes. + + Additionally, move `#[cfg(test)]` annotation around the `Drop` trait + instead. Having separate functions causes some complications when + needing ownership/moving of the inner value `OwnedFd` when `Drop` is + manually implemented. + - :programs::uprobe: fix bad variable name + The variable fn_name was very much *not* the fn_name, but rather the + object file path. + - adjust symbol lookup tests for object crate alignment requirements + The object::File::parse API requires parameter to be aligned with 8 bytes. + Adjusted the Vec in the tests with miri to meet this requirement. + - add symbol lookup in associated debug files + This change enhances the logic for symbol lookup in uprobe or uretprobe. + If the symbol is not found in the original binary, the search continues + in the debug file associated through the debuglink section. Before + searching the symbol table, it compares the build IDs of the two files. + The symbol lookup will only be terminated if both build IDs exist and do + not match. This modification does not affect the existing symbol lookup + logic. + - Generate new bindings + - include license in crate workspace + This PR includes the licenses files in the crate workspace subdirectory. + Without this, they won't be showing on crates.io and would be giving out + errors on tooling such as rust2rpm. + - appease new nightly clippy lints + ``` + error: unnecessary qualification + --> aya/src/maps/ring_buf.rs:434:22 + | + 434 | ptr: ptr::NonNull::new(ptr).ok_or( + | ^^^^^^^^^^^^^^^^^ + | + note: the lint level is defined here + --> aya/src/lib.rs:72:5 + | + 72 | unused_qualifications, + | ^^^^^^^^^^^^^^^^^^^^^ + help: remove the unnecessary path segments + | + 434 - ptr: ptr::NonNull::new(ptr).ok_or( + 434 + ptr: NonNull::new(ptr).ok_or( + | + + error: unnecessary qualification + --> aya/src/maps/mod.rs:225:21 + | + 225 | let mut limit = std::mem::MaybeUninit::::uninit(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + help: remove the unnecessary path segments + | + 225 - let mut limit = std::mem::MaybeUninit::::uninit(); + 225 + let mut limit = mem::MaybeUninit::::uninit(); + | + + error: unnecessary qualification + --> aya/src/programs/mod.rs:614:9 + | + 614 | crate::obj::Program { + | ^^^^^^^^^^^^^^^^^^^ + | + help: remove the unnecessary path segments + | + 614 - crate::obj::Program { + 614 + obj::Program { + | + + error: unnecessary qualification + --> aya/src/util.rs:373:14 + | + 373 | unsafe { std::slice::from_raw_parts(bpf_name.as_ptr() as + *const _, length) } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + help: remove the unnecessary path segments + | + 373 - unsafe { std::slice::from_raw_parts(bpf_name.as_ptr() as + *const _, length) } + 373 + unsafe { slice::from_raw_parts(bpf_name.as_ptr() as *const _, + length) } + | + + error: unnecessary qualification + --> aya/src/maps/mod.rs:1130:47 + | + 1130 | .copy_from_slice(unsafe { + std::mem::transmute(TEST_NAME) }); + | ^^^^^^^^^^^^^^^^^^^ + | + note: the lint level is defined here + --> aya/src/lib.rs:72:5 + | + 72 | unused_qualifications, + | ^^^^^^^^^^^^^^^^^^^^^ + help: remove the unnecessary path segments + | + 1130 - .copy_from_slice(unsafe { + std::mem::transmute(TEST_NAME) }); + 1130 + .copy_from_slice(unsafe { + mem::transmute(TEST_NAME) }); + | + ``` + +### Performance + + - cache `nr_cpus` in a thread_local + +### Test + + - adjust test byte arrays for big endian + Adding support for s390x (big endian architecture) and found that some + of the unit tests have structures and files implemented as byte arrays. + They are all coded as little endian and need a bug endian version to + work properly. + +### New Features (BREAKING) + + - Rename BpfRelocationError -> EbpfRelocationError + - Rename BpfSectionKind to EbpfSectionKind + ## 0.12.0 (2024-02-28) @@ -179,6 +820,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 + ### Chore @@ -828,7 +1470,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - - 433 commits contributed to the release over the course of 631 calendar days. + - 434 commits contributed to the release. - 631 days passed between releases. - 182 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages @@ -840,6 +1482,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
view details * **Uncategorized** + - Release aya-obj v0.1.0, aya v0.12.0, safety bump aya-log v0.2.0 ([`0e99fa0`](https://github.com/aya-rs/aya/commit/0e99fa0f340b2fb2e0da3b330aa6555322a77eec)) - Don't use path deps in workspace ([`13b1fc6`](https://github.com/aya-rs/aya/commit/13b1fc63ef2ae083ba03ce9de24cb4f31f989d21)) - Merge pull request #892 from dave-tucker/breaking-changes-v2 ([`daa5a47`](https://github.com/aya-rs/aya/commit/daa5a473105e0c99f5f171ba519d076a7157af6e)) - Merge pull request #891 from dave-tucker/changelog ([`431ce23`](https://github.com/aya-rs/aya/commit/431ce23f27ef5c36a6b38c73b38f23b1cf007900)) @@ -1618,7 +2261,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - - 105 commits contributed to the release over the course of 123 calendar days. + - 105 commits contributed to the release. - 125 days passed between releases. - 39 commits were understood as [conventional](https://www.conventionalcommits.org). - 1 unique issue was worked on: [#111](https://github.com/aya-rs/aya/issues/111) @@ -1787,7 +2430,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - - 22 commits contributed to the release over the course of 22 calendar days. + - 22 commits contributed to the release. - 28 days passed between releases. - 9 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages @@ -1847,7 +2490,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - - 7 commits contributed to the release over the course of 17 calendar days. + - 7 commits contributed to the release. - 24 days passed between releases. - 5 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages @@ -1898,7 +2541,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - - 13 commits contributed to the release over the course of 38 calendar days. + - 13 commits contributed to the release. - 52 days passed between releases. - 8 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages @@ -2000,7 +2643,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - - 29 commits contributed to the release over the course of 43 calendar days. + - 29 commits contributed to the release. - 43 days passed between releases. - 24 commits were understood as [conventional](https://www.conventionalcommits.org). - 3 unique issues were worked on: [#18](https://github.com/aya-rs/aya/issues/18), [#31](https://github.com/aya-rs/aya/issues/31), [#32](https://github.com/aya-rs/aya/issues/32) @@ -2032,7 +2675,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Don't error out parsing padded map sections ([`b657930`](https://github.com/aya-rs/aya/commit/b657930a3ee61f88ada0630afdac6b1c77459244)) - Added support for armv7-unknown-linux-gnueabi and armv7-unknown-linux-gnueabihf ([`8311abf`](https://github.com/aya-rs/aya/commit/8311abfdcbbe70da6abdd67b78b831d53998aad5)) - Tc: make qdisc_add_clsact return io::Error ([`9c8e78b`](https://github.com/aya-rs/aya/commit/9c8e78b7d4192b376ec2e532d9ddcf81c3c5182e)) - - Aya, aya-ebpf-bindings: regenerate bindings ([`122a530`](https://github.com/aya-rs/aya/commit/122a5306e72c7560629bcef160e7f676b84eabd7)) + - Aya, aya-bpf-bindings: regenerate bindings ([`122a530`](https://github.com/aya-rs/aya/commit/122a5306e72c7560629bcef160e7f676b84eabd7)) - Kprobe: remove pid argument ([`08c71df`](https://github.com/aya-rs/aya/commit/08c71dfeb19b2b4358d75baf5b95f8d4e6521935)) - Add missing load() in kprobe example ([`bb15e82`](https://github.com/aya-rs/aya/commit/bb15e82c1d8373700dda52f69d6c4bf6f5489a03)) - Support both bpf_map_def layout variants ([`d8d3117`](https://github.com/aya-rs/aya/commit/d8d311738c974f3b6fad22006ab2b827d0925ce8)) @@ -2058,7 +2701,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - - 5 commits contributed to the release over the course of 1 calendar day. + - 5 commits contributed to the release. - 1 day passed between releases. - 1 commit was understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages diff --git a/aya/Cargo.toml b/aya/Cargo.toml index 57e80c77..ad431440 100644 --- a/aya/Cargo.toml +++ b/aya/Cargo.toml @@ -1,38 +1,36 @@ [package] -name = "aya" -version = "0.12.0" description = "An eBPF library with a focus on developer experience and operability." +documentation = "https://docs.rs/aya" keywords = ["bpf", "ebpf", "kernel", "linux"] +name = "aya" readme = "README.md" -documentation = "https://docs.rs/aya" -rust-version = "1.66" +version = "0.13.1" + authors.workspace = true +edition.workspace = true +homepage.workspace = true license.workspace = true repository.workspace = true -homepage.workspace = true -edition.workspace = true +rust-version.workspace = true + +[lints] +workspace = true [dependencies] assert_matches = { workspace = true } -async-io = { workspace = true, optional = true } -aya-obj = { path = "../aya-obj", version = "^0.1.0", features = ["std"] } +aya-obj = { path = "../aya-obj", version = "^0.2.1", features = ["std"] } bitflags = { workspace = true } bytes = { workspace = true } -lazy_static = { workspace = true } +hashbrown = { workspace = true } libc = { workspace = true } log = { workspace = true } object = { workspace = true, features = ["elf", "read_core", "std", "write"] } +once_cell = { workspace = true } thiserror = { workspace = true } -tokio = { workspace = true, features = ["rt"], optional = true } [dev-dependencies] tempfile = { workspace = true } -[features] -default = [] -async_tokio = ["tokio/net"] -async_std = ["dep:async-io"] - [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs", "-D", "warnings"] diff --git a/aya/src/bpf.rs b/aya/src/bpf.rs index 42a9a489..90ad428a 100644 --- a/aya/src/bpf.rs +++ b/aya/src/bpf.rs @@ -2,57 +2,45 @@ use std::{ borrow::Cow, collections::{HashMap, HashSet}, fs, io, - os::{ - fd::{AsFd as _, AsRawFd as _, OwnedFd}, - raw::c_int, - }, + os::fd::{AsFd as _, AsRawFd as _}, path::{Path, PathBuf}, - sync::Arc, + sync::{Arc, LazyLock}, }; use aya_obj::{ - btf::{BtfFeatures, BtfRelocationError}, - generated::{BPF_F_SLEEPABLE, BPF_F_XDP_HAS_FRAGS}, + EbpfSectionKind, Features, Object, ParseError, ProgramSection, + btf::{Btf, BtfError, BtfFeatures, BtfRelocationError}, + generated::{ + BPF_F_SLEEPABLE, BPF_F_XDP_HAS_FRAGS, + bpf_map_type::{self, *}, + }, relocation::EbpfRelocationError, - EbpfSectionKind, Features, }; use log::{debug, warn}; use thiserror::Error; use crate::{ - generated::{ - bpf_map_type, bpf_map_type::*, AYA_PERF_EVENT_IOC_DISABLE, AYA_PERF_EVENT_IOC_ENABLE, - AYA_PERF_EVENT_IOC_SET_BPF, - }, maps::{Map, MapData, MapError}, - obj::{ - btf::{Btf, BtfError}, - Object, ParseError, ProgramSection, - }, programs::{ BtfTracePoint, CgroupDevice, CgroupSkb, CgroupSkbAttachType, CgroupSock, CgroupSockAddr, - CgroupSockopt, CgroupSysctl, Extension, FEntry, FExit, KProbe, LircMode2, Lsm, PerfEvent, - ProbeKind, Program, ProgramData, ProgramError, RawTracePoint, SchedClassifier, SkLookup, - SkMsg, SkSkb, SkSkbKind, SockOps, SocketFilter, TracePoint, UProbe, Xdp, + CgroupSockopt, CgroupSysctl, Extension, FEntry, FExit, FlowDissector, Iter, KProbe, + LircMode2, Lsm, LsmCgroup, PerfEvent, ProbeKind, Program, ProgramData, ProgramError, + RawTracePoint, SchedClassifier, SkLookup, SkMsg, SkSkb, SkSkbKind, SockOps, SocketFilter, + TracePoint, UProbe, Xdp, }, sys::{ bpf_load_btf, is_bpf_cookie_supported, is_bpf_global_data_supported, - is_btf_datasec_supported, is_btf_decl_tag_supported, is_btf_enum64_supported, - is_btf_float_supported, is_btf_func_global_supported, is_btf_func_supported, - is_btf_supported, is_btf_type_tag_supported, is_perf_link_supported, + is_btf_datasec_supported, is_btf_datasec_zero_supported, is_btf_decl_tag_supported, + is_btf_enum64_supported, is_btf_float_supported, is_btf_func_global_supported, + is_btf_func_supported, is_btf_supported, is_btf_type_tag_supported, is_perf_link_supported, is_probe_read_kernel_supported, is_prog_id_supported, is_prog_name_supported, retry_with_verifier_logs, }, - util::{bytes_of, bytes_of_slice, page_size, possible_cpus, POSSIBLE_CPUS}, + util::{bytes_of, bytes_of_slice, nr_cpus, page_size}, }; -pub(crate) const BPF_OBJ_NAME_LEN: usize = 16; - -pub(crate) const PERF_EVENT_IOC_ENABLE: c_int = AYA_PERF_EVENT_IOC_ENABLE; -pub(crate) const PERF_EVENT_IOC_DISABLE: c_int = AYA_PERF_EVENT_IOC_DISABLE; -pub(crate) const PERF_EVENT_IOC_SET_BPF: c_int = AYA_PERF_EVENT_IOC_SET_BPF; - /// Marker trait for types that can safely be converted to and from byte slices. +#[expect(clippy::missing_safety_doc)] pub unsafe trait Pod: Copy + 'static {} macro_rules! unsafe_impl_pod { @@ -68,11 +56,9 @@ unsafe_impl_pod!(i8, u8, i16, u16, i32, u32, i64, u64, u128, i128); // It only makes sense that an array of POD types is itself POD unsafe impl Pod for [T; N] {} -pub use aya_obj::maps::{bpf_map_def, PinningType}; +pub use aya_obj::maps::{PinningType, bpf_map_def}; -lazy_static::lazy_static! { - pub(crate) static ref FEATURES: Features = detect_features(); -} +pub(crate) static FEATURES: LazyLock = LazyLock::new(detect_features); fn detect_features() -> Features { let btf = if is_btf_supported() { @@ -80,6 +66,7 @@ fn detect_features() -> Features { is_btf_func_supported(), is_btf_func_global_supported(), is_btf_datasec_supported(), + is_btf_datasec_zero_supported(), is_btf_float_supported(), is_btf_decl_tag_supported(), is_btf_type_tag_supported(), @@ -98,7 +85,7 @@ fn detect_features() -> Features { is_prog_id_supported(BPF_MAP_TYPE_DEVMAP), btf, ); - debug!("BPF Feature Detection: {:#?}", f); + debug!("BPF Feature Detection: {f:#?}"); f } @@ -123,7 +110,7 @@ pub fn features() -> &'static Features { /// // load the BTF data from /sys/kernel/btf/vmlinux /// .btf(Btf::from_sys_fs().ok().as_ref()) /// // load pinned maps from /sys/fs/bpf/my-program -/// .map_pin_path("/sys/fs/bpf/my-program") +/// .default_map_pin_directory("/sys/fs/bpf/my-program") /// // finally load the code /// .load_file("file.o")?; /// # Ok::<(), aya::EbpfError>(()) @@ -131,9 +118,15 @@ pub fn features() -> &'static Features { #[derive(Debug)] pub struct EbpfLoader<'a> { btf: Option>, - map_pin_path: Option, + default_map_pin_directory: Option, globals: HashMap<&'a str, (&'a [u8], bool)>, + // Max entries overrides the max_entries field of the map that matches the provided name + // before the map is created. max_entries: HashMap<&'a str, u32>, + // Map pin path overrides the pin path of the map that matches the provided name before + // it is created. + map_pin_path_by_name: HashMap<&'a str, std::borrow::Cow<'a, Path>>, + extensions: HashSet<&'a str>, verifier_log_level: VerifierLogLevel, allow_unsupported_maps: bool, @@ -169,9 +162,10 @@ impl<'a> EbpfLoader<'a> { pub fn new() -> Self { Self { btf: Btf::from_sys_fs().ok().map(Cow::Owned), - map_pin_path: None, + default_map_pin_directory: None, globals: HashMap::new(), max_entries: HashMap::new(), + map_pin_path_by_name: HashMap::new(), extensions: HashSet::new(), verifier_log_level: VerifierLogLevel::default(), allow_unsupported_maps: false, @@ -229,40 +223,43 @@ impl<'a> EbpfLoader<'a> { /// Pinned maps will be loaded from `path/MAP_NAME`. /// The caller is responsible for ensuring the directory exists. /// + /// Note that if a path is provided for a specific map via [`EbpfLoader::map_pin_path`], + /// it will take precedence over this path. + /// /// # Example /// /// ```no_run /// use aya::EbpfLoader; /// /// let bpf = EbpfLoader::new() - /// .map_pin_path("/sys/fs/bpf/my-program") + /// .default_map_pin_directory("/sys/fs/bpf/my-program") /// .load_file("file.o")?; /// # Ok::<(), aya::EbpfError>(()) /// ``` /// - pub fn map_pin_path>(&mut self, path: P) -> &mut Self { - self.map_pin_path = Some(path.as_ref().to_owned()); + pub fn default_map_pin_directory>(&mut self, path: P) -> &mut Self { + self.default_map_pin_directory = Some(path.as_ref().to_owned()); self } - /// Sets the value of a global variable. + /// Override the value of a global variable. /// /// If the `must_exist` argument is `true`, [`EbpfLoader::load`] will fail with [`ParseError::SymbolNotFound`] if the loaded object code does not contain the variable. /// /// From Rust eBPF, a global variable can be defined as follows: /// /// ```no_run - /// #[no_mangle] + /// #[unsafe(no_mangle)] /// static VERSION: i32 = 0; /// ``` /// /// Then it can be accessed using `core::ptr::read_volatile`: /// /// ```no_run - /// # #[no_mangle] + /// # #[unsafe(no_mangle)] /// # static VERSION: i32 = 0; - /// # unsafe fn try_test() { - /// let version = core::ptr::read_volatile(&VERSION); + /// # fn try_test() { + /// let version = unsafe { core::ptr::read_volatile(&VERSION) }; /// # } /// ``` /// @@ -278,13 +275,13 @@ impl<'a> EbpfLoader<'a> { /// use aya::EbpfLoader; /// /// let bpf = EbpfLoader::new() - /// .set_global("VERSION", &2, true) - /// .set_global("PIDS", &[1234u16, 5678], true) + /// .override_global("VERSION", &2, true) + /// .override_global("PIDS", &[1234u16, 5678], true) /// .load_file("file.o")?; /// # Ok::<(), aya::EbpfError>(()) /// ``` /// - pub fn set_global>>( + pub fn override_global>>( &mut self, name: &'a str, value: T, @@ -294,6 +291,17 @@ impl<'a> EbpfLoader<'a> { self } + /// Override the value of a global variable. + #[deprecated(since = "0.13.2", note = "please use `override_global` instead")] + pub fn set_global>>( + &mut self, + name: &'a str, + value: T, + must_exist: bool, + ) -> &mut Self { + self.override_global(name, value, must_exist) + } + /// Set the max_entries for specified map. /// /// Overwrite the value of max_entries of the map that matches @@ -305,16 +313,49 @@ impl<'a> EbpfLoader<'a> { /// use aya::EbpfLoader; /// /// let bpf = EbpfLoader::new() - /// .set_max_entries("map", 64) + /// .map_max_entries("map", 64) /// .load_file("file.o")?; /// # Ok::<(), aya::EbpfError>(()) /// ``` /// - pub fn set_max_entries(&mut self, name: &'a str, size: u32) -> &mut Self { + pub fn map_max_entries(&mut self, name: &'a str, size: u32) -> &mut Self { self.max_entries.insert(name, size); self } + /// Set the max_entries for specified map. + #[deprecated(since = "0.13.2", note = "please use `map_max_entries` instead")] + pub fn set_max_entries(&mut self, name: &'a str, size: u32) -> &mut Self { + self.map_max_entries(name, size) + } + + /// Set the pin path for the map that matches the provided name. + /// + /// Note that this is an absolute path to the pinned map; it is not a prefix + /// to be combined with the map name, and it is not relative to the + /// configured base directory for pinned maps. + /// + /// Each call to this function with the same name overwrites the path to the + /// pinned map; last one wins. + /// + /// # Example + /// + /// ```no_run + /// # use std::path::Path; + /// + /// # let mut loader = aya::EbpfLoader::new(); + /// # let pin_path = Path::new("/sys/fs/bpf/my-pinned-map"); + /// let bpf = loader + /// .map_pin_path("map", pin_path) + /// .load_file("file.o")?; + /// # Ok::<(), aya::EbpfError>(()) + /// ``` + /// + pub fn map_pin_path>>(&mut self, name: &'a str, path: P) -> &mut Self { + self.map_pin_path_by_name.insert(name, path.into()); + self + } + /// Treat the provided program as an [`Extension`] /// /// When attempting to load the program with the provided `name` @@ -375,6 +416,10 @@ impl<'a> EbpfLoader<'a> { /// Loads eBPF bytecode from a buffer. /// + /// The buffer needs to be 4-bytes aligned. If you are bundling the bytecode statically + /// into your binary, it is recommended that you do so using + /// [`include_bytes_aligned`](crate::include_bytes_aligned). + /// /// # Examples /// /// ```no_run @@ -388,12 +433,13 @@ impl<'a> EbpfLoader<'a> { pub fn load(&mut self, data: &[u8]) -> Result { let Self { btf, - map_pin_path, + default_map_pin_directory, globals, max_entries, extensions, verifier_log_level, allow_unsupported_maps, + map_pin_path_by_name, } = self; let mut obj = Object::parse(data)?; obj.patch_map_data(globals.clone())?; @@ -410,8 +456,10 @@ impl<'a> EbpfLoader<'a> { | ProgramSection::FEntry { sleepable: _ } | ProgramSection::FExit { sleepable: _ } | ProgramSection::Lsm { sleepable: _ } - | ProgramSection::BtfTracePoint => { - return Err(EbpfError::BtfError(err)) + | ProgramSection::LsmCgroup + | ProgramSection::BtfTracePoint + | ProgramSection::Iter { sleepable: _ } => { + return Err(EbpfError::BtfError(err)); } ProgramSection::KRetProbe | ProgramSection::KProbe @@ -438,12 +486,17 @@ impl<'a> EbpfLoader<'a> { | ProgramSection::PerfEvent | ProgramSection::RawTracePoint | ProgramSection::SkLookup + | ProgramSection::FlowDissector | ProgramSection::CgroupSock { attach_type: _ } | ProgramSection::CgroupDevice => {} } } - warn!("Object BTF couldn't be loaded in the kernel: {err}"); + if obj.has_btf_relocations() { + return Err(EbpfError::BtfError(err)); + } + + warn!("object BTF couldn't be loaded in the kernel: {err}"); None } @@ -465,13 +518,11 @@ impl<'a> EbpfLoader<'a> { { continue; } - let num_cpus = || -> Result { - Ok(possible_cpus() - .map_err(|error| EbpfError::FileError { - path: PathBuf::from(POSSIBLE_CPUS), - error, - })? - .len() as u32) + let num_cpus = || { + Ok(nr_cpus().map_err(|(path, error)| EbpfError::FileError { + path: PathBuf::from(path), + error, + })? as u32) }; let map_type: bpf_map_type = obj.map_type().try_into().map_err(MapError::from)?; if let Some(max_entries) = max_entries_override( @@ -493,16 +544,21 @@ impl<'a> EbpfLoader<'a> { _ => (), } let btf_fd = btf_fd.as_deref().map(|fd| fd.as_fd()); - let mut map = match obj.pinning() { - PinningType::None => MapData::create(obj, &name, btf_fd)?, - PinningType::ByName => { - // pin maps in /sys/fs/bpf by default to align with libbpf - // behavior https://github.com/libbpf/libbpf/blob/v1.2.2/src/libbpf.c#L2161. - let path = map_pin_path - .as_deref() - .unwrap_or_else(|| Path::new("/sys/fs/bpf")); - - MapData::create_pinned_by_name(path, obj, &name, btf_fd)? + let mut map = if let Some(pin_path) = map_pin_path_by_name.get(name.as_str()) { + MapData::create_pinned_by_name(pin_path, obj, &name, btf_fd)? + } else { + match obj.pinning() { + PinningType::None => MapData::create(obj, &name, btf_fd)?, + PinningType::ByName => { + // pin maps in /sys/fs/bpf by default to align with libbpf + // behavior https://github.com/libbpf/libbpf/blob/v1.2.2/src/libbpf.c#L2161. + let path = default_map_pin_directory + .as_deref() + .unwrap_or_else(|| Path::new("/sys/fs/bpf")); + let path = path.join(&name); + + MapData::create_pinned_by_name(path, obj, &name, btf_fd)? + } } }; map.finalize()?; @@ -529,15 +585,11 @@ impl<'a> EbpfLoader<'a> { .map(|(name, prog_obj)| { let function_obj = obj.functions.get(&prog_obj.function_key()).unwrap().clone(); - let prog_name = if FEATURES.bpf_name() { - Some(name.clone()) - } else { - None - }; + let prog_name = FEATURES.bpf_name().then(|| name.clone().into()); let section = prog_obj.section.clone(); let obj = (prog_obj, function_obj); - let btf_fd = btf_fd.clone(); + let btf_fd = btf_fd.as_ref().map(Arc::clone); let program = if extensions.contains(name.as_str()) { Program::Extension(Extension { data: ProgramData::new(prog_name, obj, btf_fd, *verifier_log_level), @@ -623,15 +675,15 @@ impl<'a> EbpfLoader<'a> { } ProgramSection::CgroupSkb => Program::CgroupSkb(CgroupSkb { data: ProgramData::new(prog_name, obj, btf_fd, *verifier_log_level), - expected_attach_type: None, + attach_type: None, }), ProgramSection::CgroupSkbIngress => Program::CgroupSkb(CgroupSkb { data: ProgramData::new(prog_name, obj, btf_fd, *verifier_log_level), - expected_attach_type: Some(CgroupSkbAttachType::Ingress), + attach_type: Some(CgroupSkbAttachType::Ingress), }), ProgramSection::CgroupSkbEgress => Program::CgroupSkb(CgroupSkb { data: ProgramData::new(prog_name, obj, btf_fd, *verifier_log_level), - expected_attach_type: Some(CgroupSkbAttachType::Egress), + attach_type: Some(CgroupSkbAttachType::Egress), }), ProgramSection::CgroupSockAddr { attach_type, .. } => { Program::CgroupSockAddr(CgroupSockAddr { @@ -656,6 +708,9 @@ impl<'a> EbpfLoader<'a> { } Program::Lsm(Lsm { data }) } + ProgramSection::LsmCgroup => Program::LsmCgroup(LsmCgroup { + data: ProgramData::new(prog_name, obj, btf_fd, *verifier_log_level), + }), ProgramSection::BtfTracePoint => Program::BtfTracePoint(BtfTracePoint { data: ProgramData::new(prog_name, obj, btf_fd, *verifier_log_level), }), @@ -675,6 +730,9 @@ impl<'a> EbpfLoader<'a> { } Program::FExit(FExit { data }) } + ProgramSection::FlowDissector => Program::FlowDissector(FlowDissector { + data: ProgramData::new(prog_name, obj, btf_fd, *verifier_log_level), + }), ProgramSection::Extension => Program::Extension(Extension { data: ProgramData::new(prog_name, obj, btf_fd, *verifier_log_level), }), @@ -690,6 +748,14 @@ impl<'a> EbpfLoader<'a> { ProgramSection::CgroupDevice => Program::CgroupDevice(CgroupDevice { data: ProgramData::new(prog_name, obj, btf_fd, *verifier_log_level), }), + ProgramSection::Iter { sleepable } => { + let mut data = + ProgramData::new(prog_name, obj, btf_fd, *verifier_log_level); + if *sleepable { + data.flags = BPF_F_SLEEPABLE; + } + Program::Iter(Iter { data }) + } } }; (name, program) @@ -697,23 +763,17 @@ impl<'a> EbpfLoader<'a> { .collect(); let maps = maps .drain() - .map(parse_map) + .map(|data| parse_map(data, *allow_unsupported_maps)) .collect::, EbpfError>>()?; - if !*allow_unsupported_maps { - maps.iter().try_for_each(|(_, x)| match x { - Map::Unsupported(map) => Err(EbpfError::MapError(MapError::Unsupported { - map_type: map.obj().map_type(), - })), - _ => Ok(()), - })?; - }; - Ok(Ebpf { maps, programs }) } } -fn parse_map(data: (String, MapData)) -> Result<(String, Map), EbpfError> { +fn parse_map( + data: (String, MapData), + allow_unsupported_maps: bool, +) -> Result<(String, Map), EbpfError> { let (name, map) = data; let map_type = bpf_map_type::try_from(map.obj().map_type()).map_err(MapError::from)?; let map = match map_type { @@ -737,9 +797,16 @@ fn parse_map(data: (String, MapData)) -> Result<(String, Map), EbpfError> { BPF_MAP_TYPE_DEVMAP => Map::DevMap(map), BPF_MAP_TYPE_DEVMAP_HASH => Map::DevMapHash(map), BPF_MAP_TYPE_XSKMAP => Map::XskMap(map), - m => { - warn!("The map {name} is of type {:#?} which is currently unsupported in Aya, use `allow_unsupported_maps()` to load it anyways", m); - Map::Unsupported(map) + BPF_MAP_TYPE_SK_STORAGE => Map::SkStorage(map), + m_type => { + if allow_unsupported_maps { + Map::Unsupported(map) + } else { + return Err(EbpfError::MapError(MapError::Unsupported { + name, + map_type: m_type, + })); + } } }; @@ -780,11 +847,7 @@ fn adjust_to_page_size(byte_size: u32, page_size: u32) -> u32 { fn div_ceil(n: u32, rhs: u32) -> u32 { let d = n / rhs; let r = n % rhs; - if r > 0 && rhs > 0 { - d + 1 - } else { - d - } + if r > 0 && rhs > 0 { d + 1 } else { d } } let pages_needed = div_ceil(byte_size, page_size); page_size * pages_needed.next_power_of_two() @@ -792,7 +855,7 @@ fn adjust_to_page_size(byte_size: u32, page_size: u32) -> u32 { #[cfg(test)] mod tests { - use crate::generated::bpf_map_type::*; + use aya_obj::generated::bpf_map_type::*; const PAGE_SIZE: u32 = 4096; const NUM_CPUS: u32 = 4; @@ -891,6 +954,10 @@ impl Ebpf { /// [maps](crate::maps) defined in it. If the kernel supports [BTF](Btf) /// debug info, it is automatically loaded from `/sys/kernel/btf/vmlinux`. /// + /// The buffer needs to be 4-bytes aligned. If you are bundling the bytecode statically + /// into your binary, it is recommended that you do so using + /// [`include_bytes_aligned`](crate::include_bytes_aligned). + /// /// For more loading options, see [EbpfLoader]. /// /// # Examples @@ -988,6 +1055,35 @@ impl Ebpf { self.maps.iter_mut().map(|(name, map)| (name.as_str(), map)) } + /// Attempts to get mutable references to `N` maps at once. + /// + /// Returns an array of length `N` with the results of each query, in the same order + /// as the requested map names. For soundness, at most one mutable reference will be + /// returned to any map. `None` will be used if a map with the given name is missing. + /// + /// This method performs a check to ensure that there are no duplicate map names, + /// which currently has a time-complexity of *O(n²)*. Be careful when passing a large + /// number of names. + /// + /// # Panics + /// + /// Panics if any names are duplicated. + /// + /// # Examples + /// ```no_run + /// # let mut bpf = aya::Ebpf::load(&[])?; + /// match bpf.maps_disjoint_mut(["MAP1", "MAP2"]) { + /// [Some(m1), Some(m2)] => println!("Got MAP1 and MAP2"), + /// [Some(m1), None] => println!("Got only MAP1"), + /// [None, Some(m2)] => println!("Got only MAP2"), + /// [None, None] => println!("No maps"), + /// } + /// # Ok::<(), aya::EbpfError>(()) + /// ``` + pub fn maps_disjoint_mut(&mut self, names: [&str; N]) -> [Option<&mut Map>; N] { + self.maps.get_disjoint_mut(names) + } + /// Returns a reference to the program with the given name. /// /// You can use this to inspect a program and its properties. To load and attach a program, use @@ -1021,7 +1117,7 @@ impl Ebpf { /// /// let program: &mut UProbe = bpf.program_mut("SSL_read").unwrap().try_into()?; /// program.load()?; - /// program.attach(Some("SSL_read"), 0, "libssl", None)?; + /// program.attach("SSL_read", "libssl", None, None)?; /// # Ok::<(), aya::EbpfError>(()) /// ``` pub fn program_mut(&mut self, name: &str) -> Option<&mut Program> { @@ -1123,11 +1219,14 @@ pub enum EbpfError { #[deprecated(since = "0.13.0", note = "use `EbpfError` instead")] pub type BpfError = EbpfError; -fn load_btf(raw_btf: Vec, verifier_log_level: VerifierLogLevel) -> Result { +fn load_btf( + raw_btf: Vec, + verifier_log_level: VerifierLogLevel, +) -> Result { let (ret, verifier_log) = retry_with_verifier_logs(10, |logger| { bpf_load_btf(raw_btf.as_slice(), logger, verifier_log_level) }); - ret.map_err(|(_, io_error)| BtfError::LoadError { + ret.map_err(|io_error| BtfError::LoadError { io_error, verifier_log, }) @@ -1136,7 +1235,7 @@ fn load_btf(raw_btf: Vec, verifier_log_level: VerifierLogLevel) -> Result { bytes: &'a [u8], } @@ -1153,7 +1252,7 @@ impl<'a, T: Pod> From<&'a T> for GlobalData<'a> { fn from(v: &'a T) -> Self { GlobalData { // Safety: v is Pod - bytes: unsafe { bytes_of(v) }, + bytes: bytes_of(v), } } } diff --git a/aya/src/lib.rs b/aya/src/lib.rs index ccceb9e0..6765597a 100644 --- a/aya/src/lib.rs +++ b/aya/src/lib.rs @@ -37,60 +37,19 @@ html_favicon_url = "https://aya-rs.dev/assets/images/crabby.svg" )] #![cfg_attr(docsrs, feature(doc_cfg))] -#![deny( - clippy::all, - clippy::use_self, - absolute_paths_not_starting_with_crate, - deprecated_in_future, - elided_lifetimes_in_paths, - explicit_outlives_requirements, - ffi_unwind_calls, - keyword_idents, - //let_underscore_drop, - macro_use_extern_crate, - meta_variable_misuse, - missing_abi, - //missing_copy_implementations, - missing_docs, - non_ascii_idents, - noop_method_call, - rust_2021_incompatible_closure_captures, - rust_2021_incompatible_or_patterns, - rust_2021_prefixes_incompatible_syntax, - rust_2021_prelude_collisions, - single_use_lifetimes, - trivial_numeric_casts, - unreachable_pub, - //unsafe_op_in_unsafe_fn, - unstable_features, - unused_crate_dependencies, - unused_extern_crates, - unused_import_braces, - unused_lifetimes, - unused_macro_rules, - //unused_qualifications, https://github.com/rust-lang/rust/commit/9ccc7b7 added size_of to the prelude, but we need to continue to qualify it so that we build on older compilers. - //unused_results, -)] -#![allow(clippy::missing_safety_doc, clippy::len_without_is_empty)] -#![cfg_attr( - all(feature = "async_tokio", feature = "async_std"), - allow(unused_crate_dependencies) -)] +#![deny(missing_docs)] mod bpf; -use aya_obj::generated; pub mod maps; -use aya_obj as obj; pub mod pin; pub mod programs; -pub use programs::loaded_programs; -mod sys; +pub mod sys; pub mod util; -use std::os::fd::{AsFd, BorrowedFd, OwnedFd}; +use std::os::fd::{AsFd, AsRawFd, BorrowedFd, FromRawFd, OwnedFd, RawFd}; +pub use aya_obj::btf::{Btf, BtfError}; pub use bpf::*; -pub use obj::btf::{Btf, BtfError}; pub use object::Endianness; #[doc(hidden)] pub use sys::netlink_set_link_up; @@ -123,51 +82,78 @@ impl MockableFd { #[cfg(test)] fn from_fd(fd: OwnedFd) -> Self { - Self { fd: Some(fd) } + let fd = Some(fd); + Self { fd } } #[cfg(not(test))] - fn try_clone(&self) -> std::io::Result { + fn inner(&self) -> &OwnedFd { let Self { fd } = self; - let fd = fd.try_clone()?; - Ok(Self { fd }) + fd } #[cfg(test)] - fn try_clone(&self) -> std::io::Result { + fn inner(&self) -> &OwnedFd { let Self { fd } = self; - let fd = fd.as_ref().map(OwnedFd::try_clone).transpose()?; - Ok(Self { fd }) + fd.as_ref().unwrap() } -} -impl AsFd for MockableFd { #[cfg(not(test))] - fn as_fd(&self) -> BorrowedFd<'_> { - let Self { fd } = self; - fd.as_fd() + fn into_inner(self) -> OwnedFd { + self.fd } #[cfg(test)] + fn into_inner(mut self) -> OwnedFd { + self.fd.take().unwrap() + } + + fn try_clone(&self) -> std::io::Result { + let fd = self.inner(); + let fd = fd.try_clone()?; + Ok(Self::from_fd(fd)) + } +} + +impl From for MockableFd +where + OwnedFd: From, +{ + fn from(value: T) -> Self { + let fd = OwnedFd::from(value); + Self::from_fd(fd) + } +} + +impl AsFd for MockableFd { fn as_fd(&self) -> BorrowedFd<'_> { - let Self { fd } = self; - fd.as_ref().unwrap().as_fd() + self.inner().as_fd() } } -impl Drop for MockableFd { - #[cfg(not(test))] - fn drop(&mut self) { - // Intentional no-op. +impl AsRawFd for MockableFd { + fn as_raw_fd(&self) -> RawFd { + self.inner().as_raw_fd() } +} - #[cfg(test)] +impl FromRawFd for MockableFd { + unsafe fn from_raw_fd(fd: RawFd) -> Self { + let fd = unsafe { OwnedFd::from_raw_fd(fd) }; + Self::from_fd(fd) + } +} + +#[cfg(test)] +impl Drop for MockableFd { fn drop(&mut self) { use std::os::fd::AsRawFd as _; let Self { fd } = self; - if fd.as_ref().unwrap().as_raw_fd() >= Self::mock_signed_fd() { - let fd: OwnedFd = fd.take().unwrap(); + let fd = fd.take().unwrap(); + if fd.as_raw_fd() < Self::mock_signed_fd() { + std::mem::drop(fd) + } else { std::mem::forget(fd) } } diff --git a/aya/src/maps/array/array.rs b/aya/src/maps/array/array.rs index 8ca907f5..5f62757e 100644 --- a/aya/src/maps/array/array.rs +++ b/aya/src/maps/array/array.rs @@ -1,13 +1,11 @@ use std::{ borrow::{Borrow, BorrowMut}, marker::PhantomData, - os::fd::AsFd as _, }; use crate::{ - maps::{check_bounds, check_kv_size, IterableMap, MapData, MapError}, - sys::{bpf_map_lookup_elem, bpf_map_update_elem, SyscallError}, Pod, + maps::{IterableMap, MapData, MapError, check_bounds, check_kv_size, hash_map}, }; /// A fixed-size array. @@ -49,6 +47,7 @@ impl, V: Pod> Array { /// Returns the number of elements in the array. /// /// This corresponds to the value of `bpf_map_def::max_entries` on the eBPF side. + #[expect(clippy::len_without_is_empty)] pub fn len(&self) -> u32 { self.inner.borrow().obj.max_entries() } @@ -62,14 +61,7 @@ impl, V: Pod> Array { pub fn get(&self, index: &u32, flags: u64) -> Result { let data = self.inner.borrow(); check_bounds(data, *index)?; - let fd = data.fd().as_fd(); - - let value = - bpf_map_lookup_elem(fd, index, flags).map_err(|(_, io_error)| SyscallError { - call: "bpf_map_lookup_elem", - io_error, - })?; - value.ok_or(MapError::KeyNotFound) + hash_map::get(data, index, flags) } /// An iterator over the elements of the array. The iterator item type is `Result, V: Pod> Array { pub fn set(&mut self, index: u32, value: impl Borrow, flags: u64) -> Result<(), MapError> { let data = self.inner.borrow_mut(); check_bounds(data, index)?; - let fd = data.fd().as_fd(); - bpf_map_update_elem(fd, Some(&index), value.borrow(), flags).map_err(|(_, io_error)| { - SyscallError { - call: "bpf_map_update_elem", - io_error, - } - })?; - Ok(()) + hash_map::insert(data, &index, value.borrow(), flags) } } diff --git a/aya/src/maps/array/mod.rs b/aya/src/maps/array/mod.rs index 728e4851..15974d27 100644 --- a/aya/src/maps/array/mod.rs +++ b/aya/src/maps/array/mod.rs @@ -1,5 +1,6 @@ //! Array types. -#[allow(clippy::module_inception)] + +#[expect(clippy::module_inception)] mod array; mod per_cpu_array; mod program_array; diff --git a/aya/src/maps/array/per_cpu_array.rs b/aya/src/maps/array/per_cpu_array.rs index 5238da73..b5114efa 100644 --- a/aya/src/maps/array/per_cpu_array.rs +++ b/aya/src/maps/array/per_cpu_array.rs @@ -5,9 +5,9 @@ use std::{ }; use crate::{ - maps::{check_bounds, check_kv_size, IterableMap, MapData, MapError, PerCpuValues}, - sys::{bpf_map_lookup_elem_per_cpu, bpf_map_update_elem_per_cpu, SyscallError}, Pod, + maps::{IterableMap, MapData, MapError, PerCpuValues, check_bounds, check_kv_size}, + sys::{SyscallError, bpf_map_lookup_elem_per_cpu, bpf_map_update_elem_per_cpu}, }; /// A per-CPU fixed-size array. @@ -37,7 +37,7 @@ use crate::{ /// let mut array = PerCpuArray::try_from(bpf.map_mut("ARRAY").unwrap())?; /// /// // set array[1] = 42 for all cpus -/// let nr_cpus = nr_cpus()?; +/// let nr_cpus = nr_cpus().map_err(|(_, error)| error)?; /// array.set(1, PerCpuValues::try_from(vec![42u32; nr_cpus])?, 0)?; /// /// // retrieve the values at index 1 for all cpus @@ -68,6 +68,7 @@ impl, V: Pod> PerCpuArray { /// Returns the number of elements in the array. /// /// This corresponds to the value of `bpf_map_def::max_entries` on the eBPF side. + #[expect(clippy::len_without_is_empty)] pub fn len(&self) -> u32 { self.inner.borrow().obj.max_entries() } @@ -83,12 +84,11 @@ impl, V: Pod> PerCpuArray { check_bounds(data, *index)?; let fd = data.fd().as_fd(); - let value = bpf_map_lookup_elem_per_cpu(fd, index, flags).map_err(|(_, io_error)| { - SyscallError { + let value = + bpf_map_lookup_elem_per_cpu(fd, index, flags).map_err(|io_error| SyscallError { call: "bpf_map_lookup_elem", io_error, - } - })?; + })?; value.ok_or(MapError::KeyNotFound) } @@ -111,7 +111,7 @@ impl, V: Pod> PerCpuArray { check_bounds(data, index)?; let fd = data.fd().as_fd(); - bpf_map_update_elem_per_cpu(fd, &index, &values, flags).map_err(|(_, io_error)| { + bpf_map_update_elem_per_cpu(fd, &index, &values, flags).map_err(|io_error| { SyscallError { call: "bpf_map_update_elem", io_error, diff --git a/aya/src/maps/array/program_array.rs b/aya/src/maps/array/program_array.rs index ca6beb8e..3b88fe11 100644 --- a/aya/src/maps/array/program_array.rs +++ b/aya/src/maps/array/program_array.rs @@ -6,9 +6,8 @@ use std::{ }; use crate::{ - maps::{check_bounds, check_kv_size, MapData, MapError, MapKeys}, + maps::{MapData, MapError, MapKeys, check_bounds, check_kv_size, hash_map}, programs::ProgramFd, - sys::{bpf_map_delete_elem, bpf_map_update_elem, SyscallError}, }; /// An array of eBPF program file descriptors used as a jump table. @@ -37,13 +36,13 @@ use crate::{ /// let flags = 0; /// /// // bpf_tail_call(ctx, JUMP_TABLE, 0) will jump to prog_0 -/// prog_array.set(0, &prog_0_fd, flags); +/// prog_array.set(0, prog_0_fd, flags); /// /// // bpf_tail_call(ctx, JUMP_TABLE, 1) will jump to prog_1 -/// prog_array.set(1, &prog_1_fd, flags); +/// prog_array.set(1, prog_1_fd, flags); /// /// // bpf_tail_call(ctx, JUMP_TABLE, 2) will jump to prog_2 -/// prog_array.set(2, &prog_2_fd, flags); +/// prog_array.set(2, prog_2_fd, flags); /// # Ok::<(), aya::EbpfError>(()) /// ``` #[doc(alias = "BPF_MAP_TYPE_PROG_ARRAY")] @@ -74,17 +73,7 @@ impl> ProgramArray { pub fn set(&mut self, index: u32, program: &ProgramFd, flags: u64) -> Result<(), MapError> { let data = self.inner.borrow_mut(); check_bounds(data, index)?; - let fd = data.fd().as_fd(); - let prog_fd = program.as_fd(); - let prog_fd = prog_fd.as_raw_fd(); - - bpf_map_update_elem(fd, Some(&index), &prog_fd, flags).map_err(|(_, io_error)| { - SyscallError { - call: "bpf_map_update_elem", - io_error, - } - })?; - Ok(()) + hash_map::insert(data, &index, &program.as_fd().as_raw_fd(), flags) } /// Clears the value at index in the jump table. @@ -94,16 +83,6 @@ impl> ProgramArray { pub fn clear_index(&mut self, index: &u32) -> Result<(), MapError> { let data = self.inner.borrow_mut(); check_bounds(data, *index)?; - let fd = data.fd().as_fd(); - - bpf_map_delete_elem(fd, index) - .map(|_| ()) - .map_err(|(_, io_error)| { - SyscallError { - call: "bpf_map_delete_elem", - io_error, - } - .into() - }) + hash_map::remove(data, index) } } diff --git a/aya/src/maps/bloom_filter.rs b/aya/src/maps/bloom_filter.rs index 944f3f76..c5c7e3f6 100644 --- a/aya/src/maps/bloom_filter.rs +++ b/aya/src/maps/bloom_filter.rs @@ -1,4 +1,5 @@ //! A Bloom Filter. + use std::{ borrow::{Borrow, BorrowMut}, marker::PhantomData, @@ -6,9 +7,9 @@ use std::{ }; use crate::{ - maps::{check_v_size, MapData, MapError}, - sys::{bpf_map_lookup_elem_ptr, bpf_map_push_elem, SyscallError}, Pod, + maps::{MapData, MapError, check_v_size}, + sys::{SyscallError, bpf_map_lookup_elem_ptr, bpf_map_push_elem}, }; /// A Bloom Filter. @@ -20,19 +21,20 @@ use crate::{ /// # Examples /// /// ```no_run +/// # use assert_matches::assert_matches; /// # let mut bpf = aya::Ebpf::load(&[])?; +/// use aya::maps::MapError; /// use aya::maps::bloom_filter::BloomFilter; /// /// let mut bloom_filter = BloomFilter::try_from(bpf.map_mut("BLOOM_FILTER").unwrap())?; /// /// bloom_filter.insert(1, 0)?; /// -/// assert!(bloom_filter.contains(&1, 0).is_ok()); -/// assert!(bloom_filter.contains(&2, 0).is_err()); +/// assert_matches!(bloom_filter.contains(&1, 0), Ok(())); +/// assert_matches!(bloom_filter.contains(&2, 0), Err(MapError::ElementNotFound)); /// /// # Ok::<(), aya::EbpfError>(()) /// ``` - #[doc(alias = "BPF_MAP_TYPE_BLOOM_FILTER")] #[derive(Debug)] pub struct BloomFilter { @@ -55,13 +57,15 @@ impl, V: Pod> BloomFilter { pub fn contains(&self, mut value: &V, flags: u64) -> Result<(), MapError> { let fd = self.inner.borrow().fd().as_fd(); - bpf_map_lookup_elem_ptr::(fd, None, &mut value, flags) - .map_err(|(_, io_error)| SyscallError { + match bpf_map_lookup_elem_ptr::(fd, None, &mut value, flags).map_err( + |io_error| SyscallError { call: "bpf_map_lookup_elem", io_error, - })? - .ok_or(MapError::ElementNotFound)?; - Ok(()) + }, + )? { + None => Err(MapError::ElementNotFound), + Some(()) => Ok(()), + } } } @@ -69,11 +73,12 @@ impl, V: Pod> BloomFilter { /// Inserts a value into the map. pub fn insert(&mut self, value: impl Borrow, flags: u64) -> Result<(), MapError> { let fd = self.inner.borrow_mut().fd().as_fd(); - bpf_map_push_elem(fd, value.borrow(), flags).map_err(|(_, io_error)| SyscallError { - call: "bpf_map_push_elem", - io_error, - })?; - Ok(()) + bpf_map_push_elem(fd, value.borrow(), flags) + .map_err(|io_error| SyscallError { + call: "bpf_map_push_elem", + io_error, + }) + .map_err(Into::into) } } @@ -82,27 +87,26 @@ mod tests { use std::io; use assert_matches::assert_matches; + use aya_obj::generated::{ + bpf_cmd, + bpf_map_type::{BPF_MAP_TYPE_ARRAY, BPF_MAP_TYPE_BLOOM_FILTER}, + }; use libc::{EFAULT, ENOENT}; use super::*; use crate::{ - generated::{ - bpf_cmd, - bpf_map_type::{BPF_MAP_TYPE_BLOOM_FILTER, BPF_MAP_TYPE_PERF_EVENT_ARRAY}, - }, maps::{ - test_utils::{self, new_map}, Map, + test_utils::{self, new_map}, }, - obj, - sys::{override_syscall, SysResult, Syscall}, + sys::{SysResult, Syscall, override_syscall}, }; - fn new_obj_map() -> obj::Map { + fn new_obj_map() -> aya_obj::Map { test_utils::new_obj_map::(BPF_MAP_TYPE_BLOOM_FILTER) } - fn sys_error(value: i32) -> SysResult { + fn sys_error(value: i32) -> SysResult { Err((-1, io::Error::from_raw_os_error(value))) } @@ -120,10 +124,8 @@ mod tests { #[test] fn test_try_from_wrong_map() { - let map = new_map(test_utils::new_obj_map::( - BPF_MAP_TYPE_PERF_EVENT_ARRAY, - )); - let map = Map::PerfEventArray(map); + let map = new_map(test_utils::new_obj_map::(BPF_MAP_TYPE_ARRAY)); + let map = Map::Array(map); assert_matches!( BloomFilter::<_, u32>::try_from(&map), @@ -135,7 +137,7 @@ mod tests { fn test_new_ok() { let map = new_map(new_obj_map()); - assert!(BloomFilter::<_, u32>::new(&map).is_ok()); + let _: BloomFilter<_, u32> = BloomFilter::new(&map).unwrap(); } #[test] @@ -143,7 +145,7 @@ mod tests { let map = new_map(new_obj_map()); let map = Map::BloomFilter(map); - assert!(BloomFilter::<_, u32>::try_from(&map).is_ok()) + let _: BloomFilter<_, u32> = map.try_into().unwrap(); } #[test] @@ -168,11 +170,11 @@ mod tests { Syscall::Ebpf { cmd: bpf_cmd::BPF_MAP_UPDATE_ELEM, .. - } => Ok(1), + } => Ok(0), _ => sys_error(EFAULT), }); - assert!(bloom_filter.insert(0, 42).is_ok()); + assert_matches!(bloom_filter.insert(0, 42), Ok(())); } #[test] diff --git a/aya/src/maps/hash_map/hash_map.rs b/aya/src/maps/hash_map/hash_map.rs index becac6c4..cfb8b953 100644 --- a/aya/src/maps/hash_map/hash_map.rs +++ b/aya/src/maps/hash_map/hash_map.rs @@ -1,13 +1,11 @@ use std::{ borrow::{Borrow, BorrowMut}, marker::PhantomData, - os::fd::AsFd as _, }; use crate::{ - maps::{check_kv_size, hash_map, IterableMap, MapData, MapError, MapIter, MapKeys}, - sys::{bpf_map_lookup_elem, SyscallError}, Pod, + maps::{IterableMap, MapData, MapError, MapIter, MapKeys, check_kv_size, hash_map}, }; /// A hash map that can be shared between eBPF programs and user space. @@ -53,12 +51,7 @@ impl, K: Pod, V: Pod> HashMap { /// Returns a copy of the value associated with the key. pub fn get(&self, key: &K, flags: u64) -> Result { - let fd = self.inner.borrow().fd().as_fd(); - let value = bpf_map_lookup_elem(fd, key, flags).map_err(|(_, io_error)| SyscallError { - call: "bpf_map_lookup_elem", - io_error, - })?; - value.ok_or(MapError::KeyNotFound) + hash_map::get(self.inner.borrow(), key, flags) } /// An iterator visiting all key-value pairs in arbitrary order. The @@ -106,27 +99,26 @@ mod tests { use std::io; use assert_matches::assert_matches; + use aya_obj::generated::{ + bpf_attr, bpf_cmd, + bpf_map_type::{BPF_MAP_TYPE_HASH, BPF_MAP_TYPE_LRU_HASH}, + }; use libc::{EFAULT, ENOENT}; use super::*; use crate::{ - generated::{ - bpf_attr, bpf_cmd, - bpf_map_type::{BPF_MAP_TYPE_HASH, BPF_MAP_TYPE_LRU_HASH}, - }, maps::{ - test_utils::{self, new_map}, Map, + test_utils::{self, new_map}, }, - obj, - sys::{override_syscall, SysResult, Syscall}, + sys::{SysResult, Syscall, SyscallError, override_syscall}, }; - fn new_obj_map() -> obj::Map { + fn new_obj_map() -> aya_obj::Map { test_utils::new_obj_map::(BPF_MAP_TYPE_HASH) } - fn sys_error(value: i32) -> SysResult { + fn sys_error(value: i32) -> SysResult { Err((-1, io::Error::from_raw_os_error(value))) } @@ -180,23 +172,23 @@ mod tests { #[test] fn test_new_ok() { let map = new_map(new_obj_map()); - assert!(HashMap::<_, u32, u32>::new(&map).is_ok()); + let _: HashMap<_, u32, u32> = HashMap::new(&map).unwrap(); } #[test] fn test_try_from_ok() { let map = new_map(new_obj_map()); let map = Map::HashMap(map); - assert!(HashMap::<_, u32, u32>::try_from(&map).is_ok()) + let _: HashMap<_, u32, u32> = map.try_into().unwrap(); } #[test] fn test_try_from_ok_lru() { let map_data = || new_map(test_utils::new_obj_map::(BPF_MAP_TYPE_LRU_HASH)); let map = Map::HashMap(map_data()); - assert!(HashMap::<_, u32, u32>::try_from(&map).is_ok()); + let _: HashMap<_, u32, u32> = map.try_into().unwrap(); let map = Map::LruHashMap(map_data()); - assert!(HashMap::<_, u32, u32>::try_from(&map).is_ok()) + let _: HashMap<_, u32, u32> = map.try_into().unwrap(); } #[test] @@ -221,11 +213,11 @@ mod tests { Syscall::Ebpf { cmd: bpf_cmd::BPF_MAP_UPDATE_ELEM, .. - } => Ok(1), + } => Ok(0), _ => sys_error(EFAULT), }); - assert!(hm.insert(1, 42, 0).is_ok()); + assert_matches!(hm.insert(1, 42, 0), Ok(())); } #[test] @@ -237,11 +229,11 @@ mod tests { Syscall::Ebpf { cmd: bpf_cmd::BPF_MAP_UPDATE_ELEM, .. - } => Ok(1), + } => Ok(0), _ => sys_error(EFAULT), }); - assert!(hm.insert(Box::new(1), Box::new(42), 0).is_ok()); + assert_matches!(hm.insert(Box::new(1), Box::new(42), 0), Ok(())); } #[test] @@ -266,11 +258,11 @@ mod tests { Syscall::Ebpf { cmd: bpf_cmd::BPF_MAP_DELETE_ELEM, .. - } => Ok(1), + } => Ok(0), _ => sys_error(EFAULT), }); - assert!(hm.remove(&1).is_ok()); + assert_matches!(hm.remove(&1), Ok(())); } #[test] @@ -307,14 +299,18 @@ mod tests { } } - fn set_next_key(attr: &bpf_attr, next: T) { - let key = unsafe { attr.__bindgen_anon_2.__bindgen_anon_1.next_key } as *const T as *mut T; + fn set_next_key(attr: &bpf_attr, next: T) -> SysResult { + let key = + (unsafe { attr.__bindgen_anon_2.__bindgen_anon_1.next_key } as *const T).cast_mut(); unsafe { *key = next }; + Ok(0) } - fn set_ret(attr: &bpf_attr, ret: T) { - let value = unsafe { attr.__bindgen_anon_2.__bindgen_anon_1.value } as *const T as *mut T; + fn set_ret(attr: &bpf_attr, ret: T) -> SysResult { + let value = + (unsafe { attr.__bindgen_anon_2.__bindgen_anon_1.value } as *const T).cast_mut(); unsafe { *value = ret }; + Ok(0) } #[test] @@ -332,28 +328,24 @@ mod tests { assert_matches!(keys, Ok(ks) if ks.is_empty()) } - fn get_next_key(attr: &bpf_attr) -> SysResult { + fn get_next_key(attr: &bpf_attr) -> SysResult { match bpf_key(attr) { None => set_next_key(attr, 10), Some(10) => set_next_key(attr, 20), Some(20) => set_next_key(attr, 30), - Some(30) => return sys_error(ENOENT), - Some(_) => return sys_error(EFAULT), - }; - - Ok(1) + Some(30) => sys_error(ENOENT), + Some(_) => sys_error(EFAULT), + } } - fn lookup_elem(attr: &bpf_attr) -> SysResult { + fn lookup_elem(attr: &bpf_attr) -> SysResult { match bpf_key(attr) { Some(10) => set_ret(attr, 100), Some(20) => set_ret(attr, 200), Some(30) => set_ret(attr, 300), - Some(_) => return sys_error(ENOENT), - None => return sys_error(EFAULT), - }; - - Ok(1) + Some(_) => sys_error(ENOENT), + None => sys_error(EFAULT), + } } #[test] @@ -381,15 +373,11 @@ mod tests { Syscall::Ebpf { cmd: bpf_cmd::BPF_MAP_GET_NEXT_KEY, attr, - } => { - match bpf_key(attr) { - None => set_next_key(attr, 10), - Some(10) => set_next_key(attr, 20), - Some(_) => return sys_error(EFAULT), - }; - - Ok(1) - } + } => match bpf_key(attr) { + None => set_next_key(attr, 10), + Some(10) => set_next_key(attr, 20), + Some(_) => sys_error(EFAULT), + }, _ => sys_error(EFAULT), }); let hm = HashMap::<_, u32, u32>::new(&map).unwrap(); @@ -437,17 +425,13 @@ mod tests { Syscall::Ebpf { cmd: bpf_cmd::BPF_MAP_LOOKUP_ELEM, attr, - } => { - match bpf_key(attr) { - Some(10) => set_ret(attr, 100), - Some(20) => return sys_error(ENOENT), - Some(30) => set_ret(attr, 300), - Some(_) => return sys_error(ENOENT), - None => return sys_error(EFAULT), - }; - - Ok(1) - } + } => match bpf_key(attr) { + Some(10) => set_ret(attr, 100), + Some(20) => sys_error(ENOENT), + Some(30) => set_ret(attr, 300), + Some(_) => sys_error(ENOENT), + None => sys_error(EFAULT), + }, _ => sys_error(EFAULT), }); let hm = HashMap::<_, u32, u32>::new(&map).unwrap(); @@ -463,17 +447,13 @@ mod tests { Syscall::Ebpf { cmd: bpf_cmd::BPF_MAP_GET_NEXT_KEY, attr, - } => { - match bpf_key(attr) { - None => set_next_key(attr, 10), - Some(10) => set_next_key(attr, 20), - Some(20) => return sys_error(EFAULT), - Some(30) => return sys_error(ENOENT), - Some(i) => panic!("invalid key {}", i), - }; - - Ok(1) - } + } => match bpf_key(attr) { + None => set_next_key(attr, 10), + Some(10) => set_next_key(attr, 20), + Some(20) => sys_error(EFAULT), + Some(30) => sys_error(ENOENT), + Some(i) => panic!("invalid key {i}"), + }, Syscall::Ebpf { cmd: bpf_cmd::BPF_MAP_LOOKUP_ELEM, attr, @@ -506,17 +486,13 @@ mod tests { Syscall::Ebpf { cmd: bpf_cmd::BPF_MAP_LOOKUP_ELEM, attr, - } => { - match bpf_key(attr) { - Some(10) => set_ret(attr, 100), - Some(20) => return sys_error(EFAULT), - Some(30) => set_ret(attr, 300), - Some(_) => return sys_error(ENOENT), - None => return sys_error(EFAULT), - }; - - Ok(1) - } + } => match bpf_key(attr) { + Some(10) => set_ret(attr, 100), + Some(20) => sys_error(EFAULT), + Some(30) => set_ret(attr, 300), + Some(_) => sys_error(ENOENT), + None => sys_error(EFAULT), + }, _ => sys_error(EFAULT), }); let hm = HashMap::<_, u32, u32>::new(&map).unwrap(); diff --git a/aya/src/maps/hash_map/mod.rs b/aya/src/maps/hash_map/mod.rs index 33f5292b..59dc65f5 100644 --- a/aya/src/maps/hash_map/mod.rs +++ b/aya/src/maps/hash_map/mod.rs @@ -2,12 +2,12 @@ use std::os::fd::AsFd as _; use crate::{ - maps::MapError, - sys::{bpf_map_delete_elem, bpf_map_update_elem, SyscallError}, Pod, + maps::MapError, + sys::{SyscallError, bpf_map_delete_elem, bpf_map_lookup_elem, bpf_map_update_elem}, }; -#[allow(clippy::module_inception)] +#[expect(clippy::module_inception)] mod hash_map; mod per_cpu_hash_map; @@ -16,6 +16,15 @@ pub use per_cpu_hash_map::*; use super::MapData; +pub(crate) fn get(map: &MapData, key: &K, flags: u64) -> Result { + let fd = map.fd().as_fd(); + let value = bpf_map_lookup_elem(fd, key, flags).map_err(|io_error| SyscallError { + call: "bpf_map_lookup_elem", + io_error, + })?; + value.ok_or(MapError::KeyNotFound) +} + pub(crate) fn insert( map: &MapData, key: &K, @@ -23,23 +32,20 @@ pub(crate) fn insert( flags: u64, ) -> Result<(), MapError> { let fd = map.fd().as_fd(); - bpf_map_update_elem(fd, Some(key), value, flags).map_err(|(_, io_error)| SyscallError { - call: "bpf_map_update_elem", - io_error, - })?; - - Ok(()) + bpf_map_update_elem(fd, Some(key), value, flags) + .map_err(|io_error| SyscallError { + call: "bpf_map_update_elem", + io_error, + }) + .map_err(Into::into) } pub(crate) fn remove(map: &MapData, key: &K) -> Result<(), MapError> { let fd = map.fd().as_fd(); bpf_map_delete_elem(fd, key) - .map(|_| ()) - .map_err(|(_, io_error)| { - SyscallError { - call: "bpf_map_delete_elem", - io_error, - } - .into() + .map_err(|io_error| SyscallError { + call: "bpf_map_delete_elem", + io_error, }) + .map_err(Into::into) } diff --git a/aya/src/maps/hash_map/per_cpu_hash_map.rs b/aya/src/maps/hash_map/per_cpu_hash_map.rs index 2dd8bcd7..fcc01c18 100644 --- a/aya/src/maps/hash_map/per_cpu_hash_map.rs +++ b/aya/src/maps/hash_map/per_cpu_hash_map.rs @@ -6,11 +6,11 @@ use std::{ }; use crate::{ + Pod, maps::{ - check_kv_size, hash_map, IterableMap, MapData, MapError, MapIter, MapKeys, PerCpuValues, + IterableMap, MapData, MapError, MapIter, MapKeys, PerCpuValues, check_kv_size, hash_map, }, - sys::{bpf_map_lookup_elem_per_cpu, bpf_map_update_elem_per_cpu, SyscallError}, - Pod, + sys::{SyscallError, bpf_map_lookup_elem_per_cpu, bpf_map_update_elem_per_cpu}, }; /// Similar to [`HashMap`](crate::maps::HashMap) but each CPU holds a separate value for a given key. Typically used to @@ -64,7 +64,7 @@ impl, K: Pod, V: Pod> PerCpuHashMap { pub fn get(&self, key: &K, flags: u64) -> Result, MapError> { let fd = self.inner.borrow().fd().as_fd(); let values = - bpf_map_lookup_elem_per_cpu(fd, key, flags).map_err(|(_, io_error)| SyscallError { + bpf_map_lookup_elem_per_cpu(fd, key, flags).map_err(|io_error| SyscallError { call: "bpf_map_lookup_elem", io_error, })?; @@ -105,10 +105,11 @@ impl, K: Pod, V: Pod> PerCpuHashMap { /// /// const RETRIES: u8 = 1; /// + /// let nr_cpus = nr_cpus().map_err(|(_, error)| error)?; /// let mut hm = PerCpuHashMap::<_, u8, u32>::try_from(bpf.map_mut("PER_CPU_STORAGE").unwrap())?; /// hm.insert( /// RETRIES, - /// PerCpuValues::try_from(vec![3u32; nr_cpus()?])?, + /// PerCpuValues::try_from(vec![3u32; nr_cpus])?, /// 0, /// )?; /// # Ok::<(), Error>(()) @@ -120,14 +121,12 @@ impl, K: Pod, V: Pod> PerCpuHashMap { flags: u64, ) -> Result<(), MapError> { let fd = self.inner.borrow_mut().fd().as_fd(); - bpf_map_update_elem_per_cpu(fd, key.borrow(), &values, flags).map_err( - |(_, io_error)| SyscallError { + bpf_map_update_elem_per_cpu(fd, key.borrow(), &values, flags) + .map_err(|io_error| SyscallError { call: "bpf_map_update_elem", io_error, - }, - )?; - - Ok(()) + }) + .map_err(Into::into) } /// Removes a key from the map. @@ -150,26 +149,49 @@ impl, K: Pod, V: Pod> IterableMap> #[cfg(test)] mod tests { + use std::io; + + use assert_matches::assert_matches; + use aya_obj::generated::bpf_map_type::{ + BPF_MAP_TYPE_LRU_PERCPU_HASH, BPF_MAP_TYPE_PERCPU_HASH, + }; + use libc::ENOENT; + use super::*; use crate::{ - generated::bpf_map_type::{BPF_MAP_TYPE_LRU_PERCPU_HASH, BPF_MAP_TYPE_PERCPU_HASH}, - maps::{test_utils, Map}, + maps::{Map, test_utils}, + sys::{SysResult, override_syscall}, }; + fn sys_error(value: i32) -> SysResult { + Err((-1, io::Error::from_raw_os_error(value))) + } + #[test] fn test_try_from_ok() { let map = Map::PerCpuHashMap(test_utils::new_map(test_utils::new_obj_map::( BPF_MAP_TYPE_PERCPU_HASH, ))); - assert!(PerCpuHashMap::<_, u32, u32>::try_from(&map).is_ok()) + let _: PerCpuHashMap<_, u32, u32> = map.try_into().unwrap(); } #[test] fn test_try_from_ok_lru() { let map_data = || test_utils::new_map(test_utils::new_obj_map::(BPF_MAP_TYPE_LRU_PERCPU_HASH)); let map = Map::PerCpuHashMap(map_data()); - assert!(PerCpuHashMap::<_, u32, u32>::try_from(&map).is_ok()); + let _: PerCpuHashMap<_, u32, u32> = map.try_into().unwrap(); let map = Map::PerCpuLruHashMap(map_data()); - assert!(PerCpuHashMap::<_, u32, u32>::try_from(&map).is_ok()) + let _: PerCpuHashMap<_, u32, u32> = map.try_into().unwrap(); + } + #[test] + fn test_get_not_found() { + let map_data = + || test_utils::new_map(test_utils::new_obj_map::(BPF_MAP_TYPE_LRU_PERCPU_HASH)); + let map = Map::PerCpuHashMap(map_data()); + let map = PerCpuHashMap::<_, u32, u32>::try_from(&map).unwrap(); + + override_syscall(|_| sys_error(ENOENT)); + + assert_matches!(map.get(&1, 0), Err(MapError::KeyNotFound)); } } diff --git a/aya/src/maps/info.rs b/aya/src/maps/info.rs new file mode 100644 index 00000000..6a4bba13 --- /dev/null +++ b/aya/src/maps/info.rs @@ -0,0 +1,400 @@ +//! Metadata information about an eBPF map. + +use std::{ + ffi::CString, + os::fd::{AsFd as _, BorrowedFd}, + path::Path, +}; + +use aya_obj::generated::{bpf_map_info, bpf_map_type}; + +use super::{MapError, MapFd}; +use crate::{ + FEATURES, + sys::{ + SyscallError, bpf_get_object, bpf_map_get_fd_by_id, bpf_map_get_info_by_fd, iter_map_ids, + }, + util::bytes_of_bpf_name, +}; + +/// Provides Provides metadata information about a loaded eBPF map. +/// +/// Introduced in kernel v4.13. +#[doc(alias = "bpf_map_info")] +#[derive(Debug)] +pub struct MapInfo(pub(crate) bpf_map_info); + +impl MapInfo { + pub(crate) fn new_from_fd(fd: BorrowedFd<'_>) -> Result { + let info = bpf_map_get_info_by_fd(fd.as_fd())?; + Ok(Self(info)) + } + + /// Loads map info from a map ID. + /// + /// Uses kernel v4.13 features. + pub fn from_id(id: u32) -> Result { + bpf_map_get_fd_by_id(id) + .map_err(MapError::from) + .and_then(|fd| Self::new_from_fd(fd.as_fd())) + } + + /// The type of map. + /// + /// Introduced in kernel v4.13. + pub fn map_type(&self) -> Result { + bpf_map_type::try_from(self.0.type_) + .unwrap_or(bpf_map_type::__MAX_BPF_MAP_TYPE) + .try_into() + } + + /// The unique ID for this map. + /// + /// Introduced in kernel v4.13. + pub fn id(&self) -> u32 { + self.0.id + } + + /// The key size for this map in bytes. + /// + /// Introduced in kernel v4.13. + pub fn key_size(&self) -> u32 { + self.0.key_size + } + + /// The value size for this map in bytes. + /// + /// Introduced in kernel v4.13. + pub fn value_size(&self) -> u32 { + self.0.value_size + } + + /// The maximum number of entries in this map. + /// + /// Introduced in kernel v4.13. + pub fn max_entries(&self) -> u32 { + self.0.max_entries + } + + /// The flags used in loading this map. + /// + /// Introduced in kernel v4.13. + pub fn map_flags(&self) -> u32 { + self.0.map_flags + } + + /// The name of the map, limited to 16 bytes. + /// + /// Introduced in kernel v4.15. + pub fn name(&self) -> &[u8] { + bytes_of_bpf_name(&self.0.name) + } + + /// The name of the map as a &str. + /// + /// `None` is returned if the name was not valid unicode or if field is not available. + /// + /// Introduced in kernel v4.15. + pub fn name_as_str(&self) -> Option<&str> { + let name = std::str::from_utf8(self.name()).ok()?; + (FEATURES.bpf_name() || !name.is_empty()).then_some(name) + } + + /// Returns a file descriptor referencing the map. + /// + /// The returned file descriptor can be closed at any time and doing so does + /// not influence the life cycle of the map. + /// + /// Uses kernel v4.13 features. + pub fn fd(&self) -> Result { + let Self(info) = self; + let fd = bpf_map_get_fd_by_id(info.id)?; + Ok(MapFd::from_fd(fd)) + } + + /// Loads a map from a pinned path in bpffs. + /// + /// Uses kernel v4.4 and v4.13 features. + pub fn from_pin>(path: P) -> Result { + use std::os::unix::ffi::OsStrExt as _; + + // TODO: avoid this unwrap by adding a new error variant. + let path_string = CString::new(path.as_ref().as_os_str().as_bytes()).unwrap(); + let fd = bpf_get_object(&path_string).map_err(|io_error| SyscallError { + call: "BPF_OBJ_GET", + io_error, + })?; + + Self::new_from_fd(fd.as_fd()) + } +} + +/// Returns an iterator of [`MapInfo`] over all eBPF maps on the host. +/// +/// Unlike [`Ebpf::maps`](crate::Ebpf::maps), this includes all maps on the host system, not +/// just those tied to a specific [`crate::Ebpf`] instance. +/// +/// Uses kernel v4.13 features. +/// +/// # Example +/// ``` +/// # use aya::maps::loaded_maps; +/// # +/// for m in loaded_maps() { +/// match m { +/// Ok(map) => println!("{:?}", map.name_as_str()), +/// Err(e) => println!("error iterating maps: {:?}", e), +/// } +/// } +/// ``` +/// +/// # Errors +/// +/// Returns [`MapError::SyscallError`] if any of the syscalls required to either get +/// next map id, get the map fd, or the [`MapInfo`] fail. +/// +/// In cases where iteration can't be performed, for example the caller does not have the necessary +/// privileges, a single item will be yielded containing the error that occurred. +pub fn loaded_maps() -> impl Iterator> { + iter_map_ids().map(|id| { + let id = id?; + MapInfo::from_id(id) + }) +} + +/// The type of eBPF map. +#[non_exhaustive] +#[doc(alias = "bpf_map_type")] +#[derive(Copy, Clone, Debug, PartialEq)] +pub enum MapType { + /// An unspecified program type. + Unspecified = bpf_map_type::BPF_MAP_TYPE_UNSPEC as isize, + /// A Hash map type. See [`HashMap`](super::hash_map::HashMap) for the map implementation. + /// + /// Introduced in kernel v3.19. + #[doc(alias = "BPF_MAP_TYPE_HASH")] + Hash = bpf_map_type::BPF_MAP_TYPE_HASH as isize, + /// An Array map type. See [`Array`](super::array::Array) for the map implementation. + /// + /// Introduced in kernel v3.19. + #[doc(alias = "BPF_MAP_TYPE_ARRAY")] + Array = bpf_map_type::BPF_MAP_TYPE_ARRAY as isize, + /// A Program Array map type. See [`ProgramArray`](super::array::ProgramArray) for the map + /// implementation. + /// + /// Introduced in kernel v4.2. + #[doc(alias = "BPF_MAP_TYPE_PROG_ARRAY")] + ProgramArray = bpf_map_type::BPF_MAP_TYPE_PROG_ARRAY as isize, + /// A Perf Event Array map type. See [`PerfEventArray`](super::perf::PerfEventArray) for the map + /// implementation. + /// + /// Introduced in kernel v4.3. + #[doc(alias = "BPF_MAP_TYPE_PERF_EVENT_ARRAY")] + PerfEventArray = bpf_map_type::BPF_MAP_TYPE_PERF_EVENT_ARRAY as isize, + /// A per-CPU Hash map type. See [`PerCpuHashMap`](super::hash_map::PerCpuHashMap) for the map + /// implementation. + /// + /// Introduced in kernel v4.6. + #[doc(alias = "BPF_MAP_TYPE_PERCPU_HASH")] + PerCpuHash = bpf_map_type::BPF_MAP_TYPE_PERCPU_HASH as isize, + /// A per-CPU Array map type. See [`PerCpuArray`](super::array::PerCpuArray) for the map + /// implementation. + /// + /// Introduced in kernel v4.6. + #[doc(alias = "BPF_MAP_TYPE_PERCPU_ARRAY")] + PerCpuArray = bpf_map_type::BPF_MAP_TYPE_PERCPU_ARRAY as isize, + /// A Stack Trace map type. See [`StackTraceMap`](super::stack_trace::StackTraceMap) for the map + /// implementation. + /// + /// Introduced in kernel v4.6. + #[doc(alias = "BPF_MAP_TYPE_STACK_TRACE")] + StackTrace = bpf_map_type::BPF_MAP_TYPE_STACK_TRACE as isize, + /// A cGroup Array map type. + /// + /// Introduced in kernel v4.8. + #[doc(alias = "BPF_MAP_TYPE_CGROUP_ARRAY")] + CgroupArray = bpf_map_type::BPF_MAP_TYPE_CGROUP_ARRAY as isize, + /// A Least Recently Used (LRU) Hash map type. See [`HashMap`](super::hash_map::HashMap) for + /// the map implementation. + /// + /// Introduced in kernel v4.10. + #[doc(alias = "BPF_MAP_TYPE_LRU_HASH")] + LruHash = bpf_map_type::BPF_MAP_TYPE_LRU_HASH as isize, + /// A Least Recently Used (LRU) per-CPU Hash map type. See + /// [`PerCpuHashMap`](super::hash_map::PerCpuHashMap) for the map implementation. + /// + /// Introduced in kernel v4.10. + #[doc(alias = "BPF_MAP_TYPE_LRU_PERCPU_HASH")] + LruPerCpuHash = bpf_map_type::BPF_MAP_TYPE_LRU_PERCPU_HASH as isize, + /// A Longest Prefix Match (LPM) Trie map type. See [`LpmTrie`](super::lpm_trie::LpmTrie) for + /// the map implementation. + /// + /// Introduced in kernel v4.11. + #[doc(alias = "BPF_MAP_TYPE_LPM_TRIE")] + LpmTrie = bpf_map_type::BPF_MAP_TYPE_LPM_TRIE as isize, + /// An Array of Maps map type. + /// + /// Introduced in kernel v4.12. + #[doc(alias = "BPF_MAP_TYPE_ARRAY_OF_MAPS")] + ArrayOfMaps = bpf_map_type::BPF_MAP_TYPE_ARRAY_OF_MAPS as isize, + /// A Hash of Maps map type. + /// + /// Introduced in kernel v4.12. + #[doc(alias = "BPF_MAP_TYPE_HASH_OF_MAPS")] + HashOfMaps = bpf_map_type::BPF_MAP_TYPE_HASH_OF_MAPS as isize, + /// A Device Map type. See [`DevMap`](super::xdp::DevMap) for the map implementation. + /// + /// Introduced in kernel v4.14. + #[doc(alias = "BPF_MAP_TYPE_DEVMAP")] + DevMap = bpf_map_type::BPF_MAP_TYPE_DEVMAP as isize, + /// A Socket Map type. See [`SockMap`](super::sock::SockMap) for the map implementation. + /// + /// Introduced in kernel v4.14. + #[doc(alias = "BPF_MAP_TYPE_SOCKMAP")] + SockMap = bpf_map_type::BPF_MAP_TYPE_SOCKMAP as isize, + /// A CPU Map type. See [`CpuMap`](super::xdp::CpuMap) for the map implementation. + /// + /// Introduced in kernel v4.15. + #[doc(alias = "BPF_MAP_TYPE_CPUMAP")] + CpuMap = bpf_map_type::BPF_MAP_TYPE_CPUMAP as isize, + /// An XDP Socket Map type. See [`XskMap`](super::xdp::XskMap) for the map implementation. + /// + /// Introduced in kernel v4.18. + #[doc(alias = "BPF_MAP_TYPE_XSKMAP")] + XskMap = bpf_map_type::BPF_MAP_TYPE_XSKMAP as isize, + /// A Socket Hash map type. See [`SockHash`](super::sock::SockHash) for the map implementation. + /// + /// Introduced in kernel v4.18. + #[doc(alias = "BPF_MAP_TYPE_SOCKHASH")] + SockHash = bpf_map_type::BPF_MAP_TYPE_SOCKHASH as isize, + /// A cGroup Storage map type. + /// + /// Introduced in kernel v4.19. + // #[deprecated] + #[doc(alias = "BPF_MAP_TYPE_CGROUP_STORAGE")] + #[doc(alias = "BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED")] + CgroupStorage = bpf_map_type::BPF_MAP_TYPE_CGROUP_STORAGE as isize, + /// A Reuseport Socket Array map type. + /// + /// Introduced in kernel v4.19. + #[doc(alias = "BPF_MAP_TYPE_REUSEPORT_SOCKARRAY")] + ReuseportSockArray = bpf_map_type::BPF_MAP_TYPE_REUSEPORT_SOCKARRAY as isize, + /// A per-CPU cGroup Storage map type. + /// + /// Introduced in kernel v4.20. + #[doc(alias = "BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE")] + #[doc(alias = "BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED")] + PerCpuCgroupStorage = bpf_map_type::BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE as isize, + /// A Queue map type. See [`Queue`](super::queue::Queue) for the map implementation. + /// + /// Introduced in kernel v4.20. + #[doc(alias = "BPF_MAP_TYPE_QUEUE")] + Queue = bpf_map_type::BPF_MAP_TYPE_QUEUE as isize, + /// A Stack map type. See [`Stack`](super::stack::Stack) for the map implementation. + /// + /// Introduced in kernel v4.20. + #[doc(alias = "BPF_MAP_TYPE_STACK")] + Stack = bpf_map_type::BPF_MAP_TYPE_STACK as isize, + /// A Socket-local Storage map type. + /// + /// Introduced in kernel v5.2. + #[doc(alias = "BPF_MAP_TYPE_SK_STORAGE")] + SkStorage = bpf_map_type::BPF_MAP_TYPE_SK_STORAGE as isize, + /// A Device Hash Map type. See [`DevMapHash`](super::xdp::DevMapHash) for the map + /// implementation. + /// + /// Introduced in kernel v5.4. + #[doc(alias = "BPF_MAP_TYPE_DEVMAP_HASH")] + DevMapHash = bpf_map_type::BPF_MAP_TYPE_DEVMAP_HASH as isize, + /// A Struct Ops map type. + /// + /// Introduced in kernel v5.6. + #[doc(alias = "BPF_MAP_TYPE_STRUCT_OPS")] + StructOps = bpf_map_type::BPF_MAP_TYPE_STRUCT_OPS as isize, + /// A Ring Buffer map type. See [`RingBuf`](super::ring_buf::RingBuf) for the map + /// implementation. + /// + /// Introduced in kernel v5.8. + #[doc(alias = "BPF_MAP_TYPE_RINGBUF")] + RingBuf = bpf_map_type::BPF_MAP_TYPE_RINGBUF as isize, + /// An Inode Storage map type. + /// + /// Introduced in kernel v5.10. + #[doc(alias = "BPF_MAP_TYPE_INODE_STORAGE")] + InodeStorage = bpf_map_type::BPF_MAP_TYPE_INODE_STORAGE as isize, + /// A Task Storage map type. + /// + /// Introduced in kernel v5.11. + #[doc(alias = "BPF_MAP_TYPE_TASK_STORAGE")] + TaskStorage = bpf_map_type::BPF_MAP_TYPE_TASK_STORAGE as isize, + /// A Bloom Filter map type. See [`BloomFilter`](super::bloom_filter::BloomFilter) for the map + /// implementation. + /// + /// Introduced in kernel v5.16. + #[doc(alias = "BPF_MAP_TYPE_BLOOM_FILTER")] + BloomFilter = bpf_map_type::BPF_MAP_TYPE_BLOOM_FILTER as isize, + /// A User Ring Buffer map type. + /// + /// Introduced in kernel v6.1. + #[doc(alias = "BPF_MAP_TYPE_USER_RINGBUF")] + UserRingBuf = bpf_map_type::BPF_MAP_TYPE_USER_RINGBUF as isize, + /// A cGroup Storage map type. + /// + /// Introduced in kernel v6.2. + #[doc(alias = "BPF_MAP_TYPE_CGRP_STORAGE")] + CgrpStorage = bpf_map_type::BPF_MAP_TYPE_CGRP_STORAGE as isize, + /// An Arena map type. + /// + /// Introduced in kernel v6.9. + #[doc(alias = "BPF_MAP_TYPE_ARENA")] + Arena = bpf_map_type::BPF_MAP_TYPE_ARENA as isize, +} + +impl TryFrom for MapType { + type Error = MapError; + + fn try_from(map_type: bpf_map_type) -> Result { + use bpf_map_type::*; + Ok(match map_type { + BPF_MAP_TYPE_UNSPEC => Self::Unspecified, + BPF_MAP_TYPE_HASH => Self::Hash, + BPF_MAP_TYPE_ARRAY => Self::Array, + BPF_MAP_TYPE_PROG_ARRAY => Self::ProgramArray, + BPF_MAP_TYPE_PERF_EVENT_ARRAY => Self::PerfEventArray, + BPF_MAP_TYPE_PERCPU_HASH => Self::PerCpuHash, + BPF_MAP_TYPE_PERCPU_ARRAY => Self::PerCpuArray, + BPF_MAP_TYPE_STACK_TRACE => Self::StackTrace, + BPF_MAP_TYPE_CGROUP_ARRAY => Self::CgroupArray, + BPF_MAP_TYPE_LRU_HASH => Self::LruHash, + BPF_MAP_TYPE_LRU_PERCPU_HASH => Self::LruPerCpuHash, + BPF_MAP_TYPE_LPM_TRIE => Self::LpmTrie, + BPF_MAP_TYPE_ARRAY_OF_MAPS => Self::ArrayOfMaps, + BPF_MAP_TYPE_HASH_OF_MAPS => Self::HashOfMaps, + BPF_MAP_TYPE_DEVMAP => Self::DevMap, + BPF_MAP_TYPE_SOCKMAP => Self::SockMap, + BPF_MAP_TYPE_CPUMAP => Self::CpuMap, + BPF_MAP_TYPE_XSKMAP => Self::XskMap, + BPF_MAP_TYPE_SOCKHASH => Self::SockHash, + BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED => Self::CgroupStorage, + BPF_MAP_TYPE_REUSEPORT_SOCKARRAY => Self::ReuseportSockArray, + BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED => Self::PerCpuCgroupStorage, + BPF_MAP_TYPE_QUEUE => Self::Queue, + BPF_MAP_TYPE_STACK => Self::Stack, + BPF_MAP_TYPE_SK_STORAGE => Self::SkStorage, + BPF_MAP_TYPE_DEVMAP_HASH => Self::DevMapHash, + BPF_MAP_TYPE_STRUCT_OPS => Self::StructOps, + BPF_MAP_TYPE_RINGBUF => Self::RingBuf, + BPF_MAP_TYPE_INODE_STORAGE => Self::InodeStorage, + BPF_MAP_TYPE_TASK_STORAGE => Self::TaskStorage, + BPF_MAP_TYPE_BLOOM_FILTER => Self::BloomFilter, + BPF_MAP_TYPE_USER_RINGBUF => Self::UserRingBuf, + BPF_MAP_TYPE_CGRP_STORAGE => Self::CgrpStorage, + BPF_MAP_TYPE_ARENA => Self::Arena, + __MAX_BPF_MAP_TYPE => { + return Err(MapError::InvalidMapType { + map_type: map_type as u32, + }); + } + }) + } +} diff --git a/aya/src/maps/lpm_trie.rs b/aya/src/maps/lpm_trie.rs index e2271908..828f51be 100644 --- a/aya/src/maps/lpm_trie.rs +++ b/aya/src/maps/lpm_trie.rs @@ -1,14 +1,13 @@ //! A LPM Trie. + use std::{ borrow::{Borrow, BorrowMut}, marker::PhantomData, - os::fd::AsFd as _, }; use crate::{ - maps::{check_kv_size, IterableMap, MapData, MapError, MapIter, MapKeys}, - sys::{bpf_map_delete_elem, bpf_map_lookup_elem, bpf_map_update_elem, SyscallError}, Pod, + maps::{IterableMap, MapData, MapError, MapIter, MapKeys, check_kv_size, hash_map}, }; /// A Longest Prefix Match Trie. @@ -44,7 +43,6 @@ use crate::{ /// assert_eq!(value, 2); /// # Ok::<(), aya::EbpfError>(()) /// ``` - #[doc(alias = "BPF_MAP_TYPE_LPM_TRIE")] #[derive(Debug)] pub struct LpmTrie { @@ -64,8 +62,9 @@ pub struct LpmTrie { /// let ipaddr = Ipv4Addr::new(8,8,8,8); /// let key = Key::new(16, u32::from(ipaddr).to_be()); /// ``` -#[repr(packed)] -pub struct Key { +#[derive(Clone, Copy)] +#[repr(C, packed)] +pub struct Key { prefix_len: u32, data: K, } @@ -102,14 +101,6 @@ impl Key { } } -impl Copy for Key {} - -impl Clone for Key { - fn clone(&self) -> Self { - *self - } -} - // A Pod impl is required as Key struct is a key for a map. unsafe impl Pod for Key {} @@ -127,12 +118,7 @@ impl, K: Pod, V: Pod> LpmTrie { /// Returns a copy of the value associated with the longest prefix matching key in the LpmTrie. pub fn get(&self, key: &Key, flags: u64) -> Result { - let fd = self.inner.borrow().fd().as_fd(); - let value = bpf_map_lookup_elem(fd, key, flags).map_err(|(_, io_error)| SyscallError { - call: "bpf_map_lookup_elem", - io_error, - })?; - value.ok_or(MapError::KeyNotFound) + hash_map::get(self.inner.borrow(), key, flags) } /// An iterator visiting all key-value pairs. The @@ -156,31 +142,14 @@ impl, K: Pod, V: Pod> LpmTrie { value: impl Borrow, flags: u64, ) -> Result<(), MapError> { - let fd = self.inner.borrow().fd().as_fd(); - bpf_map_update_elem(fd, Some(key), value.borrow(), flags).map_err(|(_, io_error)| { - SyscallError { - call: "bpf_map_update_elem", - io_error, - } - })?; - - Ok(()) + hash_map::insert(self.inner.borrow_mut(), key, value.borrow(), flags) } /// Removes an element from the map. /// /// Both the prefix and data must match exactly - this method does not do a longest prefix match. pub fn remove(&mut self, key: &Key) -> Result<(), MapError> { - let fd = self.inner.borrow().fd().as_fd(); - bpf_map_delete_elem(fd, key) - .map(|_| ()) - .map_err(|(_, io_error)| { - SyscallError { - call: "bpf_map_delete_elem", - io_error, - } - .into() - }) + hash_map::remove(self.inner.borrow_mut(), key) } } @@ -199,27 +168,26 @@ mod tests { use std::{io, net::Ipv4Addr}; use assert_matches::assert_matches; + use aya_obj::generated::{ + bpf_cmd, + bpf_map_type::{BPF_MAP_TYPE_ARRAY, BPF_MAP_TYPE_LPM_TRIE}, + }; use libc::{EFAULT, ENOENT}; use super::*; use crate::{ - generated::{ - bpf_cmd, - bpf_map_type::{BPF_MAP_TYPE_LPM_TRIE, BPF_MAP_TYPE_PERF_EVENT_ARRAY}, - }, maps::{ - test_utils::{self, new_map}, Map, + test_utils::{self, new_map}, }, - obj, - sys::{override_syscall, SysResult, Syscall}, + sys::{SysResult, Syscall, SyscallError, override_syscall}, }; - fn new_obj_map() -> obj::Map { + fn new_obj_map() -> aya_obj::Map { test_utils::new_obj_map::>(BPF_MAP_TYPE_LPM_TRIE) } - fn sys_error(value: i32) -> SysResult { + fn sys_error(value: i32) -> SysResult { Err((-1, io::Error::from_raw_os_error(value))) } @@ -249,10 +217,8 @@ mod tests { #[test] fn test_try_from_wrong_map() { - let map = new_map(test_utils::new_obj_map::( - BPF_MAP_TYPE_PERF_EVENT_ARRAY, - )); - let map = Map::PerfEventArray(map); + let map = new_map(test_utils::new_obj_map::(BPF_MAP_TYPE_ARRAY)); + let map = Map::Array(map); assert_matches!( LpmTrie::<_, u32, u32>::try_from(&map), @@ -264,7 +230,7 @@ mod tests { fn test_new_ok() { let map = new_map(new_obj_map()); - assert!(LpmTrie::<_, u32, u32>::new(&map).is_ok()); + let _: LpmTrie<_, u32, u32> = LpmTrie::new(&map).unwrap(); } #[test] @@ -272,7 +238,7 @@ mod tests { let map = new_map(new_obj_map()); let map = Map::LpmTrie(map); - assert!(LpmTrie::<_, u32, u32>::try_from(&map).is_ok()) + let _: LpmTrie<_, u32, u32> = map.try_into().unwrap(); } #[test] @@ -301,11 +267,11 @@ mod tests { Syscall::Ebpf { cmd: bpf_cmd::BPF_MAP_UPDATE_ELEM, .. - } => Ok(1), + } => Ok(0), _ => sys_error(EFAULT), }); - assert!(trie.insert(&key, 1, 0).is_ok()); + assert_matches!(trie.insert(&key, 1, 0), Ok(())); } #[test] @@ -334,11 +300,11 @@ mod tests { Syscall::Ebpf { cmd: bpf_cmd::BPF_MAP_DELETE_ELEM, .. - } => Ok(1), + } => Ok(0), _ => sys_error(EFAULT), }); - assert!(trie.remove(&key).is_ok()); + assert_matches!(trie.remove(&key), Ok(())); } #[test] diff --git a/aya/src/maps/mod.rs b/aya/src/maps/mod.rs index 82467aee..348838b3 100644 --- a/aya/src/maps/mod.rs +++ b/aya/src/maps/mod.rs @@ -50,7 +50,7 @@ use std::{ borrow::Borrow, ffi::CString, - fmt, io, + io, marker::PhantomData, mem, ops::Deref, @@ -59,31 +59,28 @@ use std::{ ptr, }; -use libc::{getrlimit, rlim_t, rlimit, RLIMIT_MEMLOCK, RLIM_INFINITY}; -use log::warn; -use obj::maps::InvalidMapTypeError; +use aya_obj::{EbpfSectionKind, InvalidTypeBinding, generated::bpf_map_type, parse_map_info}; use thiserror::Error; use crate::{ - generated::bpf_map_info, - obj::{self, parse_map_info, EbpfSectionKind}, + PinningType, Pod, pin::PinError, sys::{ - bpf_create_map, bpf_get_object, bpf_map_freeze, bpf_map_get_fd_by_id, - bpf_map_get_info_by_fd, bpf_map_get_next_key, bpf_map_update_elem_ptr, bpf_pin_object, - iter_map_ids, SyscallError, + SyscallError, bpf_create_map, bpf_get_object, bpf_map_freeze, bpf_map_get_fd_by_id, + bpf_map_get_next_key, bpf_map_update_elem_ptr, bpf_pin_object, }, - util::{bytes_of_bpf_name, nr_cpus, KernelVersion}, - PinningType, Pod, + util::nr_cpus, }; pub mod array; pub mod bloom_filter; pub mod hash_map; +mod info; pub mod lpm_trie; pub mod perf; pub mod queue; pub mod ring_buf; +pub mod sk_storage; pub mod sock; pub mod stack; pub mod stack_trace; @@ -92,13 +89,12 @@ pub mod xdp; pub use array::{Array, PerCpuArray, ProgramArray}; pub use bloom_filter::BloomFilter; pub use hash_map::{HashMap, PerCpuHashMap}; +pub use info::{MapInfo, MapType, loaded_maps}; pub use lpm_trie::LpmTrie; -#[cfg(any(feature = "async_tokio", feature = "async_std"))] -#[cfg_attr(docsrs, doc(cfg(any(feature = "async_tokio", feature = "async_std"))))] -pub use perf::AsyncPerfEventArray; pub use perf::PerfEventArray; pub use queue::Queue; pub use ring_buf::RingBuf; +pub use sk_storage::SkStorage; pub use sock::{SockHash, SockMap}; pub use stack::Stack; pub use stack_trace::StackTraceMap; @@ -122,12 +118,10 @@ pub enum MapError { }, /// Failed to create map - #[error("failed to create map `{name}` with code {code}")] + #[error("failed to create map `{name}`")] CreateError { /// Map name name: String, - /// Error code - code: i64, #[source] /// Original io::Error io_error: io::Error, @@ -172,6 +166,10 @@ pub enum MapError { #[error("the program is not loaded")] ProgramNotLoaded, + /// An IO error occurred + #[error(transparent)] + IoError(#[from] io::Error), + /// Syscall failed #[error(transparent)] SyscallError(#[from] SyscallError), @@ -191,20 +189,21 @@ pub enum MapError { ProgIdNotSupported, /// Unsupported Map type - #[error("Unsupported map type found {map_type}")] + #[error( + "type of {name} ({map_type:?}) is unsupported; see `EbpfLoader::allow_unsupported_maps`" + )] Unsupported { + /// Map name + name: String, /// The map type - map_type: u32, + map_type: bpf_map_type, }, } -// Note that this is not just derived using #[from] because InvalidMapTypeError cannot implement -// Error due the the fact that aya-obj is no_std and error_in_core is not stabilized -// (https://github.com/rust-lang/rust/issues/103765). -impl From for MapError { - fn from(e: InvalidMapTypeError) -> Self { - let InvalidMapTypeError { map_type } = e; - Self::InvalidMapType { map_type } +impl From> for MapError { + fn from(e: InvalidTypeBinding) -> Self { + let InvalidTypeBinding { value } = e; + Self::InvalidMapType { map_type: value } } } @@ -215,8 +214,7 @@ pub struct MapFd { } impl MapFd { - fn from_fd(fd: OwnedFd) -> Self { - let fd = crate::MockableFd::from_fd(fd); + fn from_fd(fd: crate::MockableFd) -> Self { Self { fd } } @@ -234,40 +232,6 @@ impl AsFd for MapFd { } } -/// Raises a warning about rlimit. Should be used only if creating a map was not -/// successful. -fn maybe_warn_rlimit() { - let mut limit = mem::MaybeUninit::::uninit(); - let ret = unsafe { getrlimit(RLIMIT_MEMLOCK, limit.as_mut_ptr()) }; - if ret == 0 { - let limit = unsafe { limit.assume_init() }; - - if limit.rlim_cur == RLIM_INFINITY { - return; - } - struct HumanSize(rlim_t); - - impl fmt::Display for HumanSize { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let &Self(size) = self; - if size < 1024 { - write!(f, "{} bytes", size) - } else if size < 1024 * 1024 { - write!(f, "{} KiB", size / 1024) - } else { - write!(f, "{} MiB", size / 1024 / 1024) - } - } - } - warn!( - "RLIMIT_MEMLOCK value is {}, not RLIM_INFINITY; if experiencing problems with creating \ - maps, try raising RLIMIT_MEMLOCK either to RLIM_INFINITY or to a higher value sufficient \ - for the size of your maps", - HumanSize(limit.rlim_cur) - ); - } -} - /// eBPF map types. #[derive(Debug)] pub enum Map { @@ -305,6 +269,8 @@ pub enum Map { SockHash(MapData), /// A [`SockMap`] map. SockMap(MapData), + /// A [`SkStorage`] map. + SkStorage(MapData), /// A [`Stack`] map. Stack(MapData), /// A [`StackTraceMap`] map. @@ -336,6 +302,7 @@ impl Map { Self::RingBuf(map) => map.obj.map_type(), Self::SockHash(map) => map.obj.map_type(), Self::SockMap(map) => map.obj.map_type(), + Self::SkStorage(map) => map.obj.map_type(), Self::Stack(map) => map.obj.map_type(), Self::StackTraceMap(map) => map.obj.map_type(), Self::Unsupported(map) => map.obj.map_type(), @@ -366,12 +333,67 @@ impl Map { Self::RingBuf(map) => map.pin(path), Self::SockHash(map) => map.pin(path), Self::SockMap(map) => map.pin(path), + Self::SkStorage(map) => map.pin(path), Self::Stack(map) => map.pin(path), Self::StackTraceMap(map) => map.pin(path), Self::Unsupported(map) => map.pin(path), Self::XskMap(map) => map.pin(path), } } + + /// Constructs a [`Map`] enum variant directly from a [`MapData`] instance. This allows creating + /// a user-space handle to a pinned BPF map. + /// + /// # Arguments + /// + /// * `map_data` - The map data obtained from [`MapData::from_pin`]. + /// + /// # Errors + /// + /// Returns an error if the map type is not supported. + pub fn from_map_data(map_data: MapData) -> Result { + let map_type = map_data.obj.map_type(); + let map = match bpf_map_type::try_from(map_type)? { + bpf_map_type::BPF_MAP_TYPE_HASH => Self::HashMap(map_data), + bpf_map_type::BPF_MAP_TYPE_ARRAY => Self::Array(map_data), + bpf_map_type::BPF_MAP_TYPE_PROG_ARRAY => Self::ProgramArray(map_data), + bpf_map_type::BPF_MAP_TYPE_PERF_EVENT_ARRAY => Self::PerfEventArray(map_data), + bpf_map_type::BPF_MAP_TYPE_PERCPU_HASH => Self::PerCpuHashMap(map_data), + bpf_map_type::BPF_MAP_TYPE_PERCPU_ARRAY => Self::PerCpuArray(map_data), + bpf_map_type::BPF_MAP_TYPE_STACK_TRACE => Self::StackTraceMap(map_data), + bpf_map_type::BPF_MAP_TYPE_LRU_HASH => Self::LruHashMap(map_data), + bpf_map_type::BPF_MAP_TYPE_LRU_PERCPU_HASH => Self::PerCpuLruHashMap(map_data), + bpf_map_type::BPF_MAP_TYPE_LPM_TRIE => Self::LpmTrie(map_data), + bpf_map_type::BPF_MAP_TYPE_DEVMAP => Self::DevMap(map_data), + bpf_map_type::BPF_MAP_TYPE_SOCKMAP => Self::SockMap(map_data), + bpf_map_type::BPF_MAP_TYPE_CPUMAP => Self::CpuMap(map_data), + bpf_map_type::BPF_MAP_TYPE_XSKMAP => Self::XskMap(map_data), + bpf_map_type::BPF_MAP_TYPE_SOCKHASH => Self::SockHash(map_data), + bpf_map_type::BPF_MAP_TYPE_QUEUE => Self::Queue(map_data), + bpf_map_type::BPF_MAP_TYPE_STACK => Self::Stack(map_data), + bpf_map_type::BPF_MAP_TYPE_DEVMAP_HASH => Self::DevMapHash(map_data), + bpf_map_type::BPF_MAP_TYPE_RINGBUF => Self::RingBuf(map_data), + bpf_map_type::BPF_MAP_TYPE_BLOOM_FILTER => Self::BloomFilter(map_data), + bpf_map_type::BPF_MAP_TYPE_CGROUP_ARRAY => Self::Unsupported(map_data), + bpf_map_type::BPF_MAP_TYPE_ARRAY_OF_MAPS => Self::Unsupported(map_data), + bpf_map_type::BPF_MAP_TYPE_HASH_OF_MAPS => Self::Unsupported(map_data), + bpf_map_type::BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED => Self::Unsupported(map_data), + bpf_map_type::BPF_MAP_TYPE_REUSEPORT_SOCKARRAY => Self::Unsupported(map_data), + bpf_map_type::BPF_MAP_TYPE_SK_STORAGE => Self::SkStorage(map_data), + bpf_map_type::BPF_MAP_TYPE_STRUCT_OPS => Self::Unsupported(map_data), + bpf_map_type::BPF_MAP_TYPE_INODE_STORAGE => Self::Unsupported(map_data), + bpf_map_type::BPF_MAP_TYPE_TASK_STORAGE => Self::Unsupported(map_data), + bpf_map_type::BPF_MAP_TYPE_USER_RINGBUF => Self::Unsupported(map_data), + bpf_map_type::BPF_MAP_TYPE_CGRP_STORAGE => Self::Unsupported(map_data), + bpf_map_type::BPF_MAP_TYPE_ARENA => Self::Unsupported(map_data), + bpf_map_type::BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED => { + Self::Unsupported(map_data) + } + bpf_map_type::BPF_MAP_TYPE_UNSPEC => return Err(MapError::InvalidMapType { map_type }), + bpf_map_type::__MAX_BPF_MAP_TYPE => return Err(MapError::InvalidMapType { map_type }), + }; + Ok(map) + } } // Implements map pinning for different map implementations @@ -416,6 +438,7 @@ impl_map_pin!((V) { SockHash, BloomFilter, Queue, + SkStorage, Stack, }); @@ -435,28 +458,30 @@ macro_rules! impl_try_from_map { // rather than the repeated idents used later because the macro language does not allow one // repetition to be pasted inside another. ($ty_param:tt { - $($ty:ident $(from $($variant:ident)|+)?),+ $(,)? + $($(#[$meta:meta])* $ty:ident $(from $($variant:ident)|+)?),+ $(,)? }) => { - $(impl_try_from_map!(<$ty_param> $ty $(from $($variant)|+)?);)+ + $(impl_try_from_map!($(#[$meta])* <$ty_param> $ty $(from $($variant)|+)?);)+ }; // Add the "from $variant" using $ty as the default if it is missing. - (<$ty_param:tt> $ty:ident) => { - impl_try_from_map!(<$ty_param> $ty from $ty); + ($(#[$meta:meta])* <$ty_param:tt> $ty:ident) => { + impl_try_from_map!($(#[$meta])* <$ty_param> $ty from $ty); }; // Dispatch for each of the lifetimes. ( - <($($ty_param:ident),*)> $ty:ident from $($variant:ident)|+ + $(#[$meta:meta])* <($($ty_param:ident),*)> $ty:ident from $($variant:ident)|+ ) => { - impl_try_from_map!(<'a> ($($ty_param),*) $ty from $($variant)|+); - impl_try_from_map!(<'a mut> ($($ty_param),*) $ty from $($variant)|+); - impl_try_from_map!(<> ($($ty_param),*) $ty from $($variant)|+); + impl_try_from_map!($(#[$meta])* <'a> ($($ty_param),*) $ty from $($variant)|+); + impl_try_from_map!($(#[$meta])* <'a mut> ($($ty_param),*) $ty from $($variant)|+); + impl_try_from_map!($(#[$meta])* <> ($($ty_param),*) $ty from $($variant)|+); }; // An individual impl. ( + $(#[$meta:meta])* <$($l:lifetime $($m:ident)?)?> ($($ty_param:ident),*) $ty:ident from $($variant:ident)|+ ) => { + $(#[$meta])* impl<$($l,)? $($ty_param: Pod),*> TryFrom<$(&$l $($m)?)? Map> for $ty<$(&$l $($m)?)? MapData, $($ty_param),*> { @@ -486,18 +511,13 @@ impl_try_from_map!(() { XskMap, }); -#[cfg(any(feature = "async_tokio", feature = "async_std"))] -#[cfg_attr(docsrs, doc(cfg(any(feature = "async_tokio", feature = "async_std"))))] -impl_try_from_map!(() { - AsyncPerfEventArray from PerfEventArray, -}); - impl_try_from_map!((V) { Array, BloomFilter, PerCpuArray, Queue, SockHash, + SkStorage, Stack, }); @@ -544,34 +564,42 @@ pub(crate) fn check_v_size(map: &MapData) -> Result<(), MapError> { /// You should never need to use this unless you're implementing a new map type. #[derive(Debug)] pub struct MapData { - obj: obj::Map, + obj: aya_obj::Map, fd: MapFd, } impl MapData { /// Creates a new map with the provided `name` pub fn create( - obj: obj::Map, + mut obj: aya_obj::Map, name: &str, btf_fd: Option>, ) -> Result { - let c_name = CString::new(name).map_err(|_| MapError::InvalidName { name: name.into() })?; + let c_name = CString::new(name) + .map_err(|std::ffi::NulError { .. }| MapError::InvalidName { name: name.into() })?; + + // BPF_MAP_TYPE_PERF_EVENT_ARRAY's max_entries should not exceed the number of + // CPUs. + // + // By default, the newest versions of Aya, libbpf and cilium/ebpf define `max_entries` of + // `PerfEventArray` as `0`, with an intention to get it replaced with a correct value + // by the loader. + // + // We allow custom values (potentially coming either from older versions of aya-ebpf or + // programs written in C) as long as they don't exceed the number of CPUs. + // + // Otherwise, when the value is `0` or too large, we set it to the number of CPUs. + if obj.map_type() == bpf_map_type::BPF_MAP_TYPE_PERF_EVENT_ARRAY as u32 { + let nr_cpus = nr_cpus().map_err(|(_, error)| MapError::IoError(error))? as u32; + if obj.max_entries() == 0 || obj.max_entries() > nr_cpus { + obj.set_max_entries(nr_cpus); + } + }; - #[cfg(not(test))] - let kernel_version = KernelVersion::current().unwrap(); - #[cfg(test)] - let kernel_version = KernelVersion::new(0xff, 0xff, 0xff); let fd = - bpf_create_map(&c_name, &obj, btf_fd, kernel_version).map_err(|(code, io_error)| { - if kernel_version < KernelVersion::new(5, 11, 0) { - maybe_warn_rlimit(); - } - - MapError::CreateError { - name: name.into(), - code, - io_error, - } + bpf_create_map(&c_name, &obj, btf_fd).map_err(|io_error| MapError::CreateError { + name: name.into(), + io_error, })?; Ok(Self { obj, @@ -581,24 +609,27 @@ impl MapData { pub(crate) fn create_pinned_by_name>( path: P, - obj: obj::Map, + obj: aya_obj::Map, name: &str, btf_fd: Option>, ) -> Result { use std::os::unix::ffi::OsStrExt as _; // try to open map in case it's already pinned - let path = path.as_ref().join(name); + let path = path.as_ref(); let path_string = match CString::new(path.as_os_str().as_bytes()) { Ok(path) => path, Err(error) => { return Err(MapError::PinError { name: Some(name.into()), - error: PinError::InvalidPinPath { path, error }, + error: PinError::InvalidPinPath { + path: path.to_path_buf(), + error, + }, }); } }; - match bpf_get_object(&path_string).map_err(|(_, io_error)| SyscallError { + match bpf_get_object(&path_string).map_err(|io_error| SyscallError { call: "BPF_OBJ_GET", io_error, }) { @@ -608,7 +639,7 @@ impl MapData { }), Err(_) => { let map = Self::create(obj, name, btf_fd)?; - map.pin(&path).map_err(|error| MapError::PinError { + map.pin(path).map_err(|error| MapError::PinError { name: Some(name.into()), error, })?; @@ -619,9 +650,9 @@ impl MapData { pub(crate) fn finalize(&mut self) -> Result<(), MapError> { let Self { obj, fd } = self; - if !obj.data().is_empty() && obj.section_kind() != EbpfSectionKind::Bss { - bpf_map_update_elem_ptr(fd.as_fd(), &0 as *const _, obj.data_mut().as_mut_ptr(), 0) - .map_err(|(_, io_error)| SyscallError { + if !obj.data().is_empty() { + bpf_map_update_elem_ptr(fd.as_fd(), &0, obj.data_mut().as_mut_ptr(), 0) + .map_err(|io_error| SyscallError { call: "bpf_map_update_elem", io_error, }) @@ -629,7 +660,7 @@ impl MapData { } if obj.section_kind() == EbpfSectionKind::Rodata { bpf_map_freeze(fd.as_fd()) - .map_err(|(_, io_error)| SyscallError { + .map_err(|io_error| SyscallError { call: "bpf_map_freeze", io_error, }) @@ -652,18 +683,26 @@ impl MapData { }, })?; - let fd = bpf_get_object(&path_string).map_err(|(_, io_error)| SyscallError { + let fd = bpf_get_object(&path_string).map_err(|io_error| SyscallError { call: "BPF_OBJ_GET", io_error, })?; - Self::from_fd(fd) + Self::from_fd_inner(fd) } /// Loads a map from a map id. pub fn from_id(id: u32) -> Result { let fd = bpf_map_get_fd_by_id(id)?; - Self::from_fd(fd) + Self::from_fd_inner(fd) + } + + fn from_fd_inner(fd: crate::MockableFd) -> Result { + let MapInfo(info) = MapInfo::new_from_fd(fd.as_fd())?; + Ok(Self { + obj: parse_map_info(info, PinningType::None), + fd: MapFd::from_fd(fd), + }) } /// Loads a map from a file descriptor. @@ -672,11 +711,8 @@ impl MapData { /// This API is intended for cases where you have received a valid BPF FD from some other means. /// For example, you received an FD over Unix Domain Socket. pub fn from_fd(fd: OwnedFd) -> Result { - let MapInfo(info) = MapInfo::new_from_fd(fd.as_fd())?; - Ok(Self { - obj: parse_map_info(info, PinningType::None), - fd: MapFd::from_fd(fd), - }) + let fd = crate::MockableFd::from_fd(fd); + Self::from_fd_inner(fd) } /// Allows the map to be pinned to the provided path. @@ -714,7 +750,7 @@ impl MapData { error, } })?; - bpf_pin_object(fd.as_fd(), &path_string).map_err(|(_, io_error)| SyscallError { + bpf_pin_object(fd.as_fd(), &path_string).map_err(|io_error| SyscallError { call: "BPF_OBJ_PIN", io_error, })?; @@ -727,7 +763,7 @@ impl MapData { fd } - pub(crate) fn obj(&self) -> &obj::Map { + pub(crate) fn obj(&self) -> &aya_obj::Map { let Self { obj, fd: _ } = self; obj } @@ -773,11 +809,10 @@ impl Iterator for MapKeys<'_, K> { } let fd = self.map.fd().as_fd(); - let key = - bpf_map_get_next_key(fd, self.key.as_ref()).map_err(|(_, io_error)| SyscallError { - call: "bpf_map_get_next_key", - io_error, - }); + let key = bpf_map_get_next_key(fd, self.key.as_ref()).map_err(|io_error| SyscallError { + call: "bpf_map_get_next_key", + io_error, + }); match key { Err(err) => { self.err = true; @@ -856,7 +891,8 @@ impl PerCpuKernelMem { /// use aya::maps::PerCpuValues; /// use aya::util::nr_cpus; /// -/// let values = PerCpuValues::try_from(vec![42u32; nr_cpus()?])?; +/// let nr_cpus = nr_cpus().map_err(|(_, error)| error)?; +/// let values = PerCpuValues::try_from(vec![42u32; nr_cpus])?; /// # Ok::<(), Error>(()) /// ``` #[derive(Debug)] @@ -868,7 +904,7 @@ impl TryFrom> for PerCpuValues { type Error = io::Error; fn try_from(values: Vec) -> Result { - let nr_cpus = nr_cpus()?; + let nr_cpus = nr_cpus().map_err(|(_, error)| error)?; if values.len() != nr_cpus { return Err(io::Error::new( io::ErrorKind::InvalidInput, @@ -884,19 +920,19 @@ impl TryFrom> for PerCpuValues { impl PerCpuValues { pub(crate) fn alloc_kernel_mem() -> Result { let value_size = (mem::size_of::() + 7) & !7; + let nr_cpus = nr_cpus().map_err(|(_, error)| error)?; Ok(PerCpuKernelMem { - bytes: vec![0u8; nr_cpus()? * value_size], + bytes: vec![0u8; nr_cpus * value_size], }) } pub(crate) unsafe fn from_kernel_mem(mem: PerCpuKernelMem) -> Self { - let mem_ptr = mem.bytes.as_ptr() as usize; - let value_size = (mem::size_of::() + 7) & !7; + let stride = (mem::size_of::() + 7) & !7; let mut values = Vec::new(); let mut offset = 0; while offset < mem.bytes.len() { - values.push(ptr::read_unaligned((mem_ptr + offset) as *const _)); - offset += value_size; + values.push(unsafe { ptr::read_unaligned(mem.bytes.as_ptr().add(offset).cast()) }); + offset += stride; } Self { @@ -906,10 +942,10 @@ impl PerCpuValues { pub(crate) fn build_kernel_mem(&self) -> Result { let mut mem = Self::alloc_kernel_mem()?; - let mem_ptr = mem.as_mut_ptr() as usize; + let mem_ptr = mem.as_mut_ptr(); let value_size = (mem::size_of::() + 7) & !7; - for i in 0..self.values.len() { - unsafe { ptr::write_unaligned((mem_ptr + i * value_size) as *mut _, self.values[i]) }; + for (i, value) in self.values.iter().enumerate() { + unsafe { ptr::write_unaligned(mem_ptr.byte_add(i * value_size).cast(), *value) }; } Ok(mem) @@ -924,142 +960,33 @@ impl Deref for PerCpuValues { } } -/// Provides information about a loaded map, like name, id and size. -#[derive(Debug)] -pub struct MapInfo(bpf_map_info); - -impl MapInfo { - fn new_from_fd(fd: BorrowedFd<'_>) -> Result { - let info = bpf_map_get_info_by_fd(fd.as_fd())?; - Ok(Self(info)) - } - - /// Loads map info from a map id. - pub fn from_id(id: u32) -> Result { - bpf_map_get_fd_by_id(id) - .map_err(MapError::from) - .and_then(|fd| Self::new_from_fd(fd.as_fd())) - } - - /// The name of the map, limited to 16 bytes. - pub fn name(&self) -> &[u8] { - bytes_of_bpf_name(&self.0.name) - } - - /// The name of the map as a &str. If the name is not valid unicode, None is returned. - pub fn name_as_str(&self) -> Option<&str> { - std::str::from_utf8(self.name()).ok() - } - - /// The id for this map. Each map has a unique id. - pub fn id(&self) -> u32 { - self.0.id - } - - /// The map type as defined by the linux kernel enum - /// [`bpf_map_type`](https://elixir.bootlin.com/linux/v6.4.4/source/include/uapi/linux/bpf.h#L905). - pub fn map_type(&self) -> u32 { - self.0.type_ - } - - /// The key size for this map. - pub fn key_size(&self) -> u32 { - self.0.key_size - } - - /// The value size for this map. - pub fn value_size(&self) -> u32 { - self.0.value_size - } - - /// The maximum number of entries in this map. - pub fn max_entries(&self) -> u32 { - self.0.max_entries - } - - /// The flags for this map. - pub fn map_flags(&self) -> u32 { - self.0.map_flags - } - - /// Returns a file descriptor referencing the map. - /// - /// The returned file descriptor can be closed at any time and doing so does - /// not influence the life cycle of the map. - pub fn fd(&self) -> Result { - let Self(info) = self; - let fd = bpf_map_get_fd_by_id(info.id)?; - Ok(MapFd::from_fd(fd)) - } - - /// Loads a map from a pinned path in bpffs. - pub fn from_pin>(path: P) -> Result { - use std::os::unix::ffi::OsStrExt as _; - - // TODO: avoid this unwrap by adding a new error variant. - let path_string = CString::new(path.as_ref().as_os_str().as_bytes()).unwrap(); - let fd = bpf_get_object(&path_string).map_err(|(_, io_error)| SyscallError { - call: "BPF_OBJ_GET", - io_error, - })?; - - Self::new_from_fd(fd.as_fd()) - } -} - -/// Returns an iterator over all loaded bpf maps. -/// -/// This differs from [`crate::Ebpf::maps`] since it will return all maps -/// listed on the host system and not only maps for a specific [`crate::Ebpf`] instance. -/// -/// # Example -/// ``` -/// # use aya::maps::loaded_maps; -/// -/// for m in loaded_maps() { -/// match m { -/// Ok(map) => println!("{:?}", map.name_as_str()), -/// Err(e) => println!("Error iterating maps: {:?}", e), -/// } -/// } -/// ``` -/// -/// # Errors -/// -/// Returns [`MapError::SyscallError`] if any of the syscalls required to either get -/// next map id, get the map fd, or the [`MapInfo`] fail. In cases where -/// iteration can't be performed, for example the caller does not have the necessary privileges, -/// a single item will be yielded containing the error that occurred. -pub fn loaded_maps() -> impl Iterator> { - iter_map_ids().map(|id| { - let id = id?; - MapInfo::from_id(id) - }) -} - #[cfg(test)] mod test_utils { + use aya_obj::{ + EbpfSectionKind, + generated::{bpf_cmd, bpf_map_type}, + maps::LegacyMap, + }; + use crate::{ bpf_map_def, - generated::{bpf_cmd, bpf_map_type}, maps::MapData, - obj::{self, maps::LegacyMap, EbpfSectionKind}, - sys::{override_syscall, Syscall}, + sys::{Syscall, override_syscall}, }; - pub(super) fn new_map(obj: obj::Map) -> MapData { + pub(super) fn new_map(obj: aya_obj::Map) -> MapData { override_syscall(|call| match call { Syscall::Ebpf { cmd: bpf_cmd::BPF_MAP_CREATE, .. } => Ok(crate::MockableFd::mock_signed_fd().into()), - call => panic!("unexpected syscall {:?}", call), + call => panic!("unexpected syscall {call:?}"), }); MapData::create(obj, "foo", None).unwrap() } - pub(super) fn new_obj_map(map_type: bpf_map_type) -> obj::Map { - obj::Map::Legacy(LegacyMap { + pub(super) fn new_obj_map(map_type: bpf_map_type) -> aya_obj::Map { + aya_obj::Map::Legacy(LegacyMap { def: bpf_map_def { map_type: map_type as u32, key_size: std::mem::size_of::() as u32, @@ -1073,24 +1000,41 @@ mod test_utils { symbol_index: None, }) } + + pub(super) fn new_obj_map_with_max_entries( + map_type: bpf_map_type, + max_entries: u32, + ) -> aya_obj::Map { + aya_obj::Map::Legacy(LegacyMap { + def: bpf_map_def { + map_type: map_type as u32, + key_size: std::mem::size_of::() as u32, + value_size: 4, + max_entries, + ..Default::default() + }, + section_index: 0, + section_kind: EbpfSectionKind::Maps, + data: Vec::new(), + symbol_index: None, + }) + } } #[cfg(test)] mod tests { - use std::os::fd::AsRawFd as _; + use std::{ffi::c_char, os::fd::AsRawFd as _}; use assert_matches::assert_matches; - use libc::{c_char, EFAULT}; - - fn new_obj_map() -> obj::Map { - test_utils::new_obj_map::(crate::generated::bpf_map_type::BPF_MAP_TYPE_HASH) - } + use aya_obj::generated::{bpf_cmd, bpf_map_info, bpf_map_type}; + use libc::EFAULT; use super::*; - use crate::{ - generated::bpf_cmd, - sys::{override_syscall, Syscall}, - }; + use crate::sys::{Syscall, override_syscall}; + + fn new_obj_map() -> aya_obj::Map { + test_utils::new_obj_map::(bpf_map_type::BPF_MAP_TYPE_HASH) + } #[test] fn test_from_map_id() { @@ -1147,13 +1091,65 @@ mod tests { } #[test] - #[cfg_attr( - miri, - ignore = "`let map_info = unsafe { &mut *(attr.info.info as *mut bpf_map_info) }` is trying to retag from for Unique permission, but no exposed tags have suitable permission in the borrow stack for this location" - )] - fn test_name() { - use crate::generated::bpf_map_info; + fn test_create_perf_event_array() { + override_syscall(|call| match call { + Syscall::Ebpf { + cmd: bpf_cmd::BPF_MAP_CREATE, + .. + } => Ok(crate::MockableFd::mock_signed_fd().into()), + _ => Err((-1, io::Error::from_raw_os_error(EFAULT))), + }); + let nr_cpus = nr_cpus().unwrap(); + + // Create with max_entries > nr_cpus is clamped to nr_cpus + assert_matches!( + MapData::create(test_utils::new_obj_map_with_max_entries::( + bpf_map_type::BPF_MAP_TYPE_PERF_EVENT_ARRAY, + 65535, + ), "foo", None), + Ok(MapData { + obj, + fd, + }) => { + assert_eq!(fd.as_fd().as_raw_fd(), crate::MockableFd::mock_signed_fd()); + assert_eq!(obj.max_entries(), nr_cpus as u32) + } + ); + + // Create with max_entries = 0 is set to nr_cpus + assert_matches!( + MapData::create(test_utils::new_obj_map_with_max_entries::( + bpf_map_type::BPF_MAP_TYPE_PERF_EVENT_ARRAY, + 0, + ), "foo", None), + Ok(MapData { + obj, + fd, + }) => { + assert_eq!(fd.as_fd().as_raw_fd(), crate::MockableFd::mock_signed_fd()); + assert_eq!(obj.max_entries(), nr_cpus as u32) + } + ); + + // Create with max_entries < nr_cpus is unchanged + assert_matches!( + MapData::create(test_utils::new_obj_map_with_max_entries::( + bpf_map_type::BPF_MAP_TYPE_PERF_EVENT_ARRAY, + 1, + ), "foo", None), + Ok(MapData { + obj, + fd, + }) => { + assert_eq!(fd.as_fd().as_raw_fd(), crate::MockableFd::mock_signed_fd()); + assert_eq!(obj.max_entries(), 1) + } + ); + } + + #[test] + fn test_name() { const TEST_NAME: &str = "foo"; override_syscall(|call| match call { @@ -1169,10 +1165,15 @@ mod tests { unsafe { attr.info.info_len }, mem::size_of::() as u32 ); - let map_info = unsafe { &mut *(attr.info.info as *mut bpf_map_info) }; - map_info.name[..TEST_NAME.len()].copy_from_slice(unsafe { - mem::transmute::<&[u8], &[c_char]>(TEST_NAME.as_bytes()) - }); + unsafe { + let name_bytes = mem::transmute::<&[u8], &[c_char]>(TEST_NAME.as_bytes()); + let map_info = attr.info.info as *mut bpf_map_info; + map_info.write({ + let mut map_info = map_info.read(); + map_info.name[..name_bytes.len()].copy_from_slice(name_bytes); + map_info + }) + } Ok(0) } _ => Err((-1, io::Error::from_raw_os_error(EFAULT))), @@ -1183,13 +1184,7 @@ mod tests { } #[test] - #[cfg_attr( - miri, - ignore = "`let map_info = unsafe { &mut *(attr.info.info as *mut bpf_map_info) }` is trying to retag from for Unique permission, but no exposed tags have suitable permission in the borrow stack for this location" - )] fn test_loaded_maps() { - use crate::generated::bpf_map_info; - override_syscall(|call| match call { Syscall::Ebpf { cmd: bpf_cmd::BPF_MAP_GET_NEXT_ID, @@ -1213,12 +1208,19 @@ mod tests { cmd: bpf_cmd::BPF_OBJ_GET_INFO_BY_FD, attr, } => { - let map_info = unsafe { &mut *(attr.info.info as *mut bpf_map_info) }; - map_info.id = unsafe { attr.info.bpf_fd } - crate::MockableFd::mock_unsigned_fd(); - map_info.key_size = 32; - map_info.value_size = 64; - map_info.map_flags = 1234; - map_info.max_entries = 99; + unsafe { + let info = attr.info; + let map_info = info.info as *mut bpf_map_info; + map_info.write({ + let mut map_info = map_info.read(); + map_info.id = info.bpf_fd - crate::MockableFd::mock_unsigned_fd(); + map_info.key_size = 32; + map_info.value_size = 64; + map_info.map_flags = 1234; + map_info.max_entries = 99; + map_info + }); + } Ok(0) } _ => Err((-1, io::Error::from_raw_os_error(EFAULT))), @@ -1253,13 +1255,12 @@ mod tests { #[test] fn test_create_failed() { - override_syscall(|_| Err((-42, io::Error::from_raw_os_error(EFAULT)))); + override_syscall(|_| Err((-1, io::Error::from_raw_os_error(EFAULT)))); assert_matches!( MapData::create(new_obj_map(), "foo", None), - Err(MapError::CreateError { name, code, io_error }) => { + Err(MapError::CreateError { name, io_error }) => { assert_eq!(name, "foo"); - assert_eq!(code, -42); assert_eq!(io_error.raw_os_error(), Some(EFAULT)); } ); diff --git a/aya/src/maps/perf/async_perf_event_array.rs b/aya/src/maps/perf/async_perf_event_array.rs deleted file mode 100644 index fff98456..00000000 --- a/aya/src/maps/perf/async_perf_event_array.rs +++ /dev/null @@ -1,186 +0,0 @@ -use std::{ - borrow::{Borrow, BorrowMut}, - path::Path, -}; - -// See https://doc.rust-lang.org/cargo/reference/features.html#mutually-exclusive-features. -// -// We should eventually split async functionality out into separate crates "aya-async-tokio" and -// "async-async-std". Presently we arbitrarily choose tokio over async-std when both are requested. -#[cfg(all(not(feature = "async_tokio"), feature = "async_std"))] -use async_io::Async; -use bytes::BytesMut; -#[cfg(feature = "async_tokio")] -use tokio::io::unix::AsyncFd; - -use crate::maps::{ - perf::{Events, PerfBufferError, PerfEventArray, PerfEventArrayBuffer}, - MapData, MapError, PinError, -}; - -/// A `Future` based map that can be used to receive events from eBPF programs using the linux -/// [`perf`](https://perf.wiki.kernel.org/index.php/Main_Page) API. -/// -/// This is the async version of [`PerfEventArray`], which provides integration -/// with [tokio](https://docs.rs/tokio) and [async-std](https:/docs.rs/async-std) and a nice `Future` based API. -/// -/// To receive events you need to: -/// * call [`AsyncPerfEventArray::open`] -/// * call [`AsyncPerfEventArrayBuffer::read_events`] to read the events -/// -/// # Minimum kernel version -/// -/// The minimum kernel version required to use this feature is 4.3. -/// -/// # Examples -/// -/// ```no_run -/// # #[derive(thiserror::Error, Debug)] -/// # enum Error { -/// # #[error(transparent)] -/// # IO(#[from] std::io::Error), -/// # #[error(transparent)] -/// # Map(#[from] aya::maps::MapError), -/// # #[error(transparent)] -/// # Ebpf(#[from] aya::EbpfError), -/// # #[error(transparent)] -/// # PerfBuf(#[from] aya::maps::perf::PerfBufferError), -/// # } -/// # #[cfg(feature = "async_tokio")] -/// # async fn try_main() -> Result<(), Error> { -/// # let mut bpf = aya::Ebpf::load(&[])?; -/// use aya::maps::perf::{AsyncPerfEventArray, PerfBufferError}; -/// use aya::util::online_cpus; -/// use bytes::BytesMut; -/// use tokio::task; // or async_std::task -/// -/// // try to convert the PERF_ARRAY map to an AsyncPerfEventArray -/// let mut perf_array = AsyncPerfEventArray::try_from(bpf.take_map("PERF_ARRAY").unwrap())?; -/// -/// for cpu_id in online_cpus()? { -/// // open a separate perf buffer for each cpu -/// let mut buf = perf_array.open(cpu_id, None)?; -/// -/// // process each perf buffer in a separate task -/// task::spawn(async move { -/// let mut buffers = (0..10) -/// .map(|_| BytesMut::with_capacity(1024)) -/// .collect::>(); -/// -/// loop { -/// // wait for events -/// let events = buf.read_events(&mut buffers).await?; -/// -/// // events.read contains the number of events that have been read, -/// // and is always <= buffers.len() -/// for i in 0..events.read { -/// let buf = &mut buffers[i]; -/// // process buf -/// } -/// } -/// -/// Ok::<_, PerfBufferError>(()) -/// }); -/// } -/// -/// # Ok(()) -/// # } -/// ``` -#[doc(alias = "BPF_MAP_TYPE_PERF_EVENT_ARRAY")] -pub struct AsyncPerfEventArray { - perf_map: PerfEventArray, -} - -impl> AsyncPerfEventArray { - /// Opens the perf buffer at the given index. - /// - /// The returned buffer will receive all the events eBPF programs send at the given index. - pub fn open( - &mut self, - index: u32, - page_count: Option, - ) -> Result, PerfBufferError> { - let Self { perf_map } = self; - let buf = perf_map.open(index, page_count)?; - #[cfg(feature = "async_tokio")] - let buf = AsyncFd::new(buf)?; - #[cfg(all(not(feature = "async_tokio"), feature = "async_std"))] - let buf = Async::new(buf)?; - Ok(AsyncPerfEventArrayBuffer { buf }) - } - - /// Pins the map to a BPF filesystem. - /// - /// When a map is pinned it will remain loaded until the corresponding file - /// is deleted. All parent directories in the given `path` must already exist. - pub fn pin>(&self, path: P) -> Result<(), PinError> { - self.perf_map.pin(path) - } -} - -impl> AsyncPerfEventArray { - pub(crate) fn new(map: T) -> Result { - Ok(Self { - perf_map: PerfEventArray::new(map)?, - }) - } -} - -/// A `Future` based ring buffer that can receive events from eBPF programs. -/// -/// [`AsyncPerfEventArrayBuffer`] is a ring buffer that can receive events from eBPF programs that -/// use `bpf_perf_event_output()`. It's returned by [`AsyncPerfEventArray::open`]. -/// -/// See the [`AsyncPerfEventArray` documentation](AsyncPerfEventArray) for an overview of how to -/// use perf buffers. -pub struct AsyncPerfEventArrayBuffer> { - #[cfg(not(any(feature = "async_tokio", feature = "async_std")))] - buf: PerfEventArrayBuffer, - - #[cfg(feature = "async_tokio")] - buf: AsyncFd>, - - #[cfg(all(not(feature = "async_tokio"), feature = "async_std"))] - buf: Async>, -} - -impl> AsyncPerfEventArrayBuffer { - /// Reads events from the buffer. - /// - /// This method reads events into the provided slice of buffers, filling - /// each buffer in order stopping when there are no more events to read or - /// all the buffers have been filled. - /// - /// Returns the number of events read and the number of events lost. Events - /// are lost when user space doesn't read events fast enough and the ring - /// buffer fills up. - pub async fn read_events( - &mut self, - buffers: &mut [BytesMut], - ) -> Result { - let Self { buf } = self; - loop { - #[cfg(feature = "async_tokio")] - let mut guard = buf.readable_mut().await?; - #[cfg(feature = "async_tokio")] - let buf = guard.get_inner_mut(); - - #[cfg(all(not(feature = "async_tokio"), feature = "async_std"))] - let buf = { - if !buf.get_ref().readable() { - buf.readable().await?; - } - unsafe { buf.get_mut() } - }; - - let events = buf.read_events(buffers)?; - const EMPTY: Events = Events { read: 0, lost: 0 }; - if events != EMPTY { - break Ok(events); - } - - #[cfg(feature = "async_tokio")] - guard.clear_ready(); - } - } -} diff --git a/aya/src/maps/perf/mod.rs b/aya/src/maps/perf/mod.rs index 765b052d..61151c6f 100644 --- a/aya/src/maps/perf/mod.rs +++ b/aya/src/maps/perf/mod.rs @@ -1,15 +1,9 @@ //! Ring buffer types used to receive events from eBPF programs using the linux //! `perf` API. //! -//! See [`PerfEventArray`] and [`AsyncPerfEventArray`]. -#[cfg(any(feature = "async_tokio", feature = "async_std"))] -#[cfg_attr(docsrs, doc(cfg(any(feature = "async_tokio", feature = "async_std"))))] -mod async_perf_event_array; +//! See [`PerfEventArray`]. mod perf_buffer; mod perf_event_array; -#[cfg(any(feature = "async_tokio", feature = "async_std"))] -#[cfg_attr(docsrs, doc(cfg(any(feature = "async_tokio", feature = "async_std"))))] -pub use async_perf_event_array::*; pub use perf_buffer::*; pub use perf_event_array::*; diff --git a/aya/src/maps/perf/perf_buffer.rs b/aya/src/maps/perf/perf_buffer.rs index 89f2cf73..df0e4974 100644 --- a/aya/src/maps/perf/perf_buffer.rs +++ b/aya/src/maps/perf/perf_buffer.rs @@ -1,22 +1,21 @@ use std::{ - ffi::c_void, io, mem, os::fd::{AsFd, BorrowedFd}, ptr, slice, - sync::atomic::{self, AtomicPtr, Ordering}, + sync::atomic::{self, Ordering}, }; +use aya_obj::generated::{ + perf_event_header, perf_event_mmap_page, + perf_event_type::{PERF_RECORD_LOST, PERF_RECORD_SAMPLE}, +}; use bytes::BytesMut; -use libc::{munmap, MAP_FAILED, MAP_SHARED, PROT_READ, PROT_WRITE}; +use libc::{MAP_SHARED, PROT_READ, PROT_WRITE}; use thiserror::Error; use crate::{ - generated::{ - perf_event_header, perf_event_mmap_page, - perf_event_type::{PERF_RECORD_LOST, PERF_RECORD_SAMPLE}, - }, - sys::{mmap, perf_event_ioctl, perf_event_open_bpf, SysResult}, - PERF_EVENT_IOC_DISABLE, PERF_EVENT_IOC_ENABLE, + sys::{PerfEventIoctlRequest, SyscallError, perf_event_ioctl, perf_event_open_bpf}, + util::MMap, }; /// Perf buffer error. @@ -83,9 +82,9 @@ pub struct Events { pub lost: usize, } -#[derive(Debug)] +#[cfg_attr(test, derive(Debug))] pub(crate) struct PerfBuffer { - buf: AtomicPtr, + mmap: MMap, size: usize, page_size: usize, fd: crate::MockableFd, @@ -102,40 +101,36 @@ impl PerfBuffer { } let fd = perf_event_open_bpf(cpu_id as i32) - .map_err(|(_, io_error)| PerfBufferError::OpenError { io_error })?; + .map_err(|io_error| PerfBufferError::OpenError { io_error })?; let size = page_size * page_count; - let buf = unsafe { - mmap( - ptr::null_mut(), - size + page_size, - PROT_READ | PROT_WRITE, - MAP_SHARED, - fd.as_fd(), - 0, - ) - }; - if buf == MAP_FAILED { - return Err(PerfBufferError::MMapError { - io_error: io::Error::last_os_error(), - }); - } + let mmap = MMap::new( + fd.as_fd(), + size + page_size, + PROT_READ | PROT_WRITE, + MAP_SHARED, + 0, + ) + .map_err(|SyscallError { call: _, io_error }| PerfBufferError::MMapError { io_error })?; - let fd = crate::MockableFd::from_fd(fd); let perf_buf = Self { - buf: AtomicPtr::new(buf as *mut perf_event_mmap_page), + mmap, size, page_size, fd, }; - perf_event_ioctl(perf_buf.fd.as_fd(), PERF_EVENT_IOC_ENABLE, 0) - .map_err(|(_, io_error)| PerfBufferError::PerfEventEnableError { io_error })?; + perf_event_ioctl(perf_buf.fd.as_fd(), PerfEventIoctlRequest::Enable) + .map_err(|io_error| PerfBufferError::PerfEventEnableError { io_error })?; Ok(perf_buf) } + fn buf(&self) -> ptr::NonNull { + self.mmap.ptr().cast() + } + pub(crate) fn readable(&self) -> bool { - let header = self.buf.load(Ordering::SeqCst); + let header = self.buf().as_ptr(); let head = unsafe { (*header).data_head } as usize; let tail = unsafe { (*header).data_tail } as usize; head != tail @@ -148,29 +143,25 @@ impl PerfBuffer { if buffers.is_empty() { return Err(PerfBufferError::NoBuffers); } - let header = self.buf.load(Ordering::SeqCst); - let base = header as usize + self.page_size; + let header = self.buf().as_ptr(); + let base = unsafe { header.byte_add(self.page_size) }; let mut events = Events { read: 0, lost: 0 }; let mut buf_n = 0; - let fill_buf = |start_off, base, mmap_size, out_buf: &mut [u8]| { + let fill_buf = |start_off, base: *const u8, mmap_size, out_buf: &mut [u8]| { let len = out_buf.len(); let end = (start_off + len) % mmap_size; let start = start_off % mmap_size; if start < end { - out_buf.copy_from_slice(unsafe { - slice::from_raw_parts((base + start) as *const u8, len) - }); + out_buf.copy_from_slice(unsafe { slice::from_raw_parts(base.add(start), len) }); } else { let size = mmap_size - start; unsafe { - out_buf[..size] - .copy_from_slice(slice::from_raw_parts((base + start) as *const u8, size)); - out_buf[size..] - .copy_from_slice(slice::from_raw_parts(base as *const u8, len - size)); + out_buf[..size].copy_from_slice(slice::from_raw_parts(base.add(start), size)); + out_buf[size..].copy_from_slice(slice::from_raw_parts(base, len - size)); } } }; @@ -231,11 +222,11 @@ impl PerfBuffer { let buf = &mut buffers[buf_n]; let event_start = tail % self.size; - let event = - unsafe { ptr::read_unaligned((base + event_start) as *const perf_event_header) }; + let event: perf_event_header = + unsafe { ptr::read_unaligned(base.byte_add(event_start).cast()) }; let event_size = event.size as usize; - match read_event(event_start, event.type_, base, buf) { + match read_event(event_start, event.type_, base.cast(), buf) { Ok(Some((read, lost))) => { if read > 0 { buf_n += 1; @@ -268,13 +259,7 @@ impl AsFd for PerfBuffer { impl Drop for PerfBuffer { fn drop(&mut self) { - unsafe { - let _: SysResult<_> = perf_event_ioctl(self.fd.as_fd(), PERF_EVENT_IOC_DISABLE, 0); - munmap( - self.buf.load(Ordering::SeqCst) as *mut c_void, - self.size + self.page_size, - ); - } + let _: io::Result<()> = perf_event_ioctl(self.fd.as_fd(), PerfEventIoctlRequest::Disable); } } @@ -285,7 +270,7 @@ mod tests { use assert_matches::assert_matches; use super::*; - use crate::sys::{override_syscall, Syscall, TEST_MMAP_RET}; + use crate::sys::{Syscall, TEST_MMAP_RET, override_syscall}; #[repr(C)] #[derive(Debug)] @@ -300,14 +285,14 @@ mod tests { data: [u8; PAGE_SIZE * 2], } - fn fake_mmap(buf: &MMappedBuf) { + fn fake_mmap(buf: &mut MMappedBuf) { + let buf: *mut _ = buf; override_syscall(|call| match call { - Syscall::PerfEventOpen { .. } | Syscall::PerfEventIoctl { .. } => { - Ok(crate::MockableFd::mock_signed_fd().into()) - } - call => panic!("unexpected syscall: {:?}", call), + Syscall::PerfEventOpen { .. } => Ok(crate::MockableFd::mock_signed_fd().into()), + Syscall::PerfEventIoctl { .. } => Ok(0), + call => panic!("unexpected syscall: {call:?}"), }); - TEST_MMAP_RET.with(|ret| *ret.borrow_mut() = buf as *const _ as *mut _); + TEST_MMAP_RET.with(|ret| *ret.borrow_mut() = buf.cast()); } #[test] @@ -328,27 +313,25 @@ mod tests { #[test] fn test_no_out_bufs() { - let mmapped_buf = MMappedBuf { + let mut mmapped_buf = MMappedBuf { data: [0; PAGE_SIZE * 2], }; - fake_mmap(&mmapped_buf); + fake_mmap(&mut mmapped_buf); let mut buf = PerfBuffer::open(1, PAGE_SIZE, 1).unwrap(); + assert_matches!(buf.read_events(&mut []), Err(PerfBufferError::NoBuffers)) } #[test] - #[cfg_attr( - miri, - ignore = "`unsafe { (*header).data_tail = tail as u64 };` is attempting a write access using using a tag that only grants SharedReadOnly permission" - )] fn test_no_events() { - let mmapped_buf = MMappedBuf { + let mut mmapped_buf = MMappedBuf { data: [0; PAGE_SIZE * 2], }; - fake_mmap(&mmapped_buf); + fake_mmap(&mut mmapped_buf); let mut buf = PerfBuffer::open(1, PAGE_SIZE, 1).unwrap(); + let out_buf = BytesMut::with_capacity(4); assert_eq!( buf.read_events(&mut [out_buf]).unwrap(), @@ -356,17 +339,18 @@ mod tests { ); } + fn write(mmapped_buf: &mut MMappedBuf, offset: usize, value: T) -> usize { + let dst: *mut _ = mmapped_buf; + let head = offset + mem::size_of::(); + unsafe { + ptr::write_unaligned(dst.byte_add(PAGE_SIZE + offset).cast(), value); + mmapped_buf.mmap_page.data_head = head as u64; + } + head + } + #[test] - #[cfg_attr( - miri, - ignore = "`ptr::write_unaligned(dst, value)` is attempting a write access but no exposed tags have suitable permission in the borrow stack for this location" - )] fn test_read_first_lost() { - let mut mmapped_buf = MMappedBuf { - data: [0; PAGE_SIZE * 2], - }; - fake_mmap(&mmapped_buf); - #[repr(C)] #[derive(Debug)] struct LostSamples { @@ -375,18 +359,27 @@ mod tests { count: u64, } - let evt = LostSamples { - header: perf_event_header { - type_: PERF_RECORD_LOST as u32, - misc: 0, - size: mem::size_of::() as u16, - }, - id: 1, - count: 0xCAFEBABE, + let mut mmapped_buf = MMappedBuf { + data: [0; PAGE_SIZE * 2], }; - write(&mut mmapped_buf, 0, evt); + write( + &mut mmapped_buf, + 0, + LostSamples { + header: perf_event_header { + type_: PERF_RECORD_LOST as u32, + misc: 0, + size: mem::size_of::() as u16, + }, + id: 1, + count: 0xCAFEBABE, + }, + ); + + fake_mmap(&mut mmapped_buf); let mut buf = PerfBuffer::open(1, PAGE_SIZE, 1).unwrap(); + let out_buf = BytesMut::with_capacity(0); let events = buf.read_events(&mut [out_buf]).unwrap(); assert_eq!(events.lost, 0xCAFEBABE); @@ -399,29 +392,22 @@ mod tests { value: T, } - fn write(mmapped_buf: &mut MMappedBuf, offset: usize, value: T) -> usize { - let dst = (mmapped_buf as *const _ as usize + PAGE_SIZE + offset) as *const PerfSample - as *mut T; - unsafe { - ptr::write_unaligned(dst, value); - mmapped_buf.mmap_page.data_head = (offset + mem::size_of::()) as u64; - mmapped_buf.mmap_page.data_head as usize - } - } - fn write_sample(mmapped_buf: &mut MMappedBuf, offset: usize, value: T) -> usize { - let sample = PerfSample { - s_hdr: Sample { - header: perf_event_header { - type_: PERF_RECORD_SAMPLE as u32, - misc: 0, - size: mem::size_of::>() as u16, + write( + mmapped_buf, + offset, + PerfSample { + s_hdr: Sample { + header: perf_event_header { + type_: PERF_RECORD_SAMPLE as u32, + misc: 0, + size: mem::size_of::>() as u16, + }, + size: mem::size_of::() as u32, }, - size: mem::size_of::() as u32, + value, }, - value, - }; - write(mmapped_buf, offset, sample) + ) } fn u32_from_buf(buf: &[u8]) -> u32 { @@ -433,19 +419,16 @@ mod tests { } #[test] - #[cfg_attr( - miri, - ignore = "`ptr::write_unaligned(dst, value)` is attempting a write access but no exposed tags have suitable permission in the borrow stack for this location" - )] fn test_read_first_sample() { let mut mmapped_buf = MMappedBuf { data: [0; PAGE_SIZE * 2], }; - fake_mmap(&mmapped_buf); - let mut buf = PerfBuffer::open(1, PAGE_SIZE, 1).unwrap(); write_sample(&mut mmapped_buf, 0, 0xCAFEBABEu32); + fake_mmap(&mut mmapped_buf); + let mut buf = PerfBuffer::open(1, PAGE_SIZE, 1).unwrap(); + let mut out_bufs = [BytesMut::with_capacity(4)]; let events = buf.read_events(&mut out_bufs).unwrap(); @@ -454,20 +437,17 @@ mod tests { } #[test] - #[cfg_attr( - miri, - ignore = "`ptr::write_unaligned(dst, value)` is attempting a write access but no exposed tags have suitable permission in the borrow stack for this location" - )] fn test_read_many_with_many_reads() { let mut mmapped_buf = MMappedBuf { data: [0; PAGE_SIZE * 2], }; - fake_mmap(&mmapped_buf); - let mut buf = PerfBuffer::open(1, PAGE_SIZE, 1).unwrap(); let next = write_sample(&mut mmapped_buf, 0, 0xCAFEBABEu32); write_sample(&mut mmapped_buf, next, 0xBADCAFEu32); + fake_mmap(&mut mmapped_buf); + let mut buf = PerfBuffer::open(1, PAGE_SIZE, 1).unwrap(); + let mut out_bufs = [BytesMut::with_capacity(4)]; let events = buf.read_events(&mut out_bufs).unwrap(); @@ -480,23 +460,18 @@ mod tests { } #[test] - #[cfg_attr( - miri, - ignore = "`ptr::write_unaligned(dst, value)` is attempting a write access but no exposed tags have suitable permission in the borrow stack for this location" - )] fn test_read_many_with_one_read() { let mut mmapped_buf = MMappedBuf { data: [0; PAGE_SIZE * 2], }; - fake_mmap(&mmapped_buf); - let mut buf = PerfBuffer::open(1, PAGE_SIZE, 1).unwrap(); let next = write_sample(&mut mmapped_buf, 0, 0xCAFEBABEu32); write_sample(&mut mmapped_buf, next, 0xBADCAFEu32); - let mut out_bufs = (0..3) - .map(|_| BytesMut::with_capacity(4)) - .collect::>(); + fake_mmap(&mut mmapped_buf); + let mut buf = PerfBuffer::open(1, PAGE_SIZE, 1).unwrap(); + + let mut out_bufs = std::iter::repeat_n(BytesMut::with_capacity(4), 3).collect::>(); let events = buf.read_events(&mut out_bufs).unwrap(); assert_eq!(events, Events { lost: 0, read: 2 }); @@ -505,20 +480,17 @@ mod tests { } #[test] - #[cfg_attr( - miri, - ignore = "`ptr::write_unaligned(dst, value)` is attempting a write access but no exposed tags have suitable permission in the borrow stack for this location" - )] fn test_read_last_sample() { let mut mmapped_buf = MMappedBuf { data: [0; PAGE_SIZE * 2], }; - fake_mmap(&mmapped_buf); - let mut buf = PerfBuffer::open(1, PAGE_SIZE, 1).unwrap(); let offset = PAGE_SIZE - mem::size_of::>(); - mmapped_buf.mmap_page.data_tail = offset as u64; write_sample(&mut mmapped_buf, offset, 0xCAFEBABEu32); + mmapped_buf.mmap_page.data_tail = offset as u64; + + fake_mmap(&mut mmapped_buf); + let mut buf = PerfBuffer::open(1, PAGE_SIZE, 1).unwrap(); let mut out_bufs = [BytesMut::with_capacity(4)]; @@ -528,30 +500,35 @@ mod tests { } #[test] - #[cfg_attr( - miri, - ignore = "`ptr::write_unaligned(dst, value)` is attempting a write access but no exposed tags have suitable permission in the borrow stack for this location" - )] fn test_read_wrapping_sample_size() { let mut mmapped_buf = MMappedBuf { data: [0; PAGE_SIZE * 2], }; - fake_mmap(&mmapped_buf); - let mut buf = PerfBuffer::open(1, PAGE_SIZE, 1).unwrap(); - - let header = perf_event_header { - type_: PERF_RECORD_SAMPLE as u32, - misc: 0, - size: mem::size_of::>() as u16, - }; let offset = PAGE_SIZE - mem::size_of::() - 2; + write( + &mut mmapped_buf, + offset, + perf_event_header { + type_: PERF_RECORD_SAMPLE as u32, + misc: 0, + size: mem::size_of::>() as u16, + }, + ); mmapped_buf.mmap_page.data_tail = offset as u64; - write(&mut mmapped_buf, offset, header); - write(&mut mmapped_buf, PAGE_SIZE - 2, 0x0004u16); - write(&mut mmapped_buf, 0, 0x0000u16); + + let (left, right) = if cfg!(target_endian = "little") { + (0x0004u16, 0x0000u16) + } else { + (0x0000u16, 0x0004u16) + }; + write(&mut mmapped_buf, PAGE_SIZE - 2, left); + write(&mut mmapped_buf, 0, right); write(&mut mmapped_buf, 2, 0xBAADCAFEu32); + fake_mmap(&mut mmapped_buf); + let mut buf = PerfBuffer::open(1, PAGE_SIZE, 1).unwrap(); + let mut out_bufs = [BytesMut::with_capacity(8)]; let events = buf.read_events(&mut out_bufs).unwrap(); @@ -560,33 +537,38 @@ mod tests { } #[test] - #[cfg_attr( - miri, - ignore = "`ptr::write_unaligned(dst, value)` is attempting a write access but no exposed tags have suitable permission in the borrow stack for this location" - )] fn test_read_wrapping_value() { let mut mmapped_buf = MMappedBuf { data: [0; PAGE_SIZE * 2], }; - fake_mmap(&mmapped_buf); - let mut buf = PerfBuffer::open(1, PAGE_SIZE, 1).unwrap(); - let sample = PerfSample { - s_hdr: Sample { - header: perf_event_header { - type_: PERF_RECORD_SAMPLE as u32, - misc: 0, - size: mem::size_of::>() as u16, - }, - size: mem::size_of::() as u32, - }, - value: 0xCAFEBABEu32, + let (left, right) = if cfg!(target_endian = "little") { + (0xCAFEBABEu32, 0xBAADCAFEu32) + } else { + (0xBAADCAFEu32, 0xCAFEBABEu32) }; let offset = PAGE_SIZE - mem::size_of::>(); + write( + &mut mmapped_buf, + offset, + PerfSample { + s_hdr: Sample { + header: perf_event_header { + type_: PERF_RECORD_SAMPLE as u32, + misc: 0, + size: mem::size_of::>() as u16, + }, + size: mem::size_of::() as u32, + }, + value: left, + }, + ); + write(&mut mmapped_buf, 0, right); mmapped_buf.mmap_page.data_tail = offset as u64; - write(&mut mmapped_buf, offset, sample); - write(&mut mmapped_buf, 0, 0xBAADCAFEu32); + + fake_mmap(&mut mmapped_buf); + let mut buf = PerfBuffer::open(1, PAGE_SIZE, 1).unwrap(); let mut out_bufs = [BytesMut::with_capacity(8)]; diff --git a/aya/src/maps/perf/perf_event_array.rs b/aya/src/maps/perf/perf_event_array.rs index f48826cc..994daa72 100644 --- a/aya/src/maps/perf/perf_event_array.rs +++ b/aya/src/maps/perf/perf_event_array.rs @@ -1,9 +1,10 @@ //! A map that can be used to receive events from eBPF programs using the linux [`perf`] API //! //! [`perf`]: https://perf.wiki.kernel.org/index.php/Main_Page. + use std::{ borrow::{Borrow, BorrowMut}, - ops::Deref, + ops::Deref as _, os::fd::{AsFd, AsRawFd, BorrowedFd, RawFd}, path::Path, sync::Arc, @@ -13,8 +14,8 @@ use bytes::BytesMut; use crate::{ maps::{ - perf::{Events, PerfBuffer, PerfBufferError}, MapData, MapError, PinError, + perf::{Events, PerfBuffer, PerfBufferError}, }, sys::bpf_map_update_elem, util::page_size, @@ -64,7 +65,7 @@ impl> AsFd for PerfEventArrayBuffer { impl> AsRawFd for PerfEventArrayBuffer { fn as_raw_fd(&self) -> RawFd { - self.buf.as_fd().as_raw_fd() + self.as_fd().as_raw_fd() } } @@ -122,7 +123,7 @@ impl> AsRawFd for PerfEventArrayBuffer { /// // eBPF programs are going to write to the EVENTS perf array, using the id of the CPU they're /// // running on as the array index. /// let mut perf_buffers = Vec::new(); -/// for cpu_id in online_cpus()? { +/// for cpu_id in online_cpus().map_err(|(_, error)| error)? { /// // this perf buffer will receive events generated on the CPU with id cpu_id /// perf_buffers.push(perf_array.open(cpu_id, None)?); /// } @@ -151,16 +152,9 @@ impl> AsRawFd for PerfEventArrayBuffer { /// amounts of data, in order not to lose events you might want to process each /// [`PerfEventArrayBuffer`] on a different thread. /// -/// # Async -/// -/// If you are using [tokio] or [async-std], you should use `AsyncPerfEventArray` which -/// efficiently integrates with those and provides a nicer `Future` based API. -/// /// [`perf`]: https://perf.wiki.kernel.org/index.php/Main_Page /// [epoll]: https://docs.rs/epoll /// [mio]: https://docs.rs/mio -/// [tokio]: https://docs.rs/tokio -/// [async-std]: https://docs.rs/async-std #[doc(alias = "BPF_MAP_TYPE_PERF_EVENT_ARRAY")] pub struct PerfEventArray { map: Arc, @@ -199,8 +193,7 @@ impl> PerfEventArray { let map_data: &MapData = self.map.deref().borrow(); let map_fd = map_data.fd().as_fd(); let buf = PerfBuffer::open(index, self.page_size, page_count.unwrap_or(2))?; - bpf_map_update_elem(map_fd, Some(&index), &buf.as_fd().as_raw_fd(), 0) - .map_err(|(_, io_error)| io_error)?; + bpf_map_update_elem(map_fd, Some(&index), &buf.as_fd().as_raw_fd(), 0)?; Ok(PerfEventArrayBuffer { buf, diff --git a/aya/src/maps/queue.rs b/aya/src/maps/queue.rs index 9c342525..d2db245c 100644 --- a/aya/src/maps/queue.rs +++ b/aya/src/maps/queue.rs @@ -1,4 +1,5 @@ //! A FIFO queue. + use std::{ borrow::{Borrow, BorrowMut}, marker::PhantomData, @@ -6,9 +7,9 @@ use std::{ }; use crate::{ - maps::{check_kv_size, MapData, MapError}, - sys::{bpf_map_lookup_and_delete_elem, bpf_map_push_elem, SyscallError}, Pod, + maps::{MapData, MapError, check_kv_size}, + sys::{SyscallError, bpf_map_lookup_and_delete_elem, bpf_map_push_elem}, }; /// A FIFO queue. @@ -63,12 +64,13 @@ impl, V: Pod> Queue { pub fn pop(&mut self, flags: u64) -> Result { let fd = self.inner.borrow().fd().as_fd(); - let value = bpf_map_lookup_and_delete_elem::(fd, None, flags).map_err( - |(_, io_error)| SyscallError { - call: "bpf_map_lookup_and_delete_elem", - io_error, - }, - )?; + let value = + bpf_map_lookup_and_delete_elem::(fd, None, flags).map_err(|io_error| { + SyscallError { + call: "bpf_map_lookup_and_delete_elem", + io_error, + } + })?; value.ok_or(MapError::ElementNotFound) } @@ -79,10 +81,11 @@ impl, V: Pod> Queue { /// [`MapError::SyscallError`] if `bpf_map_update_elem` fails. pub fn push(&mut self, value: impl Borrow, flags: u64) -> Result<(), MapError> { let fd = self.inner.borrow().fd().as_fd(); - bpf_map_push_elem(fd, value.borrow(), flags).map_err(|(_, io_error)| SyscallError { - call: "bpf_map_push_elem", - io_error, - })?; - Ok(()) + bpf_map_push_elem(fd, value.borrow(), flags) + .map_err(|io_error| SyscallError { + call: "bpf_map_push_elem", + io_error, + }) + .map_err(Into::into) } } diff --git a/aya/src/maps/ring_buf.rs b/aya/src/maps/ring_buf.rs index e4cb3cb4..4b08eb11 100644 --- a/aya/src/maps/ring_buf.rs +++ b/aya/src/maps/ring_buf.rs @@ -6,24 +6,19 @@ use std::{ borrow::Borrow, - ffi::{c_int, c_void}, fmt::{self, Debug, Formatter}, - io, mem, + mem, ops::Deref, - os::fd::{AsFd as _, AsRawFd, BorrowedFd, RawFd}, - ptr, - ptr::NonNull, - slice, + os::fd::{AsFd, AsRawFd, BorrowedFd, RawFd}, sync::atomic::{AtomicU32, AtomicUsize, Ordering}, }; -use libc::{munmap, off_t, MAP_FAILED, MAP_SHARED, PROT_READ, PROT_WRITE}; +use aya_obj::generated::{BPF_RINGBUF_BUSY_BIT, BPF_RINGBUF_DISCARD_BIT, BPF_RINGBUF_HDR_SZ}; +use libc::{MAP_SHARED, PROT_READ, PROT_WRITE}; use crate::{ - generated::{BPF_RINGBUF_BUSY_BIT, BPF_RINGBUF_DISCARD_BIT, BPF_RINGBUF_HDR_SZ}, maps::{MapData, MapError}, - sys::{mmap, SyscallError}, - util::page_size, + util::{MMap, page_size}, }; /// A map that can be used to receive events from eBPF programs. @@ -35,7 +30,7 @@ use crate::{ /// reasons. By default, a notification will be sent if the consumer is caught up at the time of /// committing. The eBPF program can use the `BPF_RB_NO_WAKEUP` or `BPF_RB_FORCE_WAKEUP` flags to /// control this behavior. -/// * On the eBPF side, it supports the reverse-commit pattern where the event can be directly +/// * On the eBPF side, it supports the reserve-commit pattern where the event can be directly /// written into the ring without copying from a temporary location. /// * Dropped sample notifications go to the eBPF program as the return value of `reserve`/`output`, /// and not the userspace reader. This might require extra code to handle, but allows for more @@ -78,7 +73,7 @@ use crate::{ /// let mut guard = poll.readable(); /// let ring_buf = guard.inner_mut(); /// while let Some(item) = ring_buf.next() { -/// println!("Received: {:?}", item); +/// println!("received: {:?}", item); /// } /// guard.clear_ready(); /// } @@ -88,9 +83,11 @@ use crate::{ /// # Polling /// /// In the example above the implementations of poll(), poll.readable(), guard.inner_mut(), and -/// guard.clear_ready() are not given. RingBuf implements the AsRawFd trait, so you can implement -/// polling using any crate that can poll file descriptors, like epoll, mio etc. The above example -/// API is motivated by that of [`tokio::io::unix::AsyncFd`]. +/// guard.clear_ready() are not given. RingBuf implements [`AsRawFd`], so you can implement polling +/// using any crate that can poll file descriptors, like epoll, mio etc. The above example API is +/// motivated by that of [`tokio::io::unix::AsyncFd`]. +/// +/// [`tokio::io::unix::AsyncFd`]: https://docs.rs/tokio/latest/tokio/io/unix/struct.AsyncFd.html #[doc(alias = "BPF_MAP_TYPE_RINGBUF")] pub struct RingBuf { map: T, @@ -126,7 +123,7 @@ impl RingBuf { // lifetime of the iterator in the returned `RingBufItem`. If the Iterator::Item leveraged GATs, // one could imagine an implementation of `Iterator` that would work. GATs are stabilized in // Rust 1.65, but there's not yet a trait that the community seems to have standardized around. - #[allow(clippy::should_implement_trait)] + #[expect(clippy::should_implement_trait)] pub fn next(&mut self) -> Option> { let Self { consumer, producer, .. @@ -135,15 +132,20 @@ impl RingBuf { } } -/// Access to the RawFd can be used to construct an AsyncFd for use with epoll. -impl> AsRawFd for RingBuf { - fn as_raw_fd(&self) -> RawFd { +impl> AsFd for RingBuf { + fn as_fd(&self) -> BorrowedFd<'_> { let Self { map, consumer: _, producer: _, } = self; - map.borrow().fd().as_fd().as_raw_fd() + map.borrow().fd().as_fd() + } +} + +impl> AsRawFd for RingBuf { + fn as_raw_fd(&self) -> RawFd { + self.as_fd().as_raw_fd() } } @@ -206,10 +208,7 @@ impl ConsumerMetadata { impl AsRef for ConsumerMetadata { fn as_ref(&self) -> &AtomicUsize { - let Self { - mmap: MMap { ptr, .. }, - } = self; - unsafe { ptr.cast::().as_ref() } + unsafe { self.mmap.ptr().cast::().as_ref() } } } @@ -304,6 +303,10 @@ impl ProducerData { let len = page_size + 2 * usize::try_from(byte_size).unwrap(); let mmap = MMap::new(fd, len, PROT_READ, MAP_SHARED, offset.try_into().unwrap())?; + // The producer position may be non-zero if the map is being loaded from a pin, or the map + // has been used previously; load the initial value of the producer position from the mmap. + let pos_cache = load_producer_pos(&mmap); + // byte_size is required to be a power of two multiple of page_size (which implicitly is a // power of 2), so subtracting one will create a bitmask for values less than byte_size. debug_assert!(byte_size.is_power_of_two()); @@ -311,19 +314,18 @@ impl ProducerData { Ok(Self { mmap, data_offset: page_size, - pos_cache: 0, + pos_cache, mask, }) } fn next<'a>(&'a mut self, consumer: &'a mut ConsumerPos) -> Option> { - let Self { + let &mut Self { ref mmap, - data_offset, - pos_cache, - mask, + ref mut data_offset, + ref mut pos_cache, + ref mut mask, } = self; - let pos = unsafe { mmap.ptr.cast().as_ref() }; let mmap_data = mmap.as_ref(); let data_pages = mmap_data.get(*data_offset..).unwrap_or_else(|| { panic!( @@ -332,7 +334,7 @@ impl ProducerData { mmap_data.len() ) }); - while data_available(pos, pos_cache, consumer) { + while data_available(mmap, pos_cache, consumer) { match read_item(data_pages, *mask, consumer) { Item::Busy => return None, Item::Discard { len } => consumer.consume(len), @@ -348,17 +350,15 @@ impl ProducerData { } fn data_available( - producer: &AtomicUsize, - cache: &mut usize, + producer: &MMap, + producer_cache: &mut usize, consumer: &ConsumerPos, ) -> bool { let ConsumerPos { pos: consumer, .. } = consumer; - if consumer == cache { - // This value is written using Release by the kernel [1], and should be read with - // Acquire to ensure that the prior writes to the entry header are visible. - // - // [1]: https://github.com/torvalds/linux/blob/eb26cbb1/kernel/bpf/ringbuf.c#L447-L448 - *cache = producer.load(Ordering::Acquire); + // Refresh the producer position cache if it appears that the consumer is caught up + // with the producer position. + if consumer == producer_cache { + *producer_cache = load_producer_pos(producer); } // Note that we don't compare the order of the values because the producer position may @@ -370,7 +370,7 @@ impl ProducerData { // producer position has wrapped around. // // [1]: https://github.com/torvalds/linux/blob/4b810bf0/kernel/bpf/ringbuf.c#L434-L440 - consumer != cache + consumer != producer_cache } fn read_item<'data>(data: &'data [u8], mask: u32, pos: &ConsumerPos) -> Item<'data> { @@ -381,8 +381,9 @@ impl ProducerData { panic!("{:?} not in {:?}", offset..offset + len, 0..data.len()) }) }; - let header_ptr = - must_get_data(offset, mem::size_of::()).as_ptr() as *const AtomicU32; + let header_ptr: *const AtomicU32 = must_get_data(offset, mem::size_of::()) + .as_ptr() + .cast(); // Pair the kernel's SeqCst write (implies Release) [1] with an Acquire load. This // ensures data written by the producer will be visible. // @@ -404,60 +405,11 @@ impl ProducerData { } } -// MMap corresponds to a memory-mapped region. -// -// The data is unmapped in Drop. -struct MMap { - ptr: NonNull, - len: usize, -} - -// Needed because NonNull is !Send and !Sync out of caution that the data -// might be aliased unsafely. -unsafe impl Send for MMap {} -unsafe impl Sync for MMap {} - -impl MMap { - fn new( - fd: BorrowedFd<'_>, - len: usize, - prot: c_int, - flags: c_int, - offset: off_t, - ) -> Result { - match unsafe { mmap(ptr::null_mut(), len, prot, flags, fd, offset) } { - MAP_FAILED => Err(MapError::SyscallError(SyscallError { - call: "mmap", - io_error: io::Error::last_os_error(), - })), - ptr => Ok(Self { - ptr: NonNull::new(ptr).ok_or( - // This should never happen, but to be paranoid, and so we never need to talk - // about a null pointer, we check it anyway. - MapError::SyscallError(SyscallError { - call: "mmap", - io_error: io::Error::new( - io::ErrorKind::Other, - "mmap returned null pointer", - ), - }), - )?, - len, - }), - } - } -} - -impl AsRef<[u8]> for MMap { - fn as_ref(&self) -> &[u8] { - let Self { ptr, len } = self; - unsafe { slice::from_raw_parts(ptr.as_ptr().cast(), *len) } - } -} - -impl Drop for MMap { - fn drop(&mut self) { - let Self { ptr, len } = *self; - unsafe { munmap(ptr.as_ptr(), len) }; - } +// Loads the producer position from the shared memory mmap. +fn load_producer_pos(producer: &MMap) -> usize { + // This value is written using Release by the kernel [1], and should be read with + // Acquire to ensure that the prior writes to the entry header are visible. + // + // [1]: https://github.com/torvalds/linux/blob/eb26cbb1/kernel/bpf/ringbuf.c#L447-L448 + unsafe { producer.ptr().cast::().as_ref() }.load(Ordering::Acquire) } diff --git a/aya/src/maps/sk_storage.rs b/aya/src/maps/sk_storage.rs new file mode 100644 index 00000000..18d2580c --- /dev/null +++ b/aya/src/maps/sk_storage.rs @@ -0,0 +1,65 @@ +//! A socket local storage map backed by `BPF_MAP_TYPE_SK_STORAGE`. + +use std::{ + borrow::{Borrow, BorrowMut}, + marker::PhantomData, + os::fd::AsRawFd, +}; + +use crate::{ + Pod, + maps::{MapData, MapError, check_kv_size, hash_map}, +}; + +/// A socket local storage map backed by `BPF_MAP_TYPE_SK_STORAGE`. +/// +/// This map type stores values that are owned by individual sockets. The map keys are socket file +/// descriptors and the values can be accessed both from eBPF using [`bpf_sk_storage_get`] and from +/// user space through the methods on this type. +/// +/// [`bpf_sk_storage_get`]: https://elixir.bootlin.com/linux/v6.12/source/include/uapi/linux/bpf.h#L4064-L4093 +#[doc(alias = "BPF_MAP_TYPE_SK_STORAGE")] +#[derive(Debug)] +pub struct SkStorage { + pub(crate) inner: T, + _v: PhantomData, +} + +impl, V: Pod> SkStorage { + pub(crate) fn new(map: T) -> Result { + let data = map.borrow(); + check_kv_size::(data)?; + + Ok(Self { + inner: map, + _v: PhantomData, + }) + } + + /// Returns the value associated with `socket`. + pub fn get(&self, socket: &impl AsRawFd, flags: u64) -> Result { + hash_map::get(self.inner.borrow(), &socket.as_raw_fd(), flags) + } +} + +impl, V: Pod> SkStorage { + /// Creates or updates the value associated with `socket`. + pub fn insert( + &mut self, + socket: &impl AsRawFd, + value: impl Borrow, + flags: u64, + ) -> Result<(), MapError> { + hash_map::insert( + self.inner.borrow_mut(), + &socket.as_raw_fd(), + value.borrow(), + flags, + ) + } + + /// Removes the storage associated with `socket`. + pub fn remove(&mut self, socket: &impl AsRawFd) -> Result<(), MapError> { + hash_map::remove(self.inner.borrow_mut(), &socket.as_raw_fd()) + } +} diff --git a/aya/src/maps/sock/sock_hash.rs b/aya/src/maps/sock/sock_hash.rs index 9be05ee4..cc5eb03d 100644 --- a/aya/src/maps/sock/sock_hash.rs +++ b/aya/src/maps/sock/sock_hash.rs @@ -1,16 +1,15 @@ use std::{ borrow::{Borrow, BorrowMut}, marker::PhantomData, - os::fd::{AsFd as _, AsRawFd, RawFd}, + os::fd::{AsRawFd, RawFd}, }; use crate::{ + Pod, maps::{ - check_kv_size, hash_map, sock::SockMapFd, IterableMap, MapData, MapError, MapFd, MapIter, - MapKeys, + IterableMap, MapData, MapError, MapFd, MapIter, MapKeys, check_kv_size, hash_map, + sock::SockMapFd, }, - sys::{bpf_map_lookup_elem, SyscallError}, - Pod, }; /// A hash map of TCP or UDP sockets. @@ -82,12 +81,7 @@ impl, K: Pod> SockHash { /// Returns the fd of the socket stored at the given key. pub fn get(&self, key: &K, flags: u64) -> Result { - let fd = self.inner.borrow().fd().as_fd(); - let value = bpf_map_lookup_elem(fd, key, flags).map_err(|(_, io_error)| SyscallError { - call: "bpf_map_lookup_elem", - io_error, - })?; - value.ok_or(MapError::KeyNotFound) + hash_map::get(self.inner.borrow(), key, flags) } /// An iterator visiting all key-value pairs in arbitrary order. The diff --git a/aya/src/maps/sock/sock_map.rs b/aya/src/maps/sock/sock_map.rs index f0590467..4e55b88a 100644 --- a/aya/src/maps/sock/sock_map.rs +++ b/aya/src/maps/sock/sock_map.rs @@ -2,12 +2,11 @@ use std::{ borrow::{Borrow, BorrowMut}, - os::fd::{AsFd as _, AsRawFd, RawFd}, + os::fd::{AsRawFd, RawFd}, }; -use crate::{ - maps::{check_bounds, check_kv_size, sock::SockMapFd, MapData, MapError, MapFd, MapKeys}, - sys::{bpf_map_delete_elem, bpf_map_update_elem, SyscallError}, +use crate::maps::{ + MapData, MapError, MapFd, MapKeys, check_bounds, check_kv_size, hash_map, sock::SockMapFd, }; /// An array of TCP or UDP sockets. @@ -85,30 +84,14 @@ impl> SockMap { /// Stores a socket into the map. pub fn set(&mut self, index: u32, socket: &I, flags: u64) -> Result<(), MapError> { let data = self.inner.borrow_mut(); - let fd = data.fd().as_fd(); check_bounds(data, index)?; - bpf_map_update_elem(fd, Some(&index), &socket.as_raw_fd(), flags).map_err( - |(_, io_error)| SyscallError { - call: "bpf_map_update_elem", - io_error, - }, - )?; - Ok(()) + hash_map::insert(data, &index, &socket.as_raw_fd(), flags) } /// Removes the socket stored at `index` from the map. pub fn clear_index(&mut self, index: &u32) -> Result<(), MapError> { let data = self.inner.borrow_mut(); - let fd = data.fd().as_fd(); check_bounds(data, *index)?; - bpf_map_delete_elem(fd, index) - .map(|_| ()) - .map_err(|(_, io_error)| { - SyscallError { - call: "bpf_map_delete_elem", - io_error, - } - .into() - }) + hash_map::remove(data, index) } } diff --git a/aya/src/maps/stack.rs b/aya/src/maps/stack.rs index 8a7b94bd..010216c8 100644 --- a/aya/src/maps/stack.rs +++ b/aya/src/maps/stack.rs @@ -1,4 +1,5 @@ //! A LIFO stack. + use std::{ borrow::{Borrow, BorrowMut}, marker::PhantomData, @@ -6,9 +7,9 @@ use std::{ }; use crate::{ - maps::{check_kv_size, MapData, MapError}, - sys::{bpf_map_lookup_and_delete_elem, bpf_map_update_elem, SyscallError}, Pod, + maps::{MapData, MapError, check_kv_size}, + sys::{SyscallError, bpf_map_lookup_and_delete_elem, bpf_map_update_elem}, }; /// A LIFO stack. @@ -63,12 +64,13 @@ impl, V: Pod> Stack { pub fn pop(&mut self, flags: u64) -> Result { let fd = self.inner.borrow().fd().as_fd(); - let value = bpf_map_lookup_and_delete_elem::(fd, None, flags).map_err( - |(_, io_error)| SyscallError { - call: "bpf_map_lookup_and_delete_elem", - io_error, - }, - )?; + let value = + bpf_map_lookup_and_delete_elem::(fd, None, flags).map_err(|io_error| { + SyscallError { + call: "bpf_map_lookup_and_delete_elem", + io_error, + } + })?; value.ok_or(MapError::ElementNotFound) } @@ -79,12 +81,11 @@ impl, V: Pod> Stack { /// [`MapError::SyscallError`] if `bpf_map_update_elem` fails. pub fn push(&mut self, value: impl Borrow, flags: u64) -> Result<(), MapError> { let fd = self.inner.borrow().fd().as_fd(); - bpf_map_update_elem(fd, None::<&u32>, value.borrow(), flags).map_err(|(_, io_error)| { - SyscallError { + bpf_map_update_elem(fd, None::<&u32>, value.borrow(), flags) + .map_err(|io_error| SyscallError { call: "bpf_map_update_elem", io_error, - } - })?; - Ok(()) + }) + .map_err(Into::into) } } diff --git a/aya/src/maps/stack_trace.rs b/aya/src/maps/stack_trace.rs index 74b85b66..0d324980 100644 --- a/aya/src/maps/stack_trace.rs +++ b/aya/src/maps/stack_trace.rs @@ -1,6 +1,7 @@ //! A hash map of kernel or user space stack traces. //! //! See [`StackTraceMap`] for documentation and examples. + use std::{ borrow::{Borrow, BorrowMut}, fs, io, mem, @@ -10,8 +11,8 @@ use std::{ }; use crate::{ - maps::{IterableMap, MapData, MapError, MapIter, MapKeys}, - sys::{bpf_map_delete_elem, bpf_map_lookup_elem_ptr, SyscallError}, + maps::{IterableMap, MapData, MapError, MapIter, MapKeys, hash_map}, + sys::{SyscallError, bpf_map_lookup_elem_ptr}, }; /// A hash map of kernel or user space stack traces. @@ -113,7 +114,7 @@ impl> StackTraceMap { let mut frames = vec![0; self.max_stack_depth]; bpf_map_lookup_elem_ptr(fd, Some(stack_id), frames.as_mut_ptr(), flags) - .map_err(|(_, io_error)| SyscallError { + .map_err(|io_error| SyscallError { call: "bpf_map_lookup_elem", io_error, })? @@ -166,16 +167,7 @@ impl<'a, T: Borrow> IntoIterator for &'a StackTraceMap { impl> StackTraceMap { /// Removes the stack trace with the given stack_id. pub fn remove(&mut self, stack_id: &u32) -> Result<(), MapError> { - let fd = self.inner.borrow().fd().as_fd(); - bpf_map_delete_elem(fd, stack_id) - .map(|_| ()) - .map_err(|(_, io_error)| { - SyscallError { - call: "bpf_map_delete_elem", - io_error, - } - .into() - }) + hash_map::remove(self.inner.borrow_mut(), stack_id) } } @@ -205,5 +197,5 @@ fn sysctl(key: &str) -> Result { let val = fs::read_to_string(Path::new("/proc/sys").join(key))?; val.trim() .parse::() - .map_err(|_| io::Error::new(io::ErrorKind::InvalidData, val)) + .map_err(|_: T::Err| io::Error::new(io::ErrorKind::InvalidData, val)) } diff --git a/aya/src/maps/xdp/cpu_map.rs b/aya/src/maps/xdp/cpu_map.rs index b5c0727c..b0c70628 100644 --- a/aya/src/maps/xdp/cpu_map.rs +++ b/aya/src/maps/xdp/cpu_map.rs @@ -3,17 +3,17 @@ use std::{ borrow::{Borrow, BorrowMut}, num::NonZeroU32, - os::fd::{AsFd, AsRawFd}, + os::fd::{AsFd as _, AsRawFd as _}, }; use aya_obj::generated::bpf_cpumap_val; use super::XdpMapError; use crate::{ - maps::{check_bounds, check_kv_size, IterableMap, MapData, MapError}, + FEATURES, Pod, + maps::{IterableMap, MapData, MapError, check_bounds, check_kv_size}, programs::ProgramFd, - sys::{bpf_map_lookup_elem, bpf_map_update_elem, SyscallError}, - Pod, FEATURES, + sys::{SyscallError, bpf_map_lookup_elem, bpf_map_update_elem}, }; /// An array of available CPUs. @@ -29,16 +29,17 @@ use crate::{ /// ```no_run /// # let elf_bytes = &[]; /// use aya::maps::xdp::CpuMap; +/// use aya::util::nr_cpus; /// -/// let ncpus = aya::util::nr_cpus().unwrap() as u32; +/// let nr_cpus = nr_cpus().unwrap() as u32; /// let mut bpf = aya::EbpfLoader::new() -/// .set_max_entries("CPUS", ncpus) +/// .map_max_entries("CPUS", nr_cpus) /// .load(elf_bytes) /// .unwrap(); /// let mut cpumap = CpuMap::try_from(bpf.map_mut("CPUS").unwrap())?; /// let flags = 0; /// let queue_size = 2048; -/// for i in 0..ncpus { +/// for i in 0..nr_cpus { /// cpumap.set(i, queue_size, None, flags); /// } /// @@ -69,6 +70,7 @@ impl> CpuMap { /// Returns the number of elements in the array. /// /// This corresponds to the value of `bpf_map_def::max_entries` on the eBPF side. + #[expect(clippy::len_without_is_empty)] pub fn len(&self) -> u32 { self.inner.borrow().obj.max_entries() } @@ -102,7 +104,7 @@ impl> CpuMap { }) }; value - .map_err(|(_, io_error)| SyscallError { + .map_err(|io_error| SyscallError { call: "bpf_map_lookup_elem", io_error, })? @@ -162,13 +164,13 @@ impl> CpuMap { bpf_map_update_elem(fd, Some(&cpu_index), &queue_size, flags) }; - res.map_err(|(_, io_error)| { + res.map_err(|io_error| { MapError::from(SyscallError { call: "bpf_map_update_elem", io_error, }) - })?; - Ok(()) + }) + .map_err(Into::into) } } diff --git a/aya/src/maps/xdp/dev_map.rs b/aya/src/maps/xdp/dev_map.rs index 44062df5..41b9935b 100644 --- a/aya/src/maps/xdp/dev_map.rs +++ b/aya/src/maps/xdp/dev_map.rs @@ -3,17 +3,17 @@ use std::{ borrow::{Borrow, BorrowMut}, num::NonZeroU32, - os::fd::{AsFd, AsRawFd}, + os::fd::{AsFd as _, AsRawFd as _}, }; use aya_obj::generated::bpf_devmap_val; use super::XdpMapError; use crate::{ - maps::{check_bounds, check_kv_size, IterableMap, MapData, MapError}, + FEATURES, Pod, + maps::{IterableMap, MapData, MapError, check_bounds, check_kv_size}, programs::ProgramFd, - sys::{bpf_map_lookup_elem, bpf_map_update_elem, SyscallError}, - Pod, FEATURES, + sys::{SyscallError, bpf_map_lookup_elem, bpf_map_update_elem}, }; /// An array of network devices. @@ -61,6 +61,7 @@ impl> DevMap { /// Returns the number of elements in the array. /// /// This corresponds to the value of `bpf_map_def::max_entries` on the eBPF side. + #[expect(clippy::len_without_is_empty)] pub fn len(&self) -> u32 { self.inner.borrow().obj.max_entries() } @@ -94,7 +95,7 @@ impl> DevMap { }) }; value - .map_err(|(_, io_error)| SyscallError { + .map_err(|io_error| SyscallError { call: "bpf_map_lookup_elem", io_error, })? @@ -154,13 +155,13 @@ impl> DevMap { bpf_map_update_elem(fd, Some(&index), &target_if_index, flags) }; - res.map_err(|(_, io_error)| { + res.map_err(|io_error| { MapError::from(SyscallError { call: "bpf_map_update_elem", io_error, }) - })?; - Ok(()) + }) + .map_err(Into::into) } } diff --git a/aya/src/maps/xdp/dev_map_hash.rs b/aya/src/maps/xdp/dev_map_hash.rs index 1b941bc4..90528ecb 100644 --- a/aya/src/maps/xdp/dev_map_hash.rs +++ b/aya/src/maps/xdp/dev_map_hash.rs @@ -1,19 +1,19 @@ -//! An hashmap of network devices. +//! A hashmap of network devices. use std::{ borrow::{Borrow, BorrowMut}, num::NonZeroU32, - os::fd::{AsFd, AsRawFd}, + os::fd::{AsFd as _, AsRawFd as _}, }; use aya_obj::generated::bpf_devmap_val; -use super::{dev_map::DevMapValue, XdpMapError}; +use super::{XdpMapError, dev_map::DevMapValue}; use crate::{ - maps::{check_kv_size, hash_map, IterableMap, MapData, MapError, MapIter, MapKeys}, - programs::ProgramFd, - sys::{bpf_map_lookup_elem, SyscallError}, FEATURES, + maps::{IterableMap, MapData, MapError, MapIter, MapKeys, check_kv_size, hash_map}, + programs::ProgramFd, + sys::{SyscallError, bpf_map_lookup_elem}, }; /// An hashmap of network devices. @@ -84,7 +84,7 @@ impl> DevMapHash { }) }; value - .map_err(|(_, io_error)| SyscallError { + .map_err(|io_error| SyscallError { call: "bpf_map_lookup_elem", io_error, })? diff --git a/aya/src/maps/xdp/xsk_map.rs b/aya/src/maps/xdp/xsk_map.rs index 95c593cc..2b3cd57f 100644 --- a/aya/src/maps/xdp/xsk_map.rs +++ b/aya/src/maps/xdp/xsk_map.rs @@ -2,13 +2,10 @@ use std::{ borrow::{Borrow, BorrowMut}, - os::fd::{AsFd, AsRawFd, RawFd}, + os::fd::{AsRawFd, RawFd}, }; -use crate::{ - maps::{check_bounds, check_kv_size, MapData, MapError}, - sys::{bpf_map_update_elem, SyscallError}, -}; +use crate::maps::{MapData, MapError, check_bounds, check_kv_size, hash_map}; /// An array of AF_XDP sockets. /// @@ -50,6 +47,7 @@ impl> XskMap { /// Returns the number of elements in the array. /// /// This corresponds to the value of `bpf_map_def::max_entries` on the eBPF side. + #[expect(clippy::len_without_is_empty)] pub fn len(&self) -> u32 { self.inner.borrow().obj.max_entries() } @@ -69,13 +67,18 @@ impl> XskMap { pub fn set(&mut self, index: u32, socket_fd: impl AsRawFd, flags: u64) -> Result<(), MapError> { let data = self.inner.borrow_mut(); check_bounds(data, index)?; - let fd = data.fd().as_fd(); - bpf_map_update_elem(fd, Some(&index), &socket_fd.as_raw_fd(), flags).map_err( - |(_, io_error)| SyscallError { - call: "bpf_map_update_elem", - io_error, - }, - )?; - Ok(()) + hash_map::insert(data, &index, &socket_fd.as_raw_fd(), flags) + } + + /// Un-sets the `AF_XDP` socket at a given index. + /// + /// # Errors + /// + /// Returns [`MapError::OutOfBounds`] if `index` is out of bounds, [`MapError::SyscallError`] + /// if `bpf_map_delete_elem` fails. + pub fn unset(&mut self, index: u32) -> Result<(), MapError> { + let data = self.inner.borrow_mut(); + check_bounds(data, index)?; + hash_map::remove(data, &index) } } diff --git a/aya/src/programs/cgroup_device.rs b/aya/src/programs/cgroup_device.rs index 15263791..ccbd01ba 100644 --- a/aya/src/programs/cgroup_device.rs +++ b/aya/src/programs/cgroup_device.rs @@ -2,13 +2,16 @@ use std::os::fd::AsFd; +use aya_obj::generated::{ + bpf_attach_type::BPF_CGROUP_DEVICE, bpf_prog_type::BPF_PROG_TYPE_CGROUP_DEVICE, +}; + use crate::{ - generated::{bpf_attach_type::BPF_CGROUP_DEVICE, bpf_prog_type::BPF_PROG_TYPE_CGROUP_DEVICE}, programs::{ - bpf_prog_get_fd_by_id, define_link_wrapper, load_program, query, FdLink, Link, - ProgAttachLink, ProgramData, ProgramError, ProgramFd, + CgroupAttachMode, FdLink, Link, ProgAttachLink, ProgramData, ProgramError, ProgramFd, + ProgramType, bpf_prog_get_fd_by_id, define_link_wrapper, id_as_key, load_program, query, }, - sys::{bpf_link_create, LinkTarget, SyscallError}, + sys::{LinkTarget, ProgQueryTarget, SyscallError, bpf_link_create}, util::KernelVersion, }; @@ -38,12 +41,12 @@ use crate::{ /// # Ebpf(#[from] aya::EbpfError) /// # } /// # let mut bpf = aya::Ebpf::load(&[])?; -/// use aya::programs::CgroupDevice; +/// use aya::programs::{CgroupAttachMode, CgroupDevice}; /// /// let cgroup = std::fs::File::open("/sys/fs/cgroup/unified")?; /// let program: &mut CgroupDevice = bpf.program_mut("cgroup_dev").unwrap().try_into()?; /// program.load()?; -/// program.attach(cgroup)?; +/// program.attach(cgroup, CgroupAttachMode::Single)?; /// # Ok::<(), Error>(()) /// ``` #[derive(Debug)] @@ -53,6 +56,9 @@ pub struct CgroupDevice { } impl CgroupDevice { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::CgroupDevice; + /// Loads the program inside the kernel pub fn load(&mut self) -> Result<(), ProgramError> { load_program(BPF_PROG_TYPE_CGROUP_DEVICE, &mut self.data) @@ -61,20 +67,24 @@ impl CgroupDevice { /// Attaches the program to the given cgroup. /// /// The returned value can be used to detach, see [CgroupDevice::detach] - pub fn attach(&mut self, cgroup: T) -> Result { + pub fn attach( + &mut self, + cgroup: T, + mode: CgroupAttachMode, + ) -> Result { let prog_fd = self.fd()?; let prog_fd = prog_fd.as_fd(); let cgroup_fd = cgroup.as_fd(); - if KernelVersion::current().unwrap() >= KernelVersion::new(5, 7, 0) { + if KernelVersion::at_least(5, 7, 0) { let link_fd = bpf_link_create( prog_fd, LinkTarget::Fd(cgroup_fd), BPF_CGROUP_DEVICE, + mode.into(), None, - 0, ) - .map_err(|(_, io_error)| SyscallError { + .map_err(|io_error| SyscallError { call: "bpf_link_create", io_error, })?; @@ -84,7 +94,7 @@ impl CgroupDevice { FdLink::new(link_fd), ))) } else { - let link = ProgAttachLink::attach(prog_fd, cgroup_fd, BPF_CGROUP_DEVICE)?; + let link = ProgAttachLink::attach(prog_fd, cgroup_fd, BPF_CGROUP_DEVICE, mode)?; self.data .links @@ -94,34 +104,22 @@ impl CgroupDevice { } } - /// Takes ownership of the link referenced by the provided link_id. - /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. - pub fn take_link( - &mut self, - link_id: CgroupDeviceLinkId, - ) -> Result { - self.data.take_link(link_id) - } - - /// Detaches the program - /// - /// See [CgroupDevice::attach]. - pub fn detach(&mut self, link_id: CgroupDeviceLinkId) -> Result<(), ProgramError> { - self.data.links.remove(link_id) - } - /// Queries the cgroup for attached programs. pub fn query(target_fd: T) -> Result, ProgramError> { let target_fd = target_fd.as_fd(); - let prog_ids = query(target_fd, BPF_CGROUP_DEVICE, 0, &mut None)?; + let (_, prog_ids) = query( + ProgQueryTarget::Fd(target_fd), + BPF_CGROUP_DEVICE, + 0, + &mut None, + )?; prog_ids .into_iter() .map(|prog_id| { let prog_fd = bpf_prog_get_fd_by_id(prog_id)?; let target_fd = target_fd.try_clone_to_owned()?; + let target_fd = crate::MockableFd::from_fd(target_fd); let prog_fd = ProgramFd(prog_fd); Ok(CgroupDeviceLink::new(CgroupDeviceLinkInner::ProgAttach( ProgAttachLink::new(prog_fd, target_fd, BPF_CGROUP_DEVICE), @@ -161,11 +159,12 @@ impl Link for CgroupDeviceLinkInner { } } +id_as_key!(CgroupDeviceLinkInner, CgroupDeviceLinkIdInner); + define_link_wrapper!( - /// The link used by [CgroupDevice] programs. CgroupDeviceLink, - /// The type returned by [CgroupDevice::attach]. Can be passed to [CgroupDevice::detach]. CgroupDeviceLinkId, CgroupDeviceLinkInner, - CgroupDeviceLinkIdInner + CgroupDeviceLinkIdInner, + CgroupDevice, ); diff --git a/aya/src/programs/cgroup_skb.rs b/aya/src/programs/cgroup_skb.rs index 84749423..28f053bb 100644 --- a/aya/src/programs/cgroup_skb.rs +++ b/aya/src/programs/cgroup_skb.rs @@ -2,17 +2,19 @@ use std::{hash::Hash, os::fd::AsFd, path::Path}; +use aya_obj::generated::{ + bpf_attach_type::{BPF_CGROUP_INET_EGRESS, BPF_CGROUP_INET_INGRESS}, + bpf_prog_type::BPF_PROG_TYPE_CGROUP_SKB, +}; + use crate::{ - generated::{ - bpf_attach_type::{BPF_CGROUP_INET_EGRESS, BPF_CGROUP_INET_INGRESS}, - bpf_prog_type::BPF_PROG_TYPE_CGROUP_SKB, - }, + VerifierLogLevel, programs::{ - define_link_wrapper, load_program, FdLink, Link, ProgAttachLink, ProgramData, ProgramError, + CgroupAttachMode, FdLink, Link, ProgAttachLink, ProgramData, ProgramError, ProgramType, + define_link_wrapper, id_as_key, impl_try_into_fdlink, load_program, }, - sys::{bpf_link_create, LinkTarget, SyscallError}, + sys::{LinkTarget, SyscallError, bpf_link_create}, util::KernelVersion, - VerifierLogLevel, }; /// A program used to inspect or filter network activity for a given cgroup. @@ -43,30 +45,31 @@ use crate::{ /// # } /// # let mut bpf = aya::Ebpf::load(&[])?; /// use std::fs::File; -/// use aya::programs::{CgroupSkb, CgroupSkbAttachType}; +/// use aya::programs::{CgroupAttachMode, CgroupSkb, CgroupSkbAttachType}; /// /// let file = File::open("/sys/fs/cgroup/unified")?; /// let egress: &mut CgroupSkb = bpf.program_mut("egress_filter").unwrap().try_into()?; /// egress.load()?; -/// egress.attach(file, CgroupSkbAttachType::Egress)?; +/// egress.attach(file, CgroupSkbAttachType::Egress, CgroupAttachMode::Single)?; /// # Ok::<(), Error>(()) /// ``` #[derive(Debug)] #[doc(alias = "BPF_PROG_TYPE_CGROUP_SKB")] pub struct CgroupSkb { pub(crate) data: ProgramData, - pub(crate) expected_attach_type: Option, + pub(crate) attach_type: Option, } impl CgroupSkb { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::CgroupSkb; + /// Loads the program inside the kernel. pub fn load(&mut self) -> Result<(), ProgramError> { - self.data.expected_attach_type = - self.expected_attach_type - .map(|attach_type| match attach_type { - CgroupSkbAttachType::Ingress => BPF_CGROUP_INET_INGRESS, - CgroupSkbAttachType::Egress => BPF_CGROUP_INET_EGRESS, - }); + self.data.expected_attach_type = self.attach_type.map(|attach_type| match attach_type { + CgroupSkbAttachType::Ingress => BPF_CGROUP_INET_INGRESS, + CgroupSkbAttachType::Egress => BPF_CGROUP_INET_EGRESS, + }); load_program(BPF_PROG_TYPE_CGROUP_SKB, &mut self.data) } @@ -77,7 +80,7 @@ impl CgroupSkb { /// method returns `None` for programs defined with the generic section /// `cgroup/skb`. pub fn expected_attach_type(&self) -> &Option { - &self.expected_attach_type + &self.attach_type } /// Attaches the program to the given cgroup. @@ -87,6 +90,7 @@ impl CgroupSkb { &mut self, cgroup: T, attach_type: CgroupSkbAttachType, + mode: CgroupAttachMode, ) -> Result { let prog_fd = self.fd()?; let prog_fd = prog_fd.as_fd(); @@ -96,19 +100,25 @@ impl CgroupSkb { CgroupSkbAttachType::Ingress => BPF_CGROUP_INET_INGRESS, CgroupSkbAttachType::Egress => BPF_CGROUP_INET_EGRESS, }; - if KernelVersion::current().unwrap() >= KernelVersion::new(5, 7, 0) { - let link_fd = bpf_link_create(prog_fd, LinkTarget::Fd(cgroup_fd), attach_type, None, 0) - .map_err(|(_, io_error)| SyscallError { - call: "bpf_link_create", - io_error, - })?; + if KernelVersion::at_least(5, 7, 0) { + let link_fd = bpf_link_create( + prog_fd, + LinkTarget::Fd(cgroup_fd), + attach_type, + mode.into(), + None, + ) + .map_err(|io_error| SyscallError { + call: "bpf_link_create", + io_error, + })?; self.data .links .insert(CgroupSkbLink::new(CgroupSkbLinkInner::Fd(FdLink::new( link_fd, )))) } else { - let link = ProgAttachLink::attach(prog_fd, cgroup_fd, attach_type)?; + let link = ProgAttachLink::attach(prog_fd, cgroup_fd, attach_type, mode)?; self.data .links @@ -116,21 +126,6 @@ impl CgroupSkb { } } - /// Takes ownership of the link referenced by the provided link_id. - /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. - pub fn take_link(&mut self, link_id: CgroupSkbLinkId) -> Result { - self.data.take_link(link_id) - } - - /// Detaches the program. - /// - /// See [CgroupSkb::attach]. - pub fn detach(&mut self, link_id: CgroupSkbLinkId) -> Result<(), ProgramError> { - self.data.links.remove(link_id) - } - /// Creates a program from a pinned entry on a bpffs. /// /// Existing links will not be populated. To work with existing links you should use [`crate::programs::links::PinnedLink`]. @@ -144,7 +139,7 @@ impl CgroupSkb { let data = ProgramData::from_pinned_path(path, VerifierLogLevel::default())?; Ok(Self { data, - expected_attach_type: Some(expected_attach_type), + attach_type: Some(expected_attach_type), }) } } @@ -179,15 +174,18 @@ impl Link for CgroupSkbLinkInner { } } +id_as_key!(CgroupSkbLinkInner, CgroupSkbLinkIdInner); + define_link_wrapper!( - /// The link used by [CgroupSkb] programs. CgroupSkbLink, - /// The type returned by [CgroupSkb::attach]. Can be passed to [CgroupSkb::detach]. CgroupSkbLinkId, CgroupSkbLinkInner, - CgroupSkbLinkIdInner + CgroupSkbLinkIdInner, + CgroupSkb, ); +impl_try_into_fdlink!(CgroupSkbLink, CgroupSkbLinkInner); + /// Defines where to attach a [`CgroupSkb`] program. #[derive(Copy, Clone, Debug)] pub enum CgroupSkbAttachType { diff --git a/aya/src/programs/cgroup_sock.rs b/aya/src/programs/cgroup_sock.rs index 24f07869..4b1b768e 100644 --- a/aya/src/programs/cgroup_sock.rs +++ b/aya/src/programs/cgroup_sock.rs @@ -2,16 +2,17 @@ use std::{hash::Hash, os::fd::AsFd, path::Path}; +use aya_obj::generated::bpf_prog_type::BPF_PROG_TYPE_CGROUP_SOCK; pub use aya_obj::programs::CgroupSockAttachType; use crate::{ - generated::bpf_prog_type::BPF_PROG_TYPE_CGROUP_SOCK, + VerifierLogLevel, programs::{ - define_link_wrapper, load_program, FdLink, Link, ProgAttachLink, ProgramData, ProgramError, + CgroupAttachMode, FdLink, Link, ProgAttachLink, ProgramData, ProgramError, ProgramType, + define_link_wrapper, id_as_key, impl_try_into_fdlink, load_program, }, - sys::{bpf_link_create, LinkTarget, SyscallError}, + sys::{LinkTarget, SyscallError, bpf_link_create}, util::KernelVersion, - VerifierLogLevel, }; /// A program that is called on socket creation, bind and release. @@ -41,12 +42,12 @@ use crate::{ /// # } /// # let mut bpf = aya::Ebpf::load(&[])?; /// use std::fs::File; -/// use aya::programs::{CgroupSock, CgroupSockAttachType}; +/// use aya::programs::{CgroupAttachMode, CgroupSock, CgroupSockAttachType}; /// /// let file = File::open("/sys/fs/cgroup/unified")?; /// let bind: &mut CgroupSock = bpf.program_mut("bind").unwrap().try_into()?; /// bind.load()?; -/// bind.attach(file)?; +/// bind.attach(file, CgroupAttachMode::Single)?; /// # Ok::<(), Error>(()) /// ``` #[derive(Debug)] @@ -57,6 +58,9 @@ pub struct CgroupSock { } impl CgroupSock { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::CgroupSock; + /// Loads the program inside the kernel. pub fn load(&mut self) -> Result<(), ProgramError> { self.data.expected_attach_type = Some(self.attach_type.into()); @@ -66,24 +70,34 @@ impl CgroupSock { /// Attaches the program to the given cgroup. /// /// The returned value can be used to detach, see [CgroupSock::detach]. - pub fn attach(&mut self, cgroup: T) -> Result { + pub fn attach( + &mut self, + cgroup: T, + mode: CgroupAttachMode, + ) -> Result { let prog_fd = self.fd()?; let prog_fd = prog_fd.as_fd(); let cgroup_fd = cgroup.as_fd(); let attach_type = self.data.expected_attach_type.unwrap(); - if KernelVersion::current().unwrap() >= KernelVersion::new(5, 7, 0) { - let link_fd = bpf_link_create(prog_fd, LinkTarget::Fd(cgroup_fd), attach_type, None, 0) - .map_err(|(_, io_error)| SyscallError { - call: "bpf_link_create", - io_error, - })?; + if KernelVersion::at_least(5, 7, 0) { + let link_fd = bpf_link_create( + prog_fd, + LinkTarget::Fd(cgroup_fd), + attach_type, + mode.into(), + None, + ) + .map_err(|io_error| SyscallError { + call: "bpf_link_create", + io_error, + })?; self.data .links .insert(CgroupSockLink::new(CgroupSockLinkInner::Fd(FdLink::new( link_fd, )))) } else { - let link = ProgAttachLink::attach(prog_fd, cgroup_fd, attach_type)?; + let link = ProgAttachLink::attach(prog_fd, cgroup_fd, attach_type, mode)?; self.data .links @@ -91,21 +105,6 @@ impl CgroupSock { } } - /// Takes ownership of the link referenced by the provided link_id. - /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. - pub fn take_link(&mut self, link_id: CgroupSockLinkId) -> Result { - self.data.take_link(link_id) - } - - /// Detaches the program. - /// - /// See [CgroupSock::attach]. - pub fn detach(&mut self, link_id: CgroupSockLinkId) -> Result<(), ProgramError> { - self.data.links.remove(link_id) - } - /// Creates a program from a pinned entry on a bpffs. /// /// Existing links will not be populated. To work with existing links you should use [`crate::programs::links::PinnedLink`]. @@ -151,11 +150,14 @@ impl Link for CgroupSockLinkInner { } } +id_as_key!(CgroupSockLinkInner, CgroupSockLinkIdInner); + define_link_wrapper!( - /// The link used by [CgroupSock] programs. CgroupSockLink, - /// The type returned by [CgroupSock::attach]. Can be passed to [CgroupSock::detach]. CgroupSockLinkId, CgroupSockLinkInner, - CgroupSockLinkIdInner + CgroupSockLinkIdInner, + CgroupSock, ); + +impl_try_into_fdlink!(CgroupSockLink, CgroupSockLinkInner); diff --git a/aya/src/programs/cgroup_sock_addr.rs b/aya/src/programs/cgroup_sock_addr.rs index 79b607ca..1a11abfb 100644 --- a/aya/src/programs/cgroup_sock_addr.rs +++ b/aya/src/programs/cgroup_sock_addr.rs @@ -2,16 +2,17 @@ use std::{hash::Hash, os::fd::AsFd, path::Path}; +use aya_obj::generated::bpf_prog_type::BPF_PROG_TYPE_CGROUP_SOCK_ADDR; pub use aya_obj::programs::CgroupSockAddrAttachType; use crate::{ - generated::bpf_prog_type::BPF_PROG_TYPE_CGROUP_SOCK_ADDR, + VerifierLogLevel, programs::{ - define_link_wrapper, load_program, FdLink, Link, ProgAttachLink, ProgramData, ProgramError, + CgroupAttachMode, FdLink, Link, ProgAttachLink, ProgramData, ProgramError, ProgramType, + define_link_wrapper, id_as_key, impl_try_into_fdlink, load_program, }, - sys::{bpf_link_create, LinkTarget, SyscallError}, + sys::{LinkTarget, SyscallError, bpf_link_create}, util::KernelVersion, - VerifierLogLevel, }; /// A program that can be used to inspect or modify socket addresses (`struct sockaddr`). @@ -42,12 +43,12 @@ use crate::{ /// # } /// # let mut bpf = aya::Ebpf::load(&[])?; /// use std::fs::File; -/// use aya::programs::{CgroupSockAddr, CgroupSockAddrAttachType}; +/// use aya::programs::{CgroupAttachMode, CgroupSockAddr, CgroupSockAddrAttachType}; /// /// let file = File::open("/sys/fs/cgroup/unified")?; /// let egress: &mut CgroupSockAddr = bpf.program_mut("connect4").unwrap().try_into()?; /// egress.load()?; -/// egress.attach(file)?; +/// egress.attach(file, CgroupAttachMode::Single)?; /// # Ok::<(), Error>(()) /// ``` #[derive(Debug)] @@ -58,6 +59,9 @@ pub struct CgroupSockAddr { } impl CgroupSockAddr { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::CgroupSockAddr; + /// Loads the program inside the kernel. pub fn load(&mut self) -> Result<(), ProgramError> { self.data.expected_attach_type = Some(self.attach_type.into()); @@ -67,24 +71,34 @@ impl CgroupSockAddr { /// Attaches the program to the given cgroup. /// /// The returned value can be used to detach, see [CgroupSockAddr::detach]. - pub fn attach(&mut self, cgroup: T) -> Result { + pub fn attach( + &mut self, + cgroup: T, + mode: CgroupAttachMode, + ) -> Result { let prog_fd = self.fd()?; let prog_fd = prog_fd.as_fd(); let cgroup_fd = cgroup.as_fd(); let attach_type = self.data.expected_attach_type.unwrap(); - if KernelVersion::current().unwrap() >= KernelVersion::new(5, 7, 0) { - let link_fd = bpf_link_create(prog_fd, LinkTarget::Fd(cgroup_fd), attach_type, None, 0) - .map_err(|(_, io_error)| SyscallError { - call: "bpf_link_create", - io_error, - })?; + if KernelVersion::at_least(5, 7, 0) { + let link_fd = bpf_link_create( + prog_fd, + LinkTarget::Fd(cgroup_fd), + attach_type, + mode.into(), + None, + ) + .map_err(|io_error| SyscallError { + call: "bpf_link_create", + io_error, + })?; self.data .links .insert(CgroupSockAddrLink::new(CgroupSockAddrLinkInner::Fd( FdLink::new(link_fd), ))) } else { - let link = ProgAttachLink::attach(prog_fd, cgroup_fd, attach_type)?; + let link = ProgAttachLink::attach(prog_fd, cgroup_fd, attach_type, mode)?; self.data.links.insert(CgroupSockAddrLink::new( CgroupSockAddrLinkInner::ProgAttach(link), @@ -92,24 +106,6 @@ impl CgroupSockAddr { } } - /// Takes ownership of the link referenced by the provided link_id. - /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. - pub fn take_link( - &mut self, - link_id: CgroupSockAddrLinkId, - ) -> Result { - self.data.take_link(link_id) - } - - /// Detaches the program. - /// - /// See [CgroupSockAddr::attach]. - pub fn detach(&mut self, link_id: CgroupSockAddrLinkId) -> Result<(), ProgramError> { - self.data.links.remove(link_id) - } - /// Creates a program from a pinned entry on a bpffs. /// /// Existing links will not be populated. To work with existing links you should use [`crate::programs::links::PinnedLink`]. @@ -155,11 +151,14 @@ impl Link for CgroupSockAddrLinkInner { } } +id_as_key!(CgroupSockAddrLinkInner, CgroupSockAddrLinkIdInner); + define_link_wrapper!( - /// The link used by [CgroupSockAddr] programs. CgroupSockAddrLink, - /// The type returned by [CgroupSockAddr::attach]. Can be passed to [CgroupSockAddr::detach]. CgroupSockAddrLinkId, CgroupSockAddrLinkInner, - CgroupSockAddrLinkIdInner + CgroupSockAddrLinkIdInner, + CgroupSockAddr, ); + +impl_try_into_fdlink!(CgroupSockAddrLink, CgroupSockAddrLinkInner); diff --git a/aya/src/programs/cgroup_sockopt.rs b/aya/src/programs/cgroup_sockopt.rs index 414fece6..2bd9d6d7 100644 --- a/aya/src/programs/cgroup_sockopt.rs +++ b/aya/src/programs/cgroup_sockopt.rs @@ -2,16 +2,17 @@ use std::{hash::Hash, os::fd::AsFd, path::Path}; +use aya_obj::generated::bpf_prog_type::BPF_PROG_TYPE_CGROUP_SOCKOPT; pub use aya_obj::programs::CgroupSockoptAttachType; use crate::{ - generated::bpf_prog_type::BPF_PROG_TYPE_CGROUP_SOCKOPT, + VerifierLogLevel, programs::{ - define_link_wrapper, load_program, FdLink, Link, ProgAttachLink, ProgramData, ProgramError, + CgroupAttachMode, FdLink, Link, ProgAttachLink, ProgramData, ProgramError, ProgramType, + define_link_wrapper, id_as_key, load_program, }, - sys::{bpf_link_create, LinkTarget, SyscallError}, + sys::{LinkTarget, SyscallError, bpf_link_create}, util::KernelVersion, - VerifierLogLevel, }; /// A program that can be used to get or set options on sockets. @@ -39,12 +40,12 @@ use crate::{ /// # } /// # let mut bpf = aya::Ebpf::load(&[])?; /// use std::fs::File; -/// use aya::programs::CgroupSockopt; +/// use aya::programs::{CgroupAttachMode, CgroupSockopt}; /// /// let file = File::open("/sys/fs/cgroup/unified")?; /// let program: &mut CgroupSockopt = bpf.program_mut("cgroup_sockopt").unwrap().try_into()?; /// program.load()?; -/// program.attach(file)?; +/// program.attach(file, CgroupAttachMode::Single)?; /// # Ok::<(), Error>(()) /// ``` #[derive(Debug)] @@ -55,6 +56,9 @@ pub struct CgroupSockopt { } impl CgroupSockopt { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::CgroupSockopt; + /// Loads the program inside the kernel. pub fn load(&mut self) -> Result<(), ProgramError> { self.data.expected_attach_type = Some(self.attach_type.into()); @@ -64,24 +68,34 @@ impl CgroupSockopt { /// Attaches the program to the given cgroup. /// /// The returned value can be used to detach, see [CgroupSockopt::detach]. - pub fn attach(&mut self, cgroup: T) -> Result { + pub fn attach( + &mut self, + cgroup: T, + mode: CgroupAttachMode, + ) -> Result { let prog_fd = self.fd()?; let prog_fd = prog_fd.as_fd(); let cgroup_fd = cgroup.as_fd(); let attach_type = self.data.expected_attach_type.unwrap(); - if KernelVersion::current().unwrap() >= KernelVersion::new(5, 7, 0) { - let link_fd = bpf_link_create(prog_fd, LinkTarget::Fd(cgroup_fd), attach_type, None, 0) - .map_err(|(_, io_error)| SyscallError { - call: "bpf_link_create", - io_error, - })?; + if KernelVersion::at_least(5, 7, 0) { + let link_fd = bpf_link_create( + prog_fd, + LinkTarget::Fd(cgroup_fd), + attach_type, + mode.into(), + None, + ) + .map_err(|io_error| SyscallError { + call: "bpf_link_create", + io_error, + })?; self.data .links .insert(CgroupSockoptLink::new(CgroupSockoptLinkInner::Fd( FdLink::new(link_fd), ))) } else { - let link = ProgAttachLink::attach(prog_fd, cgroup_fd, attach_type)?; + let link = ProgAttachLink::attach(prog_fd, cgroup_fd, attach_type, mode)?; self.data .links @@ -91,24 +105,6 @@ impl CgroupSockopt { } } - /// Takes ownership of the link referenced by the provided link_id. - /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. - pub fn take_link( - &mut self, - link_id: CgroupSockoptLinkId, - ) -> Result { - self.data.take_link(link_id) - } - - /// Detaches the program. - /// - /// See [CgroupSockopt::attach]. - pub fn detach(&mut self, link_id: CgroupSockoptLinkId) -> Result<(), ProgramError> { - self.data.links.remove(link_id) - } - /// Creates a program from a pinned entry on a bpffs. /// /// Existing links will not be populated. To work with existing links you should use [`crate::programs::links::PinnedLink`]. @@ -154,11 +150,12 @@ impl Link for CgroupSockoptLinkInner { } } +id_as_key!(CgroupSockoptLinkInner, CgroupSockoptLinkIdInner); + define_link_wrapper!( - /// The link used by [CgroupSockopt] programs. CgroupSockoptLink, - /// The type returned by [CgroupSockopt::attach]. Can be passed to [CgroupSockopt::detach]. CgroupSockoptLinkId, CgroupSockoptLinkInner, - CgroupSockoptLinkIdInner + CgroupSockoptLinkIdInner, + CgroupSockopt, ); diff --git a/aya/src/programs/cgroup_sysctl.rs b/aya/src/programs/cgroup_sysctl.rs index 617e3dd8..c98256bb 100644 --- a/aya/src/programs/cgroup_sysctl.rs +++ b/aya/src/programs/cgroup_sysctl.rs @@ -2,12 +2,16 @@ use std::{hash::Hash, os::fd::AsFd}; +use aya_obj::generated::{ + bpf_attach_type::BPF_CGROUP_SYSCTL, bpf_prog_type::BPF_PROG_TYPE_CGROUP_SYSCTL, +}; + use crate::{ - generated::{bpf_attach_type::BPF_CGROUP_SYSCTL, bpf_prog_type::BPF_PROG_TYPE_CGROUP_SYSCTL}, programs::{ - define_link_wrapper, load_program, FdLink, Link, ProgAttachLink, ProgramData, ProgramError, + CgroupAttachMode, FdLink, Link, ProgAttachLink, ProgramData, ProgramError, ProgramType, + define_link_wrapper, id_as_key, load_program, }, - sys::{bpf_link_create, LinkTarget, SyscallError}, + sys::{LinkTarget, SyscallError, bpf_link_create}, util::KernelVersion, }; @@ -36,12 +40,12 @@ use crate::{ /// # } /// # let mut bpf = aya::Ebpf::load(&[])?; /// use std::fs::File; -/// use aya::programs::CgroupSysctl; +/// use aya::programs::{CgroupAttachMode, CgroupSysctl}; /// /// let file = File::open("/sys/fs/cgroup/unified")?; /// let program: &mut CgroupSysctl = bpf.program_mut("cgroup_sysctl").unwrap().try_into()?; /// program.load()?; -/// program.attach(file)?; +/// program.attach(file, CgroupAttachMode::Single)?; /// # Ok::<(), Error>(()) /// ``` #[derive(Debug)] @@ -51,6 +55,9 @@ pub struct CgroupSysctl { } impl CgroupSysctl { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::CgroupSysctl; + /// Loads the program inside the kernel. pub fn load(&mut self) -> Result<(), ProgramError> { load_program(BPF_PROG_TYPE_CGROUP_SYSCTL, &mut self.data) @@ -59,20 +66,24 @@ impl CgroupSysctl { /// Attaches the program to the given cgroup. /// /// The returned value can be used to detach, see [CgroupSysctl::detach]. - pub fn attach(&mut self, cgroup: T) -> Result { + pub fn attach( + &mut self, + cgroup: T, + mode: CgroupAttachMode, + ) -> Result { let prog_fd = self.fd()?; let prog_fd = prog_fd.as_fd(); let cgroup_fd = cgroup.as_fd(); - if KernelVersion::current().unwrap() >= KernelVersion::new(5, 7, 0) { + if KernelVersion::at_least(5, 7, 0) { let link_fd = bpf_link_create( prog_fd, LinkTarget::Fd(cgroup_fd), BPF_CGROUP_SYSCTL, + mode.into(), None, - 0, ) - .map_err(|(_, io_error)| SyscallError { + .map_err(|io_error| SyscallError { call: "bpf_link_create", io_error, })?; @@ -82,7 +93,7 @@ impl CgroupSysctl { FdLink::new(link_fd), ))) } else { - let link = ProgAttachLink::attach(prog_fd, cgroup_fd, BPF_CGROUP_SYSCTL)?; + let link = ProgAttachLink::attach(prog_fd, cgroup_fd, BPF_CGROUP_SYSCTL, mode)?; self.data .links @@ -91,24 +102,6 @@ impl CgroupSysctl { ))) } } - - /// Takes ownership of the link referenced by the provided link_id. - /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. - pub fn take_link( - &mut self, - link_id: CgroupSysctlLinkId, - ) -> Result { - self.data.take_link(link_id) - } - - /// Detaches the program. - /// - /// See [CgroupSysctl::attach]. - pub fn detach(&mut self, link_id: CgroupSysctlLinkId) -> Result<(), ProgramError> { - self.data.links.remove(link_id) - } } #[derive(Debug, Hash, Eq, PartialEq)] @@ -141,11 +134,12 @@ impl Link for CgroupSysctlLinkInner { } } +id_as_key!(CgroupSysctlLinkInner, CgroupSysctlLinkIdInner); + define_link_wrapper!( - /// The link used by [CgroupSysctl] programs. CgroupSysctlLink, - /// The type returned by [CgroupSysctl::attach]. Can be passed to [CgroupSysctl::detach]. CgroupSysctlLinkId, CgroupSysctlLinkInner, - CgroupSysctlLinkIdInner + CgroupSysctlLinkIdInner, + CgroupSysctl, ); diff --git a/aya/src/programs/extension.rs b/aya/src/programs/extension.rs index 648bbfc4..7feaba95 100644 --- a/aya/src/programs/extension.rs +++ b/aya/src/programs/extension.rs @@ -1,18 +1,21 @@ //! Extension programs. -use std::os::fd::{AsFd as _, BorrowedFd, OwnedFd}; +use std::os::fd::{AsFd as _, BorrowedFd}; +use aya_obj::{ + btf::BtfKind, + generated::{bpf_attach_type::BPF_CGROUP_INET_INGRESS, bpf_prog_type::BPF_PROG_TYPE_EXT}, +}; use object::Endianness; use thiserror::Error; use crate::{ - generated::{bpf_attach_type::BPF_CGROUP_INET_INGRESS, bpf_prog_type::BPF_PROG_TYPE_EXT}, - obj::btf::BtfKind, + Btf, programs::{ - define_link_wrapper, load_program, FdLink, FdLinkId, ProgramData, ProgramError, ProgramFd, + FdLink, FdLinkId, ProgramData, ProgramError, ProgramFd, ProgramType, define_link_wrapper, + load_program, }, - sys::{self, bpf_link_create, LinkTarget, SyscallError}, - Btf, + sys::{self, BpfLinkCreateArgs, LinkTarget, SyscallError, bpf_link_create}, }; /// The type returned when loading or attaching an [`Extension`] fails. @@ -56,6 +59,9 @@ pub struct Extension { } impl Extension { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::Extension; + /// Loads the extension inside the kernel. /// /// Prepares the code included in the extension to replace the code of the function @@ -101,10 +107,10 @@ impl Extension { prog_fd, LinkTarget::Fd(target_fd), BPF_CGROUP_INET_INGRESS, - Some(btf_id), 0, + Some(BpfLinkCreateArgs::TargetBtfId(btf_id)), ) - .map_err(|(_, io_error)| SyscallError { + .map_err(|io_error| SyscallError { call: "bpf_link_create", io_error, })?; @@ -138,10 +144,10 @@ impl Extension { prog_fd, LinkTarget::Fd(target_fd), BPF_CGROUP_INET_INGRESS, - Some(btf_id), 0, + Some(BpfLinkCreateArgs::TargetBtfId(btf_id)), ) - .map_err(|(_, io_error)| SyscallError { + .map_err(|io_error| SyscallError { call: "bpf_link_create", io_error, })?; @@ -149,27 +155,14 @@ impl Extension { .links .insert(ExtensionLink::new(FdLink::new(link_fd))) } - - /// Detaches the extension. - /// - /// Detaching restores the original code overridden by the extension program. - /// See [Extension::attach]. - pub fn detach(&mut self, link_id: ExtensionLinkId) -> Result<(), ProgramError> { - self.data.links.remove(link_id) - } - - /// Takes ownership of the link referenced by the provided link_id. - /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. - pub fn take_link(&mut self, link_id: ExtensionLinkId) -> Result { - self.data.take_link(link_id) - } } /// Retrieves the FD of the BTF object for the provided `prog_fd` and the BTF ID of the function /// with the name `func_name` within that BTF object. -fn get_btf_info(prog_fd: BorrowedFd<'_>, func_name: &str) -> Result<(OwnedFd, u32), ProgramError> { +fn get_btf_info( + prog_fd: BorrowedFd<'_>, + func_name: &str, +) -> Result<(crate::MockableFd, u32), ProgramError> { // retrieve program information let info = sys::bpf_prog_get_info_by_fd(prog_fd, &mut [])?; @@ -204,11 +197,4 @@ fn get_btf_info(prog_fd: BorrowedFd<'_>, func_name: &str) -> Result<(OwnedFd, u3 Ok((btf_fd, btf_id)) } -define_link_wrapper!( - /// The link used by [Extension] programs. - ExtensionLink, - /// The type returned by [Extension::attach]. Can be passed to [Extension::detach]. - ExtensionLinkId, - FdLink, - FdLinkId -); +define_link_wrapper!(ExtensionLink, ExtensionLinkId, FdLink, FdLinkId, Extension); diff --git a/aya/src/programs/fentry.rs b/aya/src/programs/fentry.rs index 0a1d082f..0639ab2a 100644 --- a/aya/src/programs/fentry.rs +++ b/aya/src/programs/fentry.rs @@ -1,12 +1,13 @@ //! Fentry programs. -use crate::{ +use aya_obj::{ + btf::{Btf, BtfKind}, generated::{bpf_attach_type::BPF_TRACE_FENTRY, bpf_prog_type::BPF_PROG_TYPE_TRACING}, - obj::btf::{Btf, BtfKind}, - programs::{ - define_link_wrapper, load_program, utils::attach_raw_tracepoint, FdLink, FdLinkId, - ProgramData, ProgramError, - }, +}; + +use crate::programs::{ + FdLink, FdLinkId, ProgramData, ProgramError, ProgramType, define_link_wrapper, load_program, + utils::attach_raw_tracepoint, }; /// A program that can be attached to the entry point of (almost) any kernel @@ -50,6 +51,9 @@ pub struct FEntry { } impl FEntry { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::Tracing; + /// Loads the program inside the kernel. /// /// Loads the program so it's executed when the kernel function `fn_name` @@ -67,28 +71,6 @@ impl FEntry { pub fn attach(&mut self) -> Result { attach_raw_tracepoint(&mut self.data, None) } - - /// Detaches the program. - /// - /// See [FEntry::attach]. - pub fn detach(&mut self, link_id: FEntryLinkId) -> Result<(), ProgramError> { - self.data.links.remove(link_id) - } - - /// Takes ownership of the link referenced by the provided link_id. - /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. - pub fn take_link(&mut self, link_id: FEntryLinkId) -> Result { - self.data.take_link(link_id) - } } -define_link_wrapper!( - /// The link used by [FEntry] programs. - FEntryLink, - /// The type returned by [FEntry::attach]. Can be passed to [FEntry::detach]. - FEntryLinkId, - FdLink, - FdLinkId -); +define_link_wrapper!(FEntryLink, FEntryLinkId, FdLink, FdLinkId, FEntry); diff --git a/aya/src/programs/fexit.rs b/aya/src/programs/fexit.rs index 5efca285..2a4a388e 100644 --- a/aya/src/programs/fexit.rs +++ b/aya/src/programs/fexit.rs @@ -1,12 +1,13 @@ //! Fexit programs. -use crate::{ +use aya_obj::{ + btf::{Btf, BtfKind}, generated::{bpf_attach_type::BPF_TRACE_FEXIT, bpf_prog_type::BPF_PROG_TYPE_TRACING}, - obj::btf::{Btf, BtfKind}, - programs::{ - define_link_wrapper, load_program, utils::attach_raw_tracepoint, FdLink, FdLinkId, - ProgramData, ProgramError, - }, +}; + +use crate::programs::{ + FdLink, FdLinkId, ProgramData, ProgramError, ProgramType, define_link_wrapper, load_program, + utils::attach_raw_tracepoint, }; /// A program that can be attached to the exit point of (almost) anny kernel @@ -50,6 +51,9 @@ pub struct FExit { } impl FExit { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::Tracing; + /// Loads the program inside the kernel. /// /// Loads the program so it's executed when the kernel function `fn_name` @@ -67,28 +71,6 @@ impl FExit { pub fn attach(&mut self) -> Result { attach_raw_tracepoint(&mut self.data, None) } - - /// Detaches the program. - /// - /// See [FExit::attach]. - pub fn detach(&mut self, link_id: FExitLinkId) -> Result<(), ProgramError> { - self.data.links.remove(link_id) - } - - /// Takes ownership of the link referenced by the provided link_id. - /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. - pub fn take_link(&mut self, link_id: FExitLinkId) -> Result { - self.data.take_link(link_id) - } } -define_link_wrapper!( - /// The link used by [FExit] programs. - FExitLink, - /// The type returned by [FExit::attach]. Can be passed to [FExit::detach]. - FExitLinkId, - FdLink, - FdLinkId -); +define_link_wrapper!(FExitLink, FExitLinkId, FdLink, FdLinkId, FExit); diff --git a/aya/src/programs/flow_dissector.rs b/aya/src/programs/flow_dissector.rs new file mode 100644 index 00000000..64d657bd --- /dev/null +++ b/aya/src/programs/flow_dissector.rs @@ -0,0 +1,159 @@ +//! Flow dissector programs. + +use std::os::fd::AsFd; + +use aya_obj::generated::{ + bpf_attach_type::BPF_FLOW_DISSECTOR, bpf_prog_type::BPF_PROG_TYPE_FLOW_DISSECTOR, +}; + +use crate::{ + programs::{ + CgroupAttachMode, FdLink, Link, ProgAttachLink, ProgramData, ProgramError, ProgramType, + define_link_wrapper, id_as_key, impl_try_into_fdlink, load_program, + }, + sys::{LinkTarget, SyscallError, bpf_link_create}, + util::KernelVersion, +}; + +/// Flow dissector is a program type that parses metadata out of the packets. +/// +/// BPF flow dissectors can be attached per network namespace. These programs +/// are given a packet and expected to populate the fields of +/// `FlowDissectorContext::flow_keys`. The return code of the BPF program is +/// either [`BPF_OK`] to indicate successful dissection, [`BPF_DROP`] to +/// indicate parsing error, or [`BPF_FLOW_DISSECTOR_CONTINUE`] to indicate that +/// no custom dissection was performed, and fallback to standard dissector is +/// requested. +/// +/// # Minimum kernel version +/// +/// The minimum kernel version required to use this feature is 4.20. +/// +/// # Examples +/// +/// ```no_run +/// # #[derive(Debug, thiserror::Error)] +/// # enum Error { +/// # #[error(transparent)] +/// # IO(#[from] std::io::Error), +/// # #[error(transparent)] +/// # Map(#[from] aya::maps::MapError), +/// # #[error(transparent)] +/// # Program(#[from] aya::programs::ProgramError), +/// # #[error(transparent)] +/// # Ebpf(#[from] aya::EbpfError) +/// # } +/// # let mut bpf = aya::Ebpf::load(&[])?; +/// use aya::programs::FlowDissector; +/// +/// let program: &mut FlowDissector = bpf.program_mut("filename_lookup").unwrap().try_into()?; +/// program.load()?; +/// +/// let net_ns = std::fs::File::open("/proc/self/ns/net")?; +/// program.attach(net_ns)?; +/// # Ok::<(), Error>(()) +/// ``` +/// +/// [`FlowDissectorContext::flow_keys`]: ../../../aya-ebpf/programs/flow_dissector/struct.FlowDissectorContext.html#method.flow_keys +/// [`BPF_OK`]: ../../../aya-ebpf/bindings/bpf_ret_code/constant.bpf_ok +/// [`BPF_DROP`]: ../../../aya-ebpf/bindings/bpf_ret_code/constant.bpf_drop +/// [`BPF_FLOW_DISSECTOR_CONTINUE`]: ../../../aya-ebpf/bindings/bpf_ret_code/constant.bpf_flow_dissector_continue +#[derive(Debug)] +#[doc(alias = "BPF_PROG_TYPE_FLOW_DISSECTOR")] +pub struct FlowDissector { + pub(crate) data: ProgramData, +} + +impl FlowDissector { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::FlowDissector; + + /// Loads the program inside the kernel. + pub fn load(&mut self) -> Result<(), ProgramError> { + self.data.expected_attach_type = Some(BPF_FLOW_DISSECTOR); + load_program(BPF_PROG_TYPE_FLOW_DISSECTOR, &mut self.data) + } + + /// Attaches the program to the given network namespace. + /// + /// The returned value can be used to detach, see [FlowDissector::detach]. + pub fn attach(&mut self, netns: T) -> Result { + let prog_fd = self.fd()?; + let prog_fd = prog_fd.as_fd(); + let netns_fd = netns.as_fd(); + + if KernelVersion::at_least(5, 7, 0) { + let link_fd = bpf_link_create( + prog_fd, + LinkTarget::Fd(netns_fd), + BPF_FLOW_DISSECTOR, + 0, + None, + ) + .map_err(|io_error| SyscallError { + call: "bpf_link_create", + io_error, + })?; + self.data + .links + .insert(FlowDissectorLink::new(FlowDissectorLinkInner::Fd( + FdLink::new(link_fd), + ))) + } else { + let link = ProgAttachLink::attach( + prog_fd, + netns_fd, + BPF_FLOW_DISSECTOR, + CgroupAttachMode::default(), + )?; + + self.data + .links + .insert(FlowDissectorLink::new(FlowDissectorLinkInner::ProgAttach( + link, + ))) + } + } +} + +#[derive(Debug, Hash, Eq, PartialEq)] +enum FlowDissectorLinkIdInner { + Fd(::Id), + ProgAttach(::Id), +} + +#[derive(Debug)] +enum FlowDissectorLinkInner { + Fd(FdLink), + ProgAttach(ProgAttachLink), +} + +impl Link for FlowDissectorLinkInner { + type Id = FlowDissectorLinkIdInner; + + fn id(&self) -> Self::Id { + match self { + Self::Fd(fd) => FlowDissectorLinkIdInner::Fd(fd.id()), + Self::ProgAttach(p) => FlowDissectorLinkIdInner::ProgAttach(p.id()), + } + } + + fn detach(self) -> Result<(), ProgramError> { + match self { + Self::Fd(fd) => fd.detach(), + Self::ProgAttach(p) => p.detach(), + } + } +} + +id_as_key!(FlowDissectorLinkInner, FlowDissectorLinkIdInner); + +define_link_wrapper!( + FlowDissectorLink, + FlowDissectorLinkId, + FlowDissectorLinkInner, + FlowDissectorLinkIdInner, + FlowDissector, +); + +impl_try_into_fdlink!(FlowDissectorLink, FlowDissectorLinkInner); diff --git a/aya/src/programs/info.rs b/aya/src/programs/info.rs new file mode 100644 index 00000000..1a491b49 --- /dev/null +++ b/aya/src/programs/info.rs @@ -0,0 +1,534 @@ +//! Metadata information about an eBPF program. + +use std::{ + ffi::CString, + os::fd::{AsFd as _, BorrowedFd}, + path::Path, + sync::OnceLock, + time::{Duration, SystemTime}, +}; + +use aya_obj::generated::{bpf_prog_info, bpf_prog_type}; + +use super::{ + ProgramError, ProgramFd, + utils::{boot_time, get_fdinfo}, +}; +use crate::{ + FEATURES, + sys::{ + SyscallError, bpf_get_object, bpf_prog_get_fd_by_id, bpf_prog_get_info_by_fd, + feature_probe::{is_prog_info_license_supported, is_prog_info_map_ids_supported}, + iter_prog_ids, + }, + util::bytes_of_bpf_name, +}; + +/// Provides metadata information about a loaded eBPF program. +/// +/// Introduced in kernel v4.13. +#[doc(alias = "bpf_prog_info")] +#[derive(Debug)] +pub struct ProgramInfo(pub(crate) bpf_prog_info); + +impl ProgramInfo { + pub(crate) fn new_from_fd(fd: BorrowedFd<'_>) -> Result { + let info = bpf_prog_get_info_by_fd(fd, &mut [])?; + Ok(Self(info)) + } + + /// The type of program. + /// + /// Introduced in kernel v4.13. + pub fn program_type(&self) -> bpf_prog_type { + bpf_prog_type::try_from(self.0.type_).unwrap_or(bpf_prog_type::__MAX_BPF_PROG_TYPE) + } + + /// The unique ID for this program. + /// + /// Introduced in kernel v4.13. + pub fn id(&self) -> u32 { + self.0.id + } + + /// The program tag. + /// + /// The tag is a SHA sum of the program's instructions which be used as an alternative to + /// [`Self::id()`]. A program's ID can vary every time it's loaded or unloaded, but the tag + /// will remain the same. + /// + /// Introduced in kernel v4.13. + pub fn tag(&self) -> u64 { + u64::from_be_bytes(self.0.tag) + } + + /// The size in bytes of the program's JIT-compiled machine code. + /// + /// Note that this field is only updated when BPF JIT compiler is enabled. Kernels v4.15 and + /// above may already have it enabled by default. + /// + /// Introduced in kernel v4.13. + pub fn size_jitted(&self) -> u32 { + self.0.jited_prog_len + } + + /// The size in bytes of the program's translated eBPF bytecode. + /// + /// The translated bytecode is after it has been passed though the verifier where it was + /// possibly modified by the kernel. + /// + /// `None` is returned if the field is not available. + /// + /// Introduced in kernel v4.15. + pub fn size_translated(&self) -> Option { + (self.0.xlated_prog_len > 0).then_some(self.0.xlated_prog_len) + } + + /// The time when the program was loaded. + /// + /// `None` is returned if the field is not available. + /// + /// Introduced in kernel v4.15. + pub fn loaded_at(&self) -> Option { + (self.0.load_time > 0).then_some(boot_time() + Duration::from_nanos(self.0.load_time)) + } + + /// The user ID of the process who loaded the program. + /// + /// `None` is returned if the field is not available. + /// + /// Introduced in kernel v4.15. + pub fn created_by_uid(&self) -> Option { + // This field was introduced in the same commit as `load_time`. + (self.0.load_time > 0).then_some(self.0.created_by_uid) + } + + /// The IDs of the maps used by the program. + /// + /// `None` is returned if the field is not available. + /// + /// Introduced in kernel v4.15. + pub fn map_ids(&self) -> Result>, ProgramError> { + static CACHE: OnceLock = OnceLock::new(); + CACHE + .get_or_init(|| { + self.0.nr_map_ids > 0 || matches!(is_prog_info_map_ids_supported(), Ok(true)) + }) + .then(|| { + let mut map_ids = vec![0u32; self.0.nr_map_ids as usize]; + bpf_prog_get_info_by_fd(self.fd()?.as_fd(), &mut map_ids)?; + Ok(map_ids) + }) + .transpose() + } + + /// The name of the program as was provided when it was load. This is limited to 16 bytes. + /// + /// Introduced in kernel v4.15. + pub fn name(&self) -> &[u8] { + bytes_of_bpf_name(&self.0.name) + } + + /// The name of the program as a &str. + /// + /// `None` is returned if the name was not valid unicode or if field is not available. + /// + /// Introduced in kernel v4.15. + pub fn name_as_str(&self) -> Option<&str> { + let name = std::str::from_utf8(self.name()).ok()?; + (FEATURES.bpf_name() || !name.is_empty()).then_some(name) + } + + /// Returns true if the program is defined with a GPL-compatible license. + /// + /// `None` is returned if the field is not available. + /// + /// Introduced in kernel v4.18. + pub fn gpl_compatible(&self) -> Option { + static CACHE: OnceLock = OnceLock::new(); + CACHE + .get_or_init(|| { + self.0.gpl_compatible() != 0 || matches!(is_prog_info_license_supported(), Ok(true)) + }) + .then_some(self.0.gpl_compatible() != 0) + } + + /// The BTF ID for the program. + /// + /// Introduced in kernel v5.0. + pub fn btf_id(&self) -> Option { + (self.0.btf_id > 0).then_some(self.0.btf_id) + } + + /// The accumulated time that the program has been actively running. + /// + /// This is not to be confused with the duration since the program was + /// first loaded on the host. + /// + /// Note this field is only updated for as long as + /// [`enable_stats`](crate::sys::enable_stats) is enabled + /// with [`Stats::RunTime`](crate::sys::Stats::RunTime). + /// + /// Introduced in kernel v5.1. + pub fn run_time(&self) -> Duration { + Duration::from_nanos(self.0.run_time_ns) + } + + /// The accumulated execution count of the program. + /// + /// Note this field is only updated for as long as + /// [`enable_stats`](crate::sys::enable_stats) is enabled + /// with [`Stats::RunTime`](crate::sys::Stats::RunTime). + /// + /// Introduced in kernel v5.1. + pub fn run_count(&self) -> u64 { + self.0.run_cnt + } + + /// The number of verified instructions in the program. + /// + /// This may be less than the total number of instructions in the compiled program due to dead + /// code elimination in the verifier. + /// + /// `None` is returned if the field is not available. + /// + /// Introduced in kernel v5.16. + pub fn verified_instruction_count(&self) -> Option { + (self.0.verified_insns > 0).then_some(self.0.verified_insns) + } + + /// How much memory in bytes has been allocated and locked for the program. + pub fn memory_locked(&self) -> Result { + get_fdinfo(self.fd()?.as_fd(), "memlock") + } + + /// Returns a file descriptor referencing the program. + /// + /// The returned file descriptor can be closed at any time and doing so does + /// not influence the life cycle of the program. + /// + /// Uses kernel v4.13 features. + pub fn fd(&self) -> Result { + let Self(info) = self; + let fd = bpf_prog_get_fd_by_id(info.id)?; + Ok(ProgramFd(fd)) + } + + /// Loads a program from a pinned path in bpffs. + /// + /// Uses kernel v4.4 and v4.13 features. + pub fn from_pin>(path: P) -> Result { + use std::os::unix::ffi::OsStrExt as _; + + // TODO: avoid this unwrap by adding a new error variant. + let path_string = CString::new(path.as_ref().as_os_str().as_bytes()).unwrap(); + let fd = bpf_get_object(&path_string).map_err(|io_error| SyscallError { + call: "BPF_OBJ_GET", + io_error, + })?; + + Self::new_from_fd(fd.as_fd()) + } +} + +/// Returns information about a loaded program with the [`ProgramInfo`] structure. +/// +/// This information is populated at load time by the kernel and can be used +/// to correlate a given [`crate::programs::Program`] to it's corresponding [`ProgramInfo`] +/// metadata. +macro_rules! impl_info { + ($($struct_name:ident),+ $(,)?) => { + $( + impl $struct_name { + /// Returns metadata information of this program. + /// + /// Uses kernel v4.13 features. + pub fn info(&self) -> Result { + let ProgramFd(fd) = self.fd()?; + ProgramInfo::new_from_fd(fd.as_fd()) + } + } + )+ + } +} + +pub(crate) use impl_info; + +/// Returns an iterator of [`ProgramInfo`] over all eBPF programs loaded on the host. +/// +/// Unlike [`Ebpf::programs`](crate::Ebpf::programs), this includes **all** programs on the host +/// system, not just those tied to a specific [`crate::Ebpf`] instance. +/// +/// Uses kernel v4.13 features. +/// +/// # Example +/// ``` +/// # use aya::programs::loaded_programs; +/// # +/// for p in loaded_programs() { +/// match p { +/// Ok(program) => println!("{}", String::from_utf8_lossy(program.name())), +/// Err(e) => println!("error iterating programs: {:?}", e), +/// } +/// } +/// ``` +/// +/// # Errors +/// +/// Returns [`ProgramError::SyscallError`] if any of the syscalls required to either get +/// next program id, get the program fd, or the [`ProgramInfo`] fail. +/// +/// In cases where iteration can't be performed, for example the caller does not have the necessary +/// privileges, a single item will be yielded containing the error that occurred. +pub fn loaded_programs() -> impl Iterator> { + iter_prog_ids() + .map(|id| { + let id = id?; + bpf_prog_get_fd_by_id(id) + }) + .map(|fd| { + let fd = fd?; + bpf_prog_get_info_by_fd(fd.as_fd(), &mut []) + }) + .map(|result| result.map(ProgramInfo).map_err(Into::into)) +} + +/// The type of LSM program. +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum LsmAttachType { + /// A MAC (Mandatory Access Control) LSM program. + Mac, + /// A cGroup LSM program. + Cgroup, +} + +/// The type of eBPF program. +#[non_exhaustive] +#[doc(alias = "bpf_prog_type")] +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum ProgramType { + /// An unspecified program type. + #[doc(alias = "BPF_PROG_TYPE_UNSPEC")] + Unspecified, + /// A Socket Filter program type. See [`SocketFilter`](super::socket_filter::SocketFilter) + /// for the program implementation. + /// + /// Introduced in kernel v3.19. + #[doc(alias = "BPF_PROG_TYPE_SOCKET_FILTER")] + SocketFilter, + /// A Kernel Probe program type. See [`KProbe`](super::kprobe::KProbe) and + /// [`UProbe`](super::uprobe::UProbe) for the program implementations. + /// + /// Introduced in kernel v4.1. + #[doc(alias = "BPF_PROG_TYPE_KPROBE")] + KProbe, + /// A Traffic Control (TC) Classifier program type. See + /// [`SchedClassifier`](super::tc::SchedClassifier) for the program implementation. + /// + /// Introduced in kernel v4.1. + #[doc(alias = "BPF_PROG_TYPE_SCHED_CLS")] + SchedClassifier, + /// A Traffic Control (TC) Action program type. + /// + /// Introduced in kernel v4.1. + #[doc(alias = "BPF_PROG_TYPE_SCHED_ACT")] + SchedAction, + /// A Tracepoint program type. See [`TracePoint`](super::trace_point::TracePoint) for the + /// program implementation. + /// + /// Introduced in kernel v4.7. + #[doc(alias = "BPF_PROG_TYPE_TRACEPOINT")] + TracePoint, + /// An Express Data Path (XDP) program type. See [`Xdp`](super::xdp::Xdp) for the program + /// implementation. + /// + /// Introduced in kernel v4.8. + #[doc(alias = "BPF_PROG_TYPE_XDP")] + Xdp, + /// A Perf Event program type. See [`PerfEvent`](super::perf_event::PerfEvent) for the program + /// implementation. + /// + /// Introduced in kernel v4.9. + #[doc(alias = "BPF_PROG_TYPE_PERF_EVENT")] + PerfEvent, + /// A cGroup Socket Buffer program type. See [`CgroupSkb`](super::cgroup_skb::CgroupSkb) for + /// the program implementation. + /// + /// Introduced in kernel v4.10. + #[doc(alias = "BPF_PROG_TYPE_CGROUP_SKB")] + CgroupSkb, + /// A cGroup Socket program type. See [`CgroupSock`](super::cgroup_sock::CgroupSock) for the + /// program implementation. + /// + /// Introduced in kernel v4.10. + #[doc(alias = "BPF_PROG_TYPE_CGROUP_SOCK")] + CgroupSock, + /// A Lightweight Tunnel (LWT) Input program type. + /// + /// Introduced in kernel v4.10. + #[doc(alias = "BPF_PROG_TYPE_LWT_IN")] + LwtInput, + /// A Lightweight Tunnel (LWT) Output program type. + /// + /// Introduced in kernel v4.10. + #[doc(alias = "BPF_PROG_TYPE_LWT_OUT")] + LwtOutput, + /// A Lightweight Tunnel (LWT) Transmit program type. + /// + /// Introduced in kernel v4.10. + #[doc(alias = "BPF_PROG_TYPE_LWT_XMIT")] + LwtXmit, + /// A Socket Operation program type. See [`SockOps`](super::sock_ops::SockOps) for the program + /// implementation. + /// + /// Introduced in kernel v4.13. + #[doc(alias = "BPF_PROG_TYPE_SOCK_OPS")] + SockOps, + /// A Socket-to-Socket Buffer program type. See [`SkSkb`](super::sk_skb::SkSkb) for the program + /// implementation. + /// + /// Introduced in kernel v4.14. + #[doc(alias = "BPF_PROG_TYPE_SK_SKB")] + SkSkb, + /// A cGroup Device program type. See [`CgroupDevice`](super::cgroup_device::CgroupDevice) + /// for the program implementation. + /// + /// Introduced in kernel v4.15. + #[doc(alias = "BPF_PROG_TYPE_CGROUP_DEVICE")] + CgroupDevice, + /// A Socket Message program type. See [`SkMsg`](super::sk_msg::SkMsg) for the program + /// implementation. + /// + /// Introduced in kernel v4.17. + #[doc(alias = "BPF_PROG_TYPE_SK_MSG")] + SkMsg, + /// A Raw Tracepoint program type. See [`RawTracePoint`](super::raw_trace_point::RawTracePoint) + /// for the program implementation. + /// + /// Introduced in kernel v4.17. + #[doc(alias = "BPF_PROG_TYPE_RAW_TRACEPOINT")] + RawTracePoint, + /// A cGroup Socket Address program type. See + /// [`CgroupSockAddr`](super::cgroup_sock_addr::CgroupSockAddr) for the program implementation. + /// + /// Introduced in kernel v4.17. + #[doc(alias = "BPF_PROG_TYPE_CGROUP_SOCK_ADDR")] + CgroupSockAddr, + /// A Lightweight Tunnel (LWT) Seg6local program type. + /// + /// Introduced in kernel v4.18. + #[doc(alias = "BPF_PROG_TYPE_LWT_SEG6LOCAL")] + LwtSeg6local, + /// A Linux Infrared Remote Control (LIRC) Mode2 program type. See + /// [`LircMode2`](super::lirc_mode2::LircMode2) for the program implementation. + /// + /// Introduced in kernel v4.18. + #[doc(alias = "BPF_PROG_TYPE_LIRC_MODE2")] + LircMode2, + /// A Socket Reuseport program type. + /// + /// Introduced in kernel v4.19. + #[doc(alias = "BPF_PROG_TYPE_SK_REUSEPORT")] + SkReuseport, + /// A Flow Dissector program type. + /// + /// Introduced in kernel v4.20. + #[doc(alias = "BPF_PROG_TYPE_FLOW_DISSECTOR")] + FlowDissector, + /// A cGroup Sysctl program type. See [`CgroupSysctl`](super::cgroup_sysctl::CgroupSysctl) for + /// the program implementation. + /// + /// Introduced in kernel v5.2. + #[doc(alias = "BPF_PROG_TYPE_CGROUP_SYSCTL")] + CgroupSysctl, + /// A Writable Raw Tracepoint program type. + /// + /// Introduced in kernel v5.2. + #[doc(alias = "BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE")] + RawTracePointWritable, + /// A cGroup Socket Option program type. See [`CgroupSockopt`](super::cgroup_sockopt::CgroupSockopt) + /// for the program implementation. + /// + /// Introduced in kernel v5.3. + #[doc(alias = "BPF_PROG_TYPE_CGROUP_SOCKOPT")] + CgroupSockopt, + /// A Tracing program type. See [`FEntry`](super::fentry::FEntry), [`FExit`](super::fexit::FExit), + /// and [`BtfTracePoint`](super::tp_btf::BtfTracePoint) for the program implementations. + /// + /// Introduced in kernel v5.5. + #[doc(alias = "BPF_PROG_TYPE_TRACING")] + Tracing, + /// A Struct Ops program type. + /// + /// Introduced in kernel v5.6. + #[doc(alias = "BPF_PROG_TYPE_STRUCT_OPS")] + StructOps, + /// A Extension program type. See [`Extension`](super::extension::Extension) for the program + /// implementation. + /// + /// Introduced in kernel v5.6. + #[doc(alias = "BPF_PROG_TYPE_EXT")] + Extension, + /// A Linux Security Module (LSM) program type. See [`Lsm`](super::lsm::Lsm) for the program + /// implementation. + /// + /// Introduced in kernel v5.7. + #[doc(alias = "BPF_PROG_TYPE_LSM")] + Lsm(LsmAttachType), + /// A Socket Lookup program type. See [`SkLookup`](super::sk_lookup::SkLookup) for the program + /// implementation. + /// + /// Introduced in kernel v5.9. + #[doc(alias = "BPF_PROG_TYPE_SK_LOOKUP")] + SkLookup, + /// A Syscall program type. + /// + /// Introduced in kernel v5.14. + #[doc(alias = "BPF_PROG_TYPE_SYSCALL")] + Syscall, + /// A Netfilter program type. + /// + /// Introduced in kernel v6.4. + #[doc(alias = "BPF_PROG_TYPE_NETFILTER")] + Netfilter, +} + +impl From for bpf_prog_type { + fn from(value: ProgramType) -> Self { + match value { + ProgramType::Unspecified => Self::BPF_PROG_TYPE_UNSPEC, + ProgramType::SocketFilter => Self::BPF_PROG_TYPE_SOCKET_FILTER, + ProgramType::KProbe => Self::BPF_PROG_TYPE_KPROBE, + ProgramType::SchedClassifier => Self::BPF_PROG_TYPE_SCHED_CLS, + ProgramType::SchedAction => Self::BPF_PROG_TYPE_SCHED_ACT, + ProgramType::TracePoint => Self::BPF_PROG_TYPE_TRACEPOINT, + ProgramType::Xdp => Self::BPF_PROG_TYPE_XDP, + ProgramType::PerfEvent => Self::BPF_PROG_TYPE_PERF_EVENT, + ProgramType::CgroupSkb => Self::BPF_PROG_TYPE_CGROUP_SKB, + ProgramType::CgroupSock => Self::BPF_PROG_TYPE_CGROUP_SOCK, + ProgramType::LwtInput => Self::BPF_PROG_TYPE_LWT_IN, + ProgramType::LwtOutput => Self::BPF_PROG_TYPE_LWT_OUT, + ProgramType::LwtXmit => Self::BPF_PROG_TYPE_LWT_XMIT, + ProgramType::SockOps => Self::BPF_PROG_TYPE_SOCK_OPS, + ProgramType::SkSkb => Self::BPF_PROG_TYPE_SK_SKB, + ProgramType::CgroupDevice => Self::BPF_PROG_TYPE_CGROUP_DEVICE, + ProgramType::SkMsg => Self::BPF_PROG_TYPE_SK_MSG, + ProgramType::RawTracePoint => Self::BPF_PROG_TYPE_RAW_TRACEPOINT, + ProgramType::CgroupSockAddr => Self::BPF_PROG_TYPE_CGROUP_SOCK_ADDR, + ProgramType::LwtSeg6local => Self::BPF_PROG_TYPE_LWT_SEG6LOCAL, + ProgramType::LircMode2 => Self::BPF_PROG_TYPE_LIRC_MODE2, + ProgramType::SkReuseport => Self::BPF_PROG_TYPE_SK_REUSEPORT, + ProgramType::FlowDissector => Self::BPF_PROG_TYPE_FLOW_DISSECTOR, + ProgramType::CgroupSysctl => Self::BPF_PROG_TYPE_CGROUP_SYSCTL, + ProgramType::RawTracePointWritable => Self::BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE, + ProgramType::CgroupSockopt => Self::BPF_PROG_TYPE_CGROUP_SOCKOPT, + ProgramType::Tracing => Self::BPF_PROG_TYPE_TRACING, + ProgramType::StructOps => Self::BPF_PROG_TYPE_STRUCT_OPS, + ProgramType::Extension => Self::BPF_PROG_TYPE_EXT, + ProgramType::Lsm(_) => Self::BPF_PROG_TYPE_LSM, + ProgramType::SkLookup => Self::BPF_PROG_TYPE_SK_LOOKUP, + ProgramType::Syscall => Self::BPF_PROG_TYPE_SYSCALL, + ProgramType::Netfilter => Self::BPF_PROG_TYPE_NETFILTER, + } + } +} diff --git a/aya/src/programs/iter.rs b/aya/src/programs/iter.rs new file mode 100644 index 00000000..fb0d5279 --- /dev/null +++ b/aya/src/programs/iter.rs @@ -0,0 +1,139 @@ +//! Iterators. +use std::{ + fs::File, + os::fd::{AsFd, BorrowedFd}, +}; + +use aya_obj::{ + btf::{Btf, BtfKind}, + generated::{ + bpf_attach_type::BPF_TRACE_ITER, bpf_link_type::BPF_LINK_TYPE_ITER, + bpf_prog_type::BPF_PROG_TYPE_TRACING, + }, +}; + +use crate::{ + programs::{ + FdLink, LinkError, PerfLinkIdInner, PerfLinkInner, ProgramData, ProgramError, ProgramType, + define_link_wrapper, impl_try_into_fdlink, load_program, + }, + sys::{LinkTarget, SyscallError, bpf_create_iter, bpf_link_create, bpf_link_get_info_by_fd}, +}; + +/// A BPF iterator which allows to dump data from the kernel-space into the +/// user-space. +/// +/// It can be seen as an alternative to `/proc` filesystem as it offers more +/// flexibility about what information should be retrieved and how it should be +/// formatted. +/// +/// # Minimum kernel version +/// +/// The minimum kernel version required to use this feature is 5.8. +/// +/// # Example +/// +/// ```no_run +/// use std::io::{BufRead, BufReader}; +/// use aya::{programs::{Iter, ProgramError}, BtfError, Btf, Ebpf}; +/// # let mut ebpf = Ebpf::load_file("ebpf_programs.o")?; +/// +/// let btf = Btf::from_sys_fs()?; +/// let program: &mut Iter = ebpf.program_mut("iter_prog").unwrap().try_into()?; +/// program.load("task", &btf)?; +/// +/// let link_id = program.attach()?; +/// let link = program.take_link(link_id)?; +/// let file = link.into_file()?; +/// let reader = BufReader::new(file); +/// +/// let mut lines = reader.lines(); +/// for line in lines { +/// let line = line?; +/// println!("{line}"); +/// } +/// # Ok::<(), Box>(()) +/// ``` +#[derive(Debug)] +pub struct Iter { + pub(crate) data: ProgramData, +} + +impl Iter { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::Tracing; + + /// Loads the program inside the kernel. + pub fn load(&mut self, iter_type: &str, btf: &Btf) -> Result<(), ProgramError> { + self.data.expected_attach_type = Some(BPF_TRACE_ITER); + let type_name = format!("bpf_iter_{iter_type}"); + self.data.attach_btf_id = + Some(btf.id_by_type_name_kind(type_name.as_str(), BtfKind::Func)?); + load_program(BPF_PROG_TYPE_TRACING, &mut self.data) + } + + /// Attaches the program. + /// + /// The returned value can be used to detach, see [`Self::detach`]. + pub fn attach(&mut self) -> Result { + let prog_fd = self.fd()?; + let prog_fd = prog_fd.as_fd(); + let link_fd = bpf_link_create(prog_fd, LinkTarget::Iter, BPF_TRACE_ITER, 0, None).map_err( + |io_error| SyscallError { + call: "bpf_link_create", + io_error, + }, + )?; + + self.data + .links + .insert(IterLink::new(PerfLinkInner::Fd(FdLink::new(link_fd)))) + } +} + +/// An iterator descriptor. +#[derive(Debug)] +pub struct IterFd { + fd: crate::MockableFd, +} + +impl AsFd for IterFd { + fn as_fd(&self) -> BorrowedFd<'_> { + let Self { fd } = self; + fd.as_fd() + } +} + +impl TryFrom for IterLink { + type Error = LinkError; + + fn try_from(fd_link: FdLink) -> Result { + let info = bpf_link_get_info_by_fd(fd_link.fd.as_fd())?; + if info.type_ == (BPF_LINK_TYPE_ITER as u32) { + return Ok(Self::new(PerfLinkInner::Fd(fd_link))); + } + Err(LinkError::InvalidLink) + } +} + +impl_try_into_fdlink!(IterLink, PerfLinkInner); + +define_link_wrapper!(IterLink, IterLinkId, PerfLinkInner, PerfLinkIdInner, Iter); + +impl IterLink { + /// Converts [`IterLink`] into a [`File`] that can be used to retrieve the + /// outputs of the iterator program. + pub fn into_file(self) -> Result { + if let PerfLinkInner::Fd(fd) = self.into_inner() { + let fd = bpf_create_iter(fd.fd.as_fd()).map_err(|io_error| { + LinkError::SyscallError(SyscallError { + call: "bpf_iter_create", + io_error, + }) + })?; + Ok(fd.into_inner().into()) + } else { + Err(LinkError::InvalidLink) + } + } +} diff --git a/aya/src/programs/kprobe.rs b/aya/src/programs/kprobe.rs index 81e830e9..46158ce6 100644 --- a/aya/src/programs/kprobe.rs +++ b/aya/src/programs/kprobe.rs @@ -6,18 +6,18 @@ use std::{ path::{Path, PathBuf}, }; +use aya_obj::generated::{bpf_link_type, bpf_prog_type::BPF_PROG_TYPE_KPROBE}; use thiserror::Error; use crate::{ - generated::{bpf_link_type, bpf_prog_type::BPF_PROG_TYPE_KPROBE}, + VerifierLogLevel, programs::{ - define_link_wrapper, load_program, + FdLink, LinkError, ProgramData, ProgramError, ProgramType, define_link_wrapper, + impl_try_into_fdlink, load_program, perf_attach::{PerfLinkIdInner, PerfLinkInner}, - probe::{attach, ProbeKind}, - FdLink, LinkError, ProgramData, ProgramError, + probe::{ProbeKind, attach}, }, sys::bpf_link_get_info_by_fd, - VerifierLogLevel, }; /// A kernel probe. @@ -51,6 +51,9 @@ pub struct KProbe { } impl KProbe { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::KProbe; + /// Loads the program inside the kernel. pub fn load(&mut self) -> Result<(), ProgramError> { load_program(BPF_PROG_TYPE_KPROBE, &mut self.data) @@ -78,22 +81,14 @@ impl KProbe { fn_name: T, offset: u64, ) -> Result { - attach(&mut self.data, self.kind, fn_name.as_ref(), offset, None) - } - - /// Detaches the program. - /// - /// See [KProbe::attach]. - pub fn detach(&mut self, link_id: KProbeLinkId) -> Result<(), ProgramError> { - self.data.links.remove(link_id) - } - - /// Takes ownership of the link referenced by the provided link_id. - /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. - pub fn take_link(&mut self, link_id: KProbeLinkId) -> Result { - self.data.take_link(link_id) + attach( + &mut self.data, + self.kind, + fn_name.as_ref(), + offset, + None, // pid + None, // cookie + ) } /// Creates a program from a pinned entry on a bpffs. @@ -109,12 +104,11 @@ impl KProbe { } define_link_wrapper!( - /// The link used by [KProbe] programs. KProbeLink, - /// The type returned by [KProbe::attach]. Can be passed to [KProbe::detach]. KProbeLinkId, PerfLinkInner, - PerfLinkIdInner + PerfLinkIdInner, + KProbe, ); /// The type returned when attaching a [`KProbe`] fails. @@ -131,17 +125,7 @@ pub enum KProbeError { }, } -impl TryFrom for FdLink { - type Error = LinkError; - - fn try_from(value: KProbeLink) -> Result { - if let PerfLinkInner::FdLink(fd) = value.into_inner() { - Ok(fd) - } else { - Err(LinkError::InvalidLink) - } - } -} +impl_try_into_fdlink!(KProbeLink, PerfLinkInner); impl TryFrom for KProbeLink { type Error = LinkError; @@ -149,7 +133,7 @@ impl TryFrom for KProbeLink { fn try_from(fd_link: FdLink) -> Result { let info = bpf_link_get_info_by_fd(fd_link.fd.as_fd())?; if info.type_ == (bpf_link_type::BPF_LINK_TYPE_KPROBE_MULTI as u32) { - return Ok(Self::new(PerfLinkInner::FdLink(fd_link))); + return Ok(Self::new(PerfLinkInner::Fd(fd_link))); } Err(LinkError::InvalidLink) } diff --git a/aya/src/programs/links.rs b/aya/src/programs/links.rs index b809d1dc..1a80f9e1 100644 --- a/aya/src/programs/links.rs +++ b/aya/src/programs/links.rs @@ -1,25 +1,34 @@ //! Program links. use std::{ - collections::{hash_map::Entry, HashMap}, ffi::CString, io, - os::fd::{AsFd as _, AsRawFd as _, BorrowedFd, OwnedFd, RawFd}, + os::fd::{AsFd as _, AsRawFd as _, BorrowedFd, RawFd}, path::{Path, PathBuf}, }; +use aya_obj::{ + InvalidTypeBinding, + generated::{ + BPF_F_AFTER, BPF_F_ALLOW_MULTI, BPF_F_ALLOW_OVERRIDE, BPF_F_BEFORE, BPF_F_ID, BPF_F_LINK, + BPF_F_REPLACE, bpf_attach_type, bpf_link_info, bpf_link_type, + }, +}; +use hashbrown::hash_set::{Entry, HashSet}; use thiserror::Error; use crate::{ - generated::bpf_attach_type, pin::PinError, - programs::{ProgramError, ProgramFd}, - sys::{bpf_get_object, bpf_pin_object, bpf_prog_attach, bpf_prog_detach, SyscallError}, + programs::{MultiProgLink, MultiProgram, ProgramError, ProgramFd, ProgramId}, + sys::{ + SyscallError, bpf_get_object, bpf_link_get_info_by_fd, bpf_pin_object, bpf_prog_attach, + bpf_prog_detach, + }, }; /// A Link. -pub trait Link: std::fmt::Debug + 'static { +pub trait Link: std::fmt::Debug + Eq + std::hash::Hash + 'static { /// Unique Id - type Id: std::fmt::Debug + std::hash::Hash + Eq + PartialEq; + type Id: std::fmt::Debug + Eq + std::hash::Hash + hashbrown::Equivalent; /// Returns the link id fn id(&self) -> Self::Id; @@ -28,51 +37,179 @@ pub trait Link: std::fmt::Debug + 'static { fn detach(self) -> Result<(), ProgramError>; } +/// Program attachment mode. +#[derive(Clone, Copy, Debug, Default)] +pub enum CgroupAttachMode { + /// Allows only one BPF program in the cgroup subtree. + #[default] + Single, + + /// Allows the program to be overridden by one in a sub-cgroup. + AllowOverride, + + /// Allows multiple programs to be run in the cgroup subtree. + AllowMultiple, +} + +impl From for u32 { + fn from(mode: CgroupAttachMode) -> Self { + match mode { + CgroupAttachMode::Single => 0, + CgroupAttachMode::AllowOverride => BPF_F_ALLOW_OVERRIDE, + CgroupAttachMode::AllowMultiple => BPF_F_ALLOW_MULTI, + } + } +} + #[derive(Debug)] -pub(crate) struct LinkMap { - links: HashMap, +pub(crate) struct Links { + links: HashSet, } -impl LinkMap { +impl Links +where + T: Eq + std::hash::Hash + Link, + T::Id: hashbrown::Equivalent + Eq + std::hash::Hash, +{ pub(crate) fn new() -> Self { Self { - links: HashMap::new(), + links: Default::default(), } } pub(crate) fn insert(&mut self, link: T) -> Result { - let id = link.id(); - - match self.links.entry(link.id()) { - Entry::Occupied(_) => return Err(ProgramError::AlreadyAttached), - Entry::Vacant(e) => e.insert(link), - }; - - Ok(id) + match self.links.entry(link) { + Entry::Occupied(_entry) => Err(ProgramError::AlreadyAttached), + Entry::Vacant(entry) => Ok(entry.insert().get().id()), + } } pub(crate) fn remove(&mut self, link_id: T::Id) -> Result<(), ProgramError> { self.links - .remove(&link_id) + .take(&link_id) .ok_or(ProgramError::NotAttached)? .detach() } + pub(crate) fn forget(&mut self, link_id: T::Id) -> Result { + self.links.take(&link_id).ok_or(ProgramError::NotAttached) + } +} + +impl Links { pub(crate) fn remove_all(&mut self) -> Result<(), ProgramError> { - for (_, link) in self.links.drain() { + for link in self.links.drain() { link.detach()?; } Ok(()) } +} - pub(crate) fn forget(&mut self, link_id: T::Id) -> Result { - self.links.remove(&link_id).ok_or(ProgramError::NotAttached) +impl Drop for Links { + fn drop(&mut self) { + let _: Result<(), ProgramError> = self.remove_all(); } } -impl Drop for LinkMap { - fn drop(&mut self) { - let _ = self.remove_all(); +/// Provides metadata information about an eBPF attachment. +#[doc(alias = "bpf_link_info")] +pub struct LinkInfo(bpf_link_info); + +impl LinkInfo { + pub(crate) fn new_from_fd(fd: BorrowedFd<'_>) -> Result { + let info = bpf_link_get_info_by_fd(fd)?; + Ok(Self(info)) + } + + /// Returns the link ID. + pub fn id(&self) -> u32 { + self.0.id + } + + /// Returns the program ID. + pub fn program_id(&self) -> u32 { + self.0.prog_id + } + + /// Returns the type of the link. + pub fn link_type(&self) -> Result { + bpf_link_type::try_from(self.0.type_) + .map_err(|InvalidTypeBinding { value }| LinkError::UnknownLinkType(value)) + .and_then(LinkType::try_from) + } +} + +/// The type of eBPF link. +#[non_exhaustive] +#[doc(alias = "bpf_link_type")] +#[derive(Copy, Clone, Debug, PartialEq)] +pub enum LinkType { + /// An unspecified link type. + #[doc(alias = "BPF_LINK_TYPE_UNSPEC")] + Unspecified = bpf_link_type::BPF_LINK_TYPE_UNSPEC as isize, + /// A Raw Tracepoint link type. + #[doc(alias = "BPF_LINK_TYPE_RAW_TRACEPOINT")] + RawTracePoint = bpf_link_type::BPF_LINK_TYPE_RAW_TRACEPOINT as isize, + /// A Tracing link type. + #[doc(alias = "BPF_LINK_TYPE_TRACING")] + Tracing = bpf_link_type::BPF_LINK_TYPE_TRACING as isize, + /// A Cgroup link type. + #[doc(alias = "BPF_LINK_TYPE_CGROUP")] + Cgroup = bpf_link_type::BPF_LINK_TYPE_CGROUP as isize, + /// An Iterator link type. + #[doc(alias = "BPF_LINK_TYPE_ITER")] + Iter = bpf_link_type::BPF_LINK_TYPE_ITER as isize, + /// A Network Namespace link type. + #[doc(alias = "BPF_LINK_TYPE_NETNS")] + Netns = bpf_link_type::BPF_LINK_TYPE_NETNS as isize, + /// An XDP link type. + #[doc(alias = "BPF_LINK_TYPE_XDP")] + Xdp = bpf_link_type::BPF_LINK_TYPE_XDP as isize, + /// A Perf Event link type. + #[doc(alias = "BPF_LINK_TYPE_PERF_EVENT")] + PerfEvent = bpf_link_type::BPF_LINK_TYPE_PERF_EVENT as isize, + /// A KProbe Multi link type. + #[doc(alias = "BPF_LINK_TYPE_KPROBE_MULTI")] + KProbeMulti = bpf_link_type::BPF_LINK_TYPE_KPROBE_MULTI as isize, + /// A StructOps link type. + #[doc(alias = "BPF_LINK_TYPE_STRUCT_OPS")] + StructOps = bpf_link_type::BPF_LINK_TYPE_STRUCT_OPS as isize, + /// A Netfilter link type. + #[doc(alias = "BPF_LINK_TYPE_NETFILTER")] + Netfilter = bpf_link_type::BPF_LINK_TYPE_NETFILTER as isize, + /// A Tcx link type. + #[doc(alias = "BPF_LINK_TYPE_TCX")] + Tcx = bpf_link_type::BPF_LINK_TYPE_TCX as isize, + /// A Uprobe Multi link type. + #[doc(alias = "BPF_LINK_TYPE_UPROBE_MULTI")] + UProbeMulti = bpf_link_type::BPF_LINK_TYPE_UPROBE_MULTI as isize, + /// A Netkit link type. + #[doc(alias = "BPF_LINK_TYPE_NETKIT")] + Netkit = bpf_link_type::BPF_LINK_TYPE_NETKIT as isize, +} + +impl TryFrom for LinkType { + type Error = LinkError; + + fn try_from(link_type: bpf_link_type) -> Result { + use bpf_link_type::*; + match link_type { + BPF_LINK_TYPE_UNSPEC => Ok(Self::Unspecified), + BPF_LINK_TYPE_RAW_TRACEPOINT => Ok(Self::RawTracePoint), + BPF_LINK_TYPE_TRACING => Ok(Self::Tracing), + BPF_LINK_TYPE_CGROUP => Ok(Self::Cgroup), + BPF_LINK_TYPE_ITER => Ok(Self::Iter), + BPF_LINK_TYPE_NETNS => Ok(Self::Netns), + BPF_LINK_TYPE_XDP => Ok(Self::Xdp), + BPF_LINK_TYPE_PERF_EVENT => Ok(Self::PerfEvent), + BPF_LINK_TYPE_KPROBE_MULTI => Ok(Self::KProbeMulti), + BPF_LINK_TYPE_STRUCT_OPS => Ok(Self::StructOps), + BPF_LINK_TYPE_NETFILTER => Ok(Self::Netfilter), + BPF_LINK_TYPE_TCX => Ok(Self::Tcx), + BPF_LINK_TYPE_UPROBE_MULTI => Ok(Self::UProbeMulti), + BPF_LINK_TYPE_NETKIT => Ok(Self::Netkit), + __MAX_BPF_LINK_TYPE => Err(LinkError::UnknownLinkType(link_type as u32)), + } } } @@ -92,7 +229,7 @@ pub struct FdLinkId(pub(crate) RawFd); /// /// # Example /// -///```no_run +/// ```no_run /// # let mut bpf = Ebpf::load_file("ebpf_programs.o")?; /// use aya::{Ebpf, programs::{links::FdLink, KProbe}}; /// @@ -107,11 +244,11 @@ pub struct FdLinkId(pub(crate) RawFd); /// ``` #[derive(Debug)] pub struct FdLink { - pub(crate) fd: OwnedFd, + pub(crate) fd: crate::MockableFd, } impl FdLink { - pub(crate) fn new(fd: OwnedFd) -> Self { + pub(crate) fn new(fd: crate::MockableFd) -> Self { Self { fd } } @@ -154,12 +291,17 @@ impl FdLink { error, } })?; - bpf_pin_object(self.fd.as_fd(), &path_string).map_err(|(_, io_error)| SyscallError { + bpf_pin_object(self.fd.as_fd(), &path_string).map_err(|io_error| SyscallError { call: "BPF_OBJ_PIN", io_error, })?; Ok(PinnedLink::new(path.into(), self)) } + + /// Returns the kernel information about this link. + pub fn info(&self) -> Result { + LinkInfo::new_from_fd(self.fd.as_fd()) + } } impl Link for FdLink { @@ -179,6 +321,8 @@ impl Link for FdLink { } } +id_as_key!(FdLink, FdLinkId); + impl From for FdLink { fn from(p: PinnedLink) -> Self { p.inner @@ -207,7 +351,7 @@ impl PinnedLink { // TODO: avoid this unwrap by adding a new error variant. let path_string = CString::new(path.as_ref().as_os_str().as_bytes()).unwrap(); - let fd = bpf_get_object(&path_string).map_err(|(_, io_error)| { + let fd = bpf_get_object(&path_string).map_err(|io_error| { LinkError::SyscallError(SyscallError { call: "BPF_OBJ_GET", io_error, @@ -231,14 +375,14 @@ pub struct ProgAttachLinkId(RawFd, RawFd, bpf_attach_type); #[derive(Debug)] pub struct ProgAttachLink { prog_fd: ProgramFd, - target_fd: OwnedFd, + target_fd: crate::MockableFd, attach_type: bpf_attach_type, } impl ProgAttachLink { pub(crate) fn new( prog_fd: ProgramFd, - target_fd: OwnedFd, + target_fd: crate::MockableFd, attach_type: bpf_attach_type, ) -> Self { Self { @@ -252,14 +396,17 @@ impl ProgAttachLink { prog_fd: BorrowedFd<'_>, target_fd: BorrowedFd<'_>, attach_type: bpf_attach_type, + mode: CgroupAttachMode, ) -> Result { // The link is going to own this new file descriptor so we are // going to need a duplicate whose lifetime we manage. Let's // duplicate it prior to attaching it so the new file // descriptor is closed at drop in case it fails to attach. let prog_fd = prog_fd.try_clone_to_owned()?; + let prog_fd = crate::MockableFd::from_fd(prog_fd); let target_fd = target_fd.try_clone_to_owned()?; - bpf_prog_attach(prog_fd.as_fd(), target_fd.as_fd(), attach_type)?; + let target_fd = crate::MockableFd::from_fd(target_fd); + bpf_prog_attach(prog_fd.as_fd(), target_fd.as_fd(), attach_type, mode.into())?; let prog_fd = ProgramFd(prog_fd); Ok(Self { @@ -291,18 +438,58 @@ impl Link for ProgAttachLink { } } +id_as_key!(ProgAttachLink, ProgAttachLinkId); + +macro_rules! id_as_key { + ($wrapper:ident, $wrapper_id:ident) => { + impl PartialEq for $wrapper { + fn eq(&self, other: &Self) -> bool { + use $crate::programs::links::Link as _; + + self.id() == other.id() + } + } + + impl Eq for $wrapper {} + + impl std::hash::Hash for $wrapper { + fn hash(&self, state: &mut H) { + use $crate::programs::links::Link as _; + + self.id().hash(state) + } + } + + impl hashbrown::Equivalent<$wrapper> for $wrapper_id { + fn equivalent(&self, key: &$wrapper) -> bool { + use $crate::programs::links::Link as _; + + *self == key.id() + } + } + }; +} + +pub(crate) use id_as_key; + macro_rules! define_link_wrapper { - (#[$doc1:meta] $wrapper:ident, #[$doc2:meta] $wrapper_id:ident, $base:ident, $base_id:ident) => { - #[$doc2] + ($wrapper:ident, $wrapper_id:ident, $base:ident, $base_id:ident, $program:ident $(,)?) => { + /// The type returned by + #[doc = concat!("[`", stringify!($program), "::attach`]")] + /// . Can be passed to + #[doc = concat!("[`", stringify!($program), "::detach`]")] + /// . #[derive(Debug, Hash, Eq, PartialEq)] pub struct $wrapper_id($base_id); - #[$doc1] + /// The link used by + #[doc = concat!("[`", stringify!($program), "`]")] + /// programs. #[derive(Debug)] pub struct $wrapper(Option<$base>); #[allow(dead_code)] - // allow dead code since currently XDP is the only consumer of inner and + // allow dead code since currently XDP/TC are the only consumers of inner and // into_inner impl $wrapper { fn new(base: $base) -> $wrapper { @@ -320,10 +507,10 @@ macro_rules! define_link_wrapper { impl Drop for $wrapper { fn drop(&mut self) { - use crate::programs::links::Link; + use $crate::programs::links::Link as _; if let Some(base) = self.0.take() { - let _ = base.detach(); + let _: Result<(), ProgramError> = base.detach(); } } } @@ -340,6 +527,8 @@ macro_rules! define_link_wrapper { } } + $crate::programs::links::id_as_key!($wrapper, $wrapper_id); + impl From<$base> for $wrapper { fn from(b: $base) -> $wrapper { $wrapper(Some(b)) @@ -351,31 +540,197 @@ macro_rules! define_link_wrapper { w.0.take().unwrap() } } + + impl $program { + /// Detaches the program. + /// + /// See [`Self::attach`]. + pub fn detach(&mut self, link_id: $wrapper_id) -> Result<(), ProgramError> { + self.data.links.remove(link_id) + } + + /// Takes ownership of the link referenced by the provided `link_id`. + /// + /// The caller takes the responsibility of managing the lifetime of the link. When the + /// returned + #[doc = concat!("[`", stringify!($wrapper), "`]")] + /// is dropped, the link will be detached. + pub fn take_link(&mut self, link_id: $wrapper_id) -> Result<$wrapper, ProgramError> { + self.data.links.forget(link_id) + } + } }; } pub(crate) use define_link_wrapper; +macro_rules! impl_try_into_fdlink { + ($wrapper:ident, $inner:ident) => { + impl TryFrom<$wrapper> for $crate::programs::FdLink { + type Error = $crate::programs::LinkError; + + fn try_from(value: $wrapper) -> Result { + if let $inner::Fd(fd) = value.into_inner() { + Ok(fd) + } else { + Err($crate::programs::LinkError::InvalidLink) + } + } + } + }; +} + +pub(crate) use impl_try_into_fdlink; + #[derive(Error, Debug)] /// Errors from operations on links. pub enum LinkError { /// Invalid link. #[error("Invalid link")] InvalidLink, + + /// The kernel type of this link is not understood by Aya. + /// Please open an issue on GitHub if you encounter this error. + #[error("unknown link type {0}")] + UnknownLinkType(u32), + /// Syscall failed. #[error(transparent)] SyscallError(#[from] SyscallError), } +#[derive(Debug)] +pub(crate) enum LinkRef { + Id(u32), + Fd(RawFd), +} + +bitflags::bitflags! { + /// Flags which are use to build a set of MprogOptions. + #[derive(Clone, Copy, Debug, Default)] + pub(crate) struct MprogFlags: u32 { + const REPLACE = BPF_F_REPLACE; + const BEFORE = BPF_F_BEFORE; + const AFTER = BPF_F_AFTER; + const ID = BPF_F_ID; + const LINK = BPF_F_LINK; + } +} + +/// Arguments required for interacting with the kernel's multi-prog API. +/// +/// # Minimum kernel version +/// +/// The minimum kernel version required to use this feature is 6.6.0. +/// +/// # Example +/// +/// ```no_run +/// # let mut bpf = aya::Ebpf::load(&[])?; +/// use aya::programs::{tc, SchedClassifier, TcAttachType, tc::TcAttachOptions, LinkOrder}; +/// +/// let prog: &mut SchedClassifier = bpf.program_mut("redirect_ingress").unwrap().try_into()?; +/// prog.load()?; +/// let options = TcAttachOptions::TcxOrder(LinkOrder::first()); +/// prog.attach_with_options("eth0", TcAttachType::Ingress, options)?; +/// +/// # Ok::<(), aya::EbpfError>(()) +/// ``` +#[derive(Debug)] +pub struct LinkOrder { + pub(crate) link_ref: LinkRef, + pub(crate) flags: MprogFlags, +} + +/// Ensure that default link ordering is to be attached last. +impl Default for LinkOrder { + fn default() -> Self { + Self { + link_ref: LinkRef::Fd(0), + flags: MprogFlags::AFTER, + } + } +} + +impl LinkOrder { + /// Attach before all other links. + pub fn first() -> Self { + Self { + link_ref: LinkRef::Id(0), + flags: MprogFlags::BEFORE, + } + } + + /// Attach after all other links. + pub fn last() -> Self { + Self { + link_ref: LinkRef::Id(0), + flags: MprogFlags::AFTER, + } + } + + /// Attach before the given link. + pub fn before_link(link: &L) -> Result { + Ok(Self { + link_ref: LinkRef::Fd(link.fd()?.as_raw_fd()), + flags: MprogFlags::BEFORE | MprogFlags::LINK, + }) + } + + /// Attach after the given link. + pub fn after_link(link: &L) -> Result { + Ok(Self { + link_ref: LinkRef::Fd(link.fd()?.as_raw_fd()), + flags: MprogFlags::AFTER | MprogFlags::LINK, + }) + } + + /// Attach before the given program. + pub fn before_program(program: &P) -> Result { + Ok(Self { + link_ref: LinkRef::Fd(program.fd()?.as_raw_fd()), + flags: MprogFlags::BEFORE, + }) + } + + /// Attach after the given program. + pub fn after_program(program: &P) -> Result { + Ok(Self { + link_ref: LinkRef::Fd(program.fd()?.as_raw_fd()), + flags: MprogFlags::AFTER, + }) + } + + /// Attach before the program with the given id. + pub fn before_program_id(id: ProgramId) -> Self { + Self { + link_ref: LinkRef::Id(id.0), + flags: MprogFlags::BEFORE | MprogFlags::ID, + } + } + + /// Attach after the program with the given id. + pub fn after_program_id(id: ProgramId) -> Self { + Self { + link_ref: LinkRef::Id(id.0), + flags: MprogFlags::AFTER | MprogFlags::ID, + } + } +} + #[cfg(test)] mod tests { use std::{cell::RefCell, fs::File, rc::Rc}; use assert_matches::assert_matches; + use aya_obj::generated::{BPF_F_ALLOW_MULTI, BPF_F_ALLOW_OVERRIDE}; use tempfile::tempdir; - use super::{FdLink, Link, LinkMap}; - use crate::{programs::ProgramError, sys::override_syscall}; + use super::{FdLink, Link, Links}; + use crate::{ + programs::{CgroupAttachMode, ProgramError}, + sys::override_syscall, + }; #[derive(Debug, Hash, Eq, PartialEq)] struct TestLinkId(u8, u8); @@ -408,9 +763,11 @@ mod tests { } } + id_as_key!(TestLink, TestLinkId); + #[test] fn test_link_map() { - let mut links = LinkMap::new(); + let mut links = Links::new(); let l1 = TestLink::new(1, 2); let l1_detached = Rc::clone(&l1.detached); let l2 = TestLink::new(1, 3); @@ -422,18 +779,18 @@ mod tests { assert_eq!(*l1_detached.borrow(), 0); assert_eq!(*l2_detached.borrow(), 0); - assert!(links.remove(id1).is_ok()); + links.remove(id1).unwrap(); assert_eq!(*l1_detached.borrow(), 1); assert_eq!(*l2_detached.borrow(), 0); - assert!(links.remove(id2).is_ok()); + links.remove(id2).unwrap(); assert_eq!(*l1_detached.borrow(), 1); assert_eq!(*l2_detached.borrow(), 1); } #[test] fn test_already_attached() { - let mut links = LinkMap::new(); + let mut links = Links::new(); links.insert(TestLink::new(1, 2)).unwrap(); assert_matches!( @@ -444,7 +801,7 @@ mod tests { #[test] fn test_not_attached() { - let mut links = LinkMap::new(); + let mut links = Links::new(); let l1 = TestLink::new(1, 2); let l1_id1 = l1.id(); @@ -462,11 +819,11 @@ mod tests { let l2_detached = Rc::clone(&l2.detached); { - let mut links = LinkMap::new(); + let mut links = Links::new(); let id1 = links.insert(l1).unwrap(); links.insert(l2).unwrap(); // manually remove one link - assert!(links.remove(id1).is_ok()); + links.remove(id1).unwrap(); assert_eq!(*l1_detached.borrow(), 1); assert_eq!(*l2_detached.borrow(), 0); } @@ -483,7 +840,7 @@ mod tests { let l2_detached = Rc::clone(&l2.detached); let owned_l1 = { - let mut links = LinkMap::new(); + let mut links = Links::new(); let id1 = links.insert(l1).unwrap(); links.insert(l2).unwrap(); // manually forget one link @@ -498,7 +855,7 @@ mod tests { assert_eq!(*l2_detached.borrow(), 1); // manually detach l1 - assert!(owned_l1.detach().is_ok()); + owned_l1.detach().unwrap(); assert_eq!(*l1_detached.borrow(), 1); assert_eq!(*l2_detached.borrow(), 1); } @@ -521,4 +878,17 @@ mod tests { pinned_link.unpin().expect("unpin failed"); assert!(!pin.exists()); } + + #[test] + fn test_cgroup_attach_flag() { + assert_eq!(u32::from(CgroupAttachMode::Single), 0); + assert_eq!( + u32::from(CgroupAttachMode::AllowOverride), + BPF_F_ALLOW_OVERRIDE + ); + assert_eq!( + u32::from(CgroupAttachMode::AllowMultiple), + BPF_F_ALLOW_MULTI + ); + } } diff --git a/aya/src/programs/lirc_mode2.rs b/aya/src/programs/lirc_mode2.rs index cbd47d95..c454e91c 100644 --- a/aya/src/programs/lirc_mode2.rs +++ b/aya/src/programs/lirc_mode2.rs @@ -1,10 +1,16 @@ //! Lirc programs. -use std::os::fd::{AsFd, AsRawFd as _, OwnedFd, RawFd}; +use std::os::fd::{AsFd, AsRawFd as _, RawFd}; + +use aya_obj::generated::{ + bpf_attach_type::BPF_LIRC_MODE2, bpf_prog_type::BPF_PROG_TYPE_LIRC_MODE2, +}; use crate::{ - generated::{bpf_attach_type::BPF_LIRC_MODE2, bpf_prog_type::BPF_PROG_TYPE_LIRC_MODE2}, - programs::{load_program, query, Link, ProgramData, ProgramError, ProgramFd, ProgramInfo}, - sys::{bpf_prog_attach, bpf_prog_detach, bpf_prog_get_fd_by_id}, + programs::{ + CgroupAttachMode, Link, ProgramData, ProgramError, ProgramFd, ProgramInfo, ProgramType, + id_as_key, load_program, query, + }, + sys::{ProgQueryTarget, bpf_prog_attach, bpf_prog_detach, bpf_prog_get_fd_by_id}, }; /// A program used to decode IR into key events for a lirc device. @@ -50,6 +56,9 @@ pub struct LircMode2 { } impl LircMode2 { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::LircMode2; + /// Loads the program inside the kernel. pub fn load(&mut self) -> Result<(), ProgramError> { load_program(BPF_PROG_TYPE_LIRC_MODE2, &mut self.data) @@ -67,37 +76,44 @@ impl LircMode2 { // descriptor is closed at drop in case it fails to attach. let prog_fd = prog_fd.try_clone()?; let lircdev_fd = lircdev.as_fd().try_clone_to_owned()?; + let lircdev_fd = crate::MockableFd::from_fd(lircdev_fd); - bpf_prog_attach(prog_fd.as_fd(), lircdev_fd.as_fd(), BPF_LIRC_MODE2)?; + bpf_prog_attach( + prog_fd.as_fd(), + lircdev_fd.as_fd(), + BPF_LIRC_MODE2, + CgroupAttachMode::Single.into(), + )?; self.data.links.insert(LircLink::new(prog_fd, lircdev_fd)) } /// Detaches the program. /// - /// See [LircMode2::attach]. + /// See [`Self::attach`]. pub fn detach(&mut self, link_id: LircLinkId) -> Result<(), ProgramError> { self.data.links.remove(link_id) } - /// Takes ownership of the link referenced by the provided link_id. + /// Takes ownership of the link referenced by the provided `link_id`. /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. + /// The caller takes the responsibility of managing the lifetime of the link. When the returned + /// [`LircLink`] is dropped, the link is detached. pub fn take_link(&mut self, link_id: LircLinkId) -> Result { - self.data.take_link(link_id) + self.data.links.forget(link_id) } /// Queries the lirc device for attached programs. pub fn query(target_fd: T) -> Result, ProgramError> { let target_fd = target_fd.as_fd(); - let prog_ids = query(target_fd, BPF_LIRC_MODE2, 0, &mut None)?; + let (_, prog_ids) = query(ProgQueryTarget::Fd(target_fd), BPF_LIRC_MODE2, 0, &mut None)?; prog_ids .into_iter() .map(|prog_id| { let prog_fd = bpf_prog_get_fd_by_id(prog_id)?; let target_fd = target_fd.try_clone_to_owned()?; + let target_fd = crate::MockableFd::from_fd(target_fd); let prog_fd = ProgramFd(prog_fd); Ok(LircLink::new(prog_fd, target_fd)) }) @@ -105,7 +121,7 @@ impl LircMode2 { } } -/// The type returned by [LircMode2::attach]. Can be passed to [LircMode2::detach]. +/// The type returned by [`LircMode2::attach`]. Can be passed to [`LircMode2::detach`]. #[derive(Debug, Hash, Eq, PartialEq)] pub struct LircLinkId(RawFd, RawFd); @@ -113,11 +129,11 @@ pub struct LircLinkId(RawFd, RawFd); /// An LircMode2 Link pub struct LircLink { prog_fd: ProgramFd, - target_fd: OwnedFd, + target_fd: crate::MockableFd, } impl LircLink { - pub(crate) fn new(prog_fd: ProgramFd, target_fd: OwnedFd) -> Self { + pub(crate) fn new(prog_fd: ProgramFd, target_fd: crate::MockableFd) -> Self { Self { prog_fd, target_fd } } @@ -143,3 +159,5 @@ impl Link for LircLink { .map_err(Into::into) } } + +id_as_key!(LircLink, LircLinkId); diff --git a/aya/src/programs/lsm.rs b/aya/src/programs/lsm.rs index 7c1d9ddf..776a5199 100644 --- a/aya/src/programs/lsm.rs +++ b/aya/src/programs/lsm.rs @@ -1,12 +1,13 @@ //! LSM probes. -use crate::{ +use aya_obj::{ + btf::{Btf, BtfKind}, generated::{bpf_attach_type::BPF_LSM_MAC, bpf_prog_type::BPF_PROG_TYPE_LSM}, - obj::btf::{Btf, BtfKind}, - programs::{ - define_link_wrapper, load_program, utils::attach_raw_tracepoint, FdLink, FdLinkId, - ProgramData, ProgramError, - }, +}; + +use crate::programs::{ + FdLink, FdLinkId, LsmAttachType, ProgramData, ProgramError, ProgramType, define_link_wrapper, + load_program, utils::attach_raw_tracepoint, }; /// A program that attaches to Linux LSM hooks. Used to implement security policy and @@ -17,7 +18,7 @@ use crate::{ /// /// LSM probes require a kernel compiled with `CONFIG_BPF_LSM=y` and `CONFIG_DEBUG_INFO_BTF=y`. /// In order for the probes to fire, you also need the BPF LSM to be enabled through your -/// kernel's boot paramters (like `lsm=lockdown,yama,bpf`). +/// kernel's boot parameters (like `lsm=lockdown,yama,bpf`). /// /// # Minimum kernel version /// @@ -53,6 +54,9 @@ pub struct Lsm { } impl Lsm { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::Lsm(LsmAttachType::Mac); + /// Loads the program inside the kernel. /// /// # Arguments @@ -73,28 +77,6 @@ impl Lsm { pub fn attach(&mut self) -> Result { attach_raw_tracepoint(&mut self.data, None) } - - /// Detaches the program. - /// - /// See [Lsm::attach]. - pub fn detach(&mut self, link_id: LsmLinkId) -> Result<(), ProgramError> { - self.data.links.remove(link_id) - } - - /// Takes ownership of the link referenced by the provided link_id. - /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. - pub fn take_link(&mut self, link_id: LsmLinkId) -> Result { - self.data.take_link(link_id) - } } -define_link_wrapper!( - /// The link used by [Lsm] programs. - LsmLink, - /// The type returned by [Lsm::attach]. Can be passed to [Lsm::detach]. - LsmLinkId, - FdLink, - FdLinkId -); +define_link_wrapper!(LsmLink, LsmLinkId, FdLink, FdLinkId, Lsm); diff --git a/aya/src/programs/lsm_cgroup.rs b/aya/src/programs/lsm_cgroup.rs new file mode 100644 index 00000000..991105a1 --- /dev/null +++ b/aya/src/programs/lsm_cgroup.rs @@ -0,0 +1,119 @@ +//! LSM Cgroup probes. + +use std::{os::fd::AsFd, path::Path}; + +use aya_obj::{ + btf::{Btf, BtfKind}, + generated::{bpf_attach_type::BPF_LSM_CGROUP, bpf_prog_type::BPF_PROG_TYPE_LSM}, +}; + +use crate::{ + VerifierLogLevel, + programs::{FdLink, FdLinkId, ProgramData, ProgramError, define_link_wrapper, load_program}, + sys::{BpfLinkCreateArgs, LinkTarget, SyscallError, bpf_link_create}, +}; + +/// A program that attaches to Linux LSM hooks with per-cgroup attachment type. Used to implement security policy and +/// audit logging. +/// +/// LSM probes can be attached to the kernel's [security hooks][1] to implement mandatory +/// access control policy and security auditing. +/// +/// LSM probes require a kernel compiled with `CONFIG_BPF_LSM=y` and `CONFIG_DEBUG_INFO_BTF=y`. +/// In order for the probes to fire, you also need the BPF LSM to be enabled through your +/// kernel's boot parameters (like `lsm=lockdown,yama,bpf`). +/// +/// # Minimum kernel version +/// +/// The minimum kernel version required to use this feature is 6.0. +/// +/// # Examples +/// +/// ```no_run +/// # #[derive(thiserror::Error, Debug)] +/// # enum LsmError { +/// # #[error(transparent)] +/// # BtfError(#[from] aya::BtfError), +/// # #[error(transparent)] +/// # Program(#[from] aya::programs::ProgramError), +/// # #[error(transparent)] +/// # Ebpf(#[from] aya::EbpfError), +/// # } +/// # let mut bpf = Ebpf::load_file("ebpf_programs.o")?; +/// use aya::{Ebpf, programs::LsmCgroup, BtfError, Btf}; +/// use std::fs::File; +/// +/// let btf = Btf::from_sys_fs()?; +/// let file = File::open("/sys/fs/cgroup/unified").unwrap(); +/// let program: &mut LsmCgroup = bpf.program_mut("lsm_prog").unwrap().try_into()?; +/// program.load("security_bprm_exec", &btf)?; +/// program.attach(file)?; +/// # Ok::<(), LsmError>(()) +/// ``` +/// +/// [1]: https://elixir.bootlin.com/linux/latest/source/include/linux/lsm_hook_defs.h +#[derive(Debug)] +#[doc(alias = "BPF_PROG_TYPE_LSM")] +pub struct LsmCgroup { + pub(crate) data: ProgramData, +} + +impl LsmCgroup { + /// Loads the program inside the kernel. + /// + /// # Arguments + /// + /// * `lsm_hook_name` - full name of the LSM hook that the program should + /// be attached to + pub fn load(&mut self, lsm_hook_name: &str, btf: &Btf) -> Result<(), ProgramError> { + self.data.expected_attach_type = Some(BPF_LSM_CGROUP); + let type_name = format!("bpf_lsm_{lsm_hook_name}"); + self.data.attach_btf_id = + Some(btf.id_by_type_name_kind(type_name.as_str(), BtfKind::Func)?); + load_program(BPF_PROG_TYPE_LSM, &mut self.data) + } + + /// Creates a program from a pinned entry on a bpffs. + /// + /// Existing links will not be populated. To work with existing links you should use [`crate::programs::links::PinnedLink`]. + /// + /// On drop, any managed links are detached and the program is unloaded. This will not result in + /// the program being unloaded from the kernel if it is still pinned. + pub fn from_pin>(path: P) -> Result { + let mut data = ProgramData::from_pinned_path(path, VerifierLogLevel::default())?; + data.expected_attach_type = Some(BPF_LSM_CGROUP); + Ok(Self { data }) + } + + /// Attaches the program. + /// + /// The returned value can be used to detach, see [LsmCgroup::detach]. + pub fn attach(&mut self, cgroup: T) -> Result { + let prog_fd = self.fd()?; + let prog_fd = prog_fd.as_fd(); + let cgroup_fd = cgroup.as_fd(); + // Unwrap safety: the function starts with `self.fd()?` that will succeed if and only + // if the program has been loaded, i.e. there is an fd. That happens if: + // - LsmCgroup::load has been called + // - LsmCgroup::from_pin has been called + // + // In all cases, expected_attach_type is guaranteed to be Some(_). + let attach_type = self.data.expected_attach_type.unwrap(); + let btf_id = self.data.attach_btf_id.ok_or(ProgramError::NotLoaded)?; + let link_fd = bpf_link_create( + prog_fd, + LinkTarget::Fd(cgroup_fd), + attach_type, + 0, + Some(BpfLinkCreateArgs::TargetBtfId(btf_id)), + ) + .map_err(|io_error| SyscallError { + call: "bpf_link_create", + io_error, + })?; + + self.data.links.insert(LsmLink::new(FdLink::new(link_fd))) + } +} + +define_link_wrapper!(LsmLink, LsmLinkId, FdLink, FdLinkId, LsmCgroup,); diff --git a/aya/src/programs/mod.rs b/aya/src/programs/mod.rs index 675e36f0..9e151ad8 100644 --- a/aya/src/programs/mod.rs +++ b/aya/src/programs/mod.rs @@ -37,6 +37,7 @@ //! [`maps`]: crate::maps // modules we don't export +mod info; mod probe; mod utils; @@ -50,10 +51,13 @@ pub mod cgroup_sysctl; pub mod extension; pub mod fentry; pub mod fexit; +pub mod flow_dissector; +pub mod iter; pub mod kprobe; pub mod links; pub mod lirc_mode2; pub mod lsm; +pub mod lsm_cgroup; pub mod perf_attach; pub mod perf_event; pub mod raw_trace_point; @@ -69,16 +73,24 @@ pub mod uprobe; pub mod xdp; use std::{ + borrow::Cow, ffi::CString, io, - num::NonZeroU32, - os::fd::{AsFd, AsRawFd, BorrowedFd, OwnedFd}, + os::fd::{AsFd, BorrowedFd}, path::{Path, PathBuf}, sync::Arc, - time::{Duration, SystemTime}, }; +use aya_obj::{ + VerifierLog, + btf::BtfError, + generated::{bpf_attach_type, bpf_prog_info, bpf_prog_type}, + programs::XdpAttachType, +}; +use info::impl_info; +pub use info::{LsmAttachType, ProgramInfo, ProgramType, loaded_programs}; use libc::ENOSPC; +use tc::SchedClassifierLink; use thiserror::Error; // re-export the main items needed to load and attach @@ -92,11 +104,14 @@ pub use crate::programs::{ extension::{Extension, ExtensionError}, fentry::FEntry, fexit::FExit, + flow_dissector::FlowDissector, + iter::Iter, kprobe::{KProbe, KProbeError}, - links::Link, + links::{CgroupAttachMode, Link, LinkOrder}, lirc_mode2::LircMode2, lsm::Lsm, - perf_event::{PerfEvent, PerfEventScope, PerfTypeId, SamplePolicy}, + lsm_cgroup::LsmCgroup, + perf_event::PerfEvent, probe::ProbeKind, raw_trace_point::RawTracePoint, sk_lookup::SkLookup, @@ -111,23 +126,16 @@ pub use crate::programs::{ xdp::{Xdp, XdpError, XdpFlags}, }; use crate::{ - generated::{bpf_attach_type, bpf_link_info, bpf_prog_info, bpf_prog_type}, + VerifierLogLevel, maps::MapError, - obj::{self, btf::BtfError, VerifierLog}, pin::PinError, - programs::{ - links::*, - perf_attach::*, - utils::{boot_time, get_fdinfo}, - }, + programs::{links::*, perf_attach::*}, sys::{ - bpf_btf_get_fd_by_id, bpf_get_object, bpf_link_get_fd_by_id, bpf_link_get_info_by_fd, - bpf_load_program, bpf_pin_object, bpf_prog_get_fd_by_id, bpf_prog_get_info_by_fd, - bpf_prog_query, iter_link_ids, iter_prog_ids, retry_with_verifier_logs, - EbpfLoadProgramAttrs, SyscallError, + EbpfLoadProgramAttrs, NetlinkError, ProgQueryTarget, SyscallError, bpf_btf_get_fd_by_id, + bpf_get_object, bpf_link_get_fd_by_id, bpf_load_program, bpf_pin_object, + bpf_prog_get_fd_by_id, bpf_prog_query, iter_link_ids, retry_with_verifier_logs, }, - util::{bytes_of_bpf_name, KernelVersion}, - VerifierLogLevel, + util::KernelVersion, }; /// Error type returned when working with programs. @@ -150,7 +158,7 @@ pub enum ProgramError { NotAttached, /// Loading the program failed. - #[error("the BPF_PROG_LOAD syscall failed. Verifier output: {verifier_log}")] + #[error("the BPF_PROG_LOAD syscall returned {io_error}. Verifier output: {verifier_log}")] LoadError { /// The [`io::Error`] returned by the `BPF_PROG_LOAD` syscall. #[source] @@ -220,11 +228,19 @@ pub enum ProgramError { /// An error occurred while working with IO. #[error(transparent)] IOError(#[from] io::Error), + + /// Providing an attach cookie is not supported. + #[error("providing an attach cookie is not supported")] + AttachCookieNotSupported, + + /// An error occurred while working with Netlink. + #[error(transparent)] + NetlinkError(#[from] NetlinkError), } /// A [`Program`] file descriptor. #[derive(Debug)] -pub struct ProgramFd(OwnedFd); +pub struct ProgramFd(crate::MockableFd); impl ProgramFd { /// Creates a new instance that shares the same underlying file description as [`self`]. @@ -242,6 +258,20 @@ impl AsFd for ProgramFd { } } +/// A [`Program`] identifier. +pub struct ProgramId(u32); + +impl ProgramId { + /// Create a new program id. + /// + /// This method is unsafe since it doesn't check that the given `id` is a + /// valid program id. + #[expect(clippy::missing_safety_doc)] + pub unsafe fn new(id: u32) -> Self { + Self(id) + } +} + /// eBPF program type. #[derive(Debug)] pub enum Program { @@ -279,12 +309,16 @@ pub enum Program { RawTracePoint(RawTracePoint), /// A [`Lsm`] program Lsm(Lsm), + /// A [`LsmCgroup`] program + LsmCgroup(LsmCgroup), /// A [`BtfTracePoint`] program BtfTracePoint(BtfTracePoint), /// A [`FEntry`] program FEntry(FEntry), /// A [`FExit`] program FExit(FExit), + /// A [`FlowDissector`] program + FlowDissector(FlowDissector), /// A [`Extension`] program Extension(Extension), /// A [`SkLookup`] program @@ -293,37 +327,48 @@ pub enum Program { CgroupSock(CgroupSock), /// A [`CgroupDevice`] program CgroupDevice(CgroupDevice), + /// An [`Iter`] program + Iter(Iter), } impl Program { - /// Returns the low level program type. - pub fn prog_type(&self) -> bpf_prog_type { - use crate::generated::bpf_prog_type::*; + /// Returns the program type. + pub fn prog_type(&self) -> ProgramType { match self { - Self::KProbe(_) => BPF_PROG_TYPE_KPROBE, - Self::UProbe(_) => BPF_PROG_TYPE_KPROBE, - Self::TracePoint(_) => BPF_PROG_TYPE_TRACEPOINT, - Self::SocketFilter(_) => BPF_PROG_TYPE_SOCKET_FILTER, - Self::Xdp(_) => BPF_PROG_TYPE_XDP, - Self::SkMsg(_) => BPF_PROG_TYPE_SK_MSG, - Self::SkSkb(_) => BPF_PROG_TYPE_SK_SKB, - Self::SockOps(_) => BPF_PROG_TYPE_SOCK_OPS, - Self::SchedClassifier(_) => BPF_PROG_TYPE_SCHED_CLS, - Self::CgroupSkb(_) => BPF_PROG_TYPE_CGROUP_SKB, - Self::CgroupSysctl(_) => BPF_PROG_TYPE_CGROUP_SYSCTL, - Self::CgroupSockopt(_) => BPF_PROG_TYPE_CGROUP_SOCKOPT, - Self::LircMode2(_) => BPF_PROG_TYPE_LIRC_MODE2, - Self::PerfEvent(_) => BPF_PROG_TYPE_PERF_EVENT, - Self::RawTracePoint(_) => BPF_PROG_TYPE_RAW_TRACEPOINT, - Self::Lsm(_) => BPF_PROG_TYPE_LSM, - Self::BtfTracePoint(_) => BPF_PROG_TYPE_TRACING, - Self::FEntry(_) => BPF_PROG_TYPE_TRACING, - Self::FExit(_) => BPF_PROG_TYPE_TRACING, - Self::Extension(_) => BPF_PROG_TYPE_EXT, - Self::CgroupSockAddr(_) => BPF_PROG_TYPE_CGROUP_SOCK_ADDR, - Self::SkLookup(_) => BPF_PROG_TYPE_SK_LOOKUP, - Self::CgroupSock(_) => BPF_PROG_TYPE_CGROUP_SOCK, - Self::CgroupDevice(_) => BPF_PROG_TYPE_CGROUP_DEVICE, + Self::KProbe(_) | Self::UProbe(_) => ProgramType::KProbe, + Self::TracePoint(_) => ProgramType::TracePoint, + Self::SocketFilter(_) => ProgramType::SocketFilter, + Self::Xdp(_) => ProgramType::Xdp, + Self::SkMsg(_) => ProgramType::SkMsg, + Self::SkSkb(_) => ProgramType::SkSkb, + Self::SockOps(_) => ProgramType::SockOps, + Self::SchedClassifier(_) => ProgramType::SchedClassifier, + Self::CgroupSkb(_) => ProgramType::CgroupSkb, + Self::CgroupSysctl(_) => ProgramType::CgroupSysctl, + Self::CgroupSockopt(_) => ProgramType::CgroupSockopt, + Self::LircMode2(_) => ProgramType::LircMode2, + Self::PerfEvent(_) => ProgramType::PerfEvent, + Self::RawTracePoint(_) => ProgramType::RawTracePoint, + Self::Lsm(_) => ProgramType::Lsm(LsmAttachType::Mac), + Self::LsmCgroup(_) => ProgramType::Lsm(LsmAttachType::Cgroup), + // The following program types are a subset of `TRACING` programs: + // + // - `BPF_TRACE_RAW_TP` (`BtfTracePoint`) + // - `BTF_TRACE_FENTRY` (`FEntry`) + // - `BPF_MODIFY_RETURN` (not supported yet in Aya) + // - `BPF_TRACE_FEXIT` (`FExit`) + // - `BPF_TRACE_ITER` (`Iter`) + // + // https://github.com/torvalds/linux/blob/v6.12/kernel/bpf/syscall.c#L3935-L3940 + Self::BtfTracePoint(_) | Self::FEntry(_) | Self::FExit(_) | Self::Iter(_) => { + ProgramType::Tracing + } + Self::Extension(_) => ProgramType::Extension, + Self::CgroupSockAddr(_) => ProgramType::CgroupSockAddr, + Self::SkLookup(_) => ProgramType::SkLookup, + Self::CgroupSock(_) => ProgramType::CgroupSock, + Self::CgroupDevice(_) => ProgramType::CgroupDevice, + Self::FlowDissector(_) => ProgramType::FlowDissector, } } @@ -346,14 +391,17 @@ impl Program { Self::PerfEvent(p) => p.pin(path), Self::RawTracePoint(p) => p.pin(path), Self::Lsm(p) => p.pin(path), + Self::LsmCgroup(p) => p.pin(path), Self::BtfTracePoint(p) => p.pin(path), Self::FEntry(p) => p.pin(path), Self::FExit(p) => p.pin(path), + Self::FlowDissector(p) => p.pin(path), Self::Extension(p) => p.pin(path), Self::CgroupSockAddr(p) => p.pin(path), Self::SkLookup(p) => p.pin(path), Self::CgroupSock(p) => p.pin(path), Self::CgroupDevice(p) => p.pin(path), + Self::Iter(p) => p.pin(path), } } @@ -376,14 +424,17 @@ impl Program { Self::PerfEvent(mut p) => p.unload(), Self::RawTracePoint(mut p) => p.unload(), Self::Lsm(mut p) => p.unload(), + Self::LsmCgroup(mut p) => p.unload(), Self::BtfTracePoint(mut p) => p.unload(), Self::FEntry(mut p) => p.unload(), Self::FExit(mut p) => p.unload(), + Self::FlowDissector(mut p) => p.unload(), Self::Extension(mut p) => p.unload(), Self::CgroupSockAddr(mut p) => p.unload(), Self::SkLookup(mut p) => p.unload(), Self::CgroupSock(mut p) => p.unload(), Self::CgroupDevice(mut p) => p.unload(), + Self::Iter(mut p) => p.unload(), } } @@ -408,14 +459,17 @@ impl Program { Self::PerfEvent(p) => p.fd(), Self::RawTracePoint(p) => p.fd(), Self::Lsm(p) => p.fd(), + Self::LsmCgroup(p) => p.fd(), Self::BtfTracePoint(p) => p.fd(), Self::FEntry(p) => p.fd(), Self::FExit(p) => p.fd(), + Self::FlowDissector(p) => p.fd(), Self::Extension(p) => p.fd(), Self::CgroupSockAddr(p) => p.fd(), Self::SkLookup(p) => p.fd(), Self::CgroupSock(p) => p.fd(), Self::CgroupDevice(p) => p.fd(), + Self::Iter(p) => p.fd(), } } @@ -441,29 +495,32 @@ impl Program { Self::PerfEvent(p) => p.info(), Self::RawTracePoint(p) => p.info(), Self::Lsm(p) => p.info(), + Self::LsmCgroup(p) => p.info(), Self::BtfTracePoint(p) => p.info(), Self::FEntry(p) => p.info(), Self::FExit(p) => p.info(), + Self::FlowDissector(p) => p.info(), Self::Extension(p) => p.info(), Self::CgroupSockAddr(p) => p.info(), Self::SkLookup(p) => p.info(), Self::CgroupSock(p) => p.info(), Self::CgroupDevice(p) => p.info(), + Self::Iter(p) => p.info(), } } } #[derive(Debug)] pub(crate) struct ProgramData { - pub(crate) name: Option, - pub(crate) obj: Option<(obj::Program, obj::Function)>, + pub(crate) name: Option>, + pub(crate) obj: Option<(aya_obj::Program, aya_obj::Function)>, pub(crate) fd: Option, - pub(crate) links: LinkMap, + pub(crate) links: Links, pub(crate) expected_attach_type: Option, - pub(crate) attach_btf_obj_fd: Option, + pub(crate) attach_btf_obj_fd: Option, pub(crate) attach_btf_id: Option, pub(crate) attach_prog_fd: Option, - pub(crate) btf_fd: Option>, + pub(crate) btf_fd: Option>, pub(crate) verifier_log_level: VerifierLogLevel, pub(crate) path: Option, pub(crate) flags: u32, @@ -471,16 +528,16 @@ pub(crate) struct ProgramData { impl ProgramData { pub(crate) fn new( - name: Option, - obj: (obj::Program, obj::Function), - btf_fd: Option>, + name: Option>, + obj: (aya_obj::Program, aya_obj::Function), + btf_fd: Option>, verifier_log_level: VerifierLogLevel, ) -> Self { Self { name, obj: Some(obj), fd: None, - links: LinkMap::new(), + links: Links::new(), expected_attach_type: None, attach_btf_obj_fd: None, attach_btf_id: None, @@ -493,8 +550,8 @@ impl ProgramData { } pub(crate) fn from_bpf_prog_info( - name: Option, - fd: OwnedFd, + name: Option>, + fd: crate::MockableFd, path: &Path, info: bpf_prog_info, verifier_log_level: VerifierLogLevel, @@ -512,7 +569,7 @@ impl ProgramData { name, obj: None, fd: Some(ProgramFd(fd)), - links: LinkMap::new(), + links: Links::new(), expected_attach_type: None, attach_btf_obj_fd, attach_btf_id, @@ -532,13 +589,13 @@ impl ProgramData { // TODO: avoid this unwrap by adding a new error variant. let path_string = CString::new(path.as_ref().as_os_str().as_bytes()).unwrap(); - let fd = bpf_get_object(&path_string).map_err(|(_, io_error)| SyscallError { + let fd = bpf_get_object(&path_string).map_err(|io_error| SyscallError { call: "bpf_obj_get", io_error, })?; let info = ProgramInfo::new_from_fd(fd.as_fd())?; - let name = info.name_as_str().map(|s| s.to_string()); + let name = info.name_as_str().map(ToOwned::to_owned).map(Into::into); Self::from_bpf_prog_info(name, fd, path.as_ref(), info.0, verifier_log_level) } } @@ -547,10 +604,6 @@ impl ProgramData { fn fd(&self) -> Result<&ProgramFd, ProgramError> { self.fd.as_ref().ok_or(ProgramError::NotLoaded) } - - pub(crate) fn take_link(&mut self, link_id: T::Id) -> Result { - self.links.forget(link_id) - } } fn unload_program(data: &mut ProgramData) -> Result<(), ProgramError> { @@ -577,7 +630,7 @@ fn pin_program>(data: &ProgramData, path: P) -> Resul path: path.into(), error, })?; - bpf_pin_object(fd.as_fd(), &path_string).map_err(|(_, io_error)| SyscallError { + bpf_pin_object(fd.as_fd(), &path_string).map_err(|io_error| SyscallError { call: "BPF_OBJ_PIN", io_error, })?; @@ -611,12 +664,12 @@ fn load_program( } let obj = obj.as_ref().unwrap(); let ( - obj::Program { + aya_obj::Program { license, kernel_version, .. }, - obj::Function { + aya_obj::Function { instructions, func_info, line_info, @@ -626,16 +679,18 @@ fn load_program( }, ) = obj; - let target_kernel_version = - kernel_version.unwrap_or_else(|| KernelVersion::current().unwrap().code()); + let target_kernel_version = kernel_version.unwrap_or_else(|| { + KernelVersion::current() + .map(KernelVersion::code) + .unwrap_or(0) + }); - let prog_name = if let Some(name) = name { - let mut name = name.clone(); - if name.len() > 15 { - name.truncate(15); - } - let prog_name = CString::new(name.clone()) - .map_err(|_| ProgramError::InvalidName { name: name.clone() })?; + let prog_name = if let Some(name) = name.as_deref() { + let prog_name = CString::new(name).map_err(|err @ std::ffi::NulError { .. }| { + let name = err.into_vec(); + let name = unsafe { String::from_utf8_unchecked(name) }; + ProgramError::InvalidName { name } + })?; Some(prog_name) } else { None @@ -668,7 +723,7 @@ fn load_program( *fd = Some(ProgramFd(prog_fd)); Ok(()) } - Err((_, io_error)) => Err(ProgramError::LoadError { + Err(io_error) => Err(ProgramError::LoadError { io_error, verifier_log, }), @@ -676,30 +731,32 @@ fn load_program( } pub(crate) fn query( - target_fd: BorrowedFd<'_>, + target: ProgQueryTarget<'_>, attach_type: bpf_attach_type, query_flags: u32, attach_flags: &mut Option, -) -> Result, ProgramError> { +) -> Result<(u64, Vec), ProgramError> { let mut prog_ids = vec![0u32; 64]; let mut prog_cnt = prog_ids.len() as u32; + let mut revision = 0; let mut retries = 0; loop { match bpf_prog_query( - target_fd.as_fd().as_raw_fd(), + &target, attach_type, query_flags, attach_flags.as_mut(), &mut prog_ids, &mut prog_cnt, + &mut revision, ) { - Ok(_) => { + Ok(()) => { prog_ids.resize(prog_cnt as usize, 0); - return Ok(prog_ids); + return Ok((revision, prog_ids)); } - Err((_, io_error)) => { + Err(io_error) => { if retries == 0 && io_error.raw_os_error() == Some(ENOSPC) { prog_ids.resize(prog_cnt as usize, 0); retries += 1; @@ -731,7 +788,7 @@ macro_rules! impl_program_unload { impl Drop for $struct_name { fn drop(&mut self) { - let _ = self.unload(); + let _: Result<(), ProgramError> = self.unload(); } } )+ @@ -753,16 +810,19 @@ impl_program_unload!( LircMode2, PerfEvent, Lsm, + LsmCgroup, RawTracePoint, BtfTracePoint, FEntry, FExit, + FlowDissector, Extension, CgroupSockAddr, SkLookup, SockOps, CgroupSock, CgroupDevice, + Iter, ); macro_rules! impl_fd { @@ -793,18 +853,72 @@ impl_fd!( LircMode2, PerfEvent, Lsm, + LsmCgroup, RawTracePoint, BtfTracePoint, FEntry, FExit, + FlowDissector, Extension, CgroupSockAddr, SkLookup, SockOps, CgroupSock, CgroupDevice, + Iter, ); +/// Trait implemented by the [`Program`] types which support the kernel's +/// [generic multi-prog API](https://github.com/torvalds/linux/commit/053c8e1f235dc3f69d13375b32f4209228e1cb96). +/// +/// # Minimum kernel version +/// +/// The minimum kernel version required to use this feature is 6.6.0. +pub trait MultiProgram { + /// Borrows the file descriptor. + fn fd(&self) -> Result, ProgramError>; +} + +macro_rules! impl_multiprog_fd { + ($($struct_name:ident),+ $(,)?) => { + $( + impl MultiProgram for $struct_name { + fn fd(&self) -> Result, ProgramError> { + Ok(self.fd()?.as_fd()) + } + } + )+ + } +} + +impl_multiprog_fd!(SchedClassifier); + +/// Trait implemented by the [`Link`] types which support the kernel's +/// [generic multi-prog API](https://github.com/torvalds/linux/commit/053c8e1f235dc3f69d13375b32f4209228e1cb96). +/// +/// # Minimum kernel version +/// +/// The minimum kernel version required to use this feature is 6.6.0. +pub trait MultiProgLink { + /// Borrows the file descriptor. + fn fd(&self) -> Result, LinkError>; +} + +macro_rules! impl_multiproglink_fd { + ($($struct_name:ident),+ $(,)?) => { + $( + impl MultiProgLink for $struct_name { + fn fd(&self) -> Result, LinkError> { + let link: &FdLink = self.try_into()?; + Ok(link.fd.as_fd()) + } + } + )+ + } +} + +impl_multiproglink_fd!(SchedClassifierLink); + macro_rules! impl_program_pin{ ($($struct_name:ident),+ $(,)?) => { $( @@ -821,7 +935,7 @@ macro_rules! impl_program_pin{ } /// Removes the pinned link from the filesystem. - pub fn unpin(mut self) -> Result<(), io::Error> { + pub fn unpin(&mut self) -> Result<(), io::Error> { if let Some(path) = self.data.path.take() { std::fs::remove_file(path)?; } @@ -847,16 +961,19 @@ impl_program_pin!( LircMode2, PerfEvent, Lsm, + LsmCgroup, RawTracePoint, BtfTracePoint, FEntry, FExit, + FlowDissector, Extension, CgroupSockAddr, SkLookup, SockOps, CgroupSock, CgroupDevice, + Iter, ); macro_rules! impl_from_pin { @@ -885,16 +1002,126 @@ impl_from_pin!( SkMsg, CgroupSysctl, LircMode2, - PerfEvent, Lsm, + PerfEvent, RawTracePoint, BtfTracePoint, FEntry, FExit, + FlowDissector, Extension, SkLookup, SockOps, CgroupDevice, + Iter, +); + +macro_rules! impl_from_prog_info { + ( + $(#[$doc:meta])* + @safety + [$($safety:tt)?] + @rest + $struct_name:ident $($var:ident : $var_ty:ty)? + ) => { + impl $struct_name { + /// Constructs an instance of a [`Self`] from a [`ProgramInfo`]. + /// + /// This allows the caller to get a handle to an already loaded + /// program from the kernel without having to load it again. + /// + /// # Errors + /// + /// - If the program type reported by the kernel does not match + /// [`Self::PROGRAM_TYPE`]. + /// - If the file descriptor of the program cannot be cloned. + $(#[$doc])* + pub $($safety)? + fn from_program_info( + info: ProgramInfo, + name: Cow<'static, str>, + $($var: $var_ty,)? + ) -> Result { + if info.program_type() != Self::PROGRAM_TYPE.into() { + return Err(ProgramError::UnexpectedProgramType {}); + } + let ProgramInfo(bpf_progam_info) = info; + let fd = info.fd()?; + let fd = fd.as_fd().try_clone_to_owned()?; + + Ok(Self { + data: ProgramData::from_bpf_prog_info( + Some(name), + crate::MockableFd::from_fd(fd), + Path::new(""), + bpf_progam_info, + VerifierLogLevel::default(), + )?, + $($var,)? + }) + } + } + }; + + // Handle unsafe cases and pass a safety doc section + ( + unsafe $struct_name:ident $($var:ident : $var_ty:ty)? $(, $($rest:tt)*)? + ) => { + impl_from_prog_info! { + /// + /// # Safety + /// + /// The runtime type of this program, as used by the kernel, is + /// overloaded. We assert the program type matches the runtime type + /// but we're unable to perform further checks. Therefore, the caller + /// must ensure that the program type is correct or the behavior is + /// undefined. + @safety [unsafe] + @rest $struct_name $($var : $var_ty)? + } + $( impl_from_prog_info!($($rest)*); )? + }; + + // Handle non-unsafe cases and omit safety doc section + ( + $struct_name:ident $($var:ident : $var_ty:ty)? $(, $($rest:tt)*)? + ) => { + impl_from_prog_info! { + @safety [] + @rest $struct_name $($var : $var_ty)? + } + $( impl_from_prog_info!($($rest)*); )? + }; + + // Handle trailing comma + ( + $(,)? + ) => {}; +} + +impl_from_prog_info!( + unsafe KProbe kind : ProbeKind, + unsafe UProbe kind : ProbeKind, + TracePoint, + Xdp attach_type : XdpAttachType, + SkMsg, + SkSkb kind : SkSkbKind, + SockOps, + SchedClassifier, + CgroupSkb attach_type : Option, + CgroupSysctl, + CgroupSockopt attach_type : CgroupSockoptAttachType, + LircMode2, + PerfEvent, + Lsm, + RawTracePoint, + unsafe BtfTracePoint, + unsafe FEntry, + unsafe FExit, + Extension, + SkLookup, + CgroupDevice, + Iter, ); macro_rules! impl_try_from_program { @@ -941,37 +1168,20 @@ impl_try_from_program!( LircMode2, PerfEvent, Lsm, + LsmCgroup, RawTracePoint, BtfTracePoint, FEntry, FExit, + FlowDissector, Extension, CgroupSockAddr, SkLookup, CgroupSock, CgroupDevice, + Iter, ); -/// Returns information about a loaded program with the [`ProgramInfo`] structure. -/// -/// This information is populated at load time by the kernel and can be used -/// to correlate a given [`Program`] to it's corresponding [`ProgramInfo`] -/// metadata. -macro_rules! impl_info { - ($($struct_name:ident),+ $(,)?) => { - $( - impl $struct_name { - /// Returns the file descriptor of this Program. - pub fn info(&self) -> Result { - let ProgramFd(fd) = self.fd()?; - - ProgramInfo::new_from_fd(fd.as_fd()) - } - } - )+ - } -} - impl_info!( KProbe, UProbe, @@ -987,174 +1197,43 @@ impl_info!( LircMode2, PerfEvent, Lsm, + LsmCgroup, RawTracePoint, BtfTracePoint, FEntry, FExit, + FlowDissector, Extension, CgroupSockAddr, SkLookup, SockOps, CgroupSock, CgroupDevice, + Iter, ); -/// Provides information about a loaded program, like name, id and statistics -#[derive(Debug)] -pub struct ProgramInfo(bpf_prog_info); - -impl ProgramInfo { - fn new_from_fd(fd: BorrowedFd<'_>) -> Result { - let info = bpf_prog_get_info_by_fd(fd, &mut [])?; - Ok(Self(info)) - } - - /// The name of the program as was provided when it was load. This is limited to 16 bytes - pub fn name(&self) -> &[u8] { - bytes_of_bpf_name(&self.0.name) - } - - /// The name of the program as a &str. If the name was not valid unicode, None is returned. - pub fn name_as_str(&self) -> Option<&str> { - std::str::from_utf8(self.name()).ok() - } - - /// The id for this program. Each program has a unique id. - pub fn id(&self) -> u32 { - self.0.id - } - - /// The program tag. - /// - /// The program tag is a SHA sum of the program's instructions which be used as an alternative to - /// [`Self::id()`]". A program's id can vary every time it's loaded or unloaded, but the tag - /// will remain the same. - pub fn tag(&self) -> u64 { - u64::from_be_bytes(self.0.tag) - } - - /// The program type as defined by the linux kernel enum - /// [`bpf_prog_type`](https://elixir.bootlin.com/linux/v6.4.4/source/include/uapi/linux/bpf.h#L948). - pub fn program_type(&self) -> u32 { - self.0.type_ - } - - /// Returns true if the program is defined with a GPL-compatible license. - pub fn gpl_compatible(&self) -> bool { - self.0.gpl_compatible() != 0 - } - - /// The ids of the maps used by the program. - pub fn map_ids(&self) -> Result, ProgramError> { - let ProgramFd(fd) = self.fd()?; - let mut map_ids = vec![0u32; self.0.nr_map_ids as usize]; - - bpf_prog_get_info_by_fd(fd.as_fd(), &mut map_ids)?; - - Ok(map_ids) - } - - /// The btf id for the program. - pub fn btf_id(&self) -> Option { - NonZeroU32::new(self.0.btf_id) - } - - /// The size in bytes of the program's translated eBPF bytecode, which is - /// the bytecode after it has been passed though the verifier where it was - /// possibly modified by the kernel. - pub fn size_translated(&self) -> u32 { - self.0.xlated_prog_len - } - - /// The size in bytes of the program's JIT-compiled machine code. - pub fn size_jitted(&self) -> u32 { - self.0.jited_prog_len - } - - /// How much memory in bytes has been allocated and locked for the program. - pub fn memory_locked(&self) -> Result { - get_fdinfo(self.fd()?.as_fd(), "memlock") - } - - /// The number of verified instructions in the program. - /// - /// This may be less than the total number of instructions in the compiled - /// program due to dead code elimination in the verifier. - pub fn verified_instruction_count(&self) -> u32 { - self.0.verified_insns - } - - /// The time the program was loaded. - pub fn loaded_at(&self) -> SystemTime { - boot_time() + Duration::from_nanos(self.0.load_time) - } - - /// Returns a file descriptor referencing the program. - /// - /// The returned file descriptor can be closed at any time and doing so does - /// not influence the life cycle of the program. - pub fn fd(&self) -> Result { - let Self(info) = self; - let fd = bpf_prog_get_fd_by_id(info.id)?; - Ok(ProgramFd(fd)) - } - - /// Loads a program from a pinned path in bpffs. - pub fn from_pin>(path: P) -> Result { - use std::os::unix::ffi::OsStrExt as _; - - // TODO: avoid this unwrap by adding a new error variant. - let path_string = CString::new(path.as_ref().as_os_str().as_bytes()).unwrap(); - let fd = bpf_get_object(&path_string).map_err(|(_, io_error)| SyscallError { - call: "BPF_OBJ_GET", - io_error, - })?; - - let info = bpf_prog_get_info_by_fd(fd.as_fd(), &mut [])?; - Ok(Self(info)) - } -} - -/// Returns an iterator over all loaded bpf programs. +/// Returns an iterator over all loaded links. +/// +/// This function is useful for debugging and inspecting the state of +/// loaded links in the kernel. It can be used to check which links are +/// currently active and to gather information about them. +/// +/// # Errors /// -/// This differs from [`crate::Ebpf::programs`] since it will return all programs -/// listed on the host system and not only programs a specific [`crate::Ebpf`] instance. +/// The returned iterator may yield an error if link information cannot be +/// retrieved from the kernel. /// /// # Example -/// ``` -/// # use aya::programs::loaded_programs; /// -/// for p in loaded_programs() { -/// match p { -/// Ok(program) => println!("{}", String::from_utf8_lossy(program.name())), -/// Err(e) => println!("Error iterating programs: {:?}", e), -/// } +/// ```no_run +/// use aya::programs::loaded_links; +/// +/// for info in loaded_links() { +/// let info = info.unwrap(); +/// println!("loaded link: {}", info.id()); /// } /// ``` -/// -/// # Errors -/// -/// Returns [`ProgramError::SyscallError`] if any of the syscalls required to either get -/// next program id, get the program fd, or the [`ProgramInfo`] fail. In cases where -/// iteration can't be performed, for example the caller does not have the necessary privileges, -/// a single item will be yielded containing the error that occurred. -pub fn loaded_programs() -> impl Iterator> { - iter_prog_ids() - .map(|id| { - let id = id?; - bpf_prog_get_fd_by_id(id) - }) - .map(|fd| { - let fd = fd?; - bpf_prog_get_info_by_fd(fd.as_fd(), &mut []) - }) - .map(|result| result.map(ProgramInfo).map_err(Into::into)) -} - -// TODO(https://github.com/aya-rs/aya/issues/645): this API is currently used in tests. Stabilize -// and remove doc(hidden). -#[doc(hidden)] -pub fn loaded_links() -> impl Iterator> { +pub fn loaded_links() -> impl Iterator> { iter_link_ids() .map(|id| { let id = id?; @@ -1162,7 +1241,6 @@ pub fn loaded_links() -> impl Iterator Self::Id { match self { - Self::FdLink(link) => PerfLinkIdInner::FdLinkId(link.id()), + Self::Fd(link) => PerfLinkIdInner::FdLinkId(link.id()), Self::PerfLink(link) => PerfLinkIdInner::PerfLinkId(link.id()), } } fn detach(self) -> Result<(), ProgramError> { match self { - Self::FdLink(link) => link.detach(), + Self::Fd(link) => link.detach(), Self::PerfLink(link) => link.detach(), } } } +id_as_key!(PerfLinkInner, PerfLinkIdInner); + /// The identifer of a PerfLink. #[derive(Debug, Hash, Eq, PartialEq)] pub struct PerfLinkId(RawFd); @@ -48,7 +57,7 @@ pub struct PerfLinkId(RawFd); /// The attachment type of PerfEvent programs. #[derive(Debug)] pub struct PerfLink { - perf_fd: OwnedFd, + perf_fd: crate::MockableFd, event: Option, } @@ -61,7 +70,7 @@ impl Link for PerfLink { fn detach(self) -> Result<(), ProgramError> { let Self { perf_fd, event } = self; - let _: SysResult<_> = perf_event_ioctl(perf_fd.as_fd(), PERF_EVENT_IOC_DISABLE, 0); + let _: io::Result<()> = perf_event_ioctl(perf_fd.as_fd(), PerfEventIoctlRequest::Disable); if let Some(event) = event { let _: Result<_, _> = detach_debug_fs(event); } @@ -70,17 +79,29 @@ impl Link for PerfLink { } } +id_as_key!(PerfLink, PerfLinkId); + pub(crate) fn perf_attach( prog_fd: BorrowedFd<'_>, - fd: OwnedFd, + fd: crate::MockableFd, + cookie: Option, ) -> Result { + if cookie.is_some() && (!is_bpf_cookie_supported() || !FEATURES.bpf_perf_link()) { + return Err(ProgramError::AttachCookieNotSupported); + } if FEATURES.bpf_perf_link() { - let link_fd = bpf_link_create(prog_fd, LinkTarget::Fd(fd.as_fd()), BPF_PERF_EVENT, None, 0) - .map_err(|(_, io_error)| SyscallError { - call: "bpf_link_create", - io_error, - })?; - Ok(PerfLinkInner::FdLink(FdLink::new(link_fd))) + let link_fd = bpf_link_create( + prog_fd, + LinkTarget::Fd(fd.as_fd()), + BPF_PERF_EVENT, + 0, + cookie.map(|bpf_cookie| BpfLinkCreateArgs::PerfEvent { bpf_cookie }), + ) + .map_err(|io_error| SyscallError { + call: "bpf_link_create", + io_error, + })?; + Ok(PerfLinkInner::Fd(FdLink::new(link_fd))) } else { perf_attach_either(prog_fd, fd, None) } @@ -88,7 +109,7 @@ pub(crate) fn perf_attach( pub(crate) fn perf_attach_debugfs( prog_fd: BorrowedFd<'_>, - fd: OwnedFd, + fd: crate::MockableFd, event: ProbeEvent, ) -> Result { perf_attach_either(prog_fd, fd, Some(event)) @@ -96,16 +117,16 @@ pub(crate) fn perf_attach_debugfs( fn perf_attach_either( prog_fd: BorrowedFd<'_>, - fd: OwnedFd, + fd: crate::MockableFd, event: Option, ) -> Result { - perf_event_ioctl(fd.as_fd(), PERF_EVENT_IOC_SET_BPF, prog_fd.as_raw_fd()).map_err( - |(_, io_error)| SyscallError { + perf_event_ioctl(fd.as_fd(), PerfEventIoctlRequest::SetBpf(prog_fd)).map_err(|io_error| { + SyscallError { call: "PERF_EVENT_IOC_SET_BPF", io_error, - }, - )?; - perf_event_ioctl(fd.as_fd(), PERF_EVENT_IOC_ENABLE, 0).map_err(|(_, io_error)| { + } + })?; + perf_event_ioctl(fd.as_fd(), PerfEventIoctlRequest::Enable).map_err(|io_error| { SyscallError { call: "PERF_EVENT_IOC_ENABLE", io_error, diff --git a/aya/src/programs/perf_event.rs b/aya/src/programs/perf_event.rs index 00ac4b38..0b52bd04 100644 --- a/aya/src/programs/perf_event.rs +++ b/aya/src/programs/perf_event.rs @@ -2,47 +2,282 @@ use std::os::fd::AsFd as _; -pub use crate::generated::{ - perf_hw_cache_id, perf_hw_cache_op_id, perf_hw_cache_op_result_id, perf_hw_id, perf_sw_ids, +use aya_obj::generated::{ + bpf_link_type, bpf_prog_type::BPF_PROG_TYPE_PERF_EVENT, perf_hw_cache_id, perf_hw_cache_op_id, + perf_hw_cache_op_result_id, perf_hw_id, perf_sw_ids, perf_type_id, }; + use crate::{ - generated::{ - bpf_link_type, - bpf_prog_type::BPF_PROG_TYPE_PERF_EVENT, - perf_type_id::{ - PERF_TYPE_BREAKPOINT, PERF_TYPE_HARDWARE, PERF_TYPE_HW_CACHE, PERF_TYPE_RAW, - PERF_TYPE_SOFTWARE, PERF_TYPE_TRACEPOINT, - }, - }, programs::{ + FdLink, LinkError, ProgramData, ProgramError, ProgramType, impl_try_into_fdlink, links::define_link_wrapper, load_program, perf_attach, perf_attach::{PerfLinkIdInner, PerfLinkInner}, - FdLink, LinkError, ProgramData, ProgramError, }, - sys::{bpf_link_get_info_by_fd, perf_event_open, SyscallError}, + sys::{SyscallError, bpf_link_get_info_by_fd, perf_event_open}, }; -/// The type of perf event +/// The type of perf event and their respective configuration. +#[doc(alias = "perf_type_id")] +#[derive(Debug, Clone, Copy)] +pub enum PerfEventConfig { + /// The hardware event to report. + #[doc(alias = "PERF_TYPE_HARDWARE")] + Hardware(HardwareEvent), + /// The software event to report. + #[doc(alias = "PERF_TYPE_SOFTWARE")] + Software(SoftwareEvent), + /// The kernel trace point event to report. + #[doc(alias = "PERF_TYPE_TRACEPOINT")] + TracePoint { + /// The ID of the tracing event. This can be obtained from + /// `/sys/kernel/debug/tracing/events/*/*/id` if `ftrace` is enabled in the kernel. + event_id: u64, + }, + /// The hardware cache event to report. + #[doc(alias = "PERF_TYPE_HW_CACHE")] + HwCache { + /// The hardware cache event. + event: HwCacheEvent, + /// The hardware cache operation. + operation: HwCacheOp, + /// The hardware cache result of interest. + result: HwCacheResult, + }, + /// The "raw" implementation-specific event to report. + #[doc(alias = "PERF_TYPE_RAW")] + Raw { + /// The "raw" event value, which is not covered by the "generalized" events. This is CPU + /// implementation defined events. + event_id: u64, + }, + /// A hardware breakpoint. + /// + /// Note: this variant is not fully implemented at the moment. + // TODO: Variant not fully implemented due to additional `perf_event_attr` fields like + // `bp_type`, `bp_addr`, etc. + #[doc(alias = "PERF_TYPE_BREAKPOINT")] + Breakpoint, + /// The dynamic PMU (Performance Monitor Unit) event to report. + /// + /// Available PMU's may be found under `/sys/bus/event_source/devices`. + Pmu { + /// The PMU type. + /// + /// This value can extracted from `/sys/bus/event_source/devices/*/type`. + pmu_type: u32, + /// The PMU config option. + /// + /// This value can extracted from `/sys/bus/event_source/devices/*/format/`, where the + /// `config:` indicates the bit position to set. + /// + /// For example, `config:3` => `config = 1 << 3`. + config: u64, + }, +} + +macro_rules! impl_to_u32 { + ($($t:ty, $fn:ident),*) => { + $(pub(crate) const fn $fn(id: $t) -> u32 { + const _: [(); 4] = [(); std::mem::size_of::<$t>()]; + id as u32 + })* + }; +} + +impl_to_u32!( + perf_hw_id, + perf_hw_id_to_u32, + perf_sw_ids, + perf_sw_ids_to_u32, + perf_hw_cache_id, + perf_hw_cache_id_to_u32, + perf_hw_cache_op_id, + perf_hw_cache_op_id_to_u32, + perf_hw_cache_op_result_id, + perf_hw_cache_op_result_id_to_u32, + perf_type_id, + perf_type_id_to_u32 +); + +/// The "generalized" hardware CPU events provided by the kernel. +#[doc(alias = "perf_hw_id")] +#[derive(Debug, Clone, Copy)] +#[repr(u32)] +pub enum HardwareEvent { + /// The total CPU cycles. + #[doc(alias = "PERF_COUNT_HW_CPU_CYCLES")] + CpuCycles = perf_hw_id_to_u32(perf_hw_id::PERF_COUNT_HW_CPU_CYCLES), + /// Number of retired instructions. + #[doc(alias = "PERF_COUNT_HW_INSTRUCTIONS")] + Instructions = perf_hw_id_to_u32(perf_hw_id::PERF_COUNT_HW_INSTRUCTIONS), + /// Number of cache accesses. + #[doc(alias = "PERF_COUNT_HW_CACHE_REFERENCES")] + CacheReferences = perf_hw_id_to_u32(perf_hw_id::PERF_COUNT_HW_CACHE_REFERENCES), + /// Number of cache misses. + #[doc(alias = "PERF_COUNT_HW_CACHE_MISSES")] + CacheMisses = perf_hw_id_to_u32(perf_hw_id::PERF_COUNT_HW_CACHE_MISSES), + /// Number of retired branch instructions. + #[doc(alias = "PERF_COUNT_HW_BRANCH_INSTRUCTIONS")] + BranchInstructions = perf_hw_id_to_u32(perf_hw_id::PERF_COUNT_HW_BRANCH_INSTRUCTIONS), + /// Number of mispredicted branch instructions. + #[doc(alias = "PERF_COUNT_HW_BRANCH_MISSES")] + BranchMisses = perf_hw_id_to_u32(perf_hw_id::PERF_COUNT_HW_BRANCH_MISSES), + /// Number of bus cycles. + #[doc(alias = "PERF_COUNT_HW_BUS_CYCLES")] + BusCycles = perf_hw_id_to_u32(perf_hw_id::PERF_COUNT_HW_BUS_CYCLES), + /// Number of stalled cycles during issue. + #[doc(alias = "PERF_COUNT_HW_STALLED_CYCLES_FRONTEND")] + StalledCyclesFrontend = perf_hw_id_to_u32(perf_hw_id::PERF_COUNT_HW_STALLED_CYCLES_FRONTEND), + /// Number of stalled cycles during retirement. + #[doc(alias = "PERF_COUNT_HW_STALLED_CYCLES_BACKEND")] + StalledCyclesBackend = perf_hw_id_to_u32(perf_hw_id::PERF_COUNT_HW_STALLED_CYCLES_BACKEND), + /// The total CPU cycles, which is not affected by CPU frequency scaling. + #[doc(alias = "PERF_COUNT_HW_REF_CPU_CYCLES")] + RefCpuCycles = perf_hw_id_to_u32(perf_hw_id::PERF_COUNT_HW_REF_CPU_CYCLES), +} + +impl HardwareEvent { + pub(crate) const fn into_primitive(self) -> u32 { + const _: [(); 4] = [(); std::mem::size_of::()]; + self as u32 + } +} + +/// The software-defined events provided by the kernel. +#[doc(alias = "perf_sw_ids")] +#[derive(Debug, Clone, Copy)] +#[repr(u32)] +pub enum SoftwareEvent { + /// The CPU clock timer. + #[doc(alias = "PERF_COUNT_SW_CPU_CLOCK")] + CpuClock = perf_sw_ids_to_u32(perf_sw_ids::PERF_COUNT_SW_CPU_CLOCK), + /// The clock count specific to the task that is running. + #[doc(alias = "PERF_COUNT_SW_TASK_CLOCK")] + TaskClock = perf_sw_ids_to_u32(perf_sw_ids::PERF_COUNT_SW_TASK_CLOCK), + /// Number of page faults. + #[doc(alias = "PERF_COUNT_SW_PAGE_FAULTS")] + PageFaults = perf_sw_ids_to_u32(perf_sw_ids::PERF_COUNT_SW_PAGE_FAULTS), + /// Numer of context switches. + #[doc(alias = "PERF_COUNT_SW_CONTEXT_SWITCHES")] + ContextSwitches = perf_sw_ids_to_u32(perf_sw_ids::PERF_COUNT_SW_CONTEXT_SWITCHES), + /// Number of times the process has migrated to a new CPU. + #[doc(alias = "PERF_COUNT_SW_CPU_MIGRATIONS")] + CpuMigrations = perf_sw_ids_to_u32(perf_sw_ids::PERF_COUNT_SW_CPU_MIGRATIONS), + /// Number of minor page faults. + #[doc(alias = "PERF_COUNT_SW_PAGE_FAULTS_MIN")] + PageFaultsMin = perf_sw_ids_to_u32(perf_sw_ids::PERF_COUNT_SW_PAGE_FAULTS_MIN), + /// Number of major page faults. + #[doc(alias = "PERF_COUNT_SW_PAGE_FAULTS_MAJ")] + PageFaultsMaj = perf_sw_ids_to_u32(perf_sw_ids::PERF_COUNT_SW_PAGE_FAULTS_MAJ), + /// Number of alignment faults. + #[doc(alias = "PERF_COUNT_SW_ALIGNMENT_FAULTS")] + AlignmentFaults = perf_sw_ids_to_u32(perf_sw_ids::PERF_COUNT_SW_ALIGNMENT_FAULTS), + /// Number of emulation faults. + #[doc(alias = "PERF_COUNT_SW_EMULATION_FAULTS")] + EmulationFaults = perf_sw_ids_to_u32(perf_sw_ids::PERF_COUNT_SW_EMULATION_FAULTS), + /// Placeholder event that counts nothing. + #[doc(alias = "PERF_COUNT_SW_DUMMY")] + Dummy = perf_sw_ids_to_u32(perf_sw_ids::PERF_COUNT_SW_DUMMY), + /// Generates raw sample data from BPF. + #[doc(alias = "PERF_COUNT_SW_BPF_OUTPUT")] + BpfOutput = perf_sw_ids_to_u32(perf_sw_ids::PERF_COUNT_SW_BPF_OUTPUT), + /// Number of context switches to a task when switching to a different cgroup. + #[doc(alias = "PERF_COUNT_SW_CGROUP_SWITCHES")] + CgroupSwitches = perf_sw_ids_to_u32(perf_sw_ids::PERF_COUNT_SW_CGROUP_SWITCHES), +} + +impl SoftwareEvent { + pub(crate) const fn into_primitive(self) -> u32 { + const _: [(); 4] = [(); std::mem::size_of::()]; + self as u32 + } +} + +/// The hardware CPU cache events. +#[doc(alias = "perf_hw_cache_id")] +#[derive(Debug, Clone, Copy)] +#[repr(u32)] +pub enum HwCacheEvent { + /// Measures Level 1 data cache. + #[doc(alias = "PERF_COUNT_HW_CACHE_L1D")] + L1d = perf_hw_cache_id_to_u32(perf_hw_cache_id::PERF_COUNT_HW_CACHE_L1D), + /// Measures Level 1 data cache. + #[doc(alias = "PERF_COUNT_HW_CACHE_L1I")] + L1i = perf_hw_cache_id_to_u32(perf_hw_cache_id::PERF_COUNT_HW_CACHE_L1I), + /// Measures Last-level cache. + #[doc(alias = "PERF_COUNT_HW_CACHE_LL")] + Ll = perf_hw_cache_id_to_u32(perf_hw_cache_id::PERF_COUNT_HW_CACHE_LL), + /// Measures Data TLB (Translation Lookaside Buffer). + #[doc(alias = "PERF_COUNT_HW_CACHE_DTLB")] + Dtlb = perf_hw_cache_id_to_u32(perf_hw_cache_id::PERF_COUNT_HW_CACHE_DTLB), + /// Measures Instruction TLB (Translation Lookaside Buffer). + #[doc(alias = "PERF_COUNT_HW_CACHE_ITLB")] + Itlb = perf_hw_cache_id_to_u32(perf_hw_cache_id::PERF_COUNT_HW_CACHE_ITLB), + /// Measures branch prediction. + #[doc(alias = "PERF_COUNT_HW_CACHE_BPU")] + Bpu = perf_hw_cache_id_to_u32(perf_hw_cache_id::PERF_COUNT_HW_CACHE_BPU), + /// Measures local memory accesses. + #[doc(alias = "PERF_COUNT_HW_CACHE_NODE")] + Node = perf_hw_cache_id_to_u32(perf_hw_cache_id::PERF_COUNT_HW_CACHE_NODE), +} + +impl HwCacheEvent { + pub(crate) const fn into_primitive(self) -> u32 { + const _: [(); 4] = [(); std::mem::size_of::()]; + self as u32 + } +} + +/// The hardware CPU cache operations. +#[doc(alias = "perf_hw_cache_op_id")] +#[derive(Debug, Clone, Copy)] #[repr(u32)] -#[derive(Debug, Clone)] -pub enum PerfTypeId { - /// PERF_TYPE_HARDWARE - Hardware = PERF_TYPE_HARDWARE as u32, - /// PERF_TYPE_SOFTWARE - Software = PERF_TYPE_SOFTWARE as u32, - /// PERF_TYPE_TRACEPOINT - TracePoint = PERF_TYPE_TRACEPOINT as u32, - /// PERF_TYPE_HW_CACHE - HwCache = PERF_TYPE_HW_CACHE as u32, - /// PERF_TYPE_RAW - Raw = PERF_TYPE_RAW as u32, - /// PERF_TYPE_BREAKPOINT - Breakpoint = PERF_TYPE_BREAKPOINT as u32, +pub enum HwCacheOp { + /// Read access. + #[doc(alias = "PERF_COUNT_HW_CACHE_OP_READ")] + Read = perf_hw_cache_op_id_to_u32(perf_hw_cache_op_id::PERF_COUNT_HW_CACHE_OP_READ), + /// Write access. + #[doc(alias = "PERF_COUNT_HW_CACHE_OP_WRITE")] + Write = perf_hw_cache_op_id_to_u32(perf_hw_cache_op_id::PERF_COUNT_HW_CACHE_OP_WRITE), + /// Prefetch access. + #[doc(alias = "PERF_COUNT_HW_CACHE_OP_PREFETCH")] + Prefetch = perf_hw_cache_op_id_to_u32(perf_hw_cache_op_id::PERF_COUNT_HW_CACHE_OP_PREFETCH), +} + +impl HwCacheOp { + pub(crate) const fn into_primitive(self) -> u32 { + const _: [(); 4] = [(); std::mem::size_of::()]; + self as u32 + } +} + +/// The hardware CPU cache result. +#[doc(alias = "perf_hw_cache_op_result_id")] +#[derive(Debug, Clone, Copy)] +#[repr(u32)] +pub enum HwCacheResult { + /// Cache accesses. + #[doc(alias = "PERF_COUNT_HW_CACHE_RESULT_ACCESS")] + Access = perf_hw_cache_op_result_id_to_u32( + perf_hw_cache_op_result_id::PERF_COUNT_HW_CACHE_RESULT_ACCESS, + ), + /// Cache missed accesses. + #[doc(alias = "PERF_COUNT_HW_CACHE_RESULT_MISS")] + Miss = perf_hw_cache_op_result_id_to_u32( + perf_hw_cache_op_result_id::PERF_COUNT_HW_CACHE_RESULT_MISS, + ), +} + +impl HwCacheResult { + pub(crate) const fn into_primitive(self) -> u32 { + const _: [(); 4] = [(); std::mem::size_of::()]; + self as u32 + } } /// Sample Policy -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Copy)] pub enum SamplePolicy { /// Period Period(u64), @@ -50,28 +285,30 @@ pub enum SamplePolicy { Frequency(u64), } +/// Wakeup Policy +#[derive(Debug, Clone, Copy)] +pub(crate) enum WakeupPolicy { + /// Every N events + Events(u32), + /// Every N bytes + #[expect(dead_code)] + Watermark(u32), +} + /// The scope of a PerfEvent -#[derive(Debug, Clone)] -#[allow(clippy::enum_variant_names)] +#[derive(Debug, Clone, Copy)] pub enum PerfEventScope { - /// Calling process, any cpu - CallingProcessAnyCpu, - /// calling process, one cpu - CallingProcessOneCpu { - /// cpu id - cpu: u32, + /// calling process + CallingProcess { + /// cpu id or any cpu if None + cpu: Option, }, - /// one process, any cpu - OneProcessAnyCpu { - /// process id - pid: u32, - }, - /// one process, one cpu - OneProcessOneCpu { - /// cpu id - cpu: u32, + /// one process + OneProcess { /// process id - pid: u32, + pid: i32, + /// cpu id or any cpu if None + cpu: Option, }, /// all processes, one cpu AllProcessesOneCpu { @@ -100,19 +337,21 @@ pub enum PerfEventScope { /// # #[error(transparent)] /// # Ebpf(#[from] aya::EbpfError) /// # } -/// # let mut bpf = aya::Ebpf::load(&[])?; -/// use aya::util::online_cpus; -/// use aya::programs::perf_event::{ -/// perf_sw_ids::PERF_COUNT_SW_CPU_CLOCK, PerfEvent, PerfEventScope, PerfTypeId, SamplePolicy, +/// use aya::{ +/// util::online_cpus, +/// programs::perf_event::{ +/// PerfEvent, PerfEventConfig, PerfEventScope, SamplePolicy, SoftwareEvent, +/// }, /// }; /// +/// # let mut bpf = aya::Ebpf::load(&[])?; /// let prog: &mut PerfEvent = bpf.program_mut("observe_cpu_clock").unwrap().try_into()?; /// prog.load()?; /// -/// for cpu in online_cpus()? { +/// let perf_type = PerfEventConfig::Software(SoftwareEvent::CpuClock); +/// for cpu in online_cpus().map_err(|(_, error)| error)? { /// prog.attach( -/// PerfTypeId::Software, -/// PERF_COUNT_SW_CPU_CLOCK as u64, +/// perf_type, /// PerfEventScope::AllProcessesOneCpu { cpu }, /// SamplePolicy::Period(1000000), /// true, @@ -127,6 +366,9 @@ pub struct PerfEvent { } impl PerfEvent { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::PerfEvent; + /// Loads the program inside the kernel. pub fn load(&mut self) -> Result<(), ProgramError> { load_program(BPF_PROG_TYPE_PERF_EVENT, &mut self.data) @@ -134,83 +376,42 @@ impl PerfEvent { /// Attaches to the given perf event. /// - /// The possible values and encoding of the `config` argument depends on the - /// `perf_type`. See `perf_sw_ids`, `perf_hw_id`, `perf_hw_cache_id`, - /// `perf_hw_cache_op_id` and `perf_hw_cache_op_result_id`. + /// [`perf_type`](PerfEventConfig) defines the event `type` and `config` of interest. /// - /// The `scope` argument determines which processes are sampled. If `inherit` - /// is true, any new processes spawned by those processes will also - /// automatically get sampled. + /// [`scope`](PerfEventScope) determines which processes are sampled. If `inherit` is + /// `true`, any new processes spawned by those processes will also automatically be + /// sampled. /// /// The returned value can be used to detach, see [PerfEvent::detach]. pub fn attach( &mut self, - perf_type: PerfTypeId, - config: u64, + config: PerfEventConfig, scope: PerfEventScope, sample_policy: SamplePolicy, inherit: bool, ) -> Result { let prog_fd = self.fd()?; let prog_fd = prog_fd.as_fd(); - let (sample_period, sample_frequency) = match sample_policy { - SamplePolicy::Period(period) => (period, None), - SamplePolicy::Frequency(frequency) => (0, Some(frequency)), - }; - let (pid, cpu) = match scope { - PerfEventScope::CallingProcessAnyCpu => (0, -1), - PerfEventScope::CallingProcessOneCpu { cpu } => (0, cpu as i32), - PerfEventScope::OneProcessAnyCpu { pid } => (pid as i32, -1), - PerfEventScope::OneProcessOneCpu { cpu, pid } => (pid as i32, cpu as i32), - PerfEventScope::AllProcessesOneCpu { cpu } => (-1, cpu as i32), - }; + let fd = perf_event_open( - perf_type as u32, config, - pid, - cpu, - sample_period, - sample_frequency, - false, + scope, + sample_policy, + WakeupPolicy::Events(1), inherit, 0, ) - .map_err(|(_code, io_error)| SyscallError { + .map_err(|io_error| SyscallError { call: "perf_event_open", io_error, })?; - let link = perf_attach(prog_fd, fd)?; + let link = perf_attach(prog_fd, fd, None /* cookie */)?; self.data.links.insert(PerfEventLink::new(link)) } - - /// Detaches the program. - /// - /// See [PerfEvent::attach]. - pub fn detach(&mut self, link_id: PerfEventLinkId) -> Result<(), ProgramError> { - self.data.links.remove(link_id) - } - - /// Takes ownership of the link referenced by the provided link_id. - /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. - pub fn take_link(&mut self, link_id: PerfEventLinkId) -> Result { - self.data.take_link(link_id) - } } -impl TryFrom for FdLink { - type Error = LinkError; - - fn try_from(value: PerfEventLink) -> Result { - if let PerfLinkInner::FdLink(fd) = value.into_inner() { - Ok(fd) - } else { - Err(LinkError::InvalidLink) - } - } -} +impl_try_into_fdlink!(PerfEventLink, PerfLinkInner); impl TryFrom for PerfEventLink { type Error = LinkError; @@ -218,17 +419,16 @@ impl TryFrom for PerfEventLink { fn try_from(fd_link: FdLink) -> Result { let info = bpf_link_get_info_by_fd(fd_link.fd.as_fd())?; if info.type_ == (bpf_link_type::BPF_LINK_TYPE_PERF_EVENT as u32) { - return Ok(Self::new(PerfLinkInner::FdLink(fd_link))); + return Ok(Self::new(PerfLinkInner::Fd(fd_link))); } Err(LinkError::InvalidLink) } } define_link_wrapper!( - /// The link used by [PerfEvent] programs. PerfEventLink, - /// The type returned by [PerfEvent::attach]. Can be passed to [PerfEvent::detach]. PerfEventLinkId, PerfLinkInner, - PerfLinkIdInner + PerfLinkIdInner, + PerfEvent, ); diff --git a/aya/src/programs/probe.rs b/aya/src/programs/probe.rs index 85be3b3c..9f6eea90 100644 --- a/aya/src/programs/probe.rs +++ b/aya/src/programs/probe.rs @@ -2,8 +2,8 @@ use std::{ ffi::{OsStr, OsString}, fmt::Write as _, fs::{self, OpenOptions}, - io::{self, Write}, - os::fd::{AsFd as _, OwnedFd}, + io::{self, Write as _}, + os::fd::AsFd as _, path::{Path, PathBuf}, process, sync::atomic::{AtomicUsize, Ordering}, @@ -13,11 +13,11 @@ use libc::pid_t; use crate::{ programs::{ - kprobe::KProbeError, perf_attach, perf_attach::PerfLinkInner, perf_attach_debugfs, - trace_point::read_sys_fs_trace_point_id, uprobe::UProbeError, utils::find_tracefs_path, - Link, ProgramData, ProgramError, + Link, ProgramData, ProgramError, kprobe::KProbeError, perf_attach, + perf_attach::PerfLinkInner, perf_attach_debugfs, trace_point::read_sys_fs_trace_point_id, + uprobe::UProbeError, utils::find_tracefs_path, }, - sys::{perf_event_open_probe, perf_event_open_trace_point, SyscallError}, + sys::{SyscallError, perf_event_open_probe, perf_event_open_trace_point}, util::KernelVersion, }; @@ -62,7 +62,7 @@ pub(crate) fn lines(bytes: &[u8]) -> impl Iterator { pub(crate) trait OsStringExt { fn starts_with(&self, needle: &OsStr) -> bool; - #[allow(dead_code)] // Would be odd to have the others without this one. + #[expect(dead_code)] // Would be odd to have the others without this one. fn ends_with(&self, needle: &OsStr) -> bool; fn strip_prefix(&self, prefix: &OsStr) -> Option<&OsStr>; fn strip_suffix(&self, suffix: &OsStr) -> Option<&OsStr>; @@ -112,17 +112,21 @@ pub(crate) fn attach>( fn_name: &OsStr, offset: u64, pid: Option, + cookie: Option, ) -> Result { // https://github.com/torvalds/linux/commit/e12f03d7031a977356e3d7b75a68c2185ff8d155 // Use debugfs to create probe let prog_fd = program_data.fd()?; let prog_fd = prog_fd.as_fd(); - let link = if KernelVersion::current().unwrap() < KernelVersion::new(4, 17, 0) { + let link = if !KernelVersion::at_least(4, 17, 0) { + if cookie.is_some() { + return Err(ProgramError::AttachCookieNotSupported); + } let (fd, event_alias) = create_as_trace_point(kind, fn_name, offset, pid)?; perf_attach_debugfs(prog_fd, fd, ProbeEvent { kind, event_alias }) } else { let fd = create_as_probe(kind, fn_name, offset, pid)?; - perf_attach(prog_fd, fd) + perf_attach(prog_fd, fd, cookie) }?; program_data.links.insert(T::from(link)) } @@ -150,7 +154,7 @@ fn create_as_probe( fn_name: &OsStr, offset: u64, pid: Option, -) -> Result { +) -> Result { use ProbeKind::*; let perf_ty = match kind { @@ -172,13 +176,12 @@ fn create_as_probe( _ => None, }; - perf_event_open_probe(perf_ty, ret_bit, fn_name, offset, pid).map_err(|(_code, io_error)| { - SyscallError { + perf_event_open_probe(perf_ty, ret_bit, fn_name, offset, pid) + .map_err(|io_error| SyscallError { call: "perf_event_open", io_error, - } - .into() - }) + }) + .map_err(Into::into) } fn create_as_trace_point( @@ -186,7 +189,7 @@ fn create_as_trace_point( name: &OsStr, offset: u64, pid: Option, -) -> Result<(OwnedFd, OsString), ProgramError> { +) -> Result<(crate::MockableFd, OsString), ProgramError> { use ProbeKind::*; let tracefs = find_tracefs_path()?; @@ -200,7 +203,7 @@ fn create_as_trace_point( let category = format!("{}s", kind.pmu()); let tpid = read_sys_fs_trace_point_id(tracefs, &category, event_alias.as_ref())?; - let fd = perf_event_open_trace_point(tpid, pid).map_err(|(_code, io_error)| SyscallError { + let fd = perf_event_open_trace_point(tpid, pid).map_err(|io_error| SyscallError { call: "perf_event_open", io_error, })?; @@ -248,7 +251,7 @@ fn create_probe_event( .unwrap(); let mut probe = OsString::new(); - write!(&mut probe, "{}:{}s/", probe_type_prefix, kind.pmu(),).unwrap(); + write!(&mut probe, "{}:{}s/", probe_type_prefix, kind.pmu()).unwrap(); probe.push(&event_alias); probe.push(" "); probe.push(fn_name); @@ -321,12 +324,7 @@ fn read_sys_fs_perf_type(pmu: &str) -> Result { .join("type"); fs::read_to_string(&file) - .and_then(|perf_ty| { - perf_ty - .trim() - .parse::() - .map_err(|e| io::Error::new(io::ErrorKind::Other, e)) - }) + .and_then(|perf_ty| perf_ty.trim().parse::().map_err(io::Error::other)) .map_err(|e| (file, e)) } @@ -340,11 +338,9 @@ fn read_sys_fs_perf_ret_probe(pmu: &str) -> Result { let mut parts = data.trim().splitn(2, ':').skip(1); let config = parts .next() - .ok_or_else(|| io::Error::new(io::ErrorKind::Other, "invalid format"))?; + .ok_or_else(|| io::Error::other("invalid format"))?; - config - .parse::() - .map_err(|e| io::Error::new(io::ErrorKind::Other, e)) + config.parse::().map_err(io::Error::other) }) .map_err(|e| (file, e)) } diff --git a/aya/src/programs/raw_trace_point.rs b/aya/src/programs/raw_trace_point.rs index 214bee71..bd2e3946 100644 --- a/aya/src/programs/raw_trace_point.rs +++ b/aya/src/programs/raw_trace_point.rs @@ -1,17 +1,17 @@ //! Raw tracepoints. use std::ffi::CString; -use crate::{ - generated::bpf_prog_type::BPF_PROG_TYPE_RAW_TRACEPOINT, - programs::{ - define_link_wrapper, load_program, utils::attach_raw_tracepoint, FdLink, FdLinkId, - ProgramData, ProgramError, - }, +use aya_obj::generated::bpf_prog_type::BPF_PROG_TYPE_RAW_TRACEPOINT; + +use crate::programs::{ + FdLink, FdLinkId, ProgramData, ProgramError, ProgramType, define_link_wrapper, load_program, + utils::attach_raw_tracepoint, }; -/// A program that can be attached at a pre-defined kernel trace point, but also -/// has an access to kernel internal arguments of trace points, which -/// differentiates them from traditional tracepoint eBPF programs. +/// A program that can be attached at a pre-defined kernel trace point. +/// +/// Unlike [`TracePoint`](super::TracePoint), the kernel does not pre-process +/// the arguments before calling the program. /// /// The kernel provides a set of pre-defined trace points that eBPF programs can /// be attached to. See`/sys/kernel/debug/tracing/events` for a list of which @@ -24,8 +24,8 @@ use crate::{ /// # Examples /// /// ```no_run -/// # let mut bpf = Ebpf::load_file("ebpf_programs.o")?; -/// use aya::{Ebpf, programs::RawTracePoint}; +/// # let mut bpf = aya::Ebpf::load(&[])?; +/// use aya::programs::RawTracePoint; /// /// let program: &mut RawTracePoint = bpf.program_mut("sys_enter").unwrap().try_into()?; /// program.load()?; @@ -39,6 +39,9 @@ pub struct RawTracePoint { } impl RawTracePoint { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::RawTracePoint; + /// Loads the program inside the kernel. pub fn load(&mut self) -> Result<(), ProgramError> { load_program(BPF_PROG_TYPE_RAW_TRACEPOINT, &mut self.data) @@ -51,31 +54,12 @@ impl RawTracePoint { let tp_name_c = CString::new(tp_name).unwrap(); attach_raw_tracepoint(&mut self.data, Some(&tp_name_c)) } - - /// Detaches from a tracepoint. - /// - /// See [RawTracePoint::attach]. - pub fn detach(&mut self, link_id: RawTracePointLinkId) -> Result<(), ProgramError> { - self.data.links.remove(link_id) - } - - /// Takes ownership of the link referenced by the provided link_id. - /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. - pub fn take_link( - &mut self, - link_id: RawTracePointLinkId, - ) -> Result { - self.data.take_link(link_id) - } } define_link_wrapper!( - /// The link used by [RawTracePoint] programs. RawTracePointLink, - /// The type returned by [RawTracePoint::attach]. Can be passed to [RawTracePoint::detach]. RawTracePointLinkId, FdLink, - FdLinkId + FdLinkId, + RawTracePoint, ); diff --git a/aya/src/programs/sk_lookup.rs b/aya/src/programs/sk_lookup.rs index dab0ebc7..21577583 100644 --- a/aya/src/programs/sk_lookup.rs +++ b/aya/src/programs/sk_lookup.rs @@ -1,11 +1,14 @@ //! Programmable socket lookup. use std::os::fd::AsFd; +use aya_obj::generated::{bpf_attach_type::BPF_SK_LOOKUP, bpf_prog_type::BPF_PROG_TYPE_SK_LOOKUP}; + use super::links::FdLink; use crate::{ - generated::{bpf_attach_type::BPF_SK_LOOKUP, bpf_prog_type::BPF_PROG_TYPE_SK_LOOKUP}, - programs::{define_link_wrapper, load_program, FdLinkId, ProgramData, ProgramError}, - sys::{bpf_link_create, LinkTarget, SyscallError}, + programs::{ + FdLinkId, ProgramData, ProgramError, ProgramType, define_link_wrapper, load_program, + }, + sys::{LinkTarget, SyscallError, bpf_link_create}, }; /// A program used to redirect incoming packets to a local socket. @@ -51,6 +54,9 @@ pub struct SkLookup { } impl SkLookup { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::SkLookup; + /// Loads the program inside the kernel. pub fn load(&mut self) -> Result<(), ProgramError> { self.data.expected_attach_type = Some(BPF_SK_LOOKUP); @@ -65,8 +71,8 @@ impl SkLookup { let prog_fd = prog_fd.as_fd(); let netns_fd = netns.as_fd(); - let link_fd = bpf_link_create(prog_fd, LinkTarget::Fd(netns_fd), BPF_SK_LOOKUP, None, 0) - .map_err(|(_, io_error)| SyscallError { + let link_fd = bpf_link_create(prog_fd, LinkTarget::Fd(netns_fd), BPF_SK_LOOKUP, 0, None) + .map_err(|io_error| SyscallError { call: "bpf_link_create", io_error, })?; @@ -74,28 +80,6 @@ impl SkLookup { .links .insert(SkLookupLink::new(FdLink::new(link_fd))) } - - /// Takes ownership of the link referenced by the provided link_id. - /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. - pub fn take_link(&mut self, link_id: SkLookupLinkId) -> Result { - self.data.take_link(link_id) - } - - /// Detaches the program. - /// - /// See [SkLookup::attach]. - pub fn detach(&mut self, link_id: SkLookupLinkId) -> Result<(), ProgramError> { - self.data.links.remove(link_id) - } } -define_link_wrapper!( - /// The link used by [SkLookup] programs. - SkLookupLink, - /// The type returned by [SkLookup::attach]. Can be passed to [SkLookup::detach]. - SkLookupLinkId, - FdLink, - FdLinkId -); +define_link_wrapper!(SkLookupLink, SkLookupLinkId, FdLink, FdLinkId, SkLookup); diff --git a/aya/src/programs/sk_msg.rs b/aya/src/programs/sk_msg.rs index b5a89b87..9cd73055 100644 --- a/aya/src/programs/sk_msg.rs +++ b/aya/src/programs/sk_msg.rs @@ -2,12 +2,15 @@ use std::os::fd::AsFd as _; +use aya_obj::generated::{ + bpf_attach_type::BPF_SK_MSG_VERDICT, bpf_prog_type::BPF_PROG_TYPE_SK_MSG, +}; + use crate::{ - generated::{bpf_attach_type::BPF_SK_MSG_VERDICT, bpf_prog_type::BPF_PROG_TYPE_SK_MSG}, maps::sock::SockMapFd, programs::{ - define_link_wrapper, load_program, ProgAttachLink, ProgAttachLinkId, ProgramData, - ProgramError, + CgroupAttachMode, ProgAttachLink, ProgAttachLinkId, ProgramData, ProgramError, ProgramType, + define_link_wrapper, load_program, }, }; @@ -69,6 +72,9 @@ pub struct SkMsg { } impl SkMsg { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::SkLookup; + /// Loads the program inside the kernel. pub fn load(&mut self) -> Result<(), ProgramError> { load_program(BPF_PROG_TYPE_SK_MSG, &mut self.data) @@ -80,32 +86,21 @@ impl SkMsg { pub fn attach(&mut self, map: &SockMapFd) -> Result { let prog_fd = self.fd()?; let prog_fd = prog_fd.as_fd(); - let link = ProgAttachLink::attach(prog_fd, map.as_fd(), BPF_SK_MSG_VERDICT)?; + let link = ProgAttachLink::attach( + prog_fd, + map.as_fd(), + BPF_SK_MSG_VERDICT, + CgroupAttachMode::Single, + )?; self.data.links.insert(SkMsgLink::new(link)) } - - /// Detaches the program from a sockmap. - /// - /// See [SkMsg::attach]. - pub fn detach(&mut self, link_id: SkMsgLinkId) -> Result<(), ProgramError> { - self.data.links.remove(link_id) - } - - /// Takes ownership of the link referenced by the provided link_id. - /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. - pub fn take_link(&mut self, link_id: SkMsgLinkId) -> Result { - self.data.take_link(link_id) - } } define_link_wrapper!( - /// The link used by [SkMsg] programs. SkMsgLink, - /// The type returned by [SkMsg::attach]. Can be passed to [SkMsg::detach]. SkMsgLinkId, ProgAttachLink, - ProgAttachLinkId + ProgAttachLinkId, + SkMsg, ); diff --git a/aya/src/programs/sk_skb.rs b/aya/src/programs/sk_skb.rs index 4d571dcb..79fcfea8 100644 --- a/aya/src/programs/sk_skb.rs +++ b/aya/src/programs/sk_skb.rs @@ -2,17 +2,18 @@ use std::{os::fd::AsFd as _, path::Path}; +use aya_obj::generated::{ + bpf_attach_type::{BPF_SK_SKB_STREAM_PARSER, BPF_SK_SKB_STREAM_VERDICT}, + bpf_prog_type::BPF_PROG_TYPE_SK_SKB, +}; + use crate::{ - generated::{ - bpf_attach_type::{BPF_SK_SKB_STREAM_PARSER, BPF_SK_SKB_STREAM_VERDICT}, - bpf_prog_type::BPF_PROG_TYPE_SK_SKB, - }, + VerifierLogLevel, maps::sock::SockMapFd, programs::{ - define_link_wrapper, load_program, ProgAttachLink, ProgAttachLinkId, ProgramData, - ProgramError, + CgroupAttachMode, ProgAttachLink, ProgAttachLinkId, ProgramData, ProgramError, ProgramType, + define_link_wrapper, load_program, }, - VerifierLogLevel, }; /// The kind of [`SkSkb`] program. @@ -73,6 +74,9 @@ pub struct SkSkb { } impl SkSkb { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::SkSkb; + /// Loads the program inside the kernel. pub fn load(&mut self) -> Result<(), ProgramError> { load_program(BPF_PROG_TYPE_SK_SKB, &mut self.data) @@ -90,26 +94,12 @@ impl SkSkb { SkSkbKind::StreamVerdict => BPF_SK_SKB_STREAM_VERDICT, }; - let link = ProgAttachLink::attach(prog_fd, map.as_fd(), attach_type)?; + let link = + ProgAttachLink::attach(prog_fd, map.as_fd(), attach_type, CgroupAttachMode::Single)?; self.data.links.insert(SkSkbLink::new(link)) } - /// Detaches the program. - /// - /// See [SkSkb::attach]. - pub fn detach(&mut self, link_id: SkSkbLinkId) -> Result<(), ProgramError> { - self.data.links.remove(link_id) - } - - /// Takes ownership of the link referenced by the provided link_id. - /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. - pub fn take_link(&mut self, link_id: SkSkbLinkId) -> Result { - self.data.take_link(link_id) - } - /// Creates a program from a pinned entry on a bpffs. /// /// Existing links will not be populated. To work with existing links you should use [`crate::programs::links::PinnedLink`]. @@ -123,10 +113,9 @@ impl SkSkb { } define_link_wrapper!( - /// The link used by [SkSkb] programs. SkSkbLink, - /// The type returned by [SkSkb::attach]. Can be passed to [SkSkb::detach]. SkSkbLinkId, ProgAttachLink, - ProgAttachLinkId + ProgAttachLinkId, + SkSkb, ); diff --git a/aya/src/programs/sock_ops.rs b/aya/src/programs/sock_ops.rs index 0694dcbd..01f3b100 100644 --- a/aya/src/programs/sock_ops.rs +++ b/aya/src/programs/sock_ops.rs @@ -1,12 +1,17 @@ //! Socket option programs. use std::os::fd::AsFd; +use aya_obj::generated::{ + bpf_attach_type::BPF_CGROUP_SOCK_OPS, bpf_prog_type::BPF_PROG_TYPE_SOCK_OPS, +}; + use crate::{ - generated::{bpf_attach_type::BPF_CGROUP_SOCK_OPS, bpf_prog_type::BPF_PROG_TYPE_SOCK_OPS}, programs::{ - define_link_wrapper, load_program, ProgAttachLink, ProgAttachLinkId, ProgramData, - ProgramError, + CgroupAttachMode, FdLink, Link, ProgAttachLink, ProgramData, ProgramError, ProgramType, + define_link_wrapper, id_as_key, impl_try_into_fdlink, load_program, }, + sys::{LinkTarget, SyscallError, bpf_link_create}, + util::KernelVersion, }; /// A program used to work with sockets. @@ -35,12 +40,12 @@ use crate::{ /// # } /// # let mut bpf = aya::Ebpf::load(&[])?; /// use std::fs::File; -/// use aya::programs::SockOps; +/// use aya::programs::{CgroupAttachMode, SockOps}; /// /// let file = File::open("/sys/fs/cgroup/unified")?; /// let prog: &mut SockOps = bpf.program_mut("intercept_active_sockets").unwrap().try_into()?; /// prog.load()?; -/// prog.attach(file)?; +/// prog.attach(file, CgroupAttachMode::Single)?; /// # Ok::<(), Error>(()) #[derive(Debug)] #[doc(alias = "BPF_PROG_TYPE_SOCK_OPS")] @@ -49,6 +54,9 @@ pub struct SockOps { } impl SockOps { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::SkSkb; + /// Loads the program inside the kernel. pub fn load(&mut self) -> Result<(), ProgramError> { load_program(BPF_PROG_TYPE_SOCK_OPS, &mut self.data) @@ -57,34 +65,78 @@ impl SockOps { /// Attaches the program to the given cgroup. /// /// The returned value can be used to detach, see [SockOps::detach]. - pub fn attach(&mut self, cgroup: T) -> Result { + pub fn attach( + &mut self, + cgroup: T, + mode: CgroupAttachMode, + ) -> Result { let prog_fd = self.fd()?; + let prog_fd = prog_fd.as_fd(); + let cgroup_fd = cgroup.as_fd(); + let attach_type = BPF_CGROUP_SOCK_OPS; + if KernelVersion::at_least(5, 7, 0) { + let link_fd = bpf_link_create( + prog_fd, + LinkTarget::Fd(cgroup_fd), + attach_type, + mode.into(), + None, + ) + .map_err(|io_error| SyscallError { + call: "bpf_link_create", + io_error, + })?; + self.data + .links + .insert(SockOpsLink::new(SockOpsLinkInner::Fd(FdLink::new(link_fd)))) + } else { + let link = ProgAttachLink::attach(prog_fd, cgroup_fd, attach_type, mode)?; - let link = ProgAttachLink::attach(prog_fd.as_fd(), cgroup.as_fd(), BPF_CGROUP_SOCK_OPS)?; - self.data.links.insert(SockOpsLink::new(link)) + self.data + .links + .insert(SockOpsLink::new(SockOpsLinkInner::ProgAttach(link))) + } } +} - /// Detaches the program. - /// - /// See [SockOps::attach]. - pub fn detach(&mut self, link_id: SockOpsLinkId) -> Result<(), ProgramError> { - self.data.links.remove(link_id) +#[derive(Debug, Hash, Eq, PartialEq)] +enum SockOpsLinkIdInner { + Fd(::Id), + ProgAttach(::Id), +} + +#[derive(Debug)] +enum SockOpsLinkInner { + Fd(FdLink), + ProgAttach(ProgAttachLink), +} + +impl Link for SockOpsLinkInner { + type Id = SockOpsLinkIdInner; + + fn id(&self) -> Self::Id { + match self { + Self::Fd(fd) => SockOpsLinkIdInner::Fd(fd.id()), + Self::ProgAttach(p) => SockOpsLinkIdInner::ProgAttach(p.id()), + } } - /// Takes ownership of the link referenced by the provided link_id. - /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. - pub fn take_link(&mut self, link_id: SockOpsLinkId) -> Result { - self.data.take_link(link_id) + fn detach(self) -> Result<(), ProgramError> { + match self { + Self::Fd(fd) => fd.detach(), + Self::ProgAttach(p) => p.detach(), + } } } +id_as_key!(SockOpsLinkInner, SockOpsLinkIdInner); + define_link_wrapper!( - /// The link used by [SockOps] programs. SockOpsLink, - /// The type returned by [SockOps::attach]. Can be passed to [SockOps::detach]. SockOpsLinkId, - ProgAttachLink, - ProgAttachLinkId + SockOpsLinkInner, + SockOpsLinkIdInner, + SockOps, ); + +impl_try_into_fdlink!(SockOpsLink, SockOpsLinkInner); diff --git a/aya/src/programs/socket_filter.rs b/aya/src/programs/socket_filter.rs index 02be9e05..de6e206e 100644 --- a/aya/src/programs/socket_filter.rs +++ b/aya/src/programs/socket_filter.rs @@ -1,16 +1,16 @@ //! Socket filter programs. use std::{ - io, mem, - os::fd::{AsFd, AsRawFd, RawFd}, + io, + os::fd::{AsFd, AsRawFd as _, RawFd}, }; -use libc::{setsockopt, SOL_SOCKET}; +use aya_obj::generated::{ + SO_ATTACH_BPF, SO_DETACH_BPF, bpf_prog_type::BPF_PROG_TYPE_SOCKET_FILTER, +}; +use libc::{SOL_SOCKET, setsockopt}; use thiserror::Error; -use crate::{ - generated::{bpf_prog_type::BPF_PROG_TYPE_SOCKET_FILTER, SO_ATTACH_BPF, SO_DETACH_BPF}, - programs::{load_program, Link, ProgramData, ProgramError}, -}; +use crate::programs::{Link, ProgramData, ProgramError, ProgramType, id_as_key, load_program}; /// The type returned when attaching a [`SocketFilter`] fails. #[derive(Debug, Error)] @@ -64,6 +64,9 @@ pub struct SocketFilter { } impl SocketFilter { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::SocketFilter; + /// Loads the program inside the kernel. pub fn load(&mut self) -> Result<(), ProgramError> { load_program(BPF_PROG_TYPE_SOCKET_FILTER, &mut self.data) @@ -84,8 +87,8 @@ impl SocketFilter { socket, SOL_SOCKET, SO_ATTACH_BPF as i32, - &prog_fd as *const _ as *const _, - mem::size_of::() as u32, + std::ptr::from_ref(&prog_fd).cast(), + std::mem::size_of_val(&prog_fd) as u32, ) }; if ret < 0 { @@ -100,24 +103,24 @@ impl SocketFilter { /// Detaches the program. /// - /// See [SocketFilter::attach]. + /// See [`Self::attach``]. pub fn detach(&mut self, link_id: SocketFilterLinkId) -> Result<(), ProgramError> { self.data.links.remove(link_id) } - /// Takes ownership of the link referenced by the provided link_id. + /// Takes ownership of the link referenced by the provided `link_id`. /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. + /// The caller takes the responsibility of managing the lifetime of the link. When the returned + /// [`SocketFilterLink`] is dropped, the link is detached. pub fn take_link( &mut self, link_id: SocketFilterLinkId, ) -> Result { - self.data.take_link(link_id) + self.data.links.forget(link_id) } } -/// The type returned by [SocketFilter::attach]. Can be passed to [SocketFilter::detach]. +/// The type returned by [`SocketFilter::attach`]. Can be passed to [`SocketFilter::detach`]. #[derive(Debug, Hash, Eq, PartialEq)] pub struct SocketFilterLinkId(RawFd, RawFd); @@ -141,10 +144,12 @@ impl Link for SocketFilterLink { self.socket, SOL_SOCKET, SO_DETACH_BPF as i32, - &self.prog_fd as *const _ as *const _, - mem::size_of::() as u32, + std::ptr::from_ref(&self.prog_fd).cast(), + std::mem::size_of_val(&self.prog_fd) as u32, ); } Ok(()) } } + +id_as_key!(SocketFilterLink, SocketFilterLinkId); diff --git a/aya/src/programs/tc.rs b/aya/src/programs/tc.rs index c2dd5a13..58a0ecbf 100644 --- a/aya/src/programs/tc.rs +++ b/aya/src/programs/tc.rs @@ -6,19 +6,28 @@ use std::{ path::Path, }; +use aya_obj::generated::{ + TC_H_CLSACT, TC_H_MIN_EGRESS, TC_H_MIN_INGRESS, + bpf_attach_type::{self, BPF_TCX_EGRESS, BPF_TCX_INGRESS}, + bpf_link_type, + bpf_prog_type::BPF_PROG_TYPE_SCHED_CLS, +}; use thiserror::Error; +use super::{FdLink, ProgramInfo}; use crate::{ - generated::{ - bpf_prog_type::BPF_PROG_TYPE_SCHED_CLS, TC_H_CLSACT, TC_H_MIN_EGRESS, TC_H_MIN_INGRESS, + VerifierLogLevel, + programs::{ + Link, LinkError, LinkOrder, ProgramData, ProgramError, ProgramType, define_link_wrapper, + id_as_key, impl_try_into_fdlink, load_program, query, }, - programs::{define_link_wrapper, load_program, Link, ProgramData, ProgramError}, sys::{ + BpfLinkCreateArgs, LinkTarget, NetlinkError, ProgQueryTarget, SyscallError, + bpf_link_create, bpf_link_get_info_by_fd, bpf_link_update, bpf_prog_get_fd_by_id, netlink_find_filter_with_name, netlink_qdisc_add_clsact, netlink_qdisc_attach, netlink_qdisc_detach, }, - util::{ifindex_from_ifname, tc_handler_make}, - VerifierLogLevel, + util::{KernelVersion, ifindex_from_ifname, tc_handler_make}, }; /// Traffic control attach type. @@ -55,6 +64,8 @@ pub enum TcAttachType { /// # #[error(transparent)] /// # Program(#[from] aya::programs::ProgramError), /// # #[error(transparent)] +/// # Tc(#[from] aya::programs::tc::TcError), +/// # #[error(transparent)] /// # Ebpf(#[from] aya::EbpfError) /// # } /// # let mut bpf = aya::Ebpf::load(&[])?; @@ -79,31 +90,63 @@ pub struct SchedClassifier { /// Errors from TC programs #[derive(Debug, Error)] pub enum TcError { - /// netlink error while attaching ebpf program - #[error("netlink error while attaching ebpf program to tc")] - NetlinkError { - /// the [`io::Error`] from the netlink call - #[source] - io_error: io::Error, - }, - /// the clsact qdisc is already attached + /// a netlink error occurred. + #[error(transparent)] + NetlinkError(#[from] NetlinkError), + /// the provided string contains a nul byte. + #[error(transparent)] + NulError(#[from] std::ffi::NulError), + /// an IO error occurred. + #[error(transparent)] + IoError(#[from] io::Error), + /// the clsact qdisc is already attached. #[error("the clsact qdisc is already attached")] AlreadyAttached, + /// tcx links can only be attached to ingress or egress, custom attachment is not supported. + #[error( + "tcx links can only be attached to ingress or egress, custom attachment: {0} is not supported" + )] + InvalidTcxAttach(u32), + /// operation not supported for programs loaded via tcx. + #[error("operation not supported for programs loaded via tcx")] + InvalidLinkOperation, } impl TcAttachType { - pub(crate) fn parent(&self) -> u32 { + pub(crate) fn tc_parent(&self) -> u32 { match self { Self::Custom(parent) => *parent, Self::Ingress => tc_handler_make(TC_H_CLSACT, TC_H_MIN_INGRESS), Self::Egress => tc_handler_make(TC_H_CLSACT, TC_H_MIN_EGRESS), } } + + pub(crate) fn tcx_attach_type(&self) -> Result { + match self { + Self::Ingress => Ok(BPF_TCX_INGRESS), + Self::Egress => Ok(BPF_TCX_EGRESS), + Self::Custom(tcx_attach_type) => Err(TcError::InvalidTcxAttach(*tcx_attach_type)), + } + } +} + +/// Options for a SchedClassifier attach operation. +/// +/// The options vary based on what is supported by the current kernel. Kernels +/// older than 6.6.0 must utilize netlink for attachments, while newer kernels +/// can utilize the modern TCX eBPF link type which supports the kernel's +/// multi-prog API. +#[derive(Debug)] +pub enum TcAttachOptions { + /// Netlink attach options. + Netlink(NlOptions), + /// Tcx attach options. + TcxOrder(LinkOrder), } -/// Options for SchedClassifier attach -#[derive(Default)] -pub struct TcOptions { +/// Options for SchedClassifier attach via netlink. +#[derive(Debug, Default, Hash, Eq, PartialEq)] +pub struct NlOptions { /// Priority assigned to tc program with lower number = higher priority. /// If set to default (0), the system chooses the next highest priority or 49152 if no filters exist yet pub priority: u16, @@ -113,30 +156,52 @@ pub struct TcOptions { } impl SchedClassifier { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::SchedClassifier; + /// Loads the program inside the kernel. pub fn load(&mut self) -> Result<(), ProgramError> { load_program(BPF_PROG_TYPE_SCHED_CLS, &mut self.data) } - /// Attaches the program to the given `interface` using the default options. + /// Attaches the program to the given `interface`. + /// + /// On kernels >= 6.6.0, it will attempt to use the TCX interface and attach as + /// the last TCX program. On older kernels, it will fallback to using the + /// legacy netlink interface. + /// + /// For finer grained control over link ordering use [`SchedClassifier::attach_with_options`]. /// /// The returned value can be used to detach, see [SchedClassifier::detach]. /// /// # Errors /// - /// [`TcError::NetlinkError`] is returned if attaching fails. A common cause - /// of failure is not having added the `clsact` qdisc to the given - /// interface, see [`qdisc_add_clsact`] + /// When attaching fails, [`ProgramError::SyscallError`] is returned for + /// kernels `>= 6.6.0`, and [`TcError::NetlinkError`] is returned for + /// older kernels. A common cause of netlink attachment failure is not having added + /// the `clsact` qdisc to the given interface, see [`qdisc_add_clsact`] /// pub fn attach( &mut self, interface: &str, attach_type: TcAttachType, ) -> Result { - self.attach_with_options(interface, attach_type, TcOptions::default()) + if !matches!(attach_type, TcAttachType::Custom(_)) && KernelVersion::at_least(6, 6, 0) { + self.attach_with_options( + interface, + attach_type, + TcAttachOptions::TcxOrder(LinkOrder::default()), + ) + } else { + self.attach_with_options( + interface, + attach_type, + TcAttachOptions::Netlink(NlOptions::default()), + ) + } } - /// Attaches the program to the given `interface` with options defined in [`TcOptions`]. + /// Attaches the program to the given `interface` with options defined in [`TcAttachOptions`]. /// /// The returned value can be used to detach, see [SchedClassifier::detach]. /// @@ -150,11 +215,10 @@ impl SchedClassifier { &mut self, interface: &str, attach_type: TcAttachType, - options: TcOptions, + options: TcAttachOptions, ) -> Result { - let if_index = ifindex_from_ifname(interface) - .map_err(|io_error| TcError::NetlinkError { io_error })?; - self.do_attach(if_index as i32, attach_type, options, true) + let if_index = ifindex_from_ifname(interface).map_err(TcError::IoError)?; + self.do_attach(if_index, attach_type, options, true) } /// Atomically replaces the program referenced by the provided link. @@ -164,64 +228,95 @@ impl SchedClassifier { &mut self, link: SchedClassifierLink, ) -> Result { - let TcLink { - if_index, - attach_type, - priority, - handle, - } = link.into_inner(); - self.do_attach(if_index, attach_type, TcOptions { priority, handle }, false) + let prog_fd = self.fd()?; + let prog_fd = prog_fd.as_fd(); + match link.into_inner() { + TcLinkInner::Fd(link) => { + let fd = link.fd; + let link_fd = fd.as_fd(); + + bpf_link_update(link_fd.as_fd(), prog_fd, None, 0).map_err(|io_error| { + SyscallError { + call: "bpf_link_update", + io_error, + } + })?; + + self.data + .links + .insert(SchedClassifierLink::new(TcLinkInner::Fd(FdLink::new(fd)))) + } + TcLinkInner::NlLink(NlLink { + if_index, + attach_type, + priority, + handle, + }) => self.do_attach( + if_index, + attach_type, + TcAttachOptions::Netlink(NlOptions { priority, handle }), + false, + ), + } } fn do_attach( &mut self, - if_index: i32, + if_index: u32, attach_type: TcAttachType, - options: TcOptions, + options: TcAttachOptions, create: bool, ) -> Result { let prog_fd = self.fd()?; let prog_fd = prog_fd.as_fd(); - let name = self.data.name.as_deref().unwrap_or_default(); - // TODO: avoid this unwrap by adding a new error variant. - let name = CString::new(name).unwrap(); - let (priority, handle) = unsafe { - netlink_qdisc_attach( - if_index, - &attach_type, - prog_fd, - &name, - options.priority, - options.handle, - create, - ) - } - .map_err(|io_error| TcError::NetlinkError { io_error })?; - - self.data.links.insert(SchedClassifierLink::new(TcLink { - if_index, - attach_type, - priority, - handle, - })) - } - - /// Detaches the program. - /// - /// See [SchedClassifier::attach]. - pub fn detach(&mut self, link_id: SchedClassifierLinkId) -> Result<(), ProgramError> { - self.data.links.remove(link_id) - } - /// Takes ownership of the link referenced by the provided link_id. - /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. - pub fn take_link( - &mut self, - link_id: SchedClassifierLinkId, - ) -> Result { - self.data.take_link(link_id) + match options { + TcAttachOptions::Netlink(options) => { + let name = self.data.name.as_deref().unwrap_or_default(); + // TODO: avoid this unwrap by adding a new error variant. + let name = CString::new(name).unwrap(); + let (priority, handle) = unsafe { + netlink_qdisc_attach( + if_index as i32, + &attach_type, + prog_fd, + &name, + options.priority, + options.handle, + create, + ) + } + .map_err(TcError::NetlinkError)?; + + self.data + .links + .insert(SchedClassifierLink::new(TcLinkInner::NlLink(NlLink { + if_index, + attach_type, + priority, + handle, + }))) + } + TcAttachOptions::TcxOrder(options) => { + let link_fd = bpf_link_create( + prog_fd, + LinkTarget::IfIndex(if_index), + attach_type.tcx_attach_type()?, + options.flags.bits(), + Some(BpfLinkCreateArgs::Tcx(&options.link_ref)), + ) + .map_err(|io_error| SyscallError { + call: "bpf_mprog_attach", + io_error, + })?; + + self.data + .links + .insert(SchedClassifierLink::new(TcLinkInner::Fd(FdLink::new( + link_fd, + )))) + } + } } /// Creates a program from a pinned entry on a bpffs. @@ -234,42 +329,145 @@ impl SchedClassifier { let data = ProgramData::from_pinned_path(path, VerifierLogLevel::default())?; Ok(Self { data }) } + + /// Queries a given interface for attached TCX programs. + /// + /// # Example + /// + /// ```no_run + /// # use aya::programs::tc::{TcAttachType, SchedClassifier}; + /// # #[derive(Debug, thiserror::Error)] + /// # enum Error { + /// # #[error(transparent)] + /// # Program(#[from] aya::programs::ProgramError), + /// # } + /// let (revision, programs) = SchedClassifier::query_tcx("eth0", TcAttachType::Ingress)?; + /// # Ok::<(), Error>(()) + /// ``` + pub fn query_tcx( + interface: &str, + attach_type: TcAttachType, + ) -> Result<(u64, Vec), ProgramError> { + let if_index = ifindex_from_ifname(interface).map_err(TcError::IoError)?; + + let (revision, prog_ids) = query( + ProgQueryTarget::IfIndex(if_index), + attach_type.tcx_attach_type()?, + 0, + &mut None, + )?; + + let prog_infos = prog_ids + .into_iter() + .map(|prog_id| { + let prog_fd = bpf_prog_get_fd_by_id(prog_id)?; + let prog_info = ProgramInfo::new_from_fd(prog_fd.as_fd())?; + Ok::(prog_info) + }) + .collect::>()?; + + Ok((revision, prog_infos)) + } } #[derive(Debug, Hash, Eq, PartialEq)] -pub(crate) struct TcLinkId(i32, TcAttachType, u16, u32); +pub(crate) struct NlLinkId(u32, TcAttachType, u16, u32); #[derive(Debug)] -struct TcLink { - if_index: i32, +pub(crate) struct NlLink { + if_index: u32, attach_type: TcAttachType, priority: u16, handle: u32, } -impl Link for TcLink { - type Id = TcLinkId; +impl Link for NlLink { + type Id = NlLinkId; fn id(&self) -> Self::Id { - TcLinkId(self.if_index, self.attach_type, self.priority, self.handle) + NlLinkId(self.if_index, self.attach_type, self.priority, self.handle) } fn detach(self) -> Result<(), ProgramError> { unsafe { - netlink_qdisc_detach(self.if_index, &self.attach_type, self.priority, self.handle) + netlink_qdisc_detach( + self.if_index as i32, + &self.attach_type, + self.priority, + self.handle, + ) } - .map_err(|io_error| TcError::NetlinkError { io_error })?; + .map_err(ProgramError::NetlinkError)?; Ok(()) } } +id_as_key!(NlLink, NlLinkId); + +#[derive(Debug, Hash, Eq, PartialEq)] +pub(crate) enum TcLinkIdInner { + FdLinkId(::Id), + NlLinkId(::Id), +} + +#[derive(Debug)] +pub(crate) enum TcLinkInner { + Fd(FdLink), + NlLink(NlLink), +} + +impl Link for TcLinkInner { + type Id = TcLinkIdInner; + + fn id(&self) -> Self::Id { + match self { + Self::Fd(link) => TcLinkIdInner::FdLinkId(link.id()), + Self::NlLink(link) => TcLinkIdInner::NlLinkId(link.id()), + } + } + + fn detach(self) -> Result<(), ProgramError> { + match self { + Self::Fd(link) => link.detach(), + Self::NlLink(link) => link.detach(), + } + } +} + +id_as_key!(TcLinkInner, TcLinkIdInner); + +impl<'a> TryFrom<&'a SchedClassifierLink> for &'a FdLink { + type Error = LinkError; + + fn try_from(value: &'a SchedClassifierLink) -> Result { + if let TcLinkInner::Fd(fd) = value.inner() { + Ok(fd) + } else { + Err(LinkError::InvalidLink) + } + } +} + +impl_try_into_fdlink!(SchedClassifierLink, TcLinkInner); + +impl TryFrom for SchedClassifierLink { + type Error = LinkError; + + fn try_from(fd_link: FdLink) -> Result { + let info = bpf_link_get_info_by_fd(fd_link.fd.as_fd())?; + if info.type_ == (bpf_link_type::BPF_LINK_TYPE_TCX as u32) { + return Ok(Self::new(TcLinkInner::Fd(fd_link))); + } + Err(LinkError::InvalidLink) + } +} + define_link_wrapper!( - /// The link used by [SchedClassifier] programs. SchedClassifierLink, - /// The type returned by [SchedClassifier::attach]. Can be passed to [SchedClassifier::detach]. SchedClassifierLinkId, - TcLink, - TcLinkId + TcLinkInner, + TcLinkIdInner, + SchedClassifier, ); impl SchedClassifierLink { @@ -311,27 +509,39 @@ impl SchedClassifierLink { handle: u32, ) -> Result { let if_index = ifindex_from_ifname(if_name)?; - Ok(Self(Some(TcLink { - if_index: if_index as i32, + Ok(Self(Some(TcLinkInner::NlLink(NlLink { + if_index, attach_type, priority, handle, - }))) + })))) } /// Returns the attach type. - pub fn attach_type(&self) -> TcAttachType { - self.inner().attach_type + pub fn attach_type(&self) -> Result { + if let TcLinkInner::NlLink(n) = self.inner() { + Ok(n.attach_type) + } else { + Err(TcError::InvalidLinkOperation.into()) + } } /// Returns the allocated priority. If none was provided at attach time, this was allocated for you. - pub fn priority(&self) -> u16 { - self.inner().priority + pub fn priority(&self) -> Result { + if let TcLinkInner::NlLink(n) = self.inner() { + Ok(n.priority) + } else { + Err(TcError::InvalidLinkOperation.into()) + } } /// Returns the assigned handle. If none was provided at attach time, this was allocated for you. - pub fn handle(&self) -> u32 { - self.inner().handle + pub fn handle(&self) -> Result { + if let TcLinkInner::NlLink(n) = self.inner() { + Ok(n.handle) + } else { + Err(TcError::InvalidLinkOperation.into()) + } } } @@ -339,9 +549,9 @@ impl SchedClassifierLink { /// /// The `clsact` qdisc must be added to an interface before [`SchedClassifier`] /// programs can be attached. -pub fn qdisc_add_clsact(if_name: &str) -> Result<(), io::Error> { +pub fn qdisc_add_clsact(if_name: &str) -> Result<(), TcError> { let if_index = ifindex_from_ifname(if_name)?; - unsafe { netlink_qdisc_add_clsact(if_index as i32) } + unsafe { netlink_qdisc_add_clsact(if_index as i32).map_err(TcError::NetlinkError) } } /// Detaches the programs with the given name. @@ -355,8 +565,8 @@ pub fn qdisc_detach_program( if_name: &str, attach_type: TcAttachType, name: &str, -) -> Result<(), io::Error> { - let cstr = CString::new(name)?; +) -> Result<(), TcError> { + let cstr = CString::new(name).map_err(TcError::NulError)?; qdisc_detach_program_fast(if_name, attach_type, &cstr) } @@ -373,15 +583,15 @@ fn qdisc_detach_program_fast( if_name: &str, attach_type: TcAttachType, name: &CStr, -) -> Result<(), io::Error> { +) -> Result<(), TcError> { let if_index = ifindex_from_ifname(if_name)? as i32; let filter_info = unsafe { netlink_find_filter_with_name(if_index, attach_type, name)? }; if filter_info.is_empty() { - return Err(io::Error::new( + return Err(TcError::IoError(io::Error::new( io::ErrorKind::NotFound, name.to_string_lossy(), - )); + ))); } for (prio, handle) in filter_info { diff --git a/aya/src/programs/tp_btf.rs b/aya/src/programs/tp_btf.rs index 8c235d43..873405c3 100644 --- a/aya/src/programs/tp_btf.rs +++ b/aya/src/programs/tp_btf.rs @@ -1,12 +1,13 @@ //! BTF-enabled raw tracepoints. -use crate::{ +use aya_obj::{ + btf::{Btf, BtfKind}, generated::{bpf_attach_type::BPF_TRACE_RAW_TP, bpf_prog_type::BPF_PROG_TYPE_TRACING}, - obj::btf::{Btf, BtfKind}, - programs::{ - define_link_wrapper, load_program, utils::attach_raw_tracepoint, FdLink, FdLinkId, - ProgramData, ProgramError, - }, +}; + +use crate::programs::{ + FdLink, FdLinkId, ProgramData, ProgramError, ProgramType, define_link_wrapper, load_program, + utils::attach_raw_tracepoint, }; /// Marks a function as a [BTF-enabled raw tracepoint][1] eBPF program that can be attached at @@ -51,6 +52,9 @@ pub struct BtfTracePoint { } impl BtfTracePoint { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::Tracing; + /// Loads the program inside the kernel. /// /// # Arguments @@ -71,31 +75,12 @@ impl BtfTracePoint { pub fn attach(&mut self) -> Result { attach_raw_tracepoint(&mut self.data, None) } - - /// Detaches the program. - /// - /// See [BtfTracePoint::attach]. - pub fn detach(&mut self, link_id: BtfTracePointLinkId) -> Result<(), ProgramError> { - self.data.links.remove(link_id) - } - - /// Takes ownership of the link referenced by the provided link_id. - /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. - pub fn take_link( - &mut self, - link_id: BtfTracePointLinkId, - ) -> Result { - self.data.take_link(link_id) - } } define_link_wrapper!( - /// The link used by [BtfTracePoint] programs. BtfTracePointLink, - /// The type returned by [BtfTracePoint::attach]. Can be passed to [BtfTracePoint::detach]. BtfTracePointLinkId, FdLink, - FdLinkId + FdLinkId, + BtfTracePoint, ); diff --git a/aya/src/programs/trace_point.rs b/aya/src/programs/trace_point.rs index 9d304204..651e8b13 100644 --- a/aya/src/programs/trace_point.rs +++ b/aya/src/programs/trace_point.rs @@ -1,17 +1,21 @@ //! Tracepoint programs. -use std::{fs, io, os::fd::AsFd as _, path::Path}; +use std::{ + fs, io, + os::fd::AsFd as _, + path::{Path, PathBuf}, +}; +use aya_obj::generated::{bpf_link_type, bpf_prog_type::BPF_PROG_TYPE_TRACEPOINT}; use thiserror::Error; use crate::{ - generated::{bpf_link_type, bpf_prog_type::BPF_PROG_TYPE_TRACEPOINT}, programs::{ - define_link_wrapper, load_program, - perf_attach::{perf_attach, PerfLinkIdInner, PerfLinkInner}, + FdLink, LinkError, ProgramData, ProgramError, ProgramType, define_link_wrapper, + impl_try_into_fdlink, load_program, + perf_attach::{PerfLinkIdInner, PerfLinkInner, perf_attach}, utils::find_tracefs_path, - FdLink, LinkError, ProgramData, ProgramError, }, - sys::{bpf_link_get_info_by_fd, perf_event_open_trace_point, SyscallError}, + sys::{SyscallError, bpf_link_get_info_by_fd, perf_event_open_trace_point}, }; /// The type returned when attaching a [`TracePoint`] fails. @@ -21,7 +25,7 @@ pub enum TracePointError { #[error("`{filename}`")] FileError { /// The file name - filename: String, + filename: PathBuf, /// The [`io::Error`] returned from the file operation #[source] io_error: io::Error, @@ -41,24 +45,13 @@ pub enum TracePointError { /// # Examples /// /// ```no_run -/// # #[derive(Debug, thiserror::Error)] -/// # enum Error { -/// # #[error(transparent)] -/// # IO(#[from] std::io::Error), -/// # #[error(transparent)] -/// # Map(#[from] aya::maps::MapError), -/// # #[error(transparent)] -/// # Program(#[from] aya::programs::ProgramError), -/// # #[error(transparent)] -/// # Ebpf(#[from] aya::EbpfError) -/// # } /// # let mut bpf = aya::Ebpf::load(&[])?; /// use aya::programs::TracePoint; /// /// let prog: &mut TracePoint = bpf.program_mut("trace_context_switch").unwrap().try_into()?; /// prog.load()?; /// prog.attach("sched", "sched_switch")?; -/// # Ok::<(), Error>(()) +/// # Ok::<(), aya::EbpfError>(()) /// ``` #[derive(Debug)] #[doc(alias = "BPF_PROG_TYPE_TRACEPOINT")] @@ -67,6 +60,9 @@ pub struct TracePoint { } impl TracePoint { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::TracePoint; + /// Loads the program inside the kernel. pub fn load(&mut self) -> Result<(), ProgramError> { load_program(BPF_PROG_TYPE_TRACEPOINT, &mut self.data) @@ -83,52 +79,25 @@ impl TracePoint { let prog_fd = prog_fd.as_fd(); let tracefs = find_tracefs_path()?; let id = read_sys_fs_trace_point_id(tracefs, category, name.as_ref())?; - let fd = - perf_event_open_trace_point(id, None).map_err(|(_code, io_error)| SyscallError { - call: "perf_event_open_trace_point", - io_error, - })?; + let fd = perf_event_open_trace_point(id, None).map_err(|io_error| SyscallError { + call: "perf_event_open_trace_point", + io_error, + })?; - let link = perf_attach(prog_fd, fd)?; + let link = perf_attach(prog_fd, fd, None /* cookie */)?; self.data.links.insert(TracePointLink::new(link)) } - - /// Detaches from a trace point. - /// - /// See [TracePoint::attach]. - pub fn detach(&mut self, link_id: TracePointLinkId) -> Result<(), ProgramError> { - self.data.links.remove(link_id) - } - - /// Takes ownership of the link referenced by the provided link_id. - /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. - pub fn take_link(&mut self, link_id: TracePointLinkId) -> Result { - self.data.take_link(link_id) - } } define_link_wrapper!( - /// The link used by [TracePoint] programs. TracePointLink, - /// The type returned by [TracePoint::attach]. Can be passed to [TracePoint::detach]. TracePointLinkId, PerfLinkInner, - PerfLinkIdInner + PerfLinkIdInner, + TracePoint, ); -impl TryFrom for FdLink { - type Error = LinkError; - - fn try_from(value: TracePointLink) -> Result { - if let PerfLinkInner::FdLink(fd) = value.into_inner() { - Ok(fd) - } else { - Err(LinkError::InvalidLink) - } - } -} +impl_try_into_fdlink!(TracePointLink, PerfLinkInner); impl TryFrom for TracePointLink { type Error = LinkError; @@ -136,7 +105,7 @@ impl TryFrom for TracePointLink { fn try_from(fd_link: FdLink) -> Result { let info = bpf_link_get_info_by_fd(fd_link.fd.as_fd())?; if info.type_ == (bpf_link_type::BPF_LINK_TYPE_TRACING as u32) { - return Ok(Self::new(PerfLinkInner::FdLink(fd_link))); + return Ok(Self::new(PerfLinkInner::Fd(fd_link))); } Err(LinkError::InvalidLink) } @@ -147,19 +116,21 @@ pub(crate) fn read_sys_fs_trace_point_id( category: &str, name: &Path, ) -> Result { - let file = tracefs.join("events").join(category).join(name).join("id"); - - let id = fs::read_to_string(&file).map_err(|io_error| TracePointError::FileError { - filename: file.display().to_string(), - io_error, - })?; - let id = id - .trim() - .parse::() - .map_err(|error| TracePointError::FileError { - filename: file.display().to_string(), - io_error: io::Error::new(io::ErrorKind::Other, error), - })?; + let filename = tracefs.join("events").join(category).join(name).join("id"); + + let id = match fs::read_to_string(&filename) { + Ok(id) => id, + Err(io_error) => return Err(TracePointError::FileError { filename, io_error }), + }; + let id = match id.trim().parse::() { + Ok(id) => id, + Err(error) => { + return Err(TracePointError::FileError { + filename, + io_error: io::Error::other(error), + }); + } + }; Ok(id) } diff --git a/aya/src/programs/uprobe.rs b/aya/src/programs/uprobe.rs index 74298219..d762f8a8 100644 --- a/aya/src/programs/uprobe.rs +++ b/aya/src/programs/uprobe.rs @@ -1,38 +1,36 @@ //! User space probes. use std::{ - borrow::Cow, error::Error, ffi::{CStr, OsStr, OsString}, fs, - io::{self, BufRead, Cursor, Read}, + io::{self, BufRead as _, Cursor, Read as _}, mem, - os::{fd::AsFd as _, raw::c_char, unix::ffi::OsStrExt}, + os::{fd::AsFd as _, unix::ffi::OsStrExt as _}, path::{Path, PathBuf}, - sync::Arc, + sync::LazyLock, }; +use aya_obj::generated::{bpf_link_type, bpf_prog_type::BPF_PROG_TYPE_KPROBE}; use libc::pid_t; -use object::{Object, ObjectSection, ObjectSymbol, Symbol}; +use object::{Object as _, ObjectSection as _, ObjectSymbol as _, Symbol}; use thiserror::Error; use crate::{ - generated::{bpf_link_type, bpf_prog_type::BPF_PROG_TYPE_KPROBE}, + VerifierLogLevel, programs::{ - define_link_wrapper, load_program, + FdLink, LinkError, ProgramData, ProgramError, ProgramType, define_link_wrapper, + impl_try_into_fdlink, load_program, perf_attach::{PerfLinkIdInner, PerfLinkInner}, - probe::{attach, OsStringExt as _, ProbeKind}, - FdLink, LinkError, ProgramData, ProgramError, + probe::{OsStringExt as _, ProbeKind, attach}, }, sys::bpf_link_get_info_by_fd, - VerifierLogLevel, + util::MMap, }; const LD_SO_CACHE_FILE: &str = "/etc/ld.so.cache"; -lazy_static::lazy_static! { - static ref LD_SO_CACHE: Result> = - LdSoCache::load(LD_SO_CACHE_FILE).map_err(Arc::new); -} +static LD_SO_CACHE: LazyLock> = + LazyLock::new(|| LdSoCache::load(LD_SO_CACHE_FILE)); const LD_SO_CACHE_HEADER_OLD: &str = "ld.so-1.7.0\0"; const LD_SO_CACHE_HEADER_NEW: &str = "glibc-ld.so.cache1.1"; @@ -50,7 +48,34 @@ pub struct UProbe { pub(crate) kind: ProbeKind, } +/// The location in the target object file to which the uprobe is to be +/// attached. +pub enum UProbeAttachLocation<'a> { + /// The location of the target function in the target object file. + Symbol(&'a str), + /// The location of the target function in the target object file, offset by + /// the given number of bytes. + SymbolOffset(&'a str, u64), + /// The offset in the target object file, in bytes. + AbsoluteOffset(u64), +} + +impl<'a> From<&'a str> for UProbeAttachLocation<'a> { + fn from(s: &'a str) -> Self { + Self::Symbol(s) + } +} + +impl From for UProbeAttachLocation<'static> { + fn from(offset: u64) -> Self { + Self::AbsoluteOffset(offset) + } +} + impl UProbe { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::KProbe; + /// Loads the program inside the kernel. pub fn load(&mut self) -> Result<(), ProgramError> { load_program(BPF_PROG_TYPE_KPROBE, &mut self.data) @@ -66,52 +91,47 @@ impl UProbe { /// /// Attaches the uprobe to the function `fn_name` defined in the `target`. /// If `offset` is non-zero, it is added to the address of the target - /// function. If `pid` is not `None`, the program executes only when the target - /// function is executed by the given `pid`. + /// function. If `pid` is not `None`, the program executes only when the + /// target function is executed by the given `pid`. /// /// The `target` argument can be an absolute path to a binary or library, or /// a library name (eg: `"libc"`). /// - /// If the program is an `uprobe`, it is attached to the *start* address of the target - /// function. Instead if the program is a `uretprobe`, it is attached to the return address of - /// the target function. + /// If the program is an `uprobe`, it is attached to the *start* address of + /// the target function. Instead if the program is a `uretprobe`, it is + /// attached to the return address of the target function. /// /// The returned value can be used to detach, see [UProbe::detach]. - pub fn attach>( + /// + /// The cookie is supported since kernel 5.15, and it is made available to + /// the eBPF program via the `bpf_get_attach_cookie()` helper. + pub fn attach<'loc, T: AsRef, Loc: Into>>( &mut self, - fn_name: Option<&str>, - offset: u64, + location: Loc, target: T, pid: Option, + cookie: Option, ) -> Result { - let path = resolve_attach_path(target.as_ref(), pid)?; - - let sym_offset = if let Some(fn_name) = fn_name { - resolve_symbol(&path, fn_name).map_err(|error| UProbeError::SymbolError { - symbol: fn_name.to_string(), - error: Box::new(error), - })? + let proc_map = pid.map(ProcMap::new).transpose()?; + let path = resolve_attach_path(target.as_ref(), proc_map.as_ref())?; + let (symbol, offset) = match location.into() { + UProbeAttachLocation::Symbol(s) => (Some(s), 0), + UProbeAttachLocation::SymbolOffset(s, offset) => (Some(s), offset), + UProbeAttachLocation::AbsoluteOffset(offset) => (None, offset), + }; + let offset = if let Some(symbol) = symbol { + let symbol_offset = + resolve_symbol(path, symbol).map_err(|error| UProbeError::SymbolError { + symbol: symbol.to_string(), + error: Box::new(error), + })?; + symbol_offset + offset } else { - 0 + offset }; - let fn_name = path.as_os_str(); - attach(&mut self.data, self.kind, fn_name, sym_offset + offset, pid) - } - - /// Detaches the program. - /// - /// See [UProbe::attach]. - pub fn detach(&mut self, link_id: UProbeLinkId) -> Result<(), ProgramError> { - self.data.links.remove(link_id) - } - - /// Takes ownership of the link referenced by the provided link_id. - /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. - pub fn take_link(&mut self, link_id: UProbeLinkId) -> Result { - self.data.take_link(link_id) + let path = path.as_os_str(); + attach(&mut self.data, self.kind, path, offset, pid, cookie) } /// Creates a program from a pinned entry on a bpffs. @@ -126,33 +146,38 @@ impl UProbe { } } -fn resolve_attach_path(target: &Path, pid: Option) -> Result, UProbeError> { - // Look up the path for the target. If it there is a pid, and the target is a library name - // that is in the process's memory map, use the path of that library. Otherwise, use the target as-is. - pid.and_then(|pid| { - find_lib_in_proc_maps(pid, target) - .map_err(|io_error| UProbeError::FileError { - filename: Path::new("/proc").join(pid.to_string()).join("maps"), - io_error, - }) - .map(|v| v.map(Cow::Owned)) - .transpose() - }) - .or_else(|| target.is_absolute().then(|| Ok(Cow::Borrowed(target)))) - .or_else(|| { - LD_SO_CACHE - .as_ref() - .map_err(|error| UProbeError::InvalidLdSoCache { - io_error: error.clone(), +fn resolve_attach_path<'a, 'b, 'c, T>( + target: &'a Path, + proc_map: Option<&'b ProcMap>, +) -> Result<&'c Path, UProbeError> +where + 'a: 'c, + 'b: 'c, + T: AsRef<[u8]>, +{ + proc_map + .and_then(|proc_map| { + proc_map + .find_library_path_by_name(target) + .map_err(|source| UProbeError::ProcMap { + pid: proc_map.pid, + source, + }) + .transpose() + }) + .or_else(|| target.is_absolute().then(|| Ok(target))) + .or_else(|| { + LD_SO_CACHE + .as_ref() + .map_err(|io_error| UProbeError::InvalidLdSoCache { io_error }) + .map(|cache| cache.resolve(target)) + .transpose() + }) + .unwrap_or_else(|| { + Err(UProbeError::InvalidTarget { + path: target.to_owned(), }) - .map(|cache| cache.resolve(target).map(Cow::Borrowed)) - .transpose() - }) - .unwrap_or_else(|| { - Err(UProbeError::InvalidTarget { - path: target.to_owned(), }) - }) } // Only run this test on linux with glibc because only in that configuration do we know that we'll @@ -166,36 +191,47 @@ fn resolve_attach_path(target: &Path, pid: Option) -> Result panic!("{err}: {source}"), + None => panic!("{err}"), + } + }); // Make sure we got a path that contains libc. - assert!(libc_path.contains("libc"), "libc_path: {}", libc_path); + assert_matches::assert_matches!( + libc_path.to_str(), + Some(libc_path) if libc_path.contains("libc"), + "libc_path: {}", libc_path.display() + ); + + // If we pass an absolute path that doesn't match anything in /proc//maps, we should fall + // back to the provided path instead of erroring out. Using a synthetic absolute path keeps the + // test hermetic. + let synthetic_absolute = Path::new("/tmp/.aya-test-resolve-attach-absolute"); + let absolute_path = + resolve_attach_path(synthetic_absolute, Some(&proc_map)).unwrap_or_else(|err| { + match err.source() { + Some(source) => panic!("{err}: {source}"), + None => panic!("{err}"), + } + }); + assert_eq!(absolute_path, synthetic_absolute); } define_link_wrapper!( - /// The link used by [UProbe] programs. UProbeLink, - /// The type returned by [UProbe::attach]. Can be passed to [UProbe::detach]. UProbeLinkId, PerfLinkInner, - PerfLinkIdInner + PerfLinkIdInner, + UProbe, ); -impl TryFrom for FdLink { - type Error = LinkError; - - fn try_from(value: UProbeLink) -> Result { - if let PerfLinkInner::FdLink(fd) = value.into_inner() { - Ok(fd) - } else { - Err(LinkError::InvalidLink) - } - } -} +impl_try_into_fdlink!(UProbeLink, PerfLinkInner); impl TryFrom for UProbeLink { type Error = LinkError; @@ -203,7 +239,7 @@ impl TryFrom for UProbeLink { fn try_from(fd_link: FdLink) -> Result { let info = bpf_link_get_info_by_fd(fd_link.fd.as_fd())?; if info.type_ == (bpf_link_type::BPF_LINK_TYPE_TRACING as u32) { - return Ok(Self::new(PerfLinkInner::FdLink(fd_link))); + return Ok(Self::new(PerfLinkInner::Fd(fd_link))); } Err(LinkError::InvalidLink) } @@ -215,24 +251,24 @@ pub enum UProbeError { /// There was an error parsing `/etc/ld.so.cache`. #[error("error reading `{}` file", LD_SO_CACHE_FILE)] InvalidLdSoCache { - /// the original [`io::Error`] + /// the original [`io::Error`]. #[source] - io_error: Arc, + io_error: &'static io::Error, }, /// The target program could not be found. #[error("could not resolve uprobe target `{path}`")] InvalidTarget { - /// path to target + /// path to target. path: PathBuf, }, /// There was an error resolving the target symbol. #[error("error resolving symbol")] SymbolError { - /// symbol name + /// symbol name. symbol: String, - /// the original error + /// the original error. #[source] error: Box, }, @@ -246,49 +282,200 @@ pub enum UProbeError { #[source] io_error: io::Error, }, + + /// There was en error fetching the memory map for `pid`. + #[error("error fetching libs for {pid}")] + ProcMap { + /// The pid. + pid: i32, + /// The [`ProcMapError`] that caused the error. + #[source] + source: ProcMapError, + }, } -fn proc_maps_libs(pid: pid_t) -> Result, io::Error> { - use std::os::unix::ffi::OsStrExt as _; +/// Error reading from /proc/pid/maps. +#[derive(Debug, Error)] +pub enum ProcMapError { + /// Unable to read /proc/pid/maps. + #[error(transparent)] + ReadFile(#[from] io::Error), - let maps_file = format!("/proc/{pid}/maps"); - let data = fs::read(maps_file)?; + /// Error parsing a line of /proc/pid/maps. + #[error("could not parse {:?}", OsStr::from_bytes(line))] + ParseLine { + /// The line that could not be parsed. + line: Vec, + }, +} - let libs = data - .split(|b| b == &b'\n') - .filter_map(|mut line| { - while let [stripped @ .., c] = line { - if c.is_ascii_whitespace() { - line = stripped; - continue; - } - break; +/// A entry that has been parsed from /proc/`pid`/maps. +/// +/// This contains information about a mapped portion of memory +/// for the process, ranging from address to address_end. +#[derive(Debug)] +struct ProcMapEntry<'a> { + #[cfg_attr(not(test), expect(dead_code))] + address: u64, + #[cfg_attr(not(test), expect(dead_code))] + address_end: u64, + #[cfg_attr(not(test), expect(dead_code))] + perms: &'a OsStr, + #[cfg_attr(not(test), expect(dead_code))] + offset: u64, + #[cfg_attr(not(test), expect(dead_code))] + dev: &'a OsStr, + #[cfg_attr(not(test), expect(dead_code))] + inode: u32, + path: Option<&'a Path>, +} + +impl<'a> ProcMapEntry<'a> { + fn parse(line: &'a [u8]) -> Result { + use std::os::unix::ffi::OsStrExt as _; + + let err = || ProcMapError::ParseLine { + line: line.to_vec(), + }; + + let mut parts = line + .split(|b| b.is_ascii_whitespace()) + .filter(|part| !part.is_empty()); + + let mut next = || parts.next().ok_or_else(err); + + let (start, end) = { + let addr = next()?; + let mut addr_parts = addr.split(|b| *b == b'-'); + let mut next = || { + addr_parts + .next() + .ok_or(()) + .and_then(|part| { + let s = + std::str::from_utf8(part).map_err(|std::str::Utf8Error { .. }| ())?; + let n = u64::from_str_radix(s, 16) + .map_err(|std::num::ParseIntError { .. }| ())?; + Ok(n) + }) + .map_err(|()| err()) + }; + let start = next()?; + let end = next()?; + if let Some(_part) = addr_parts.next() { + return Err(err()); } - let path = line.split(|b| b.is_ascii_whitespace()).last()?; - let path = Path::new(OsStr::from_bytes(path)); - path.is_absolute() - .then(|| { - path.file_name() - .map(|file_name| (file_name.to_owned(), path.to_owned())) - }) - .flatten() + (start, end) + }; + + let perms = next()?; + let perms = OsStr::from_bytes(perms); + let offset = next()?; + let offset = std::str::from_utf8(offset).map_err(|std::str::Utf8Error { .. }| err())?; + let offset = + u64::from_str_radix(offset, 16).map_err(|std::num::ParseIntError { .. }| err())?; + let dev = next()?; + let dev = OsStr::from_bytes(dev); + let inode = next()?; + let inode = std::str::from_utf8(inode).map_err(|std::str::Utf8Error { .. }| err())?; + let inode = inode + .parse() + .map_err(|std::num::ParseIntError { .. }| err())?; + + let path = parts + .next() + .and_then(|path| match path { + [b'[', .., b']'] => None, + path => { + let path = Path::new(OsStr::from_bytes(path)); + if !path.is_absolute() { + Some(Err(err())) + } else { + Some(Ok(path)) + } + } + }) + .transpose()?; + + if let Some(_part) = parts.next() { + return Err(err()); + } + + Ok(Self { + address: start, + address_end: end, + perms, + offset, + dev, + inode, + path, }) - .collect(); - Ok(libs) + } } -fn find_lib_in_proc_maps(pid: pid_t, lib: &Path) -> Result, io::Error> { - let libs = proc_maps_libs(pid)?; +/// The memory maps of a process. +/// +/// This is read from /proc/`pid`/maps. +/// +/// The information here may be used to resolve addresses to paths. +struct ProcMap { + pid: pid_t, + data: T, +} - let lib = lib.as_os_str(); - let lib = lib.strip_suffix(OsStr::new(".so")).unwrap_or(lib); +impl ProcMap> { + fn new(pid: pid_t) -> Result { + let filename = PathBuf::from(format!("/proc/{pid}/maps")); + let data = fs::read(&filename) + .map_err(|io_error| UProbeError::FileError { filename, io_error })?; + Ok(Self { pid, data }) + } +} - Ok(libs.into_iter().find_map(|(file_name, path)| { - file_name.strip_prefix(lib).and_then(|suffix| { - (suffix.starts_with(OsStr::new(".so")) || suffix.starts_with(OsStr::new("-"))) - .then_some(path) - }) - })) +impl> ProcMap { + fn libs(&self) -> impl Iterator, ProcMapError>> { + let Self { pid: _, data } = self; + + data.as_ref() + .split(|&b| b == b'\n') + // /proc//maps ends with '\n', so split() yields a trailing empty slice. + .filter(|line| !line.is_empty()) + .map(ProcMapEntry::parse) + } + + // Find the full path of a library by its name. + // + // This isn't part of the public API since it's really only useful for + // attaching uprobes. + fn find_library_path_by_name(&self, lib: &Path) -> Result, ProcMapError> { + let lib = lib.as_os_str(); + let lib = lib.strip_suffix(OsStr::new(".so")).unwrap_or(lib); + + for entry in self.libs() { + let ProcMapEntry { + address: _, + address_end: _, + perms: _, + offset: _, + dev: _, + inode: _, + path, + } = entry?; + if let Some(path) = path { + if let Some(filename) = path.file_name() { + if let Some(suffix) = filename.strip_prefix(lib) { + if suffix.is_empty() + || suffix.starts_with(OsStr::new(".so")) + || suffix.starts_with(OsStr::new("-")) + { + return Ok(Some(path)); + } + } + } + } + } + Ok(None) + } } #[derive(Debug)] @@ -329,7 +516,7 @@ impl LdSoCache { // Check for new format let mut buf = [0u8; LD_SO_CACHE_HEADER_NEW.len()]; cursor.read_exact(&mut buf)?; - let header = std::str::from_utf8(&buf).map_err(|_| { + let header = std::str::from_utf8(&buf).map_err(|std::str::Utf8Error { .. }| { io::Error::new(io::ErrorKind::InvalidData, "invalid ld.so.cache header") })?; @@ -340,7 +527,7 @@ impl LdSoCache { cursor.set_position(0); let mut buf = [0u8; LD_SO_CACHE_HEADER_OLD.len()]; cursor.read_exact(&mut buf)?; - let header = std::str::from_utf8(&buf).map_err(|_| { + let header = std::str::from_utf8(&buf).map_err(|std::str::Utf8Error { .. }| { io::Error::new(io::ErrorKind::InvalidData, "invalid ld.so.cache header") })?; @@ -377,12 +564,8 @@ impl LdSoCache { let read_str = |pos| { use std::os::unix::ffi::OsStrExt as _; OsStr::from_bytes( - unsafe { - CStr::from_ptr( - cursor.get_ref()[offset + pos..].as_ptr() as *const c_char - ) - } - .to_bytes(), + unsafe { CStr::from_ptr(cursor.get_ref()[offset + pos..].as_ptr().cast()) } + .to_bytes(), ) .to_owned() }; @@ -402,9 +585,12 @@ impl LdSoCache { } fn resolve(&self, lib: &Path) -> Option<&Path> { + let Self { entries } = self; + let lib = lib.as_os_str(); let lib = lib.strip_suffix(OsStr::new(".so")).unwrap_or(lib); - self.entries + + entries .iter() .find_map(|CacheEntry { key, value, _flags }| { key.strip_prefix(lib).and_then(|suffix| { @@ -434,20 +620,17 @@ enum ResolveSymbolError { SectionFileRangeNone(String, Result), #[error("failed to access debuglink file `{0}`: `{1}`")] - DebuglinkAccessError(String, io::Error), + DebuglinkAccessError(PathBuf, io::Error), #[error("symbol `{0}` not found, mismatched build IDs in main and debug files")] BuildIdMismatch(String), } -fn construct_debuglink_path( - filename: &[u8], - main_path: &Path, -) -> Result { +fn construct_debuglink_path(filename: &[u8], main_path: &Path) -> PathBuf { let filename_str = OsStr::from_bytes(filename); let debuglink_path = Path::new(filename_str); - let resolved_path = if debuglink_path.is_relative() { + if debuglink_path.is_relative() { // If the debug path is relative, resolve it against the parent of the main path main_path.parent().map_or_else( || PathBuf::from(debuglink_path), // Use original if no parent @@ -456,9 +639,7 @@ fn construct_debuglink_path( } else { // If the path is not relative, just use original PathBuf::from(debuglink_path) - }; - - Ok(resolved_path) + } } fn verify_build_ids<'a>( @@ -487,7 +668,7 @@ fn find_debug_path_in_object<'a>( symbol: &str, ) -> Result { match obj.gnu_debuglink() { - Ok(Some((filename, _))) => construct_debuglink_path(filename, main_path), + Ok(Some((filename, _))) => Ok(construct_debuglink_path(filename, main_path)), Ok(None) => Err(ResolveSymbolError::Unknown(symbol.to_string())), Err(err) => Err(ResolveSymbolError::Object(err)), } @@ -500,36 +681,32 @@ fn find_symbol_in_object<'a>(obj: &'a object::File<'a>, symbol: &str) -> Option< } fn resolve_symbol(path: &Path, symbol: &str) -> Result { - let data = fs::read(path)?; - let obj = object::read::File::parse(&*data)?; - - let mut debug_data = Vec::default(); - let mut debug_obj_keeper = None; - - let sym = find_symbol_in_object(&obj, symbol).map_or_else( - || { - // Only search in the debug object if the symbol was not found in the main object - let debug_path = find_debug_path_in_object(&obj, path, symbol)?; - debug_data = fs::read(&debug_path).map_err(|e| { - ResolveSymbolError::DebuglinkAccessError( - debug_path - .to_str() - .unwrap_or("Debuglink path missing") - .to_string(), - e, - ) - })?; - let debug_obj = object::read::File::parse(&*debug_data)?; + let data = MMap::map_copy_read_only(path)?; + let obj = object::read::File::parse(data.as_ref())?; + + if let Some(sym) = find_symbol_in_object(&obj, symbol) { + symbol_translated_address(&obj, sym, symbol) + } else { + // Only search in the debug object if the symbol was not found in the main object + let debug_path = find_debug_path_in_object(&obj, path, symbol)?; + let debug_data = MMap::map_copy_read_only(&debug_path) + .map_err(|e| ResolveSymbolError::DebuglinkAccessError(debug_path, e))?; + let debug_obj = object::read::File::parse(debug_data.as_ref())?; - verify_build_ids(&obj, &debug_obj, symbol)?; + verify_build_ids(&obj, &debug_obj, symbol)?; - debug_obj_keeper = Some(debug_obj); - find_symbol_in_object(debug_obj_keeper.as_ref().unwrap(), symbol) - .ok_or_else(|| ResolveSymbolError::Unknown(symbol.to_string())) - }, - Ok, - )?; + let sym = find_symbol_in_object(&debug_obj, symbol) + .ok_or_else(|| ResolveSymbolError::Unknown(symbol.to_string()))?; + symbol_translated_address(&debug_obj, sym, symbol) + } +} + +fn symbol_translated_address( + obj: &object::File<'_>, + sym: Symbol<'_, '_>, + symbol_name: &str, +) -> Result { let needs_addr_translation = matches!( obj.kind(), object::ObjectKind::Dynamic | object::ObjectKind::Executable @@ -539,11 +716,11 @@ fn resolve_symbol(path: &Path, symbol: &str) -> Result } else { let index = sym .section_index() - .ok_or_else(|| ResolveSymbolError::NotInSection(symbol.to_string()))?; + .ok_or_else(|| ResolveSymbolError::NotInSection(symbol_name.to_string()))?; let section = obj.section_by_index(index)?; let (offset, _size) = section.file_range().ok_or_else(|| { ResolveSymbolError::SectionFileRangeNone( - symbol.to_string(), + symbol_name.to_string(), section.name().map(str::to_owned), ) })?; @@ -553,8 +730,8 @@ fn resolve_symbol(path: &Path, symbol: &str) -> Result #[cfg(test)] mod tests { - - use object::{write::SectionKind, Architecture, BinaryFormat, Endianness}; + use assert_matches::assert_matches; + use object::{Architecture, BinaryFormat, Endianness, write::SectionKind}; use super::*; @@ -564,7 +741,7 @@ mod tests { let main_path = Path::new("/usr/lib/main_binary"); let expected = Path::new("/usr/lib/debug_info"); - let result = construct_debuglink_path(filename, main_path).unwrap(); + let result = construct_debuglink_path(filename, main_path); assert_eq!( result, expected, "The debug path should resolve relative to the main path's parent" @@ -577,7 +754,7 @@ mod tests { let main_path = Path::new("main_binary"); let expected = Path::new("debug_info"); - let result = construct_debuglink_path(filename, main_path).unwrap(); + let result = construct_debuglink_path(filename, main_path); assert_eq!( result, expected, "The debug path should be the original path as there is no parent" @@ -590,7 +767,7 @@ mod tests { let main_path = Path::new("/usr/lib/main_binary"); let expected = Path::new("/absolute/path/to/debug_info"); - let result = construct_debuglink_path(filename, main_path).unwrap(); + let result = construct_debuglink_path(filename, main_path); assert_eq!( result, expected, "The debug path should be the same as the input absolute path" @@ -701,7 +878,7 @@ mod tests { let align_bytes = aligned_slice(&mut debug_bytes); let debug_obj = object::File::parse(&*align_bytes).expect("got debug obj"); - assert!(verify_build_ids(&main_obj, &debug_obj, "symbol_name").is_ok()); + verify_build_ids(&main_obj, &debug_obj, "symbol_name").unwrap(); } #[test] @@ -720,4 +897,140 @@ mod tests { Err(ResolveSymbolError::BuildIdMismatch(_)) )); } + + #[test] + fn test_parse_proc_map_entry_shared_lib() { + assert_matches!( + ProcMapEntry::parse(b"7ffd6fbea000-7ffd6fbec000 r-xp 00000000 00:00 0 [vdso]"), + Ok(ProcMapEntry { + address: 0x7ffd6fbea000, + address_end: 0x7ffd6fbec000, + perms, + offset: 0, + dev, + inode: 0, + path: None, + }) if perms == "r-xp" && dev == "00:00" + ); + } + + #[test] + fn test_parse_proc_map_entry_absolute_path() { + assert_matches!( + ProcMapEntry::parse(b"7f1bca83a000-7f1bca83c000 rw-p 00036000 fd:01 2895508 /usr/lib64/ld-linux-x86-64.so.2"), + Ok(ProcMapEntry { + address: 0x7f1bca83a000, + address_end: 0x7f1bca83c000, + perms, + offset: 0x00036000, + dev, + inode: 2895508, + path: Some(path), + }) if perms == "rw-p" && dev == "fd:01" && path == Path::new("/usr/lib64/ld-linux-x86-64.so.2") + ); + } + + #[test] + fn test_parse_proc_map_entry_all_zeros() { + assert_matches!( + ProcMapEntry::parse(b"7f1bca5f9000-7f1bca601000 rw-p 00000000 00:00 0"), + Ok(ProcMapEntry { + address: 0x7f1bca5f9000, + address_end: 0x7f1bca601000, + perms, + offset: 0, + dev, + inode: 0, + path: None, + }) if perms == "rw-p" && dev == "00:00" + ); + } + + #[test] + fn test_parse_proc_map_entry_parse_errors() { + assert_matches!( + ProcMapEntry::parse(b"zzzz-7ffd6fbea000 r-xp 00000000 00:00 0 [vdso]"), + Err(ProcMapError::ParseLine { line: _ }) + ); + + assert_matches!( + ProcMapEntry::parse(b"zzzz-7ffd6fbea000 r-xp 00000000 00:00 0 [vdso]"), + Err(ProcMapError::ParseLine { line: _ }) + ); + + assert_matches!( + ProcMapEntry::parse(b"7f1bca5f9000-7f1bca601000 r-xp zzzz 00:00 0 [vdso]"), + Err(ProcMapError::ParseLine { line: _ }) + ); + + assert_matches!( + ProcMapEntry::parse(b"7f1bca5f9000-7f1bca601000 r-xp 00000000 00:00 zzzz [vdso]"), + Err(ProcMapError::ParseLine { line: _ }) + ); + + assert_matches!( + ProcMapEntry::parse(b"7f1bca5f90007ffd6fbea000 r-xp 00000000 00:00 0 [vdso]"), + Err(ProcMapError::ParseLine { line: _ }) + ); + + assert_matches!( + ProcMapEntry::parse(b"7f1bca5f9000-7f1bca601000 r-xp 00000000"), + Err(ProcMapError::ParseLine { line: _ }) + ); + + assert_matches!( + ProcMapEntry::parse(b"7f1bca5f9000-7f1bca601000-deadbeef rw-p 00000000 00:00 0"), + Err(ProcMapError::ParseLine { line: _ }) + ); + + assert_matches!( + ProcMapEntry::parse(b"7f1bca5f9000-7f1bca601000 rw-p 00000000 00:00 0 deadbeef"), + Err(ProcMapError::ParseLine { line: _ }) + ); + } + + #[test] + fn test_proc_map_find_lib_by_name() { + let proc_map_libs = ProcMap { + pid: 0xdead, + data: b"7fc4a9800000-7fc4a98ad000 r--p 00000000 00:24 18147308 /usr/lib64/libcrypto.so.3.0.9", + }; + + assert_matches!( + proc_map_libs.find_library_path_by_name(Path::new("libcrypto.so.3.0.9")), + Ok(Some(path)) if path == Path::new("/usr/lib64/libcrypto.so.3.0.9") + ); + } + + #[test] + fn test_proc_map_find_lib_by_partial_name() { + let proc_map_libs = ProcMap { + pid: 0xdead, + data: b"7fc4a9800000-7fc4a98ad000 r--p 00000000 00:24 18147308 /usr/lib64/libcrypto.so.3.0.9", + }; + + assert_matches!( + proc_map_libs.find_library_path_by_name(Path::new("libcrypto")), + Ok(Some(path)) if path == Path::new("/usr/lib64/libcrypto.so.3.0.9") + ); + } + + #[test] + fn test_proc_map_with_multiple_lib_entries() { + let proc_map_libs = ProcMap { + pid: 0xdead, + data: br#" +7f372868000-7f3722869000 r--p 00000000 00:24 18097875 /usr/lib64/ld-linux-x86-64.so.2 +7f3722869000-7f372288f000 r-xp 00001000 00:24 18097875 /usr/lib64/ld-linux-x86-64.so.2 +7f372288f000-7f3722899000 r--p 00027000 00:24 18097875 /usr/lib64/ld-linux-x86-64.so.2 +7f3722899000-7f372289b000 r--p 00030000 00:24 18097875 /usr/lib64/ld-linux-x86-64.so.2 +7f372289b000-7f372289d000 rw-p 00032000 00:24 18097875 /usr/lib64/ld-linux-x86-64.so.2 +"#, + }; + + assert_matches!( + proc_map_libs.find_library_path_by_name(Path::new("ld-linux-x86-64.so.2")), + Ok(Some(path)) if path == Path::new("/usr/lib64/ld-linux-x86-64.so.2") + ); + } } diff --git a/aya/src/programs/utils.rs b/aya/src/programs/utils.rs index 0930e62b..f9119617 100644 --- a/aya/src/programs/utils.rs +++ b/aya/src/programs/utils.rs @@ -2,15 +2,16 @@ use std::{ ffi::CStr, fs::File, - io::{self, BufRead, BufReader}, + io::{self, BufRead as _, BufReader}, os::fd::{AsFd as _, AsRawFd as _, BorrowedFd}, path::Path, + sync::LazyLock, time::{Duration, SystemTime, UNIX_EPOCH}, }; use crate::{ programs::{FdLink, Link, ProgramData, ProgramError}, - sys::{bpf_raw_tracepoint_open, SyscallError}, + sys::{SyscallError, bpf_raw_tracepoint_open}, }; /// Attaches the program to a raw tracepoint. @@ -20,42 +21,41 @@ pub(crate) fn attach_raw_tracepoint>( ) -> Result { let prog_fd = program_data.fd()?; let prog_fd = prog_fd.as_fd(); - let pfd = - bpf_raw_tracepoint_open(tp_name, prog_fd).map_err(|(_code, io_error)| SyscallError { - call: "bpf_raw_tracepoint_open", - io_error, - })?; + let pfd = bpf_raw_tracepoint_open(tp_name, prog_fd).map_err(|io_error| SyscallError { + call: "bpf_raw_tracepoint_open", + io_error, + })?; program_data.links.insert(FdLink::new(pfd).into()) } /// Find tracefs filesystem path. pub(crate) fn find_tracefs_path() -> Result<&'static Path, ProgramError> { - lazy_static::lazy_static! { - static ref TRACE_FS: Option<&'static Path> = { - let known_mounts = [ - Path::new("/sys/kernel/tracing"), - Path::new("/sys/kernel/debug/tracing"), - ]; - - for mount in known_mounts { - // Check that the mount point exists and is not empty - // Documented here: (https://www.kernel.org/doc/Documentation/trace/ftrace.txt) - // In some cases, tracefs will only mount at /sys/kernel/debug/tracing - // but, the kernel will still create the directory /sys/kernel/tracing. - // The user may be expected to manually mount the directory in order for it to - // exist in /sys/kernel/tracing according to the documentation. - if mount.exists() && mount.read_dir().ok()?.next().is_some() { - return Some(mount); + static TRACE_FS: LazyLock> = LazyLock::new(|| { + [ + Path::new("/sys/kernel/tracing"), + Path::new("/sys/kernel/debug/tracing"), + ] + .into_iter() + .find(|&mount| { + // Check that the mount point exists and is not empty + // Documented here: (https://www.kernel.org/doc/Documentation/trace/ftrace.txt) + // In some cases, tracefs will only mount at /sys/kernel/debug/tracing + // but, the kernel will still create the directory /sys/kernel/tracing. + // The user may be expected to manually mount the directory in order for it to + // exist in /sys/kernel/tracing according to the documentation. + mount.exists() + && match mount.read_dir() { + Ok(mut entries) => entries.next().is_some(), + Err(io::Error { .. }) => false, } - } - None - }; - } + }) + }); TRACE_FS .as_deref() - .ok_or_else(|| io::Error::new(io::ErrorKind::Other, "tracefs not found").into()) + .ok_or_else(|| io::Error::other("tracefs not found")) + .map_err(Into::into) } /// The time at which the system is booted. @@ -65,8 +65,7 @@ pub(crate) fn boot_time() -> SystemTime { assert_eq!( unsafe { libc::clock_gettime(clock_id, &mut time) }, 0, - "clock_gettime({}, _)", - clock_id + "clock_gettime({clock_id}, _)" ); let libc::timespec { tv_sec, tv_nsec } = time; diff --git a/aya/src/programs/xdp.rs b/aya/src/programs/xdp.rs index 5d49f4f1..8ba628f9 100644 --- a/aya/src/programs/xdp.rs +++ b/aya/src/programs/xdp.rs @@ -3,41 +3,38 @@ use std::{ ffi::CString, hash::Hash, - io, os::fd::{AsFd as _, AsRawFd as _, BorrowedFd, RawFd}, path::Path, }; -use libc::if_nametoindex; +use aya_obj::{ + generated::{ + XDP_FLAGS_DRV_MODE, XDP_FLAGS_HW_MODE, XDP_FLAGS_REPLACE, XDP_FLAGS_SKB_MODE, + XDP_FLAGS_UPDATE_IF_NOEXIST, bpf_link_type, bpf_prog_type, + }, + programs::XdpAttachType, +}; use thiserror::Error; use crate::{ - generated::{ - bpf_link_type, bpf_prog_type, XDP_FLAGS_DRV_MODE, XDP_FLAGS_HW_MODE, XDP_FLAGS_REPLACE, - XDP_FLAGS_SKB_MODE, XDP_FLAGS_UPDATE_IF_NOEXIST, - }, - obj::programs::XdpAttachType, + VerifierLogLevel, programs::{ - define_link_wrapper, load_program, FdLink, Link, LinkError, ProgramData, ProgramError, + FdLink, Link, LinkError, ProgramData, ProgramError, ProgramType, define_link_wrapper, + id_as_key, impl_try_into_fdlink, load_program, }, sys::{ - bpf_link_create, bpf_link_get_info_by_fd, bpf_link_update, netlink_set_xdp_fd, LinkTarget, - SyscallError, + LinkTarget, NetlinkError, SyscallError, bpf_link_create, bpf_link_get_info_by_fd, + bpf_link_update, netlink_set_xdp_fd, }, util::KernelVersion, - VerifierLogLevel, }; -/// The type returned when attaching an [`Xdp`] program fails on kernels `< 5.9`. +/// An error that occurred while working with an XDP program. #[derive(Debug, Error)] pub enum XdpError { - /// netlink error while attaching XDP program - #[error("netlink error while attaching XDP program")] - NetlinkError { - /// the [`io::Error`] from the netlink call - #[source] - io_error: io::Error, - }, + /// A netlink error occurred. + #[error(transparent)] + NetlinkError(#[from] NetlinkError), } bitflags::bitflags! { @@ -86,6 +83,9 @@ pub struct Xdp { } impl Xdp { + /// The type of the program according to the kernel. + pub const PROGRAM_TYPE: ProgramType = ProgramType::Xdp; + /// Loads the program inside the kernel. pub fn load(&mut self) -> Result<(), ProgramError> { self.data.expected_attach_type = Some(self.attach_type.into()); @@ -101,14 +101,12 @@ impl Xdp { /// If the given `interface` does not exist /// [`ProgramError::UnknownInterface`] is returned. /// - /// When attaching fails, [`ProgramError::SyscallError`] is returned for - /// kernels `>= 5.9.0`, and instead - /// [`XdpError::NetlinkError`] is returned for older - /// kernels. + /// When `bpf_link_create` is unavailable or rejects the request, the call + /// transparently falls back to the legacy netlink-based attach path. pub fn attach(&mut self, interface: &str, flags: XdpFlags) -> Result { // TODO: avoid this unwrap by adding a new error variant. let c_interface = CString::new(interface).unwrap(); - let if_index = unsafe { if_nametoindex(c_interface.as_ptr()) }; + let if_index = unsafe { libc::if_nametoindex(c_interface.as_ptr()) }; if if_index == 0 { return Err(ProgramError::UnknownInterface { name: interface.to_string(), @@ -123,10 +121,8 @@ impl Xdp { /// /// # Errors /// - /// When attaching fails, [`ProgramError::SyscallError`] is returned for - /// kernels `>= 5.9.0`, and instead - /// [`XdpError::NetlinkError`] is returned for older - /// kernels. + /// When `bpf_link_create` is unavailable or rejects the request, the call + /// transparently falls back to the legacy netlink-based attach path. pub fn attach_to_if_index( &mut self, if_index: u32, @@ -135,43 +131,45 @@ impl Xdp { let prog_fd = self.fd()?; let prog_fd = prog_fd.as_fd(); - if KernelVersion::current().unwrap() >= KernelVersion::new(5, 9, 0) { - // Unwrap safety: the function starts with `self.fd()?` that will succeed if and only - // if the program has been loaded, i.e. there is an fd. We get one by: - // - Using `Xdp::from_pin` that sets `expected_attach_type` - // - Calling `Xdp::attach` that sets `expected_attach_type`, as geting an `Xdp` - // instance trhough `Xdp:try_from(Program)` does not set any fd. - // So, in all cases where we have an fd, we have an expected_attach_type. Thus, if we - // reach this point, expected_attach_type is guaranteed to be Some(_). - let attach_type = self.data.expected_attach_type.unwrap(); - let link_fd = bpf_link_create( - prog_fd, - LinkTarget::IfIndex(if_index), - attach_type, - None, - flags.bits(), - ) - .map_err(|(_, io_error)| SyscallError { - call: "bpf_link_create", - io_error, - })?; - self.data - .links - .insert(XdpLink::new(XdpLinkInner::FdLink(FdLink::new(link_fd)))) - } else { - let if_index = if_index as i32; - unsafe { netlink_set_xdp_fd(if_index, Some(prog_fd), None, flags.bits()) } - .map_err(|io_error| XdpError::NetlinkError { io_error })?; - - let prog_fd = prog_fd.as_raw_fd(); - self.data - .links - .insert(XdpLink::new(XdpLinkInner::NlLink(NlLink { + // Unwrap safety: the function starts with `self.fd()?` that will succeed if and only + // if the program has been loaded, i.e. there is an fd. We get one by: + // - Using `Xdp::from_pin` that sets `expected_attach_type` + // - Calling `Xdp::attach` that sets `expected_attach_type`, as geting an `Xdp` + // instance through `Xdp:try_from(Program)` does not set any fd. + // So, in all cases where we have an fd, we have an expected_attach_type. Thus, if we + // reach this point, expected_attach_type is guaranteed to be Some(_). + let attach_type = self.data.expected_attach_type.unwrap(); + let link = match bpf_link_create( + prog_fd, + LinkTarget::IfIndex(if_index), + attach_type, + flags.bits(), + None, + ) { + Ok(link_fd) => XdpLinkInner::Fd(FdLink::new(link_fd)), + Err(io_error) => { + if io_error.raw_os_error() != Some(libc::EINVAL) { + return Err(ProgramError::SyscallError(SyscallError { + call: "bpf_link_create", + io_error, + })); + } + + // Fall back to netlink-based attachment. + + let if_index = if_index as i32; + unsafe { netlink_set_xdp_fd(if_index, Some(prog_fd), None, flags.bits()) } + .map_err(XdpError::NetlinkError)?; + + let prog_fd = prog_fd.as_raw_fd(); + XdpLinkInner::NlLink(NlLink { if_index, prog_fd, flags, - }))) - } + }) + } + }; + self.data.links.insert(XdpLink::new(link)) } /// Creates a program from a pinned entry on a bpffs. @@ -189,21 +187,6 @@ impl Xdp { Ok(Self { data, attach_type }) } - /// Detaches the program. - /// - /// See [Xdp::attach]. - pub fn detach(&mut self, link_id: XdpLinkId) -> Result<(), ProgramError> { - self.data.links.remove(link_id) - } - - /// Takes ownership of the link referenced by the provided link_id. - /// - /// The link will be detached on `Drop` and the caller is now responsible - /// for managing its lifetime. - pub fn take_link(&mut self, link_id: XdpLinkId) -> Result { - self.data.take_link(link_id) - } - /// Atomically replaces the program referenced by the provided link. /// /// Ownership of the link will transfer to this program. @@ -211,9 +194,9 @@ impl Xdp { let prog_fd = self.fd()?; let prog_fd = prog_fd.as_fd(); match link.into_inner() { - XdpLinkInner::FdLink(fd_link) => { + XdpLinkInner::Fd(fd_link) => { let link_fd = fd_link.fd; - bpf_link_update(link_fd.as_fd(), prog_fd, None, 0).map_err(|(_, io_error)| { + bpf_link_update(link_fd.as_fd(), prog_fd, None, 0).map_err(|io_error| { SyscallError { call: "bpf_link_update", io_error, @@ -222,7 +205,7 @@ impl Xdp { self.data .links - .insert(XdpLink::new(XdpLinkInner::FdLink(FdLink::new(link_fd)))) + .insert(XdpLink::new(XdpLinkInner::Fd(FdLink::new(link_fd)))) } XdpLinkInner::NlLink(nl_link) => { let if_index = nl_link.if_index; @@ -238,7 +221,7 @@ impl Xdp { Some(old_prog_fd), replace_flags.bits(), ) - .map_err(|io_error| XdpError::NetlinkError { io_error })?; + .map_err(XdpError::NetlinkError)?; } let prog_fd = prog_fd.as_raw_fd(); @@ -261,26 +244,32 @@ pub(crate) struct NlLink { flags: XdpFlags, } +#[derive(Debug, Hash, Eq, PartialEq)] +pub(crate) struct NlLinkId(i32, RawFd); + impl Link for NlLink { - type Id = (i32, RawFd); + type Id = NlLinkId; fn id(&self) -> Self::Id { - (self.if_index, self.prog_fd) + NlLinkId(self.if_index, self.prog_fd) } fn detach(self) -> Result<(), ProgramError> { - let flags = if KernelVersion::current().unwrap() >= KernelVersion::new(5, 7, 0) { + let flags = if KernelVersion::at_least(5, 7, 0) { self.flags.bits() | XDP_FLAGS_REPLACE } else { self.flags.bits() }; // SAFETY: TODO(https://github.com/aya-rs/aya/issues/612): make this safe by not holding `RawFd`s. let prog_fd = unsafe { BorrowedFd::borrow_raw(self.prog_fd) }; - let _ = unsafe { netlink_set_xdp_fd(self.if_index, None, Some(prog_fd), flags) }; + let _: Result<(), NetlinkError> = + unsafe { netlink_set_xdp_fd(self.if_index, None, Some(prog_fd), flags) }; Ok(()) } } +id_as_key!(NlLink, NlLinkId); + #[derive(Debug, Hash, Eq, PartialEq)] pub(crate) enum XdpLinkIdInner { FdLinkId(::Id), @@ -289,7 +278,7 @@ pub(crate) enum XdpLinkIdInner { #[derive(Debug)] pub(crate) enum XdpLinkInner { - FdLink(FdLink), + Fd(FdLink), NlLink(NlLink), } @@ -298,30 +287,22 @@ impl Link for XdpLinkInner { fn id(&self) -> Self::Id { match self { - Self::FdLink(link) => XdpLinkIdInner::FdLinkId(link.id()), + Self::Fd(link) => XdpLinkIdInner::FdLinkId(link.id()), Self::NlLink(link) => XdpLinkIdInner::NlLinkId(link.id()), } } fn detach(self) -> Result<(), ProgramError> { match self { - Self::FdLink(link) => link.detach(), + Self::Fd(link) => link.detach(), Self::NlLink(link) => link.detach(), } } } -impl TryFrom for FdLink { - type Error = LinkError; +id_as_key!(XdpLinkInner, XdpLinkIdInner); - fn try_from(value: XdpLink) -> Result { - if let XdpLinkInner::FdLink(fd) = value.into_inner() { - Ok(fd) - } else { - Err(LinkError::InvalidLink) - } - } -} +impl_try_into_fdlink!(XdpLink, XdpLinkInner); impl TryFrom for XdpLink { type Error = LinkError; @@ -330,17 +311,10 @@ impl TryFrom for XdpLink { // unwrap of fd_link.fd will not panic since it's only None when being dropped. let info = bpf_link_get_info_by_fd(fd_link.fd.as_fd())?; if info.type_ == (bpf_link_type::BPF_LINK_TYPE_XDP as u32) { - return Ok(Self::new(XdpLinkInner::FdLink(fd_link))); + return Ok(Self::new(XdpLinkInner::Fd(fd_link))); } Err(LinkError::InvalidLink) } } -define_link_wrapper!( - /// The link used by [Xdp] programs. - XdpLink, - /// The type returned by [Xdp::attach]. Can be passed to [Xdp::detach]. - XdpLinkId, - XdpLinkInner, - XdpLinkIdInner -); +define_link_wrapper!(XdpLink, XdpLinkId, XdpLinkInner, XdpLinkIdInner, Xdp); diff --git a/aya/src/sys/bpf.rs b/aya/src/sys/bpf.rs index 1ae1dc95..7a6a0ef2 100644 --- a/aya/src/sys/bpf.rs +++ b/aya/src/sys/bpf.rs @@ -1,45 +1,57 @@ use std::{ cmp, - ffi::{c_char, CStr, CString}, - io, iter, + ffi::{CStr, CString, c_char}, + fmt, io, iter, mem::{self, MaybeUninit}, - os::fd::{AsFd as _, AsRawFd as _, BorrowedFd, FromRawFd as _, OwnedFd, RawFd}, - slice, + os::fd::{AsFd as _, AsRawFd as _, BorrowedFd, FromRawFd as _, RawFd}, + ptr, }; use assert_matches::assert_matches; -use libc::{ENOENT, ENOSPC}; -use obj::{ - btf::{BtfEnum64, Enum64}, - maps::{bpf_map_def, LegacyMap}, +use aya_obj::{ EbpfSectionKind, VerifierLog, + btf::{ + BtfEnum64, BtfParam, BtfType, DataSec, DataSecEntry, DeclTag, Enum64, Float, Func, + FuncLinkage, FuncProto, FuncSecInfo, Int, IntEncoding, LineSecInfo, Ptr, TypeTag, Var, + VarLinkage, + }, + generated::{ + BPF_ADD, BPF_ALU64, BPF_CALL, BPF_DW, BPF_EXIT, BPF_F_REPLACE, BPF_IMM, BPF_JMP, BPF_K, + BPF_LD, BPF_MEM, BPF_MOV, BPF_PSEUDO_MAP_VALUE, BPF_ST, BPF_X, bpf_attach_type, bpf_attr, + bpf_btf_info, bpf_cmd, bpf_func_id::*, bpf_insn, bpf_link_info, bpf_map_info, bpf_map_type, + bpf_prog_info, bpf_prog_type, bpf_stats_type, + }, + maps::{LegacyMap, bpf_map_def}, }; +use libc::{ + EBADF, ENOENT, ENOSPC, EPERM, RLIM_INFINITY, RLIMIT_MEMLOCK, getrlimit, rlim_t, rlimit, + setrlimit, +}; +use log::warn; use crate::{ - generated::{ - bpf_attach_type, bpf_attr, bpf_btf_info, bpf_cmd, bpf_insn, bpf_link_info, bpf_map_info, - bpf_map_type, bpf_prog_info, bpf_prog_type, BPF_F_REPLACE, - }, + Btf, Pod, VerifierLogLevel, maps::{MapData, PerCpuValues}, - obj::{ - self, - btf::{ - BtfParam, BtfType, DataSec, DataSecEntry, DeclTag, Float, Func, FuncLinkage, FuncProto, - FuncSecInfo, Int, IntEncoding, LineSecInfo, Ptr, TypeTag, Var, VarLinkage, - }, - copy_instructions, - }, - sys::{syscall, SysResult, Syscall, SyscallError}, + programs::{LsmAttachType, ProgramType, links::LinkRef}, + sys::{Syscall, SyscallError, syscall}, util::KernelVersion, - Btf, Pod, VerifierLogLevel, BPF_OBJ_NAME_LEN, }; +pub(crate) fn bpf_create_iter(link_fd: BorrowedFd<'_>) -> io::Result { + let mut attr = unsafe { mem::zeroed::() }; + + let u = unsafe { &mut attr.iter_create }; + u.link_fd = link_fd.as_raw_fd() as u32; + + // SAFETY: BPF_ITER_CREATE returns a new file descriptor. + unsafe { fd_sys_bpf(bpf_cmd::BPF_ITER_CREATE, &mut attr) } +} + pub(crate) fn bpf_create_map( name: &CStr, - def: &obj::Map, + def: &aya_obj::Map, btf_fd: Option>, - kernel_version: KernelVersion, -) -> SysResult { +) -> io::Result { let mut attr = unsafe { mem::zeroed::() }; let u = unsafe { &mut attr.__bindgen_anon_1 }; @@ -49,7 +61,7 @@ pub(crate) fn bpf_create_map( u.max_entries = def.max_entries(); u.map_flags = def.map_flags(); - if let obj::Map::Btf(m) = def { + if let aya_obj::Map::Btf(m) = def { use bpf_map_type::*; // Mimic https://github.com/libbpf/libbpf/issues/355 @@ -85,26 +97,26 @@ pub(crate) fn bpf_create_map( // https://github.com/torvalds/linux/commit/ad5b177bd73f5107d97c36f56395c4281fb6f089 // The map name was added as a parameter in kernel 4.15+ so we skip adding it on // older kernels for compatibility - if kernel_version >= KernelVersion::new(4, 15, 0) { - // u.map_name is 16 bytes max and must be NULL terminated - let name_len = cmp::min(name.to_bytes().len(), BPF_OBJ_NAME_LEN - 1); - u.map_name[..name_len] - .copy_from_slice(unsafe { slice::from_raw_parts(name.as_ptr(), name_len) }); + if KernelVersion::at_least(4, 15, 0) { + let name_bytes = name.to_bytes(); + let len = cmp::min(name_bytes.len(), u.map_name.len() - 1); // Ensure NULL termination. + u.map_name[..len] + .copy_from_slice(unsafe { mem::transmute::<&[u8], &[c_char]>(&name_bytes[..len]) }); } - // SAFETY: BPF_MAP_CREATE returns a new file descriptor. - unsafe { fd_sys_bpf(bpf_cmd::BPF_MAP_CREATE, &mut attr) } + bpf_map_create(&mut attr) } -pub(crate) fn bpf_pin_object(fd: BorrowedFd<'_>, path: &CStr) -> SysResult { +pub(crate) fn bpf_pin_object(fd: BorrowedFd<'_>, path: &CStr) -> io::Result<()> { let mut attr = unsafe { mem::zeroed::() }; let u = unsafe { &mut attr.__bindgen_anon_4 }; u.bpf_fd = fd.as_raw_fd() as u32; u.pathname = path.as_ptr() as u64; - sys_bpf(bpf_cmd::BPF_OBJ_PIN, &mut attr) + unit_sys_bpf(bpf_cmd::BPF_OBJ_PIN, &mut attr) } -pub(crate) fn bpf_get_object(path: &CStr) -> SysResult { +/// Introduced in kernel v4.4. +pub(crate) fn bpf_get_object(path: &CStr) -> io::Result { let mut attr = unsafe { mem::zeroed::() }; let u = unsafe { &mut attr.__bindgen_anon_4 }; u.pathname = path.as_ptr() as u64; @@ -134,19 +146,16 @@ pub(crate) fn bpf_load_program( aya_attr: &EbpfLoadProgramAttrs<'_>, log_buf: &mut [u8], verifier_log_level: VerifierLogLevel, -) -> SysResult { +) -> io::Result { let mut attr = unsafe { mem::zeroed::() }; let u = unsafe { &mut attr.__bindgen_anon_3 }; - if let Some(prog_name) = &aya_attr.name { - let mut name: [c_char; 16] = [0; 16]; - let name_bytes = prog_name.to_bytes(); - let len = cmp::min(name.len(), name_bytes.len()); - name[..len].copy_from_slice(unsafe { - slice::from_raw_parts(name_bytes.as_ptr() as *const c_char, len) - }); - u.prog_name = name; + if let Some(name) = &aya_attr.name { + let name_bytes = name.to_bytes(); + let len = cmp::min(name_bytes.len(), u.prog_name.len() - 1); // Ensure NULL termination. + u.prog_name[..len] + .copy_from_slice(unsafe { mem::transmute::<&[u8], &[c_char]>(&name_bytes[..len]) }); } u.prog_flags = aya_attr.flags; @@ -167,12 +176,12 @@ pub(crate) fn bpf_load_program( if let Some(btf_fd) = aya_attr.prog_btf_fd { u.prog_btf_fd = btf_fd.as_raw_fd() as u32; if aya_attr.line_info_rec_size > 0 { - u.line_info = line_info_buf.as_ptr() as *const _ as u64; + u.line_info = line_info_buf.as_ptr() as u64; u.line_info_cnt = aya_attr.line_info.len() as u32; u.line_info_rec_size = aya_attr.line_info_rec_size as u32; } if aya_attr.func_info_rec_size > 0 { - u.func_info = func_info_buf.as_ptr() as *const _ as u64; + u.func_info = func_info_buf.as_ptr() as u64; u.func_info_cnt = aya_attr.func_info.len() as u32; u.func_info_rec_size = aya_attr.func_info_rec_size as u32; } @@ -183,7 +192,7 @@ pub(crate) fn bpf_load_program( u.log_size = log_buf.len() as u32; } if let Some(v) = aya_attr.attach_btf_obj_fd { - u.__bindgen_anon_1.attach_btf_obj_fd = v.as_raw_fd() as _; + u.__bindgen_anon_1.attach_btf_obj_fd = v.as_raw_fd() as u32; } if let Some(v) = aya_attr.attach_prog_fd { u.__bindgen_anon_1.attach_prog_fd = v.as_raw_fd() as u32; @@ -200,21 +209,21 @@ fn lookup( key: Option<&K>, flags: u64, cmd: bpf_cmd, -) -> SysResult> { +) -> io::Result> { let mut attr = unsafe { mem::zeroed::() }; let mut value = MaybeUninit::zeroed(); let u = unsafe { &mut attr.__bindgen_anon_2 }; u.map_fd = fd.as_raw_fd() as u32; if let Some(key) = key { - u.key = key as *const _ as u64; + u.key = ptr::from_ref(key) as u64; } - u.__bindgen_anon_1.value = &mut value as *mut _ as u64; + u.__bindgen_anon_1.value = ptr::from_mut(&mut value) as u64; u.flags = flags; - match sys_bpf(cmd, &mut attr) { - Ok(_) => Ok(Some(unsafe { value.assume_init() })), - Err((_, io_error)) if io_error.raw_os_error() == Some(ENOENT) => Ok(None), + match unit_sys_bpf(cmd, &mut attr) { + Ok(()) => Ok(Some(unsafe { value.assume_init() })), + Err(io_error) if io_error.raw_os_error() == Some(ENOENT) => Ok(None), Err(e) => Err(e), } } @@ -223,7 +232,7 @@ pub(crate) fn bpf_map_lookup_elem( fd: BorrowedFd<'_>, key: &K, flags: u64, -) -> SysResult> { +) -> io::Result> { lookup(fd, Some(key), flags, bpf_cmd::BPF_MAP_LOOKUP_ELEM) } @@ -231,7 +240,7 @@ pub(crate) fn bpf_map_lookup_and_delete_elem( fd: BorrowedFd<'_>, key: Option<&K>, flags: u64, -) -> SysResult> { +) -> io::Result> { lookup(fd, key, flags, bpf_cmd::BPF_MAP_LOOKUP_AND_DELETE_ELEM) } @@ -239,11 +248,11 @@ pub(crate) fn bpf_map_lookup_elem_per_cpu( fd: BorrowedFd<'_>, key: &K, flags: u64, -) -> SysResult>> { - let mut mem = PerCpuValues::::alloc_kernel_mem().map_err(|io_error| (-1, io_error))?; +) -> io::Result>> { + let mut mem = PerCpuValues::::alloc_kernel_mem()?; match bpf_map_lookup_elem_ptr(fd, Some(key), mem.as_mut_ptr(), flags) { - Ok(_) => Ok(Some(unsafe { PerCpuValues::from_kernel_mem(mem) })), - Err((_, io_error)) if io_error.raw_os_error() == Some(ENOENT) => Ok(None), + Ok(v) => Ok(v.map(|()| unsafe { PerCpuValues::from_kernel_mem(mem) })), + Err(io_error) if io_error.raw_os_error() == Some(ENOENT) => Ok(None), Err(e) => Err(e), } } @@ -253,20 +262,20 @@ pub(crate) fn bpf_map_lookup_elem_ptr( key: Option<&K>, value: *mut V, flags: u64, -) -> SysResult> { +) -> io::Result> { let mut attr = unsafe { mem::zeroed::() }; let u = unsafe { &mut attr.__bindgen_anon_2 }; u.map_fd = fd.as_raw_fd() as u32; if let Some(key) = key { - u.key = key as *const _ as u64; + u.key = ptr::from_ref(key) as u64; } u.__bindgen_anon_1.value = value as u64; u.flags = flags; - match sys_bpf(bpf_cmd::BPF_MAP_LOOKUP_ELEM, &mut attr) { - Ok(_) => Ok(Some(())), - Err((_, io_error)) if io_error.raw_os_error() == Some(ENOENT) => Ok(None), + match unit_sys_bpf(bpf_cmd::BPF_MAP_LOOKUP_ELEM, &mut attr) { + Ok(()) => Ok(Some(())), + Err(io_error) if io_error.raw_os_error() == Some(ENOENT) => Ok(None), Err(e) => Err(e), } } @@ -276,33 +285,33 @@ pub(crate) fn bpf_map_update_elem( key: Option<&K>, value: &V, flags: u64, -) -> SysResult { +) -> io::Result<()> { let mut attr = unsafe { mem::zeroed::() }; let u = unsafe { &mut attr.__bindgen_anon_2 }; u.map_fd = fd.as_raw_fd() as u32; if let Some(key) = key { - u.key = key as *const _ as u64; + u.key = ptr::from_ref(key) as u64; } - u.__bindgen_anon_1.value = value as *const _ as u64; + u.__bindgen_anon_1.value = ptr::from_ref(value) as u64; u.flags = flags; - sys_bpf(bpf_cmd::BPF_MAP_UPDATE_ELEM, &mut attr) + unit_sys_bpf(bpf_cmd::BPF_MAP_UPDATE_ELEM, &mut attr) } pub(crate) fn bpf_map_push_elem( fd: BorrowedFd<'_>, value: &V, flags: u64, -) -> SysResult { +) -> io::Result<()> { let mut attr = unsafe { mem::zeroed::() }; let u = unsafe { &mut attr.__bindgen_anon_2 }; u.map_fd = fd.as_raw_fd() as u32; - u.__bindgen_anon_1.value = value as *const _ as u64; + u.__bindgen_anon_1.value = ptr::from_ref(value) as u64; u.flags = flags; - sys_bpf(bpf_cmd::BPF_MAP_UPDATE_ELEM, &mut attr) + unit_sys_bpf(bpf_cmd::BPF_MAP_UPDATE_ELEM, &mut attr) } pub(crate) fn bpf_map_update_elem_ptr( @@ -310,7 +319,7 @@ pub(crate) fn bpf_map_update_elem_ptr( key: *const K, value: *mut V, flags: u64, -) -> SysResult { +) -> io::Result<()> { let mut attr = unsafe { mem::zeroed::() }; let u = unsafe { &mut attr.__bindgen_anon_2 }; @@ -319,7 +328,7 @@ pub(crate) fn bpf_map_update_elem_ptr( u.__bindgen_anon_1.value = value as u64; u.flags = flags; - sys_bpf(bpf_cmd::BPF_MAP_UPDATE_ELEM, &mut attr) + unit_sys_bpf(bpf_cmd::BPF_MAP_UPDATE_ELEM, &mut attr) } pub(crate) fn bpf_map_update_elem_per_cpu( @@ -327,53 +336,63 @@ pub(crate) fn bpf_map_update_elem_per_cpu( key: &K, values: &PerCpuValues, flags: u64, -) -> SysResult { - let mut mem = values.build_kernel_mem().map_err(|e| (-1, e))?; +) -> io::Result<()> { + let mut mem = values.build_kernel_mem()?; bpf_map_update_elem_ptr(fd, key, mem.as_mut_ptr(), flags) } -pub(crate) fn bpf_map_delete_elem(fd: BorrowedFd<'_>, key: &K) -> SysResult { +pub(crate) fn bpf_map_delete_elem(fd: BorrowedFd<'_>, key: &K) -> io::Result<()> { let mut attr = unsafe { mem::zeroed::() }; let u = unsafe { &mut attr.__bindgen_anon_2 }; u.map_fd = fd.as_raw_fd() as u32; - u.key = key as *const _ as u64; + u.key = ptr::from_ref(key) as u64; - sys_bpf(bpf_cmd::BPF_MAP_DELETE_ELEM, &mut attr) + unit_sys_bpf(bpf_cmd::BPF_MAP_DELETE_ELEM, &mut attr) } pub(crate) fn bpf_map_get_next_key( fd: BorrowedFd<'_>, key: Option<&K>, -) -> SysResult> { +) -> io::Result> { let mut attr = unsafe { mem::zeroed::() }; let mut next_key = MaybeUninit::uninit(); let u = unsafe { &mut attr.__bindgen_anon_2 }; u.map_fd = fd.as_raw_fd() as u32; if let Some(key) = key { - u.key = key as *const _ as u64; + u.key = ptr::from_ref(key) as u64; } - u.__bindgen_anon_1.next_key = &mut next_key as *mut _ as u64; + u.__bindgen_anon_1.next_key = ptr::from_mut(&mut next_key) as u64; - match sys_bpf(bpf_cmd::BPF_MAP_GET_NEXT_KEY, &mut attr) { - Ok(_) => Ok(Some(unsafe { next_key.assume_init() })), - Err((_, io_error)) if io_error.raw_os_error() == Some(ENOENT) => Ok(None), + match unit_sys_bpf(bpf_cmd::BPF_MAP_GET_NEXT_KEY, &mut attr) { + Ok(()) => Ok(Some(unsafe { next_key.assume_init() })), + Err(io_error) if io_error.raw_os_error() == Some(ENOENT) => Ok(None), Err(e) => Err(e), } } // since kernel 5.2 -pub(crate) fn bpf_map_freeze(fd: BorrowedFd<'_>) -> SysResult { +pub(crate) fn bpf_map_freeze(fd: BorrowedFd<'_>) -> io::Result<()> { let mut attr = unsafe { mem::zeroed::() }; let u = unsafe { &mut attr.__bindgen_anon_2 }; u.map_fd = fd.as_raw_fd() as u32; - sys_bpf(bpf_cmd::BPF_MAP_FREEZE, &mut attr) + unit_sys_bpf(bpf_cmd::BPF_MAP_FREEZE, &mut attr) } pub(crate) enum LinkTarget<'f> { Fd(BorrowedFd<'f>), IfIndex(u32), + Iter, +} + +// Models https://github.com/torvalds/linux/blob/2144da25/include/uapi/linux/bpf.h#L1724-L1782. +pub(crate) enum BpfLinkCreateArgs<'a> { + TargetBtfId(u32), + // since kernel 5.15 + PerfEvent { bpf_cookie: u64 }, + // since kernel 6.6 + Tcx(&'a LinkRef), } // since kernel 5.7 @@ -381,9 +400,9 @@ pub(crate) fn bpf_link_create( prog_fd: BorrowedFd<'_>, target: LinkTarget<'_>, attach_type: bpf_attach_type, - btf_id: Option, flags: u32, -) -> SysResult { + args: Option>, +) -> io::Result { let mut attr = unsafe { mem::zeroed::() }; attr.link_create.__bindgen_anon_1.prog_fd = prog_fd.as_raw_fd() as u32; @@ -395,11 +414,40 @@ pub(crate) fn bpf_link_create( LinkTarget::IfIndex(ifindex) => { attr.link_create.__bindgen_anon_2.target_ifindex = ifindex; } + // When attaching to an iterator program, no target FD is needed. In + // fact, the kernel explicitly rejects non-zero target FDs for + // iterators: + // https://github.com/torvalds/linux/blob/v6.12/kernel/bpf/bpf_iter.c#L517-L518 + LinkTarget::Iter => {} }; attr.link_create.attach_type = attach_type as u32; attr.link_create.flags = flags; - if let Some(btf_id) = btf_id { - attr.link_create.__bindgen_anon_3.target_btf_id = btf_id; + + if let Some(args) = args { + match args { + BpfLinkCreateArgs::TargetBtfId(btf_id) => { + attr.link_create.__bindgen_anon_3.target_btf_id = btf_id; + } + BpfLinkCreateArgs::PerfEvent { bpf_cookie } => { + attr.link_create.__bindgen_anon_3.perf_event.bpf_cookie = bpf_cookie; + } + BpfLinkCreateArgs::Tcx(link_ref) => match link_ref { + LinkRef::Fd(fd) => { + attr.link_create + .__bindgen_anon_3 + .tcx + .__bindgen_anon_1 + .relative_fd = fd.to_owned() as u32; + } + LinkRef::Id(id) => { + attr.link_create + .__bindgen_anon_3 + .tcx + .__bindgen_anon_1 + .relative_id = id.to_owned(); + } + }, + } } // SAFETY: BPF_LINK_CREATE returns a new file descriptor. @@ -412,7 +460,7 @@ pub(crate) fn bpf_link_update( new_prog_fd: BorrowedFd<'_>, old_prog_fd: Option, flags: u32, -) -> SysResult { +) -> io::Result<()> { let mut attr = unsafe { mem::zeroed::() }; attr.link_update.link_fd = link_fd.as_raw_fd() as u32; @@ -424,29 +472,26 @@ pub(crate) fn bpf_link_update( attr.link_update.flags = flags; } - sys_bpf(bpf_cmd::BPF_LINK_UPDATE, &mut attr) + unit_sys_bpf(bpf_cmd::BPF_LINK_UPDATE, &mut attr) } pub(crate) fn bpf_prog_attach( prog_fd: BorrowedFd<'_>, target_fd: BorrowedFd<'_>, attach_type: bpf_attach_type, + flags: u32, ) -> Result<(), SyscallError> { let mut attr = unsafe { mem::zeroed::() }; attr.__bindgen_anon_5.attach_bpf_fd = prog_fd.as_raw_fd() as u32; attr.__bindgen_anon_5.__bindgen_anon_1.target_fd = target_fd.as_raw_fd() as u32; attr.__bindgen_anon_5.attach_type = attach_type as u32; + attr.__bindgen_anon_5.attach_flags = flags; - let ret = sys_bpf(bpf_cmd::BPF_PROG_ATTACH, &mut attr).map_err(|(code, io_error)| { - assert_eq!(code, -1); - SyscallError { - call: "bpf_prog_attach", - io_error, - } - })?; - assert_eq!(ret, 0); - Ok(()) + unit_sys_bpf(bpf_cmd::BPF_PROG_ATTACH, &mut attr).map_err(|io_error| SyscallError { + call: "bpf_prog_attach", + io_error, + }) } pub(crate) fn bpf_prog_detach( @@ -460,36 +505,45 @@ pub(crate) fn bpf_prog_detach( attr.__bindgen_anon_5.__bindgen_anon_1.target_fd = target_fd.as_raw_fd() as u32; attr.__bindgen_anon_5.attach_type = attach_type as u32; - let ret = sys_bpf(bpf_cmd::BPF_PROG_DETACH, &mut attr).map_err(|(code, io_error)| { - assert_eq!(code, -1); - SyscallError { - call: "bpf_prog_detach", - io_error, - } - })?; - assert_eq!(ret, 0); - Ok(()) + unit_sys_bpf(bpf_cmd::BPF_PROG_DETACH, &mut attr).map_err(|io_error| SyscallError { + call: "bpf_prog_detach", + io_error, + }) +} + +#[derive(Debug)] +pub(crate) enum ProgQueryTarget<'a> { + Fd(BorrowedFd<'a>), + IfIndex(u32), } pub(crate) fn bpf_prog_query( - target_fd: RawFd, + target: &ProgQueryTarget<'_>, attach_type: bpf_attach_type, query_flags: u32, attach_flags: Option<&mut u32>, prog_ids: &mut [u32], prog_cnt: &mut u32, -) -> SysResult { + revision: &mut u64, +) -> io::Result<()> { let mut attr = unsafe { mem::zeroed::() }; - attr.query.__bindgen_anon_1.target_fd = target_fd as u32; + match target { + ProgQueryTarget::Fd(fd) => { + attr.query.__bindgen_anon_1.target_fd = fd.as_raw_fd() as u32; + } + ProgQueryTarget::IfIndex(ifindex) => { + attr.query.__bindgen_anon_1.target_ifindex = *ifindex; + } + } attr.query.attach_type = attach_type as u32; attr.query.query_flags = query_flags; attr.query.__bindgen_anon_2.prog_cnt = prog_ids.len() as u32; attr.query.prog_ids = prog_ids.as_mut_ptr() as u64; - - let ret = sys_bpf(bpf_cmd::BPF_PROG_QUERY, &mut attr); + let ret = unit_sys_bpf(bpf_cmd::BPF_PROG_QUERY, &mut attr); *prog_cnt = unsafe { attr.query.__bindgen_anon_2.prog_cnt }; + *revision = unsafe { attr.query.revision }; if let Some(attach_flags) = attach_flags { *attach_flags = unsafe { attr.query.attach_flags }; @@ -498,13 +552,13 @@ pub(crate) fn bpf_prog_query( ret } -pub(crate) fn bpf_prog_get_fd_by_id(prog_id: u32) -> Result { +/// Introduced in kernel v4.13. +pub(crate) fn bpf_prog_get_fd_by_id(prog_id: u32) -> Result { let mut attr = unsafe { mem::zeroed::() }; attr.__bindgen_anon_6.__bindgen_anon_1.prog_id = prog_id; // SAFETY: BPF_PROG_GET_FD_BY_ID returns a new file descriptor. - unsafe { fd_sys_bpf(bpf_cmd::BPF_PROG_GET_FD_BY_ID, &mut attr) }.map_err(|(code, io_error)| { - assert_eq!(code, -1); + unsafe { fd_sys_bpf(bpf_cmd::BPF_PROG_GET_FD_BY_ID, &mut attr) }.map_err(|io_error| { SyscallError { call: "bpf_prog_get_fd_by_id", io_error, @@ -512,6 +566,7 @@ pub(crate) fn bpf_prog_get_fd_by_id(prog_id: u32) -> Result( fd: BorrowedFd<'_>, init: F, @@ -522,42 +577,41 @@ fn bpf_obj_get_info_by_fd( init(&mut info); attr.info.bpf_fd = fd.as_raw_fd() as u32; - attr.info.info = &info as *const _ as u64; + attr.info.info = ptr::from_ref(&info) as u64; attr.info.info_len = mem::size_of_val(&info) as u32; - match sys_bpf(bpf_cmd::BPF_OBJ_GET_INFO_BY_FD, &mut attr) { - Ok(code) => { - assert_eq!(code, 0); - Ok(info) - } - Err((code, io_error)) => { - assert_eq!(code, -1); - Err(SyscallError { - call: "bpf_obj_get_info_by_fd", - io_error, - }) - } + match unit_sys_bpf(bpf_cmd::BPF_OBJ_GET_INFO_BY_FD, &mut attr) { + Ok(()) => Ok(info), + Err(io_error) => Err(SyscallError { + call: "bpf_obj_get_info_by_fd", + io_error, + }), } } +/// Introduced in kernel v4.13. pub(crate) fn bpf_prog_get_info_by_fd( fd: BorrowedFd<'_>, map_ids: &mut [u32], ) -> Result { + // An `E2BIG` error can occur on kernels below v4.15 when handing over a large struct where the + // extra space is not all-zero bytes. bpf_obj_get_info_by_fd(fd, |info: &mut bpf_prog_info| { - info.nr_map_ids = map_ids.len() as _; - info.map_ids = map_ids.as_mut_ptr() as _; + if !map_ids.is_empty() { + info.nr_map_ids = map_ids.len() as u32; + info.map_ids = map_ids.as_mut_ptr() as u64; + } }) } -pub(crate) fn bpf_map_get_fd_by_id(map_id: u32) -> Result { +/// Introduced in kernel v4.13. +pub(crate) fn bpf_map_get_fd_by_id(map_id: u32) -> Result { let mut attr = unsafe { mem::zeroed::() }; attr.__bindgen_anon_6.__bindgen_anon_1.map_id = map_id; // SAFETY: BPF_MAP_GET_FD_BY_ID returns a new file descriptor. - unsafe { fd_sys_bpf(bpf_cmd::BPF_MAP_GET_FD_BY_ID, &mut attr) }.map_err(|(code, io_error)| { - assert_eq!(code, -1); + unsafe { fd_sys_bpf(bpf_cmd::BPF_MAP_GET_FD_BY_ID, &mut attr) }.map_err(|io_error| { SyscallError { call: "bpf_map_get_fd_by_id", io_error, @@ -569,13 +623,12 @@ pub(crate) fn bpf_map_get_info_by_fd(fd: BorrowedFd<'_>) -> Result Result { +pub(crate) fn bpf_link_get_fd_by_id(link_id: u32) -> Result { let mut attr = unsafe { mem::zeroed::() }; attr.__bindgen_anon_6.__bindgen_anon_1.link_id = link_id; // SAFETY: BPF_LINK_GET_FD_BY_ID returns a new file descriptor. - unsafe { fd_sys_bpf(bpf_cmd::BPF_LINK_GET_FD_BY_ID, &mut attr) }.map_err(|(code, io_error)| { - assert_eq!(code, -1); + unsafe { fd_sys_bpf(bpf_cmd::BPF_LINK_GET_FD_BY_ID, &mut attr) }.map_err(|io_error| { SyscallError { call: "bpf_link_get_fd_by_id", io_error, @@ -592,15 +645,15 @@ pub(crate) fn btf_obj_get_info_by_fd( buf: &mut [u8], ) -> Result { bpf_obj_get_info_by_fd(fd, |info: &mut bpf_btf_info| { - info.btf = buf.as_mut_ptr() as _; - info.btf_size = buf.len() as _; + info.btf = buf.as_mut_ptr() as u64; + info.btf_size = buf.len() as u32; }) } pub(crate) fn bpf_raw_tracepoint_open( name: Option<&CStr>, prog_fd: BorrowedFd<'_>, -) -> SysResult { +) -> io::Result { let mut attr = unsafe { mem::zeroed::() }; attr.raw_tracepoint.name = match name { @@ -617,10 +670,10 @@ pub(crate) fn bpf_load_btf( raw_btf: &[u8], log_buf: &mut [u8], verifier_log_level: VerifierLogLevel, -) -> SysResult { +) -> io::Result { let mut attr = unsafe { mem::zeroed::() }; let u = unsafe { &mut attr.__bindgen_anon_7 }; - u.btf = raw_btf.as_ptr() as *const _ as u64; + u.btf = raw_btf.as_ptr() as u64; u.btf_size = mem::size_of_val(raw_btf) as u32; if !log_buf.is_empty() { u.btf_log_level = verifier_log_level.bits(); @@ -632,27 +685,85 @@ pub(crate) fn bpf_load_btf( } // SAFETY: only use for bpf_cmd that return a new file descriptor on success. -unsafe fn fd_sys_bpf(cmd: bpf_cmd, attr: &mut bpf_attr) -> SysResult { +pub(super) unsafe fn fd_sys_bpf( + cmd: bpf_cmd, + attr: &mut bpf_attr, +) -> io::Result { let fd = sys_bpf(cmd, attr)?; - let fd = fd.try_into().map_err(|_| { - ( - fd, - io::Error::new( - io::ErrorKind::InvalidData, - format!("{cmd:?}: invalid fd returned: {fd}"), - ), + let fd = fd.try_into().map_err(|std::num::TryFromIntError { .. }| { + io::Error::new( + io::ErrorKind::InvalidData, + format!("{cmd:?}: invalid fd returned: {fd}"), ) })?; - Ok(OwnedFd::from_raw_fd(fd)) + Ok(unsafe { crate::MockableFd::from_raw_fd(fd) }) } -pub(crate) fn bpf_btf_get_fd_by_id(id: u32) -> Result { +static RAISE_MEMLIMIT: std::sync::Once = std::sync::Once::new(); +fn with_raised_rlimit_retry io::Result>(mut op: F) -> io::Result { + let mut result = op(); + if matches!(result.as_ref(), Err(err) if err.raw_os_error() == Some(EPERM)) { + RAISE_MEMLIMIT.call_once(|| { + if KernelVersion::at_least(5, 11, 0) { + return; + } + let mut limit = mem::MaybeUninit::::uninit(); + let ret = unsafe { getrlimit(RLIMIT_MEMLOCK, limit.as_mut_ptr()) }; + if ret != 0 { + warn!("getrlimit(RLIMIT_MEMLOCK) failed: {ret}"); + return; + } + let rlimit { + rlim_cur, + rlim_max: _, + } = unsafe { limit.assume_init() }; + + if rlim_cur == RLIM_INFINITY { + return; + } + let limit = rlimit { + rlim_cur: RLIM_INFINITY, + rlim_max: RLIM_INFINITY, + }; + let ret = unsafe { setrlimit(RLIMIT_MEMLOCK, &limit) }; + if ret != 0 { + struct HumanSize(rlim_t); + + impl fmt::Display for HumanSize { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let &Self(size) = self; + if size < 1024 { + write!(f, "{size} bytes") + } else if size < 1024 * 1024 { + write!(f, "{} KiB", size / 1024) + } else { + write!(f, "{} MiB", size / 1024 / 1024) + } + } + } + warn!( + "setrlimit(RLIMIT_MEMLOCK, RLIM_INFINITY) failed: {ret}; current value is {}", + HumanSize(rlim_cur) + ); + } + }); + // Retry after raising the limit. + result = op(); + } + result +} + +pub(super) fn bpf_map_create(attr: &mut bpf_attr) -> io::Result { + // SAFETY: BPF_MAP_CREATE returns a new file descriptor. + with_raised_rlimit_retry(|| unsafe { fd_sys_bpf(bpf_cmd::BPF_MAP_CREATE, attr) }) +} + +pub(crate) fn bpf_btf_get_fd_by_id(id: u32) -> Result { let mut attr = unsafe { mem::zeroed::() }; attr.__bindgen_anon_6.__bindgen_anon_1.btf_id = id; // SAFETY: BPF_BTF_GET_FD_BY_ID returns a new file descriptor. - unsafe { fd_sys_bpf(bpf_cmd::BPF_BTF_GET_FD_BY_ID, &mut attr) }.map_err(|(code, io_error)| { - assert_eq!(code, -1); + unsafe { fd_sys_bpf(bpf_cmd::BPF_BTF_GET_FD_BY_ID, &mut attr) }.map_err(|io_error| { SyscallError { call: "bpf_btf_get_fd_by_id", io_error, @@ -661,50 +772,130 @@ pub(crate) fn bpf_btf_get_fd_by_id(id: u32) -> Result { } pub(crate) fn is_prog_name_supported() -> bool { + with_trivial_prog(ProgramType::TracePoint, |attr| { + let u = unsafe { &mut attr.__bindgen_anon_3 }; + let name = c"aya_name_check"; + let name_bytes = name.to_bytes(); + let len = cmp::min(name_bytes.len(), u.prog_name.len() - 1); // Ensure NULL termination. + u.prog_name[..len] + .copy_from_slice(unsafe { mem::transmute::<&[u8], &[c_char]>(&name_bytes[..len]) }); + bpf_prog_load(attr).is_ok() + }) +} + +fn new_insn(code: u8, dst_reg: u8, src_reg: u8, offset: i16, imm: i32) -> bpf_insn { + let mut insn = unsafe { mem::zeroed::() }; + insn.code = code; + insn.set_dst_reg(dst_reg); + insn.set_src_reg(src_reg); + insn.off = offset; + insn.imm = imm; + insn +} + +pub(super) fn with_trivial_prog(program_type: ProgramType, op: F) -> T +where + F: FnOnce(&mut bpf_attr) -> T, +{ let mut attr = unsafe { mem::zeroed::() }; let u = unsafe { &mut attr.__bindgen_anon_3 }; - let mut name: [c_char; 16] = [0; 16]; - let cstring = CString::new("aya_name_check").unwrap(); - let name_bytes = cstring.to_bytes(); - let len = cmp::min(name.len(), name_bytes.len()); - name[..len].copy_from_slice(unsafe { - slice::from_raw_parts(name_bytes.as_ptr() as *const c_char, len) - }); - u.prog_name = name; - - let prog: &[u8] = &[ - 0xb7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // mov64 r0 = 0 - 0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // exit - ]; - let gpl = b"GPL\0"; + let mov64_imm = (BPF_ALU64 | BPF_MOV | BPF_K) as u8; + let exit = (BPF_JMP | BPF_EXIT) as u8; + let insns = [new_insn(mov64_imm, 0, 0, 0, 0), new_insn(exit, 0, 0, 0, 0)]; + + let gpl = c"GPL"; u.license = gpl.as_ptr() as u64; - let insns = copy_instructions(prog).unwrap(); u.insn_cnt = insns.len() as u32; u.insns = insns.as_ptr() as u64; - u.prog_type = bpf_prog_type::BPF_PROG_TYPE_SOCKET_FILTER as u32; - bpf_prog_load(&mut attr).is_ok() + // `expected_attach_type` field was added in v4.17 https://elixir.bootlin.com/linux/v4.17/source/include/uapi/linux/bpf.h#L310. + let expected_attach_type = match program_type { + ProgramType::SkMsg => Some(bpf_attach_type::BPF_SK_MSG_VERDICT), + ProgramType::CgroupSockAddr => Some(bpf_attach_type::BPF_CGROUP_INET4_BIND), + ProgramType::LircMode2 => Some(bpf_attach_type::BPF_LIRC_MODE2), + ProgramType::SkReuseport => Some(bpf_attach_type::BPF_SK_REUSEPORT_SELECT), + ProgramType::FlowDissector => Some(bpf_attach_type::BPF_FLOW_DISSECTOR), + ProgramType::CgroupSysctl => Some(bpf_attach_type::BPF_CGROUP_SYSCTL), + ProgramType::CgroupSockopt => Some(bpf_attach_type::BPF_CGROUP_GETSOCKOPT), + ProgramType::Tracing => Some(bpf_attach_type::BPF_TRACE_FENTRY), + ProgramType::Lsm(lsm_attach_type) => match lsm_attach_type { + LsmAttachType::Mac => Some(bpf_attach_type::BPF_LSM_MAC), + LsmAttachType::Cgroup => Some(bpf_attach_type::BPF_LSM_CGROUP), + }, + ProgramType::SkLookup => Some(bpf_attach_type::BPF_SK_LOOKUP), + ProgramType::Netfilter => Some(bpf_attach_type::BPF_NETFILTER), + // Program types below v4.17, or do not accept `expected_attach_type`, should leave the + // field unset. + // + // Types below v4.17: + ProgramType::Unspecified + | ProgramType::SocketFilter + | ProgramType::KProbe + | ProgramType::SchedClassifier + | ProgramType::SchedAction + | ProgramType::TracePoint + | ProgramType::Xdp + | ProgramType::PerfEvent + | ProgramType::CgroupSkb + | ProgramType::CgroupSock + | ProgramType::LwtInput + | ProgramType::LwtOutput + | ProgramType::LwtXmit + | ProgramType::SockOps + | ProgramType::SkSkb + | ProgramType::CgroupDevice + // Types that do not accept `expected_attach_type`: + | ProgramType::RawTracePoint + | ProgramType::LwtSeg6local + | ProgramType::RawTracePointWritable + | ProgramType::StructOps + | ProgramType::Extension + | ProgramType::Syscall => None, + }; + + match program_type { + ProgramType::KProbe => { + if let Ok(current_version) = KernelVersion::current() { + u.kern_version = current_version.code(); + } + } + // syscall required to be sleepable: https://elixir.bootlin.com/linux/v5.14/source/kernel/bpf/verifier.c#L13240 + ProgramType::Syscall => u.prog_flags = aya_obj::generated::BPF_F_SLEEPABLE, + _ => {} + } + + let program_type: bpf_prog_type = program_type.into(); + u.prog_type = program_type as u32; + if let Some(expected_attach_type) = expected_attach_type { + u.expected_attach_type = expected_attach_type as u32; + } + + op(&mut attr) } pub(crate) fn is_probe_read_kernel_supported() -> bool { let mut attr = unsafe { mem::zeroed::() }; let u = unsafe { &mut attr.__bindgen_anon_3 }; - let prog: &[u8] = &[ - 0xbf, 0xa1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // r1 = r10 - 0x07, 0x01, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, // r1 -= 8 - 0xb7, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // r2 = 8 - 0xb7, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // r3 = 0 - 0x85, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, // call 113 - 0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // exit + let mov64_reg = (BPF_ALU64 | BPF_MOV | BPF_X) as u8; + let add64_imm = (BPF_ALU64 | BPF_ADD | BPF_K) as u8; + let mov64_imm = (BPF_ALU64 | BPF_MOV | BPF_K) as u8; + let call = (BPF_JMP | BPF_CALL) as u8; + let exit = (BPF_JMP | BPF_EXIT) as u8; + let insns = [ + new_insn(mov64_reg, 1, 10, 0, 0), + new_insn(add64_imm, 1, 0, 0, -8), + new_insn(mov64_imm, 2, 0, 0, 8), + new_insn(mov64_imm, 3, 0, 0, 0), + new_insn(call, 0, 0, 0, BPF_FUNC_probe_read_kernel as i32), + new_insn(exit, 0, 0, 0, 0), ]; - let gpl = b"GPL\0"; + let gpl = c"GPL"; u.license = gpl.as_ptr() as u64; - let insns = copy_instructions(prog).unwrap(); u.insn_cnt = insns.len() as u32; u.insns = insns.as_ptr() as u64; u.prog_type = bpf_prog_type::BPF_PROG_TYPE_TRACEPOINT as u32; @@ -713,52 +904,31 @@ pub(crate) fn is_probe_read_kernel_supported() -> bool { } pub(crate) fn is_perf_link_supported() -> bool { - let mut attr = unsafe { mem::zeroed::() }; - let u = unsafe { &mut attr.__bindgen_anon_3 }; - - let prog: &[u8] = &[ - 0xb7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // mov64 r0 = 0 - 0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // exit - ]; - - let gpl = b"GPL\0"; - u.license = gpl.as_ptr() as u64; - - let insns = copy_instructions(prog).unwrap(); - u.insn_cnt = insns.len() as u32; - u.insns = insns.as_ptr() as u64; - u.prog_type = bpf_prog_type::BPF_PROG_TYPE_TRACEPOINT as u32; - - if let Ok(fd) = bpf_prog_load(&mut attr) { - let fd = crate::MockableFd::from_fd(fd); - let fd = fd.as_fd(); - matches!( + with_trivial_prog(ProgramType::TracePoint, |attr| { + if let Ok(fd) = bpf_prog_load(attr) { + let fd = fd.as_fd(); // Uses an invalid target FD so we get EBADF if supported. - bpf_link_create(fd, LinkTarget::IfIndex(u32::MAX), bpf_attach_type::BPF_PERF_EVENT, None, 0), + let link = bpf_link_create( + fd, + LinkTarget::IfIndex(u32::MAX), + bpf_attach_type::BPF_PERF_EVENT, + 0, + None, + ); // Returns EINVAL if unsupported. EBADF if supported. - Err((_, e)) if e.raw_os_error() == Some(libc::EBADF), - ) - } else { - false - } + matches!(link, Err(err) if err.raw_os_error() == Some(EBADF)) + } else { + false + } + }) } pub(crate) fn is_bpf_global_data_supported() -> bool { let mut attr = unsafe { mem::zeroed::() }; let u = unsafe { &mut attr.__bindgen_anon_3 }; - let prog: &[u8] = &[ - 0x18, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ld_pseudo r1, 0x2, 0x0 - 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // - 0x7a, 0x01, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, // stdw [r1 + 0x0], 0x2a - 0xb7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // mov64 r0 = 0 - 0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // exit - ]; - - let mut insns = copy_instructions(prog).unwrap(); - let map = MapData::create( - obj::Map::Legacy(LegacyMap { + aya_obj::Map::Legacy(LegacyMap { def: bpf_map_def { map_type: bpf_map_type::BPF_MAP_TYPE_ARRAY as u32, key_size: 4, @@ -776,9 +946,21 @@ pub(crate) fn is_bpf_global_data_supported() -> bool { ); if let Ok(map) = map { - insns[0].imm = map.fd().as_fd().as_raw_fd(); - - let gpl = b"GPL\0"; + let ld_map_value = (BPF_LD | BPF_DW | BPF_IMM) as u8; + let pseudo_map_value = BPF_PSEUDO_MAP_VALUE as u8; + let fd = map.fd().as_fd().as_raw_fd(); + let st_mem = (BPF_ST | BPF_DW | BPF_MEM) as u8; + let mov64_imm = (BPF_ALU64 | BPF_MOV | BPF_K) as u8; + let exit = (BPF_JMP | BPF_EXIT) as u8; + let insns = [ + new_insn(ld_map_value, 1, pseudo_map_value, 0, fd), + new_insn(0, 0, 0, 0, 0), + new_insn(st_mem, 1, 0, 0, 42), + new_insn(mov64_imm, 0, 0, 0, 0), + new_insn(exit, 0, 0, 0, 0), + ]; + + let gpl = c"GPL"; u.license = gpl.as_ptr() as u64; u.insn_cnt = insns.len() as u32; u.insns = insns.as_ptr() as u64; @@ -794,15 +976,16 @@ pub(crate) fn is_bpf_cookie_supported() -> bool { let mut attr = unsafe { mem::zeroed::() }; let u = unsafe { &mut attr.__bindgen_anon_3 }; - let prog: &[u8] = &[ - 0x85, 0x00, 0x00, 0x00, 0xae, 0x00, 0x00, 0x00, // call bpf_get_attach_cookie - 0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // exit + let call = (BPF_JMP | BPF_CALL) as u8; + let exit = (BPF_JMP | BPF_EXIT) as u8; + let insns = [ + new_insn(call, 0, 0, 0, BPF_FUNC_get_attach_cookie as i32), + new_insn(exit, 0, 0, 0, 0), ]; - let gpl = b"GPL\0"; + let gpl = c"GPL"; u.license = gpl.as_ptr() as u64; - let insns = copy_instructions(prog).unwrap(); u.insn_cnt = insns.len() as u32; u.insns = insns.as_ptr() as u64; u.prog_type = bpf_prog_type::BPF_PROG_TYPE_KPROBE as u32; @@ -828,10 +1011,7 @@ pub(crate) fn is_prog_id_supported(map_type: bpf_map_type) -> bool { u.max_entries = 1; u.map_flags = 0; - // SAFETY: BPF_MAP_CREATE returns a new file descriptor. - let fd = unsafe { fd_sys_bpf(bpf_cmd::BPF_MAP_CREATE, &mut attr) }; - let fd = fd.map(crate::MockableFd::from_fd); - fd.is_ok() + bpf_map_create(&mut attr).is_ok() } pub(crate) fn is_btf_supported() -> bool { @@ -927,6 +1107,15 @@ pub(crate) fn is_btf_datasec_supported() -> bool { bpf_load_btf(btf_bytes.as_slice(), &mut [], Default::default()).is_ok() } +pub(crate) fn is_btf_datasec_zero_supported() -> bool { + let mut btf = Btf::new(); + let name_offset = btf.add_string(".empty"); + let datasec_type = BtfType::DataSec(DataSec::new(name_offset, Vec::new(), 0)); + btf.add_type(datasec_type); + + bpf_load_btf(btf.to_bytes().as_slice(), &mut [], Default::default()).is_ok() +} + pub(crate) fn is_btf_enum64_supported() -> bool { let mut btf = Btf::new(); let name_offset = btf.add_string("enum64"); @@ -990,13 +1179,20 @@ pub(crate) fn is_btf_type_tag_supported() -> bool { bpf_load_btf(btf_bytes.as_slice(), &mut [], Default::default()).is_ok() } -fn bpf_prog_load(attr: &mut bpf_attr) -> SysResult { +pub(super) fn bpf_prog_load(attr: &mut bpf_attr) -> io::Result { // SAFETY: BPF_PROG_LOAD returns a new file descriptor. - unsafe { fd_sys_bpf(bpf_cmd::BPF_PROG_LOAD, attr) } + with_raised_rlimit_retry(|| unsafe { fd_sys_bpf(bpf_cmd::BPF_PROG_LOAD, attr) }) +} + +fn sys_bpf(cmd: bpf_cmd, attr: &mut bpf_attr) -> io::Result { + syscall(Syscall::Ebpf { cmd, attr }).map_err(|(code, io_error)| { + assert_eq!(code, -1); + io_error + }) } -fn sys_bpf(cmd: bpf_cmd, attr: &mut bpf_attr) -> SysResult { - syscall(Syscall::Ebpf { cmd, attr }) +pub(super) fn unit_sys_bpf(cmd: bpf_cmd, attr: &mut bpf_attr) -> io::Result<()> { + sys_bpf(cmd, attr).map(|code| assert_eq!(code, 0)) } fn bpf_obj_get_next_id( @@ -1007,13 +1203,9 @@ fn bpf_obj_get_next_id( let mut attr = unsafe { mem::zeroed::() }; let u = unsafe { &mut attr.__bindgen_anon_6 }; u.__bindgen_anon_1.start_id = id; - match sys_bpf(cmd, &mut attr) { - Ok(code) => { - assert_eq!(code, 0); - Ok(Some(unsafe { attr.__bindgen_anon_6.next_id })) - } - Err((code, io_error)) => { - assert_eq!(code, -1); + match unit_sys_bpf(cmd, &mut attr) { + Ok(()) => Ok(Some(unsafe { attr.__bindgen_anon_6.next_id })), + Err(io_error) => { if io_error.raw_os_error() == Some(ENOENT) { Ok(None) } else { @@ -1044,6 +1236,7 @@ fn iter_obj_ids( }) } +/// Introduced in kernel v4.13. pub(crate) fn iter_prog_ids() -> impl Iterator> { iter_obj_ids(bpf_cmd::BPF_PROG_GET_NEXT_ID, "bpf_prog_get_next_id") } @@ -1052,14 +1245,29 @@ pub(crate) fn iter_link_ids() -> impl Iterator> iter_obj_ids(bpf_cmd::BPF_LINK_GET_NEXT_ID, "bpf_link_get_next_id") } +/// Introduced in kernel v4.13. pub(crate) fn iter_map_ids() -> impl Iterator> { iter_obj_ids(bpf_cmd::BPF_MAP_GET_NEXT_ID, "bpf_map_get_next_id") } +/// Introduced in kernel v5.8. +pub(crate) fn bpf_enable_stats( + stats_type: bpf_stats_type, +) -> Result { + let mut attr = unsafe { mem::zeroed::() }; + attr.enable_stats.type_ = stats_type as u32; + + // SAFETY: BPF_ENABLE_STATS returns a new file descriptor. + unsafe { fd_sys_bpf(bpf_cmd::BPF_ENABLE_STATS, &mut attr) }.map_err(|io_error| SyscallError { + call: "bpf_enable_stats", + io_error, + }) +} + pub(crate) fn retry_with_verifier_logs( max_retries: usize, - f: impl Fn(&mut [u8]) -> SysResult, -) -> (SysResult, VerifierLog) { + f: impl Fn(&mut [u8]) -> io::Result, +) -> (io::Result, VerifierLog) { const MIN_LOG_BUF_SIZE: usize = 1024 * 10; const MAX_LOG_BUF_SIZE: usize = (u32::MAX >> 8) as usize; @@ -1068,7 +1276,7 @@ pub(crate) fn retry_with_verifier_logs( loop { let ret = f(log_buf.as_mut_slice()); if retries != max_retries { - if let Err((_, io_error)) = &ret { + if let Err(io_error) = &ret { if retries == 0 || io_error.raw_os_error() == Some(ENOSPC) { let len = (log_buf.capacity() * 10).clamp(MIN_LOG_BUF_SIZE, MAX_LOG_BUF_SIZE); log_buf.resize(len, 0); @@ -1091,11 +1299,54 @@ pub(crate) fn retry_with_verifier_logs( #[cfg(test)] mod tests { - use libc::{EBADF, EINVAL}; + use libc::EINVAL; use super::*; use crate::sys::override_syscall; + #[test] + fn test_attach_with_attributes() { + const FAKE_FLAGS: u32 = 1234; + const FAKE_FD: i32 = 4321; + + // Test attach flags propagated to system call. + override_syscall(|call| match call { + Syscall::Ebpf { + cmd: bpf_cmd::BPF_PROG_ATTACH, + attr, + } => { + assert_eq!(unsafe { attr.__bindgen_anon_5.attach_flags }, FAKE_FLAGS); + Ok(0) + } + _ => Err((-1, io::Error::from_raw_os_error(EINVAL))), + }); + + let prog_fd = unsafe { BorrowedFd::borrow_raw(FAKE_FD) }; + let tgt_fd = unsafe { BorrowedFd::borrow_raw(FAKE_FD) }; + let mut result = bpf_prog_attach( + prog_fd, + tgt_fd, + bpf_attach_type::BPF_CGROUP_SOCK_OPS, + FAKE_FLAGS, + ); + result.unwrap(); + + // Test with no flags. + override_syscall(|call| match call { + Syscall::Ebpf { + cmd: bpf_cmd::BPF_PROG_ATTACH, + attr, + } => { + assert_eq!(unsafe { attr.__bindgen_anon_5.attach_flags }, 0); + Ok(0) + } + _ => Err((-1, io::Error::from_raw_os_error(EINVAL))), + }); + + result = bpf_prog_attach(prog_fd, tgt_fd, bpf_attach_type::BPF_CGROUP_SOCK_OPS, 0); + result.unwrap(); + } + #[test] fn test_perf_link_supported() { override_syscall(|call| match call { diff --git a/aya/src/sys/fake.rs b/aya/src/sys/fake.rs index 0e0cd3fe..a994cbfa 100644 --- a/aya/src/sys/fake.rs +++ b/aya/src/sys/fake.rs @@ -2,7 +2,7 @@ use std::{cell::RefCell, ffi::c_void, io, ptr}; use super::{SysResult, Syscall}; -type SyscallFn = unsafe fn(Syscall<'_>) -> SysResult; +type SyscallFn = unsafe fn(Syscall<'_>) -> SysResult; #[cfg(test)] thread_local! { @@ -11,11 +11,11 @@ thread_local! { } #[cfg(test)] -unsafe fn test_syscall(_call: Syscall<'_>) -> SysResult { +unsafe fn test_syscall(_call: Syscall<'_>) -> SysResult { Err((-1, io::Error::from_raw_os_error(libc::EINVAL))) } #[cfg(test)] -pub(crate) fn override_syscall(call: unsafe fn(Syscall<'_>) -> SysResult) { +pub(crate) fn override_syscall(call: unsafe fn(Syscall<'_>) -> SysResult) { TEST_SYSCALL.with(|test_impl| *test_impl.borrow_mut() = call); } diff --git a/aya/src/sys/feature_probe.rs b/aya/src/sys/feature_probe.rs new file mode 100644 index 00000000..e19b48c9 --- /dev/null +++ b/aya/src/sys/feature_probe.rs @@ -0,0 +1,431 @@ +//! Probes and identifies available eBPF features supported by the host kernel. + +use std::{ + mem, + os::fd::{AsFd as _, AsRawFd as _}, + ptr, +}; + +use aya_obj::{ + btf::{Btf, BtfKind}, + generated::{ + BPF_F_MMAPABLE, BPF_F_NO_PREALLOC, bpf_attr, bpf_cmd, bpf_map_type, bpf_prog_info, + }, +}; +use libc::{E2BIG, EBADF, EINVAL}; + +use super::{ + SyscallError, bpf_map_create, bpf_prog_load, bpf_raw_tracepoint_open, unit_sys_bpf, + with_trivial_prog, +}; +use crate::{ + MockableFd, + maps::MapType, + programs::{LsmAttachType, ProgramError, ProgramType}, + util::page_size, +}; + +/// Whether the host kernel supports the [`ProgramType`]. +/// +/// # Examples +/// +/// ```no_run +/// # use aya::{programs::ProgramType, sys::is_program_supported}; +/// # +/// match is_program_supported(ProgramType::Xdp) { +/// Ok(true) => println!("XDP supported :)"), +/// Ok(false) => println!("XDP not supported :("), +/// Err(err) => println!("unexpected error while probing: {:?}", err), +/// } +/// ``` +/// +/// # Errors +/// +/// Returns [`ProgramError::SyscallError`] if a syscall fails with an unexpected +/// error, or [`ProgramError::Btf`] for BTF related errors. +/// +/// Certain errors are expected and handled internally; only unanticipated +/// failures during probing will result in these errors. +pub fn is_program_supported(program_type: ProgramType) -> Result { + if program_type == ProgramType::Unspecified { + return Ok(false); + } + + // Verifier log is used in tracing, extension, and lsm to detect support if loading fails due + // to unset `attach_btf_id`. A valid `attach_btf_id` is required for a successful load, but is + // left unset if the hook functions cannot be found in the BTF. + // + // If the program types are supported, but the field is unset, then the following message[0] + // is emitted to the verifier log: + // `Tracing programs must provide btf_id\nprocessed 0 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0\n\0` + // + // Otherwise, if the program types are not supported, then the verifier log will be empty. + // + // [0] https://elixir.bootlin.com/linux/v5.5/source/kernel/bpf/verifier.c#L9535 + let mut verifier_log = matches!( + program_type, + ProgramType::Tracing | ProgramType::Extension | ProgramType::Lsm(_) + ) + .then_some([0_u8; 256]); + + // Both tracing and lsm types require a valid `attach_btf_id` to load successfully. However, if + // the symbols cannot be found in the BTF, then leave the field unset/0. + // + // The extension type also requires an `attach_btf_id`, but we intentionally leave it unset + // since a successful load requires additional setup with a separate BTF-backed program. + // + // When `attach_btf_id` is unset, then loading will fail and so we examine verifier log for the + // expected message. + let attach_btf_id = match program_type { + // `bpf_fentry_test1` symbol from: + // https://elixir.bootlin.com/linux/v5.5/source/net/bpf/test_run.c#L112 + ProgramType::Tracing => Some("bpf_fentry_test1"), + // `bpf_lsm_bpf` symbol from: + // - https://elixir.bootlin.com/linux/v5.7/source/include/linux/lsm_hook_defs.h#L364 + // - or https://elixir.bootlin.com/linux/v5.11/source/kernel/bpf/bpf_lsm.c#L135 on later versions + ProgramType::Lsm(_) => Some("bpf_lsm_bpf"), + _ => None, + } + .map(|func_name| { + Btf::from_sys_fs() + .and_then(|btf| btf.id_by_type_name_kind(func_name, BtfKind::Func)) + .unwrap_or(0) + }); + + with_trivial_prog(program_type, |attr| { + // SAFETY: union access + let u = unsafe { &mut attr.__bindgen_anon_3 }; + + if let Some(attach_btf_id) = attach_btf_id { + u.attach_btf_id = attach_btf_id; + } + // If loading fails for tracing, extension, and lsm types due to unset `attach_btf_id`, + // then we defer to verifier log to verify whether type is supported. + if let Some(verifier_log) = verifier_log.as_mut() { + u.log_buf = verifier_log.as_mut_ptr() as u64; + u.log_level = 1; + u.log_size = verifier_log.len() as u32; + } + + match bpf_prog_load(attr) { + Err(io_error) => match io_error.raw_os_error() { + // Loading may fail for some types (namely tracing, extension, lsm, & struct_ops), so we + // perform additional examination on the OS error and/or verifier logs. + // + // For most types, `EINVAL` typically indicates it is not supported. + // However, further examination is required for tracing, extension, and lsm. + Some(EINVAL) => { + // At this point for tracing, extension, and lsm, loading failed due to unset + // `attach_btf_id`, so we examine verifier log for the target message. The + // message originated from `check_attach_btf_id()`[0] in v5.5 to v5.9, then + // moved to `bpf_check_attach_target()`[1] in v5.10 and onward. + // + // If target message is present in the logs, then loading process has reached + // up to the verifier section, which indicates that the kernel is at least + // aware of the program type variants. + // + // If the verifier log is empty, then it was immediately rejected by the + // kernel, meaning the types are not supported. + // + // [0] https://elixir.bootlin.com/linux/v5.5/source/kernel/bpf/verifier.c#L9535 + // [1] https://elixir.bootlin.com/linux/v5.9/source/kernel/bpf/verifier.c#L10849 + let supported = matches!( + verifier_log, + Some(verifier_log) if verifier_log.starts_with(b"Tracing programs must provide btf_id") + ); + Ok(supported) + } + // `E2BIG` from `bpf_check_uarg_tail_zero()`[0] indicates that the kernel detected + // non-zero fields in `bpf_attr` that does not exist at its current version. + // + // [0] https://elixir.bootlin.com/linux/v4.18/source/kernel/bpf/syscall.c#L71 + Some(E2BIG) => Ok(false), + // `ENOTSUPP` from `check_struct_ops_btf_id()`[0] indicates that it reached the + // verifier section, meaning the kernel is at least aware of the type's existence. + // + // Otherwise, it will produce `EINVAL`, meaning the type is immediately rejected + // and does not exist. + // + // [0] https://elixir.bootlin.com/linux/v5.6/source/kernel/bpf/verifier.c#L9740 + Some(524) if program_type == ProgramType::StructOps => Ok(true), + _ => Err(ProgramError::SyscallError(SyscallError { + call: "bpf_prog_load", + io_error, + })), + }, + Ok(prog_fd) => { + // Some arm64 kernels (notably < 6.4) can load LSM programs but cannot attach them: + // `bpf_raw_tracepoint_open` fails with `-ENOTSUPP`. Probe attach support + // explicitly. + // + // h/t to https://www.exein.io/blog/exploring-bpf-lsm-support-on-aarch64-with-ftrace. + // + // The same test for cGroup LSM programs would require attaching to a real cgroup, + // which is more involved and not possible in the general case. + if !matches!(program_type, ProgramType::Lsm(LsmAttachType::Mac)) { + Ok(true) + } else { + match bpf_raw_tracepoint_open(None, prog_fd.as_fd()) { + Ok(_) => Ok(true), + Err(io_error) => match io_error.raw_os_error() { + Some(524) => Ok(false), + _ => Err(ProgramError::SyscallError(SyscallError { + call: "bpf_raw_tracepoint_open", + io_error, + })), + }, + } + } + } + } + }) +} + +/// Whether the host kernel supports the [`MapType`]. +/// +/// # Examples +/// +/// ```no_run +/// # use aya::{maps::MapType, sys::is_map_supported}; +/// # +/// match is_map_supported(MapType::HashOfMaps) { +/// Ok(true) => println!("hash_of_maps supported :)"), +/// Ok(false) => println!("hash_of_maps not supported :("), +/// Err(err) => println!("unexpected error while probing: {:?}", err), +/// } +/// ``` +/// +/// # Errors +/// +/// Returns [`SyscallError`] if kernel probing fails with an unexpected error. +/// +/// Note that certain errors are expected and handled internally; only +/// unanticipated failures during probing will result in this error. +pub fn is_map_supported(map_type: MapType) -> Result { + // Each `bpf_map_ops` struct contains their own `.map_alloc()` & `.map_alloc_check()` that does + // field validation on map_create. + let (key_size, value_size, max_entries) = match map_type { + MapType::Unspecified => return Ok(false), + MapType::Hash // https://elixir.bootlin.com/linux/v3.19/source/kernel/bpf/hashtab.c#L349 + | MapType::PerCpuHash // https://elixir.bootlin.com/linux/v4.6/source/kernel/bpf/hashtab.c#L726 + | MapType::LruHash // https://elixir.bootlin.com/linux/v4.10/source/kernel/bpf/hashtab.c#L1032 + | MapType::LruPerCpuHash // https://elixir.bootlin.com/linux/v4.10/source/kernel/bpf/hashtab.c#L1133 + => (1, 1, 1), + MapType::Array // https://elixir.bootlin.com/linux/v3.19/source/kernel/bpf/arraymap.c#L138 + | MapType::PerCpuArray // https://elixir.bootlin.com/linux/v4.6/source/kernel/bpf/arraymap.c#L283 + => (4, 1, 1), + MapType::ProgramArray // https://elixir.bootlin.com/linux/v4.2/source/kernel/bpf/arraymap.c#L239 + | MapType::PerfEventArray // https://elixir.bootlin.com/linux/v4.3/source/kernel/bpf/arraymap.c#L312 + | MapType::CgroupArray // https://elixir.bootlin.com/linux/v4.8/source/kernel/bpf/arraymap.c#L562 + | MapType::ArrayOfMaps // https://elixir.bootlin.com/linux/v4.12/source/kernel/bpf/arraymap.c#L595 + | MapType::DevMap // https://elixir.bootlin.com/linux/v4.14/source/kernel/bpf/devmap.c#L360 + | MapType::SockMap // https://elixir.bootlin.com/linux/v4.14/source/kernel/bpf/sockmap.c#L874 + | MapType::CpuMap // https://elixir.bootlin.com/linux/v4.15/source/kernel/bpf/cpumap.c#L589 + | MapType::XskMap // https://elixir.bootlin.com/linux/v4.18/source/kernel/bpf/xskmap.c#L224 + | MapType::ReuseportSockArray // https://elixir.bootlin.com/linux/v4.20/source/kernel/bpf/reuseport_array.c#L357 + | MapType::DevMapHash // https://elixir.bootlin.com/linux/v5.4/source/kernel/bpf/devmap.c#L713 + => (4, 4, 1), + MapType::StackTrace // https://elixir.bootlin.com/linux/v4.6/source/kernel/bpf/stackmap.c#L272 + => (4, 8, 1), + MapType::LpmTrie // https://elixir.bootlin.com/linux/v4.11/source/kernel/bpf/lpm_trie.c#L509 + => (8, 1, 1), + MapType::HashOfMaps // https://elixir.bootlin.com/linux/v4.12/source/kernel/bpf/hashtab.c#L1301 + | MapType::SockHash // https://elixir.bootlin.com/linux/v4.18/source/kernel/bpf/sockmap.c#L2507 + => (1, 4, 1), + MapType::CgroupStorage // https://elixir.bootlin.com/linux/v4.19/source/kernel/bpf/local_storage.c#L246 + | MapType::PerCpuCgroupStorage // https://elixir.bootlin.com/linux/v4.20/source/kernel/bpf/local_storage.c#L313 + => (16, 1, 0), + MapType::Queue // https://elixir.bootlin.com/linux/v4.20/source/kernel/bpf/queue_stack_maps.c#L267 + | MapType::Stack // https://elixir.bootlin.com/linux/v4.20/source/kernel/bpf/queue_stack_maps.c#L280 + | MapType::BloomFilter // https://elixir.bootlin.com/linux/v5.16/source/kernel/bpf/bloom_filter.c#L193 + => (0, 1, 1), + MapType::SkStorage // https://elixir.bootlin.com/linux/v5.2/source/net/core/bpf_sk_storage.c#L779 + | MapType::InodeStorage // https://elixir.bootlin.com/linux/v5.10/source/kernel/bpf/bpf_inode_storage.c#L239 + | MapType::TaskStorage // https://elixir.bootlin.com/linux/v5.11/source/kernel/bpf/bpf_task_storage.c#L285 + | MapType::CgrpStorage // https://elixir.bootlin.com/linux/v6.2/source/kernel/bpf/bpf_cgrp_storage.c#L216 + => (4, 1, 0), + MapType::StructOps // https://elixir.bootlin.com/linux/v5.6/source/kernel/bpf/bpf_struct_ops.c#L607 + => (4, 0, 1), + MapType::RingBuf // https://elixir.bootlin.com/linux/v5.8/source/kernel/bpf/ringbuf.c#L296 + | MapType::UserRingBuf // https://elixir.bootlin.com/linux/v6.1/source/kernel/bpf/ringbuf.c#L356 + // `max_entries` is required to be multiple of kernel page size & power of 2: + // https://elixir.bootlin.com/linux/v5.8/source/kernel/bpf/ringbuf.c#L160 + => (0, 0, page_size() as u32), + MapType::Arena // https://elixir.bootlin.com/linux/v6.9/source/kernel/bpf/arena.c#L380 + => (0, 0, 1), + }; + + // SAFETY: all-zero byte-pattern valid for `bpf_attr` + let mut attr = unsafe { mem::zeroed::() }; + // SAFETY: union access + let u = unsafe { &mut attr.__bindgen_anon_1 }; + u.map_type = map_type as u32; + u.key_size = key_size; + u.value_size = value_size; + u.max_entries = max_entries; + + // Ensure that fd doesn't get dropped due to scoping for *_of_maps type. + let inner_map_fd: MockableFd; + match map_type { + // lpm_trie is required to not be pre-alloced[0]. + // + // https://elixir.bootlin.com/linux/v4.11/source/kernel/bpf/lpm_trie.c#L419 + MapType::LpmTrie => u.map_flags = BPF_F_NO_PREALLOC, + // For these types, we aim to intentionally trigger `EBADF` by supplying invalid btf attach + // data to verify the map type's existence. Otherwise, negative support will produce + // `EINVAL` instead. + MapType::SkStorage + | MapType::InodeStorage + | MapType::TaskStorage + | MapType::CgrpStorage => { + // These types are required to not be pre-alloced: + // - sk_storage: https://elixir.bootlin.com/linux/v5.2/source/net/core/bpf_sk_storage.c#L604 + // - inode_storage: https://elixir.bootlin.com/linux/v5.10/source/kernel/bpf/bpf_local_storage.c#L525 + // - task_storage: https://elixir.bootlin.com/linux/v5.11/source/kernel/bpf/bpf_local_storage.c#L527 + // - cgrp_storage: https://elixir.bootlin.com/linux/v6.2/source/kernel/bpf/bpf_local_storage.c#L539 + u.map_flags = BPF_F_NO_PREALLOC; + // Intentionally trigger `EBADF` from `btf_get_by_fd()`[0]. + // + // [0] https://elixir.bootlin.com/linux/v5.2/source/kernel/bpf/btf.c#L3428 + u.btf_fd = u32::MAX; + u.btf_key_type_id = 1; + u.btf_value_type_id = 1; + } + MapType::ArrayOfMaps | MapType::HashOfMaps => { + // SAFETY: all-zero byte-pattern valid for `bpf_attr` + let mut attr_map = unsafe { mem::zeroed::() }; + // SAFETY: union access + let u_map = unsafe { &mut attr_map.__bindgen_anon_1 }; + u_map.map_type = bpf_map_type::BPF_MAP_TYPE_HASH as u32; + u_map.key_size = 1; + u_map.value_size = 1; + u_map.max_entries = 1; + inner_map_fd = bpf_map_create(&mut attr_map).map_err(|io_error| SyscallError { + call: "bpf_map_create", + io_error, + })?; + + u.inner_map_fd = inner_map_fd.as_raw_fd() as u32; + } + // We aim to intentionally trigger `ENOTSUPP` by setting an invalid, non-zero + // `btf_vmlinux_value_type_id`. Negative support produce `EINVAL` instead. + MapType::StructOps => u.btf_vmlinux_value_type_id = 1, + // arena is required to be mmapable[0]. + // + // [0] https://elixir.bootlin.com/linux/v6.9/source/kernel/bpf/arena.c#L103 + MapType::Arena => u.map_flags = BPF_F_MMAPABLE, + _ => {} + } + + // SAFETY: BPF_MAP_CREATE returns a new file descriptor. + let io_error = match bpf_map_create(&mut attr) { + Ok(_fd) => return Ok(true), + Err(io_error) => io_error, + }; + + // sk_storage, struct_ops, inode_storage, task_storage, & cgrp_storage requires further + // examination to verify support. + match io_error.raw_os_error() { + Some(EINVAL) => Ok(false), + // These types use fields that may not exist at the kernel's current version. Supplying + // `bpf_attr` fields unknown to the kernel triggers `E2BIG` from `bpf_check_uarg_tail_zero()`[0]. + // + // [0] https://elixir.bootlin.com/linux/v4.18/source/kernel/bpf/syscall.c#L71 + Some(E2BIG) + if matches!( + map_type, + MapType::SkStorage + | MapType::StructOps + | MapType::InodeStorage + | MapType::TaskStorage + | MapType::CgrpStorage + ) => + { + Ok(false) + } + // For these types, `EBADF` from `btf_get_by_fd()`[0] indicates that map_create advanced + // far enough in the validation to recognize the type before being rejected. + // + // Otherwise, negative support produces `EINVAL`, meaning it was immediately rejected. + // + // [0] https://elixir.bootlin.com/linux/v5.2/source/kernel/bpf/btf.c#L3428 + Some(EBADF) + if matches!( + map_type, + MapType::SkStorage + | MapType::InodeStorage + | MapType::TaskStorage + | MapType::CgrpStorage + ) => + { + Ok(true) + } + // `ENOTSUPP` from `bpf_struct_ops_map_alloc()`[0] indicates that map_create advanced far + // enough in the validation to recognize the type before being rejected. + // + // Otherwise, negative support produces `EINVAL`, meaning it was immediately rejected. + // + // [0] https://elixir.bootlin.com/linux/v5.6/source/kernel/bpf/bpf_struct_ops.c#L557 + Some(524) if map_type == MapType::StructOps => Ok(true), + _ => Err(SyscallError { + call: "bpf_map_create", + io_error, + }), + } +} + +/// Whether `nr_map_ids` & `map_ids` fields in `bpf_prog_info` are supported. +pub(crate) fn is_prog_info_map_ids_supported() -> Result { + let fd = with_trivial_prog(ProgramType::SocketFilter, |attr| { + bpf_prog_load(attr).map_err(|io_error| { + ProgramError::SyscallError(SyscallError { + call: "bpf_prog_load", + io_error, + }) + }) + })?; + // SAFETY: all-zero byte-pattern valid for `bpf_prog_info` + let mut info = unsafe { mem::zeroed::() }; + info.nr_map_ids = 1; + + probe_bpf_info(fd, info).map_err(ProgramError::from) +} + +/// Tests whether `bpf_prog_info.gpl_compatible` field is supported. +pub(crate) fn is_prog_info_license_supported() -> Result { + let fd = with_trivial_prog(ProgramType::SocketFilter, |attr| { + bpf_prog_load(attr).map_err(|io_error| { + ProgramError::SyscallError(SyscallError { + call: "bpf_prog_load", + io_error, + }) + }) + })?; + // SAFETY: all-zero byte-pattern valid for `bpf_prog_info` + let mut info = unsafe { mem::zeroed::() }; + info.set_gpl_compatible(1); + + probe_bpf_info(fd, info).map_err(ProgramError::from) +} + +/// Probes program and map info. +fn probe_bpf_info(fd: MockableFd, info: T) -> Result { + // SAFETY: all-zero byte-pattern valid for `bpf_attr` + let mut attr = unsafe { mem::zeroed::() }; + attr.info.bpf_fd = fd.as_raw_fd() as u32; + attr.info.info_len = mem::size_of_val(&info) as u32; + attr.info.info = ptr::from_ref(&info) as u64; + + let io_error = match unit_sys_bpf(bpf_cmd::BPF_OBJ_GET_INFO_BY_FD, &mut attr) { + Ok(()) => return Ok(true), + Err(io_error) => io_error, + }; + match io_error.raw_os_error() { + // `E2BIG` from `bpf_check_uarg_tail_zero()` + Some(E2BIG) => Ok(false), + _ => Err(SyscallError { + call: "bpf_obj_get_info_by_fd", + io_error, + }), + } +} diff --git a/aya/src/sys/mod.rs b/aya/src/sys/mod.rs index ab486195..ee6a3af9 100644 --- a/aya/src/sys/mod.rs +++ b/aya/src/sys/mod.rs @@ -1,4 +1,7 @@ +//! A collection of system calls for performing eBPF related operations. + mod bpf; +pub(crate) mod feature_probe; mod netlink; mod perf_event; @@ -7,24 +10,32 @@ mod fake; use std::{ ffi::{c_int, c_void}, - io, mem, - os::fd::{AsRawFd as _, BorrowedFd}, + io, + os::fd::{BorrowedFd, OwnedFd}, }; +use aya_obj::generated::{bpf_attr, bpf_cmd, perf_event_attr}; pub(crate) use bpf::*; #[cfg(test)] pub(crate) use fake::*; -use libc::{pid_t, SYS_bpf, SYS_perf_event_open}; +pub use feature_probe::{is_map_supported, is_program_supported}; #[doc(hidden)] pub use netlink::netlink_set_link_up; pub(crate) use netlink::*; pub(crate) use perf_event::*; use thiserror::Error; -use crate::generated::{bpf_attr, bpf_cmd, perf_event_attr}; +pub(crate) type SysResult = Result; -pub(crate) type SysResult = Result; +#[cfg_attr(test, expect(dead_code))] +#[derive(Debug)] +pub(crate) enum PerfEventIoctlRequest<'a> { + Enable, + Disable, + SetBpf(BorrowedFd<'a>), +} +#[cfg_attr(test, expect(dead_code))] pub(crate) enum Syscall<'a> { Ebpf { cmd: bpf_cmd, @@ -32,18 +43,18 @@ pub(crate) enum Syscall<'a> { }, PerfEventOpen { attr: perf_event_attr, - pid: pid_t, + pid: libc::pid_t, cpu: i32, group: i32, flags: u32, }, PerfEventIoctl { fd: BorrowedFd<'a>, - request: c_int, - arg: c_int, + request: PerfEventIoctlRequest<'a>, }, } +/// A system call error. #[derive(Debug, Error)] #[error("`{call}` failed")] pub struct SyscallError { @@ -76,26 +87,27 @@ impl std::fmt::Debug for Syscall<'_> { .field("group", group) .field("flags", flags) .finish(), - Self::PerfEventIoctl { fd, request, arg } => f + Self::PerfEventIoctl { fd, request } => f .debug_struct("Syscall::PerfEventIoctl") .field("fd", fd) .field("request", request) - .field("arg", arg) .finish(), } } } -fn syscall(call: Syscall<'_>) -> SysResult { +fn syscall(call: Syscall<'_>) -> SysResult { #[cfg(test)] - return TEST_SYSCALL.with(|test_impl| unsafe { test_impl.borrow()(call) }); + { + TEST_SYSCALL.with(|test_impl| unsafe { test_impl.borrow()(call) }) + } - #[cfg_attr(test, allow(unreachable_code))] + #[cfg(not(test))] { let ret = unsafe { match call { Syscall::Ebpf { cmd, attr } => { - libc::syscall(SYS_bpf, cmd, attr, mem::size_of::()) + libc::syscall(libc::SYS_bpf, cmd, attr, std::mem::size_of::()) } Syscall::PerfEventOpen { attr, @@ -103,26 +115,44 @@ fn syscall(call: Syscall<'_>) -> SysResult { cpu, group, flags, - } => libc::syscall(SYS_perf_event_open, &attr, pid, cpu, group, flags), - Syscall::PerfEventIoctl { fd, request, arg } => { - let ret = libc::ioctl(fd.as_raw_fd(), request.try_into().unwrap(), arg); - // `libc::ioctl` returns i32 on x86_64 while `libc::syscall` returns i64. - #[allow(clippy::useless_conversion)] - ret.into() + } => libc::syscall(libc::SYS_perf_event_open, &attr, pid, cpu, group, flags), + Syscall::PerfEventIoctl { fd, request } => { + use std::os::fd::AsRawFd as _; + + let fd = fd.as_raw_fd(); + match request { + PerfEventIoctlRequest::Enable => libc::syscall( + libc::SYS_ioctl, + fd, + aya_obj::generated::PERF_EVENT_IOC_ENABLE, + ), + PerfEventIoctlRequest::Disable => libc::syscall( + libc::SYS_ioctl, + fd, + aya_obj::generated::PERF_EVENT_IOC_DISABLE, + ), + PerfEventIoctlRequest::SetBpf(bpf_fd) => libc::syscall( + libc::SYS_ioctl, + fd, + aya_obj::generated::PERF_EVENT_IOC_SET_BPF, + bpf_fd.as_raw_fd(), + ), + } } } }; - - // `libc::syscall` returns i32 on armv7. + // c_long is i32 on armv7. #[allow(clippy::useless_conversion)] - match ret.into() { - ret @ 0.. => Ok(ret), + let ret: i64 = ret.into(); + + match ret { + 0.. => Ok(ret), ret => Err((ret, io::Error::last_os_error())), } } } -#[cfg_attr(test, allow(unused_variables))] +#[cfg_attr(test, expect(unused_variables))] pub(crate) unsafe fn mmap( addr: *mut c_void, len: usize, @@ -131,9 +161,79 @@ pub(crate) unsafe fn mmap( fd: BorrowedFd<'_>, offset: libc::off_t, ) -> *mut c_void { + #[cfg(test)] + { + TEST_MMAP_RET.with(|ret| *ret.borrow()) + } + #[cfg(not(test))] - return libc::mmap(addr, len, prot, flags, fd.as_raw_fd(), offset); + { + use std::os::fd::AsRawFd as _; + + unsafe { libc::mmap(addr, len, prot, flags, fd.as_raw_fd(), offset) } + } +} +#[cfg_attr(test, expect(unused_variables))] +pub(crate) unsafe fn munmap(addr: *mut c_void, len: usize) -> c_int { #[cfg(test)] - TEST_MMAP_RET.with(|ret| *ret.borrow()) + { + 0 + } + + #[cfg(not(test))] + { + unsafe { libc::munmap(addr, len) } + } +} + +/// The type of eBPF statistic to enable. +#[non_exhaustive] +#[doc(alias = "bpf_stats_type")] +#[derive(Copy, Clone, Debug)] +pub enum Stats { + /// Tracks [`run_time`](crate::programs::ProgramInfo::run_time) and + /// [`run_count`](crate::programs::ProgramInfo::run_count) fields. + #[doc(alias = "BPF_STATS_RUN_TIME")] + RunTime, +} + +impl From for aya_obj::generated::bpf_stats_type { + fn from(value: Stats) -> Self { + use aya_obj::generated::bpf_stats_type::*; + + match value { + Stats::RunTime => BPF_STATS_RUN_TIME, + } + } +} + +/// Enable global statistics tracking for eBPF programs and returns a +/// [file descriptor](`OwnedFd`) handler. +/// +/// Statistics tracking is disabled when the [file descriptor](`OwnedFd`) is +/// dropped (either automatically when the variable goes out of scope or +/// manually through [`Drop`]). +/// +/// Usage: +/// 1. Obtain fd from [`enable_stats`] and bind it to a variable. +/// 2. Record the statistic of interest. +/// 3. Wait for a recorded period of time. +/// 4. Record the statistic of interest again, and calculate the difference. +/// 5. Close/release fd automatically or manually. +/// +/// Introduced in kernel v5.8. +/// +/// # Examples +/// +/// ```no_run +/// # use aya::sys::{SyscallError}; +/// use aya::sys::{enable_stats, Stats}; +/// +/// let _fd = enable_stats(Stats::RunTime)?; +/// # Ok::<(), SyscallError>(()) +/// ``` +#[doc(alias = "BPF_ENABLE_STATS")] +pub fn enable_stats(stats_type: Stats) -> Result { + bpf_enable_stats(stats_type.into()).map(|fd| fd.into_inner()) } diff --git a/aya/src/sys/netlink.rs b/aya/src/sys/netlink.rs index f10c2839..a7b7ba00 100644 --- a/aya/src/sys/netlink.rs +++ b/aya/src/sys/netlink.rs @@ -2,31 +2,66 @@ use std::{ collections::HashMap, ffi::CStr, io, mem, - os::fd::{AsRawFd as _, BorrowedFd, FromRawFd as _, OwnedFd}, + os::fd::{AsRawFd as _, BorrowedFd, FromRawFd as _}, ptr, slice, }; +use aya_obj::generated::{ + IFLA_XDP_EXPECTED_FD, IFLA_XDP_FD, IFLA_XDP_FLAGS, NLMSG_ALIGNTO, TC_H_CLSACT, TC_H_INGRESS, + TC_H_MAJ_MASK, TC_H_UNSPEC, TCA_BPF_FD, TCA_BPF_FLAG_ACT_DIRECT, TCA_BPF_FLAGS, TCA_BPF_NAME, + TCA_KIND, TCA_OPTIONS, XDP_FLAGS_REPLACE, ifinfomsg, nlmsgerr_attrs::NLMSGERR_ATTR_MSG, tcmsg, +}; use libc::{ - getsockname, nlattr, nlmsgerr, nlmsghdr, recv, send, setsockopt, sockaddr_nl, socket, - AF_NETLINK, AF_UNSPEC, ETH_P_ALL, IFF_UP, IFLA_XDP, NETLINK_EXT_ACK, NETLINK_ROUTE, - NLA_ALIGNTO, NLA_F_NESTED, NLA_TYPE_MASK, NLMSG_DONE, NLMSG_ERROR, NLM_F_ACK, NLM_F_CREATE, - NLM_F_DUMP, NLM_F_ECHO, NLM_F_EXCL, NLM_F_MULTI, NLM_F_REQUEST, RTM_DELTFILTER, RTM_GETTFILTER, - RTM_NEWQDISC, RTM_NEWTFILTER, RTM_SETLINK, SOCK_RAW, SOL_NETLINK, + AF_NETLINK, AF_UNSPEC, ETH_P_ALL, IFF_UP, IFLA_XDP, NETLINK_CAP_ACK, NETLINK_EXT_ACK, + NETLINK_ROUTE, NLA_ALIGNTO, NLA_F_NESTED, NLA_TYPE_MASK, NLM_F_ACK, NLM_F_CREATE, NLM_F_DUMP, + NLM_F_ECHO, NLM_F_EXCL, NLM_F_MULTI, NLM_F_REQUEST, NLMSG_DONE, NLMSG_ERROR, RTM_DELTFILTER, + RTM_GETTFILTER, RTM_NEWQDISC, RTM_NEWTFILTER, RTM_SETLINK, SOCK_RAW, SOL_NETLINK, getsockname, + nlattr, nlmsgerr, nlmsghdr, recv, send, setsockopt, sockaddr_nl, socket, }; use thiserror::Error; use crate::{ - generated::{ - ifinfomsg, tcmsg, IFLA_XDP_EXPECTED_FD, IFLA_XDP_FD, IFLA_XDP_FLAGS, NLMSG_ALIGNTO, - TCA_BPF_FD, TCA_BPF_FLAGS, TCA_BPF_FLAG_ACT_DIRECT, TCA_BPF_NAME, TCA_KIND, TCA_OPTIONS, - TC_H_CLSACT, TC_H_INGRESS, TC_H_MAJ_MASK, TC_H_UNSPEC, XDP_FLAGS_REPLACE, - }, + Pod, programs::TcAttachType, - util::tc_handler_make, + util::{bytes_of, tc_handler_make}, }; const NLA_HDR_LEN: usize = align_to(mem::size_of::(), NLA_ALIGNTO as usize); +/// A private error type for internal use in this module. +#[derive(Error, Debug)] +pub(crate) enum NetlinkErrorInternal { + #[error("netlink error: {message}")] + Error { + message: String, + #[source] + source: io::Error, + }, + #[error(transparent)] + IoError(#[from] io::Error), + #[error(transparent)] + NlAttrError(#[from] NlAttrError), +} + +/// An error occurred during a netlink operation. +#[derive(Error, Debug)] +#[error(transparent)] +pub struct NetlinkError(#[from] NetlinkErrorInternal); + +impl NetlinkError { + pub fn raw_os_error(&self) -> Option { + let Self(inner) = self; + match inner { + NetlinkErrorInternal::Error { source, .. } => source.raw_os_error(), + NetlinkErrorInternal::IoError(err) => err.raw_os_error(), + NetlinkErrorInternal::NlAttrError(err) => match err { + NlAttrError::InvalidBufferLength { .. } + | NlAttrError::InvalidHeaderLength { .. } => None, + }, + } + } +} + // Safety: marking this as unsafe overall because of all the pointer math required to comply with // netlink alignments pub(crate) unsafe fn netlink_set_xdp_fd( @@ -34,11 +69,11 @@ pub(crate) unsafe fn netlink_set_xdp_fd( fd: Option>, old_fd: Option>, flags: u32, -) -> Result<(), io::Error> { +) -> Result<(), NetlinkError> { let sock = NetlinkSocket::open()?; // Safety: Request is POD so this is safe - let mut req = mem::zeroed::(); + let mut req = unsafe { mem::zeroed::() }; let nlmsg_len = mem::size_of::() + mem::size_of::(); req.header = nlmsghdr { @@ -52,38 +87,44 @@ pub(crate) unsafe fn netlink_set_xdp_fd( req.if_info.ifi_index = if_index; // write the attrs - let attrs_buf = request_attributes(&mut req, nlmsg_len); + let attrs_buf = unsafe { request_attributes(&mut req, nlmsg_len) }; let mut attrs = NestedAttrs::new(attrs_buf, IFLA_XDP); - attrs.write_attr( - IFLA_XDP_FD as u16, - fd.map(|fd| fd.as_raw_fd()).unwrap_or(-1), - )?; + attrs + .write_attr( + IFLA_XDP_FD as u16, + fd.map(|fd| fd.as_raw_fd()).unwrap_or(-1), + ) + .map_err(|e| NetlinkError(NetlinkErrorInternal::IoError(e)))?; if flags > 0 { - attrs.write_attr(IFLA_XDP_FLAGS as u16, flags)?; + attrs + .write_attr(IFLA_XDP_FLAGS as u16, flags) + .map_err(|e| NetlinkError(NetlinkErrorInternal::IoError(e)))?; } if flags & XDP_FLAGS_REPLACE != 0 { - attrs.write_attr( - IFLA_XDP_EXPECTED_FD as u16, - old_fd.map(|fd| fd.as_raw_fd()).unwrap(), - )?; + attrs + .write_attr( + IFLA_XDP_EXPECTED_FD as u16, + old_fd.map(|fd| fd.as_raw_fd()).unwrap(), + ) + .map_err(|e| NetlinkError(NetlinkErrorInternal::IoError(e)))?; } - let nla_len = attrs.finish()?; + let nla_len = attrs + .finish() + .map_err(|e| NetlinkError(NetlinkErrorInternal::IoError(e)))?; req.header.nlmsg_len += align_to(nla_len, NLA_ALIGNTO as usize) as u32; sock.send(&bytes_of(&req)[..req.header.nlmsg_len as usize])?; - sock.recv()?; - Ok(()) } -pub(crate) unsafe fn netlink_qdisc_add_clsact(if_index: i32) -> Result<(), io::Error> { +pub(crate) unsafe fn netlink_qdisc_add_clsact(if_index: i32) -> Result<(), NetlinkError> { let sock = NetlinkSocket::open()?; - let mut req = mem::zeroed::(); + let mut req = unsafe { mem::zeroed::() }; let nlmsg_len = mem::size_of::() + mem::size_of::(); req.header = nlmsghdr { @@ -100,8 +141,9 @@ pub(crate) unsafe fn netlink_qdisc_add_clsact(if_index: i32) -> Result<(), io::E req.tc_info.tcm_info = 0; // add the TCA_KIND attribute - let attrs_buf = request_attributes(&mut req, nlmsg_len); - let attr_len = write_attr_bytes(attrs_buf, 0, TCA_KIND as u16, b"clsact\0")?; + let attrs_buf = unsafe { request_attributes(&mut req, nlmsg_len) }; + let attr_len = write_attr_bytes(attrs_buf, 0, TCA_KIND as u16, b"clsact\0") + .map_err(|e| NetlinkError(NetlinkErrorInternal::IoError(e)))?; req.header.nlmsg_len += align_to(attr_len, NLA_ALIGNTO as usize) as u32; sock.send(&bytes_of(&req)[..req.header.nlmsg_len as usize])?; @@ -118,9 +160,10 @@ pub(crate) unsafe fn netlink_qdisc_attach( priority: u16, handle: u32, create: bool, -) -> Result<(u16, u32), io::Error> { +) -> Result<(u16, u32), NetlinkError> { let sock = NetlinkSocket::open()?; - let mut req = mem::zeroed::(); + + let mut req = unsafe { mem::zeroed::() }; let nlmsg_len = mem::size_of::() + mem::size_of::(); // When create=true, we're creating a new attachment so we must set NLM_F_CREATE. Then we also @@ -146,40 +189,51 @@ pub(crate) unsafe fn netlink_qdisc_attach( req.tc_info.tcm_family = AF_UNSPEC as u8; req.tc_info.tcm_handle = handle; // auto-assigned, if zero req.tc_info.tcm_ifindex = if_index; - req.tc_info.tcm_parent = attach_type.parent(); - req.tc_info.tcm_info = tc_handler_make((priority as u32) << 16, htons(ETH_P_ALL as u16) as u32); + req.tc_info.tcm_parent = attach_type.tc_parent(); + req.tc_info.tcm_info = tc_handler_make( + u32::from(priority) << 16, + u32::from(htons(ETH_P_ALL as u16)), + ); - let attrs_buf = request_attributes(&mut req, nlmsg_len); + let attrs_buf = unsafe { request_attributes(&mut req, nlmsg_len) }; // add TCA_KIND - let kind_len = write_attr_bytes(attrs_buf, 0, TCA_KIND as u16, b"bpf\0")?; + let kind_len = write_attr_bytes(attrs_buf, 0, TCA_KIND as u16, b"bpf\0") + .map_err(|e| NetlinkError(NetlinkErrorInternal::IoError(e)))?; // add TCA_OPTIONS which includes TCA_BPF_FD, TCA_BPF_NAME and TCA_BPF_FLAGS let mut options = NestedAttrs::new(&mut attrs_buf[kind_len..], TCA_OPTIONS as u16); - options.write_attr(TCA_BPF_FD as u16, prog_fd)?; - options.write_attr_bytes(TCA_BPF_NAME as u16, prog_name.to_bytes_with_nul())?; + options + .write_attr(TCA_BPF_FD as u16, prog_fd.as_raw_fd()) + .map_err(|e| NetlinkError(NetlinkErrorInternal::IoError(e)))?; + options + .write_attr_bytes(TCA_BPF_NAME as u16, prog_name.to_bytes_with_nul()) + .map_err(|e| NetlinkError(NetlinkErrorInternal::IoError(e)))?; let flags: u32 = TCA_BPF_FLAG_ACT_DIRECT; - options.write_attr(TCA_BPF_FLAGS as u16, flags)?; - let options_len = options.finish()?; + options + .write_attr(TCA_BPF_FLAGS as u16, flags) + .map_err(|e| NetlinkError(NetlinkErrorInternal::IoError(e)))?; + let options_len = options + .finish() + .map_err(|e| NetlinkError(NetlinkErrorInternal::IoError(e)))?; req.header.nlmsg_len += align_to(kind_len + options_len, NLA_ALIGNTO as usize) as u32; sock.send(&bytes_of(&req)[..req.header.nlmsg_len as usize])?; // find the RTM_NEWTFILTER reply and read the tcm_info and tcm_handle fields // which we'll need to detach - let tc_msg = match sock + let tc_msg: tcmsg = match sock .recv()? .iter() .find(|reply| reply.header.nlmsg_type == RTM_NEWTFILTER) { - Some(reply) => ptr::read_unaligned(reply.data.as_ptr() as *const tcmsg), + Some(reply) => unsafe { ptr::read_unaligned(reply.data.as_ptr().cast()) }, None => { // if sock.recv() succeeds we should never get here unless there's a // bug in the kernel - return Err(io::Error::new( - io::ErrorKind::Other, - "no RTM_NEWTFILTER reply received, this is a bug.", - )); + return Err(NetlinkError(NetlinkErrorInternal::IoError( + io::Error::other("no RTM_NEWTFILTER reply received, this is a bug."), + ))); } }; @@ -192,9 +246,10 @@ pub(crate) unsafe fn netlink_qdisc_detach( attach_type: &TcAttachType, priority: u16, handle: u32, -) -> Result<(), io::Error> { +) -> Result<(), NetlinkError> { let sock = NetlinkSocket::open()?; - let mut req = mem::zeroed::(); + + let mut req = unsafe { mem::zeroed::() }; req.header = nlmsghdr { nlmsg_len: (mem::size_of::() + mem::size_of::()) as u32, @@ -206,8 +261,11 @@ pub(crate) unsafe fn netlink_qdisc_detach( req.tc_info.tcm_family = AF_UNSPEC as u8; req.tc_info.tcm_handle = handle; // auto-assigned, if zero - req.tc_info.tcm_info = tc_handler_make((priority as u32) << 16, htons(ETH_P_ALL as u16) as u32); - req.tc_info.tcm_parent = attach_type.parent(); + req.tc_info.tcm_info = tc_handler_make( + u32::from(priority) << 16, + u32::from(htons(ETH_P_ALL as u16)), + ); + req.tc_info.tcm_parent = attach_type.tc_parent(); req.tc_info.tcm_ifindex = if_index; sock.send(&bytes_of(&req)[..req.header.nlmsg_len as usize])?; @@ -222,8 +280,8 @@ pub(crate) unsafe fn netlink_find_filter_with_name( if_index: i32, attach_type: TcAttachType, name: &CStr, -) -> Result, io::Error> { - let mut req = mem::zeroed::(); +) -> Result, NetlinkError> { + let mut req = unsafe { mem::zeroed::() }; let nlmsg_len = mem::size_of::() + mem::size_of::(); req.header = nlmsghdr { @@ -236,7 +294,7 @@ pub(crate) unsafe fn netlink_find_filter_with_name( req.tc_info.tcm_family = AF_UNSPEC as u8; req.tc_info.tcm_handle = 0; // auto-assigned, if zero req.tc_info.tcm_ifindex = if_index; - req.tc_info.tcm_parent = attach_type.parent(); + req.tc_info.tcm_parent = attach_type.tc_parent(); let sock = NetlinkSocket::open()?; sock.send(&bytes_of(&req)[..req.header.nlmsg_len as usize])?; @@ -247,12 +305,14 @@ pub(crate) unsafe fn netlink_find_filter_with_name( continue; } - let tc_msg = ptr::read_unaligned(msg.data.as_ptr() as *const tcmsg); + let tc_msg: tcmsg = unsafe { ptr::read_unaligned(msg.data.as_ptr().cast()) }; let priority = (tc_msg.tcm_info >> 16) as u16; - let attrs = parse_attrs(&msg.data[mem::size_of::()..])?; + let attrs = parse_attrs(&msg.data[mem::size_of::()..]) + .map_err(|e| NetlinkError(NetlinkErrorInternal::NlAttrError(e)))?; if let Some(opts) = attrs.get(&(TCA_OPTIONS as u16)) { - let opts = parse_attrs(opts.data)?; + let opts = parse_attrs(opts.data) + .map_err(|e| NetlinkError(NetlinkErrorInternal::NlAttrError(e)))?; if let Some(f_name) = opts.get(&(TCA_BPF_NAME as u16)) { if let Ok(f_name) = CStr::from_bytes_with_nul(f_name.data) { if name == f_name { @@ -267,11 +327,11 @@ pub(crate) unsafe fn netlink_find_filter_with_name( } #[doc(hidden)] -pub unsafe fn netlink_set_link_up(if_index: i32) -> Result<(), io::Error> { +pub unsafe fn netlink_set_link_up(if_index: i32) -> Result<(), NetlinkError> { let sock = NetlinkSocket::open()?; // Safety: Request is POD so this is safe - let mut req = mem::zeroed::(); + let mut req = unsafe { mem::zeroed::() }; let nlmsg_len = mem::size_of::() + mem::size_of::(); req.header = nlmsghdr { @@ -292,6 +352,7 @@ pub unsafe fn netlink_set_link_up(if_index: i32) -> Result<(), io::Error> { Ok(()) } +#[derive(Copy, Clone)] #[repr(C)] struct Request { header: nlmsghdr, @@ -299,6 +360,9 @@ struct Request { attrs: [u8; 64], } +unsafe impl Pod for Request {} + +#[derive(Copy, Clone)] #[repr(C)] struct TcRequest { header: nlmsghdr, @@ -306,31 +370,49 @@ struct TcRequest { attrs: [u8; 64], } +unsafe impl Pod for TcRequest {} + struct NetlinkSocket { - sock: OwnedFd, + sock: crate::MockableFd, _nl_pid: u32, } impl NetlinkSocket { - fn open() -> Result { + fn open() -> Result { // Safety: libc wrapper let sock = unsafe { socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE) }; if sock < 0 { - return Err(io::Error::last_os_error()); + return Err(NetlinkErrorInternal::IoError(io::Error::last_os_error())); } // SAFETY: `socket` returns a file descriptor. - let sock = unsafe { OwnedFd::from_raw_fd(sock) }; + let sock = unsafe { crate::MockableFd::from_raw_fd(sock) }; let enable = 1i32; // Safety: libc wrapper unsafe { - setsockopt( + // Set NETLINK_EXT_ACK to get extended attributes. + if setsockopt( sock.as_raw_fd(), SOL_NETLINK, NETLINK_EXT_ACK, - &enable as *const _ as *const _, - mem::size_of::() as u32, - ) + std::ptr::from_ref(&enable).cast(), + mem::size_of_val(&enable) as u32, + ) < 0 + { + return Err(NetlinkErrorInternal::IoError(io::Error::last_os_error())); + }; + + // Set NETLINK_CAP_ACK to avoid getting copies of request payload. + if setsockopt( + sock.as_raw_fd(), + SOL_NETLINK, + NETLINK_CAP_ACK, + std::ptr::from_ref(&enable).cast(), + mem::size_of_val(&enable) as u32, + ) < 0 + { + return Err(NetlinkErrorInternal::IoError(io::Error::last_os_error())); + }; }; // Safety: sockaddr_nl is POD so this is safe @@ -341,12 +423,12 @@ impl NetlinkSocket { if unsafe { getsockname( sock.as_raw_fd(), - &mut addr as *mut _ as *mut _, - &mut addr_len as *mut _, + std::ptr::from_mut(&mut addr).cast(), + std::ptr::from_mut(&mut addr_len).cast(), ) } < 0 { - return Err(io::Error::last_os_error()); + return Err(NetlinkErrorInternal::IoError(io::Error::last_os_error())); } Ok(Self { @@ -355,38 +437,23 @@ impl NetlinkSocket { }) } - fn send(&self, msg: &[u8]) -> Result<(), io::Error> { - if unsafe { - send( - self.sock.as_raw_fd(), - msg.as_ptr() as *const _, - msg.len(), - 0, - ) - } < 0 - { - return Err(io::Error::last_os_error()); + fn send(&self, msg: &[u8]) -> Result<(), NetlinkErrorInternal> { + if unsafe { send(self.sock.as_raw_fd(), msg.as_ptr().cast(), msg.len(), 0) } < 0 { + return Err(NetlinkErrorInternal::IoError(io::Error::last_os_error())); } Ok(()) } - fn recv(&self) -> Result, io::Error> { + fn recv(&self) -> Result, NetlinkErrorInternal> { let mut buf = [0u8; 4096]; let mut messages = Vec::new(); let mut multipart = true; 'out: while multipart { multipart = false; // Safety: libc wrapper - let len = unsafe { - recv( - self.sock.as_raw_fd(), - buf.as_mut_ptr() as *mut _, - buf.len(), - 0, - ) - }; + let len = unsafe { recv(self.sock.as_raw_fd(), buf.as_mut_ptr().cast(), buf.len(), 0) }; if len < 0 { - return Err(io::Error::last_os_error()); + return Err(NetlinkErrorInternal::IoError(io::Error::last_os_error())); } if len == 0 { break; @@ -398,14 +465,29 @@ impl NetlinkSocket { let message = NetlinkMessage::read(&buf[offset..])?; offset += align_to(message.header.nlmsg_len as usize, NLMSG_ALIGNTO as usize); multipart = message.header.nlmsg_flags & NLM_F_MULTI as u16 != 0; - match message.header.nlmsg_type as i32 { + match i32::from(message.header.nlmsg_type) { NLMSG_ERROR => { let err = message.error.unwrap(); if err.error == 0 { // this is an ACK continue; } - return Err(io::Error::from_raw_os_error(-err.error)); + let attrs = parse_attrs(&message.data)?; + let err_msg = attrs.get(&(NLMSGERR_ATTR_MSG as u16)).and_then(|msg| { + CStr::from_bytes_with_nul(msg.data) + .ok() + .map(|s| s.to_string_lossy().into_owned()) + }); + let e = match err_msg { + Some(err_msg) => NetlinkErrorInternal::Error { + message: err_msg, + source: io::Error::from_raw_os_error(-err.error), + }, + None => NetlinkErrorInternal::IoError(io::Error::from_raw_os_error( + -err.error, + )), + }; + return Err(e); } NLMSG_DONE => break 'out, _ => messages.push(message), @@ -426,45 +508,39 @@ struct NetlinkMessage { impl NetlinkMessage { fn read(buf: &[u8]) -> Result { if mem::size_of::() > buf.len() { - return Err(io::Error::new( - io::ErrorKind::Other, - "buffer smaller than nlmsghdr", - )); + return Err(io::Error::other("buffer smaller than nlmsghdr")); } // Safety: nlmsghdr is POD so read is safe - let header = unsafe { ptr::read_unaligned(buf.as_ptr() as *const nlmsghdr) }; + let header: nlmsghdr = unsafe { ptr::read_unaligned(buf.as_ptr().cast()) }; let msg_len = header.nlmsg_len as usize; if msg_len < mem::size_of::() || msg_len > buf.len() { - return Err(io::Error::new(io::ErrorKind::Other, "invalid nlmsg_len")); + return Err(io::Error::other("invalid nlmsg_len")); } let data_offset = align_to(mem::size_of::(), NLMSG_ALIGNTO as usize); if data_offset >= buf.len() { - return Err(io::Error::new(io::ErrorKind::Other, "need more data")); + return Err(io::Error::other("need more data")); } - let (data, error) = if header.nlmsg_type == NLMSG_ERROR as u16 { + let (rest, error) = if header.nlmsg_type == NLMSG_ERROR as u16 { if data_offset + mem::size_of::() > buf.len() { - return Err(io::Error::new( - io::ErrorKind::Other, + return Err(io::Error::other( "NLMSG_ERROR but not enough space for nlmsgerr", )); } ( - Vec::new(), + &buf[data_offset + mem::size_of::()..msg_len], // Safety: nlmsgerr is POD so read is safe - Some(unsafe { - ptr::read_unaligned(buf[data_offset..].as_ptr() as *const nlmsgerr) - }), + Some(unsafe { ptr::read_unaligned(buf[data_offset..].as_ptr().cast()) }), ) } else { - (buf[data_offset..msg_len].to_vec(), None) + (&buf[data_offset..msg_len], None) }; Ok(Self { header, - data, + data: rest.to_vec(), error, }) } @@ -493,7 +569,7 @@ impl<'a> NestedAttrs<'a> { } } - fn write_attr(&mut self, attr_type: u16, value: T) -> Result { + fn write_attr(&mut self, attr_type: u16, value: T) -> Result { let size = write_attr(self.buf, self.offset, attr_type, value)?; self.offset += size; Ok(size) @@ -517,14 +593,13 @@ impl<'a> NestedAttrs<'a> { } } -fn write_attr( +fn write_attr( buf: &mut [u8], offset: usize, attr_type: u16, value: T, ) -> Result { - let value = - unsafe { slice::from_raw_parts(&value as *const _ as *const _, mem::size_of::()) }; + let value = bytes_of(&value); write_attr_bytes(buf, offset, attr_type, value) } @@ -545,10 +620,10 @@ fn write_attr_bytes( Ok(NLA_HDR_LEN + value_len) } -fn write_attr_header(buf: &mut [u8], offset: usize, attr: nlattr) -> Result { - let attr = - unsafe { slice::from_raw_parts(&attr as *const _ as *const _, mem::size_of::()) }; +unsafe impl Pod for nlattr {} +fn write_attr_header(buf: &mut [u8], offset: usize, attr: nlattr) -> Result { + let attr = bytes_of(&attr); write_bytes(buf, offset, attr)?; Ok(NLA_HDR_LEN) } @@ -556,7 +631,7 @@ fn write_attr_header(buf: &mut [u8], offset: usize, attr: nlattr) -> Result Result { let align_len = align_to(value.len(), NLA_ALIGNTO as usize); if offset + align_len > buf.len() { - return Err(io::Error::new(io::ErrorKind::Other, "no space left")); + return Err(io::Error::other("no space left")); } buf[offset..offset + value.len()].copy_from_slice(value); @@ -592,7 +667,7 @@ impl<'a> Iterator for NlAttrsIterator<'a> { })); } - let attr = unsafe { ptr::read_unaligned(buf.as_ptr() as *const nlattr) }; + let attr: nlattr = unsafe { ptr::read_unaligned(buf.as_ptr().cast()) }; let len = attr.nla_len as usize; let align_len = align_to(len, NLA_ALIGNTO as usize); if len < NLA_HDR_LEN { @@ -628,7 +703,7 @@ struct NlAttr<'a> { } #[derive(Debug, Error, PartialEq, Eq)] -enum NlAttrError { +pub(crate) enum NlAttrError { #[error("invalid buffer size `{size}`, expected `{expected}`")] InvalidBufferLength { size: usize, expected: usize }, @@ -636,21 +711,14 @@ enum NlAttrError { InvalidHeaderLength(usize), } -impl From for io::Error { - fn from(e: NlAttrError) -> Self { - Self::new(io::ErrorKind::Other, e) - } -} - unsafe fn request_attributes(req: &mut T, msg_len: usize) -> &mut [u8] { - let attrs_addr = align_to(req as *mut _ as usize + msg_len, NLMSG_ALIGNTO as usize); - let attrs_end = req as *mut _ as usize + mem::size_of::(); - slice::from_raw_parts_mut(attrs_addr as *mut u8, attrs_end - attrs_addr) -} - -fn bytes_of(val: &T) -> &[u8] { - let size = mem::size_of::(); - unsafe { slice::from_raw_parts(slice::from_ref(val).as_ptr().cast(), size) } + let req: *mut _ = req; + let req: *mut u8 = req.cast(); + let attrs_addr = unsafe { req.add(msg_len) }; + let align_offset = attrs_addr.align_offset(NLMSG_ALIGNTO as usize); + let attrs_addr = unsafe { attrs_addr.add(align_offset) }; + let len = mem::size_of::() - msg_len - align_offset; + unsafe { slice::from_raw_parts_mut(attrs_addr, len) } } #[cfg(test)] @@ -676,28 +744,32 @@ mod tests { assert_eq!(len, nla_len); // read IFLA_XDP - let attr = unsafe { ptr::read_unaligned(buf.as_ptr() as *const nlattr) }; + let attr: nlattr = unsafe { ptr::read_unaligned(buf.as_ptr().cast()) }; assert_eq!(attr.nla_type, NLA_F_NESTED as u16 | IFLA_XDP); assert_eq!(attr.nla_len, nla_len); // read IFLA_XDP_FD + fd - let attr = unsafe { ptr::read_unaligned(buf[NLA_HDR_LEN..].as_ptr() as *const nlattr) }; + let attr: nlattr = unsafe { ptr::read_unaligned(buf[NLA_HDR_LEN..].as_ptr().cast()) }; assert_eq!(attr.nla_type, IFLA_XDP_FD as u16); assert_eq!(attr.nla_len, (NLA_HDR_LEN + mem::size_of::()) as u16); - let fd = unsafe { ptr::read_unaligned(buf[NLA_HDR_LEN * 2..].as_ptr() as *const u32) }; + let fd: u32 = unsafe { ptr::read_unaligned(buf[NLA_HDR_LEN * 2..].as_ptr().cast()) }; assert_eq!(fd, 42); // read IFLA_XDP_EXPECTED_FD + fd - let attr = unsafe { + let attr: nlattr = unsafe { ptr::read_unaligned( - buf[NLA_HDR_LEN * 2 + mem::size_of::()..].as_ptr() as *const nlattr + buf[NLA_HDR_LEN * 2 + mem::size_of::()..] + .as_ptr() + .cast(), ) }; assert_eq!(attr.nla_type, IFLA_XDP_EXPECTED_FD as u16); assert_eq!(attr.nla_len, (NLA_HDR_LEN + mem::size_of::()) as u16); - let fd = unsafe { + let fd: u32 = unsafe { ptr::read_unaligned( - buf[NLA_HDR_LEN * 3 + mem::size_of::()..].as_ptr() as *const u32 + buf[NLA_HDR_LEN * 3 + mem::size_of::()..] + .as_ptr() + .cast(), ) }; assert_eq!(fd, 24); diff --git a/aya/src/sys/perf_event.rs b/aya/src/sys/perf_event.rs index f5815226..3514ef4e 100644 --- a/aya/src/sys/perf_event.rs +++ b/aya/src/sys/perf_event.rs @@ -1,60 +1,103 @@ use std::{ - ffi::{c_int, CString, OsStr}, + ffi::{CString, OsStr, c_int}, io, mem, - os::fd::{BorrowedFd, FromRawFd as _, OwnedFd}, + os::fd::{BorrowedFd, FromRawFd as _}, }; +use aya_obj::generated::{ + PERF_FLAG_FD_CLOEXEC, perf_event_attr, + perf_event_sample_format::PERF_SAMPLE_RAW, + perf_type_id::{ + PERF_TYPE_BREAKPOINT, PERF_TYPE_HARDWARE, PERF_TYPE_HW_CACHE, PERF_TYPE_RAW, + PERF_TYPE_SOFTWARE, PERF_TYPE_TRACEPOINT, + }, +}; use libc::pid_t; -use super::{syscall, SysResult, Syscall}; -use crate::generated::{ - perf_event_attr, - perf_event_sample_format::PERF_SAMPLE_RAW, - perf_sw_ids::PERF_COUNT_SW_BPF_OUTPUT, - perf_type_id::{PERF_TYPE_SOFTWARE, PERF_TYPE_TRACEPOINT}, - PERF_FLAG_FD_CLOEXEC, +use super::{PerfEventIoctlRequest, Syscall, syscall}; +use crate::programs::perf_event::{ + PerfEventConfig, PerfEventScope, SamplePolicy, SoftwareEvent, WakeupPolicy, perf_type_id_to_u32, }; -#[allow(clippy::too_many_arguments)] pub(crate) fn perf_event_open( - perf_type: u32, - config: u64, - pid: pid_t, - cpu: c_int, - sample_period: u64, - sample_frequency: Option, - wakeup: bool, + config: PerfEventConfig, + scope: PerfEventScope, + sample_policy: SamplePolicy, + wakeup_policy: WakeupPolicy, inherit: bool, flags: u32, -) -> SysResult { +) -> io::Result { let mut attr = unsafe { mem::zeroed::() }; + let (perf_type, config) = match config { + PerfEventConfig::Pmu { pmu_type, config } => (pmu_type, config), + PerfEventConfig::Hardware(hw_event) => ( + perf_type_id_to_u32(PERF_TYPE_HARDWARE), + u64::from(hw_event.into_primitive()), + ), + PerfEventConfig::Software(sw_event) => ( + perf_type_id_to_u32(PERF_TYPE_SOFTWARE), + u64::from(sw_event.into_primitive()), + ), + PerfEventConfig::TracePoint { event_id } => { + (perf_type_id_to_u32(PERF_TYPE_TRACEPOINT), event_id) + } + PerfEventConfig::HwCache { + event, + operation, + result, + } => ( + perf_type_id_to_u32(PERF_TYPE_HW_CACHE), + u64::from(event.into_primitive()) + | (u64::from(operation.into_primitive()) << 8) + | (u64::from(result.into_primitive()) << 16), + ), + PerfEventConfig::Raw { event_id } => (perf_type_id_to_u32(PERF_TYPE_RAW), event_id), + PerfEventConfig::Breakpoint => (perf_type_id_to_u32(PERF_TYPE_BREAKPOINT), 0), + }; + attr.config = config; attr.size = mem::size_of::() as u32; attr.type_ = perf_type; attr.sample_type = PERF_SAMPLE_RAW as u64; attr.set_inherit(if inherit { 1 } else { 0 }); - attr.__bindgen_anon_2.wakeup_events = u32::from(wakeup); - if let Some(frequency) = sample_frequency { - attr.set_freq(1); - attr.__bindgen_anon_1.sample_freq = frequency; - } else { - attr.__bindgen_anon_1.sample_period = sample_period; + match sample_policy { + SamplePolicy::Period(period) => { + attr.__bindgen_anon_1.sample_period = period; + } + SamplePolicy::Frequency(frequency) => { + attr.set_freq(1); + attr.__bindgen_anon_1.sample_freq = frequency; + } + } + + match wakeup_policy { + WakeupPolicy::Events(events) => { + attr.__bindgen_anon_2.wakeup_events = events; + } + WakeupPolicy::Watermark(watermark) => { + attr.set_watermark(1); + attr.__bindgen_anon_2.wakeup_watermark = watermark; + } } + let (pid, cpu) = match scope { + PerfEventScope::CallingProcess { cpu } => (0, cpu.map_or(-1, |cpu| cpu as i32)), + PerfEventScope::OneProcess { pid, cpu } => (pid, cpu.map_or(-1, |cpu| cpu as i32)), + PerfEventScope::AllProcessesOneCpu { cpu } => (-1, cpu as i32), + }; + perf_event_sys(attr, pid, cpu, flags) } -pub(crate) fn perf_event_open_bpf(cpu: c_int) -> SysResult { +pub(crate) fn perf_event_open_bpf(cpu: c_int) -> io::Result { + let cpu = cpu as u32; perf_event_open( - PERF_TYPE_SOFTWARE as u32, - PERF_COUNT_SW_BPF_OUTPUT as u64, - -1, - cpu, - 1, - None, - true, + PerfEventConfig::Software(SoftwareEvent::BpfOutput), + PerfEventScope::AllProcessesOneCpu { cpu }, + SamplePolicy::Period(1), + WakeupPolicy::Events(1), false, PERF_FLAG_FD_CLOEXEC, ) @@ -66,7 +109,7 @@ pub(crate) fn perf_event_open_probe( name: &OsStr, offset: u64, pid: Option, -) -> SysResult { +) -> io::Result { use std::os::unix::ffi::OsStrExt as _; let mut attr = unsafe { mem::zeroed::() }; @@ -88,12 +131,15 @@ pub(crate) fn perf_event_open_probe( perf_event_sys(attr, pid, cpu, PERF_FLAG_FD_CLOEXEC) } -pub(crate) fn perf_event_open_trace_point(id: u32, pid: Option) -> SysResult { +pub(crate) fn perf_event_open_trace_point( + id: u32, + pid: Option, +) -> io::Result { let mut attr = unsafe { mem::zeroed::() }; attr.size = mem::size_of::() as u32; attr.type_ = PERF_TYPE_TRACEPOINT as u32; - attr.config = id as u64; + attr.config = u64::from(id); let cpu = if pid.is_some() { -1 } else { 0 }; let pid = pid.unwrap_or(-1); @@ -101,36 +147,47 @@ pub(crate) fn perf_event_open_trace_point(id: u32, pid: Option) -> SysRes perf_event_sys(attr, pid, cpu, PERF_FLAG_FD_CLOEXEC) } -pub(crate) fn perf_event_ioctl(fd: BorrowedFd<'_>, request: c_int, arg: c_int) -> SysResult { - let call = Syscall::PerfEventIoctl { fd, request, arg }; - #[cfg(not(test))] - return syscall(call); - - #[cfg(test)] - return crate::sys::TEST_SYSCALL.with(|test_impl| unsafe { test_impl.borrow()(call) }); +pub(crate) fn perf_event_ioctl( + fd: BorrowedFd<'_>, + request: PerfEventIoctlRequest<'_>, +) -> io::Result<()> { + syscall(Syscall::PerfEventIoctl { fd, request }) + .map(|code| { + assert_eq!(code, 0); + }) + .map_err(|(code, io_error)| { + assert_eq!(code, -1); + io_error + }) } -fn perf_event_sys(attr: perf_event_attr, pid: pid_t, cpu: i32, flags: u32) -> SysResult { +fn perf_event_sys( + attr: perf_event_attr, + pid: pid_t, + cpu: i32, + flags: u32, +) -> io::Result { let fd = syscall(Syscall::PerfEventOpen { attr, pid, cpu, group: -1, flags, + }) + .map_err(|(code, io_error)| { + assert_eq!(code, -1); + io_error })?; - let fd = fd.try_into().map_err(|_| { - ( - fd, - io::Error::new( - io::ErrorKind::InvalidData, - format!("perf_event_open: invalid fd returned: {fd}"), - ), + let fd = fd.try_into().map_err(|std::num::TryFromIntError { .. }| { + io::Error::new( + io::ErrorKind::InvalidData, + format!("perf_event_open: invalid fd returned: {fd}"), ) })?; // SAFETY: perf_event_open returns a new file descriptor on success. - unsafe { Ok(OwnedFd::from_raw_fd(fd)) } + unsafe { Ok(crate::MockableFd::from_raw_fd(fd)) } } /* diff --git a/aya/src/util.rs b/aya/src/util.rs index 17371460..200b80a1 100644 --- a/aya/src/util.rs +++ b/aya/src/util.rs @@ -3,19 +3,27 @@ use std::{ collections::BTreeMap, error::Error, ffi::{CStr, CString}, + fmt::Display, fs::{self, File}, io::{self, BufRead, BufReader}, mem, num::ParseIntError, - slice, + os::fd::{AsFd as _, BorrowedFd}, + path::Path, + ptr, slice, str::{FromStr, Utf8Error}, }; -use libc::{if_nametoindex, sysconf, uname, utsname, _SC_PAGESIZE}; +use aya_obj::generated::{TC_H_MAJ_MASK, TC_H_MIN_MASK}; +use libc::{ + _SC_PAGESIZE, MAP_FAILED, MAP_PRIVATE, PROT_READ, c_int, c_void, if_nametoindex, off_t, + sysconf, uname, utsname, +}; +use log::warn; use crate::{ - generated::{TC_H_MAJ_MASK, TC_H_MIN_MASK}, Pod, + sys::{SyscallError, mmap, munmap}, }; /// Represents a kernel version, in major.minor.release version. @@ -49,7 +57,35 @@ impl KernelVersion { /// Returns the kernel version of the currently running kernel. pub fn current() -> Result { - Self::get_kernel_version() + thread_local! { + // TODO(https://github.com/rust-lang/rust/issues/109737): Use + // `std::cell::OnceCell` when `get_or_try_init` is stabilized. + static CACHE: once_cell::unsync::OnceCell = const { once_cell::unsync::OnceCell::new() }; + } + CACHE.with(|cell| { + // TODO(https://github.com/rust-lang/rust/issues/109737): Replace `once_cell` with + // `std::cell::OnceCell`. + cell.get_or_try_init(|| { + // error: unsupported operation: `open` not available when isolation is enabled + if cfg!(miri) { + Ok(Self::new(0xff, 0xff, 0xff)) + } else { + Self::get_kernel_version() + } + }) + .copied() + }) + } + + /// Returns true iff the current kernel version is greater than or equal to the given version. + pub(crate) fn at_least(major: u8, minor: u8, patch: u16) -> bool { + match Self::current() { + Ok(current) => current >= Self::new(major, minor, patch), + Err(error) => { + warn!("failed to get current kernel version: {error}"); + false + } + } } /// The equivalent of LINUX_VERSION_CODE. @@ -177,59 +213,77 @@ impl KernelVersion { } } -const ONLINE_CPUS: &str = "/sys/devices/system/cpu/online"; -pub(crate) const POSSIBLE_CPUS: &str = "/sys/devices/system/cpu/possible"; +impl Display for KernelVersion { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}.{}.{}", self.major, self.minor, self.patch) + } +} /// Returns the numeric IDs of the CPUs currently online. -pub fn online_cpus() -> Result, io::Error> { - let data = fs::read_to_string(ONLINE_CPUS)?; - parse_cpu_ranges(data.trim()).map_err(|_| { - io::Error::new( - io::ErrorKind::Other, - format!("unexpected {ONLINE_CPUS} format"), - ) - }) +pub fn online_cpus() -> Result, (&'static str, io::Error)> { + const ONLINE_CPUS: &str = "/sys/devices/system/cpu/online"; + + read_cpu_ranges(ONLINE_CPUS) } /// Get the number of possible cpus. /// /// See `/sys/devices/system/cpu/possible`. -pub fn nr_cpus() -> Result { - Ok(possible_cpus()?.len()) -} +pub fn nr_cpus() -> Result { + const POSSIBLE_CPUS: &str = "/sys/devices/system/cpu/possible"; -/// Get the list of possible cpus. -/// -/// See `/sys/devices/system/cpu/possible`. -pub(crate) fn possible_cpus() -> Result, io::Error> { - let data = fs::read_to_string(POSSIBLE_CPUS)?; - parse_cpu_ranges(data.trim()).map_err(|_| { - io::Error::new( - io::ErrorKind::Other, - format!("unexpected {POSSIBLE_CPUS} format"), - ) + thread_local! { + // TODO(https://github.com/rust-lang/rust/issues/109737): Use + // `std::cell::OnceCell` when `get_or_try_init` is stabilized. + static CACHE: once_cell::unsync::OnceCell = const { once_cell::unsync::OnceCell::new() }; + } + CACHE.with(|cell| { + // TODO(https://github.com/rust-lang/rust/issues/109737): Replace `once_cell` with + // `std::cell::OnceCell`. + cell.get_or_try_init(|| { + // error: unsupported operation: `open` not available when isolation is enabled + if cfg!(miri) { + parse_cpu_ranges("0-3").map_err(|error| (POSSIBLE_CPUS, error)) + } else { + read_cpu_ranges(POSSIBLE_CPUS) + } + .map(|cpus| cpus.len()) + }) + .copied() }) } -fn parse_cpu_ranges(data: &str) -> Result, ()> { - let mut cpus = Vec::new(); - for range in data.split(',') { - cpus.extend({ - match range - .splitn(2, '-') - .map(u32::from_str) - .collect::, _>>() - .map_err(|_| ())? - .as_slice() - { - &[] | &[_, _, _, ..] => return Err(()), - &[start] => start..=start, - &[start, end] => start..=end, - } - }) - } +fn read_cpu_ranges(path: &'static str) -> Result, (&'static str, io::Error)> { + (|| { + let data = fs::read_to_string(path)?; + parse_cpu_ranges(data.trim()) + })() + .map_err(|error| (path, error)) +} - Ok(cpus) +fn parse_cpu_ranges(data: &str) -> Result, io::Error> { + data.split(',') + .map(|range| { + let mut iter = range + .split('-') + .map(|s| s.parse::().map_err(|ParseIntError { .. }| range)); + let start = iter.next().unwrap()?; // str::split always returns at least one element. + let end = match iter.next() { + None => start, + Some(end) => { + if iter.next().is_some() { + return Err(range); + } + end? + } + }; + Ok(start..=end) + }) + .try_fold(Vec::new(), |mut cpus, range| { + let range = range.map_err(|range| io::Error::new(io::ErrorKind::InvalidData, range))?; + cpus.extend(range); + Ok(cpus) + }) } /// Loads kernel symbols from `/proc/kallsyms`. @@ -250,6 +304,9 @@ fn parse_kernel_symbols(reader: impl BufRead) -> Result, i let addr = parts.next()?; let _kind = parts.next()?; let name = parts.next()?; + // TODO(https://github.com/rust-lang/rust-clippy/issues/14112): Remove this + // allowance when the lint behaves more sensibly. + #[expect(clippy::manual_ok_err)] let addr = match u64::from_str_radix(addr, 16) { Ok(addr) => Some(addr), Err(ParseIntError { .. }) => None, @@ -266,7 +323,9 @@ fn parse_kernel_symbols(reader: impl BufRead) -> Result, i /// # Example /// /// ```no_run +/// # #[expect(deprecated)] /// use aya::util::syscall_prefix; +/// # #[expect(deprecated)] /// let prefix = syscall_prefix().unwrap(); /// let syscall_fname = format!("{prefix}exec"); /// ``` @@ -293,7 +352,7 @@ pub fn syscall_prefix() -> Result<&'static str, io::Error> { ]; let ksym = kernel_symbols()?; for p in PREFIXES { - let prefixed_syscall = format!("{}bpf", p); + let prefixed_syscall = format!("{p}bpf"); if ksym.values().any(|el| *el == prefixed_syscall) { return Ok(p); } @@ -359,9 +418,8 @@ pub(crate) fn page_size() -> usize { } // bytes_of converts a to a byte slice -pub(crate) unsafe fn bytes_of(val: &T) -> &[u8] { - let size = mem::size_of::(); - slice::from_raw_parts(slice::from_ref(val).as_ptr().cast(), size) +pub(crate) fn bytes_of(val: &T) -> &[u8] { + unsafe { slice::from_raw_parts(std::ptr::from_ref(val).cast(), mem::size_of_val(val)) } } pub(crate) fn bytes_of_slice(val: &[T]) -> &[u8] { @@ -379,7 +437,85 @@ pub(crate) fn bytes_of_bpf_name(bpf_name: &[core::ffi::c_char; 16]) -> &[u8] { .rposition(|ch| *ch != 0) .map(|pos| pos + 1) .unwrap_or(0); - unsafe { slice::from_raw_parts(bpf_name.as_ptr() as *const _, length) } + unsafe { slice::from_raw_parts(bpf_name.as_ptr().cast(), length) } +} + +// MMap corresponds to a memory-mapped region. +// +// The data is unmapped in Drop. +#[cfg_attr(test, derive(Debug))] +pub(crate) struct MMap { + ptr: ptr::NonNull, + len: usize, +} + +// Needed because NonNull is !Send and !Sync out of caution that the data +// might be aliased unsafely. +unsafe impl Send for MMap {} +unsafe impl Sync for MMap {} + +impl MMap { + pub(crate) fn new( + fd: BorrowedFd<'_>, + len: usize, + prot: c_int, + flags: c_int, + offset: off_t, + ) -> Result { + match unsafe { mmap(ptr::null_mut(), len, prot, flags, fd, offset) } { + MAP_FAILED => Err(SyscallError { + call: "mmap", + io_error: io::Error::last_os_error(), + }), + ptr => { + let ptr = ptr::NonNull::new(ptr).ok_or( + // This should never happen, but to be paranoid, and so we never need to talk + // about a null pointer, we check it anyway. + SyscallError { + call: "mmap", + io_error: io::Error::other("mmap returned null pointer"), + }, + )?; + Ok(Self { ptr, len }) + } + } + } + + /// Maps the file at `path` for reading, using `mmap` with `MAP_PRIVATE`. + pub(crate) fn map_copy_read_only(path: &Path) -> Result { + let file = fs::File::open(path)?; + Self::new( + file.as_fd(), + file.metadata()?.len().try_into().map_err(|e| { + io::Error::new( + io::ErrorKind::FileTooLarge, + format!("file too large to mmap: {e}"), + ) + })?, + PROT_READ, + MAP_PRIVATE, + 0, + ) + .map_err(|SyscallError { io_error, call: _ }| io_error) + } + + pub(crate) fn ptr(&self) -> ptr::NonNull { + self.ptr + } +} + +impl AsRef<[u8]> for MMap { + fn as_ref(&self) -> &[u8] { + let Self { ptr, len } = self; + unsafe { std::slice::from_raw_parts(ptr.as_ptr().cast(), *len) } + } +} + +impl Drop for MMap { + fn drop(&mut self) { + let Self { ptr, len } = *self; + unsafe { munmap(ptr.as_ptr(), len) }; + } } #[cfg(test)] @@ -423,9 +559,9 @@ mod tests { parse_cpu_ranges("0-5,6,7").unwrap(), (0..=7).collect::>() ); - assert!(parse_cpu_ranges("").is_err()); - assert!(parse_cpu_ranges("0-1,2-").is_err()); - assert!(parse_cpu_ranges("foo").is_err()); + assert_matches!(parse_cpu_ranges(""), Err(_)); + assert_matches!(parse_cpu_ranges("0-1,2-"), Err(_)); + assert_matches!(parse_cpu_ranges("foo"), Err(_)); } #[test] diff --git a/clippy.sh b/clippy.sh new file mode 100755 index 00000000..9641623b --- /dev/null +++ b/clippy.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env sh + +set -eux + +# `-C panic=abort` because "unwinding panics are not supported without std"; integration-ebpf +# contains `#[no_std]` binaries. +# +# `-Zpanic_abort_tests` because "building tests with panic=abort is not supported without +# `-Zpanic_abort_tests`"; Cargo does this automatically when panic=abort is set via profile but we +# want to preserve unwinding at runtime - here we are just running clippy so we don't care about +# unwinding behavior. +# +# `+nightly` because "the option `Z` is only accepted on the nightly compiler". +cargo +nightly hack clippy "$@" \ + --all-targets \ + --feature-powerset \ + -- --deny warnings \ + -C panic=abort \ + -Zpanic_abort_tests + +export CLIPPY_ARGS='--deny=warnings' +export RUSTDOCFLAGS='--no-run -Z unstable-options --test-builder clippy-driver' + +cargo +nightly hack test --doc "$@" --feature-powerset + +for arch in aarch64 arm loongarch64 mips powerpc64 riscv64 s390x x86_64; do + export RUSTFLAGS="--cfg bpf_target_arch=\"$arch\"" + + for target in bpfeb-unknown-none bpfel-unknown-none; do + cargo +nightly hack clippy \ + --target "$target" \ + -Zbuild-std=core \ + --package aya-ebpf \ + --package aya-ebpf-bindings \ + --package aya-log-ebpf \ + --package integration-ebpf \ + --feature-powerset \ + -- --deny warnings + done + + RUSTDOCFLAGS="$RUSTDOCFLAGS $RUSTFLAGS" cargo +nightly hack test --doc "$@" \ + --package aya-ebpf \ + --package aya-ebpf-bindings \ + --package aya-log-ebpf \ + --package integration-ebpf \ + --feature-powerset +done diff --git a/ebpf-panic/Cargo.toml b/ebpf-panic/Cargo.toml new file mode 100644 index 00000000..eb78e6f2 --- /dev/null +++ b/ebpf-panic/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "ebpf-panic" +publish = false +version = "1.0.0" + +authors.workspace = true +edition.workspace = true +homepage.workspace = true +license.workspace = true +repository.workspace = true diff --git a/ebpf-panic/src/lib.rs b/ebpf-panic/src/lib.rs new file mode 100644 index 00000000..4b4d86e2 --- /dev/null +++ b/ebpf-panic/src/lib.rs @@ -0,0 +1,33 @@ +//! A panic handler for eBPF rust targets. +//! +//! Panics are not supported in the eBPF rust targets however since crates for +//! the eBPF targets are no_std they must provide a panic handler. This crate +//! provides a panic handler that loops forever. Such a function, if called, +//! will cause the program to be rejected by the eBPF verifier with an error +//! message similar to: +//! +//! ```text +//! last insn is not an exit or jmp +//! ``` +//! +//! # Example +//! +//! ```ignore +//! #![no_std] +//! +//! use aya_ebpf::{macros::tracepoint, programs::TracePointContext}; +//! #[cfg(not(test))] +//! extern crate ebpf_panic; +//! +//! #[tracepoint] +//! pub fn test_tracepoint_one(_ctx: TracePointContext) -> u32 { +//! 0 +//! } +//! ``` +#![no_std] + +#[cfg(not(test))] +#[panic_handler] +fn panic(_info: &core::panic::PanicInfo) -> ! { + loop {} +} diff --git a/ebpf/aya-ebpf-bindings/CHANGELOG.md b/ebpf/aya-ebpf-bindings/CHANGELOG.md index cf67e3ed..1bf9dac2 100644 --- a/ebpf/aya-ebpf-bindings/CHANGELOG.md +++ b/ebpf/aya-ebpf-bindings/CHANGELOG.md @@ -5,11 +5,46 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## v0.1.1 (2024-10-09) + +### Other + + - add archs powerpc64 and s390x to aya + bpfman, a project using aya, has a requirement to support powerpc64 and + s390x architectures. Adding these two architectures to aya. + +### Commit Statistics + + + + - 8 commits contributed to the release. + - 185 days passed between releases. + - 1 commit was understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Merge pull request #974 from Billy99/billy99-arch-ppc64-s390x ([`ab5e688`](https://github.com/aya-rs/aya/commit/ab5e688fd49fcfb402ad47d51cb445437fbd8cb7)) + - Add archs powerpc64 and s390x to aya ([`b513af1`](https://github.com/aya-rs/aya/commit/b513af12e8baa5c5097eaf0afdae61a830c3f877)) + - Merge pull request #1010 from aya-rs/codegen ([`bdbd042`](https://github.com/aya-rs/aya/commit/bdbd0423f8aa00f9e59a0b06d2ac9735c373c27f)) + - [codegen] Update libbpf to b07dfe3b2a6cb0905e883510f22f9f7c0bb66d0dUpdate libbpf to b07dfe3b2a6cb0905e883510f22f9f7c0bb66d0d ([`e217727`](https://github.com/aya-rs/aya/commit/e2177278ae9951a0262349a6741d013032b3cce6)) + - Merge pull request #978 from aya-rs/codegen ([`06aa5c8`](https://github.com/aya-rs/aya/commit/06aa5c8ed344bd0d85096a0fd033ff0bd90a2f88)) + - [codegen] Update libbpf to c1a6c770c46c6e78ad6755bf596c23a4e6f6b216 ([`8b50a6a`](https://github.com/aya-rs/aya/commit/8b50a6a5738b5a57121205490d26805c74cb63de)) + - Allowlist expected cfgs ([`e4f9ed8`](https://github.com/aya-rs/aya/commit/e4f9ed8d79e4cd19ab5124352fca9e6cbdc1030b)) + - Deny warnings ([`b603c66`](https://github.com/aya-rs/aya/commit/b603c665a9a2ec48de2c4b412876bd015e5ead15)) +
+ ## v0.1.0 (2024-04-06) + ### Chore @@ -31,7 +66,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - - 6 commits contributed to the release over the course of 31 calendar days. + - 7 commits contributed to the release. - 4 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages @@ -42,6 +77,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
view details * **Uncategorized** + - Release aya-ebpf-bindings v0.1.0, aya-ebpf-macros v0.1.0, aya-ebpf v0.1.0 ([`a34c5e4`](https://github.com/aya-rs/aya/commit/a34c5e43b85dd176b9b18f1cc9c9d80d52f10a1f)) - Add version keys to Cargo.toml(s) ([`a4ae8ad`](https://github.com/aya-rs/aya/commit/a4ae8adb0db75f2b82b10b0740447a1dbead62c0)) - Release aya-ebpf-bindings v0.1.0, aya-ebpf-macros v0.1.0, aya-ebpf v0.1.0 ([`b8964d3`](https://github.com/aya-rs/aya/commit/b8964d3fd27353beb9054dd18fe8d16251f9164b)) - Add changelogs ([`c7fe60d`](https://github.com/aya-rs/aya/commit/c7fe60d47e0cc32fc7123e37532d104eaa392b50)) diff --git a/ebpf/aya-ebpf-bindings/Cargo.toml b/ebpf/aya-ebpf-bindings/Cargo.toml index 839978a1..a75b8d0a 100644 --- a/ebpf/aya-ebpf-bindings/Cargo.toml +++ b/ebpf/aya-ebpf-bindings/Cargo.toml @@ -1,12 +1,19 @@ [package] -name = "aya-ebpf-bindings" -version = "0.1.0" description = "Bindings for Linux Kernel eBPF types and helpers" +name = "aya-ebpf-bindings" +version = "0.1.1" + authors.workspace = true +edition.workspace = true +homepage.workspace = true license.workspace = true repository.workspace = true -homepage.workspace = true -edition.workspace = true + +[lints] +workspace = true [dependencies] -aya-ebpf-cty = { version = "0.2.1", path = "../aya-ebpf-cty" } +aya-ebpf-cty = { version = "^0.2.2", path = "../aya-ebpf-cty" } + +[build-dependencies] +aya-build = { version = "^0.1.2", path = "../../aya-build" } diff --git a/ebpf/aya-ebpf-bindings/build.rs b/ebpf/aya-ebpf-bindings/build.rs index fde2d9e5..98827069 100644 --- a/ebpf/aya-ebpf-bindings/build.rs +++ b/ebpf/aya-ebpf-bindings/build.rs @@ -1,13 +1,3 @@ -use std::env; - fn main() { - println!("cargo:rerun-if-env-changed=CARGO_CFG_BPF_TARGET_ARCH"); - if let Ok(arch) = env::var("CARGO_CFG_BPF_TARGET_ARCH") { - println!("cargo:rustc-cfg=bpf_target_arch=\"{arch}\""); - } else { - let arch = env::var("HOST").unwrap(); - let arch = arch.split_once('-').map_or(&*arch, |x| x.0); - println!("cargo:rustc-cfg=bpf_target_arch=\"{arch}\""); - } - println!("cargo::rustc-check-cfg=cfg(bpf_target_arch, values(\"x86_64\",\"arm\",\"aarch64\",\"riscv64\"))"); + aya_build::emit_bpf_target_arch_cfg() } diff --git a/ebpf/aya-ebpf-bindings/include/bindings.h b/ebpf/aya-ebpf-bindings/include/bindings.h index 05344214..aa831c57 100644 --- a/ebpf/aya-ebpf-bindings/include/bindings.h +++ b/ebpf/aya-ebpf-bindings/include/bindings.h @@ -1,9 +1,10 @@ #include -// __wsum is missing from types.h, see -// https://elixir.bootlin.com/linux/v5.13/source/include/uapi/linux/types.h +// __wsum is missing from types.h, compare: +// https://github.com/torvalds/linux/blob/v5.13/include/uapi/linux/types.h +// https://github.com/libbpf/libbpf/blob/v1.5.0/include/linux/types.h typedef __u32 __bitwise __wsum; -#include "bpf_helpers.h" +#include #include // needed for TC_ACT_* #include diff --git a/ebpf/aya-ebpf-bindings/src/aarch64/bindings.rs b/ebpf/aya-ebpf-bindings/src/aarch64/bindings.rs index 6e9b31ea..87ef0587 100644 --- a/ebpf/aya-ebpf-bindings/src/aarch64/bindings.rs +++ b/ebpf/aya-ebpf-bindings/src/aarch64/bindings.rs @@ -14,10 +14,7 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -27,21 +24,46 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; - if val { - *byte |= mask; - } else { - *byte &= !mask; - } + if val { byte | mask } else { byte & !mask } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -62,6 +84,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -77,6 +117,22 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } } #[repr(C)] #[derive(Default)] @@ -211,6 +267,9 @@ pub const TC_ACT_REDIRECT: u32 = 7; pub const TC_ACT_TRAP: u32 = 8; pub const TC_ACT_VALUE_MAX: u32 = 8; pub const TC_ACT_EXT_VAL_MASK: u32 = 268435455; +pub const TC_ACT_JUMP: u32 = 268435456; +pub const TC_ACT_GOTO_CHAIN: u32 = 536870912; +pub const TC_ACT_EXT_OPCODE_MAX: u32 = 536870912; pub const SOL_SOCKET: u32 = 1; pub const SO_DEBUG: u32 = 1; pub const SO_REUSEADDR: u32 = 2; @@ -284,6 +343,11 @@ pub const SO_PREFER_BUSY_POLL: u32 = 69; pub const SO_BUSY_POLL_BUDGET: u32 = 70; pub const SO_NETNS_COOKIE: u32 = 71; pub const SO_BUF_LOCK: u32 = 72; +pub const SO_RESERVE_MEM: u32 = 73; +pub const SO_TXREHASH: u32 = 74; +pub const SO_RCVMARK: u32 = 75; +pub const SO_PASSPIDFD: u32 = 76; +pub const SO_PEERPIDFD: u32 = 77; pub const SO_TIMESTAMP: u32 = 29; pub const SO_TIMESTAMPNS: u32 = 35; pub const SO_TIMESTAMPING: u32 = 37; @@ -438,6 +502,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn src_reg(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -449,6 +535,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -1720,6 +1828,13 @@ pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 { pub sport: __be16, pub dport: __be16, } +pub mod tcx_action_base { + pub type Type = ::aya_ebpf_cty::c_int; + pub const TCX_NEXT: Type = -1; + pub const TCX_PASS: Type = 0; + pub const TCX_DROP: Type = 2; + pub const TCX_REDIRECT: Type = 7; +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bpf_xdp_sock { @@ -1954,6 +2069,28 @@ impl bpf_prog_info { } } #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/ebpf/aya-ebpf-bindings/src/aarch64/mod.rs b/ebpf/aya-ebpf-bindings/src/aarch64/mod.rs deleted file mode 100644 index 226884ea..00000000 --- a/ebpf/aya-ebpf-bindings/src/aarch64/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -#![allow(clippy::all, dead_code)] -pub mod bindings; -pub mod helpers; diff --git a/ebpf/aya-ebpf-bindings/src/armv7/bindings.rs b/ebpf/aya-ebpf-bindings/src/armv7/bindings.rs index 0636c654..54140c49 100644 --- a/ebpf/aya-ebpf-bindings/src/armv7/bindings.rs +++ b/ebpf/aya-ebpf-bindings/src/armv7/bindings.rs @@ -14,10 +14,7 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -27,21 +24,46 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; - if val { - *byte |= mask; - } else { - *byte &= !mask; - } + if val { byte | mask } else { byte & !mask } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -62,6 +84,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -77,6 +117,22 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } } #[repr(C)] #[derive(Default)] @@ -211,6 +267,9 @@ pub const TC_ACT_REDIRECT: u32 = 7; pub const TC_ACT_TRAP: u32 = 8; pub const TC_ACT_VALUE_MAX: u32 = 8; pub const TC_ACT_EXT_VAL_MASK: u32 = 268435455; +pub const TC_ACT_JUMP: u32 = 268435456; +pub const TC_ACT_GOTO_CHAIN: u32 = 536870912; +pub const TC_ACT_EXT_OPCODE_MAX: u32 = 536870912; pub const SOL_SOCKET: u32 = 1; pub const SO_DEBUG: u32 = 1; pub const SO_REUSEADDR: u32 = 2; @@ -284,6 +343,16 @@ pub const SO_PREFER_BUSY_POLL: u32 = 69; pub const SO_BUSY_POLL_BUDGET: u32 = 70; pub const SO_NETNS_COOKIE: u32 = 71; pub const SO_BUF_LOCK: u32 = 72; +pub const SO_RESERVE_MEM: u32 = 73; +pub const SO_TXREHASH: u32 = 74; +pub const SO_RCVMARK: u32 = 75; +pub const SO_PASSPIDFD: u32 = 76; +pub const SO_PEERPIDFD: u32 = 77; +pub const SO_TIMESTAMP: u32 = 29; +pub const SO_TIMESTAMPNS: u32 = 35; +pub const SO_TIMESTAMPING: u32 = 37; +pub const SO_RCVTIMEO: u32 = 20; +pub const SO_SNDTIMEO: u32 = 21; pub type __u8 = ::aya_ebpf_cty::c_uchar; pub type __s16 = ::aya_ebpf_cty::c_short; pub type __u16 = ::aya_ebpf_cty::c_ushort; @@ -428,6 +497,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn src_reg(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -439,6 +530,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -1712,6 +1825,13 @@ pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 { pub sport: __be16, pub dport: __be16, } +pub mod tcx_action_base { + pub type Type = ::aya_ebpf_cty::c_int; + pub const TCX_NEXT: Type = -1; + pub const TCX_PASS: Type = 0; + pub const TCX_DROP: Type = 2; + pub const TCX_REDIRECT: Type = 7; +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bpf_xdp_sock { @@ -1953,6 +2073,28 @@ impl bpf_prog_info { } } #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/ebpf/aya-ebpf-bindings/src/armv7/mod.rs b/ebpf/aya-ebpf-bindings/src/armv7/mod.rs deleted file mode 100644 index 226884ea..00000000 --- a/ebpf/aya-ebpf-bindings/src/armv7/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -#![allow(clippy::all, dead_code)] -pub mod bindings; -pub mod helpers; diff --git a/ebpf/aya-ebpf-bindings/src/lib.rs b/ebpf/aya-ebpf-bindings/src/lib.rs index b9037bac..8fff6f05 100644 --- a/ebpf/aya-ebpf-bindings/src/lib.rs +++ b/ebpf/aya-ebpf-bindings/src/lib.rs @@ -1,45 +1,97 @@ -#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] -#![deny(warnings)] +#![cfg_attr( + target_arch = "bpf", + expect(unused_crate_dependencies, reason = "compiler_builtins") +)] +#![expect( + clippy::all, + clippy::cast_lossless, + clippy::ptr_as_ptr, + clippy::ref_as_ptr, + clippy::use_self, + non_camel_case_types, + non_snake_case, + non_upper_case_globals, + unreachable_pub, + unsafe_op_in_unsafe_fn +)] #![no_std] -#[cfg(bpf_target_arch = "x86_64")] -mod x86_64; - -#[cfg(bpf_target_arch = "arm")] -mod armv7; - #[cfg(bpf_target_arch = "aarch64")] -mod aarch64; - +mod aarch64 { + pub mod bindings; + pub mod helpers; +} +#[cfg(bpf_target_arch = "arm")] +mod armv7 { + pub mod bindings; + pub mod helpers; +} +#[cfg(bpf_target_arch = "loongarch64")] +mod loongarch64 { + pub mod bindings; + pub mod helpers; +} +#[cfg(bpf_target_arch = "mips")] +mod mips { + pub mod bindings; + pub mod helpers; +} +#[cfg(bpf_target_arch = "powerpc64")] +mod powerpc64 { + pub mod bindings; + pub mod helpers; +} #[cfg(bpf_target_arch = "riscv64")] -mod riscv64; +mod riscv64 { + pub mod bindings; + pub mod helpers; +} +#[cfg(bpf_target_arch = "s390x")] +mod s390x { + pub mod bindings; + pub mod helpers; +} +#[cfg(bpf_target_arch = "x86_64")] +mod x86_64 { + pub mod bindings; + pub mod helpers; +} -mod gen { +mod generated { #[cfg(bpf_target_arch = "aarch64")] pub use super::aarch64::*; #[cfg(bpf_target_arch = "arm")] pub use super::armv7::*; + #[cfg(bpf_target_arch = "loongarch64")] + pub use super::loongarch64::*; + #[cfg(bpf_target_arch = "mips")] + pub use super::mips::*; + #[cfg(bpf_target_arch = "powerpc64")] + pub use super::powerpc64::*; #[cfg(bpf_target_arch = "riscv64")] pub use super::riscv64::*; + #[cfg(bpf_target_arch = "s390x")] + pub use super::s390x::*; #[cfg(bpf_target_arch = "x86_64")] pub use super::x86_64::*; } -pub use gen::helpers; + +pub use generated::helpers; pub mod bindings { - pub use crate::gen::bindings::*; + pub use crate::generated::bindings::*; - pub const TC_ACT_OK: i32 = crate::gen::bindings::TC_ACT_OK as i32; - pub const TC_ACT_RECLASSIFY: i32 = crate::gen::bindings::TC_ACT_RECLASSIFY as i32; - pub const TC_ACT_SHOT: i32 = crate::gen::bindings::TC_ACT_SHOT as i32; - pub const TC_ACT_PIPE: i32 = crate::gen::bindings::TC_ACT_PIPE as i32; - pub const TC_ACT_STOLEN: i32 = crate::gen::bindings::TC_ACT_STOLEN as i32; - pub const TC_ACT_QUEUED: i32 = crate::gen::bindings::TC_ACT_QUEUED as i32; - pub const TC_ACT_REPEAT: i32 = crate::gen::bindings::TC_ACT_REPEAT as i32; - pub const TC_ACT_REDIRECT: i32 = crate::gen::bindings::TC_ACT_REDIRECT as i32; - pub const TC_ACT_TRAP: i32 = crate::gen::bindings::TC_ACT_TRAP as i32; - pub const TC_ACT_VALUE_MAX: i32 = crate::gen::bindings::TC_ACT_VALUE_MAX as i32; - pub const TC_ACT_EXT_VAL_MASK: i32 = 268435455; + pub const TC_ACT_OK: i32 = crate::generated::bindings::TC_ACT_OK as i32; + pub const TC_ACT_RECLASSIFY: i32 = crate::generated::bindings::TC_ACT_RECLASSIFY as i32; + pub const TC_ACT_SHOT: i32 = crate::generated::bindings::TC_ACT_SHOT as i32; + pub const TC_ACT_PIPE: i32 = crate::generated::bindings::TC_ACT_PIPE as i32; + pub const TC_ACT_STOLEN: i32 = crate::generated::bindings::TC_ACT_STOLEN as i32; + pub const TC_ACT_QUEUED: i32 = crate::generated::bindings::TC_ACT_QUEUED as i32; + pub const TC_ACT_REPEAT: i32 = crate::generated::bindings::TC_ACT_REPEAT as i32; + pub const TC_ACT_REDIRECT: i32 = crate::generated::bindings::TC_ACT_REDIRECT as i32; + pub const TC_ACT_TRAP: i32 = crate::generated::bindings::TC_ACT_TRAP as i32; + pub const TC_ACT_VALUE_MAX: i32 = crate::generated::bindings::TC_ACT_VALUE_MAX as i32; + pub const TC_ACT_EXT_VAL_MASK: i32 = crate::generated::bindings::TC_ACT_EXT_VAL_MASK as i32; #[repr(C)] #[derive(Debug, Copy, Clone)] diff --git a/ebpf/aya-ebpf-bindings/src/loongarch64/bindings.rs b/ebpf/aya-ebpf-bindings/src/loongarch64/bindings.rs new file mode 100644 index 00000000..f769d7b9 --- /dev/null +++ b/ebpf/aya-ebpf-bindings/src/loongarch64/bindings.rs @@ -0,0 +1,2897 @@ +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { byte | mask } else { byte & !mask } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } +} +#[repr(C)] +#[derive(Default)] +pub struct __IncompleteArrayField(::core::marker::PhantomData, [T; 0]); +impl __IncompleteArrayField { + #[inline] + pub const fn new() -> Self { + __IncompleteArrayField(::core::marker::PhantomData, []) + } + #[inline] + pub fn as_ptr(&self) -> *const T { + self as *const _ as *const T + } + #[inline] + pub fn as_mut_ptr(&mut self) -> *mut T { + self as *mut _ as *mut T + } + #[inline] + pub unsafe fn as_slice(&self, len: usize) -> &[T] { + ::core::slice::from_raw_parts(self.as_ptr(), len) + } + #[inline] + pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { + ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len) + } +} +impl ::core::fmt::Debug for __IncompleteArrayField { + fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + fmt.write_str("__IncompleteArrayField") + } +} +pub const BPF_LD: u32 = 0; +pub const BPF_LDX: u32 = 1; +pub const BPF_ST: u32 = 2; +pub const BPF_STX: u32 = 3; +pub const BPF_ALU: u32 = 4; +pub const BPF_JMP: u32 = 5; +pub const BPF_RET: u32 = 6; +pub const BPF_MISC: u32 = 7; +pub const BPF_W: u32 = 0; +pub const BPF_H: u32 = 8; +pub const BPF_B: u32 = 16; +pub const BPF_IMM: u32 = 0; +pub const BPF_ABS: u32 = 32; +pub const BPF_IND: u32 = 64; +pub const BPF_MEM: u32 = 96; +pub const BPF_LEN: u32 = 128; +pub const BPF_MSH: u32 = 160; +pub const BPF_ADD: u32 = 0; +pub const BPF_SUB: u32 = 16; +pub const BPF_MUL: u32 = 32; +pub const BPF_DIV: u32 = 48; +pub const BPF_OR: u32 = 64; +pub const BPF_AND: u32 = 80; +pub const BPF_LSH: u32 = 96; +pub const BPF_RSH: u32 = 112; +pub const BPF_NEG: u32 = 128; +pub const BPF_MOD: u32 = 144; +pub const BPF_XOR: u32 = 160; +pub const BPF_JA: u32 = 0; +pub const BPF_JEQ: u32 = 16; +pub const BPF_JGT: u32 = 32; +pub const BPF_JGE: u32 = 48; +pub const BPF_JSET: u32 = 64; +pub const BPF_K: u32 = 0; +pub const BPF_X: u32 = 8; +pub const BPF_MAXINSNS: u32 = 4096; +pub const BPF_JMP32: u32 = 6; +pub const BPF_ALU64: u32 = 7; +pub const BPF_DW: u32 = 24; +pub const BPF_MEMSX: u32 = 128; +pub const BPF_ATOMIC: u32 = 192; +pub const BPF_XADD: u32 = 192; +pub const BPF_MOV: u32 = 176; +pub const BPF_ARSH: u32 = 192; +pub const BPF_END: u32 = 208; +pub const BPF_TO_LE: u32 = 0; +pub const BPF_TO_BE: u32 = 8; +pub const BPF_FROM_LE: u32 = 0; +pub const BPF_FROM_BE: u32 = 8; +pub const BPF_JNE: u32 = 80; +pub const BPF_JLT: u32 = 160; +pub const BPF_JLE: u32 = 176; +pub const BPF_JSGT: u32 = 96; +pub const BPF_JSGE: u32 = 112; +pub const BPF_JSLT: u32 = 192; +pub const BPF_JSLE: u32 = 208; +pub const BPF_JCOND: u32 = 224; +pub const BPF_CALL: u32 = 128; +pub const BPF_EXIT: u32 = 144; +pub const BPF_FETCH: u32 = 1; +pub const BPF_XCHG: u32 = 225; +pub const BPF_CMPXCHG: u32 = 241; +pub const BPF_F_ALLOW_OVERRIDE: u32 = 1; +pub const BPF_F_ALLOW_MULTI: u32 = 2; +pub const BPF_F_REPLACE: u32 = 4; +pub const BPF_F_BEFORE: u32 = 8; +pub const BPF_F_AFTER: u32 = 16; +pub const BPF_F_ID: u32 = 32; +pub const BPF_F_STRICT_ALIGNMENT: u32 = 1; +pub const BPF_F_ANY_ALIGNMENT: u32 = 2; +pub const BPF_F_TEST_RND_HI32: u32 = 4; +pub const BPF_F_TEST_STATE_FREQ: u32 = 8; +pub const BPF_F_SLEEPABLE: u32 = 16; +pub const BPF_F_XDP_HAS_FRAGS: u32 = 32; +pub const BPF_F_XDP_DEV_BOUND_ONLY: u32 = 64; +pub const BPF_F_TEST_REG_INVARIANTS: u32 = 128; +pub const BPF_F_NETFILTER_IP_DEFRAG: u32 = 1; +pub const BPF_PSEUDO_MAP_FD: u32 = 1; +pub const BPF_PSEUDO_MAP_IDX: u32 = 5; +pub const BPF_PSEUDO_MAP_VALUE: u32 = 2; +pub const BPF_PSEUDO_MAP_IDX_VALUE: u32 = 6; +pub const BPF_PSEUDO_BTF_ID: u32 = 3; +pub const BPF_PSEUDO_FUNC: u32 = 4; +pub const BPF_PSEUDO_CALL: u32 = 1; +pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2; +pub const BPF_F_QUERY_EFFECTIVE: u32 = 1; +pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1; +pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2; +pub const BPF_BUILD_ID_SIZE: u32 = 20; +pub const BPF_OBJ_NAME_LEN: u32 = 16; +pub const BPF_TAG_SIZE: u32 = 8; +pub const TC_ACT_UNSPEC: i32 = -1; +pub const TC_ACT_OK: u32 = 0; +pub const TC_ACT_RECLASSIFY: u32 = 1; +pub const TC_ACT_SHOT: u32 = 2; +pub const TC_ACT_PIPE: u32 = 3; +pub const TC_ACT_STOLEN: u32 = 4; +pub const TC_ACT_QUEUED: u32 = 5; +pub const TC_ACT_REPEAT: u32 = 6; +pub const TC_ACT_REDIRECT: u32 = 7; +pub const TC_ACT_TRAP: u32 = 8; +pub const TC_ACT_VALUE_MAX: u32 = 8; +pub const TC_ACT_EXT_VAL_MASK: u32 = 268435455; +pub const TC_ACT_JUMP: u32 = 268435456; +pub const TC_ACT_GOTO_CHAIN: u32 = 536870912; +pub const TC_ACT_EXT_OPCODE_MAX: u32 = 536870912; +pub const SOL_SOCKET: u32 = 1; +pub const SO_DEBUG: u32 = 1; +pub const SO_REUSEADDR: u32 = 2; +pub const SO_TYPE: u32 = 3; +pub const SO_ERROR: u32 = 4; +pub const SO_DONTROUTE: u32 = 5; +pub const SO_BROADCAST: u32 = 6; +pub const SO_SNDBUF: u32 = 7; +pub const SO_RCVBUF: u32 = 8; +pub const SO_SNDBUFFORCE: u32 = 32; +pub const SO_RCVBUFFORCE: u32 = 33; +pub const SO_KEEPALIVE: u32 = 9; +pub const SO_OOBINLINE: u32 = 10; +pub const SO_NO_CHECK: u32 = 11; +pub const SO_PRIORITY: u32 = 12; +pub const SO_LINGER: u32 = 13; +pub const SO_BSDCOMPAT: u32 = 14; +pub const SO_REUSEPORT: u32 = 15; +pub const SO_PASSCRED: u32 = 16; +pub const SO_PEERCRED: u32 = 17; +pub const SO_RCVLOWAT: u32 = 18; +pub const SO_SNDLOWAT: u32 = 19; +pub const SO_RCVTIMEO_OLD: u32 = 20; +pub const SO_SNDTIMEO_OLD: u32 = 21; +pub const SO_SECURITY_AUTHENTICATION: u32 = 22; +pub const SO_SECURITY_ENCRYPTION_TRANSPORT: u32 = 23; +pub const SO_SECURITY_ENCRYPTION_NETWORK: u32 = 24; +pub const SO_BINDTODEVICE: u32 = 25; +pub const SO_ATTACH_FILTER: u32 = 26; +pub const SO_DETACH_FILTER: u32 = 27; +pub const SO_GET_FILTER: u32 = 26; +pub const SO_PEERNAME: u32 = 28; +pub const SO_ACCEPTCONN: u32 = 30; +pub const SO_PEERSEC: u32 = 31; +pub const SO_PASSSEC: u32 = 34; +pub const SO_MARK: u32 = 36; +pub const SO_PROTOCOL: u32 = 38; +pub const SO_DOMAIN: u32 = 39; +pub const SO_RXQ_OVFL: u32 = 40; +pub const SO_WIFI_STATUS: u32 = 41; +pub const SO_PEEK_OFF: u32 = 42; +pub const SO_NOFCS: u32 = 43; +pub const SO_LOCK_FILTER: u32 = 44; +pub const SO_SELECT_ERR_QUEUE: u32 = 45; +pub const SO_BUSY_POLL: u32 = 46; +pub const SO_MAX_PACING_RATE: u32 = 47; +pub const SO_BPF_EXTENSIONS: u32 = 48; +pub const SO_INCOMING_CPU: u32 = 49; +pub const SO_ATTACH_BPF: u32 = 50; +pub const SO_DETACH_BPF: u32 = 27; +pub const SO_ATTACH_REUSEPORT_CBPF: u32 = 51; +pub const SO_ATTACH_REUSEPORT_EBPF: u32 = 52; +pub const SO_CNX_ADVICE: u32 = 53; +pub const SO_MEMINFO: u32 = 55; +pub const SO_INCOMING_NAPI_ID: u32 = 56; +pub const SO_COOKIE: u32 = 57; +pub const SO_PEERGROUPS: u32 = 59; +pub const SO_ZEROCOPY: u32 = 60; +pub const SO_TXTIME: u32 = 61; +pub const SO_BINDTOIFINDEX: u32 = 62; +pub const SO_TIMESTAMP_OLD: u32 = 29; +pub const SO_TIMESTAMPNS_OLD: u32 = 35; +pub const SO_TIMESTAMPING_OLD: u32 = 37; +pub const SO_TIMESTAMP_NEW: u32 = 63; +pub const SO_TIMESTAMPNS_NEW: u32 = 64; +pub const SO_TIMESTAMPING_NEW: u32 = 65; +pub const SO_RCVTIMEO_NEW: u32 = 66; +pub const SO_SNDTIMEO_NEW: u32 = 67; +pub const SO_DETACH_REUSEPORT_BPF: u32 = 68; +pub const SO_PREFER_BUSY_POLL: u32 = 69; +pub const SO_BUSY_POLL_BUDGET: u32 = 70; +pub const SO_NETNS_COOKIE: u32 = 71; +pub const SO_BUF_LOCK: u32 = 72; +pub const SO_RESERVE_MEM: u32 = 73; +pub const SO_TXREHASH: u32 = 74; +pub const SO_RCVMARK: u32 = 75; +pub const SO_PASSPIDFD: u32 = 76; +pub const SO_PEERPIDFD: u32 = 77; +pub const SO_TIMESTAMP: u32 = 29; +pub const SO_TIMESTAMPNS: u32 = 35; +pub const SO_TIMESTAMPING: u32 = 37; +pub const SO_RCVTIMEO: u32 = 20; +pub const SO_SNDTIMEO: u32 = 21; +pub type __u8 = ::aya_ebpf_cty::c_uchar; +pub type __s16 = ::aya_ebpf_cty::c_short; +pub type __u16 = ::aya_ebpf_cty::c_ushort; +pub type __s32 = ::aya_ebpf_cty::c_int; +pub type __u32 = ::aya_ebpf_cty::c_uint; +pub type __s64 = ::aya_ebpf_cty::c_longlong; +pub type __u64 = ::aya_ebpf_cty::c_ulonglong; +pub type __be16 = __u16; +pub type __be32 = __u32; +pub type __wsum = __u32; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_perf_event_data { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct linux_binprm { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pt_regs { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcphdr { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct seq_file { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcp6_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcp_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcp_timewait_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcp_request_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct udp6_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct unix_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct task_struct { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cgroup { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct path { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct inode { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct socket { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct file { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct mptcp_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct iphdr { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ipv6hdr { + _unused: [u8; 0], +} +pub mod bpf_cond_pseudo_jmp { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MAY_GOTO: Type = 0; +} +pub const BPF_REG_0: _bindgen_ty_1 = 0; +pub const BPF_REG_1: _bindgen_ty_1 = 1; +pub const BPF_REG_2: _bindgen_ty_1 = 2; +pub const BPF_REG_3: _bindgen_ty_1 = 3; +pub const BPF_REG_4: _bindgen_ty_1 = 4; +pub const BPF_REG_5: _bindgen_ty_1 = 5; +pub const BPF_REG_6: _bindgen_ty_1 = 6; +pub const BPF_REG_7: _bindgen_ty_1 = 7; +pub const BPF_REG_8: _bindgen_ty_1 = 8; +pub const BPF_REG_9: _bindgen_ty_1 = 9; +pub const BPF_REG_10: _bindgen_ty_1 = 10; +pub const __MAX_BPF_REG: _bindgen_ty_1 = 11; +pub type _bindgen_ty_1 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_insn { + pub code: __u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub off: __s16, + pub imm: __s32, +} +impl bpf_insn { + #[inline] + pub fn dst_reg(&self) -> __u8 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) } + } + #[inline] + pub fn set_dst_reg(&mut self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn src_reg(&self) -> __u8 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } + } + #[inline] + pub fn set_src_reg(&mut self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 4u8, { + let dst_reg: u8 = unsafe { ::core::mem::transmute(dst_reg) }; + dst_reg as u64 + }); + __bindgen_bitfield_unit.set(4usize, 4u8, { + let src_reg: u8 = unsafe { ::core::mem::transmute(src_reg) }; + src_reg as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug)] +pub struct bpf_lpm_trie_key { + pub prefixlen: __u32, + pub data: __IncompleteArrayField<__u8>, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_lpm_trie_key_hdr { + pub prefixlen: __u32, +} +#[repr(C)] +pub struct bpf_lpm_trie_key_u8 { + pub __bindgen_anon_1: bpf_lpm_trie_key_u8__bindgen_ty_1, + pub data: __IncompleteArrayField<__u8>, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_lpm_trie_key_u8__bindgen_ty_1 { + pub hdr: bpf_lpm_trie_key_hdr, + pub prefixlen: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_cgroup_storage_key { + pub cgroup_inode_id: __u64, + pub attach_type: __u32, +} +pub mod bpf_cgroup_iter_order { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_CGROUP_ITER_ORDER_UNSPEC: Type = 0; + pub const BPF_CGROUP_ITER_SELF_ONLY: Type = 1; + pub const BPF_CGROUP_ITER_DESCENDANTS_PRE: Type = 2; + pub const BPF_CGROUP_ITER_DESCENDANTS_POST: Type = 3; + pub const BPF_CGROUP_ITER_ANCESTORS_UP: Type = 4; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_iter_link_info { + pub map: bpf_iter_link_info__bindgen_ty_1, + pub cgroup: bpf_iter_link_info__bindgen_ty_2, + pub task: bpf_iter_link_info__bindgen_ty_3, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_iter_link_info__bindgen_ty_1 { + pub map_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_iter_link_info__bindgen_ty_2 { + pub order: bpf_cgroup_iter_order::Type, + pub cgroup_fd: __u32, + pub cgroup_id: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_iter_link_info__bindgen_ty_3 { + pub tid: __u32, + pub pid: __u32, + pub pid_fd: __u32, +} +pub mod bpf_cmd { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MAP_CREATE: Type = 0; + pub const BPF_MAP_LOOKUP_ELEM: Type = 1; + pub const BPF_MAP_UPDATE_ELEM: Type = 2; + pub const BPF_MAP_DELETE_ELEM: Type = 3; + pub const BPF_MAP_GET_NEXT_KEY: Type = 4; + pub const BPF_PROG_LOAD: Type = 5; + pub const BPF_OBJ_PIN: Type = 6; + pub const BPF_OBJ_GET: Type = 7; + pub const BPF_PROG_ATTACH: Type = 8; + pub const BPF_PROG_DETACH: Type = 9; + pub const BPF_PROG_TEST_RUN: Type = 10; + pub const BPF_PROG_RUN: Type = 10; + pub const BPF_PROG_GET_NEXT_ID: Type = 11; + pub const BPF_MAP_GET_NEXT_ID: Type = 12; + pub const BPF_PROG_GET_FD_BY_ID: Type = 13; + pub const BPF_MAP_GET_FD_BY_ID: Type = 14; + pub const BPF_OBJ_GET_INFO_BY_FD: Type = 15; + pub const BPF_PROG_QUERY: Type = 16; + pub const BPF_RAW_TRACEPOINT_OPEN: Type = 17; + pub const BPF_BTF_LOAD: Type = 18; + pub const BPF_BTF_GET_FD_BY_ID: Type = 19; + pub const BPF_TASK_FD_QUERY: Type = 20; + pub const BPF_MAP_LOOKUP_AND_DELETE_ELEM: Type = 21; + pub const BPF_MAP_FREEZE: Type = 22; + pub const BPF_BTF_GET_NEXT_ID: Type = 23; + pub const BPF_MAP_LOOKUP_BATCH: Type = 24; + pub const BPF_MAP_LOOKUP_AND_DELETE_BATCH: Type = 25; + pub const BPF_MAP_UPDATE_BATCH: Type = 26; + pub const BPF_MAP_DELETE_BATCH: Type = 27; + pub const BPF_LINK_CREATE: Type = 28; + pub const BPF_LINK_UPDATE: Type = 29; + pub const BPF_LINK_GET_FD_BY_ID: Type = 30; + pub const BPF_LINK_GET_NEXT_ID: Type = 31; + pub const BPF_ENABLE_STATS: Type = 32; + pub const BPF_ITER_CREATE: Type = 33; + pub const BPF_LINK_DETACH: Type = 34; + pub const BPF_PROG_BIND_MAP: Type = 35; + pub const BPF_TOKEN_CREATE: Type = 36; + pub const __MAX_BPF_CMD: Type = 37; +} +pub mod bpf_map_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MAP_TYPE_UNSPEC: Type = 0; + pub const BPF_MAP_TYPE_HASH: Type = 1; + pub const BPF_MAP_TYPE_ARRAY: Type = 2; + pub const BPF_MAP_TYPE_PROG_ARRAY: Type = 3; + pub const BPF_MAP_TYPE_PERF_EVENT_ARRAY: Type = 4; + pub const BPF_MAP_TYPE_PERCPU_HASH: Type = 5; + pub const BPF_MAP_TYPE_PERCPU_ARRAY: Type = 6; + pub const BPF_MAP_TYPE_STACK_TRACE: Type = 7; + pub const BPF_MAP_TYPE_CGROUP_ARRAY: Type = 8; + pub const BPF_MAP_TYPE_LRU_HASH: Type = 9; + pub const BPF_MAP_TYPE_LRU_PERCPU_HASH: Type = 10; + pub const BPF_MAP_TYPE_LPM_TRIE: Type = 11; + pub const BPF_MAP_TYPE_ARRAY_OF_MAPS: Type = 12; + pub const BPF_MAP_TYPE_HASH_OF_MAPS: Type = 13; + pub const BPF_MAP_TYPE_DEVMAP: Type = 14; + pub const BPF_MAP_TYPE_SOCKMAP: Type = 15; + pub const BPF_MAP_TYPE_CPUMAP: Type = 16; + pub const BPF_MAP_TYPE_XSKMAP: Type = 17; + pub const BPF_MAP_TYPE_SOCKHASH: Type = 18; + pub const BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED: Type = 19; + pub const BPF_MAP_TYPE_CGROUP_STORAGE: Type = 19; + pub const BPF_MAP_TYPE_REUSEPORT_SOCKARRAY: Type = 20; + pub const BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED: Type = 21; + pub const BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE: Type = 21; + pub const BPF_MAP_TYPE_QUEUE: Type = 22; + pub const BPF_MAP_TYPE_STACK: Type = 23; + pub const BPF_MAP_TYPE_SK_STORAGE: Type = 24; + pub const BPF_MAP_TYPE_DEVMAP_HASH: Type = 25; + pub const BPF_MAP_TYPE_STRUCT_OPS: Type = 26; + pub const BPF_MAP_TYPE_RINGBUF: Type = 27; + pub const BPF_MAP_TYPE_INODE_STORAGE: Type = 28; + pub const BPF_MAP_TYPE_TASK_STORAGE: Type = 29; + pub const BPF_MAP_TYPE_BLOOM_FILTER: Type = 30; + pub const BPF_MAP_TYPE_USER_RINGBUF: Type = 31; + pub const BPF_MAP_TYPE_CGRP_STORAGE: Type = 32; + pub const BPF_MAP_TYPE_ARENA: Type = 33; + pub const __MAX_BPF_MAP_TYPE: Type = 34; +} +pub mod bpf_prog_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_PROG_TYPE_UNSPEC: Type = 0; + pub const BPF_PROG_TYPE_SOCKET_FILTER: Type = 1; + pub const BPF_PROG_TYPE_KPROBE: Type = 2; + pub const BPF_PROG_TYPE_SCHED_CLS: Type = 3; + pub const BPF_PROG_TYPE_SCHED_ACT: Type = 4; + pub const BPF_PROG_TYPE_TRACEPOINT: Type = 5; + pub const BPF_PROG_TYPE_XDP: Type = 6; + pub const BPF_PROG_TYPE_PERF_EVENT: Type = 7; + pub const BPF_PROG_TYPE_CGROUP_SKB: Type = 8; + pub const BPF_PROG_TYPE_CGROUP_SOCK: Type = 9; + pub const BPF_PROG_TYPE_LWT_IN: Type = 10; + pub const BPF_PROG_TYPE_LWT_OUT: Type = 11; + pub const BPF_PROG_TYPE_LWT_XMIT: Type = 12; + pub const BPF_PROG_TYPE_SOCK_OPS: Type = 13; + pub const BPF_PROG_TYPE_SK_SKB: Type = 14; + pub const BPF_PROG_TYPE_CGROUP_DEVICE: Type = 15; + pub const BPF_PROG_TYPE_SK_MSG: Type = 16; + pub const BPF_PROG_TYPE_RAW_TRACEPOINT: Type = 17; + pub const BPF_PROG_TYPE_CGROUP_SOCK_ADDR: Type = 18; + pub const BPF_PROG_TYPE_LWT_SEG6LOCAL: Type = 19; + pub const BPF_PROG_TYPE_LIRC_MODE2: Type = 20; + pub const BPF_PROG_TYPE_SK_REUSEPORT: Type = 21; + pub const BPF_PROG_TYPE_FLOW_DISSECTOR: Type = 22; + pub const BPF_PROG_TYPE_CGROUP_SYSCTL: Type = 23; + pub const BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE: Type = 24; + pub const BPF_PROG_TYPE_CGROUP_SOCKOPT: Type = 25; + pub const BPF_PROG_TYPE_TRACING: Type = 26; + pub const BPF_PROG_TYPE_STRUCT_OPS: Type = 27; + pub const BPF_PROG_TYPE_EXT: Type = 28; + pub const BPF_PROG_TYPE_LSM: Type = 29; + pub const BPF_PROG_TYPE_SK_LOOKUP: Type = 30; + pub const BPF_PROG_TYPE_SYSCALL: Type = 31; + pub const BPF_PROG_TYPE_NETFILTER: Type = 32; + pub const __MAX_BPF_PROG_TYPE: Type = 33; +} +pub mod bpf_attach_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_CGROUP_INET_INGRESS: Type = 0; + pub const BPF_CGROUP_INET_EGRESS: Type = 1; + pub const BPF_CGROUP_INET_SOCK_CREATE: Type = 2; + pub const BPF_CGROUP_SOCK_OPS: Type = 3; + pub const BPF_SK_SKB_STREAM_PARSER: Type = 4; + pub const BPF_SK_SKB_STREAM_VERDICT: Type = 5; + pub const BPF_CGROUP_DEVICE: Type = 6; + pub const BPF_SK_MSG_VERDICT: Type = 7; + pub const BPF_CGROUP_INET4_BIND: Type = 8; + pub const BPF_CGROUP_INET6_BIND: Type = 9; + pub const BPF_CGROUP_INET4_CONNECT: Type = 10; + pub const BPF_CGROUP_INET6_CONNECT: Type = 11; + pub const BPF_CGROUP_INET4_POST_BIND: Type = 12; + pub const BPF_CGROUP_INET6_POST_BIND: Type = 13; + pub const BPF_CGROUP_UDP4_SENDMSG: Type = 14; + pub const BPF_CGROUP_UDP6_SENDMSG: Type = 15; + pub const BPF_LIRC_MODE2: Type = 16; + pub const BPF_FLOW_DISSECTOR: Type = 17; + pub const BPF_CGROUP_SYSCTL: Type = 18; + pub const BPF_CGROUP_UDP4_RECVMSG: Type = 19; + pub const BPF_CGROUP_UDP6_RECVMSG: Type = 20; + pub const BPF_CGROUP_GETSOCKOPT: Type = 21; + pub const BPF_CGROUP_SETSOCKOPT: Type = 22; + pub const BPF_TRACE_RAW_TP: Type = 23; + pub const BPF_TRACE_FENTRY: Type = 24; + pub const BPF_TRACE_FEXIT: Type = 25; + pub const BPF_MODIFY_RETURN: Type = 26; + pub const BPF_LSM_MAC: Type = 27; + pub const BPF_TRACE_ITER: Type = 28; + pub const BPF_CGROUP_INET4_GETPEERNAME: Type = 29; + pub const BPF_CGROUP_INET6_GETPEERNAME: Type = 30; + pub const BPF_CGROUP_INET4_GETSOCKNAME: Type = 31; + pub const BPF_CGROUP_INET6_GETSOCKNAME: Type = 32; + pub const BPF_XDP_DEVMAP: Type = 33; + pub const BPF_CGROUP_INET_SOCK_RELEASE: Type = 34; + pub const BPF_XDP_CPUMAP: Type = 35; + pub const BPF_SK_LOOKUP: Type = 36; + pub const BPF_XDP: Type = 37; + pub const BPF_SK_SKB_VERDICT: Type = 38; + pub const BPF_SK_REUSEPORT_SELECT: Type = 39; + pub const BPF_SK_REUSEPORT_SELECT_OR_MIGRATE: Type = 40; + pub const BPF_PERF_EVENT: Type = 41; + pub const BPF_TRACE_KPROBE_MULTI: Type = 42; + pub const BPF_LSM_CGROUP: Type = 43; + pub const BPF_STRUCT_OPS: Type = 44; + pub const BPF_NETFILTER: Type = 45; + pub const BPF_TCX_INGRESS: Type = 46; + pub const BPF_TCX_EGRESS: Type = 47; + pub const BPF_TRACE_UPROBE_MULTI: Type = 48; + pub const BPF_CGROUP_UNIX_CONNECT: Type = 49; + pub const BPF_CGROUP_UNIX_SENDMSG: Type = 50; + pub const BPF_CGROUP_UNIX_RECVMSG: Type = 51; + pub const BPF_CGROUP_UNIX_GETPEERNAME: Type = 52; + pub const BPF_CGROUP_UNIX_GETSOCKNAME: Type = 53; + pub const BPF_NETKIT_PRIMARY: Type = 54; + pub const BPF_NETKIT_PEER: Type = 55; + pub const __MAX_BPF_ATTACH_TYPE: Type = 56; +} +pub mod bpf_link_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_LINK_TYPE_UNSPEC: Type = 0; + pub const BPF_LINK_TYPE_RAW_TRACEPOINT: Type = 1; + pub const BPF_LINK_TYPE_TRACING: Type = 2; + pub const BPF_LINK_TYPE_CGROUP: Type = 3; + pub const BPF_LINK_TYPE_ITER: Type = 4; + pub const BPF_LINK_TYPE_NETNS: Type = 5; + pub const BPF_LINK_TYPE_XDP: Type = 6; + pub const BPF_LINK_TYPE_PERF_EVENT: Type = 7; + pub const BPF_LINK_TYPE_KPROBE_MULTI: Type = 8; + pub const BPF_LINK_TYPE_STRUCT_OPS: Type = 9; + pub const BPF_LINK_TYPE_NETFILTER: Type = 10; + pub const BPF_LINK_TYPE_TCX: Type = 11; + pub const BPF_LINK_TYPE_UPROBE_MULTI: Type = 12; + pub const BPF_LINK_TYPE_NETKIT: Type = 13; + pub const __MAX_BPF_LINK_TYPE: Type = 14; +} +pub mod bpf_perf_event_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_PERF_EVENT_UNSPEC: Type = 0; + pub const BPF_PERF_EVENT_UPROBE: Type = 1; + pub const BPF_PERF_EVENT_URETPROBE: Type = 2; + pub const BPF_PERF_EVENT_KPROBE: Type = 3; + pub const BPF_PERF_EVENT_KRETPROBE: Type = 4; + pub const BPF_PERF_EVENT_TRACEPOINT: Type = 5; + pub const BPF_PERF_EVENT_EVENT: Type = 6; +} +pub const BPF_F_KPROBE_MULTI_RETURN: _bindgen_ty_2 = 1; +pub type _bindgen_ty_2 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_UPROBE_MULTI_RETURN: _bindgen_ty_3 = 1; +pub type _bindgen_ty_3 = ::aya_ebpf_cty::c_uint; +pub mod bpf_addr_space_cast { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_ADDR_SPACE_CAST: Type = 1; +} +pub const BPF_ANY: _bindgen_ty_4 = 0; +pub const BPF_NOEXIST: _bindgen_ty_4 = 1; +pub const BPF_EXIST: _bindgen_ty_4 = 2; +pub const BPF_F_LOCK: _bindgen_ty_4 = 4; +pub type _bindgen_ty_4 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_NO_PREALLOC: _bindgen_ty_5 = 1; +pub const BPF_F_NO_COMMON_LRU: _bindgen_ty_5 = 2; +pub const BPF_F_NUMA_NODE: _bindgen_ty_5 = 4; +pub const BPF_F_RDONLY: _bindgen_ty_5 = 8; +pub const BPF_F_WRONLY: _bindgen_ty_5 = 16; +pub const BPF_F_STACK_BUILD_ID: _bindgen_ty_5 = 32; +pub const BPF_F_ZERO_SEED: _bindgen_ty_5 = 64; +pub const BPF_F_RDONLY_PROG: _bindgen_ty_5 = 128; +pub const BPF_F_WRONLY_PROG: _bindgen_ty_5 = 256; +pub const BPF_F_CLONE: _bindgen_ty_5 = 512; +pub const BPF_F_MMAPABLE: _bindgen_ty_5 = 1024; +pub const BPF_F_PRESERVE_ELEMS: _bindgen_ty_5 = 2048; +pub const BPF_F_INNER_MAP: _bindgen_ty_5 = 4096; +pub const BPF_F_LINK: _bindgen_ty_5 = 8192; +pub const BPF_F_PATH_FD: _bindgen_ty_5 = 16384; +pub const BPF_F_VTYPE_BTF_OBJ_FD: _bindgen_ty_5 = 32768; +pub const BPF_F_TOKEN_FD: _bindgen_ty_5 = 65536; +pub const BPF_F_SEGV_ON_FAULT: _bindgen_ty_5 = 131072; +pub const BPF_F_NO_USER_CONV: _bindgen_ty_5 = 262144; +pub type _bindgen_ty_5 = ::aya_ebpf_cty::c_uint; +pub mod bpf_stats_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_STATS_RUN_TIME: Type = 0; +} +pub mod bpf_stack_build_id_status { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_STACK_BUILD_ID_EMPTY: Type = 0; + pub const BPF_STACK_BUILD_ID_VALID: Type = 1; + pub const BPF_STACK_BUILD_ID_IP: Type = 2; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_stack_build_id { + pub status: __s32, + pub build_id: [::aya_ebpf_cty::c_uchar; 20usize], + pub __bindgen_anon_1: bpf_stack_build_id__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_stack_build_id__bindgen_ty_1 { + pub offset: __u64, + pub ip: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_1, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_2, + pub batch: bpf_attr__bindgen_ty_3, + pub __bindgen_anon_3: bpf_attr__bindgen_ty_4, + pub __bindgen_anon_4: bpf_attr__bindgen_ty_5, + pub __bindgen_anon_5: bpf_attr__bindgen_ty_6, + pub test: bpf_attr__bindgen_ty_7, + pub __bindgen_anon_6: bpf_attr__bindgen_ty_8, + pub info: bpf_attr__bindgen_ty_9, + pub query: bpf_attr__bindgen_ty_10, + pub raw_tracepoint: bpf_attr__bindgen_ty_11, + pub __bindgen_anon_7: bpf_attr__bindgen_ty_12, + pub task_fd_query: bpf_attr__bindgen_ty_13, + pub link_create: bpf_attr__bindgen_ty_14, + pub link_update: bpf_attr__bindgen_ty_15, + pub link_detach: bpf_attr__bindgen_ty_16, + pub enable_stats: bpf_attr__bindgen_ty_17, + pub iter_create: bpf_attr__bindgen_ty_18, + pub prog_bind_map: bpf_attr__bindgen_ty_19, + pub token_create: bpf_attr__bindgen_ty_20, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_1 { + pub map_type: __u32, + pub key_size: __u32, + pub value_size: __u32, + pub max_entries: __u32, + pub map_flags: __u32, + pub inner_map_fd: __u32, + pub numa_node: __u32, + pub map_name: [::aya_ebpf_cty::c_char; 16usize], + pub map_ifindex: __u32, + pub btf_fd: __u32, + pub btf_key_type_id: __u32, + pub btf_value_type_id: __u32, + pub btf_vmlinux_value_type_id: __u32, + pub map_extra: __u64, + pub value_type_btf_obj_fd: __s32, + pub map_token_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_2 { + pub map_fd: __u32, + pub key: __u64, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_2__bindgen_ty_1, + pub flags: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_2__bindgen_ty_1 { + pub value: __u64, + pub next_key: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_3 { + pub in_batch: __u64, + pub out_batch: __u64, + pub keys: __u64, + pub values: __u64, + pub count: __u32, + pub map_fd: __u32, + pub elem_flags: __u64, + pub flags: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_4 { + pub prog_type: __u32, + pub insn_cnt: __u32, + pub insns: __u64, + pub license: __u64, + pub log_level: __u32, + pub log_size: __u32, + pub log_buf: __u64, + pub kern_version: __u32, + pub prog_flags: __u32, + pub prog_name: [::aya_ebpf_cty::c_char; 16usize], + pub prog_ifindex: __u32, + pub expected_attach_type: __u32, + pub prog_btf_fd: __u32, + pub func_info_rec_size: __u32, + pub func_info: __u64, + pub func_info_cnt: __u32, + pub line_info_rec_size: __u32, + pub line_info: __u64, + pub line_info_cnt: __u32, + pub attach_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_4__bindgen_ty_1, + pub core_relo_cnt: __u32, + pub fd_array: __u64, + pub core_relos: __u64, + pub core_relo_rec_size: __u32, + pub log_true_size: __u32, + pub prog_token_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_4__bindgen_ty_1 { + pub attach_prog_fd: __u32, + pub attach_btf_obj_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_5 { + pub pathname: __u64, + pub bpf_fd: __u32, + pub file_flags: __u32, + pub path_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_6 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_6__bindgen_ty_1, + pub attach_bpf_fd: __u32, + pub attach_type: __u32, + pub attach_flags: __u32, + pub replace_bpf_fd: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_6__bindgen_ty_2, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_6__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_6__bindgen_ty_2 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_7 { + pub prog_fd: __u32, + pub retval: __u32, + pub data_size_in: __u32, + pub data_size_out: __u32, + pub data_in: __u64, + pub data_out: __u64, + pub repeat: __u32, + pub duration: __u32, + pub ctx_size_in: __u32, + pub ctx_size_out: __u32, + pub ctx_in: __u64, + pub ctx_out: __u64, + pub flags: __u32, + pub cpu: __u32, + pub batch_size: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_8 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_8__bindgen_ty_1, + pub next_id: __u32, + pub open_flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_8__bindgen_ty_1 { + pub start_id: __u32, + pub prog_id: __u32, + pub map_id: __u32, + pub btf_id: __u32, + pub link_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_9 { + pub bpf_fd: __u32, + pub info_len: __u32, + pub info: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_10 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_10__bindgen_ty_1, + pub attach_type: __u32, + pub query_flags: __u32, + pub attach_flags: __u32, + pub prog_ids: __u64, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_10__bindgen_ty_2, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub prog_attach_flags: __u64, + pub link_ids: __u64, + pub link_attach_flags: __u64, + pub revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_10__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_10__bindgen_ty_2 { + pub prog_cnt: __u32, + pub count: __u32, +} +impl bpf_attr__bindgen_ty_10 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_11 { + pub name: __u64, + pub prog_fd: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_attr__bindgen_ty_11 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_12 { + pub btf: __u64, + pub btf_log_buf: __u64, + pub btf_size: __u32, + pub btf_log_size: __u32, + pub btf_log_level: __u32, + pub btf_log_true_size: __u32, + pub btf_flags: __u32, + pub btf_token_fd: __s32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_13 { + pub pid: __u32, + pub fd: __u32, + pub flags: __u32, + pub buf_len: __u32, + pub buf: __u64, + pub prog_id: __u32, + pub fd_type: __u32, + pub probe_offset: __u64, + pub probe_addr: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_1, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_14__bindgen_ty_2, + pub attach_type: __u32, + pub flags: __u32, + pub __bindgen_anon_3: bpf_attr__bindgen_ty_14__bindgen_ty_3, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_1 { + pub prog_fd: __u32, + pub map_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3 { + pub target_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1, + pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2, + pub kprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3, + pub tracing: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4, + pub netfilter: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5, + pub tcx: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6, + pub uprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7, + pub netkit: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 { + pub iter_info: __u64, + pub iter_info_len: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 { + pub bpf_cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 { + pub flags: __u32, + pub cnt: __u32, + pub syms: __u64, + pub addrs: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 { + pub target_btf_id: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 { + pub pf: __u32, + pub hooknum: __u32, + pub priority: __s32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 { + pub path: __u64, + pub offsets: __u64, + pub ref_ctr_offsets: __u64, + pub cookies: __u64, + pub cnt: __u32, + pub flags: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_15 { + pub link_fd: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_15__bindgen_ty_1, + pub flags: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_15__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_15__bindgen_ty_1 { + pub new_prog_fd: __u32, + pub new_map_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_15__bindgen_ty_2 { + pub old_prog_fd: __u32, + pub old_map_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_16 { + pub link_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_17 { + pub type_: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_18 { + pub link_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_19 { + pub prog_fd: __u32, + pub map_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_20 { + pub flags: __u32, + pub bpffs_fd: __u32, +} +pub mod bpf_func_id { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_FUNC_unspec: Type = 0; + pub const BPF_FUNC_map_lookup_elem: Type = 1; + pub const BPF_FUNC_map_update_elem: Type = 2; + pub const BPF_FUNC_map_delete_elem: Type = 3; + pub const BPF_FUNC_probe_read: Type = 4; + pub const BPF_FUNC_ktime_get_ns: Type = 5; + pub const BPF_FUNC_trace_printk: Type = 6; + pub const BPF_FUNC_get_prandom_u32: Type = 7; + pub const BPF_FUNC_get_smp_processor_id: Type = 8; + pub const BPF_FUNC_skb_store_bytes: Type = 9; + pub const BPF_FUNC_l3_csum_replace: Type = 10; + pub const BPF_FUNC_l4_csum_replace: Type = 11; + pub const BPF_FUNC_tail_call: Type = 12; + pub const BPF_FUNC_clone_redirect: Type = 13; + pub const BPF_FUNC_get_current_pid_tgid: Type = 14; + pub const BPF_FUNC_get_current_uid_gid: Type = 15; + pub const BPF_FUNC_get_current_comm: Type = 16; + pub const BPF_FUNC_get_cgroup_classid: Type = 17; + pub const BPF_FUNC_skb_vlan_push: Type = 18; + pub const BPF_FUNC_skb_vlan_pop: Type = 19; + pub const BPF_FUNC_skb_get_tunnel_key: Type = 20; + pub const BPF_FUNC_skb_set_tunnel_key: Type = 21; + pub const BPF_FUNC_perf_event_read: Type = 22; + pub const BPF_FUNC_redirect: Type = 23; + pub const BPF_FUNC_get_route_realm: Type = 24; + pub const BPF_FUNC_perf_event_output: Type = 25; + pub const BPF_FUNC_skb_load_bytes: Type = 26; + pub const BPF_FUNC_get_stackid: Type = 27; + pub const BPF_FUNC_csum_diff: Type = 28; + pub const BPF_FUNC_skb_get_tunnel_opt: Type = 29; + pub const BPF_FUNC_skb_set_tunnel_opt: Type = 30; + pub const BPF_FUNC_skb_change_proto: Type = 31; + pub const BPF_FUNC_skb_change_type: Type = 32; + pub const BPF_FUNC_skb_under_cgroup: Type = 33; + pub const BPF_FUNC_get_hash_recalc: Type = 34; + pub const BPF_FUNC_get_current_task: Type = 35; + pub const BPF_FUNC_probe_write_user: Type = 36; + pub const BPF_FUNC_current_task_under_cgroup: Type = 37; + pub const BPF_FUNC_skb_change_tail: Type = 38; + pub const BPF_FUNC_skb_pull_data: Type = 39; + pub const BPF_FUNC_csum_update: Type = 40; + pub const BPF_FUNC_set_hash_invalid: Type = 41; + pub const BPF_FUNC_get_numa_node_id: Type = 42; + pub const BPF_FUNC_skb_change_head: Type = 43; + pub const BPF_FUNC_xdp_adjust_head: Type = 44; + pub const BPF_FUNC_probe_read_str: Type = 45; + pub const BPF_FUNC_get_socket_cookie: Type = 46; + pub const BPF_FUNC_get_socket_uid: Type = 47; + pub const BPF_FUNC_set_hash: Type = 48; + pub const BPF_FUNC_setsockopt: Type = 49; + pub const BPF_FUNC_skb_adjust_room: Type = 50; + pub const BPF_FUNC_redirect_map: Type = 51; + pub const BPF_FUNC_sk_redirect_map: Type = 52; + pub const BPF_FUNC_sock_map_update: Type = 53; + pub const BPF_FUNC_xdp_adjust_meta: Type = 54; + pub const BPF_FUNC_perf_event_read_value: Type = 55; + pub const BPF_FUNC_perf_prog_read_value: Type = 56; + pub const BPF_FUNC_getsockopt: Type = 57; + pub const BPF_FUNC_override_return: Type = 58; + pub const BPF_FUNC_sock_ops_cb_flags_set: Type = 59; + pub const BPF_FUNC_msg_redirect_map: Type = 60; + pub const BPF_FUNC_msg_apply_bytes: Type = 61; + pub const BPF_FUNC_msg_cork_bytes: Type = 62; + pub const BPF_FUNC_msg_pull_data: Type = 63; + pub const BPF_FUNC_bind: Type = 64; + pub const BPF_FUNC_xdp_adjust_tail: Type = 65; + pub const BPF_FUNC_skb_get_xfrm_state: Type = 66; + pub const BPF_FUNC_get_stack: Type = 67; + pub const BPF_FUNC_skb_load_bytes_relative: Type = 68; + pub const BPF_FUNC_fib_lookup: Type = 69; + pub const BPF_FUNC_sock_hash_update: Type = 70; + pub const BPF_FUNC_msg_redirect_hash: Type = 71; + pub const BPF_FUNC_sk_redirect_hash: Type = 72; + pub const BPF_FUNC_lwt_push_encap: Type = 73; + pub const BPF_FUNC_lwt_seg6_store_bytes: Type = 74; + pub const BPF_FUNC_lwt_seg6_adjust_srh: Type = 75; + pub const BPF_FUNC_lwt_seg6_action: Type = 76; + pub const BPF_FUNC_rc_repeat: Type = 77; + pub const BPF_FUNC_rc_keydown: Type = 78; + pub const BPF_FUNC_skb_cgroup_id: Type = 79; + pub const BPF_FUNC_get_current_cgroup_id: Type = 80; + pub const BPF_FUNC_get_local_storage: Type = 81; + pub const BPF_FUNC_sk_select_reuseport: Type = 82; + pub const BPF_FUNC_skb_ancestor_cgroup_id: Type = 83; + pub const BPF_FUNC_sk_lookup_tcp: Type = 84; + pub const BPF_FUNC_sk_lookup_udp: Type = 85; + pub const BPF_FUNC_sk_release: Type = 86; + pub const BPF_FUNC_map_push_elem: Type = 87; + pub const BPF_FUNC_map_pop_elem: Type = 88; + pub const BPF_FUNC_map_peek_elem: Type = 89; + pub const BPF_FUNC_msg_push_data: Type = 90; + pub const BPF_FUNC_msg_pop_data: Type = 91; + pub const BPF_FUNC_rc_pointer_rel: Type = 92; + pub const BPF_FUNC_spin_lock: Type = 93; + pub const BPF_FUNC_spin_unlock: Type = 94; + pub const BPF_FUNC_sk_fullsock: Type = 95; + pub const BPF_FUNC_tcp_sock: Type = 96; + pub const BPF_FUNC_skb_ecn_set_ce: Type = 97; + pub const BPF_FUNC_get_listener_sock: Type = 98; + pub const BPF_FUNC_skc_lookup_tcp: Type = 99; + pub const BPF_FUNC_tcp_check_syncookie: Type = 100; + pub const BPF_FUNC_sysctl_get_name: Type = 101; + pub const BPF_FUNC_sysctl_get_current_value: Type = 102; + pub const BPF_FUNC_sysctl_get_new_value: Type = 103; + pub const BPF_FUNC_sysctl_set_new_value: Type = 104; + pub const BPF_FUNC_strtol: Type = 105; + pub const BPF_FUNC_strtoul: Type = 106; + pub const BPF_FUNC_sk_storage_get: Type = 107; + pub const BPF_FUNC_sk_storage_delete: Type = 108; + pub const BPF_FUNC_send_signal: Type = 109; + pub const BPF_FUNC_tcp_gen_syncookie: Type = 110; + pub const BPF_FUNC_skb_output: Type = 111; + pub const BPF_FUNC_probe_read_user: Type = 112; + pub const BPF_FUNC_probe_read_kernel: Type = 113; + pub const BPF_FUNC_probe_read_user_str: Type = 114; + pub const BPF_FUNC_probe_read_kernel_str: Type = 115; + pub const BPF_FUNC_tcp_send_ack: Type = 116; + pub const BPF_FUNC_send_signal_thread: Type = 117; + pub const BPF_FUNC_jiffies64: Type = 118; + pub const BPF_FUNC_read_branch_records: Type = 119; + pub const BPF_FUNC_get_ns_current_pid_tgid: Type = 120; + pub const BPF_FUNC_xdp_output: Type = 121; + pub const BPF_FUNC_get_netns_cookie: Type = 122; + pub const BPF_FUNC_get_current_ancestor_cgroup_id: Type = 123; + pub const BPF_FUNC_sk_assign: Type = 124; + pub const BPF_FUNC_ktime_get_boot_ns: Type = 125; + pub const BPF_FUNC_seq_printf: Type = 126; + pub const BPF_FUNC_seq_write: Type = 127; + pub const BPF_FUNC_sk_cgroup_id: Type = 128; + pub const BPF_FUNC_sk_ancestor_cgroup_id: Type = 129; + pub const BPF_FUNC_ringbuf_output: Type = 130; + pub const BPF_FUNC_ringbuf_reserve: Type = 131; + pub const BPF_FUNC_ringbuf_submit: Type = 132; + pub const BPF_FUNC_ringbuf_discard: Type = 133; + pub const BPF_FUNC_ringbuf_query: Type = 134; + pub const BPF_FUNC_csum_level: Type = 135; + pub const BPF_FUNC_skc_to_tcp6_sock: Type = 136; + pub const BPF_FUNC_skc_to_tcp_sock: Type = 137; + pub const BPF_FUNC_skc_to_tcp_timewait_sock: Type = 138; + pub const BPF_FUNC_skc_to_tcp_request_sock: Type = 139; + pub const BPF_FUNC_skc_to_udp6_sock: Type = 140; + pub const BPF_FUNC_get_task_stack: Type = 141; + pub const BPF_FUNC_load_hdr_opt: Type = 142; + pub const BPF_FUNC_store_hdr_opt: Type = 143; + pub const BPF_FUNC_reserve_hdr_opt: Type = 144; + pub const BPF_FUNC_inode_storage_get: Type = 145; + pub const BPF_FUNC_inode_storage_delete: Type = 146; + pub const BPF_FUNC_d_path: Type = 147; + pub const BPF_FUNC_copy_from_user: Type = 148; + pub const BPF_FUNC_snprintf_btf: Type = 149; + pub const BPF_FUNC_seq_printf_btf: Type = 150; + pub const BPF_FUNC_skb_cgroup_classid: Type = 151; + pub const BPF_FUNC_redirect_neigh: Type = 152; + pub const BPF_FUNC_per_cpu_ptr: Type = 153; + pub const BPF_FUNC_this_cpu_ptr: Type = 154; + pub const BPF_FUNC_redirect_peer: Type = 155; + pub const BPF_FUNC_task_storage_get: Type = 156; + pub const BPF_FUNC_task_storage_delete: Type = 157; + pub const BPF_FUNC_get_current_task_btf: Type = 158; + pub const BPF_FUNC_bprm_opts_set: Type = 159; + pub const BPF_FUNC_ktime_get_coarse_ns: Type = 160; + pub const BPF_FUNC_ima_inode_hash: Type = 161; + pub const BPF_FUNC_sock_from_file: Type = 162; + pub const BPF_FUNC_check_mtu: Type = 163; + pub const BPF_FUNC_for_each_map_elem: Type = 164; + pub const BPF_FUNC_snprintf: Type = 165; + pub const BPF_FUNC_sys_bpf: Type = 166; + pub const BPF_FUNC_btf_find_by_name_kind: Type = 167; + pub const BPF_FUNC_sys_close: Type = 168; + pub const BPF_FUNC_timer_init: Type = 169; + pub const BPF_FUNC_timer_set_callback: Type = 170; + pub const BPF_FUNC_timer_start: Type = 171; + pub const BPF_FUNC_timer_cancel: Type = 172; + pub const BPF_FUNC_get_func_ip: Type = 173; + pub const BPF_FUNC_get_attach_cookie: Type = 174; + pub const BPF_FUNC_task_pt_regs: Type = 175; + pub const BPF_FUNC_get_branch_snapshot: Type = 176; + pub const BPF_FUNC_trace_vprintk: Type = 177; + pub const BPF_FUNC_skc_to_unix_sock: Type = 178; + pub const BPF_FUNC_kallsyms_lookup_name: Type = 179; + pub const BPF_FUNC_find_vma: Type = 180; + pub const BPF_FUNC_loop: Type = 181; + pub const BPF_FUNC_strncmp: Type = 182; + pub const BPF_FUNC_get_func_arg: Type = 183; + pub const BPF_FUNC_get_func_ret: Type = 184; + pub const BPF_FUNC_get_func_arg_cnt: Type = 185; + pub const BPF_FUNC_get_retval: Type = 186; + pub const BPF_FUNC_set_retval: Type = 187; + pub const BPF_FUNC_xdp_get_buff_len: Type = 188; + pub const BPF_FUNC_xdp_load_bytes: Type = 189; + pub const BPF_FUNC_xdp_store_bytes: Type = 190; + pub const BPF_FUNC_copy_from_user_task: Type = 191; + pub const BPF_FUNC_skb_set_tstamp: Type = 192; + pub const BPF_FUNC_ima_file_hash: Type = 193; + pub const BPF_FUNC_kptr_xchg: Type = 194; + pub const BPF_FUNC_map_lookup_percpu_elem: Type = 195; + pub const BPF_FUNC_skc_to_mptcp_sock: Type = 196; + pub const BPF_FUNC_dynptr_from_mem: Type = 197; + pub const BPF_FUNC_ringbuf_reserve_dynptr: Type = 198; + pub const BPF_FUNC_ringbuf_submit_dynptr: Type = 199; + pub const BPF_FUNC_ringbuf_discard_dynptr: Type = 200; + pub const BPF_FUNC_dynptr_read: Type = 201; + pub const BPF_FUNC_dynptr_write: Type = 202; + pub const BPF_FUNC_dynptr_data: Type = 203; + pub const BPF_FUNC_tcp_raw_gen_syncookie_ipv4: Type = 204; + pub const BPF_FUNC_tcp_raw_gen_syncookie_ipv6: Type = 205; + pub const BPF_FUNC_tcp_raw_check_syncookie_ipv4: Type = 206; + pub const BPF_FUNC_tcp_raw_check_syncookie_ipv6: Type = 207; + pub const BPF_FUNC_ktime_get_tai_ns: Type = 208; + pub const BPF_FUNC_user_ringbuf_drain: Type = 209; + pub const BPF_FUNC_cgrp_storage_get: Type = 210; + pub const BPF_FUNC_cgrp_storage_delete: Type = 211; + pub const __BPF_FUNC_MAX_ID: Type = 212; +} +pub const BPF_F_RECOMPUTE_CSUM: _bindgen_ty_6 = 1; +pub const BPF_F_INVALIDATE_HASH: _bindgen_ty_6 = 2; +pub type _bindgen_ty_6 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_HDR_FIELD_MASK: _bindgen_ty_7 = 15; +pub type _bindgen_ty_7 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_PSEUDO_HDR: _bindgen_ty_8 = 16; +pub const BPF_F_MARK_MANGLED_0: _bindgen_ty_8 = 32; +pub const BPF_F_MARK_ENFORCE: _bindgen_ty_8 = 64; +pub type _bindgen_ty_8 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_INGRESS: _bindgen_ty_9 = 1; +pub type _bindgen_ty_9 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_TUNINFO_IPV6: _bindgen_ty_10 = 1; +pub type _bindgen_ty_10 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_SKIP_FIELD_MASK: _bindgen_ty_11 = 255; +pub const BPF_F_USER_STACK: _bindgen_ty_11 = 256; +pub const BPF_F_FAST_STACK_CMP: _bindgen_ty_11 = 512; +pub const BPF_F_REUSE_STACKID: _bindgen_ty_11 = 1024; +pub const BPF_F_USER_BUILD_ID: _bindgen_ty_11 = 2048; +pub type _bindgen_ty_11 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_ZERO_CSUM_TX: _bindgen_ty_12 = 2; +pub const BPF_F_DONT_FRAGMENT: _bindgen_ty_12 = 4; +pub const BPF_F_SEQ_NUMBER: _bindgen_ty_12 = 8; +pub const BPF_F_NO_TUNNEL_KEY: _bindgen_ty_12 = 16; +pub type _bindgen_ty_12 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_TUNINFO_FLAGS: _bindgen_ty_13 = 16; +pub type _bindgen_ty_13 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_INDEX_MASK: _bindgen_ty_14 = 4294967295; +pub const BPF_F_CURRENT_CPU: _bindgen_ty_14 = 4294967295; +pub const BPF_F_CTXLEN_MASK: _bindgen_ty_14 = 4503595332403200; +pub type _bindgen_ty_14 = ::aya_ebpf_cty::c_ulong; +pub const BPF_F_CURRENT_NETNS: _bindgen_ty_15 = -1; +pub type _bindgen_ty_15 = ::aya_ebpf_cty::c_int; +pub const BPF_CSUM_LEVEL_QUERY: _bindgen_ty_16 = 0; +pub const BPF_CSUM_LEVEL_INC: _bindgen_ty_16 = 1; +pub const BPF_CSUM_LEVEL_DEC: _bindgen_ty_16 = 2; +pub const BPF_CSUM_LEVEL_RESET: _bindgen_ty_16 = 3; +pub type _bindgen_ty_16 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_ADJ_ROOM_FIXED_GSO: _bindgen_ty_17 = 1; +pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: _bindgen_ty_17 = 2; +pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: _bindgen_ty_17 = 4; +pub const BPF_F_ADJ_ROOM_ENCAP_L4_GRE: _bindgen_ty_17 = 8; +pub const BPF_F_ADJ_ROOM_ENCAP_L4_UDP: _bindgen_ty_17 = 16; +pub const BPF_F_ADJ_ROOM_NO_CSUM_RESET: _bindgen_ty_17 = 32; +pub const BPF_F_ADJ_ROOM_ENCAP_L2_ETH: _bindgen_ty_17 = 64; +pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV4: _bindgen_ty_17 = 128; +pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV6: _bindgen_ty_17 = 256; +pub type _bindgen_ty_17 = ::aya_ebpf_cty::c_uint; +pub const BPF_ADJ_ROOM_ENCAP_L2_MASK: _bindgen_ty_18 = 255; +pub const BPF_ADJ_ROOM_ENCAP_L2_SHIFT: _bindgen_ty_18 = 56; +pub type _bindgen_ty_18 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_SYSCTL_BASE_NAME: _bindgen_ty_19 = 1; +pub type _bindgen_ty_19 = ::aya_ebpf_cty::c_uint; +pub const BPF_LOCAL_STORAGE_GET_F_CREATE: _bindgen_ty_20 = 1; +pub const BPF_SK_STORAGE_GET_F_CREATE: _bindgen_ty_20 = 1; +pub type _bindgen_ty_20 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_GET_BRANCH_RECORDS_SIZE: _bindgen_ty_21 = 1; +pub type _bindgen_ty_21 = ::aya_ebpf_cty::c_uint; +pub const BPF_RB_NO_WAKEUP: _bindgen_ty_22 = 1; +pub const BPF_RB_FORCE_WAKEUP: _bindgen_ty_22 = 2; +pub type _bindgen_ty_22 = ::aya_ebpf_cty::c_uint; +pub const BPF_RB_AVAIL_DATA: _bindgen_ty_23 = 0; +pub const BPF_RB_RING_SIZE: _bindgen_ty_23 = 1; +pub const BPF_RB_CONS_POS: _bindgen_ty_23 = 2; +pub const BPF_RB_PROD_POS: _bindgen_ty_23 = 3; +pub type _bindgen_ty_23 = ::aya_ebpf_cty::c_uint; +pub const BPF_RINGBUF_BUSY_BIT: _bindgen_ty_24 = 2147483648; +pub const BPF_RINGBUF_DISCARD_BIT: _bindgen_ty_24 = 1073741824; +pub const BPF_RINGBUF_HDR_SZ: _bindgen_ty_24 = 8; +pub type _bindgen_ty_24 = ::aya_ebpf_cty::c_uint; +pub const BPF_SK_LOOKUP_F_REPLACE: _bindgen_ty_25 = 1; +pub const BPF_SK_LOOKUP_F_NO_REUSEPORT: _bindgen_ty_25 = 2; +pub type _bindgen_ty_25 = ::aya_ebpf_cty::c_uint; +pub mod bpf_adj_room_mode { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_ADJ_ROOM_NET: Type = 0; + pub const BPF_ADJ_ROOM_MAC: Type = 1; +} +pub mod bpf_hdr_start_off { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_HDR_START_MAC: Type = 0; + pub const BPF_HDR_START_NET: Type = 1; +} +pub mod bpf_lwt_encap_mode { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_LWT_ENCAP_SEG6: Type = 0; + pub const BPF_LWT_ENCAP_SEG6_INLINE: Type = 1; + pub const BPF_LWT_ENCAP_IP: Type = 2; +} +pub const BPF_F_BPRM_SECUREEXEC: _bindgen_ty_26 = 1; +pub type _bindgen_ty_26 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_BROADCAST: _bindgen_ty_27 = 8; +pub const BPF_F_EXCLUDE_INGRESS: _bindgen_ty_27 = 16; +pub type _bindgen_ty_27 = ::aya_ebpf_cty::c_uint; +pub mod _bindgen_ty_28 { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_SKB_TSTAMP_UNSPEC: Type = 0; + pub const BPF_SKB_TSTAMP_DELIVERY_MONO: Type = 1; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct __sk_buff { + pub len: __u32, + pub pkt_type: __u32, + pub mark: __u32, + pub queue_mapping: __u32, + pub protocol: __u32, + pub vlan_present: __u32, + pub vlan_tci: __u32, + pub vlan_proto: __u32, + pub priority: __u32, + pub ingress_ifindex: __u32, + pub ifindex: __u32, + pub tc_index: __u32, + pub cb: [__u32; 5usize], + pub hash: __u32, + pub tc_classid: __u32, + pub data: __u32, + pub data_end: __u32, + pub napi_id: __u32, + pub family: __u32, + pub remote_ip4: __u32, + pub local_ip4: __u32, + pub remote_ip6: [__u32; 4usize], + pub local_ip6: [__u32; 4usize], + pub remote_port: __u32, + pub local_port: __u32, + pub data_meta: __u32, + pub __bindgen_anon_1: __sk_buff__bindgen_ty_1, + pub tstamp: __u64, + pub wire_len: __u32, + pub gso_segs: __u32, + pub __bindgen_anon_2: __sk_buff__bindgen_ty_2, + pub gso_size: __u32, + pub tstamp_type: __u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub hwtstamp: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union __sk_buff__bindgen_ty_1 { + pub flow_keys: *mut bpf_flow_keys, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl __sk_buff__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union __sk_buff__bindgen_ty_2 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl __sk_buff__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +impl __sk_buff { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_tunnel_key { + pub tunnel_id: __u32, + pub __bindgen_anon_1: bpf_tunnel_key__bindgen_ty_1, + pub tunnel_tos: __u8, + pub tunnel_ttl: __u8, + pub __bindgen_anon_2: bpf_tunnel_key__bindgen_ty_2, + pub tunnel_label: __u32, + pub __bindgen_anon_3: bpf_tunnel_key__bindgen_ty_3, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_tunnel_key__bindgen_ty_1 { + pub remote_ipv4: __u32, + pub remote_ipv6: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_tunnel_key__bindgen_ty_2 { + pub tunnel_ext: __u16, + pub tunnel_flags: __be16, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_tunnel_key__bindgen_ty_3 { + pub local_ipv4: __u32, + pub local_ipv6: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_xfrm_state { + pub reqid: __u32, + pub spi: __u32, + pub family: __u16, + pub ext: __u16, + pub __bindgen_anon_1: bpf_xfrm_state__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_xfrm_state__bindgen_ty_1 { + pub remote_ipv4: __u32, + pub remote_ipv6: [__u32; 4usize], +} +pub mod bpf_ret_code { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_OK: Type = 0; + pub const BPF_DROP: Type = 2; + pub const BPF_REDIRECT: Type = 7; + pub const BPF_LWT_REROUTE: Type = 128; + pub const BPF_FLOW_DISSECTOR_CONTINUE: Type = 129; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_sock { + pub bound_dev_if: __u32, + pub family: __u32, + pub type_: __u32, + pub protocol: __u32, + pub mark: __u32, + pub priority: __u32, + pub src_ip4: __u32, + pub src_ip6: [__u32; 4usize], + pub src_port: __u32, + pub dst_port: __be16, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, + pub dst_ip4: __u32, + pub dst_ip6: [__u32; 4usize], + pub state: __u32, + pub rx_queue_mapping: __s32, +} +impl bpf_sock { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_tcp_sock { + pub snd_cwnd: __u32, + pub srtt_us: __u32, + pub rtt_min: __u32, + pub snd_ssthresh: __u32, + pub rcv_nxt: __u32, + pub snd_nxt: __u32, + pub snd_una: __u32, + pub mss_cache: __u32, + pub ecn_flags: __u32, + pub rate_delivered: __u32, + pub rate_interval_us: __u32, + pub packets_out: __u32, + pub retrans_out: __u32, + pub total_retrans: __u32, + pub segs_in: __u32, + pub data_segs_in: __u32, + pub segs_out: __u32, + pub data_segs_out: __u32, + pub lost_out: __u32, + pub sacked_out: __u32, + pub bytes_received: __u64, + pub bytes_acked: __u64, + pub dsack_dups: __u32, + pub delivered: __u32, + pub delivered_ce: __u32, + pub icsk_retransmits: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sock_tuple { + pub __bindgen_anon_1: bpf_sock_tuple__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sock_tuple__bindgen_ty_1 { + pub ipv4: bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1, + pub ipv6: bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 { + pub saddr: __be32, + pub daddr: __be32, + pub sport: __be16, + pub dport: __be16, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 { + pub saddr: [__be32; 4usize], + pub daddr: [__be32; 4usize], + pub sport: __be16, + pub dport: __be16, +} +pub mod tcx_action_base { + pub type Type = ::aya_ebpf_cty::c_int; + pub const TCX_NEXT: Type = -1; + pub const TCX_PASS: Type = 0; + pub const TCX_DROP: Type = 2; + pub const TCX_REDIRECT: Type = 7; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_xdp_sock { + pub queue_id: __u32, +} +pub mod xdp_action { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const XDP_ABORTED: Type = 0; + pub const XDP_DROP: Type = 1; + pub const XDP_PASS: Type = 2; + pub const XDP_TX: Type = 3; + pub const XDP_REDIRECT: Type = 4; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct xdp_md { + pub data: __u32, + pub data_end: __u32, + pub data_meta: __u32, + pub ingress_ifindex: __u32, + pub rx_queue_index: __u32, + pub egress_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_devmap_val { + pub ifindex: __u32, + pub bpf_prog: bpf_devmap_val__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_devmap_val__bindgen_ty_1 { + pub fd: ::aya_ebpf_cty::c_int, + pub id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_cpumap_val { + pub qsize: __u32, + pub bpf_prog: bpf_cpumap_val__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_cpumap_val__bindgen_ty_1 { + pub fd: ::aya_ebpf_cty::c_int, + pub id: __u32, +} +pub mod sk_action { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const SK_DROP: Type = 0; + pub const SK_PASS: Type = 1; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sk_msg_md { + pub __bindgen_anon_1: sk_msg_md__bindgen_ty_1, + pub __bindgen_anon_2: sk_msg_md__bindgen_ty_2, + pub family: __u32, + pub remote_ip4: __u32, + pub local_ip4: __u32, + pub remote_ip6: [__u32; 4usize], + pub local_ip6: [__u32; 4usize], + pub remote_port: __u32, + pub local_port: __u32, + pub size: __u32, + pub __bindgen_anon_3: sk_msg_md__bindgen_ty_3, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sk_msg_md__bindgen_ty_1 { + pub data: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_msg_md__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sk_msg_md__bindgen_ty_2 { + pub data_end: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_msg_md__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sk_msg_md__bindgen_ty_3 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_msg_md__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sk_reuseport_md { + pub __bindgen_anon_1: sk_reuseport_md__bindgen_ty_1, + pub __bindgen_anon_2: sk_reuseport_md__bindgen_ty_2, + pub len: __u32, + pub eth_protocol: __u32, + pub ip_protocol: __u32, + pub bind_inany: __u32, + pub hash: __u32, + pub __bindgen_anon_3: sk_reuseport_md__bindgen_ty_3, + pub __bindgen_anon_4: sk_reuseport_md__bindgen_ty_4, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sk_reuseport_md__bindgen_ty_1 { + pub data: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_reuseport_md__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sk_reuseport_md__bindgen_ty_2 { + pub data_end: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_reuseport_md__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sk_reuseport_md__bindgen_ty_3 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_reuseport_md__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sk_reuseport_md__bindgen_ty_4 { + pub migrating_sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_reuseport_md__bindgen_ty_4 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_prog_info { + pub type_: __u32, + pub id: __u32, + pub tag: [__u8; 8usize], + pub jited_prog_len: __u32, + pub xlated_prog_len: __u32, + pub jited_prog_insns: __u64, + pub xlated_prog_insns: __u64, + pub load_time: __u64, + pub created_by_uid: __u32, + pub nr_map_ids: __u32, + pub map_ids: __u64, + pub name: [::aya_ebpf_cty::c_char; 16usize], + pub ifindex: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub netns_dev: __u64, + pub netns_ino: __u64, + pub nr_jited_ksyms: __u32, + pub nr_jited_func_lens: __u32, + pub jited_ksyms: __u64, + pub jited_func_lens: __u64, + pub btf_id: __u32, + pub func_info_rec_size: __u32, + pub func_info: __u64, + pub nr_func_info: __u32, + pub nr_line_info: __u32, + pub line_info: __u64, + pub jited_line_info: __u64, + pub nr_jited_line_info: __u32, + pub line_info_rec_size: __u32, + pub jited_line_info_rec_size: __u32, + pub nr_prog_tags: __u32, + pub prog_tags: __u64, + pub run_time_ns: __u64, + pub run_cnt: __u64, + pub recursion_misses: __u64, + pub verified_insns: __u32, + pub attach_btf_obj_id: __u32, + pub attach_btf_id: __u32, +} +impl bpf_prog_info { + #[inline] + pub fn gpl_compatible(&self) -> __u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_gpl_compatible(&mut self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let gpl_compatible: u32 = unsafe { ::core::mem::transmute(gpl_compatible) }; + gpl_compatible as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_map_info { + pub type_: __u32, + pub id: __u32, + pub key_size: __u32, + pub value_size: __u32, + pub max_entries: __u32, + pub map_flags: __u32, + pub name: [::aya_ebpf_cty::c_char; 16usize], + pub ifindex: __u32, + pub btf_vmlinux_value_type_id: __u32, + pub netns_dev: __u64, + pub netns_ino: __u64, + pub btf_id: __u32, + pub btf_key_type_id: __u32, + pub btf_value_type_id: __u32, + pub btf_vmlinux_id: __u32, + pub map_extra: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_btf_info { + pub btf: __u64, + pub btf_size: __u32, + pub id: __u32, + pub name: __u64, + pub name_len: __u32, + pub kernel_btf: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info { + pub type_: __u32, + pub id: __u32, + pub prog_id: __u32, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1 { + pub raw_tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_1, + pub tracing: bpf_link_info__bindgen_ty_1__bindgen_ty_2, + pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_3, + pub iter: bpf_link_info__bindgen_ty_1__bindgen_ty_4, + pub netns: bpf_link_info__bindgen_ty_1__bindgen_ty_5, + pub xdp: bpf_link_info__bindgen_ty_1__bindgen_ty_6, + pub struct_ops: bpf_link_info__bindgen_ty_1__bindgen_ty_7, + pub netfilter: bpf_link_info__bindgen_ty_1__bindgen_ty_8, + pub kprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_9, + pub uprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_10, + pub perf_event: bpf_link_info__bindgen_ty_1__bindgen_ty_11, + pub tcx: bpf_link_info__bindgen_ty_1__bindgen_ty_12, + pub netkit: bpf_link_info__bindgen_ty_1__bindgen_ty_13, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_1 { + pub tp_name: __u64, + pub tp_name_len: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_2 { + pub attach_type: __u32, + pub target_obj_id: __u32, + pub target_btf_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_3 { + pub cgroup_id: __u64, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4 { + pub target_name: __u64, + pub target_name_len: __u32, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, + pub __bindgen_anon_2: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 { + pub map: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 { + pub map_id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 { + pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1, + pub task: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 { + pub cgroup_id: __u64, + pub order: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 { + pub tid: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_5 { + pub netns_ino: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_6 { + pub ifindex: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_7 { + pub map_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_8 { + pub pf: __u32, + pub hooknum: __u32, + pub priority: __s32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_9 { + pub addrs: __u64, + pub count: __u32, + pub flags: __u32, + pub missed: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_10 { + pub path: __u64, + pub offsets: __u64, + pub ref_ctr_offsets: __u64, + pub cookies: __u64, + pub path_size: __u32, + pub count: __u32, + pub flags: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11 { + pub type_: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 { + pub uprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1, + pub kprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2, + pub tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3, + pub event: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 { + pub file_name: __u64, + pub name_len: __u32, + pub offset: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 { + pub func_name: __u64, + pub name_len: __u32, + pub offset: __u32, + pub addr: __u64, + pub missed: __u64, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 { + pub tp_name: __u64, + pub name_len: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 { + pub config: __u64, + pub type_: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_12 { + pub ifindex: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_13 { + pub ifindex: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sock_addr { + pub user_family: __u32, + pub user_ip4: __u32, + pub user_ip6: [__u32; 4usize], + pub user_port: __u32, + pub family: __u32, + pub type_: __u32, + pub protocol: __u32, + pub msg_src_ip4: __u32, + pub msg_src_ip6: [__u32; 4usize], + pub __bindgen_anon_1: bpf_sock_addr__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sock_addr__bindgen_ty_1 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sock_addr__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sock_ops { + pub op: __u32, + pub __bindgen_anon_1: bpf_sock_ops__bindgen_ty_1, + pub family: __u32, + pub remote_ip4: __u32, + pub local_ip4: __u32, + pub remote_ip6: [__u32; 4usize], + pub local_ip6: [__u32; 4usize], + pub remote_port: __u32, + pub local_port: __u32, + pub is_fullsock: __u32, + pub snd_cwnd: __u32, + pub srtt_us: __u32, + pub bpf_sock_ops_cb_flags: __u32, + pub state: __u32, + pub rtt_min: __u32, + pub snd_ssthresh: __u32, + pub rcv_nxt: __u32, + pub snd_nxt: __u32, + pub snd_una: __u32, + pub mss_cache: __u32, + pub ecn_flags: __u32, + pub rate_delivered: __u32, + pub rate_interval_us: __u32, + pub packets_out: __u32, + pub retrans_out: __u32, + pub total_retrans: __u32, + pub segs_in: __u32, + pub data_segs_in: __u32, + pub segs_out: __u32, + pub data_segs_out: __u32, + pub lost_out: __u32, + pub sacked_out: __u32, + pub sk_txhash: __u32, + pub bytes_received: __u64, + pub bytes_acked: __u64, + pub __bindgen_anon_2: bpf_sock_ops__bindgen_ty_2, + pub __bindgen_anon_3: bpf_sock_ops__bindgen_ty_3, + pub __bindgen_anon_4: bpf_sock_ops__bindgen_ty_4, + pub skb_len: __u32, + pub skb_tcp_flags: __u32, + pub skb_hwtstamp: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sock_ops__bindgen_ty_1 { + pub args: [__u32; 4usize], + pub reply: __u32, + pub replylong: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sock_ops__bindgen_ty_2 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sock_ops__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sock_ops__bindgen_ty_3 { + pub skb_data: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sock_ops__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sock_ops__bindgen_ty_4 { + pub skb_data_end: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sock_ops__bindgen_ty_4 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +pub const BPF_SOCK_OPS_RTO_CB_FLAG: _bindgen_ty_29 = 1; +pub const BPF_SOCK_OPS_RETRANS_CB_FLAG: _bindgen_ty_29 = 2; +pub const BPF_SOCK_OPS_STATE_CB_FLAG: _bindgen_ty_29 = 4; +pub const BPF_SOCK_OPS_RTT_CB_FLAG: _bindgen_ty_29 = 8; +pub const BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: _bindgen_ty_29 = 16; +pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: _bindgen_ty_29 = 32; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: _bindgen_ty_29 = 64; +pub const BPF_SOCK_OPS_ALL_CB_FLAGS: _bindgen_ty_29 = 127; +pub type _bindgen_ty_29 = ::aya_ebpf_cty::c_uint; +pub const BPF_SOCK_OPS_VOID: _bindgen_ty_30 = 0; +pub const BPF_SOCK_OPS_TIMEOUT_INIT: _bindgen_ty_30 = 1; +pub const BPF_SOCK_OPS_RWND_INIT: _bindgen_ty_30 = 2; +pub const BPF_SOCK_OPS_TCP_CONNECT_CB: _bindgen_ty_30 = 3; +pub const BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB: _bindgen_ty_30 = 4; +pub const BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: _bindgen_ty_30 = 5; +pub const BPF_SOCK_OPS_NEEDS_ECN: _bindgen_ty_30 = 6; +pub const BPF_SOCK_OPS_BASE_RTT: _bindgen_ty_30 = 7; +pub const BPF_SOCK_OPS_RTO_CB: _bindgen_ty_30 = 8; +pub const BPF_SOCK_OPS_RETRANS_CB: _bindgen_ty_30 = 9; +pub const BPF_SOCK_OPS_STATE_CB: _bindgen_ty_30 = 10; +pub const BPF_SOCK_OPS_TCP_LISTEN_CB: _bindgen_ty_30 = 11; +pub const BPF_SOCK_OPS_RTT_CB: _bindgen_ty_30 = 12; +pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: _bindgen_ty_30 = 13; +pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: _bindgen_ty_30 = 14; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: _bindgen_ty_30 = 15; +pub type _bindgen_ty_30 = ::aya_ebpf_cty::c_uint; +pub const BPF_TCP_ESTABLISHED: _bindgen_ty_31 = 1; +pub const BPF_TCP_SYN_SENT: _bindgen_ty_31 = 2; +pub const BPF_TCP_SYN_RECV: _bindgen_ty_31 = 3; +pub const BPF_TCP_FIN_WAIT1: _bindgen_ty_31 = 4; +pub const BPF_TCP_FIN_WAIT2: _bindgen_ty_31 = 5; +pub const BPF_TCP_TIME_WAIT: _bindgen_ty_31 = 6; +pub const BPF_TCP_CLOSE: _bindgen_ty_31 = 7; +pub const BPF_TCP_CLOSE_WAIT: _bindgen_ty_31 = 8; +pub const BPF_TCP_LAST_ACK: _bindgen_ty_31 = 9; +pub const BPF_TCP_LISTEN: _bindgen_ty_31 = 10; +pub const BPF_TCP_CLOSING: _bindgen_ty_31 = 11; +pub const BPF_TCP_NEW_SYN_RECV: _bindgen_ty_31 = 12; +pub const BPF_TCP_BOUND_INACTIVE: _bindgen_ty_31 = 13; +pub const BPF_TCP_MAX_STATES: _bindgen_ty_31 = 14; +pub type _bindgen_ty_31 = ::aya_ebpf_cty::c_uint; +pub mod _bindgen_ty_33 { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_LOAD_HDR_OPT_TCP_SYN: Type = 1; +} +pub mod _bindgen_ty_34 { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: Type = 1; + pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: Type = 2; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_perf_event_value { + pub counter: __u64, + pub enabled: __u64, + pub running: __u64, +} +pub const BPF_DEVCG_ACC_MKNOD: _bindgen_ty_35 = 1; +pub const BPF_DEVCG_ACC_READ: _bindgen_ty_35 = 2; +pub const BPF_DEVCG_ACC_WRITE: _bindgen_ty_35 = 4; +pub type _bindgen_ty_35 = ::aya_ebpf_cty::c_uint; +pub const BPF_DEVCG_DEV_BLOCK: _bindgen_ty_36 = 1; +pub const BPF_DEVCG_DEV_CHAR: _bindgen_ty_36 = 2; +pub type _bindgen_ty_36 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_cgroup_dev_ctx { + pub access_type: __u32, + pub major: __u32, + pub minor: __u32, +} +#[repr(C)] +#[derive(Debug)] +pub struct bpf_raw_tracepoint_args { + pub args: __IncompleteArrayField<__u64>, +} +pub const BPF_FIB_LOOKUP_DIRECT: _bindgen_ty_37 = 1; +pub const BPF_FIB_LOOKUP_OUTPUT: _bindgen_ty_37 = 2; +pub const BPF_FIB_LOOKUP_SKIP_NEIGH: _bindgen_ty_37 = 4; +pub const BPF_FIB_LOOKUP_TBID: _bindgen_ty_37 = 8; +pub const BPF_FIB_LOOKUP_SRC: _bindgen_ty_37 = 16; +pub type _bindgen_ty_37 = ::aya_ebpf_cty::c_uint; +pub const BPF_FIB_LKUP_RET_SUCCESS: _bindgen_ty_38 = 0; +pub const BPF_FIB_LKUP_RET_BLACKHOLE: _bindgen_ty_38 = 1; +pub const BPF_FIB_LKUP_RET_UNREACHABLE: _bindgen_ty_38 = 2; +pub const BPF_FIB_LKUP_RET_PROHIBIT: _bindgen_ty_38 = 3; +pub const BPF_FIB_LKUP_RET_NOT_FWDED: _bindgen_ty_38 = 4; +pub const BPF_FIB_LKUP_RET_FWD_DISABLED: _bindgen_ty_38 = 5; +pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: _bindgen_ty_38 = 6; +pub const BPF_FIB_LKUP_RET_NO_NEIGH: _bindgen_ty_38 = 7; +pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: _bindgen_ty_38 = 8; +pub const BPF_FIB_LKUP_RET_NO_SRC_ADDR: _bindgen_ty_38 = 9; +pub type _bindgen_ty_38 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_fib_lookup { + pub family: __u8, + pub l4_protocol: __u8, + pub sport: __be16, + pub dport: __be16, + pub __bindgen_anon_1: bpf_fib_lookup__bindgen_ty_1, + pub ifindex: __u32, + pub __bindgen_anon_2: bpf_fib_lookup__bindgen_ty_2, + pub __bindgen_anon_3: bpf_fib_lookup__bindgen_ty_3, + pub __bindgen_anon_4: bpf_fib_lookup__bindgen_ty_4, + pub __bindgen_anon_5: bpf_fib_lookup__bindgen_ty_5, + pub smac: [__u8; 6usize], + pub dmac: [__u8; 6usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_1 { + pub tot_len: __u16, + pub mtu_result: __u16, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_2 { + pub tos: __u8, + pub flowinfo: __be32, + pub rt_metric: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_3 { + pub ipv4_src: __be32, + pub ipv6_src: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_4 { + pub ipv4_dst: __be32, + pub ipv6_dst: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_5 { + pub __bindgen_anon_1: bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1, + pub tbid: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1 { + pub h_vlan_proto: __be16, + pub h_vlan_TCI: __be16, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_redir_neigh { + pub nh_family: __u32, + pub __bindgen_anon_1: bpf_redir_neigh__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_redir_neigh__bindgen_ty_1 { + pub ipv4_nh: __be32, + pub ipv6_nh: [__u32; 4usize], +} +pub mod bpf_check_mtu_flags { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MTU_CHK_SEGS: Type = 1; +} +pub mod bpf_check_mtu_ret { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MTU_CHK_RET_SUCCESS: Type = 0; + pub const BPF_MTU_CHK_RET_FRAG_NEEDED: Type = 1; + pub const BPF_MTU_CHK_RET_SEGS_TOOBIG: Type = 2; +} +pub mod bpf_task_fd_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_FD_TYPE_RAW_TRACEPOINT: Type = 0; + pub const BPF_FD_TYPE_TRACEPOINT: Type = 1; + pub const BPF_FD_TYPE_KPROBE: Type = 2; + pub const BPF_FD_TYPE_KRETPROBE: Type = 3; + pub const BPF_FD_TYPE_UPROBE: Type = 4; + pub const BPF_FD_TYPE_URETPROBE: Type = 5; +} +pub const BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: _bindgen_ty_39 = 1; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: _bindgen_ty_39 = 2; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: _bindgen_ty_39 = 4; +pub type _bindgen_ty_39 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_flow_keys { + pub nhoff: __u16, + pub thoff: __u16, + pub addr_proto: __u16, + pub is_frag: __u8, + pub is_first_frag: __u8, + pub is_encap: __u8, + pub ip_proto: __u8, + pub n_proto: __be16, + pub sport: __be16, + pub dport: __be16, + pub __bindgen_anon_1: bpf_flow_keys__bindgen_ty_1, + pub flags: __u32, + pub flow_label: __be32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_flow_keys__bindgen_ty_1 { + pub __bindgen_anon_1: bpf_flow_keys__bindgen_ty_1__bindgen_ty_1, + pub __bindgen_anon_2: bpf_flow_keys__bindgen_ty_1__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 { + pub ipv4_src: __be32, + pub ipv4_dst: __be32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 { + pub ipv6_src: [__u32; 4usize], + pub ipv6_dst: [__u32; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_func_info { + pub insn_off: __u32, + pub type_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_line_info { + pub insn_off: __u32, + pub file_name_off: __u32, + pub line_off: __u32, + pub line_col: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_spin_lock { + pub val: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_timer { + pub __opaque: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_dynptr { + pub __opaque: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_list_head { + pub __opaque: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_list_node { + pub __opaque: [__u64; 3usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_rb_root { + pub __opaque: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_rb_node { + pub __opaque: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_refcount { + pub __opaque: [__u32; 1usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_sysctl { + pub write: __u32, + pub file_pos: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sockopt { + pub __bindgen_anon_1: bpf_sockopt__bindgen_ty_1, + pub __bindgen_anon_2: bpf_sockopt__bindgen_ty_2, + pub __bindgen_anon_3: bpf_sockopt__bindgen_ty_3, + pub level: __s32, + pub optname: __s32, + pub optlen: __s32, + pub retval: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sockopt__bindgen_ty_1 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sockopt__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sockopt__bindgen_ty_2 { + pub optval: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sockopt__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sockopt__bindgen_ty_3 { + pub optval_end: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sockopt__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_pidns_info { + pub pid: __u32, + pub tgid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sk_lookup { + pub __bindgen_anon_1: bpf_sk_lookup__bindgen_ty_1, + pub family: __u32, + pub protocol: __u32, + pub remote_ip4: __u32, + pub remote_ip6: [__u32; 4usize], + pub remote_port: __be16, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, + pub local_ip4: __u32, + pub local_ip6: [__u32; 4usize], + pub local_port: __u32, + pub ingress_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sk_lookup__bindgen_ty_1 { + pub __bindgen_anon_1: bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +impl bpf_sk_lookup { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_ptr { + pub ptr: *mut ::aya_ebpf_cty::c_void, + pub type_id: __u32, + pub flags: __u32, +} +pub mod bpf_core_relo_kind { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_CORE_FIELD_BYTE_OFFSET: Type = 0; + pub const BPF_CORE_FIELD_BYTE_SIZE: Type = 1; + pub const BPF_CORE_FIELD_EXISTS: Type = 2; + pub const BPF_CORE_FIELD_SIGNED: Type = 3; + pub const BPF_CORE_FIELD_LSHIFT_U64: Type = 4; + pub const BPF_CORE_FIELD_RSHIFT_U64: Type = 5; + pub const BPF_CORE_TYPE_ID_LOCAL: Type = 6; + pub const BPF_CORE_TYPE_ID_TARGET: Type = 7; + pub const BPF_CORE_TYPE_EXISTS: Type = 8; + pub const BPF_CORE_TYPE_SIZE: Type = 9; + pub const BPF_CORE_ENUMVAL_EXISTS: Type = 10; + pub const BPF_CORE_ENUMVAL_VALUE: Type = 11; + pub const BPF_CORE_TYPE_MATCHES: Type = 12; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_core_relo { + pub insn_off: __u32, + pub type_id: __u32, + pub access_str_off: __u32, + pub kind: bpf_core_relo_kind::Type, +} +pub const BPF_F_TIMER_ABS: _bindgen_ty_41 = 1; +pub const BPF_F_TIMER_CPU_PIN: _bindgen_ty_41 = 2; +pub type _bindgen_ty_41 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_iter_num { + pub __opaque: [__u64; 1usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct user_pt_regs { + pub regs: [::aya_ebpf_cty::c_ulong; 32usize], + pub orig_a0: ::aya_ebpf_cty::c_ulong, + pub csr_era: ::aya_ebpf_cty::c_ulong, + pub csr_badv: ::aya_ebpf_cty::c_ulong, + pub reserved: [::aya_ebpf_cty::c_ulong; 10usize], +} +pub type sa_family_t = ::aya_ebpf_cty::c_ushort; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sockaddr { + pub sa_family: sa_family_t, + pub sa_data: [::aya_ebpf_cty::c_char; 14usize], +} diff --git a/ebpf/aya-ebpf-bindings/src/loongarch64/helpers.rs b/ebpf/aya-ebpf-bindings/src/loongarch64/helpers.rs new file mode 100644 index 00000000..8aba5810 --- /dev/null +++ b/ebpf/aya-ebpf-bindings/src/loongarch64/helpers.rs @@ -0,0 +1,2148 @@ +use super::bindings::*; +pub unsafe fn bpf_map_lookup_elem( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(1usize); + fun(map, key) +} +pub unsafe fn bpf_map_update_elem( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + value: *const ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + value: *const ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(2usize); + fun(map, key, value, flags) +} +pub unsafe fn bpf_map_delete_elem( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(3usize); + fun(map, key) +} +pub unsafe fn bpf_probe_read( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(4usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_ktime_get_ns() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(5usize); + fun() +} +pub unsafe fn bpf_get_prandom_u32() -> __u32 { + let fun: unsafe extern "C" fn() -> __u32 = ::core::mem::transmute(7usize); + fun() +} +pub unsafe fn bpf_get_smp_processor_id() -> __u32 { + let fun: unsafe extern "C" fn() -> __u32 = ::core::mem::transmute(8usize); + fun() +} +pub unsafe fn bpf_skb_store_bytes( + skb: *mut __sk_buff, + offset: __u32, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(9usize); + fun(skb, offset, from, len, flags) +} +pub unsafe fn bpf_l3_csum_replace( + skb: *mut __sk_buff, + offset: __u32, + from: __u64, + to: __u64, + size: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + from: __u64, + to: __u64, + size: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(10usize); + fun(skb, offset, from, to, size) +} +pub unsafe fn bpf_l4_csum_replace( + skb: *mut __sk_buff, + offset: __u32, + from: __u64, + to: __u64, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + from: __u64, + to: __u64, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(11usize); + fun(skb, offset, from, to, flags) +} +pub unsafe fn bpf_tail_call( + ctx: *mut ::aya_ebpf_cty::c_void, + prog_array_map: *mut ::aya_ebpf_cty::c_void, + index: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + prog_array_map: *mut ::aya_ebpf_cty::c_void, + index: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(12usize); + fun(ctx, prog_array_map, index) +} +pub unsafe fn bpf_clone_redirect( + skb: *mut __sk_buff, + ifindex: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + ifindex: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(13usize); + fun(skb, ifindex, flags) +} +pub unsafe fn bpf_get_current_pid_tgid() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(14usize); + fun() +} +pub unsafe fn bpf_get_current_uid_gid() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(15usize); + fun() +} +pub unsafe fn bpf_get_current_comm( + buf: *mut ::aya_ebpf_cty::c_void, + size_of_buf: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + buf: *mut ::aya_ebpf_cty::c_void, + size_of_buf: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(16usize); + fun(buf, size_of_buf) +} +pub unsafe fn bpf_get_cgroup_classid(skb: *mut __sk_buff) -> __u32 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u32 = ::core::mem::transmute(17usize); + fun(skb) +} +pub unsafe fn bpf_skb_vlan_push( + skb: *mut __sk_buff, + vlan_proto: __be16, + vlan_tci: __u16, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + vlan_proto: __be16, + vlan_tci: __u16, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(18usize); + fun(skb, vlan_proto, vlan_tci) +} +pub unsafe fn bpf_skb_vlan_pop(skb: *mut __sk_buff) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(19usize); + fun(skb) +} +pub unsafe fn bpf_skb_get_tunnel_key( + skb: *mut __sk_buff, + key: *mut bpf_tunnel_key, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + key: *mut bpf_tunnel_key, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(20usize); + fun(skb, key, size, flags) +} +pub unsafe fn bpf_skb_set_tunnel_key( + skb: *mut __sk_buff, + key: *mut bpf_tunnel_key, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + key: *mut bpf_tunnel_key, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(21usize); + fun(skb, key, size, flags) +} +pub unsafe fn bpf_perf_event_read(map: *mut ::aya_ebpf_cty::c_void, flags: __u64) -> __u64 { + let fun: unsafe extern "C" fn(map: *mut ::aya_ebpf_cty::c_void, flags: __u64) -> __u64 = + ::core::mem::transmute(22usize); + fun(map, flags) +} +pub unsafe fn bpf_redirect(ifindex: __u32, flags: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(ifindex: __u32, flags: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(23usize); + fun(ifindex, flags) +} +pub unsafe fn bpf_get_route_realm(skb: *mut __sk_buff) -> __u32 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u32 = ::core::mem::transmute(24usize); + fun(skb) +} +pub unsafe fn bpf_perf_event_output( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(25usize); + fun(ctx, map, flags, data, size) +} +pub unsafe fn bpf_skb_load_bytes( + skb: *const ::aya_ebpf_cty::c_void, + offset: __u32, + to: *mut ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *const ::aya_ebpf_cty::c_void, + offset: __u32, + to: *mut ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(26usize); + fun(skb, offset, to, len) +} +pub unsafe fn bpf_get_stackid( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(27usize); + fun(ctx, map, flags) +} +pub unsafe fn bpf_csum_diff( + from: *mut __be32, + from_size: __u32, + to: *mut __be32, + to_size: __u32, + seed: __wsum, +) -> __s64 { + let fun: unsafe extern "C" fn( + from: *mut __be32, + from_size: __u32, + to: *mut __be32, + to_size: __u32, + seed: __wsum, + ) -> __s64 = ::core::mem::transmute(28usize); + fun(from, from_size, to, to_size, seed) +} +pub unsafe fn bpf_skb_get_tunnel_opt( + skb: *mut __sk_buff, + opt: *mut ::aya_ebpf_cty::c_void, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + opt: *mut ::aya_ebpf_cty::c_void, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(29usize); + fun(skb, opt, size) +} +pub unsafe fn bpf_skb_set_tunnel_opt( + skb: *mut __sk_buff, + opt: *mut ::aya_ebpf_cty::c_void, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + opt: *mut ::aya_ebpf_cty::c_void, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(30usize); + fun(skb, opt, size) +} +pub unsafe fn bpf_skb_change_proto( + skb: *mut __sk_buff, + proto: __be16, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + proto: __be16, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(31usize); + fun(skb, proto, flags) +} +pub unsafe fn bpf_skb_change_type(skb: *mut __sk_buff, type_: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, type_: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(32usize); + fun(skb, type_) +} +pub unsafe fn bpf_skb_under_cgroup( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + index: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + index: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(33usize); + fun(skb, map, index) +} +pub unsafe fn bpf_get_hash_recalc(skb: *mut __sk_buff) -> __u32 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u32 = ::core::mem::transmute(34usize); + fun(skb) +} +pub unsafe fn bpf_get_current_task() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(35usize); + fun() +} +pub unsafe fn bpf_probe_write_user( + dst: *mut ::aya_ebpf_cty::c_void, + src: *const ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + src: *const ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(36usize); + fun(dst, src, len) +} +pub unsafe fn bpf_current_task_under_cgroup( + map: *mut ::aya_ebpf_cty::c_void, + index: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + index: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(37usize); + fun(map, index) +} +pub unsafe fn bpf_skb_change_tail( + skb: *mut __sk_buff, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(38usize); + fun(skb, len, flags) +} +pub unsafe fn bpf_skb_pull_data(skb: *mut __sk_buff, len: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, len: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(39usize); + fun(skb, len) +} +pub unsafe fn bpf_csum_update(skb: *mut __sk_buff, csum: __wsum) -> __s64 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, csum: __wsum) -> __s64 = + ::core::mem::transmute(40usize); + fun(skb, csum) +} +pub unsafe fn bpf_set_hash_invalid(skb: *mut __sk_buff) { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) = ::core::mem::transmute(41usize); + fun(skb) +} +pub unsafe fn bpf_get_numa_node_id() -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn() -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(42usize); + fun() +} +pub unsafe fn bpf_skb_change_head( + skb: *mut __sk_buff, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(43usize); + fun(skb, len, flags) +} +pub unsafe fn bpf_xdp_adjust_head( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(44usize); + fun(xdp_md, delta) +} +pub unsafe fn bpf_probe_read_str( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(45usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_get_socket_cookie(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(46usize); + fun(ctx) +} +pub unsafe fn bpf_get_socket_uid(skb: *mut __sk_buff) -> __u32 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u32 = ::core::mem::transmute(47usize); + fun(skb) +} +pub unsafe fn bpf_set_hash(skb: *mut __sk_buff, hash: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, hash: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(48usize); + fun(skb, hash) +} +pub unsafe fn bpf_setsockopt( + bpf_socket: *mut ::aya_ebpf_cty::c_void, + level: ::aya_ebpf_cty::c_int, + optname: ::aya_ebpf_cty::c_int, + optval: *mut ::aya_ebpf_cty::c_void, + optlen: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + bpf_socket: *mut ::aya_ebpf_cty::c_void, + level: ::aya_ebpf_cty::c_int, + optname: ::aya_ebpf_cty::c_int, + optval: *mut ::aya_ebpf_cty::c_void, + optlen: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(49usize); + fun(bpf_socket, level, optname, optval, optlen) +} +pub unsafe fn bpf_skb_adjust_room( + skb: *mut __sk_buff, + len_diff: __s32, + mode: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + len_diff: __s32, + mode: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(50usize); + fun(skb, len_diff, mode, flags) +} +pub unsafe fn bpf_redirect_map( + map: *mut ::aya_ebpf_cty::c_void, + key: __u64, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: __u64, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(51usize); + fun(map, key, flags) +} +pub unsafe fn bpf_sk_redirect_map( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + key: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + key: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(52usize); + fun(skb, map, key, flags) +} +pub unsafe fn bpf_sock_map_update( + skops: *mut bpf_sock_ops, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(53usize); + fun(skops, map, key, flags) +} +pub unsafe fn bpf_xdp_adjust_meta( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(54usize); + fun(xdp_md, delta) +} +pub unsafe fn bpf_perf_event_read_value( + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + buf: *mut bpf_perf_event_value, + buf_size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + buf: *mut bpf_perf_event_value, + buf_size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(55usize); + fun(map, flags, buf, buf_size) +} +pub unsafe fn bpf_perf_prog_read_value( + ctx: *mut bpf_perf_event_data, + buf: *mut bpf_perf_event_value, + buf_size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_perf_event_data, + buf: *mut bpf_perf_event_value, + buf_size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(56usize); + fun(ctx, buf, buf_size) +} +pub unsafe fn bpf_getsockopt( + bpf_socket: *mut ::aya_ebpf_cty::c_void, + level: ::aya_ebpf_cty::c_int, + optname: ::aya_ebpf_cty::c_int, + optval: *mut ::aya_ebpf_cty::c_void, + optlen: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + bpf_socket: *mut ::aya_ebpf_cty::c_void, + level: ::aya_ebpf_cty::c_int, + optname: ::aya_ebpf_cty::c_int, + optval: *mut ::aya_ebpf_cty::c_void, + optlen: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(57usize); + fun(bpf_socket, level, optname, optval, optlen) +} +pub unsafe fn bpf_override_return(regs: *mut pt_regs, rc: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(regs: *mut pt_regs, rc: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(58usize); + fun(regs, rc) +} +pub unsafe fn bpf_sock_ops_cb_flags_set( + bpf_sock: *mut bpf_sock_ops, + argval: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + bpf_sock: *mut bpf_sock_ops, + argval: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(59usize); + fun(bpf_sock, argval) +} +pub unsafe fn bpf_msg_redirect_map( + msg: *mut sk_msg_md, + map: *mut ::aya_ebpf_cty::c_void, + key: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + map: *mut ::aya_ebpf_cty::c_void, + key: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(60usize); + fun(msg, map, key, flags) +} +pub unsafe fn bpf_msg_apply_bytes(msg: *mut sk_msg_md, bytes: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(msg: *mut sk_msg_md, bytes: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(61usize); + fun(msg, bytes) +} +pub unsafe fn bpf_msg_cork_bytes(msg: *mut sk_msg_md, bytes: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(msg: *mut sk_msg_md, bytes: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(62usize); + fun(msg, bytes) +} +pub unsafe fn bpf_msg_pull_data( + msg: *mut sk_msg_md, + start: __u32, + end: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + start: __u32, + end: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(63usize); + fun(msg, start, end, flags) +} +pub unsafe fn bpf_bind( + ctx: *mut bpf_sock_addr, + addr: *mut sockaddr, + addr_len: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sock_addr, + addr: *mut sockaddr, + addr_len: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(64usize); + fun(ctx, addr, addr_len) +} +pub unsafe fn bpf_xdp_adjust_tail( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(65usize); + fun(xdp_md, delta) +} +pub unsafe fn bpf_skb_get_xfrm_state( + skb: *mut __sk_buff, + index: __u32, + xfrm_state: *mut bpf_xfrm_state, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + index: __u32, + xfrm_state: *mut bpf_xfrm_state, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(66usize); + fun(skb, index, xfrm_state, size, flags) +} +pub unsafe fn bpf_get_stack( + ctx: *mut ::aya_ebpf_cty::c_void, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(67usize); + fun(ctx, buf, size, flags) +} +pub unsafe fn bpf_skb_load_bytes_relative( + skb: *const ::aya_ebpf_cty::c_void, + offset: __u32, + to: *mut ::aya_ebpf_cty::c_void, + len: __u32, + start_header: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *const ::aya_ebpf_cty::c_void, + offset: __u32, + to: *mut ::aya_ebpf_cty::c_void, + len: __u32, + start_header: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(68usize); + fun(skb, offset, to, len, start_header) +} +pub unsafe fn bpf_fib_lookup( + ctx: *mut ::aya_ebpf_cty::c_void, + params: *mut bpf_fib_lookup, + plen: ::aya_ebpf_cty::c_int, + flags: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + params: *mut bpf_fib_lookup, + plen: ::aya_ebpf_cty::c_int, + flags: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(69usize); + fun(ctx, params, plen, flags) +} +pub unsafe fn bpf_sock_hash_update( + skops: *mut bpf_sock_ops, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(70usize); + fun(skops, map, key, flags) +} +pub unsafe fn bpf_msg_redirect_hash( + msg: *mut sk_msg_md, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(71usize); + fun(msg, map, key, flags) +} +pub unsafe fn bpf_sk_redirect_hash( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(72usize); + fun(skb, map, key, flags) +} +pub unsafe fn bpf_lwt_push_encap( + skb: *mut __sk_buff, + type_: __u32, + hdr: *mut ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + type_: __u32, + hdr: *mut ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(73usize); + fun(skb, type_, hdr, len) +} +pub unsafe fn bpf_lwt_seg6_store_bytes( + skb: *mut __sk_buff, + offset: __u32, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(74usize); + fun(skb, offset, from, len) +} +pub unsafe fn bpf_lwt_seg6_adjust_srh( + skb: *mut __sk_buff, + offset: __u32, + delta: __s32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + delta: __s32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(75usize); + fun(skb, offset, delta) +} +pub unsafe fn bpf_lwt_seg6_action( + skb: *mut __sk_buff, + action: __u32, + param: *mut ::aya_ebpf_cty::c_void, + param_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + action: __u32, + param: *mut ::aya_ebpf_cty::c_void, + param_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(76usize); + fun(skb, action, param, param_len) +} +pub unsafe fn bpf_rc_repeat(ctx: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(77usize); + fun(ctx) +} +pub unsafe fn bpf_rc_keydown( + ctx: *mut ::aya_ebpf_cty::c_void, + protocol: __u32, + scancode: __u64, + toggle: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + protocol: __u32, + scancode: __u64, + toggle: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(78usize); + fun(ctx, protocol, scancode, toggle) +} +pub unsafe fn bpf_skb_cgroup_id(skb: *mut __sk_buff) -> __u64 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u64 = ::core::mem::transmute(79usize); + fun(skb) +} +pub unsafe fn bpf_get_current_cgroup_id() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(80usize); + fun() +} +pub unsafe fn bpf_get_local_storage( + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(81usize); + fun(map, flags) +} +pub unsafe fn bpf_sk_select_reuseport( + reuse: *mut sk_reuseport_md, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + reuse: *mut sk_reuseport_md, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(82usize); + fun(reuse, map, key, flags) +} +pub unsafe fn bpf_skb_ancestor_cgroup_id( + skb: *mut __sk_buff, + ancestor_level: ::aya_ebpf_cty::c_int, +) -> __u64 { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + ancestor_level: ::aya_ebpf_cty::c_int, + ) -> __u64 = ::core::mem::transmute(83usize); + fun(skb, ancestor_level) +} +pub unsafe fn bpf_sk_lookup_tcp( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, +) -> *mut bpf_sock { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, + ) -> *mut bpf_sock = ::core::mem::transmute(84usize); + fun(ctx, tuple, tuple_size, netns, flags) +} +pub unsafe fn bpf_sk_lookup_udp( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, +) -> *mut bpf_sock { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, + ) -> *mut bpf_sock = ::core::mem::transmute(85usize); + fun(ctx, tuple, tuple_size, netns, flags) +} +pub unsafe fn bpf_sk_release(sock: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(sock: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(86usize); + fun(sock) +} +pub unsafe fn bpf_map_push_elem( + map: *mut ::aya_ebpf_cty::c_void, + value: *const ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + value: *const ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(87usize); + fun(map, value, flags) +} +pub unsafe fn bpf_map_pop_elem( + map: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(88usize); + fun(map, value) +} +pub unsafe fn bpf_map_peek_elem( + map: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(89usize); + fun(map, value) +} +pub unsafe fn bpf_msg_push_data( + msg: *mut sk_msg_md, + start: __u32, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + start: __u32, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(90usize); + fun(msg, start, len, flags) +} +pub unsafe fn bpf_msg_pop_data( + msg: *mut sk_msg_md, + start: __u32, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + start: __u32, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(91usize); + fun(msg, start, len, flags) +} +pub unsafe fn bpf_rc_pointer_rel( + ctx: *mut ::aya_ebpf_cty::c_void, + rel_x: __s32, + rel_y: __s32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + rel_x: __s32, + rel_y: __s32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(92usize); + fun(ctx, rel_x, rel_y) +} +pub unsafe fn bpf_spin_lock(lock: *mut bpf_spin_lock) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(lock: *mut bpf_spin_lock) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(93usize); + fun(lock) +} +pub unsafe fn bpf_spin_unlock(lock: *mut bpf_spin_lock) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(lock: *mut bpf_spin_lock) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(94usize); + fun(lock) +} +pub unsafe fn bpf_sk_fullsock(sk: *mut bpf_sock) -> *mut bpf_sock { + let fun: unsafe extern "C" fn(sk: *mut bpf_sock) -> *mut bpf_sock = + ::core::mem::transmute(95usize); + fun(sk) +} +pub unsafe fn bpf_tcp_sock(sk: *mut bpf_sock) -> *mut bpf_tcp_sock { + let fun: unsafe extern "C" fn(sk: *mut bpf_sock) -> *mut bpf_tcp_sock = + ::core::mem::transmute(96usize); + fun(sk) +} +pub unsafe fn bpf_skb_ecn_set_ce(skb: *mut __sk_buff) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(97usize); + fun(skb) +} +pub unsafe fn bpf_get_listener_sock(sk: *mut bpf_sock) -> *mut bpf_sock { + let fun: unsafe extern "C" fn(sk: *mut bpf_sock) -> *mut bpf_sock = + ::core::mem::transmute(98usize); + fun(sk) +} +pub unsafe fn bpf_skc_lookup_tcp( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, +) -> *mut bpf_sock { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, + ) -> *mut bpf_sock = ::core::mem::transmute(99usize); + fun(ctx, tuple, tuple_size, netns, flags) +} +pub unsafe fn bpf_tcp_check_syncookie( + sk: *mut ::aya_ebpf_cty::c_void, + iph: *mut ::aya_ebpf_cty::c_void, + iph_len: __u32, + th: *mut tcphdr, + th_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + sk: *mut ::aya_ebpf_cty::c_void, + iph: *mut ::aya_ebpf_cty::c_void, + iph_len: __u32, + th: *mut tcphdr, + th_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(100usize); + fun(sk, iph, iph_len, th, th_len) +} +pub unsafe fn bpf_sysctl_get_name( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(101usize); + fun(ctx, buf, buf_len, flags) +} +pub unsafe fn bpf_sysctl_get_current_value( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(102usize); + fun(ctx, buf, buf_len) +} +pub unsafe fn bpf_sysctl_get_new_value( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(103usize); + fun(ctx, buf, buf_len) +} +pub unsafe fn bpf_sysctl_set_new_value( + ctx: *mut bpf_sysctl, + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sysctl, + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(104usize); + fun(ctx, buf, buf_len) +} +pub unsafe fn bpf_strtol( + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + res: *mut ::aya_ebpf_cty::c_long, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + res: *mut ::aya_ebpf_cty::c_long, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(105usize); + fun(buf, buf_len, flags, res) +} +pub unsafe fn bpf_strtoul( + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + res: *mut ::aya_ebpf_cty::c_ulong, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + res: *mut ::aya_ebpf_cty::c_ulong, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(106usize); + fun(buf, buf_len, flags, res) +} +pub unsafe fn bpf_sk_storage_get( + map: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(107usize); + fun(map, sk, value, flags) +} +pub unsafe fn bpf_sk_storage_delete( + map: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(108usize); + fun(map, sk) +} +pub unsafe fn bpf_send_signal(sig: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(sig: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(109usize); + fun(sig) +} +pub unsafe fn bpf_tcp_gen_syncookie( + sk: *mut ::aya_ebpf_cty::c_void, + iph: *mut ::aya_ebpf_cty::c_void, + iph_len: __u32, + th: *mut tcphdr, + th_len: __u32, +) -> __s64 { + let fun: unsafe extern "C" fn( + sk: *mut ::aya_ebpf_cty::c_void, + iph: *mut ::aya_ebpf_cty::c_void, + iph_len: __u32, + th: *mut tcphdr, + th_len: __u32, + ) -> __s64 = ::core::mem::transmute(110usize); + fun(sk, iph, iph_len, th, th_len) +} +pub unsafe fn bpf_skb_output( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(111usize); + fun(ctx, map, flags, data, size) +} +pub unsafe fn bpf_probe_read_user( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(112usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_probe_read_kernel( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(113usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_probe_read_user_str( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(114usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_probe_read_kernel_str( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(115usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_tcp_send_ack( + tp: *mut ::aya_ebpf_cty::c_void, + rcv_nxt: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + tp: *mut ::aya_ebpf_cty::c_void, + rcv_nxt: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(116usize); + fun(tp, rcv_nxt) +} +pub unsafe fn bpf_send_signal_thread(sig: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(sig: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(117usize); + fun(sig) +} +pub unsafe fn bpf_jiffies64() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(118usize); + fun() +} +pub unsafe fn bpf_read_branch_records( + ctx: *mut bpf_perf_event_data, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_perf_event_data, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(119usize); + fun(ctx, buf, size, flags) +} +pub unsafe fn bpf_get_ns_current_pid_tgid( + dev: __u64, + ino: __u64, + nsdata: *mut bpf_pidns_info, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dev: __u64, + ino: __u64, + nsdata: *mut bpf_pidns_info, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(120usize); + fun(dev, ino, nsdata, size) +} +pub unsafe fn bpf_xdp_output( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(121usize); + fun(ctx, map, flags, data, size) +} +pub unsafe fn bpf_get_netns_cookie(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(122usize); + fun(ctx) +} +pub unsafe fn bpf_get_current_ancestor_cgroup_id(ancestor_level: ::aya_ebpf_cty::c_int) -> __u64 { + let fun: unsafe extern "C" fn(ancestor_level: ::aya_ebpf_cty::c_int) -> __u64 = + ::core::mem::transmute(123usize); + fun(ancestor_level) +} +pub unsafe fn bpf_sk_assign( + ctx: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(124usize); + fun(ctx, sk, flags) +} +pub unsafe fn bpf_ktime_get_boot_ns() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(125usize); + fun() +} +pub unsafe fn bpf_seq_printf( + m: *mut seq_file, + fmt: *const ::aya_ebpf_cty::c_char, + fmt_size: __u32, + data: *const ::aya_ebpf_cty::c_void, + data_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + m: *mut seq_file, + fmt: *const ::aya_ebpf_cty::c_char, + fmt_size: __u32, + data: *const ::aya_ebpf_cty::c_void, + data_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(126usize); + fun(m, fmt, fmt_size, data, data_len) +} +pub unsafe fn bpf_seq_write( + m: *mut seq_file, + data: *const ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + m: *mut seq_file, + data: *const ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(127usize); + fun(m, data, len) +} +pub unsafe fn bpf_sk_cgroup_id(sk: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(128usize); + fun(sk) +} +pub unsafe fn bpf_sk_ancestor_cgroup_id( + sk: *mut ::aya_ebpf_cty::c_void, + ancestor_level: ::aya_ebpf_cty::c_int, +) -> __u64 { + let fun: unsafe extern "C" fn( + sk: *mut ::aya_ebpf_cty::c_void, + ancestor_level: ::aya_ebpf_cty::c_int, + ) -> __u64 = ::core::mem::transmute(129usize); + fun(sk, ancestor_level) +} +pub unsafe fn bpf_ringbuf_output( + ringbuf: *mut ::aya_ebpf_cty::c_void, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ringbuf: *mut ::aya_ebpf_cty::c_void, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(130usize); + fun(ringbuf, data, size, flags) +} +pub unsafe fn bpf_ringbuf_reserve( + ringbuf: *mut ::aya_ebpf_cty::c_void, + size: __u64, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + ringbuf: *mut ::aya_ebpf_cty::c_void, + size: __u64, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(131usize); + fun(ringbuf, size, flags) +} +pub unsafe fn bpf_ringbuf_submit(data: *mut ::aya_ebpf_cty::c_void, flags: __u64) { + let fun: unsafe extern "C" fn(data: *mut ::aya_ebpf_cty::c_void, flags: __u64) = + ::core::mem::transmute(132usize); + fun(data, flags) +} +pub unsafe fn bpf_ringbuf_discard(data: *mut ::aya_ebpf_cty::c_void, flags: __u64) { + let fun: unsafe extern "C" fn(data: *mut ::aya_ebpf_cty::c_void, flags: __u64) = + ::core::mem::transmute(133usize); + fun(data, flags) +} +pub unsafe fn bpf_ringbuf_query(ringbuf: *mut ::aya_ebpf_cty::c_void, flags: __u64) -> __u64 { + let fun: unsafe extern "C" fn(ringbuf: *mut ::aya_ebpf_cty::c_void, flags: __u64) -> __u64 = + ::core::mem::transmute(134usize); + fun(ringbuf, flags) +} +pub unsafe fn bpf_csum_level(skb: *mut __sk_buff, level: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, level: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(135usize); + fun(skb, level) +} +pub unsafe fn bpf_skc_to_tcp6_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp6_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp6_sock = + ::core::mem::transmute(136usize); + fun(sk) +} +pub unsafe fn bpf_skc_to_tcp_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp_sock = + ::core::mem::transmute(137usize); + fun(sk) +} +pub unsafe fn bpf_skc_to_tcp_timewait_sock( + sk: *mut ::aya_ebpf_cty::c_void, +) -> *mut tcp_timewait_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp_timewait_sock = + ::core::mem::transmute(138usize); + fun(sk) +} +pub unsafe fn bpf_skc_to_tcp_request_sock( + sk: *mut ::aya_ebpf_cty::c_void, +) -> *mut tcp_request_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp_request_sock = + ::core::mem::transmute(139usize); + fun(sk) +} +pub unsafe fn bpf_skc_to_udp6_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut udp6_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut udp6_sock = + ::core::mem::transmute(140usize); + fun(sk) +} +pub unsafe fn bpf_get_task_stack( + task: *mut task_struct, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + task: *mut task_struct, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(141usize); + fun(task, buf, size, flags) +} +pub unsafe fn bpf_load_hdr_opt( + skops: *mut bpf_sock_ops, + searchby_res: *mut ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + searchby_res: *mut ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(142usize); + fun(skops, searchby_res, len, flags) +} +pub unsafe fn bpf_store_hdr_opt( + skops: *mut bpf_sock_ops, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(143usize); + fun(skops, from, len, flags) +} +pub unsafe fn bpf_reserve_hdr_opt( + skops: *mut bpf_sock_ops, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(144usize); + fun(skops, len, flags) +} +pub unsafe fn bpf_inode_storage_get( + map: *mut ::aya_ebpf_cty::c_void, + inode: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + inode: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(145usize); + fun(map, inode, value, flags) +} +pub unsafe fn bpf_inode_storage_delete( + map: *mut ::aya_ebpf_cty::c_void, + inode: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_int { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + inode: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_int = ::core::mem::transmute(146usize); + fun(map, inode) +} +pub unsafe fn bpf_d_path( + path: *mut path, + buf: *mut ::aya_ebpf_cty::c_char, + sz: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + path: *mut path, + buf: *mut ::aya_ebpf_cty::c_char, + sz: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(147usize); + fun(path, buf, sz) +} +pub unsafe fn bpf_copy_from_user( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + user_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + user_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(148usize); + fun(dst, size, user_ptr) +} +pub unsafe fn bpf_snprintf_btf( + str_: *mut ::aya_ebpf_cty::c_char, + str_size: __u32, + ptr: *mut btf_ptr, + btf_ptr_size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + str_: *mut ::aya_ebpf_cty::c_char, + str_size: __u32, + ptr: *mut btf_ptr, + btf_ptr_size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(149usize); + fun(str_, str_size, ptr, btf_ptr_size, flags) +} +pub unsafe fn bpf_seq_printf_btf( + m: *mut seq_file, + ptr: *mut btf_ptr, + ptr_size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + m: *mut seq_file, + ptr: *mut btf_ptr, + ptr_size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(150usize); + fun(m, ptr, ptr_size, flags) +} +pub unsafe fn bpf_skb_cgroup_classid(skb: *mut __sk_buff) -> __u64 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u64 = ::core::mem::transmute(151usize); + fun(skb) +} +pub unsafe fn bpf_redirect_neigh( + ifindex: __u32, + params: *mut bpf_redir_neigh, + plen: ::aya_ebpf_cty::c_int, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ifindex: __u32, + params: *mut bpf_redir_neigh, + plen: ::aya_ebpf_cty::c_int, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(152usize); + fun(ifindex, params, plen, flags) +} +pub unsafe fn bpf_per_cpu_ptr( + percpu_ptr: *const ::aya_ebpf_cty::c_void, + cpu: __u32, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + percpu_ptr: *const ::aya_ebpf_cty::c_void, + cpu: __u32, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(153usize); + fun(percpu_ptr, cpu) +} +pub unsafe fn bpf_this_cpu_ptr( + percpu_ptr: *const ::aya_ebpf_cty::c_void, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + percpu_ptr: *const ::aya_ebpf_cty::c_void, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(154usize); + fun(percpu_ptr) +} +pub unsafe fn bpf_redirect_peer(ifindex: __u32, flags: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(ifindex: __u32, flags: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(155usize); + fun(ifindex, flags) +} +pub unsafe fn bpf_task_storage_get( + map: *mut ::aya_ebpf_cty::c_void, + task: *mut task_struct, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + task: *mut task_struct, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(156usize); + fun(map, task, value, flags) +} +pub unsafe fn bpf_task_storage_delete( + map: *mut ::aya_ebpf_cty::c_void, + task: *mut task_struct, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + task: *mut task_struct, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(157usize); + fun(map, task) +} +pub unsafe fn bpf_get_current_task_btf() -> *mut task_struct { + let fun: unsafe extern "C" fn() -> *mut task_struct = ::core::mem::transmute(158usize); + fun() +} +pub unsafe fn bpf_bprm_opts_set(bprm: *mut linux_binprm, flags: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(bprm: *mut linux_binprm, flags: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(159usize); + fun(bprm, flags) +} +pub unsafe fn bpf_ktime_get_coarse_ns() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(160usize); + fun() +} +pub unsafe fn bpf_ima_inode_hash( + inode: *mut inode, + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + inode: *mut inode, + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(161usize); + fun(inode, dst, size) +} +pub unsafe fn bpf_sock_from_file(file: *mut file) -> *mut socket { + let fun: unsafe extern "C" fn(file: *mut file) -> *mut socket = + ::core::mem::transmute(162usize); + fun(file) +} +pub unsafe fn bpf_check_mtu( + ctx: *mut ::aya_ebpf_cty::c_void, + ifindex: __u32, + mtu_len: *mut __u32, + len_diff: __s32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + ifindex: __u32, + mtu_len: *mut __u32, + len_diff: __s32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(163usize); + fun(ctx, ifindex, mtu_len, len_diff, flags) +} +pub unsafe fn bpf_for_each_map_elem( + map: *mut ::aya_ebpf_cty::c_void, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(164usize); + fun(map, callback_fn, callback_ctx, flags) +} +pub unsafe fn bpf_snprintf( + str_: *mut ::aya_ebpf_cty::c_char, + str_size: __u32, + fmt: *const ::aya_ebpf_cty::c_char, + data: *mut __u64, + data_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + str_: *mut ::aya_ebpf_cty::c_char, + str_size: __u32, + fmt: *const ::aya_ebpf_cty::c_char, + data: *mut __u64, + data_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(165usize); + fun(str_, str_size, fmt, data, data_len) +} +pub unsafe fn bpf_sys_bpf( + cmd: __u32, + attr: *mut ::aya_ebpf_cty::c_void, + attr_size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + cmd: __u32, + attr: *mut ::aya_ebpf_cty::c_void, + attr_size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(166usize); + fun(cmd, attr, attr_size) +} +pub unsafe fn bpf_btf_find_by_name_kind( + name: *mut ::aya_ebpf_cty::c_char, + name_sz: ::aya_ebpf_cty::c_int, + kind: __u32, + flags: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + name: *mut ::aya_ebpf_cty::c_char, + name_sz: ::aya_ebpf_cty::c_int, + kind: __u32, + flags: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(167usize); + fun(name, name_sz, kind, flags) +} +pub unsafe fn bpf_sys_close(fd: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(fd: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(168usize); + fun(fd) +} +pub unsafe fn bpf_timer_init( + timer: *mut bpf_timer, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + timer: *mut bpf_timer, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(169usize); + fun(timer, map, flags) +} +pub unsafe fn bpf_timer_set_callback( + timer: *mut bpf_timer, + callback_fn: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + timer: *mut bpf_timer, + callback_fn: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(170usize); + fun(timer, callback_fn) +} +pub unsafe fn bpf_timer_start( + timer: *mut bpf_timer, + nsecs: __u64, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + timer: *mut bpf_timer, + nsecs: __u64, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(171usize); + fun(timer, nsecs, flags) +} +pub unsafe fn bpf_timer_cancel(timer: *mut bpf_timer) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(timer: *mut bpf_timer) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(172usize); + fun(timer) +} +pub unsafe fn bpf_get_func_ip(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(173usize); + fun(ctx) +} +pub unsafe fn bpf_get_attach_cookie(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(174usize); + fun(ctx) +} +pub unsafe fn bpf_task_pt_regs(task: *mut task_struct) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(task: *mut task_struct) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(175usize); + fun(task) +} +pub unsafe fn bpf_get_branch_snapshot( + entries: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + entries: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(176usize); + fun(entries, size, flags) +} +pub unsafe fn bpf_trace_vprintk( + fmt: *const ::aya_ebpf_cty::c_char, + fmt_size: __u32, + data: *const ::aya_ebpf_cty::c_void, + data_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + fmt: *const ::aya_ebpf_cty::c_char, + fmt_size: __u32, + data: *const ::aya_ebpf_cty::c_void, + data_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(177usize); + fun(fmt, fmt_size, data, data_len) +} +pub unsafe fn bpf_skc_to_unix_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut unix_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut unix_sock = + ::core::mem::transmute(178usize); + fun(sk) +} +pub unsafe fn bpf_kallsyms_lookup_name( + name: *const ::aya_ebpf_cty::c_char, + name_sz: ::aya_ebpf_cty::c_int, + flags: ::aya_ebpf_cty::c_int, + res: *mut __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + name: *const ::aya_ebpf_cty::c_char, + name_sz: ::aya_ebpf_cty::c_int, + flags: ::aya_ebpf_cty::c_int, + res: *mut __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(179usize); + fun(name, name_sz, flags, res) +} +pub unsafe fn bpf_find_vma( + task: *mut task_struct, + addr: __u64, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + task: *mut task_struct, + addr: __u64, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(180usize); + fun(task, addr, callback_fn, callback_ctx, flags) +} +pub unsafe fn bpf_loop( + nr_loops: __u32, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + nr_loops: __u32, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(181usize); + fun(nr_loops, callback_fn, callback_ctx, flags) +} +pub unsafe fn bpf_strncmp( + s1: *const ::aya_ebpf_cty::c_char, + s1_sz: __u32, + s2: *const ::aya_ebpf_cty::c_char, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + s1: *const ::aya_ebpf_cty::c_char, + s1_sz: __u32, + s2: *const ::aya_ebpf_cty::c_char, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(182usize); + fun(s1, s1_sz, s2) +} +pub unsafe fn bpf_get_func_arg( + ctx: *mut ::aya_ebpf_cty::c_void, + n: __u32, + value: *mut __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + n: __u32, + value: *mut __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(183usize); + fun(ctx, n, value) +} +pub unsafe fn bpf_get_func_ret( + ctx: *mut ::aya_ebpf_cty::c_void, + value: *mut __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + value: *mut __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(184usize); + fun(ctx, value) +} +pub unsafe fn bpf_get_func_arg_cnt(ctx: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(185usize); + fun(ctx) +} +pub unsafe fn bpf_get_retval() -> ::aya_ebpf_cty::c_int { + let fun: unsafe extern "C" fn() -> ::aya_ebpf_cty::c_int = ::core::mem::transmute(186usize); + fun() +} +pub unsafe fn bpf_set_retval(retval: ::aya_ebpf_cty::c_int) -> ::aya_ebpf_cty::c_int { + let fun: unsafe extern "C" fn(retval: ::aya_ebpf_cty::c_int) -> ::aya_ebpf_cty::c_int = + ::core::mem::transmute(187usize); + fun(retval) +} +pub unsafe fn bpf_xdp_get_buff_len(xdp_md: *mut xdp_md) -> __u64 { + let fun: unsafe extern "C" fn(xdp_md: *mut xdp_md) -> __u64 = ::core::mem::transmute(188usize); + fun(xdp_md) +} +pub unsafe fn bpf_xdp_load_bytes( + xdp_md: *mut xdp_md, + offset: __u32, + buf: *mut ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + offset: __u32, + buf: *mut ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(189usize); + fun(xdp_md, offset, buf, len) +} +pub unsafe fn bpf_xdp_store_bytes( + xdp_md: *mut xdp_md, + offset: __u32, + buf: *mut ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + offset: __u32, + buf: *mut ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(190usize); + fun(xdp_md, offset, buf, len) +} +pub unsafe fn bpf_copy_from_user_task( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + user_ptr: *const ::aya_ebpf_cty::c_void, + tsk: *mut task_struct, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + user_ptr: *const ::aya_ebpf_cty::c_void, + tsk: *mut task_struct, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(191usize); + fun(dst, size, user_ptr, tsk, flags) +} +pub unsafe fn bpf_skb_set_tstamp( + skb: *mut __sk_buff, + tstamp: __u64, + tstamp_type: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + tstamp: __u64, + tstamp_type: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(192usize); + fun(skb, tstamp, tstamp_type) +} +pub unsafe fn bpf_ima_file_hash( + file: *mut file, + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + file: *mut file, + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(193usize); + fun(file, dst, size) +} +pub unsafe fn bpf_kptr_xchg( + map_value: *mut ::aya_ebpf_cty::c_void, + ptr: *mut ::aya_ebpf_cty::c_void, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map_value: *mut ::aya_ebpf_cty::c_void, + ptr: *mut ::aya_ebpf_cty::c_void, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(194usize); + fun(map_value, ptr) +} +pub unsafe fn bpf_map_lookup_percpu_elem( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + cpu: __u32, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + cpu: __u32, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(195usize); + fun(map, key, cpu) +} +pub unsafe fn bpf_skc_to_mptcp_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut mptcp_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut mptcp_sock = + ::core::mem::transmute(196usize); + fun(sk) +} +pub unsafe fn bpf_dynptr_from_mem( + data: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ptr: *mut bpf_dynptr, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + data: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ptr: *mut bpf_dynptr, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(197usize); + fun(data, size, flags, ptr) +} +pub unsafe fn bpf_ringbuf_reserve_dynptr( + ringbuf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ptr: *mut bpf_dynptr, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ringbuf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ptr: *mut bpf_dynptr, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(198usize); + fun(ringbuf, size, flags, ptr) +} +pub unsafe fn bpf_ringbuf_submit_dynptr(ptr: *mut bpf_dynptr, flags: __u64) { + let fun: unsafe extern "C" fn(ptr: *mut bpf_dynptr, flags: __u64) = + ::core::mem::transmute(199usize); + fun(ptr, flags) +} +pub unsafe fn bpf_ringbuf_discard_dynptr(ptr: *mut bpf_dynptr, flags: __u64) { + let fun: unsafe extern "C" fn(ptr: *mut bpf_dynptr, flags: __u64) = + ::core::mem::transmute(200usize); + fun(ptr, flags) +} +pub unsafe fn bpf_dynptr_read( + dst: *mut ::aya_ebpf_cty::c_void, + len: __u32, + src: *const bpf_dynptr, + offset: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + len: __u32, + src: *const bpf_dynptr, + offset: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(201usize); + fun(dst, len, src, offset, flags) +} +pub unsafe fn bpf_dynptr_write( + dst: *const bpf_dynptr, + offset: __u32, + src: *mut ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *const bpf_dynptr, + offset: __u32, + src: *mut ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(202usize); + fun(dst, offset, src, len, flags) +} +pub unsafe fn bpf_dynptr_data( + ptr: *const bpf_dynptr, + offset: __u32, + len: __u32, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + ptr: *const bpf_dynptr, + offset: __u32, + len: __u32, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(203usize); + fun(ptr, offset, len) +} +pub unsafe fn bpf_tcp_raw_gen_syncookie_ipv4( + iph: *mut iphdr, + th: *mut tcphdr, + th_len: __u32, +) -> __s64 { + let fun: unsafe extern "C" fn(iph: *mut iphdr, th: *mut tcphdr, th_len: __u32) -> __s64 = + ::core::mem::transmute(204usize); + fun(iph, th, th_len) +} +pub unsafe fn bpf_tcp_raw_gen_syncookie_ipv6( + iph: *mut ipv6hdr, + th: *mut tcphdr, + th_len: __u32, +) -> __s64 { + let fun: unsafe extern "C" fn(iph: *mut ipv6hdr, th: *mut tcphdr, th_len: __u32) -> __s64 = + ::core::mem::transmute(205usize); + fun(iph, th, th_len) +} +pub unsafe fn bpf_tcp_raw_check_syncookie_ipv4( + iph: *mut iphdr, + th: *mut tcphdr, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(iph: *mut iphdr, th: *mut tcphdr) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(206usize); + fun(iph, th) +} +pub unsafe fn bpf_tcp_raw_check_syncookie_ipv6( + iph: *mut ipv6hdr, + th: *mut tcphdr, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(iph: *mut ipv6hdr, th: *mut tcphdr) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(207usize); + fun(iph, th) +} +pub unsafe fn bpf_ktime_get_tai_ns() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(208usize); + fun() +} +pub unsafe fn bpf_user_ringbuf_drain( + map: *mut ::aya_ebpf_cty::c_void, + callback_fn: *mut ::aya_ebpf_cty::c_void, + ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + callback_fn: *mut ::aya_ebpf_cty::c_void, + ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(209usize); + fun(map, callback_fn, ctx, flags) +} +pub unsafe fn bpf_cgrp_storage_get( + map: *mut ::aya_ebpf_cty::c_void, + cgroup: *mut cgroup, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + cgroup: *mut cgroup, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(210usize); + fun(map, cgroup, value, flags) +} +pub unsafe fn bpf_cgrp_storage_delete( + map: *mut ::aya_ebpf_cty::c_void, + cgroup: *mut cgroup, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + cgroup: *mut cgroup, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(211usize); + fun(map, cgroup) +} diff --git a/ebpf/aya-ebpf-bindings/src/mips/bindings.rs b/ebpf/aya-ebpf-bindings/src/mips/bindings.rs new file mode 100644 index 00000000..65333c5c --- /dev/null +++ b/ebpf/aya-ebpf-bindings/src/mips/bindings.rs @@ -0,0 +1,2912 @@ +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { byte | mask } else { byte & !mask } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } +} +#[repr(C)] +#[derive(Default)] +pub struct __IncompleteArrayField(::core::marker::PhantomData, [T; 0]); +impl __IncompleteArrayField { + #[inline] + pub const fn new() -> Self { + __IncompleteArrayField(::core::marker::PhantomData, []) + } + #[inline] + pub fn as_ptr(&self) -> *const T { + self as *const _ as *const T + } + #[inline] + pub fn as_mut_ptr(&mut self) -> *mut T { + self as *mut _ as *mut T + } + #[inline] + pub unsafe fn as_slice(&self, len: usize) -> &[T] { + ::core::slice::from_raw_parts(self.as_ptr(), len) + } + #[inline] + pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { + ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len) + } +} +impl ::core::fmt::Debug for __IncompleteArrayField { + fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + fmt.write_str("__IncompleteArrayField") + } +} +pub const BPF_LD: u32 = 0; +pub const BPF_LDX: u32 = 1; +pub const BPF_ST: u32 = 2; +pub const BPF_STX: u32 = 3; +pub const BPF_ALU: u32 = 4; +pub const BPF_JMP: u32 = 5; +pub const BPF_RET: u32 = 6; +pub const BPF_MISC: u32 = 7; +pub const BPF_W: u32 = 0; +pub const BPF_H: u32 = 8; +pub const BPF_B: u32 = 16; +pub const BPF_IMM: u32 = 0; +pub const BPF_ABS: u32 = 32; +pub const BPF_IND: u32 = 64; +pub const BPF_MEM: u32 = 96; +pub const BPF_LEN: u32 = 128; +pub const BPF_MSH: u32 = 160; +pub const BPF_ADD: u32 = 0; +pub const BPF_SUB: u32 = 16; +pub const BPF_MUL: u32 = 32; +pub const BPF_DIV: u32 = 48; +pub const BPF_OR: u32 = 64; +pub const BPF_AND: u32 = 80; +pub const BPF_LSH: u32 = 96; +pub const BPF_RSH: u32 = 112; +pub const BPF_NEG: u32 = 128; +pub const BPF_MOD: u32 = 144; +pub const BPF_XOR: u32 = 160; +pub const BPF_JA: u32 = 0; +pub const BPF_JEQ: u32 = 16; +pub const BPF_JGT: u32 = 32; +pub const BPF_JGE: u32 = 48; +pub const BPF_JSET: u32 = 64; +pub const BPF_K: u32 = 0; +pub const BPF_X: u32 = 8; +pub const BPF_MAXINSNS: u32 = 4096; +pub const BPF_JMP32: u32 = 6; +pub const BPF_ALU64: u32 = 7; +pub const BPF_DW: u32 = 24; +pub const BPF_MEMSX: u32 = 128; +pub const BPF_ATOMIC: u32 = 192; +pub const BPF_XADD: u32 = 192; +pub const BPF_MOV: u32 = 176; +pub const BPF_ARSH: u32 = 192; +pub const BPF_END: u32 = 208; +pub const BPF_TO_LE: u32 = 0; +pub const BPF_TO_BE: u32 = 8; +pub const BPF_FROM_LE: u32 = 0; +pub const BPF_FROM_BE: u32 = 8; +pub const BPF_JNE: u32 = 80; +pub const BPF_JLT: u32 = 160; +pub const BPF_JLE: u32 = 176; +pub const BPF_JSGT: u32 = 96; +pub const BPF_JSGE: u32 = 112; +pub const BPF_JSLT: u32 = 192; +pub const BPF_JSLE: u32 = 208; +pub const BPF_JCOND: u32 = 224; +pub const BPF_CALL: u32 = 128; +pub const BPF_EXIT: u32 = 144; +pub const BPF_FETCH: u32 = 1; +pub const BPF_XCHG: u32 = 225; +pub const BPF_CMPXCHG: u32 = 241; +pub const BPF_F_ALLOW_OVERRIDE: u32 = 1; +pub const BPF_F_ALLOW_MULTI: u32 = 2; +pub const BPF_F_REPLACE: u32 = 4; +pub const BPF_F_BEFORE: u32 = 8; +pub const BPF_F_AFTER: u32 = 16; +pub const BPF_F_ID: u32 = 32; +pub const BPF_F_STRICT_ALIGNMENT: u32 = 1; +pub const BPF_F_ANY_ALIGNMENT: u32 = 2; +pub const BPF_F_TEST_RND_HI32: u32 = 4; +pub const BPF_F_TEST_STATE_FREQ: u32 = 8; +pub const BPF_F_SLEEPABLE: u32 = 16; +pub const BPF_F_XDP_HAS_FRAGS: u32 = 32; +pub const BPF_F_XDP_DEV_BOUND_ONLY: u32 = 64; +pub const BPF_F_TEST_REG_INVARIANTS: u32 = 128; +pub const BPF_F_NETFILTER_IP_DEFRAG: u32 = 1; +pub const BPF_PSEUDO_MAP_FD: u32 = 1; +pub const BPF_PSEUDO_MAP_IDX: u32 = 5; +pub const BPF_PSEUDO_MAP_VALUE: u32 = 2; +pub const BPF_PSEUDO_MAP_IDX_VALUE: u32 = 6; +pub const BPF_PSEUDO_BTF_ID: u32 = 3; +pub const BPF_PSEUDO_FUNC: u32 = 4; +pub const BPF_PSEUDO_CALL: u32 = 1; +pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2; +pub const BPF_F_QUERY_EFFECTIVE: u32 = 1; +pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1; +pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2; +pub const BPF_BUILD_ID_SIZE: u32 = 20; +pub const BPF_OBJ_NAME_LEN: u32 = 16; +pub const BPF_TAG_SIZE: u32 = 8; +pub const TC_ACT_UNSPEC: i32 = -1; +pub const TC_ACT_OK: u32 = 0; +pub const TC_ACT_RECLASSIFY: u32 = 1; +pub const TC_ACT_SHOT: u32 = 2; +pub const TC_ACT_PIPE: u32 = 3; +pub const TC_ACT_STOLEN: u32 = 4; +pub const TC_ACT_QUEUED: u32 = 5; +pub const TC_ACT_REPEAT: u32 = 6; +pub const TC_ACT_REDIRECT: u32 = 7; +pub const TC_ACT_TRAP: u32 = 8; +pub const TC_ACT_VALUE_MAX: u32 = 8; +pub const TC_ACT_EXT_VAL_MASK: u32 = 268435455; +pub const TC_ACT_JUMP: u32 = 268435456; +pub const TC_ACT_GOTO_CHAIN: u32 = 536870912; +pub const TC_ACT_EXT_OPCODE_MAX: u32 = 536870912; +pub const SOL_SOCKET: u32 = 65535; +pub const SO_DEBUG: u32 = 1; +pub const SO_REUSEADDR: u32 = 4; +pub const SO_KEEPALIVE: u32 = 8; +pub const SO_DONTROUTE: u32 = 16; +pub const SO_BROADCAST: u32 = 32; +pub const SO_LINGER: u32 = 128; +pub const SO_OOBINLINE: u32 = 256; +pub const SO_REUSEPORT: u32 = 512; +pub const SO_TYPE: u32 = 4104; +pub const SO_STYLE: u32 = 4104; +pub const SO_ERROR: u32 = 4103; +pub const SO_SNDBUF: u32 = 4097; +pub const SO_RCVBUF: u32 = 4098; +pub const SO_SNDLOWAT: u32 = 4099; +pub const SO_RCVLOWAT: u32 = 4100; +pub const SO_SNDTIMEO_OLD: u32 = 4101; +pub const SO_RCVTIMEO_OLD: u32 = 4102; +pub const SO_ACCEPTCONN: u32 = 4105; +pub const SO_PROTOCOL: u32 = 4136; +pub const SO_DOMAIN: u32 = 4137; +pub const SO_NO_CHECK: u32 = 11; +pub const SO_PRIORITY: u32 = 12; +pub const SO_BSDCOMPAT: u32 = 14; +pub const SO_PASSCRED: u32 = 17; +pub const SO_PEERCRED: u32 = 18; +pub const SO_SECURITY_AUTHENTICATION: u32 = 22; +pub const SO_SECURITY_ENCRYPTION_TRANSPORT: u32 = 23; +pub const SO_SECURITY_ENCRYPTION_NETWORK: u32 = 24; +pub const SO_BINDTODEVICE: u32 = 25; +pub const SO_ATTACH_FILTER: u32 = 26; +pub const SO_DETACH_FILTER: u32 = 27; +pub const SO_GET_FILTER: u32 = 26; +pub const SO_PEERNAME: u32 = 28; +pub const SO_PEERSEC: u32 = 30; +pub const SO_SNDBUFFORCE: u32 = 31; +pub const SO_RCVBUFFORCE: u32 = 33; +pub const SO_PASSSEC: u32 = 34; +pub const SO_MARK: u32 = 36; +pub const SO_RXQ_OVFL: u32 = 40; +pub const SO_WIFI_STATUS: u32 = 41; +pub const SO_PEEK_OFF: u32 = 42; +pub const SO_NOFCS: u32 = 43; +pub const SO_LOCK_FILTER: u32 = 44; +pub const SO_SELECT_ERR_QUEUE: u32 = 45; +pub const SO_BUSY_POLL: u32 = 46; +pub const SO_MAX_PACING_RATE: u32 = 47; +pub const SO_BPF_EXTENSIONS: u32 = 48; +pub const SO_INCOMING_CPU: u32 = 49; +pub const SO_ATTACH_BPF: u32 = 50; +pub const SO_DETACH_BPF: u32 = 27; +pub const SO_ATTACH_REUSEPORT_CBPF: u32 = 51; +pub const SO_ATTACH_REUSEPORT_EBPF: u32 = 52; +pub const SO_CNX_ADVICE: u32 = 53; +pub const SO_MEMINFO: u32 = 55; +pub const SO_INCOMING_NAPI_ID: u32 = 56; +pub const SO_COOKIE: u32 = 57; +pub const SO_PEERGROUPS: u32 = 59; +pub const SO_ZEROCOPY: u32 = 60; +pub const SO_TXTIME: u32 = 61; +pub const SO_BINDTOIFINDEX: u32 = 62; +pub const SO_TIMESTAMP_OLD: u32 = 29; +pub const SO_TIMESTAMPNS_OLD: u32 = 35; +pub const SO_TIMESTAMPING_OLD: u32 = 37; +pub const SO_TIMESTAMP_NEW: u32 = 63; +pub const SO_TIMESTAMPNS_NEW: u32 = 64; +pub const SO_TIMESTAMPING_NEW: u32 = 65; +pub const SO_RCVTIMEO_NEW: u32 = 66; +pub const SO_SNDTIMEO_NEW: u32 = 67; +pub const SO_DETACH_REUSEPORT_BPF: u32 = 68; +pub const SO_PREFER_BUSY_POLL: u32 = 69; +pub const SO_BUSY_POLL_BUDGET: u32 = 70; +pub const SO_NETNS_COOKIE: u32 = 71; +pub const SO_BUF_LOCK: u32 = 72; +pub const SO_RESERVE_MEM: u32 = 73; +pub const SO_TXREHASH: u32 = 74; +pub const SO_RCVMARK: u32 = 75; +pub const SO_PASSPIDFD: u32 = 76; +pub const SO_PEERPIDFD: u32 = 77; +pub const SO_TIMESTAMP: u32 = 29; +pub const SO_TIMESTAMPNS: u32 = 35; +pub const SO_TIMESTAMPING: u32 = 37; +pub const SO_RCVTIMEO: u32 = 4102; +pub const SO_SNDTIMEO: u32 = 4101; +pub type __u8 = ::aya_ebpf_cty::c_uchar; +pub type __s16 = ::aya_ebpf_cty::c_short; +pub type __u16 = ::aya_ebpf_cty::c_ushort; +pub type __s32 = ::aya_ebpf_cty::c_int; +pub type __u32 = ::aya_ebpf_cty::c_uint; +pub type __s64 = ::aya_ebpf_cty::c_longlong; +pub type __u64 = ::aya_ebpf_cty::c_ulonglong; +pub type __be16 = __u16; +pub type __be32 = __u32; +pub type __wsum = __u32; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_perf_event_data { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct linux_binprm { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcphdr { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct seq_file { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcp6_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcp_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcp_timewait_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcp_request_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct udp6_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct unix_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct task_struct { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cgroup { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct path { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct inode { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct socket { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct file { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct mptcp_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct iphdr { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ipv6hdr { + _unused: [u8; 0], +} +pub mod bpf_cond_pseudo_jmp { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MAY_GOTO: Type = 0; +} +pub const BPF_REG_0: _bindgen_ty_1 = 0; +pub const BPF_REG_1: _bindgen_ty_1 = 1; +pub const BPF_REG_2: _bindgen_ty_1 = 2; +pub const BPF_REG_3: _bindgen_ty_1 = 3; +pub const BPF_REG_4: _bindgen_ty_1 = 4; +pub const BPF_REG_5: _bindgen_ty_1 = 5; +pub const BPF_REG_6: _bindgen_ty_1 = 6; +pub const BPF_REG_7: _bindgen_ty_1 = 7; +pub const BPF_REG_8: _bindgen_ty_1 = 8; +pub const BPF_REG_9: _bindgen_ty_1 = 9; +pub const BPF_REG_10: _bindgen_ty_1 = 10; +pub const __MAX_BPF_REG: _bindgen_ty_1 = 11; +pub type _bindgen_ty_1 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_insn { + pub code: __u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub off: __s16, + pub imm: __s32, +} +impl bpf_insn { + #[inline] + pub fn dst_reg(&self) -> __u8 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) } + } + #[inline] + pub fn set_dst_reg(&mut self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn src_reg(&self) -> __u8 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } + } + #[inline] + pub fn set_src_reg(&mut self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 4u8, { + let dst_reg: u8 = unsafe { ::core::mem::transmute(dst_reg) }; + dst_reg as u64 + }); + __bindgen_bitfield_unit.set(4usize, 4u8, { + let src_reg: u8 = unsafe { ::core::mem::transmute(src_reg) }; + src_reg as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug)] +pub struct bpf_lpm_trie_key { + pub prefixlen: __u32, + pub data: __IncompleteArrayField<__u8>, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_lpm_trie_key_hdr { + pub prefixlen: __u32, +} +#[repr(C)] +pub struct bpf_lpm_trie_key_u8 { + pub __bindgen_anon_1: bpf_lpm_trie_key_u8__bindgen_ty_1, + pub data: __IncompleteArrayField<__u8>, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_lpm_trie_key_u8__bindgen_ty_1 { + pub hdr: bpf_lpm_trie_key_hdr, + pub prefixlen: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_cgroup_storage_key { + pub cgroup_inode_id: __u64, + pub attach_type: __u32, +} +pub mod bpf_cgroup_iter_order { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_CGROUP_ITER_ORDER_UNSPEC: Type = 0; + pub const BPF_CGROUP_ITER_SELF_ONLY: Type = 1; + pub const BPF_CGROUP_ITER_DESCENDANTS_PRE: Type = 2; + pub const BPF_CGROUP_ITER_DESCENDANTS_POST: Type = 3; + pub const BPF_CGROUP_ITER_ANCESTORS_UP: Type = 4; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_iter_link_info { + pub map: bpf_iter_link_info__bindgen_ty_1, + pub cgroup: bpf_iter_link_info__bindgen_ty_2, + pub task: bpf_iter_link_info__bindgen_ty_3, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_iter_link_info__bindgen_ty_1 { + pub map_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_iter_link_info__bindgen_ty_2 { + pub order: bpf_cgroup_iter_order::Type, + pub cgroup_fd: __u32, + pub cgroup_id: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_iter_link_info__bindgen_ty_3 { + pub tid: __u32, + pub pid: __u32, + pub pid_fd: __u32, +} +pub mod bpf_cmd { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MAP_CREATE: Type = 0; + pub const BPF_MAP_LOOKUP_ELEM: Type = 1; + pub const BPF_MAP_UPDATE_ELEM: Type = 2; + pub const BPF_MAP_DELETE_ELEM: Type = 3; + pub const BPF_MAP_GET_NEXT_KEY: Type = 4; + pub const BPF_PROG_LOAD: Type = 5; + pub const BPF_OBJ_PIN: Type = 6; + pub const BPF_OBJ_GET: Type = 7; + pub const BPF_PROG_ATTACH: Type = 8; + pub const BPF_PROG_DETACH: Type = 9; + pub const BPF_PROG_TEST_RUN: Type = 10; + pub const BPF_PROG_RUN: Type = 10; + pub const BPF_PROG_GET_NEXT_ID: Type = 11; + pub const BPF_MAP_GET_NEXT_ID: Type = 12; + pub const BPF_PROG_GET_FD_BY_ID: Type = 13; + pub const BPF_MAP_GET_FD_BY_ID: Type = 14; + pub const BPF_OBJ_GET_INFO_BY_FD: Type = 15; + pub const BPF_PROG_QUERY: Type = 16; + pub const BPF_RAW_TRACEPOINT_OPEN: Type = 17; + pub const BPF_BTF_LOAD: Type = 18; + pub const BPF_BTF_GET_FD_BY_ID: Type = 19; + pub const BPF_TASK_FD_QUERY: Type = 20; + pub const BPF_MAP_LOOKUP_AND_DELETE_ELEM: Type = 21; + pub const BPF_MAP_FREEZE: Type = 22; + pub const BPF_BTF_GET_NEXT_ID: Type = 23; + pub const BPF_MAP_LOOKUP_BATCH: Type = 24; + pub const BPF_MAP_LOOKUP_AND_DELETE_BATCH: Type = 25; + pub const BPF_MAP_UPDATE_BATCH: Type = 26; + pub const BPF_MAP_DELETE_BATCH: Type = 27; + pub const BPF_LINK_CREATE: Type = 28; + pub const BPF_LINK_UPDATE: Type = 29; + pub const BPF_LINK_GET_FD_BY_ID: Type = 30; + pub const BPF_LINK_GET_NEXT_ID: Type = 31; + pub const BPF_ENABLE_STATS: Type = 32; + pub const BPF_ITER_CREATE: Type = 33; + pub const BPF_LINK_DETACH: Type = 34; + pub const BPF_PROG_BIND_MAP: Type = 35; + pub const BPF_TOKEN_CREATE: Type = 36; + pub const __MAX_BPF_CMD: Type = 37; +} +pub mod bpf_map_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MAP_TYPE_UNSPEC: Type = 0; + pub const BPF_MAP_TYPE_HASH: Type = 1; + pub const BPF_MAP_TYPE_ARRAY: Type = 2; + pub const BPF_MAP_TYPE_PROG_ARRAY: Type = 3; + pub const BPF_MAP_TYPE_PERF_EVENT_ARRAY: Type = 4; + pub const BPF_MAP_TYPE_PERCPU_HASH: Type = 5; + pub const BPF_MAP_TYPE_PERCPU_ARRAY: Type = 6; + pub const BPF_MAP_TYPE_STACK_TRACE: Type = 7; + pub const BPF_MAP_TYPE_CGROUP_ARRAY: Type = 8; + pub const BPF_MAP_TYPE_LRU_HASH: Type = 9; + pub const BPF_MAP_TYPE_LRU_PERCPU_HASH: Type = 10; + pub const BPF_MAP_TYPE_LPM_TRIE: Type = 11; + pub const BPF_MAP_TYPE_ARRAY_OF_MAPS: Type = 12; + pub const BPF_MAP_TYPE_HASH_OF_MAPS: Type = 13; + pub const BPF_MAP_TYPE_DEVMAP: Type = 14; + pub const BPF_MAP_TYPE_SOCKMAP: Type = 15; + pub const BPF_MAP_TYPE_CPUMAP: Type = 16; + pub const BPF_MAP_TYPE_XSKMAP: Type = 17; + pub const BPF_MAP_TYPE_SOCKHASH: Type = 18; + pub const BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED: Type = 19; + pub const BPF_MAP_TYPE_CGROUP_STORAGE: Type = 19; + pub const BPF_MAP_TYPE_REUSEPORT_SOCKARRAY: Type = 20; + pub const BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED: Type = 21; + pub const BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE: Type = 21; + pub const BPF_MAP_TYPE_QUEUE: Type = 22; + pub const BPF_MAP_TYPE_STACK: Type = 23; + pub const BPF_MAP_TYPE_SK_STORAGE: Type = 24; + pub const BPF_MAP_TYPE_DEVMAP_HASH: Type = 25; + pub const BPF_MAP_TYPE_STRUCT_OPS: Type = 26; + pub const BPF_MAP_TYPE_RINGBUF: Type = 27; + pub const BPF_MAP_TYPE_INODE_STORAGE: Type = 28; + pub const BPF_MAP_TYPE_TASK_STORAGE: Type = 29; + pub const BPF_MAP_TYPE_BLOOM_FILTER: Type = 30; + pub const BPF_MAP_TYPE_USER_RINGBUF: Type = 31; + pub const BPF_MAP_TYPE_CGRP_STORAGE: Type = 32; + pub const BPF_MAP_TYPE_ARENA: Type = 33; + pub const __MAX_BPF_MAP_TYPE: Type = 34; +} +pub mod bpf_prog_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_PROG_TYPE_UNSPEC: Type = 0; + pub const BPF_PROG_TYPE_SOCKET_FILTER: Type = 1; + pub const BPF_PROG_TYPE_KPROBE: Type = 2; + pub const BPF_PROG_TYPE_SCHED_CLS: Type = 3; + pub const BPF_PROG_TYPE_SCHED_ACT: Type = 4; + pub const BPF_PROG_TYPE_TRACEPOINT: Type = 5; + pub const BPF_PROG_TYPE_XDP: Type = 6; + pub const BPF_PROG_TYPE_PERF_EVENT: Type = 7; + pub const BPF_PROG_TYPE_CGROUP_SKB: Type = 8; + pub const BPF_PROG_TYPE_CGROUP_SOCK: Type = 9; + pub const BPF_PROG_TYPE_LWT_IN: Type = 10; + pub const BPF_PROG_TYPE_LWT_OUT: Type = 11; + pub const BPF_PROG_TYPE_LWT_XMIT: Type = 12; + pub const BPF_PROG_TYPE_SOCK_OPS: Type = 13; + pub const BPF_PROG_TYPE_SK_SKB: Type = 14; + pub const BPF_PROG_TYPE_CGROUP_DEVICE: Type = 15; + pub const BPF_PROG_TYPE_SK_MSG: Type = 16; + pub const BPF_PROG_TYPE_RAW_TRACEPOINT: Type = 17; + pub const BPF_PROG_TYPE_CGROUP_SOCK_ADDR: Type = 18; + pub const BPF_PROG_TYPE_LWT_SEG6LOCAL: Type = 19; + pub const BPF_PROG_TYPE_LIRC_MODE2: Type = 20; + pub const BPF_PROG_TYPE_SK_REUSEPORT: Type = 21; + pub const BPF_PROG_TYPE_FLOW_DISSECTOR: Type = 22; + pub const BPF_PROG_TYPE_CGROUP_SYSCTL: Type = 23; + pub const BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE: Type = 24; + pub const BPF_PROG_TYPE_CGROUP_SOCKOPT: Type = 25; + pub const BPF_PROG_TYPE_TRACING: Type = 26; + pub const BPF_PROG_TYPE_STRUCT_OPS: Type = 27; + pub const BPF_PROG_TYPE_EXT: Type = 28; + pub const BPF_PROG_TYPE_LSM: Type = 29; + pub const BPF_PROG_TYPE_SK_LOOKUP: Type = 30; + pub const BPF_PROG_TYPE_SYSCALL: Type = 31; + pub const BPF_PROG_TYPE_NETFILTER: Type = 32; + pub const __MAX_BPF_PROG_TYPE: Type = 33; +} +pub mod bpf_attach_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_CGROUP_INET_INGRESS: Type = 0; + pub const BPF_CGROUP_INET_EGRESS: Type = 1; + pub const BPF_CGROUP_INET_SOCK_CREATE: Type = 2; + pub const BPF_CGROUP_SOCK_OPS: Type = 3; + pub const BPF_SK_SKB_STREAM_PARSER: Type = 4; + pub const BPF_SK_SKB_STREAM_VERDICT: Type = 5; + pub const BPF_CGROUP_DEVICE: Type = 6; + pub const BPF_SK_MSG_VERDICT: Type = 7; + pub const BPF_CGROUP_INET4_BIND: Type = 8; + pub const BPF_CGROUP_INET6_BIND: Type = 9; + pub const BPF_CGROUP_INET4_CONNECT: Type = 10; + pub const BPF_CGROUP_INET6_CONNECT: Type = 11; + pub const BPF_CGROUP_INET4_POST_BIND: Type = 12; + pub const BPF_CGROUP_INET6_POST_BIND: Type = 13; + pub const BPF_CGROUP_UDP4_SENDMSG: Type = 14; + pub const BPF_CGROUP_UDP6_SENDMSG: Type = 15; + pub const BPF_LIRC_MODE2: Type = 16; + pub const BPF_FLOW_DISSECTOR: Type = 17; + pub const BPF_CGROUP_SYSCTL: Type = 18; + pub const BPF_CGROUP_UDP4_RECVMSG: Type = 19; + pub const BPF_CGROUP_UDP6_RECVMSG: Type = 20; + pub const BPF_CGROUP_GETSOCKOPT: Type = 21; + pub const BPF_CGROUP_SETSOCKOPT: Type = 22; + pub const BPF_TRACE_RAW_TP: Type = 23; + pub const BPF_TRACE_FENTRY: Type = 24; + pub const BPF_TRACE_FEXIT: Type = 25; + pub const BPF_MODIFY_RETURN: Type = 26; + pub const BPF_LSM_MAC: Type = 27; + pub const BPF_TRACE_ITER: Type = 28; + pub const BPF_CGROUP_INET4_GETPEERNAME: Type = 29; + pub const BPF_CGROUP_INET6_GETPEERNAME: Type = 30; + pub const BPF_CGROUP_INET4_GETSOCKNAME: Type = 31; + pub const BPF_CGROUP_INET6_GETSOCKNAME: Type = 32; + pub const BPF_XDP_DEVMAP: Type = 33; + pub const BPF_CGROUP_INET_SOCK_RELEASE: Type = 34; + pub const BPF_XDP_CPUMAP: Type = 35; + pub const BPF_SK_LOOKUP: Type = 36; + pub const BPF_XDP: Type = 37; + pub const BPF_SK_SKB_VERDICT: Type = 38; + pub const BPF_SK_REUSEPORT_SELECT: Type = 39; + pub const BPF_SK_REUSEPORT_SELECT_OR_MIGRATE: Type = 40; + pub const BPF_PERF_EVENT: Type = 41; + pub const BPF_TRACE_KPROBE_MULTI: Type = 42; + pub const BPF_LSM_CGROUP: Type = 43; + pub const BPF_STRUCT_OPS: Type = 44; + pub const BPF_NETFILTER: Type = 45; + pub const BPF_TCX_INGRESS: Type = 46; + pub const BPF_TCX_EGRESS: Type = 47; + pub const BPF_TRACE_UPROBE_MULTI: Type = 48; + pub const BPF_CGROUP_UNIX_CONNECT: Type = 49; + pub const BPF_CGROUP_UNIX_SENDMSG: Type = 50; + pub const BPF_CGROUP_UNIX_RECVMSG: Type = 51; + pub const BPF_CGROUP_UNIX_GETPEERNAME: Type = 52; + pub const BPF_CGROUP_UNIX_GETSOCKNAME: Type = 53; + pub const BPF_NETKIT_PRIMARY: Type = 54; + pub const BPF_NETKIT_PEER: Type = 55; + pub const __MAX_BPF_ATTACH_TYPE: Type = 56; +} +pub mod bpf_link_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_LINK_TYPE_UNSPEC: Type = 0; + pub const BPF_LINK_TYPE_RAW_TRACEPOINT: Type = 1; + pub const BPF_LINK_TYPE_TRACING: Type = 2; + pub const BPF_LINK_TYPE_CGROUP: Type = 3; + pub const BPF_LINK_TYPE_ITER: Type = 4; + pub const BPF_LINK_TYPE_NETNS: Type = 5; + pub const BPF_LINK_TYPE_XDP: Type = 6; + pub const BPF_LINK_TYPE_PERF_EVENT: Type = 7; + pub const BPF_LINK_TYPE_KPROBE_MULTI: Type = 8; + pub const BPF_LINK_TYPE_STRUCT_OPS: Type = 9; + pub const BPF_LINK_TYPE_NETFILTER: Type = 10; + pub const BPF_LINK_TYPE_TCX: Type = 11; + pub const BPF_LINK_TYPE_UPROBE_MULTI: Type = 12; + pub const BPF_LINK_TYPE_NETKIT: Type = 13; + pub const __MAX_BPF_LINK_TYPE: Type = 14; +} +pub mod bpf_perf_event_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_PERF_EVENT_UNSPEC: Type = 0; + pub const BPF_PERF_EVENT_UPROBE: Type = 1; + pub const BPF_PERF_EVENT_URETPROBE: Type = 2; + pub const BPF_PERF_EVENT_KPROBE: Type = 3; + pub const BPF_PERF_EVENT_KRETPROBE: Type = 4; + pub const BPF_PERF_EVENT_TRACEPOINT: Type = 5; + pub const BPF_PERF_EVENT_EVENT: Type = 6; +} +pub const BPF_F_KPROBE_MULTI_RETURN: _bindgen_ty_2 = 1; +pub type _bindgen_ty_2 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_UPROBE_MULTI_RETURN: _bindgen_ty_3 = 1; +pub type _bindgen_ty_3 = ::aya_ebpf_cty::c_uint; +pub mod bpf_addr_space_cast { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_ADDR_SPACE_CAST: Type = 1; +} +pub const BPF_ANY: _bindgen_ty_4 = 0; +pub const BPF_NOEXIST: _bindgen_ty_4 = 1; +pub const BPF_EXIST: _bindgen_ty_4 = 2; +pub const BPF_F_LOCK: _bindgen_ty_4 = 4; +pub type _bindgen_ty_4 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_NO_PREALLOC: _bindgen_ty_5 = 1; +pub const BPF_F_NO_COMMON_LRU: _bindgen_ty_5 = 2; +pub const BPF_F_NUMA_NODE: _bindgen_ty_5 = 4; +pub const BPF_F_RDONLY: _bindgen_ty_5 = 8; +pub const BPF_F_WRONLY: _bindgen_ty_5 = 16; +pub const BPF_F_STACK_BUILD_ID: _bindgen_ty_5 = 32; +pub const BPF_F_ZERO_SEED: _bindgen_ty_5 = 64; +pub const BPF_F_RDONLY_PROG: _bindgen_ty_5 = 128; +pub const BPF_F_WRONLY_PROG: _bindgen_ty_5 = 256; +pub const BPF_F_CLONE: _bindgen_ty_5 = 512; +pub const BPF_F_MMAPABLE: _bindgen_ty_5 = 1024; +pub const BPF_F_PRESERVE_ELEMS: _bindgen_ty_5 = 2048; +pub const BPF_F_INNER_MAP: _bindgen_ty_5 = 4096; +pub const BPF_F_LINK: _bindgen_ty_5 = 8192; +pub const BPF_F_PATH_FD: _bindgen_ty_5 = 16384; +pub const BPF_F_VTYPE_BTF_OBJ_FD: _bindgen_ty_5 = 32768; +pub const BPF_F_TOKEN_FD: _bindgen_ty_5 = 65536; +pub const BPF_F_SEGV_ON_FAULT: _bindgen_ty_5 = 131072; +pub const BPF_F_NO_USER_CONV: _bindgen_ty_5 = 262144; +pub type _bindgen_ty_5 = ::aya_ebpf_cty::c_uint; +pub mod bpf_stats_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_STATS_RUN_TIME: Type = 0; +} +pub mod bpf_stack_build_id_status { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_STACK_BUILD_ID_EMPTY: Type = 0; + pub const BPF_STACK_BUILD_ID_VALID: Type = 1; + pub const BPF_STACK_BUILD_ID_IP: Type = 2; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_stack_build_id { + pub status: __s32, + pub build_id: [::aya_ebpf_cty::c_uchar; 20usize], + pub __bindgen_anon_1: bpf_stack_build_id__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_stack_build_id__bindgen_ty_1 { + pub offset: __u64, + pub ip: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_1, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_2, + pub batch: bpf_attr__bindgen_ty_3, + pub __bindgen_anon_3: bpf_attr__bindgen_ty_4, + pub __bindgen_anon_4: bpf_attr__bindgen_ty_5, + pub __bindgen_anon_5: bpf_attr__bindgen_ty_6, + pub test: bpf_attr__bindgen_ty_7, + pub __bindgen_anon_6: bpf_attr__bindgen_ty_8, + pub info: bpf_attr__bindgen_ty_9, + pub query: bpf_attr__bindgen_ty_10, + pub raw_tracepoint: bpf_attr__bindgen_ty_11, + pub __bindgen_anon_7: bpf_attr__bindgen_ty_12, + pub task_fd_query: bpf_attr__bindgen_ty_13, + pub link_create: bpf_attr__bindgen_ty_14, + pub link_update: bpf_attr__bindgen_ty_15, + pub link_detach: bpf_attr__bindgen_ty_16, + pub enable_stats: bpf_attr__bindgen_ty_17, + pub iter_create: bpf_attr__bindgen_ty_18, + pub prog_bind_map: bpf_attr__bindgen_ty_19, + pub token_create: bpf_attr__bindgen_ty_20, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_1 { + pub map_type: __u32, + pub key_size: __u32, + pub value_size: __u32, + pub max_entries: __u32, + pub map_flags: __u32, + pub inner_map_fd: __u32, + pub numa_node: __u32, + pub map_name: [::aya_ebpf_cty::c_char; 16usize], + pub map_ifindex: __u32, + pub btf_fd: __u32, + pub btf_key_type_id: __u32, + pub btf_value_type_id: __u32, + pub btf_vmlinux_value_type_id: __u32, + pub map_extra: __u64, + pub value_type_btf_obj_fd: __s32, + pub map_token_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_2 { + pub map_fd: __u32, + pub key: __u64, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_2__bindgen_ty_1, + pub flags: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_2__bindgen_ty_1 { + pub value: __u64, + pub next_key: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_3 { + pub in_batch: __u64, + pub out_batch: __u64, + pub keys: __u64, + pub values: __u64, + pub count: __u32, + pub map_fd: __u32, + pub elem_flags: __u64, + pub flags: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_4 { + pub prog_type: __u32, + pub insn_cnt: __u32, + pub insns: __u64, + pub license: __u64, + pub log_level: __u32, + pub log_size: __u32, + pub log_buf: __u64, + pub kern_version: __u32, + pub prog_flags: __u32, + pub prog_name: [::aya_ebpf_cty::c_char; 16usize], + pub prog_ifindex: __u32, + pub expected_attach_type: __u32, + pub prog_btf_fd: __u32, + pub func_info_rec_size: __u32, + pub func_info: __u64, + pub func_info_cnt: __u32, + pub line_info_rec_size: __u32, + pub line_info: __u64, + pub line_info_cnt: __u32, + pub attach_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_4__bindgen_ty_1, + pub core_relo_cnt: __u32, + pub fd_array: __u64, + pub core_relos: __u64, + pub core_relo_rec_size: __u32, + pub log_true_size: __u32, + pub prog_token_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_4__bindgen_ty_1 { + pub attach_prog_fd: __u32, + pub attach_btf_obj_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_5 { + pub pathname: __u64, + pub bpf_fd: __u32, + pub file_flags: __u32, + pub path_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_6 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_6__bindgen_ty_1, + pub attach_bpf_fd: __u32, + pub attach_type: __u32, + pub attach_flags: __u32, + pub replace_bpf_fd: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_6__bindgen_ty_2, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_6__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_6__bindgen_ty_2 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_7 { + pub prog_fd: __u32, + pub retval: __u32, + pub data_size_in: __u32, + pub data_size_out: __u32, + pub data_in: __u64, + pub data_out: __u64, + pub repeat: __u32, + pub duration: __u32, + pub ctx_size_in: __u32, + pub ctx_size_out: __u32, + pub ctx_in: __u64, + pub ctx_out: __u64, + pub flags: __u32, + pub cpu: __u32, + pub batch_size: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_8 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_8__bindgen_ty_1, + pub next_id: __u32, + pub open_flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_8__bindgen_ty_1 { + pub start_id: __u32, + pub prog_id: __u32, + pub map_id: __u32, + pub btf_id: __u32, + pub link_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_9 { + pub bpf_fd: __u32, + pub info_len: __u32, + pub info: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_10 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_10__bindgen_ty_1, + pub attach_type: __u32, + pub query_flags: __u32, + pub attach_flags: __u32, + pub prog_ids: __u64, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_10__bindgen_ty_2, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub prog_attach_flags: __u64, + pub link_ids: __u64, + pub link_attach_flags: __u64, + pub revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_10__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_10__bindgen_ty_2 { + pub prog_cnt: __u32, + pub count: __u32, +} +impl bpf_attr__bindgen_ty_10 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_11 { + pub name: __u64, + pub prog_fd: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_attr__bindgen_ty_11 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_12 { + pub btf: __u64, + pub btf_log_buf: __u64, + pub btf_size: __u32, + pub btf_log_size: __u32, + pub btf_log_level: __u32, + pub btf_log_true_size: __u32, + pub btf_flags: __u32, + pub btf_token_fd: __s32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_13 { + pub pid: __u32, + pub fd: __u32, + pub flags: __u32, + pub buf_len: __u32, + pub buf: __u64, + pub prog_id: __u32, + pub fd_type: __u32, + pub probe_offset: __u64, + pub probe_addr: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_1, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_14__bindgen_ty_2, + pub attach_type: __u32, + pub flags: __u32, + pub __bindgen_anon_3: bpf_attr__bindgen_ty_14__bindgen_ty_3, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_1 { + pub prog_fd: __u32, + pub map_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3 { + pub target_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1, + pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2, + pub kprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3, + pub tracing: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4, + pub netfilter: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5, + pub tcx: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6, + pub uprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7, + pub netkit: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 { + pub iter_info: __u64, + pub iter_info_len: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 { + pub bpf_cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 { + pub flags: __u32, + pub cnt: __u32, + pub syms: __u64, + pub addrs: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 { + pub target_btf_id: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 { + pub pf: __u32, + pub hooknum: __u32, + pub priority: __s32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 { + pub path: __u64, + pub offsets: __u64, + pub ref_ctr_offsets: __u64, + pub cookies: __u64, + pub cnt: __u32, + pub flags: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_15 { + pub link_fd: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_15__bindgen_ty_1, + pub flags: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_15__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_15__bindgen_ty_1 { + pub new_prog_fd: __u32, + pub new_map_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_15__bindgen_ty_2 { + pub old_prog_fd: __u32, + pub old_map_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_16 { + pub link_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_17 { + pub type_: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_18 { + pub link_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_19 { + pub prog_fd: __u32, + pub map_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_20 { + pub flags: __u32, + pub bpffs_fd: __u32, +} +pub mod bpf_func_id { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_FUNC_unspec: Type = 0; + pub const BPF_FUNC_map_lookup_elem: Type = 1; + pub const BPF_FUNC_map_update_elem: Type = 2; + pub const BPF_FUNC_map_delete_elem: Type = 3; + pub const BPF_FUNC_probe_read: Type = 4; + pub const BPF_FUNC_ktime_get_ns: Type = 5; + pub const BPF_FUNC_trace_printk: Type = 6; + pub const BPF_FUNC_get_prandom_u32: Type = 7; + pub const BPF_FUNC_get_smp_processor_id: Type = 8; + pub const BPF_FUNC_skb_store_bytes: Type = 9; + pub const BPF_FUNC_l3_csum_replace: Type = 10; + pub const BPF_FUNC_l4_csum_replace: Type = 11; + pub const BPF_FUNC_tail_call: Type = 12; + pub const BPF_FUNC_clone_redirect: Type = 13; + pub const BPF_FUNC_get_current_pid_tgid: Type = 14; + pub const BPF_FUNC_get_current_uid_gid: Type = 15; + pub const BPF_FUNC_get_current_comm: Type = 16; + pub const BPF_FUNC_get_cgroup_classid: Type = 17; + pub const BPF_FUNC_skb_vlan_push: Type = 18; + pub const BPF_FUNC_skb_vlan_pop: Type = 19; + pub const BPF_FUNC_skb_get_tunnel_key: Type = 20; + pub const BPF_FUNC_skb_set_tunnel_key: Type = 21; + pub const BPF_FUNC_perf_event_read: Type = 22; + pub const BPF_FUNC_redirect: Type = 23; + pub const BPF_FUNC_get_route_realm: Type = 24; + pub const BPF_FUNC_perf_event_output: Type = 25; + pub const BPF_FUNC_skb_load_bytes: Type = 26; + pub const BPF_FUNC_get_stackid: Type = 27; + pub const BPF_FUNC_csum_diff: Type = 28; + pub const BPF_FUNC_skb_get_tunnel_opt: Type = 29; + pub const BPF_FUNC_skb_set_tunnel_opt: Type = 30; + pub const BPF_FUNC_skb_change_proto: Type = 31; + pub const BPF_FUNC_skb_change_type: Type = 32; + pub const BPF_FUNC_skb_under_cgroup: Type = 33; + pub const BPF_FUNC_get_hash_recalc: Type = 34; + pub const BPF_FUNC_get_current_task: Type = 35; + pub const BPF_FUNC_probe_write_user: Type = 36; + pub const BPF_FUNC_current_task_under_cgroup: Type = 37; + pub const BPF_FUNC_skb_change_tail: Type = 38; + pub const BPF_FUNC_skb_pull_data: Type = 39; + pub const BPF_FUNC_csum_update: Type = 40; + pub const BPF_FUNC_set_hash_invalid: Type = 41; + pub const BPF_FUNC_get_numa_node_id: Type = 42; + pub const BPF_FUNC_skb_change_head: Type = 43; + pub const BPF_FUNC_xdp_adjust_head: Type = 44; + pub const BPF_FUNC_probe_read_str: Type = 45; + pub const BPF_FUNC_get_socket_cookie: Type = 46; + pub const BPF_FUNC_get_socket_uid: Type = 47; + pub const BPF_FUNC_set_hash: Type = 48; + pub const BPF_FUNC_setsockopt: Type = 49; + pub const BPF_FUNC_skb_adjust_room: Type = 50; + pub const BPF_FUNC_redirect_map: Type = 51; + pub const BPF_FUNC_sk_redirect_map: Type = 52; + pub const BPF_FUNC_sock_map_update: Type = 53; + pub const BPF_FUNC_xdp_adjust_meta: Type = 54; + pub const BPF_FUNC_perf_event_read_value: Type = 55; + pub const BPF_FUNC_perf_prog_read_value: Type = 56; + pub const BPF_FUNC_getsockopt: Type = 57; + pub const BPF_FUNC_override_return: Type = 58; + pub const BPF_FUNC_sock_ops_cb_flags_set: Type = 59; + pub const BPF_FUNC_msg_redirect_map: Type = 60; + pub const BPF_FUNC_msg_apply_bytes: Type = 61; + pub const BPF_FUNC_msg_cork_bytes: Type = 62; + pub const BPF_FUNC_msg_pull_data: Type = 63; + pub const BPF_FUNC_bind: Type = 64; + pub const BPF_FUNC_xdp_adjust_tail: Type = 65; + pub const BPF_FUNC_skb_get_xfrm_state: Type = 66; + pub const BPF_FUNC_get_stack: Type = 67; + pub const BPF_FUNC_skb_load_bytes_relative: Type = 68; + pub const BPF_FUNC_fib_lookup: Type = 69; + pub const BPF_FUNC_sock_hash_update: Type = 70; + pub const BPF_FUNC_msg_redirect_hash: Type = 71; + pub const BPF_FUNC_sk_redirect_hash: Type = 72; + pub const BPF_FUNC_lwt_push_encap: Type = 73; + pub const BPF_FUNC_lwt_seg6_store_bytes: Type = 74; + pub const BPF_FUNC_lwt_seg6_adjust_srh: Type = 75; + pub const BPF_FUNC_lwt_seg6_action: Type = 76; + pub const BPF_FUNC_rc_repeat: Type = 77; + pub const BPF_FUNC_rc_keydown: Type = 78; + pub const BPF_FUNC_skb_cgroup_id: Type = 79; + pub const BPF_FUNC_get_current_cgroup_id: Type = 80; + pub const BPF_FUNC_get_local_storage: Type = 81; + pub const BPF_FUNC_sk_select_reuseport: Type = 82; + pub const BPF_FUNC_skb_ancestor_cgroup_id: Type = 83; + pub const BPF_FUNC_sk_lookup_tcp: Type = 84; + pub const BPF_FUNC_sk_lookup_udp: Type = 85; + pub const BPF_FUNC_sk_release: Type = 86; + pub const BPF_FUNC_map_push_elem: Type = 87; + pub const BPF_FUNC_map_pop_elem: Type = 88; + pub const BPF_FUNC_map_peek_elem: Type = 89; + pub const BPF_FUNC_msg_push_data: Type = 90; + pub const BPF_FUNC_msg_pop_data: Type = 91; + pub const BPF_FUNC_rc_pointer_rel: Type = 92; + pub const BPF_FUNC_spin_lock: Type = 93; + pub const BPF_FUNC_spin_unlock: Type = 94; + pub const BPF_FUNC_sk_fullsock: Type = 95; + pub const BPF_FUNC_tcp_sock: Type = 96; + pub const BPF_FUNC_skb_ecn_set_ce: Type = 97; + pub const BPF_FUNC_get_listener_sock: Type = 98; + pub const BPF_FUNC_skc_lookup_tcp: Type = 99; + pub const BPF_FUNC_tcp_check_syncookie: Type = 100; + pub const BPF_FUNC_sysctl_get_name: Type = 101; + pub const BPF_FUNC_sysctl_get_current_value: Type = 102; + pub const BPF_FUNC_sysctl_get_new_value: Type = 103; + pub const BPF_FUNC_sysctl_set_new_value: Type = 104; + pub const BPF_FUNC_strtol: Type = 105; + pub const BPF_FUNC_strtoul: Type = 106; + pub const BPF_FUNC_sk_storage_get: Type = 107; + pub const BPF_FUNC_sk_storage_delete: Type = 108; + pub const BPF_FUNC_send_signal: Type = 109; + pub const BPF_FUNC_tcp_gen_syncookie: Type = 110; + pub const BPF_FUNC_skb_output: Type = 111; + pub const BPF_FUNC_probe_read_user: Type = 112; + pub const BPF_FUNC_probe_read_kernel: Type = 113; + pub const BPF_FUNC_probe_read_user_str: Type = 114; + pub const BPF_FUNC_probe_read_kernel_str: Type = 115; + pub const BPF_FUNC_tcp_send_ack: Type = 116; + pub const BPF_FUNC_send_signal_thread: Type = 117; + pub const BPF_FUNC_jiffies64: Type = 118; + pub const BPF_FUNC_read_branch_records: Type = 119; + pub const BPF_FUNC_get_ns_current_pid_tgid: Type = 120; + pub const BPF_FUNC_xdp_output: Type = 121; + pub const BPF_FUNC_get_netns_cookie: Type = 122; + pub const BPF_FUNC_get_current_ancestor_cgroup_id: Type = 123; + pub const BPF_FUNC_sk_assign: Type = 124; + pub const BPF_FUNC_ktime_get_boot_ns: Type = 125; + pub const BPF_FUNC_seq_printf: Type = 126; + pub const BPF_FUNC_seq_write: Type = 127; + pub const BPF_FUNC_sk_cgroup_id: Type = 128; + pub const BPF_FUNC_sk_ancestor_cgroup_id: Type = 129; + pub const BPF_FUNC_ringbuf_output: Type = 130; + pub const BPF_FUNC_ringbuf_reserve: Type = 131; + pub const BPF_FUNC_ringbuf_submit: Type = 132; + pub const BPF_FUNC_ringbuf_discard: Type = 133; + pub const BPF_FUNC_ringbuf_query: Type = 134; + pub const BPF_FUNC_csum_level: Type = 135; + pub const BPF_FUNC_skc_to_tcp6_sock: Type = 136; + pub const BPF_FUNC_skc_to_tcp_sock: Type = 137; + pub const BPF_FUNC_skc_to_tcp_timewait_sock: Type = 138; + pub const BPF_FUNC_skc_to_tcp_request_sock: Type = 139; + pub const BPF_FUNC_skc_to_udp6_sock: Type = 140; + pub const BPF_FUNC_get_task_stack: Type = 141; + pub const BPF_FUNC_load_hdr_opt: Type = 142; + pub const BPF_FUNC_store_hdr_opt: Type = 143; + pub const BPF_FUNC_reserve_hdr_opt: Type = 144; + pub const BPF_FUNC_inode_storage_get: Type = 145; + pub const BPF_FUNC_inode_storage_delete: Type = 146; + pub const BPF_FUNC_d_path: Type = 147; + pub const BPF_FUNC_copy_from_user: Type = 148; + pub const BPF_FUNC_snprintf_btf: Type = 149; + pub const BPF_FUNC_seq_printf_btf: Type = 150; + pub const BPF_FUNC_skb_cgroup_classid: Type = 151; + pub const BPF_FUNC_redirect_neigh: Type = 152; + pub const BPF_FUNC_per_cpu_ptr: Type = 153; + pub const BPF_FUNC_this_cpu_ptr: Type = 154; + pub const BPF_FUNC_redirect_peer: Type = 155; + pub const BPF_FUNC_task_storage_get: Type = 156; + pub const BPF_FUNC_task_storage_delete: Type = 157; + pub const BPF_FUNC_get_current_task_btf: Type = 158; + pub const BPF_FUNC_bprm_opts_set: Type = 159; + pub const BPF_FUNC_ktime_get_coarse_ns: Type = 160; + pub const BPF_FUNC_ima_inode_hash: Type = 161; + pub const BPF_FUNC_sock_from_file: Type = 162; + pub const BPF_FUNC_check_mtu: Type = 163; + pub const BPF_FUNC_for_each_map_elem: Type = 164; + pub const BPF_FUNC_snprintf: Type = 165; + pub const BPF_FUNC_sys_bpf: Type = 166; + pub const BPF_FUNC_btf_find_by_name_kind: Type = 167; + pub const BPF_FUNC_sys_close: Type = 168; + pub const BPF_FUNC_timer_init: Type = 169; + pub const BPF_FUNC_timer_set_callback: Type = 170; + pub const BPF_FUNC_timer_start: Type = 171; + pub const BPF_FUNC_timer_cancel: Type = 172; + pub const BPF_FUNC_get_func_ip: Type = 173; + pub const BPF_FUNC_get_attach_cookie: Type = 174; + pub const BPF_FUNC_task_pt_regs: Type = 175; + pub const BPF_FUNC_get_branch_snapshot: Type = 176; + pub const BPF_FUNC_trace_vprintk: Type = 177; + pub const BPF_FUNC_skc_to_unix_sock: Type = 178; + pub const BPF_FUNC_kallsyms_lookup_name: Type = 179; + pub const BPF_FUNC_find_vma: Type = 180; + pub const BPF_FUNC_loop: Type = 181; + pub const BPF_FUNC_strncmp: Type = 182; + pub const BPF_FUNC_get_func_arg: Type = 183; + pub const BPF_FUNC_get_func_ret: Type = 184; + pub const BPF_FUNC_get_func_arg_cnt: Type = 185; + pub const BPF_FUNC_get_retval: Type = 186; + pub const BPF_FUNC_set_retval: Type = 187; + pub const BPF_FUNC_xdp_get_buff_len: Type = 188; + pub const BPF_FUNC_xdp_load_bytes: Type = 189; + pub const BPF_FUNC_xdp_store_bytes: Type = 190; + pub const BPF_FUNC_copy_from_user_task: Type = 191; + pub const BPF_FUNC_skb_set_tstamp: Type = 192; + pub const BPF_FUNC_ima_file_hash: Type = 193; + pub const BPF_FUNC_kptr_xchg: Type = 194; + pub const BPF_FUNC_map_lookup_percpu_elem: Type = 195; + pub const BPF_FUNC_skc_to_mptcp_sock: Type = 196; + pub const BPF_FUNC_dynptr_from_mem: Type = 197; + pub const BPF_FUNC_ringbuf_reserve_dynptr: Type = 198; + pub const BPF_FUNC_ringbuf_submit_dynptr: Type = 199; + pub const BPF_FUNC_ringbuf_discard_dynptr: Type = 200; + pub const BPF_FUNC_dynptr_read: Type = 201; + pub const BPF_FUNC_dynptr_write: Type = 202; + pub const BPF_FUNC_dynptr_data: Type = 203; + pub const BPF_FUNC_tcp_raw_gen_syncookie_ipv4: Type = 204; + pub const BPF_FUNC_tcp_raw_gen_syncookie_ipv6: Type = 205; + pub const BPF_FUNC_tcp_raw_check_syncookie_ipv4: Type = 206; + pub const BPF_FUNC_tcp_raw_check_syncookie_ipv6: Type = 207; + pub const BPF_FUNC_ktime_get_tai_ns: Type = 208; + pub const BPF_FUNC_user_ringbuf_drain: Type = 209; + pub const BPF_FUNC_cgrp_storage_get: Type = 210; + pub const BPF_FUNC_cgrp_storage_delete: Type = 211; + pub const __BPF_FUNC_MAX_ID: Type = 212; +} +pub const BPF_F_RECOMPUTE_CSUM: _bindgen_ty_6 = 1; +pub const BPF_F_INVALIDATE_HASH: _bindgen_ty_6 = 2; +pub type _bindgen_ty_6 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_HDR_FIELD_MASK: _bindgen_ty_7 = 15; +pub type _bindgen_ty_7 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_PSEUDO_HDR: _bindgen_ty_8 = 16; +pub const BPF_F_MARK_MANGLED_0: _bindgen_ty_8 = 32; +pub const BPF_F_MARK_ENFORCE: _bindgen_ty_8 = 64; +pub type _bindgen_ty_8 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_INGRESS: _bindgen_ty_9 = 1; +pub type _bindgen_ty_9 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_TUNINFO_IPV6: _bindgen_ty_10 = 1; +pub type _bindgen_ty_10 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_SKIP_FIELD_MASK: _bindgen_ty_11 = 255; +pub const BPF_F_USER_STACK: _bindgen_ty_11 = 256; +pub const BPF_F_FAST_STACK_CMP: _bindgen_ty_11 = 512; +pub const BPF_F_REUSE_STACKID: _bindgen_ty_11 = 1024; +pub const BPF_F_USER_BUILD_ID: _bindgen_ty_11 = 2048; +pub type _bindgen_ty_11 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_ZERO_CSUM_TX: _bindgen_ty_12 = 2; +pub const BPF_F_DONT_FRAGMENT: _bindgen_ty_12 = 4; +pub const BPF_F_SEQ_NUMBER: _bindgen_ty_12 = 8; +pub const BPF_F_NO_TUNNEL_KEY: _bindgen_ty_12 = 16; +pub type _bindgen_ty_12 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_TUNINFO_FLAGS: _bindgen_ty_13 = 16; +pub type _bindgen_ty_13 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_INDEX_MASK: _bindgen_ty_14 = 4294967295; +pub const BPF_F_CURRENT_CPU: _bindgen_ty_14 = 4294967295; +pub const BPF_F_CTXLEN_MASK: _bindgen_ty_14 = 4503595332403200; +pub type _bindgen_ty_14 = ::aya_ebpf_cty::c_ulonglong; +pub const BPF_F_CURRENT_NETNS: _bindgen_ty_15 = -1; +pub type _bindgen_ty_15 = ::aya_ebpf_cty::c_int; +pub const BPF_CSUM_LEVEL_QUERY: _bindgen_ty_16 = 0; +pub const BPF_CSUM_LEVEL_INC: _bindgen_ty_16 = 1; +pub const BPF_CSUM_LEVEL_DEC: _bindgen_ty_16 = 2; +pub const BPF_CSUM_LEVEL_RESET: _bindgen_ty_16 = 3; +pub type _bindgen_ty_16 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_ADJ_ROOM_FIXED_GSO: _bindgen_ty_17 = 1; +pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: _bindgen_ty_17 = 2; +pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: _bindgen_ty_17 = 4; +pub const BPF_F_ADJ_ROOM_ENCAP_L4_GRE: _bindgen_ty_17 = 8; +pub const BPF_F_ADJ_ROOM_ENCAP_L4_UDP: _bindgen_ty_17 = 16; +pub const BPF_F_ADJ_ROOM_NO_CSUM_RESET: _bindgen_ty_17 = 32; +pub const BPF_F_ADJ_ROOM_ENCAP_L2_ETH: _bindgen_ty_17 = 64; +pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV4: _bindgen_ty_17 = 128; +pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV6: _bindgen_ty_17 = 256; +pub type _bindgen_ty_17 = ::aya_ebpf_cty::c_uint; +pub const BPF_ADJ_ROOM_ENCAP_L2_MASK: _bindgen_ty_18 = 255; +pub const BPF_ADJ_ROOM_ENCAP_L2_SHIFT: _bindgen_ty_18 = 56; +pub type _bindgen_ty_18 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_SYSCTL_BASE_NAME: _bindgen_ty_19 = 1; +pub type _bindgen_ty_19 = ::aya_ebpf_cty::c_uint; +pub const BPF_LOCAL_STORAGE_GET_F_CREATE: _bindgen_ty_20 = 1; +pub const BPF_SK_STORAGE_GET_F_CREATE: _bindgen_ty_20 = 1; +pub type _bindgen_ty_20 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_GET_BRANCH_RECORDS_SIZE: _bindgen_ty_21 = 1; +pub type _bindgen_ty_21 = ::aya_ebpf_cty::c_uint; +pub const BPF_RB_NO_WAKEUP: _bindgen_ty_22 = 1; +pub const BPF_RB_FORCE_WAKEUP: _bindgen_ty_22 = 2; +pub type _bindgen_ty_22 = ::aya_ebpf_cty::c_uint; +pub const BPF_RB_AVAIL_DATA: _bindgen_ty_23 = 0; +pub const BPF_RB_RING_SIZE: _bindgen_ty_23 = 1; +pub const BPF_RB_CONS_POS: _bindgen_ty_23 = 2; +pub const BPF_RB_PROD_POS: _bindgen_ty_23 = 3; +pub type _bindgen_ty_23 = ::aya_ebpf_cty::c_uint; +pub const BPF_RINGBUF_BUSY_BIT: _bindgen_ty_24 = 2147483648; +pub const BPF_RINGBUF_DISCARD_BIT: _bindgen_ty_24 = 1073741824; +pub const BPF_RINGBUF_HDR_SZ: _bindgen_ty_24 = 8; +pub type _bindgen_ty_24 = ::aya_ebpf_cty::c_uint; +pub const BPF_SK_LOOKUP_F_REPLACE: _bindgen_ty_25 = 1; +pub const BPF_SK_LOOKUP_F_NO_REUSEPORT: _bindgen_ty_25 = 2; +pub type _bindgen_ty_25 = ::aya_ebpf_cty::c_uint; +pub mod bpf_adj_room_mode { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_ADJ_ROOM_NET: Type = 0; + pub const BPF_ADJ_ROOM_MAC: Type = 1; +} +pub mod bpf_hdr_start_off { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_HDR_START_MAC: Type = 0; + pub const BPF_HDR_START_NET: Type = 1; +} +pub mod bpf_lwt_encap_mode { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_LWT_ENCAP_SEG6: Type = 0; + pub const BPF_LWT_ENCAP_SEG6_INLINE: Type = 1; + pub const BPF_LWT_ENCAP_IP: Type = 2; +} +pub const BPF_F_BPRM_SECUREEXEC: _bindgen_ty_26 = 1; +pub type _bindgen_ty_26 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_BROADCAST: _bindgen_ty_27 = 8; +pub const BPF_F_EXCLUDE_INGRESS: _bindgen_ty_27 = 16; +pub type _bindgen_ty_27 = ::aya_ebpf_cty::c_uint; +pub mod _bindgen_ty_28 { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_SKB_TSTAMP_UNSPEC: Type = 0; + pub const BPF_SKB_TSTAMP_DELIVERY_MONO: Type = 1; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct __sk_buff { + pub len: __u32, + pub pkt_type: __u32, + pub mark: __u32, + pub queue_mapping: __u32, + pub protocol: __u32, + pub vlan_present: __u32, + pub vlan_tci: __u32, + pub vlan_proto: __u32, + pub priority: __u32, + pub ingress_ifindex: __u32, + pub ifindex: __u32, + pub tc_index: __u32, + pub cb: [__u32; 5usize], + pub hash: __u32, + pub tc_classid: __u32, + pub data: __u32, + pub data_end: __u32, + pub napi_id: __u32, + pub family: __u32, + pub remote_ip4: __u32, + pub local_ip4: __u32, + pub remote_ip6: [__u32; 4usize], + pub local_ip6: [__u32; 4usize], + pub remote_port: __u32, + pub local_port: __u32, + pub data_meta: __u32, + pub __bindgen_anon_1: __sk_buff__bindgen_ty_1, + pub tstamp: __u64, + pub wire_len: __u32, + pub gso_segs: __u32, + pub __bindgen_anon_2: __sk_buff__bindgen_ty_2, + pub gso_size: __u32, + pub tstamp_type: __u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub hwtstamp: __u64, +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union __sk_buff__bindgen_ty_1 { + pub flow_keys: *mut bpf_flow_keys, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl __sk_buff__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union __sk_buff__bindgen_ty_2 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl __sk_buff__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +impl __sk_buff { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_tunnel_key { + pub tunnel_id: __u32, + pub __bindgen_anon_1: bpf_tunnel_key__bindgen_ty_1, + pub tunnel_tos: __u8, + pub tunnel_ttl: __u8, + pub __bindgen_anon_2: bpf_tunnel_key__bindgen_ty_2, + pub tunnel_label: __u32, + pub __bindgen_anon_3: bpf_tunnel_key__bindgen_ty_3, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_tunnel_key__bindgen_ty_1 { + pub remote_ipv4: __u32, + pub remote_ipv6: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_tunnel_key__bindgen_ty_2 { + pub tunnel_ext: __u16, + pub tunnel_flags: __be16, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_tunnel_key__bindgen_ty_3 { + pub local_ipv4: __u32, + pub local_ipv6: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_xfrm_state { + pub reqid: __u32, + pub spi: __u32, + pub family: __u16, + pub ext: __u16, + pub __bindgen_anon_1: bpf_xfrm_state__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_xfrm_state__bindgen_ty_1 { + pub remote_ipv4: __u32, + pub remote_ipv6: [__u32; 4usize], +} +pub mod bpf_ret_code { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_OK: Type = 0; + pub const BPF_DROP: Type = 2; + pub const BPF_REDIRECT: Type = 7; + pub const BPF_LWT_REROUTE: Type = 128; + pub const BPF_FLOW_DISSECTOR_CONTINUE: Type = 129; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_sock { + pub bound_dev_if: __u32, + pub family: __u32, + pub type_: __u32, + pub protocol: __u32, + pub mark: __u32, + pub priority: __u32, + pub src_ip4: __u32, + pub src_ip6: [__u32; 4usize], + pub src_port: __u32, + pub dst_port: __be16, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, + pub dst_ip4: __u32, + pub dst_ip6: [__u32; 4usize], + pub state: __u32, + pub rx_queue_mapping: __s32, +} +impl bpf_sock { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_tcp_sock { + pub snd_cwnd: __u32, + pub srtt_us: __u32, + pub rtt_min: __u32, + pub snd_ssthresh: __u32, + pub rcv_nxt: __u32, + pub snd_nxt: __u32, + pub snd_una: __u32, + pub mss_cache: __u32, + pub ecn_flags: __u32, + pub rate_delivered: __u32, + pub rate_interval_us: __u32, + pub packets_out: __u32, + pub retrans_out: __u32, + pub total_retrans: __u32, + pub segs_in: __u32, + pub data_segs_in: __u32, + pub segs_out: __u32, + pub data_segs_out: __u32, + pub lost_out: __u32, + pub sacked_out: __u32, + pub bytes_received: __u64, + pub bytes_acked: __u64, + pub dsack_dups: __u32, + pub delivered: __u32, + pub delivered_ce: __u32, + pub icsk_retransmits: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sock_tuple { + pub __bindgen_anon_1: bpf_sock_tuple__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sock_tuple__bindgen_ty_1 { + pub ipv4: bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1, + pub ipv6: bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 { + pub saddr: __be32, + pub daddr: __be32, + pub sport: __be16, + pub dport: __be16, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 { + pub saddr: [__be32; 4usize], + pub daddr: [__be32; 4usize], + pub sport: __be16, + pub dport: __be16, +} +pub mod tcx_action_base { + pub type Type = ::aya_ebpf_cty::c_int; + pub const TCX_NEXT: Type = -1; + pub const TCX_PASS: Type = 0; + pub const TCX_DROP: Type = 2; + pub const TCX_REDIRECT: Type = 7; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_xdp_sock { + pub queue_id: __u32, +} +pub mod xdp_action { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const XDP_ABORTED: Type = 0; + pub const XDP_DROP: Type = 1; + pub const XDP_PASS: Type = 2; + pub const XDP_TX: Type = 3; + pub const XDP_REDIRECT: Type = 4; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct xdp_md { + pub data: __u32, + pub data_end: __u32, + pub data_meta: __u32, + pub ingress_ifindex: __u32, + pub rx_queue_index: __u32, + pub egress_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_devmap_val { + pub ifindex: __u32, + pub bpf_prog: bpf_devmap_val__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_devmap_val__bindgen_ty_1 { + pub fd: ::aya_ebpf_cty::c_int, + pub id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_cpumap_val { + pub qsize: __u32, + pub bpf_prog: bpf_cpumap_val__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_cpumap_val__bindgen_ty_1 { + pub fd: ::aya_ebpf_cty::c_int, + pub id: __u32, +} +pub mod sk_action { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const SK_DROP: Type = 0; + pub const SK_PASS: Type = 1; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sk_msg_md { + pub __bindgen_anon_1: sk_msg_md__bindgen_ty_1, + pub __bindgen_anon_2: sk_msg_md__bindgen_ty_2, + pub family: __u32, + pub remote_ip4: __u32, + pub local_ip4: __u32, + pub remote_ip6: [__u32; 4usize], + pub local_ip6: [__u32; 4usize], + pub remote_port: __u32, + pub local_port: __u32, + pub size: __u32, + pub __bindgen_anon_3: sk_msg_md__bindgen_ty_3, +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union sk_msg_md__bindgen_ty_1 { + pub data: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_msg_md__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union sk_msg_md__bindgen_ty_2 { + pub data_end: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_msg_md__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union sk_msg_md__bindgen_ty_3 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_msg_md__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sk_reuseport_md { + pub __bindgen_anon_1: sk_reuseport_md__bindgen_ty_1, + pub __bindgen_anon_2: sk_reuseport_md__bindgen_ty_2, + pub len: __u32, + pub eth_protocol: __u32, + pub ip_protocol: __u32, + pub bind_inany: __u32, + pub hash: __u32, + pub __bindgen_anon_3: sk_reuseport_md__bindgen_ty_3, + pub __bindgen_anon_4: sk_reuseport_md__bindgen_ty_4, +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union sk_reuseport_md__bindgen_ty_1 { + pub data: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_reuseport_md__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union sk_reuseport_md__bindgen_ty_2 { + pub data_end: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_reuseport_md__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union sk_reuseport_md__bindgen_ty_3 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_reuseport_md__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union sk_reuseport_md__bindgen_ty_4 { + pub migrating_sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_reuseport_md__bindgen_ty_4 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_prog_info { + pub type_: __u32, + pub id: __u32, + pub tag: [__u8; 8usize], + pub jited_prog_len: __u32, + pub xlated_prog_len: __u32, + pub jited_prog_insns: __u64, + pub xlated_prog_insns: __u64, + pub load_time: __u64, + pub created_by_uid: __u32, + pub nr_map_ids: __u32, + pub map_ids: __u64, + pub name: [::aya_ebpf_cty::c_char; 16usize], + pub ifindex: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub netns_dev: __u64, + pub netns_ino: __u64, + pub nr_jited_ksyms: __u32, + pub nr_jited_func_lens: __u32, + pub jited_ksyms: __u64, + pub jited_func_lens: __u64, + pub btf_id: __u32, + pub func_info_rec_size: __u32, + pub func_info: __u64, + pub nr_func_info: __u32, + pub nr_line_info: __u32, + pub line_info: __u64, + pub jited_line_info: __u64, + pub nr_jited_line_info: __u32, + pub line_info_rec_size: __u32, + pub jited_line_info_rec_size: __u32, + pub nr_prog_tags: __u32, + pub prog_tags: __u64, + pub run_time_ns: __u64, + pub run_cnt: __u64, + pub recursion_misses: __u64, + pub verified_insns: __u32, + pub attach_btf_obj_id: __u32, + pub attach_btf_id: __u32, +} +impl bpf_prog_info { + #[inline] + pub fn gpl_compatible(&self) -> __u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_gpl_compatible(&mut self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let gpl_compatible: u32 = unsafe { ::core::mem::transmute(gpl_compatible) }; + gpl_compatible as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_map_info { + pub type_: __u32, + pub id: __u32, + pub key_size: __u32, + pub value_size: __u32, + pub max_entries: __u32, + pub map_flags: __u32, + pub name: [::aya_ebpf_cty::c_char; 16usize], + pub ifindex: __u32, + pub btf_vmlinux_value_type_id: __u32, + pub netns_dev: __u64, + pub netns_ino: __u64, + pub btf_id: __u32, + pub btf_key_type_id: __u32, + pub btf_value_type_id: __u32, + pub btf_vmlinux_id: __u32, + pub map_extra: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_btf_info { + pub btf: __u64, + pub btf_size: __u32, + pub id: __u32, + pub name: __u64, + pub name_len: __u32, + pub kernel_btf: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info { + pub type_: __u32, + pub id: __u32, + pub prog_id: __u32, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1 { + pub raw_tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_1, + pub tracing: bpf_link_info__bindgen_ty_1__bindgen_ty_2, + pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_3, + pub iter: bpf_link_info__bindgen_ty_1__bindgen_ty_4, + pub netns: bpf_link_info__bindgen_ty_1__bindgen_ty_5, + pub xdp: bpf_link_info__bindgen_ty_1__bindgen_ty_6, + pub struct_ops: bpf_link_info__bindgen_ty_1__bindgen_ty_7, + pub netfilter: bpf_link_info__bindgen_ty_1__bindgen_ty_8, + pub kprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_9, + pub uprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_10, + pub perf_event: bpf_link_info__bindgen_ty_1__bindgen_ty_11, + pub tcx: bpf_link_info__bindgen_ty_1__bindgen_ty_12, + pub netkit: bpf_link_info__bindgen_ty_1__bindgen_ty_13, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_1 { + pub tp_name: __u64, + pub tp_name_len: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_2 { + pub attach_type: __u32, + pub target_obj_id: __u32, + pub target_btf_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_3 { + pub cgroup_id: __u64, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4 { + pub target_name: __u64, + pub target_name_len: __u32, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, + pub __bindgen_anon_2: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 { + pub map: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 { + pub map_id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 { + pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1, + pub task: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 { + pub cgroup_id: __u64, + pub order: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 { + pub tid: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_5 { + pub netns_ino: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_6 { + pub ifindex: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_7 { + pub map_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_8 { + pub pf: __u32, + pub hooknum: __u32, + pub priority: __s32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_9 { + pub addrs: __u64, + pub count: __u32, + pub flags: __u32, + pub missed: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_10 { + pub path: __u64, + pub offsets: __u64, + pub ref_ctr_offsets: __u64, + pub cookies: __u64, + pub path_size: __u32, + pub count: __u32, + pub flags: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11 { + pub type_: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 { + pub uprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1, + pub kprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2, + pub tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3, + pub event: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 { + pub file_name: __u64, + pub name_len: __u32, + pub offset: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 { + pub func_name: __u64, + pub name_len: __u32, + pub offset: __u32, + pub addr: __u64, + pub missed: __u64, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 { + pub tp_name: __u64, + pub name_len: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 { + pub config: __u64, + pub type_: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_12 { + pub ifindex: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_13 { + pub ifindex: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sock_addr { + pub user_family: __u32, + pub user_ip4: __u32, + pub user_ip6: [__u32; 4usize], + pub user_port: __u32, + pub family: __u32, + pub type_: __u32, + pub protocol: __u32, + pub msg_src_ip4: __u32, + pub msg_src_ip6: [__u32; 4usize], + pub __bindgen_anon_1: bpf_sock_addr__bindgen_ty_1, +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union bpf_sock_addr__bindgen_ty_1 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sock_addr__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sock_ops { + pub op: __u32, + pub __bindgen_anon_1: bpf_sock_ops__bindgen_ty_1, + pub family: __u32, + pub remote_ip4: __u32, + pub local_ip4: __u32, + pub remote_ip6: [__u32; 4usize], + pub local_ip6: [__u32; 4usize], + pub remote_port: __u32, + pub local_port: __u32, + pub is_fullsock: __u32, + pub snd_cwnd: __u32, + pub srtt_us: __u32, + pub bpf_sock_ops_cb_flags: __u32, + pub state: __u32, + pub rtt_min: __u32, + pub snd_ssthresh: __u32, + pub rcv_nxt: __u32, + pub snd_nxt: __u32, + pub snd_una: __u32, + pub mss_cache: __u32, + pub ecn_flags: __u32, + pub rate_delivered: __u32, + pub rate_interval_us: __u32, + pub packets_out: __u32, + pub retrans_out: __u32, + pub total_retrans: __u32, + pub segs_in: __u32, + pub data_segs_in: __u32, + pub segs_out: __u32, + pub data_segs_out: __u32, + pub lost_out: __u32, + pub sacked_out: __u32, + pub sk_txhash: __u32, + pub bytes_received: __u64, + pub bytes_acked: __u64, + pub __bindgen_anon_2: bpf_sock_ops__bindgen_ty_2, + pub __bindgen_anon_3: bpf_sock_ops__bindgen_ty_3, + pub __bindgen_anon_4: bpf_sock_ops__bindgen_ty_4, + pub skb_len: __u32, + pub skb_tcp_flags: __u32, + pub skb_hwtstamp: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sock_ops__bindgen_ty_1 { + pub args: [__u32; 4usize], + pub reply: __u32, + pub replylong: [__u32; 4usize], +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union bpf_sock_ops__bindgen_ty_2 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sock_ops__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union bpf_sock_ops__bindgen_ty_3 { + pub skb_data: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sock_ops__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union bpf_sock_ops__bindgen_ty_4 { + pub skb_data_end: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sock_ops__bindgen_ty_4 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +pub const BPF_SOCK_OPS_RTO_CB_FLAG: _bindgen_ty_29 = 1; +pub const BPF_SOCK_OPS_RETRANS_CB_FLAG: _bindgen_ty_29 = 2; +pub const BPF_SOCK_OPS_STATE_CB_FLAG: _bindgen_ty_29 = 4; +pub const BPF_SOCK_OPS_RTT_CB_FLAG: _bindgen_ty_29 = 8; +pub const BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: _bindgen_ty_29 = 16; +pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: _bindgen_ty_29 = 32; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: _bindgen_ty_29 = 64; +pub const BPF_SOCK_OPS_ALL_CB_FLAGS: _bindgen_ty_29 = 127; +pub type _bindgen_ty_29 = ::aya_ebpf_cty::c_uint; +pub const BPF_SOCK_OPS_VOID: _bindgen_ty_30 = 0; +pub const BPF_SOCK_OPS_TIMEOUT_INIT: _bindgen_ty_30 = 1; +pub const BPF_SOCK_OPS_RWND_INIT: _bindgen_ty_30 = 2; +pub const BPF_SOCK_OPS_TCP_CONNECT_CB: _bindgen_ty_30 = 3; +pub const BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB: _bindgen_ty_30 = 4; +pub const BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: _bindgen_ty_30 = 5; +pub const BPF_SOCK_OPS_NEEDS_ECN: _bindgen_ty_30 = 6; +pub const BPF_SOCK_OPS_BASE_RTT: _bindgen_ty_30 = 7; +pub const BPF_SOCK_OPS_RTO_CB: _bindgen_ty_30 = 8; +pub const BPF_SOCK_OPS_RETRANS_CB: _bindgen_ty_30 = 9; +pub const BPF_SOCK_OPS_STATE_CB: _bindgen_ty_30 = 10; +pub const BPF_SOCK_OPS_TCP_LISTEN_CB: _bindgen_ty_30 = 11; +pub const BPF_SOCK_OPS_RTT_CB: _bindgen_ty_30 = 12; +pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: _bindgen_ty_30 = 13; +pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: _bindgen_ty_30 = 14; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: _bindgen_ty_30 = 15; +pub type _bindgen_ty_30 = ::aya_ebpf_cty::c_uint; +pub const BPF_TCP_ESTABLISHED: _bindgen_ty_31 = 1; +pub const BPF_TCP_SYN_SENT: _bindgen_ty_31 = 2; +pub const BPF_TCP_SYN_RECV: _bindgen_ty_31 = 3; +pub const BPF_TCP_FIN_WAIT1: _bindgen_ty_31 = 4; +pub const BPF_TCP_FIN_WAIT2: _bindgen_ty_31 = 5; +pub const BPF_TCP_TIME_WAIT: _bindgen_ty_31 = 6; +pub const BPF_TCP_CLOSE: _bindgen_ty_31 = 7; +pub const BPF_TCP_CLOSE_WAIT: _bindgen_ty_31 = 8; +pub const BPF_TCP_LAST_ACK: _bindgen_ty_31 = 9; +pub const BPF_TCP_LISTEN: _bindgen_ty_31 = 10; +pub const BPF_TCP_CLOSING: _bindgen_ty_31 = 11; +pub const BPF_TCP_NEW_SYN_RECV: _bindgen_ty_31 = 12; +pub const BPF_TCP_BOUND_INACTIVE: _bindgen_ty_31 = 13; +pub const BPF_TCP_MAX_STATES: _bindgen_ty_31 = 14; +pub type _bindgen_ty_31 = ::aya_ebpf_cty::c_uint; +pub mod _bindgen_ty_33 { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_LOAD_HDR_OPT_TCP_SYN: Type = 1; +} +pub mod _bindgen_ty_34 { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: Type = 1; + pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: Type = 2; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_perf_event_value { + pub counter: __u64, + pub enabled: __u64, + pub running: __u64, +} +pub const BPF_DEVCG_ACC_MKNOD: _bindgen_ty_35 = 1; +pub const BPF_DEVCG_ACC_READ: _bindgen_ty_35 = 2; +pub const BPF_DEVCG_ACC_WRITE: _bindgen_ty_35 = 4; +pub type _bindgen_ty_35 = ::aya_ebpf_cty::c_uint; +pub const BPF_DEVCG_DEV_BLOCK: _bindgen_ty_36 = 1; +pub const BPF_DEVCG_DEV_CHAR: _bindgen_ty_36 = 2; +pub type _bindgen_ty_36 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_cgroup_dev_ctx { + pub access_type: __u32, + pub major: __u32, + pub minor: __u32, +} +#[repr(C)] +#[derive(Debug)] +pub struct bpf_raw_tracepoint_args { + pub args: __IncompleteArrayField<__u64>, +} +pub const BPF_FIB_LOOKUP_DIRECT: _bindgen_ty_37 = 1; +pub const BPF_FIB_LOOKUP_OUTPUT: _bindgen_ty_37 = 2; +pub const BPF_FIB_LOOKUP_SKIP_NEIGH: _bindgen_ty_37 = 4; +pub const BPF_FIB_LOOKUP_TBID: _bindgen_ty_37 = 8; +pub const BPF_FIB_LOOKUP_SRC: _bindgen_ty_37 = 16; +pub type _bindgen_ty_37 = ::aya_ebpf_cty::c_uint; +pub const BPF_FIB_LKUP_RET_SUCCESS: _bindgen_ty_38 = 0; +pub const BPF_FIB_LKUP_RET_BLACKHOLE: _bindgen_ty_38 = 1; +pub const BPF_FIB_LKUP_RET_UNREACHABLE: _bindgen_ty_38 = 2; +pub const BPF_FIB_LKUP_RET_PROHIBIT: _bindgen_ty_38 = 3; +pub const BPF_FIB_LKUP_RET_NOT_FWDED: _bindgen_ty_38 = 4; +pub const BPF_FIB_LKUP_RET_FWD_DISABLED: _bindgen_ty_38 = 5; +pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: _bindgen_ty_38 = 6; +pub const BPF_FIB_LKUP_RET_NO_NEIGH: _bindgen_ty_38 = 7; +pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: _bindgen_ty_38 = 8; +pub const BPF_FIB_LKUP_RET_NO_SRC_ADDR: _bindgen_ty_38 = 9; +pub type _bindgen_ty_38 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_fib_lookup { + pub family: __u8, + pub l4_protocol: __u8, + pub sport: __be16, + pub dport: __be16, + pub __bindgen_anon_1: bpf_fib_lookup__bindgen_ty_1, + pub ifindex: __u32, + pub __bindgen_anon_2: bpf_fib_lookup__bindgen_ty_2, + pub __bindgen_anon_3: bpf_fib_lookup__bindgen_ty_3, + pub __bindgen_anon_4: bpf_fib_lookup__bindgen_ty_4, + pub __bindgen_anon_5: bpf_fib_lookup__bindgen_ty_5, + pub smac: [__u8; 6usize], + pub dmac: [__u8; 6usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_1 { + pub tot_len: __u16, + pub mtu_result: __u16, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_2 { + pub tos: __u8, + pub flowinfo: __be32, + pub rt_metric: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_3 { + pub ipv4_src: __be32, + pub ipv6_src: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_4 { + pub ipv4_dst: __be32, + pub ipv6_dst: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_5 { + pub __bindgen_anon_1: bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1, + pub tbid: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1 { + pub h_vlan_proto: __be16, + pub h_vlan_TCI: __be16, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_redir_neigh { + pub nh_family: __u32, + pub __bindgen_anon_1: bpf_redir_neigh__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_redir_neigh__bindgen_ty_1 { + pub ipv4_nh: __be32, + pub ipv6_nh: [__u32; 4usize], +} +pub mod bpf_check_mtu_flags { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MTU_CHK_SEGS: Type = 1; +} +pub mod bpf_check_mtu_ret { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MTU_CHK_RET_SUCCESS: Type = 0; + pub const BPF_MTU_CHK_RET_FRAG_NEEDED: Type = 1; + pub const BPF_MTU_CHK_RET_SEGS_TOOBIG: Type = 2; +} +pub mod bpf_task_fd_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_FD_TYPE_RAW_TRACEPOINT: Type = 0; + pub const BPF_FD_TYPE_TRACEPOINT: Type = 1; + pub const BPF_FD_TYPE_KPROBE: Type = 2; + pub const BPF_FD_TYPE_KRETPROBE: Type = 3; + pub const BPF_FD_TYPE_UPROBE: Type = 4; + pub const BPF_FD_TYPE_URETPROBE: Type = 5; +} +pub const BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: _bindgen_ty_39 = 1; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: _bindgen_ty_39 = 2; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: _bindgen_ty_39 = 4; +pub type _bindgen_ty_39 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_flow_keys { + pub nhoff: __u16, + pub thoff: __u16, + pub addr_proto: __u16, + pub is_frag: __u8, + pub is_first_frag: __u8, + pub is_encap: __u8, + pub ip_proto: __u8, + pub n_proto: __be16, + pub sport: __be16, + pub dport: __be16, + pub __bindgen_anon_1: bpf_flow_keys__bindgen_ty_1, + pub flags: __u32, + pub flow_label: __be32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_flow_keys__bindgen_ty_1 { + pub __bindgen_anon_1: bpf_flow_keys__bindgen_ty_1__bindgen_ty_1, + pub __bindgen_anon_2: bpf_flow_keys__bindgen_ty_1__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 { + pub ipv4_src: __be32, + pub ipv4_dst: __be32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 { + pub ipv6_src: [__u32; 4usize], + pub ipv6_dst: [__u32; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_func_info { + pub insn_off: __u32, + pub type_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_line_info { + pub insn_off: __u32, + pub file_name_off: __u32, + pub line_off: __u32, + pub line_col: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_spin_lock { + pub val: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_timer { + pub __opaque: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_dynptr { + pub __opaque: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_list_head { + pub __opaque: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_list_node { + pub __opaque: [__u64; 3usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_rb_root { + pub __opaque: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_rb_node { + pub __opaque: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_refcount { + pub __opaque: [__u32; 1usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_sysctl { + pub write: __u32, + pub file_pos: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sockopt { + pub __bindgen_anon_1: bpf_sockopt__bindgen_ty_1, + pub __bindgen_anon_2: bpf_sockopt__bindgen_ty_2, + pub __bindgen_anon_3: bpf_sockopt__bindgen_ty_3, + pub level: __s32, + pub optname: __s32, + pub optlen: __s32, + pub retval: __s32, +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union bpf_sockopt__bindgen_ty_1 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sockopt__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union bpf_sockopt__bindgen_ty_2 { + pub optval: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sockopt__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union bpf_sockopt__bindgen_ty_3 { + pub optval_end: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sockopt__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_pidns_info { + pub pid: __u32, + pub tgid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sk_lookup { + pub __bindgen_anon_1: bpf_sk_lookup__bindgen_ty_1, + pub family: __u32, + pub protocol: __u32, + pub remote_ip4: __u32, + pub remote_ip6: [__u32; 4usize], + pub remote_port: __be16, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, + pub local_ip4: __u32, + pub local_ip6: [__u32; 4usize], + pub local_port: __u32, + pub ingress_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sk_lookup__bindgen_ty_1 { + pub __bindgen_anon_1: bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1, + pub cookie: __u64, +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +impl bpf_sk_lookup { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_ptr { + pub ptr: *mut ::aya_ebpf_cty::c_void, + pub type_id: __u32, + pub flags: __u32, +} +pub mod bpf_core_relo_kind { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_CORE_FIELD_BYTE_OFFSET: Type = 0; + pub const BPF_CORE_FIELD_BYTE_SIZE: Type = 1; + pub const BPF_CORE_FIELD_EXISTS: Type = 2; + pub const BPF_CORE_FIELD_SIGNED: Type = 3; + pub const BPF_CORE_FIELD_LSHIFT_U64: Type = 4; + pub const BPF_CORE_FIELD_RSHIFT_U64: Type = 5; + pub const BPF_CORE_TYPE_ID_LOCAL: Type = 6; + pub const BPF_CORE_TYPE_ID_TARGET: Type = 7; + pub const BPF_CORE_TYPE_EXISTS: Type = 8; + pub const BPF_CORE_TYPE_SIZE: Type = 9; + pub const BPF_CORE_ENUMVAL_EXISTS: Type = 10; + pub const BPF_CORE_ENUMVAL_VALUE: Type = 11; + pub const BPF_CORE_TYPE_MATCHES: Type = 12; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_core_relo { + pub insn_off: __u32, + pub type_id: __u32, + pub access_str_off: __u32, + pub kind: bpf_core_relo_kind::Type, +} +pub const BPF_F_TIMER_ABS: _bindgen_ty_41 = 1; +pub const BPF_F_TIMER_CPU_PIN: _bindgen_ty_41 = 2; +pub type _bindgen_ty_41 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_iter_num { + pub __opaque: [__u64; 1usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pt_regs { + pub regs: [__u64; 32usize], + pub lo: __u64, + pub hi: __u64, + pub cp0_epc: __u64, + pub cp0_badvaddr: __u64, + pub cp0_status: __u64, + pub cp0_cause: __u64, +} +pub type sa_family_t = ::aya_ebpf_cty::c_ushort; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sockaddr { + pub sa_family: sa_family_t, + pub sa_data: [::aya_ebpf_cty::c_char; 14usize], +} diff --git a/ebpf/aya-ebpf-bindings/src/mips/helpers.rs b/ebpf/aya-ebpf-bindings/src/mips/helpers.rs new file mode 100644 index 00000000..8aba5810 --- /dev/null +++ b/ebpf/aya-ebpf-bindings/src/mips/helpers.rs @@ -0,0 +1,2148 @@ +use super::bindings::*; +pub unsafe fn bpf_map_lookup_elem( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(1usize); + fun(map, key) +} +pub unsafe fn bpf_map_update_elem( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + value: *const ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + value: *const ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(2usize); + fun(map, key, value, flags) +} +pub unsafe fn bpf_map_delete_elem( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(3usize); + fun(map, key) +} +pub unsafe fn bpf_probe_read( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(4usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_ktime_get_ns() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(5usize); + fun() +} +pub unsafe fn bpf_get_prandom_u32() -> __u32 { + let fun: unsafe extern "C" fn() -> __u32 = ::core::mem::transmute(7usize); + fun() +} +pub unsafe fn bpf_get_smp_processor_id() -> __u32 { + let fun: unsafe extern "C" fn() -> __u32 = ::core::mem::transmute(8usize); + fun() +} +pub unsafe fn bpf_skb_store_bytes( + skb: *mut __sk_buff, + offset: __u32, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(9usize); + fun(skb, offset, from, len, flags) +} +pub unsafe fn bpf_l3_csum_replace( + skb: *mut __sk_buff, + offset: __u32, + from: __u64, + to: __u64, + size: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + from: __u64, + to: __u64, + size: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(10usize); + fun(skb, offset, from, to, size) +} +pub unsafe fn bpf_l4_csum_replace( + skb: *mut __sk_buff, + offset: __u32, + from: __u64, + to: __u64, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + from: __u64, + to: __u64, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(11usize); + fun(skb, offset, from, to, flags) +} +pub unsafe fn bpf_tail_call( + ctx: *mut ::aya_ebpf_cty::c_void, + prog_array_map: *mut ::aya_ebpf_cty::c_void, + index: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + prog_array_map: *mut ::aya_ebpf_cty::c_void, + index: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(12usize); + fun(ctx, prog_array_map, index) +} +pub unsafe fn bpf_clone_redirect( + skb: *mut __sk_buff, + ifindex: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + ifindex: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(13usize); + fun(skb, ifindex, flags) +} +pub unsafe fn bpf_get_current_pid_tgid() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(14usize); + fun() +} +pub unsafe fn bpf_get_current_uid_gid() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(15usize); + fun() +} +pub unsafe fn bpf_get_current_comm( + buf: *mut ::aya_ebpf_cty::c_void, + size_of_buf: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + buf: *mut ::aya_ebpf_cty::c_void, + size_of_buf: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(16usize); + fun(buf, size_of_buf) +} +pub unsafe fn bpf_get_cgroup_classid(skb: *mut __sk_buff) -> __u32 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u32 = ::core::mem::transmute(17usize); + fun(skb) +} +pub unsafe fn bpf_skb_vlan_push( + skb: *mut __sk_buff, + vlan_proto: __be16, + vlan_tci: __u16, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + vlan_proto: __be16, + vlan_tci: __u16, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(18usize); + fun(skb, vlan_proto, vlan_tci) +} +pub unsafe fn bpf_skb_vlan_pop(skb: *mut __sk_buff) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(19usize); + fun(skb) +} +pub unsafe fn bpf_skb_get_tunnel_key( + skb: *mut __sk_buff, + key: *mut bpf_tunnel_key, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + key: *mut bpf_tunnel_key, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(20usize); + fun(skb, key, size, flags) +} +pub unsafe fn bpf_skb_set_tunnel_key( + skb: *mut __sk_buff, + key: *mut bpf_tunnel_key, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + key: *mut bpf_tunnel_key, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(21usize); + fun(skb, key, size, flags) +} +pub unsafe fn bpf_perf_event_read(map: *mut ::aya_ebpf_cty::c_void, flags: __u64) -> __u64 { + let fun: unsafe extern "C" fn(map: *mut ::aya_ebpf_cty::c_void, flags: __u64) -> __u64 = + ::core::mem::transmute(22usize); + fun(map, flags) +} +pub unsafe fn bpf_redirect(ifindex: __u32, flags: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(ifindex: __u32, flags: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(23usize); + fun(ifindex, flags) +} +pub unsafe fn bpf_get_route_realm(skb: *mut __sk_buff) -> __u32 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u32 = ::core::mem::transmute(24usize); + fun(skb) +} +pub unsafe fn bpf_perf_event_output( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(25usize); + fun(ctx, map, flags, data, size) +} +pub unsafe fn bpf_skb_load_bytes( + skb: *const ::aya_ebpf_cty::c_void, + offset: __u32, + to: *mut ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *const ::aya_ebpf_cty::c_void, + offset: __u32, + to: *mut ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(26usize); + fun(skb, offset, to, len) +} +pub unsafe fn bpf_get_stackid( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(27usize); + fun(ctx, map, flags) +} +pub unsafe fn bpf_csum_diff( + from: *mut __be32, + from_size: __u32, + to: *mut __be32, + to_size: __u32, + seed: __wsum, +) -> __s64 { + let fun: unsafe extern "C" fn( + from: *mut __be32, + from_size: __u32, + to: *mut __be32, + to_size: __u32, + seed: __wsum, + ) -> __s64 = ::core::mem::transmute(28usize); + fun(from, from_size, to, to_size, seed) +} +pub unsafe fn bpf_skb_get_tunnel_opt( + skb: *mut __sk_buff, + opt: *mut ::aya_ebpf_cty::c_void, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + opt: *mut ::aya_ebpf_cty::c_void, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(29usize); + fun(skb, opt, size) +} +pub unsafe fn bpf_skb_set_tunnel_opt( + skb: *mut __sk_buff, + opt: *mut ::aya_ebpf_cty::c_void, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + opt: *mut ::aya_ebpf_cty::c_void, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(30usize); + fun(skb, opt, size) +} +pub unsafe fn bpf_skb_change_proto( + skb: *mut __sk_buff, + proto: __be16, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + proto: __be16, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(31usize); + fun(skb, proto, flags) +} +pub unsafe fn bpf_skb_change_type(skb: *mut __sk_buff, type_: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, type_: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(32usize); + fun(skb, type_) +} +pub unsafe fn bpf_skb_under_cgroup( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + index: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + index: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(33usize); + fun(skb, map, index) +} +pub unsafe fn bpf_get_hash_recalc(skb: *mut __sk_buff) -> __u32 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u32 = ::core::mem::transmute(34usize); + fun(skb) +} +pub unsafe fn bpf_get_current_task() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(35usize); + fun() +} +pub unsafe fn bpf_probe_write_user( + dst: *mut ::aya_ebpf_cty::c_void, + src: *const ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + src: *const ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(36usize); + fun(dst, src, len) +} +pub unsafe fn bpf_current_task_under_cgroup( + map: *mut ::aya_ebpf_cty::c_void, + index: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + index: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(37usize); + fun(map, index) +} +pub unsafe fn bpf_skb_change_tail( + skb: *mut __sk_buff, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(38usize); + fun(skb, len, flags) +} +pub unsafe fn bpf_skb_pull_data(skb: *mut __sk_buff, len: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, len: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(39usize); + fun(skb, len) +} +pub unsafe fn bpf_csum_update(skb: *mut __sk_buff, csum: __wsum) -> __s64 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, csum: __wsum) -> __s64 = + ::core::mem::transmute(40usize); + fun(skb, csum) +} +pub unsafe fn bpf_set_hash_invalid(skb: *mut __sk_buff) { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) = ::core::mem::transmute(41usize); + fun(skb) +} +pub unsafe fn bpf_get_numa_node_id() -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn() -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(42usize); + fun() +} +pub unsafe fn bpf_skb_change_head( + skb: *mut __sk_buff, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(43usize); + fun(skb, len, flags) +} +pub unsafe fn bpf_xdp_adjust_head( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(44usize); + fun(xdp_md, delta) +} +pub unsafe fn bpf_probe_read_str( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(45usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_get_socket_cookie(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(46usize); + fun(ctx) +} +pub unsafe fn bpf_get_socket_uid(skb: *mut __sk_buff) -> __u32 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u32 = ::core::mem::transmute(47usize); + fun(skb) +} +pub unsafe fn bpf_set_hash(skb: *mut __sk_buff, hash: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, hash: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(48usize); + fun(skb, hash) +} +pub unsafe fn bpf_setsockopt( + bpf_socket: *mut ::aya_ebpf_cty::c_void, + level: ::aya_ebpf_cty::c_int, + optname: ::aya_ebpf_cty::c_int, + optval: *mut ::aya_ebpf_cty::c_void, + optlen: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + bpf_socket: *mut ::aya_ebpf_cty::c_void, + level: ::aya_ebpf_cty::c_int, + optname: ::aya_ebpf_cty::c_int, + optval: *mut ::aya_ebpf_cty::c_void, + optlen: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(49usize); + fun(bpf_socket, level, optname, optval, optlen) +} +pub unsafe fn bpf_skb_adjust_room( + skb: *mut __sk_buff, + len_diff: __s32, + mode: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + len_diff: __s32, + mode: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(50usize); + fun(skb, len_diff, mode, flags) +} +pub unsafe fn bpf_redirect_map( + map: *mut ::aya_ebpf_cty::c_void, + key: __u64, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: __u64, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(51usize); + fun(map, key, flags) +} +pub unsafe fn bpf_sk_redirect_map( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + key: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + key: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(52usize); + fun(skb, map, key, flags) +} +pub unsafe fn bpf_sock_map_update( + skops: *mut bpf_sock_ops, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(53usize); + fun(skops, map, key, flags) +} +pub unsafe fn bpf_xdp_adjust_meta( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(54usize); + fun(xdp_md, delta) +} +pub unsafe fn bpf_perf_event_read_value( + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + buf: *mut bpf_perf_event_value, + buf_size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + buf: *mut bpf_perf_event_value, + buf_size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(55usize); + fun(map, flags, buf, buf_size) +} +pub unsafe fn bpf_perf_prog_read_value( + ctx: *mut bpf_perf_event_data, + buf: *mut bpf_perf_event_value, + buf_size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_perf_event_data, + buf: *mut bpf_perf_event_value, + buf_size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(56usize); + fun(ctx, buf, buf_size) +} +pub unsafe fn bpf_getsockopt( + bpf_socket: *mut ::aya_ebpf_cty::c_void, + level: ::aya_ebpf_cty::c_int, + optname: ::aya_ebpf_cty::c_int, + optval: *mut ::aya_ebpf_cty::c_void, + optlen: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + bpf_socket: *mut ::aya_ebpf_cty::c_void, + level: ::aya_ebpf_cty::c_int, + optname: ::aya_ebpf_cty::c_int, + optval: *mut ::aya_ebpf_cty::c_void, + optlen: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(57usize); + fun(bpf_socket, level, optname, optval, optlen) +} +pub unsafe fn bpf_override_return(regs: *mut pt_regs, rc: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(regs: *mut pt_regs, rc: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(58usize); + fun(regs, rc) +} +pub unsafe fn bpf_sock_ops_cb_flags_set( + bpf_sock: *mut bpf_sock_ops, + argval: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + bpf_sock: *mut bpf_sock_ops, + argval: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(59usize); + fun(bpf_sock, argval) +} +pub unsafe fn bpf_msg_redirect_map( + msg: *mut sk_msg_md, + map: *mut ::aya_ebpf_cty::c_void, + key: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + map: *mut ::aya_ebpf_cty::c_void, + key: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(60usize); + fun(msg, map, key, flags) +} +pub unsafe fn bpf_msg_apply_bytes(msg: *mut sk_msg_md, bytes: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(msg: *mut sk_msg_md, bytes: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(61usize); + fun(msg, bytes) +} +pub unsafe fn bpf_msg_cork_bytes(msg: *mut sk_msg_md, bytes: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(msg: *mut sk_msg_md, bytes: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(62usize); + fun(msg, bytes) +} +pub unsafe fn bpf_msg_pull_data( + msg: *mut sk_msg_md, + start: __u32, + end: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + start: __u32, + end: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(63usize); + fun(msg, start, end, flags) +} +pub unsafe fn bpf_bind( + ctx: *mut bpf_sock_addr, + addr: *mut sockaddr, + addr_len: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sock_addr, + addr: *mut sockaddr, + addr_len: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(64usize); + fun(ctx, addr, addr_len) +} +pub unsafe fn bpf_xdp_adjust_tail( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(65usize); + fun(xdp_md, delta) +} +pub unsafe fn bpf_skb_get_xfrm_state( + skb: *mut __sk_buff, + index: __u32, + xfrm_state: *mut bpf_xfrm_state, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + index: __u32, + xfrm_state: *mut bpf_xfrm_state, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(66usize); + fun(skb, index, xfrm_state, size, flags) +} +pub unsafe fn bpf_get_stack( + ctx: *mut ::aya_ebpf_cty::c_void, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(67usize); + fun(ctx, buf, size, flags) +} +pub unsafe fn bpf_skb_load_bytes_relative( + skb: *const ::aya_ebpf_cty::c_void, + offset: __u32, + to: *mut ::aya_ebpf_cty::c_void, + len: __u32, + start_header: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *const ::aya_ebpf_cty::c_void, + offset: __u32, + to: *mut ::aya_ebpf_cty::c_void, + len: __u32, + start_header: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(68usize); + fun(skb, offset, to, len, start_header) +} +pub unsafe fn bpf_fib_lookup( + ctx: *mut ::aya_ebpf_cty::c_void, + params: *mut bpf_fib_lookup, + plen: ::aya_ebpf_cty::c_int, + flags: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + params: *mut bpf_fib_lookup, + plen: ::aya_ebpf_cty::c_int, + flags: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(69usize); + fun(ctx, params, plen, flags) +} +pub unsafe fn bpf_sock_hash_update( + skops: *mut bpf_sock_ops, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(70usize); + fun(skops, map, key, flags) +} +pub unsafe fn bpf_msg_redirect_hash( + msg: *mut sk_msg_md, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(71usize); + fun(msg, map, key, flags) +} +pub unsafe fn bpf_sk_redirect_hash( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(72usize); + fun(skb, map, key, flags) +} +pub unsafe fn bpf_lwt_push_encap( + skb: *mut __sk_buff, + type_: __u32, + hdr: *mut ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + type_: __u32, + hdr: *mut ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(73usize); + fun(skb, type_, hdr, len) +} +pub unsafe fn bpf_lwt_seg6_store_bytes( + skb: *mut __sk_buff, + offset: __u32, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(74usize); + fun(skb, offset, from, len) +} +pub unsafe fn bpf_lwt_seg6_adjust_srh( + skb: *mut __sk_buff, + offset: __u32, + delta: __s32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + delta: __s32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(75usize); + fun(skb, offset, delta) +} +pub unsafe fn bpf_lwt_seg6_action( + skb: *mut __sk_buff, + action: __u32, + param: *mut ::aya_ebpf_cty::c_void, + param_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + action: __u32, + param: *mut ::aya_ebpf_cty::c_void, + param_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(76usize); + fun(skb, action, param, param_len) +} +pub unsafe fn bpf_rc_repeat(ctx: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(77usize); + fun(ctx) +} +pub unsafe fn bpf_rc_keydown( + ctx: *mut ::aya_ebpf_cty::c_void, + protocol: __u32, + scancode: __u64, + toggle: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + protocol: __u32, + scancode: __u64, + toggle: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(78usize); + fun(ctx, protocol, scancode, toggle) +} +pub unsafe fn bpf_skb_cgroup_id(skb: *mut __sk_buff) -> __u64 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u64 = ::core::mem::transmute(79usize); + fun(skb) +} +pub unsafe fn bpf_get_current_cgroup_id() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(80usize); + fun() +} +pub unsafe fn bpf_get_local_storage( + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(81usize); + fun(map, flags) +} +pub unsafe fn bpf_sk_select_reuseport( + reuse: *mut sk_reuseport_md, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + reuse: *mut sk_reuseport_md, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(82usize); + fun(reuse, map, key, flags) +} +pub unsafe fn bpf_skb_ancestor_cgroup_id( + skb: *mut __sk_buff, + ancestor_level: ::aya_ebpf_cty::c_int, +) -> __u64 { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + ancestor_level: ::aya_ebpf_cty::c_int, + ) -> __u64 = ::core::mem::transmute(83usize); + fun(skb, ancestor_level) +} +pub unsafe fn bpf_sk_lookup_tcp( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, +) -> *mut bpf_sock { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, + ) -> *mut bpf_sock = ::core::mem::transmute(84usize); + fun(ctx, tuple, tuple_size, netns, flags) +} +pub unsafe fn bpf_sk_lookup_udp( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, +) -> *mut bpf_sock { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, + ) -> *mut bpf_sock = ::core::mem::transmute(85usize); + fun(ctx, tuple, tuple_size, netns, flags) +} +pub unsafe fn bpf_sk_release(sock: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(sock: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(86usize); + fun(sock) +} +pub unsafe fn bpf_map_push_elem( + map: *mut ::aya_ebpf_cty::c_void, + value: *const ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + value: *const ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(87usize); + fun(map, value, flags) +} +pub unsafe fn bpf_map_pop_elem( + map: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(88usize); + fun(map, value) +} +pub unsafe fn bpf_map_peek_elem( + map: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(89usize); + fun(map, value) +} +pub unsafe fn bpf_msg_push_data( + msg: *mut sk_msg_md, + start: __u32, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + start: __u32, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(90usize); + fun(msg, start, len, flags) +} +pub unsafe fn bpf_msg_pop_data( + msg: *mut sk_msg_md, + start: __u32, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + start: __u32, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(91usize); + fun(msg, start, len, flags) +} +pub unsafe fn bpf_rc_pointer_rel( + ctx: *mut ::aya_ebpf_cty::c_void, + rel_x: __s32, + rel_y: __s32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + rel_x: __s32, + rel_y: __s32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(92usize); + fun(ctx, rel_x, rel_y) +} +pub unsafe fn bpf_spin_lock(lock: *mut bpf_spin_lock) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(lock: *mut bpf_spin_lock) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(93usize); + fun(lock) +} +pub unsafe fn bpf_spin_unlock(lock: *mut bpf_spin_lock) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(lock: *mut bpf_spin_lock) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(94usize); + fun(lock) +} +pub unsafe fn bpf_sk_fullsock(sk: *mut bpf_sock) -> *mut bpf_sock { + let fun: unsafe extern "C" fn(sk: *mut bpf_sock) -> *mut bpf_sock = + ::core::mem::transmute(95usize); + fun(sk) +} +pub unsafe fn bpf_tcp_sock(sk: *mut bpf_sock) -> *mut bpf_tcp_sock { + let fun: unsafe extern "C" fn(sk: *mut bpf_sock) -> *mut bpf_tcp_sock = + ::core::mem::transmute(96usize); + fun(sk) +} +pub unsafe fn bpf_skb_ecn_set_ce(skb: *mut __sk_buff) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(97usize); + fun(skb) +} +pub unsafe fn bpf_get_listener_sock(sk: *mut bpf_sock) -> *mut bpf_sock { + let fun: unsafe extern "C" fn(sk: *mut bpf_sock) -> *mut bpf_sock = + ::core::mem::transmute(98usize); + fun(sk) +} +pub unsafe fn bpf_skc_lookup_tcp( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, +) -> *mut bpf_sock { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, + ) -> *mut bpf_sock = ::core::mem::transmute(99usize); + fun(ctx, tuple, tuple_size, netns, flags) +} +pub unsafe fn bpf_tcp_check_syncookie( + sk: *mut ::aya_ebpf_cty::c_void, + iph: *mut ::aya_ebpf_cty::c_void, + iph_len: __u32, + th: *mut tcphdr, + th_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + sk: *mut ::aya_ebpf_cty::c_void, + iph: *mut ::aya_ebpf_cty::c_void, + iph_len: __u32, + th: *mut tcphdr, + th_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(100usize); + fun(sk, iph, iph_len, th, th_len) +} +pub unsafe fn bpf_sysctl_get_name( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(101usize); + fun(ctx, buf, buf_len, flags) +} +pub unsafe fn bpf_sysctl_get_current_value( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(102usize); + fun(ctx, buf, buf_len) +} +pub unsafe fn bpf_sysctl_get_new_value( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(103usize); + fun(ctx, buf, buf_len) +} +pub unsafe fn bpf_sysctl_set_new_value( + ctx: *mut bpf_sysctl, + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sysctl, + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(104usize); + fun(ctx, buf, buf_len) +} +pub unsafe fn bpf_strtol( + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + res: *mut ::aya_ebpf_cty::c_long, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + res: *mut ::aya_ebpf_cty::c_long, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(105usize); + fun(buf, buf_len, flags, res) +} +pub unsafe fn bpf_strtoul( + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + res: *mut ::aya_ebpf_cty::c_ulong, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + res: *mut ::aya_ebpf_cty::c_ulong, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(106usize); + fun(buf, buf_len, flags, res) +} +pub unsafe fn bpf_sk_storage_get( + map: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(107usize); + fun(map, sk, value, flags) +} +pub unsafe fn bpf_sk_storage_delete( + map: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(108usize); + fun(map, sk) +} +pub unsafe fn bpf_send_signal(sig: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(sig: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(109usize); + fun(sig) +} +pub unsafe fn bpf_tcp_gen_syncookie( + sk: *mut ::aya_ebpf_cty::c_void, + iph: *mut ::aya_ebpf_cty::c_void, + iph_len: __u32, + th: *mut tcphdr, + th_len: __u32, +) -> __s64 { + let fun: unsafe extern "C" fn( + sk: *mut ::aya_ebpf_cty::c_void, + iph: *mut ::aya_ebpf_cty::c_void, + iph_len: __u32, + th: *mut tcphdr, + th_len: __u32, + ) -> __s64 = ::core::mem::transmute(110usize); + fun(sk, iph, iph_len, th, th_len) +} +pub unsafe fn bpf_skb_output( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(111usize); + fun(ctx, map, flags, data, size) +} +pub unsafe fn bpf_probe_read_user( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(112usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_probe_read_kernel( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(113usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_probe_read_user_str( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(114usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_probe_read_kernel_str( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(115usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_tcp_send_ack( + tp: *mut ::aya_ebpf_cty::c_void, + rcv_nxt: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + tp: *mut ::aya_ebpf_cty::c_void, + rcv_nxt: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(116usize); + fun(tp, rcv_nxt) +} +pub unsafe fn bpf_send_signal_thread(sig: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(sig: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(117usize); + fun(sig) +} +pub unsafe fn bpf_jiffies64() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(118usize); + fun() +} +pub unsafe fn bpf_read_branch_records( + ctx: *mut bpf_perf_event_data, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_perf_event_data, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(119usize); + fun(ctx, buf, size, flags) +} +pub unsafe fn bpf_get_ns_current_pid_tgid( + dev: __u64, + ino: __u64, + nsdata: *mut bpf_pidns_info, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dev: __u64, + ino: __u64, + nsdata: *mut bpf_pidns_info, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(120usize); + fun(dev, ino, nsdata, size) +} +pub unsafe fn bpf_xdp_output( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(121usize); + fun(ctx, map, flags, data, size) +} +pub unsafe fn bpf_get_netns_cookie(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(122usize); + fun(ctx) +} +pub unsafe fn bpf_get_current_ancestor_cgroup_id(ancestor_level: ::aya_ebpf_cty::c_int) -> __u64 { + let fun: unsafe extern "C" fn(ancestor_level: ::aya_ebpf_cty::c_int) -> __u64 = + ::core::mem::transmute(123usize); + fun(ancestor_level) +} +pub unsafe fn bpf_sk_assign( + ctx: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(124usize); + fun(ctx, sk, flags) +} +pub unsafe fn bpf_ktime_get_boot_ns() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(125usize); + fun() +} +pub unsafe fn bpf_seq_printf( + m: *mut seq_file, + fmt: *const ::aya_ebpf_cty::c_char, + fmt_size: __u32, + data: *const ::aya_ebpf_cty::c_void, + data_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + m: *mut seq_file, + fmt: *const ::aya_ebpf_cty::c_char, + fmt_size: __u32, + data: *const ::aya_ebpf_cty::c_void, + data_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(126usize); + fun(m, fmt, fmt_size, data, data_len) +} +pub unsafe fn bpf_seq_write( + m: *mut seq_file, + data: *const ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + m: *mut seq_file, + data: *const ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(127usize); + fun(m, data, len) +} +pub unsafe fn bpf_sk_cgroup_id(sk: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(128usize); + fun(sk) +} +pub unsafe fn bpf_sk_ancestor_cgroup_id( + sk: *mut ::aya_ebpf_cty::c_void, + ancestor_level: ::aya_ebpf_cty::c_int, +) -> __u64 { + let fun: unsafe extern "C" fn( + sk: *mut ::aya_ebpf_cty::c_void, + ancestor_level: ::aya_ebpf_cty::c_int, + ) -> __u64 = ::core::mem::transmute(129usize); + fun(sk, ancestor_level) +} +pub unsafe fn bpf_ringbuf_output( + ringbuf: *mut ::aya_ebpf_cty::c_void, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ringbuf: *mut ::aya_ebpf_cty::c_void, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(130usize); + fun(ringbuf, data, size, flags) +} +pub unsafe fn bpf_ringbuf_reserve( + ringbuf: *mut ::aya_ebpf_cty::c_void, + size: __u64, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + ringbuf: *mut ::aya_ebpf_cty::c_void, + size: __u64, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(131usize); + fun(ringbuf, size, flags) +} +pub unsafe fn bpf_ringbuf_submit(data: *mut ::aya_ebpf_cty::c_void, flags: __u64) { + let fun: unsafe extern "C" fn(data: *mut ::aya_ebpf_cty::c_void, flags: __u64) = + ::core::mem::transmute(132usize); + fun(data, flags) +} +pub unsafe fn bpf_ringbuf_discard(data: *mut ::aya_ebpf_cty::c_void, flags: __u64) { + let fun: unsafe extern "C" fn(data: *mut ::aya_ebpf_cty::c_void, flags: __u64) = + ::core::mem::transmute(133usize); + fun(data, flags) +} +pub unsafe fn bpf_ringbuf_query(ringbuf: *mut ::aya_ebpf_cty::c_void, flags: __u64) -> __u64 { + let fun: unsafe extern "C" fn(ringbuf: *mut ::aya_ebpf_cty::c_void, flags: __u64) -> __u64 = + ::core::mem::transmute(134usize); + fun(ringbuf, flags) +} +pub unsafe fn bpf_csum_level(skb: *mut __sk_buff, level: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, level: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(135usize); + fun(skb, level) +} +pub unsafe fn bpf_skc_to_tcp6_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp6_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp6_sock = + ::core::mem::transmute(136usize); + fun(sk) +} +pub unsafe fn bpf_skc_to_tcp_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp_sock = + ::core::mem::transmute(137usize); + fun(sk) +} +pub unsafe fn bpf_skc_to_tcp_timewait_sock( + sk: *mut ::aya_ebpf_cty::c_void, +) -> *mut tcp_timewait_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp_timewait_sock = + ::core::mem::transmute(138usize); + fun(sk) +} +pub unsafe fn bpf_skc_to_tcp_request_sock( + sk: *mut ::aya_ebpf_cty::c_void, +) -> *mut tcp_request_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp_request_sock = + ::core::mem::transmute(139usize); + fun(sk) +} +pub unsafe fn bpf_skc_to_udp6_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut udp6_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut udp6_sock = + ::core::mem::transmute(140usize); + fun(sk) +} +pub unsafe fn bpf_get_task_stack( + task: *mut task_struct, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + task: *mut task_struct, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(141usize); + fun(task, buf, size, flags) +} +pub unsafe fn bpf_load_hdr_opt( + skops: *mut bpf_sock_ops, + searchby_res: *mut ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + searchby_res: *mut ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(142usize); + fun(skops, searchby_res, len, flags) +} +pub unsafe fn bpf_store_hdr_opt( + skops: *mut bpf_sock_ops, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(143usize); + fun(skops, from, len, flags) +} +pub unsafe fn bpf_reserve_hdr_opt( + skops: *mut bpf_sock_ops, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(144usize); + fun(skops, len, flags) +} +pub unsafe fn bpf_inode_storage_get( + map: *mut ::aya_ebpf_cty::c_void, + inode: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + inode: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(145usize); + fun(map, inode, value, flags) +} +pub unsafe fn bpf_inode_storage_delete( + map: *mut ::aya_ebpf_cty::c_void, + inode: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_int { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + inode: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_int = ::core::mem::transmute(146usize); + fun(map, inode) +} +pub unsafe fn bpf_d_path( + path: *mut path, + buf: *mut ::aya_ebpf_cty::c_char, + sz: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + path: *mut path, + buf: *mut ::aya_ebpf_cty::c_char, + sz: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(147usize); + fun(path, buf, sz) +} +pub unsafe fn bpf_copy_from_user( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + user_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + user_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(148usize); + fun(dst, size, user_ptr) +} +pub unsafe fn bpf_snprintf_btf( + str_: *mut ::aya_ebpf_cty::c_char, + str_size: __u32, + ptr: *mut btf_ptr, + btf_ptr_size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + str_: *mut ::aya_ebpf_cty::c_char, + str_size: __u32, + ptr: *mut btf_ptr, + btf_ptr_size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(149usize); + fun(str_, str_size, ptr, btf_ptr_size, flags) +} +pub unsafe fn bpf_seq_printf_btf( + m: *mut seq_file, + ptr: *mut btf_ptr, + ptr_size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + m: *mut seq_file, + ptr: *mut btf_ptr, + ptr_size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(150usize); + fun(m, ptr, ptr_size, flags) +} +pub unsafe fn bpf_skb_cgroup_classid(skb: *mut __sk_buff) -> __u64 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u64 = ::core::mem::transmute(151usize); + fun(skb) +} +pub unsafe fn bpf_redirect_neigh( + ifindex: __u32, + params: *mut bpf_redir_neigh, + plen: ::aya_ebpf_cty::c_int, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ifindex: __u32, + params: *mut bpf_redir_neigh, + plen: ::aya_ebpf_cty::c_int, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(152usize); + fun(ifindex, params, plen, flags) +} +pub unsafe fn bpf_per_cpu_ptr( + percpu_ptr: *const ::aya_ebpf_cty::c_void, + cpu: __u32, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + percpu_ptr: *const ::aya_ebpf_cty::c_void, + cpu: __u32, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(153usize); + fun(percpu_ptr, cpu) +} +pub unsafe fn bpf_this_cpu_ptr( + percpu_ptr: *const ::aya_ebpf_cty::c_void, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + percpu_ptr: *const ::aya_ebpf_cty::c_void, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(154usize); + fun(percpu_ptr) +} +pub unsafe fn bpf_redirect_peer(ifindex: __u32, flags: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(ifindex: __u32, flags: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(155usize); + fun(ifindex, flags) +} +pub unsafe fn bpf_task_storage_get( + map: *mut ::aya_ebpf_cty::c_void, + task: *mut task_struct, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + task: *mut task_struct, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(156usize); + fun(map, task, value, flags) +} +pub unsafe fn bpf_task_storage_delete( + map: *mut ::aya_ebpf_cty::c_void, + task: *mut task_struct, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + task: *mut task_struct, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(157usize); + fun(map, task) +} +pub unsafe fn bpf_get_current_task_btf() -> *mut task_struct { + let fun: unsafe extern "C" fn() -> *mut task_struct = ::core::mem::transmute(158usize); + fun() +} +pub unsafe fn bpf_bprm_opts_set(bprm: *mut linux_binprm, flags: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(bprm: *mut linux_binprm, flags: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(159usize); + fun(bprm, flags) +} +pub unsafe fn bpf_ktime_get_coarse_ns() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(160usize); + fun() +} +pub unsafe fn bpf_ima_inode_hash( + inode: *mut inode, + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + inode: *mut inode, + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(161usize); + fun(inode, dst, size) +} +pub unsafe fn bpf_sock_from_file(file: *mut file) -> *mut socket { + let fun: unsafe extern "C" fn(file: *mut file) -> *mut socket = + ::core::mem::transmute(162usize); + fun(file) +} +pub unsafe fn bpf_check_mtu( + ctx: *mut ::aya_ebpf_cty::c_void, + ifindex: __u32, + mtu_len: *mut __u32, + len_diff: __s32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + ifindex: __u32, + mtu_len: *mut __u32, + len_diff: __s32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(163usize); + fun(ctx, ifindex, mtu_len, len_diff, flags) +} +pub unsafe fn bpf_for_each_map_elem( + map: *mut ::aya_ebpf_cty::c_void, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(164usize); + fun(map, callback_fn, callback_ctx, flags) +} +pub unsafe fn bpf_snprintf( + str_: *mut ::aya_ebpf_cty::c_char, + str_size: __u32, + fmt: *const ::aya_ebpf_cty::c_char, + data: *mut __u64, + data_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + str_: *mut ::aya_ebpf_cty::c_char, + str_size: __u32, + fmt: *const ::aya_ebpf_cty::c_char, + data: *mut __u64, + data_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(165usize); + fun(str_, str_size, fmt, data, data_len) +} +pub unsafe fn bpf_sys_bpf( + cmd: __u32, + attr: *mut ::aya_ebpf_cty::c_void, + attr_size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + cmd: __u32, + attr: *mut ::aya_ebpf_cty::c_void, + attr_size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(166usize); + fun(cmd, attr, attr_size) +} +pub unsafe fn bpf_btf_find_by_name_kind( + name: *mut ::aya_ebpf_cty::c_char, + name_sz: ::aya_ebpf_cty::c_int, + kind: __u32, + flags: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + name: *mut ::aya_ebpf_cty::c_char, + name_sz: ::aya_ebpf_cty::c_int, + kind: __u32, + flags: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(167usize); + fun(name, name_sz, kind, flags) +} +pub unsafe fn bpf_sys_close(fd: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(fd: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(168usize); + fun(fd) +} +pub unsafe fn bpf_timer_init( + timer: *mut bpf_timer, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + timer: *mut bpf_timer, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(169usize); + fun(timer, map, flags) +} +pub unsafe fn bpf_timer_set_callback( + timer: *mut bpf_timer, + callback_fn: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + timer: *mut bpf_timer, + callback_fn: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(170usize); + fun(timer, callback_fn) +} +pub unsafe fn bpf_timer_start( + timer: *mut bpf_timer, + nsecs: __u64, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + timer: *mut bpf_timer, + nsecs: __u64, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(171usize); + fun(timer, nsecs, flags) +} +pub unsafe fn bpf_timer_cancel(timer: *mut bpf_timer) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(timer: *mut bpf_timer) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(172usize); + fun(timer) +} +pub unsafe fn bpf_get_func_ip(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(173usize); + fun(ctx) +} +pub unsafe fn bpf_get_attach_cookie(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(174usize); + fun(ctx) +} +pub unsafe fn bpf_task_pt_regs(task: *mut task_struct) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(task: *mut task_struct) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(175usize); + fun(task) +} +pub unsafe fn bpf_get_branch_snapshot( + entries: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + entries: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(176usize); + fun(entries, size, flags) +} +pub unsafe fn bpf_trace_vprintk( + fmt: *const ::aya_ebpf_cty::c_char, + fmt_size: __u32, + data: *const ::aya_ebpf_cty::c_void, + data_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + fmt: *const ::aya_ebpf_cty::c_char, + fmt_size: __u32, + data: *const ::aya_ebpf_cty::c_void, + data_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(177usize); + fun(fmt, fmt_size, data, data_len) +} +pub unsafe fn bpf_skc_to_unix_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut unix_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut unix_sock = + ::core::mem::transmute(178usize); + fun(sk) +} +pub unsafe fn bpf_kallsyms_lookup_name( + name: *const ::aya_ebpf_cty::c_char, + name_sz: ::aya_ebpf_cty::c_int, + flags: ::aya_ebpf_cty::c_int, + res: *mut __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + name: *const ::aya_ebpf_cty::c_char, + name_sz: ::aya_ebpf_cty::c_int, + flags: ::aya_ebpf_cty::c_int, + res: *mut __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(179usize); + fun(name, name_sz, flags, res) +} +pub unsafe fn bpf_find_vma( + task: *mut task_struct, + addr: __u64, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + task: *mut task_struct, + addr: __u64, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(180usize); + fun(task, addr, callback_fn, callback_ctx, flags) +} +pub unsafe fn bpf_loop( + nr_loops: __u32, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + nr_loops: __u32, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(181usize); + fun(nr_loops, callback_fn, callback_ctx, flags) +} +pub unsafe fn bpf_strncmp( + s1: *const ::aya_ebpf_cty::c_char, + s1_sz: __u32, + s2: *const ::aya_ebpf_cty::c_char, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + s1: *const ::aya_ebpf_cty::c_char, + s1_sz: __u32, + s2: *const ::aya_ebpf_cty::c_char, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(182usize); + fun(s1, s1_sz, s2) +} +pub unsafe fn bpf_get_func_arg( + ctx: *mut ::aya_ebpf_cty::c_void, + n: __u32, + value: *mut __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + n: __u32, + value: *mut __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(183usize); + fun(ctx, n, value) +} +pub unsafe fn bpf_get_func_ret( + ctx: *mut ::aya_ebpf_cty::c_void, + value: *mut __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + value: *mut __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(184usize); + fun(ctx, value) +} +pub unsafe fn bpf_get_func_arg_cnt(ctx: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(185usize); + fun(ctx) +} +pub unsafe fn bpf_get_retval() -> ::aya_ebpf_cty::c_int { + let fun: unsafe extern "C" fn() -> ::aya_ebpf_cty::c_int = ::core::mem::transmute(186usize); + fun() +} +pub unsafe fn bpf_set_retval(retval: ::aya_ebpf_cty::c_int) -> ::aya_ebpf_cty::c_int { + let fun: unsafe extern "C" fn(retval: ::aya_ebpf_cty::c_int) -> ::aya_ebpf_cty::c_int = + ::core::mem::transmute(187usize); + fun(retval) +} +pub unsafe fn bpf_xdp_get_buff_len(xdp_md: *mut xdp_md) -> __u64 { + let fun: unsafe extern "C" fn(xdp_md: *mut xdp_md) -> __u64 = ::core::mem::transmute(188usize); + fun(xdp_md) +} +pub unsafe fn bpf_xdp_load_bytes( + xdp_md: *mut xdp_md, + offset: __u32, + buf: *mut ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + offset: __u32, + buf: *mut ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(189usize); + fun(xdp_md, offset, buf, len) +} +pub unsafe fn bpf_xdp_store_bytes( + xdp_md: *mut xdp_md, + offset: __u32, + buf: *mut ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + offset: __u32, + buf: *mut ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(190usize); + fun(xdp_md, offset, buf, len) +} +pub unsafe fn bpf_copy_from_user_task( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + user_ptr: *const ::aya_ebpf_cty::c_void, + tsk: *mut task_struct, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + user_ptr: *const ::aya_ebpf_cty::c_void, + tsk: *mut task_struct, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(191usize); + fun(dst, size, user_ptr, tsk, flags) +} +pub unsafe fn bpf_skb_set_tstamp( + skb: *mut __sk_buff, + tstamp: __u64, + tstamp_type: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + tstamp: __u64, + tstamp_type: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(192usize); + fun(skb, tstamp, tstamp_type) +} +pub unsafe fn bpf_ima_file_hash( + file: *mut file, + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + file: *mut file, + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(193usize); + fun(file, dst, size) +} +pub unsafe fn bpf_kptr_xchg( + map_value: *mut ::aya_ebpf_cty::c_void, + ptr: *mut ::aya_ebpf_cty::c_void, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map_value: *mut ::aya_ebpf_cty::c_void, + ptr: *mut ::aya_ebpf_cty::c_void, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(194usize); + fun(map_value, ptr) +} +pub unsafe fn bpf_map_lookup_percpu_elem( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + cpu: __u32, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + cpu: __u32, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(195usize); + fun(map, key, cpu) +} +pub unsafe fn bpf_skc_to_mptcp_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut mptcp_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut mptcp_sock = + ::core::mem::transmute(196usize); + fun(sk) +} +pub unsafe fn bpf_dynptr_from_mem( + data: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ptr: *mut bpf_dynptr, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + data: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ptr: *mut bpf_dynptr, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(197usize); + fun(data, size, flags, ptr) +} +pub unsafe fn bpf_ringbuf_reserve_dynptr( + ringbuf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ptr: *mut bpf_dynptr, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ringbuf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ptr: *mut bpf_dynptr, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(198usize); + fun(ringbuf, size, flags, ptr) +} +pub unsafe fn bpf_ringbuf_submit_dynptr(ptr: *mut bpf_dynptr, flags: __u64) { + let fun: unsafe extern "C" fn(ptr: *mut bpf_dynptr, flags: __u64) = + ::core::mem::transmute(199usize); + fun(ptr, flags) +} +pub unsafe fn bpf_ringbuf_discard_dynptr(ptr: *mut bpf_dynptr, flags: __u64) { + let fun: unsafe extern "C" fn(ptr: *mut bpf_dynptr, flags: __u64) = + ::core::mem::transmute(200usize); + fun(ptr, flags) +} +pub unsafe fn bpf_dynptr_read( + dst: *mut ::aya_ebpf_cty::c_void, + len: __u32, + src: *const bpf_dynptr, + offset: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + len: __u32, + src: *const bpf_dynptr, + offset: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(201usize); + fun(dst, len, src, offset, flags) +} +pub unsafe fn bpf_dynptr_write( + dst: *const bpf_dynptr, + offset: __u32, + src: *mut ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *const bpf_dynptr, + offset: __u32, + src: *mut ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(202usize); + fun(dst, offset, src, len, flags) +} +pub unsafe fn bpf_dynptr_data( + ptr: *const bpf_dynptr, + offset: __u32, + len: __u32, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + ptr: *const bpf_dynptr, + offset: __u32, + len: __u32, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(203usize); + fun(ptr, offset, len) +} +pub unsafe fn bpf_tcp_raw_gen_syncookie_ipv4( + iph: *mut iphdr, + th: *mut tcphdr, + th_len: __u32, +) -> __s64 { + let fun: unsafe extern "C" fn(iph: *mut iphdr, th: *mut tcphdr, th_len: __u32) -> __s64 = + ::core::mem::transmute(204usize); + fun(iph, th, th_len) +} +pub unsafe fn bpf_tcp_raw_gen_syncookie_ipv6( + iph: *mut ipv6hdr, + th: *mut tcphdr, + th_len: __u32, +) -> __s64 { + let fun: unsafe extern "C" fn(iph: *mut ipv6hdr, th: *mut tcphdr, th_len: __u32) -> __s64 = + ::core::mem::transmute(205usize); + fun(iph, th, th_len) +} +pub unsafe fn bpf_tcp_raw_check_syncookie_ipv4( + iph: *mut iphdr, + th: *mut tcphdr, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(iph: *mut iphdr, th: *mut tcphdr) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(206usize); + fun(iph, th) +} +pub unsafe fn bpf_tcp_raw_check_syncookie_ipv6( + iph: *mut ipv6hdr, + th: *mut tcphdr, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(iph: *mut ipv6hdr, th: *mut tcphdr) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(207usize); + fun(iph, th) +} +pub unsafe fn bpf_ktime_get_tai_ns() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(208usize); + fun() +} +pub unsafe fn bpf_user_ringbuf_drain( + map: *mut ::aya_ebpf_cty::c_void, + callback_fn: *mut ::aya_ebpf_cty::c_void, + ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + callback_fn: *mut ::aya_ebpf_cty::c_void, + ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(209usize); + fun(map, callback_fn, ctx, flags) +} +pub unsafe fn bpf_cgrp_storage_get( + map: *mut ::aya_ebpf_cty::c_void, + cgroup: *mut cgroup, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + cgroup: *mut cgroup, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(210usize); + fun(map, cgroup, value, flags) +} +pub unsafe fn bpf_cgrp_storage_delete( + map: *mut ::aya_ebpf_cty::c_void, + cgroup: *mut cgroup, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + cgroup: *mut cgroup, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(211usize); + fun(map, cgroup) +} diff --git a/ebpf/aya-ebpf-bindings/src/powerpc64/bindings.rs b/ebpf/aya-ebpf-bindings/src/powerpc64/bindings.rs new file mode 100644 index 00000000..bc1388bf --- /dev/null +++ b/ebpf/aya-ebpf-bindings/src/powerpc64/bindings.rs @@ -0,0 +1,2900 @@ +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { byte | mask } else { byte & !mask } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } +} +#[repr(C)] +#[derive(Default)] +pub struct __IncompleteArrayField(::core::marker::PhantomData, [T; 0]); +impl __IncompleteArrayField { + #[inline] + pub const fn new() -> Self { + __IncompleteArrayField(::core::marker::PhantomData, []) + } + #[inline] + pub fn as_ptr(&self) -> *const T { + self as *const _ as *const T + } + #[inline] + pub fn as_mut_ptr(&mut self) -> *mut T { + self as *mut _ as *mut T + } + #[inline] + pub unsafe fn as_slice(&self, len: usize) -> &[T] { + ::core::slice::from_raw_parts(self.as_ptr(), len) + } + #[inline] + pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { + ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len) + } +} +impl ::core::fmt::Debug for __IncompleteArrayField { + fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + fmt.write_str("__IncompleteArrayField") + } +} +pub const BPF_LD: u32 = 0; +pub const BPF_LDX: u32 = 1; +pub const BPF_ST: u32 = 2; +pub const BPF_STX: u32 = 3; +pub const BPF_ALU: u32 = 4; +pub const BPF_JMP: u32 = 5; +pub const BPF_RET: u32 = 6; +pub const BPF_MISC: u32 = 7; +pub const BPF_W: u32 = 0; +pub const BPF_H: u32 = 8; +pub const BPF_B: u32 = 16; +pub const BPF_IMM: u32 = 0; +pub const BPF_ABS: u32 = 32; +pub const BPF_IND: u32 = 64; +pub const BPF_MEM: u32 = 96; +pub const BPF_LEN: u32 = 128; +pub const BPF_MSH: u32 = 160; +pub const BPF_ADD: u32 = 0; +pub const BPF_SUB: u32 = 16; +pub const BPF_MUL: u32 = 32; +pub const BPF_DIV: u32 = 48; +pub const BPF_OR: u32 = 64; +pub const BPF_AND: u32 = 80; +pub const BPF_LSH: u32 = 96; +pub const BPF_RSH: u32 = 112; +pub const BPF_NEG: u32 = 128; +pub const BPF_MOD: u32 = 144; +pub const BPF_XOR: u32 = 160; +pub const BPF_JA: u32 = 0; +pub const BPF_JEQ: u32 = 16; +pub const BPF_JGT: u32 = 32; +pub const BPF_JGE: u32 = 48; +pub const BPF_JSET: u32 = 64; +pub const BPF_K: u32 = 0; +pub const BPF_X: u32 = 8; +pub const BPF_MAXINSNS: u32 = 4096; +pub const BPF_JMP32: u32 = 6; +pub const BPF_ALU64: u32 = 7; +pub const BPF_DW: u32 = 24; +pub const BPF_MEMSX: u32 = 128; +pub const BPF_ATOMIC: u32 = 192; +pub const BPF_XADD: u32 = 192; +pub const BPF_MOV: u32 = 176; +pub const BPF_ARSH: u32 = 192; +pub const BPF_END: u32 = 208; +pub const BPF_TO_LE: u32 = 0; +pub const BPF_TO_BE: u32 = 8; +pub const BPF_FROM_LE: u32 = 0; +pub const BPF_FROM_BE: u32 = 8; +pub const BPF_JNE: u32 = 80; +pub const BPF_JLT: u32 = 160; +pub const BPF_JLE: u32 = 176; +pub const BPF_JSGT: u32 = 96; +pub const BPF_JSGE: u32 = 112; +pub const BPF_JSLT: u32 = 192; +pub const BPF_JSLE: u32 = 208; +pub const BPF_JCOND: u32 = 224; +pub const BPF_CALL: u32 = 128; +pub const BPF_EXIT: u32 = 144; +pub const BPF_FETCH: u32 = 1; +pub const BPF_XCHG: u32 = 225; +pub const BPF_CMPXCHG: u32 = 241; +pub const BPF_F_ALLOW_OVERRIDE: u32 = 1; +pub const BPF_F_ALLOW_MULTI: u32 = 2; +pub const BPF_F_REPLACE: u32 = 4; +pub const BPF_F_BEFORE: u32 = 8; +pub const BPF_F_AFTER: u32 = 16; +pub const BPF_F_ID: u32 = 32; +pub const BPF_F_STRICT_ALIGNMENT: u32 = 1; +pub const BPF_F_ANY_ALIGNMENT: u32 = 2; +pub const BPF_F_TEST_RND_HI32: u32 = 4; +pub const BPF_F_TEST_STATE_FREQ: u32 = 8; +pub const BPF_F_SLEEPABLE: u32 = 16; +pub const BPF_F_XDP_HAS_FRAGS: u32 = 32; +pub const BPF_F_XDP_DEV_BOUND_ONLY: u32 = 64; +pub const BPF_F_TEST_REG_INVARIANTS: u32 = 128; +pub const BPF_F_NETFILTER_IP_DEFRAG: u32 = 1; +pub const BPF_PSEUDO_MAP_FD: u32 = 1; +pub const BPF_PSEUDO_MAP_IDX: u32 = 5; +pub const BPF_PSEUDO_MAP_VALUE: u32 = 2; +pub const BPF_PSEUDO_MAP_IDX_VALUE: u32 = 6; +pub const BPF_PSEUDO_BTF_ID: u32 = 3; +pub const BPF_PSEUDO_FUNC: u32 = 4; +pub const BPF_PSEUDO_CALL: u32 = 1; +pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2; +pub const BPF_F_QUERY_EFFECTIVE: u32 = 1; +pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1; +pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2; +pub const BPF_BUILD_ID_SIZE: u32 = 20; +pub const BPF_OBJ_NAME_LEN: u32 = 16; +pub const BPF_TAG_SIZE: u32 = 8; +pub const TC_ACT_UNSPEC: i32 = -1; +pub const TC_ACT_OK: u32 = 0; +pub const TC_ACT_RECLASSIFY: u32 = 1; +pub const TC_ACT_SHOT: u32 = 2; +pub const TC_ACT_PIPE: u32 = 3; +pub const TC_ACT_STOLEN: u32 = 4; +pub const TC_ACT_QUEUED: u32 = 5; +pub const TC_ACT_REPEAT: u32 = 6; +pub const TC_ACT_REDIRECT: u32 = 7; +pub const TC_ACT_TRAP: u32 = 8; +pub const TC_ACT_VALUE_MAX: u32 = 8; +pub const TC_ACT_EXT_VAL_MASK: u32 = 268435455; +pub const TC_ACT_JUMP: u32 = 268435456; +pub const TC_ACT_GOTO_CHAIN: u32 = 536870912; +pub const TC_ACT_EXT_OPCODE_MAX: u32 = 536870912; +pub const SO_RCVLOWAT: u32 = 16; +pub const SO_SNDLOWAT: u32 = 17; +pub const SO_RCVTIMEO_OLD: u32 = 18; +pub const SO_SNDTIMEO_OLD: u32 = 19; +pub const SO_PASSCRED: u32 = 20; +pub const SO_PEERCRED: u32 = 21; +pub const SOL_SOCKET: u32 = 1; +pub const SO_DEBUG: u32 = 1; +pub const SO_REUSEADDR: u32 = 2; +pub const SO_TYPE: u32 = 3; +pub const SO_ERROR: u32 = 4; +pub const SO_DONTROUTE: u32 = 5; +pub const SO_BROADCAST: u32 = 6; +pub const SO_SNDBUF: u32 = 7; +pub const SO_RCVBUF: u32 = 8; +pub const SO_SNDBUFFORCE: u32 = 32; +pub const SO_RCVBUFFORCE: u32 = 33; +pub const SO_KEEPALIVE: u32 = 9; +pub const SO_OOBINLINE: u32 = 10; +pub const SO_NO_CHECK: u32 = 11; +pub const SO_PRIORITY: u32 = 12; +pub const SO_LINGER: u32 = 13; +pub const SO_BSDCOMPAT: u32 = 14; +pub const SO_REUSEPORT: u32 = 15; +pub const SO_SECURITY_AUTHENTICATION: u32 = 22; +pub const SO_SECURITY_ENCRYPTION_TRANSPORT: u32 = 23; +pub const SO_SECURITY_ENCRYPTION_NETWORK: u32 = 24; +pub const SO_BINDTODEVICE: u32 = 25; +pub const SO_ATTACH_FILTER: u32 = 26; +pub const SO_DETACH_FILTER: u32 = 27; +pub const SO_GET_FILTER: u32 = 26; +pub const SO_PEERNAME: u32 = 28; +pub const SO_ACCEPTCONN: u32 = 30; +pub const SO_PEERSEC: u32 = 31; +pub const SO_PASSSEC: u32 = 34; +pub const SO_MARK: u32 = 36; +pub const SO_PROTOCOL: u32 = 38; +pub const SO_DOMAIN: u32 = 39; +pub const SO_RXQ_OVFL: u32 = 40; +pub const SO_WIFI_STATUS: u32 = 41; +pub const SO_PEEK_OFF: u32 = 42; +pub const SO_NOFCS: u32 = 43; +pub const SO_LOCK_FILTER: u32 = 44; +pub const SO_SELECT_ERR_QUEUE: u32 = 45; +pub const SO_BUSY_POLL: u32 = 46; +pub const SO_MAX_PACING_RATE: u32 = 47; +pub const SO_BPF_EXTENSIONS: u32 = 48; +pub const SO_INCOMING_CPU: u32 = 49; +pub const SO_ATTACH_BPF: u32 = 50; +pub const SO_DETACH_BPF: u32 = 27; +pub const SO_ATTACH_REUSEPORT_CBPF: u32 = 51; +pub const SO_ATTACH_REUSEPORT_EBPF: u32 = 52; +pub const SO_CNX_ADVICE: u32 = 53; +pub const SO_MEMINFO: u32 = 55; +pub const SO_INCOMING_NAPI_ID: u32 = 56; +pub const SO_COOKIE: u32 = 57; +pub const SO_PEERGROUPS: u32 = 59; +pub const SO_ZEROCOPY: u32 = 60; +pub const SO_TXTIME: u32 = 61; +pub const SO_BINDTOIFINDEX: u32 = 62; +pub const SO_TIMESTAMP_OLD: u32 = 29; +pub const SO_TIMESTAMPNS_OLD: u32 = 35; +pub const SO_TIMESTAMPING_OLD: u32 = 37; +pub const SO_TIMESTAMP_NEW: u32 = 63; +pub const SO_TIMESTAMPNS_NEW: u32 = 64; +pub const SO_TIMESTAMPING_NEW: u32 = 65; +pub const SO_RCVTIMEO_NEW: u32 = 66; +pub const SO_SNDTIMEO_NEW: u32 = 67; +pub const SO_DETACH_REUSEPORT_BPF: u32 = 68; +pub const SO_PREFER_BUSY_POLL: u32 = 69; +pub const SO_BUSY_POLL_BUDGET: u32 = 70; +pub const SO_NETNS_COOKIE: u32 = 71; +pub const SO_BUF_LOCK: u32 = 72; +pub const SO_RESERVE_MEM: u32 = 73; +pub const SO_TXREHASH: u32 = 74; +pub const SO_RCVMARK: u32 = 75; +pub const SO_PASSPIDFD: u32 = 76; +pub const SO_PEERPIDFD: u32 = 77; +pub const SO_TIMESTAMP: u32 = 29; +pub const SO_TIMESTAMPNS: u32 = 35; +pub const SO_TIMESTAMPING: u32 = 37; +pub const SO_RCVTIMEO: u32 = 18; +pub const SO_SNDTIMEO: u32 = 19; +pub type __u8 = ::aya_ebpf_cty::c_uchar; +pub type __s16 = ::aya_ebpf_cty::c_short; +pub type __u16 = ::aya_ebpf_cty::c_ushort; +pub type __s32 = ::aya_ebpf_cty::c_int; +pub type __u32 = ::aya_ebpf_cty::c_uint; +pub type __s64 = ::aya_ebpf_cty::c_long; +pub type __u64 = ::aya_ebpf_cty::c_ulong; +pub type __be16 = __u16; +pub type __be32 = __u32; +pub type __wsum = __u32; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_perf_event_data { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct linux_binprm { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcphdr { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct seq_file { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcp6_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcp_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcp_timewait_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcp_request_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct udp6_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct unix_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct task_struct { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cgroup { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct path { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct inode { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct socket { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct file { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct mptcp_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct iphdr { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ipv6hdr { + _unused: [u8; 0], +} +pub mod bpf_cond_pseudo_jmp { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MAY_GOTO: Type = 0; +} +pub const BPF_REG_0: _bindgen_ty_1 = 0; +pub const BPF_REG_1: _bindgen_ty_1 = 1; +pub const BPF_REG_2: _bindgen_ty_1 = 2; +pub const BPF_REG_3: _bindgen_ty_1 = 3; +pub const BPF_REG_4: _bindgen_ty_1 = 4; +pub const BPF_REG_5: _bindgen_ty_1 = 5; +pub const BPF_REG_6: _bindgen_ty_1 = 6; +pub const BPF_REG_7: _bindgen_ty_1 = 7; +pub const BPF_REG_8: _bindgen_ty_1 = 8; +pub const BPF_REG_9: _bindgen_ty_1 = 9; +pub const BPF_REG_10: _bindgen_ty_1 = 10; +pub const __MAX_BPF_REG: _bindgen_ty_1 = 11; +pub type _bindgen_ty_1 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_insn { + pub code: __u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub off: __s16, + pub imm: __s32, +} +impl bpf_insn { + #[inline] + pub fn dst_reg(&self) -> __u8 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) } + } + #[inline] + pub fn set_dst_reg(&mut self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn src_reg(&self) -> __u8 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } + } + #[inline] + pub fn set_src_reg(&mut self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 4u8, { + let dst_reg: u8 = unsafe { ::core::mem::transmute(dst_reg) }; + dst_reg as u64 + }); + __bindgen_bitfield_unit.set(4usize, 4u8, { + let src_reg: u8 = unsafe { ::core::mem::transmute(src_reg) }; + src_reg as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug)] +pub struct bpf_lpm_trie_key { + pub prefixlen: __u32, + pub data: __IncompleteArrayField<__u8>, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_lpm_trie_key_hdr { + pub prefixlen: __u32, +} +#[repr(C)] +pub struct bpf_lpm_trie_key_u8 { + pub __bindgen_anon_1: bpf_lpm_trie_key_u8__bindgen_ty_1, + pub data: __IncompleteArrayField<__u8>, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_lpm_trie_key_u8__bindgen_ty_1 { + pub hdr: bpf_lpm_trie_key_hdr, + pub prefixlen: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_cgroup_storage_key { + pub cgroup_inode_id: __u64, + pub attach_type: __u32, +} +pub mod bpf_cgroup_iter_order { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_CGROUP_ITER_ORDER_UNSPEC: Type = 0; + pub const BPF_CGROUP_ITER_SELF_ONLY: Type = 1; + pub const BPF_CGROUP_ITER_DESCENDANTS_PRE: Type = 2; + pub const BPF_CGROUP_ITER_DESCENDANTS_POST: Type = 3; + pub const BPF_CGROUP_ITER_ANCESTORS_UP: Type = 4; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_iter_link_info { + pub map: bpf_iter_link_info__bindgen_ty_1, + pub cgroup: bpf_iter_link_info__bindgen_ty_2, + pub task: bpf_iter_link_info__bindgen_ty_3, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_iter_link_info__bindgen_ty_1 { + pub map_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_iter_link_info__bindgen_ty_2 { + pub order: bpf_cgroup_iter_order::Type, + pub cgroup_fd: __u32, + pub cgroup_id: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_iter_link_info__bindgen_ty_3 { + pub tid: __u32, + pub pid: __u32, + pub pid_fd: __u32, +} +pub mod bpf_cmd { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MAP_CREATE: Type = 0; + pub const BPF_MAP_LOOKUP_ELEM: Type = 1; + pub const BPF_MAP_UPDATE_ELEM: Type = 2; + pub const BPF_MAP_DELETE_ELEM: Type = 3; + pub const BPF_MAP_GET_NEXT_KEY: Type = 4; + pub const BPF_PROG_LOAD: Type = 5; + pub const BPF_OBJ_PIN: Type = 6; + pub const BPF_OBJ_GET: Type = 7; + pub const BPF_PROG_ATTACH: Type = 8; + pub const BPF_PROG_DETACH: Type = 9; + pub const BPF_PROG_TEST_RUN: Type = 10; + pub const BPF_PROG_RUN: Type = 10; + pub const BPF_PROG_GET_NEXT_ID: Type = 11; + pub const BPF_MAP_GET_NEXT_ID: Type = 12; + pub const BPF_PROG_GET_FD_BY_ID: Type = 13; + pub const BPF_MAP_GET_FD_BY_ID: Type = 14; + pub const BPF_OBJ_GET_INFO_BY_FD: Type = 15; + pub const BPF_PROG_QUERY: Type = 16; + pub const BPF_RAW_TRACEPOINT_OPEN: Type = 17; + pub const BPF_BTF_LOAD: Type = 18; + pub const BPF_BTF_GET_FD_BY_ID: Type = 19; + pub const BPF_TASK_FD_QUERY: Type = 20; + pub const BPF_MAP_LOOKUP_AND_DELETE_ELEM: Type = 21; + pub const BPF_MAP_FREEZE: Type = 22; + pub const BPF_BTF_GET_NEXT_ID: Type = 23; + pub const BPF_MAP_LOOKUP_BATCH: Type = 24; + pub const BPF_MAP_LOOKUP_AND_DELETE_BATCH: Type = 25; + pub const BPF_MAP_UPDATE_BATCH: Type = 26; + pub const BPF_MAP_DELETE_BATCH: Type = 27; + pub const BPF_LINK_CREATE: Type = 28; + pub const BPF_LINK_UPDATE: Type = 29; + pub const BPF_LINK_GET_FD_BY_ID: Type = 30; + pub const BPF_LINK_GET_NEXT_ID: Type = 31; + pub const BPF_ENABLE_STATS: Type = 32; + pub const BPF_ITER_CREATE: Type = 33; + pub const BPF_LINK_DETACH: Type = 34; + pub const BPF_PROG_BIND_MAP: Type = 35; + pub const BPF_TOKEN_CREATE: Type = 36; + pub const __MAX_BPF_CMD: Type = 37; +} +pub mod bpf_map_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MAP_TYPE_UNSPEC: Type = 0; + pub const BPF_MAP_TYPE_HASH: Type = 1; + pub const BPF_MAP_TYPE_ARRAY: Type = 2; + pub const BPF_MAP_TYPE_PROG_ARRAY: Type = 3; + pub const BPF_MAP_TYPE_PERF_EVENT_ARRAY: Type = 4; + pub const BPF_MAP_TYPE_PERCPU_HASH: Type = 5; + pub const BPF_MAP_TYPE_PERCPU_ARRAY: Type = 6; + pub const BPF_MAP_TYPE_STACK_TRACE: Type = 7; + pub const BPF_MAP_TYPE_CGROUP_ARRAY: Type = 8; + pub const BPF_MAP_TYPE_LRU_HASH: Type = 9; + pub const BPF_MAP_TYPE_LRU_PERCPU_HASH: Type = 10; + pub const BPF_MAP_TYPE_LPM_TRIE: Type = 11; + pub const BPF_MAP_TYPE_ARRAY_OF_MAPS: Type = 12; + pub const BPF_MAP_TYPE_HASH_OF_MAPS: Type = 13; + pub const BPF_MAP_TYPE_DEVMAP: Type = 14; + pub const BPF_MAP_TYPE_SOCKMAP: Type = 15; + pub const BPF_MAP_TYPE_CPUMAP: Type = 16; + pub const BPF_MAP_TYPE_XSKMAP: Type = 17; + pub const BPF_MAP_TYPE_SOCKHASH: Type = 18; + pub const BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED: Type = 19; + pub const BPF_MAP_TYPE_CGROUP_STORAGE: Type = 19; + pub const BPF_MAP_TYPE_REUSEPORT_SOCKARRAY: Type = 20; + pub const BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED: Type = 21; + pub const BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE: Type = 21; + pub const BPF_MAP_TYPE_QUEUE: Type = 22; + pub const BPF_MAP_TYPE_STACK: Type = 23; + pub const BPF_MAP_TYPE_SK_STORAGE: Type = 24; + pub const BPF_MAP_TYPE_DEVMAP_HASH: Type = 25; + pub const BPF_MAP_TYPE_STRUCT_OPS: Type = 26; + pub const BPF_MAP_TYPE_RINGBUF: Type = 27; + pub const BPF_MAP_TYPE_INODE_STORAGE: Type = 28; + pub const BPF_MAP_TYPE_TASK_STORAGE: Type = 29; + pub const BPF_MAP_TYPE_BLOOM_FILTER: Type = 30; + pub const BPF_MAP_TYPE_USER_RINGBUF: Type = 31; + pub const BPF_MAP_TYPE_CGRP_STORAGE: Type = 32; + pub const BPF_MAP_TYPE_ARENA: Type = 33; + pub const __MAX_BPF_MAP_TYPE: Type = 34; +} +pub mod bpf_prog_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_PROG_TYPE_UNSPEC: Type = 0; + pub const BPF_PROG_TYPE_SOCKET_FILTER: Type = 1; + pub const BPF_PROG_TYPE_KPROBE: Type = 2; + pub const BPF_PROG_TYPE_SCHED_CLS: Type = 3; + pub const BPF_PROG_TYPE_SCHED_ACT: Type = 4; + pub const BPF_PROG_TYPE_TRACEPOINT: Type = 5; + pub const BPF_PROG_TYPE_XDP: Type = 6; + pub const BPF_PROG_TYPE_PERF_EVENT: Type = 7; + pub const BPF_PROG_TYPE_CGROUP_SKB: Type = 8; + pub const BPF_PROG_TYPE_CGROUP_SOCK: Type = 9; + pub const BPF_PROG_TYPE_LWT_IN: Type = 10; + pub const BPF_PROG_TYPE_LWT_OUT: Type = 11; + pub const BPF_PROG_TYPE_LWT_XMIT: Type = 12; + pub const BPF_PROG_TYPE_SOCK_OPS: Type = 13; + pub const BPF_PROG_TYPE_SK_SKB: Type = 14; + pub const BPF_PROG_TYPE_CGROUP_DEVICE: Type = 15; + pub const BPF_PROG_TYPE_SK_MSG: Type = 16; + pub const BPF_PROG_TYPE_RAW_TRACEPOINT: Type = 17; + pub const BPF_PROG_TYPE_CGROUP_SOCK_ADDR: Type = 18; + pub const BPF_PROG_TYPE_LWT_SEG6LOCAL: Type = 19; + pub const BPF_PROG_TYPE_LIRC_MODE2: Type = 20; + pub const BPF_PROG_TYPE_SK_REUSEPORT: Type = 21; + pub const BPF_PROG_TYPE_FLOW_DISSECTOR: Type = 22; + pub const BPF_PROG_TYPE_CGROUP_SYSCTL: Type = 23; + pub const BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE: Type = 24; + pub const BPF_PROG_TYPE_CGROUP_SOCKOPT: Type = 25; + pub const BPF_PROG_TYPE_TRACING: Type = 26; + pub const BPF_PROG_TYPE_STRUCT_OPS: Type = 27; + pub const BPF_PROG_TYPE_EXT: Type = 28; + pub const BPF_PROG_TYPE_LSM: Type = 29; + pub const BPF_PROG_TYPE_SK_LOOKUP: Type = 30; + pub const BPF_PROG_TYPE_SYSCALL: Type = 31; + pub const BPF_PROG_TYPE_NETFILTER: Type = 32; + pub const __MAX_BPF_PROG_TYPE: Type = 33; +} +pub mod bpf_attach_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_CGROUP_INET_INGRESS: Type = 0; + pub const BPF_CGROUP_INET_EGRESS: Type = 1; + pub const BPF_CGROUP_INET_SOCK_CREATE: Type = 2; + pub const BPF_CGROUP_SOCK_OPS: Type = 3; + pub const BPF_SK_SKB_STREAM_PARSER: Type = 4; + pub const BPF_SK_SKB_STREAM_VERDICT: Type = 5; + pub const BPF_CGROUP_DEVICE: Type = 6; + pub const BPF_SK_MSG_VERDICT: Type = 7; + pub const BPF_CGROUP_INET4_BIND: Type = 8; + pub const BPF_CGROUP_INET6_BIND: Type = 9; + pub const BPF_CGROUP_INET4_CONNECT: Type = 10; + pub const BPF_CGROUP_INET6_CONNECT: Type = 11; + pub const BPF_CGROUP_INET4_POST_BIND: Type = 12; + pub const BPF_CGROUP_INET6_POST_BIND: Type = 13; + pub const BPF_CGROUP_UDP4_SENDMSG: Type = 14; + pub const BPF_CGROUP_UDP6_SENDMSG: Type = 15; + pub const BPF_LIRC_MODE2: Type = 16; + pub const BPF_FLOW_DISSECTOR: Type = 17; + pub const BPF_CGROUP_SYSCTL: Type = 18; + pub const BPF_CGROUP_UDP4_RECVMSG: Type = 19; + pub const BPF_CGROUP_UDP6_RECVMSG: Type = 20; + pub const BPF_CGROUP_GETSOCKOPT: Type = 21; + pub const BPF_CGROUP_SETSOCKOPT: Type = 22; + pub const BPF_TRACE_RAW_TP: Type = 23; + pub const BPF_TRACE_FENTRY: Type = 24; + pub const BPF_TRACE_FEXIT: Type = 25; + pub const BPF_MODIFY_RETURN: Type = 26; + pub const BPF_LSM_MAC: Type = 27; + pub const BPF_TRACE_ITER: Type = 28; + pub const BPF_CGROUP_INET4_GETPEERNAME: Type = 29; + pub const BPF_CGROUP_INET6_GETPEERNAME: Type = 30; + pub const BPF_CGROUP_INET4_GETSOCKNAME: Type = 31; + pub const BPF_CGROUP_INET6_GETSOCKNAME: Type = 32; + pub const BPF_XDP_DEVMAP: Type = 33; + pub const BPF_CGROUP_INET_SOCK_RELEASE: Type = 34; + pub const BPF_XDP_CPUMAP: Type = 35; + pub const BPF_SK_LOOKUP: Type = 36; + pub const BPF_XDP: Type = 37; + pub const BPF_SK_SKB_VERDICT: Type = 38; + pub const BPF_SK_REUSEPORT_SELECT: Type = 39; + pub const BPF_SK_REUSEPORT_SELECT_OR_MIGRATE: Type = 40; + pub const BPF_PERF_EVENT: Type = 41; + pub const BPF_TRACE_KPROBE_MULTI: Type = 42; + pub const BPF_LSM_CGROUP: Type = 43; + pub const BPF_STRUCT_OPS: Type = 44; + pub const BPF_NETFILTER: Type = 45; + pub const BPF_TCX_INGRESS: Type = 46; + pub const BPF_TCX_EGRESS: Type = 47; + pub const BPF_TRACE_UPROBE_MULTI: Type = 48; + pub const BPF_CGROUP_UNIX_CONNECT: Type = 49; + pub const BPF_CGROUP_UNIX_SENDMSG: Type = 50; + pub const BPF_CGROUP_UNIX_RECVMSG: Type = 51; + pub const BPF_CGROUP_UNIX_GETPEERNAME: Type = 52; + pub const BPF_CGROUP_UNIX_GETSOCKNAME: Type = 53; + pub const BPF_NETKIT_PRIMARY: Type = 54; + pub const BPF_NETKIT_PEER: Type = 55; + pub const __MAX_BPF_ATTACH_TYPE: Type = 56; +} +pub mod bpf_link_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_LINK_TYPE_UNSPEC: Type = 0; + pub const BPF_LINK_TYPE_RAW_TRACEPOINT: Type = 1; + pub const BPF_LINK_TYPE_TRACING: Type = 2; + pub const BPF_LINK_TYPE_CGROUP: Type = 3; + pub const BPF_LINK_TYPE_ITER: Type = 4; + pub const BPF_LINK_TYPE_NETNS: Type = 5; + pub const BPF_LINK_TYPE_XDP: Type = 6; + pub const BPF_LINK_TYPE_PERF_EVENT: Type = 7; + pub const BPF_LINK_TYPE_KPROBE_MULTI: Type = 8; + pub const BPF_LINK_TYPE_STRUCT_OPS: Type = 9; + pub const BPF_LINK_TYPE_NETFILTER: Type = 10; + pub const BPF_LINK_TYPE_TCX: Type = 11; + pub const BPF_LINK_TYPE_UPROBE_MULTI: Type = 12; + pub const BPF_LINK_TYPE_NETKIT: Type = 13; + pub const __MAX_BPF_LINK_TYPE: Type = 14; +} +pub mod bpf_perf_event_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_PERF_EVENT_UNSPEC: Type = 0; + pub const BPF_PERF_EVENT_UPROBE: Type = 1; + pub const BPF_PERF_EVENT_URETPROBE: Type = 2; + pub const BPF_PERF_EVENT_KPROBE: Type = 3; + pub const BPF_PERF_EVENT_KRETPROBE: Type = 4; + pub const BPF_PERF_EVENT_TRACEPOINT: Type = 5; + pub const BPF_PERF_EVENT_EVENT: Type = 6; +} +pub const BPF_F_KPROBE_MULTI_RETURN: _bindgen_ty_2 = 1; +pub type _bindgen_ty_2 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_UPROBE_MULTI_RETURN: _bindgen_ty_3 = 1; +pub type _bindgen_ty_3 = ::aya_ebpf_cty::c_uint; +pub mod bpf_addr_space_cast { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_ADDR_SPACE_CAST: Type = 1; +} +pub const BPF_ANY: _bindgen_ty_4 = 0; +pub const BPF_NOEXIST: _bindgen_ty_4 = 1; +pub const BPF_EXIST: _bindgen_ty_4 = 2; +pub const BPF_F_LOCK: _bindgen_ty_4 = 4; +pub type _bindgen_ty_4 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_NO_PREALLOC: _bindgen_ty_5 = 1; +pub const BPF_F_NO_COMMON_LRU: _bindgen_ty_5 = 2; +pub const BPF_F_NUMA_NODE: _bindgen_ty_5 = 4; +pub const BPF_F_RDONLY: _bindgen_ty_5 = 8; +pub const BPF_F_WRONLY: _bindgen_ty_5 = 16; +pub const BPF_F_STACK_BUILD_ID: _bindgen_ty_5 = 32; +pub const BPF_F_ZERO_SEED: _bindgen_ty_5 = 64; +pub const BPF_F_RDONLY_PROG: _bindgen_ty_5 = 128; +pub const BPF_F_WRONLY_PROG: _bindgen_ty_5 = 256; +pub const BPF_F_CLONE: _bindgen_ty_5 = 512; +pub const BPF_F_MMAPABLE: _bindgen_ty_5 = 1024; +pub const BPF_F_PRESERVE_ELEMS: _bindgen_ty_5 = 2048; +pub const BPF_F_INNER_MAP: _bindgen_ty_5 = 4096; +pub const BPF_F_LINK: _bindgen_ty_5 = 8192; +pub const BPF_F_PATH_FD: _bindgen_ty_5 = 16384; +pub const BPF_F_VTYPE_BTF_OBJ_FD: _bindgen_ty_5 = 32768; +pub const BPF_F_TOKEN_FD: _bindgen_ty_5 = 65536; +pub const BPF_F_SEGV_ON_FAULT: _bindgen_ty_5 = 131072; +pub const BPF_F_NO_USER_CONV: _bindgen_ty_5 = 262144; +pub type _bindgen_ty_5 = ::aya_ebpf_cty::c_uint; +pub mod bpf_stats_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_STATS_RUN_TIME: Type = 0; +} +pub mod bpf_stack_build_id_status { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_STACK_BUILD_ID_EMPTY: Type = 0; + pub const BPF_STACK_BUILD_ID_VALID: Type = 1; + pub const BPF_STACK_BUILD_ID_IP: Type = 2; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_stack_build_id { + pub status: __s32, + pub build_id: [::aya_ebpf_cty::c_uchar; 20usize], + pub __bindgen_anon_1: bpf_stack_build_id__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_stack_build_id__bindgen_ty_1 { + pub offset: __u64, + pub ip: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_1, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_2, + pub batch: bpf_attr__bindgen_ty_3, + pub __bindgen_anon_3: bpf_attr__bindgen_ty_4, + pub __bindgen_anon_4: bpf_attr__bindgen_ty_5, + pub __bindgen_anon_5: bpf_attr__bindgen_ty_6, + pub test: bpf_attr__bindgen_ty_7, + pub __bindgen_anon_6: bpf_attr__bindgen_ty_8, + pub info: bpf_attr__bindgen_ty_9, + pub query: bpf_attr__bindgen_ty_10, + pub raw_tracepoint: bpf_attr__bindgen_ty_11, + pub __bindgen_anon_7: bpf_attr__bindgen_ty_12, + pub task_fd_query: bpf_attr__bindgen_ty_13, + pub link_create: bpf_attr__bindgen_ty_14, + pub link_update: bpf_attr__bindgen_ty_15, + pub link_detach: bpf_attr__bindgen_ty_16, + pub enable_stats: bpf_attr__bindgen_ty_17, + pub iter_create: bpf_attr__bindgen_ty_18, + pub prog_bind_map: bpf_attr__bindgen_ty_19, + pub token_create: bpf_attr__bindgen_ty_20, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_1 { + pub map_type: __u32, + pub key_size: __u32, + pub value_size: __u32, + pub max_entries: __u32, + pub map_flags: __u32, + pub inner_map_fd: __u32, + pub numa_node: __u32, + pub map_name: [::aya_ebpf_cty::c_char; 16usize], + pub map_ifindex: __u32, + pub btf_fd: __u32, + pub btf_key_type_id: __u32, + pub btf_value_type_id: __u32, + pub btf_vmlinux_value_type_id: __u32, + pub map_extra: __u64, + pub value_type_btf_obj_fd: __s32, + pub map_token_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_2 { + pub map_fd: __u32, + pub key: __u64, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_2__bindgen_ty_1, + pub flags: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_2__bindgen_ty_1 { + pub value: __u64, + pub next_key: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_3 { + pub in_batch: __u64, + pub out_batch: __u64, + pub keys: __u64, + pub values: __u64, + pub count: __u32, + pub map_fd: __u32, + pub elem_flags: __u64, + pub flags: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_4 { + pub prog_type: __u32, + pub insn_cnt: __u32, + pub insns: __u64, + pub license: __u64, + pub log_level: __u32, + pub log_size: __u32, + pub log_buf: __u64, + pub kern_version: __u32, + pub prog_flags: __u32, + pub prog_name: [::aya_ebpf_cty::c_char; 16usize], + pub prog_ifindex: __u32, + pub expected_attach_type: __u32, + pub prog_btf_fd: __u32, + pub func_info_rec_size: __u32, + pub func_info: __u64, + pub func_info_cnt: __u32, + pub line_info_rec_size: __u32, + pub line_info: __u64, + pub line_info_cnt: __u32, + pub attach_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_4__bindgen_ty_1, + pub core_relo_cnt: __u32, + pub fd_array: __u64, + pub core_relos: __u64, + pub core_relo_rec_size: __u32, + pub log_true_size: __u32, + pub prog_token_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_4__bindgen_ty_1 { + pub attach_prog_fd: __u32, + pub attach_btf_obj_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_5 { + pub pathname: __u64, + pub bpf_fd: __u32, + pub file_flags: __u32, + pub path_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_6 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_6__bindgen_ty_1, + pub attach_bpf_fd: __u32, + pub attach_type: __u32, + pub attach_flags: __u32, + pub replace_bpf_fd: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_6__bindgen_ty_2, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_6__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_6__bindgen_ty_2 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_7 { + pub prog_fd: __u32, + pub retval: __u32, + pub data_size_in: __u32, + pub data_size_out: __u32, + pub data_in: __u64, + pub data_out: __u64, + pub repeat: __u32, + pub duration: __u32, + pub ctx_size_in: __u32, + pub ctx_size_out: __u32, + pub ctx_in: __u64, + pub ctx_out: __u64, + pub flags: __u32, + pub cpu: __u32, + pub batch_size: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_8 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_8__bindgen_ty_1, + pub next_id: __u32, + pub open_flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_8__bindgen_ty_1 { + pub start_id: __u32, + pub prog_id: __u32, + pub map_id: __u32, + pub btf_id: __u32, + pub link_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_9 { + pub bpf_fd: __u32, + pub info_len: __u32, + pub info: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_10 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_10__bindgen_ty_1, + pub attach_type: __u32, + pub query_flags: __u32, + pub attach_flags: __u32, + pub prog_ids: __u64, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_10__bindgen_ty_2, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub prog_attach_flags: __u64, + pub link_ids: __u64, + pub link_attach_flags: __u64, + pub revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_10__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_10__bindgen_ty_2 { + pub prog_cnt: __u32, + pub count: __u32, +} +impl bpf_attr__bindgen_ty_10 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_11 { + pub name: __u64, + pub prog_fd: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_attr__bindgen_ty_11 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_12 { + pub btf: __u64, + pub btf_log_buf: __u64, + pub btf_size: __u32, + pub btf_log_size: __u32, + pub btf_log_level: __u32, + pub btf_log_true_size: __u32, + pub btf_flags: __u32, + pub btf_token_fd: __s32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_13 { + pub pid: __u32, + pub fd: __u32, + pub flags: __u32, + pub buf_len: __u32, + pub buf: __u64, + pub prog_id: __u32, + pub fd_type: __u32, + pub probe_offset: __u64, + pub probe_addr: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_1, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_14__bindgen_ty_2, + pub attach_type: __u32, + pub flags: __u32, + pub __bindgen_anon_3: bpf_attr__bindgen_ty_14__bindgen_ty_3, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_1 { + pub prog_fd: __u32, + pub map_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3 { + pub target_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1, + pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2, + pub kprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3, + pub tracing: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4, + pub netfilter: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5, + pub tcx: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6, + pub uprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7, + pub netkit: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 { + pub iter_info: __u64, + pub iter_info_len: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 { + pub bpf_cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 { + pub flags: __u32, + pub cnt: __u32, + pub syms: __u64, + pub addrs: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 { + pub target_btf_id: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 { + pub pf: __u32, + pub hooknum: __u32, + pub priority: __s32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 { + pub path: __u64, + pub offsets: __u64, + pub ref_ctr_offsets: __u64, + pub cookies: __u64, + pub cnt: __u32, + pub flags: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_15 { + pub link_fd: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_15__bindgen_ty_1, + pub flags: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_15__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_15__bindgen_ty_1 { + pub new_prog_fd: __u32, + pub new_map_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_15__bindgen_ty_2 { + pub old_prog_fd: __u32, + pub old_map_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_16 { + pub link_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_17 { + pub type_: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_18 { + pub link_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_19 { + pub prog_fd: __u32, + pub map_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_20 { + pub flags: __u32, + pub bpffs_fd: __u32, +} +pub mod bpf_func_id { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_FUNC_unspec: Type = 0; + pub const BPF_FUNC_map_lookup_elem: Type = 1; + pub const BPF_FUNC_map_update_elem: Type = 2; + pub const BPF_FUNC_map_delete_elem: Type = 3; + pub const BPF_FUNC_probe_read: Type = 4; + pub const BPF_FUNC_ktime_get_ns: Type = 5; + pub const BPF_FUNC_trace_printk: Type = 6; + pub const BPF_FUNC_get_prandom_u32: Type = 7; + pub const BPF_FUNC_get_smp_processor_id: Type = 8; + pub const BPF_FUNC_skb_store_bytes: Type = 9; + pub const BPF_FUNC_l3_csum_replace: Type = 10; + pub const BPF_FUNC_l4_csum_replace: Type = 11; + pub const BPF_FUNC_tail_call: Type = 12; + pub const BPF_FUNC_clone_redirect: Type = 13; + pub const BPF_FUNC_get_current_pid_tgid: Type = 14; + pub const BPF_FUNC_get_current_uid_gid: Type = 15; + pub const BPF_FUNC_get_current_comm: Type = 16; + pub const BPF_FUNC_get_cgroup_classid: Type = 17; + pub const BPF_FUNC_skb_vlan_push: Type = 18; + pub const BPF_FUNC_skb_vlan_pop: Type = 19; + pub const BPF_FUNC_skb_get_tunnel_key: Type = 20; + pub const BPF_FUNC_skb_set_tunnel_key: Type = 21; + pub const BPF_FUNC_perf_event_read: Type = 22; + pub const BPF_FUNC_redirect: Type = 23; + pub const BPF_FUNC_get_route_realm: Type = 24; + pub const BPF_FUNC_perf_event_output: Type = 25; + pub const BPF_FUNC_skb_load_bytes: Type = 26; + pub const BPF_FUNC_get_stackid: Type = 27; + pub const BPF_FUNC_csum_diff: Type = 28; + pub const BPF_FUNC_skb_get_tunnel_opt: Type = 29; + pub const BPF_FUNC_skb_set_tunnel_opt: Type = 30; + pub const BPF_FUNC_skb_change_proto: Type = 31; + pub const BPF_FUNC_skb_change_type: Type = 32; + pub const BPF_FUNC_skb_under_cgroup: Type = 33; + pub const BPF_FUNC_get_hash_recalc: Type = 34; + pub const BPF_FUNC_get_current_task: Type = 35; + pub const BPF_FUNC_probe_write_user: Type = 36; + pub const BPF_FUNC_current_task_under_cgroup: Type = 37; + pub const BPF_FUNC_skb_change_tail: Type = 38; + pub const BPF_FUNC_skb_pull_data: Type = 39; + pub const BPF_FUNC_csum_update: Type = 40; + pub const BPF_FUNC_set_hash_invalid: Type = 41; + pub const BPF_FUNC_get_numa_node_id: Type = 42; + pub const BPF_FUNC_skb_change_head: Type = 43; + pub const BPF_FUNC_xdp_adjust_head: Type = 44; + pub const BPF_FUNC_probe_read_str: Type = 45; + pub const BPF_FUNC_get_socket_cookie: Type = 46; + pub const BPF_FUNC_get_socket_uid: Type = 47; + pub const BPF_FUNC_set_hash: Type = 48; + pub const BPF_FUNC_setsockopt: Type = 49; + pub const BPF_FUNC_skb_adjust_room: Type = 50; + pub const BPF_FUNC_redirect_map: Type = 51; + pub const BPF_FUNC_sk_redirect_map: Type = 52; + pub const BPF_FUNC_sock_map_update: Type = 53; + pub const BPF_FUNC_xdp_adjust_meta: Type = 54; + pub const BPF_FUNC_perf_event_read_value: Type = 55; + pub const BPF_FUNC_perf_prog_read_value: Type = 56; + pub const BPF_FUNC_getsockopt: Type = 57; + pub const BPF_FUNC_override_return: Type = 58; + pub const BPF_FUNC_sock_ops_cb_flags_set: Type = 59; + pub const BPF_FUNC_msg_redirect_map: Type = 60; + pub const BPF_FUNC_msg_apply_bytes: Type = 61; + pub const BPF_FUNC_msg_cork_bytes: Type = 62; + pub const BPF_FUNC_msg_pull_data: Type = 63; + pub const BPF_FUNC_bind: Type = 64; + pub const BPF_FUNC_xdp_adjust_tail: Type = 65; + pub const BPF_FUNC_skb_get_xfrm_state: Type = 66; + pub const BPF_FUNC_get_stack: Type = 67; + pub const BPF_FUNC_skb_load_bytes_relative: Type = 68; + pub const BPF_FUNC_fib_lookup: Type = 69; + pub const BPF_FUNC_sock_hash_update: Type = 70; + pub const BPF_FUNC_msg_redirect_hash: Type = 71; + pub const BPF_FUNC_sk_redirect_hash: Type = 72; + pub const BPF_FUNC_lwt_push_encap: Type = 73; + pub const BPF_FUNC_lwt_seg6_store_bytes: Type = 74; + pub const BPF_FUNC_lwt_seg6_adjust_srh: Type = 75; + pub const BPF_FUNC_lwt_seg6_action: Type = 76; + pub const BPF_FUNC_rc_repeat: Type = 77; + pub const BPF_FUNC_rc_keydown: Type = 78; + pub const BPF_FUNC_skb_cgroup_id: Type = 79; + pub const BPF_FUNC_get_current_cgroup_id: Type = 80; + pub const BPF_FUNC_get_local_storage: Type = 81; + pub const BPF_FUNC_sk_select_reuseport: Type = 82; + pub const BPF_FUNC_skb_ancestor_cgroup_id: Type = 83; + pub const BPF_FUNC_sk_lookup_tcp: Type = 84; + pub const BPF_FUNC_sk_lookup_udp: Type = 85; + pub const BPF_FUNC_sk_release: Type = 86; + pub const BPF_FUNC_map_push_elem: Type = 87; + pub const BPF_FUNC_map_pop_elem: Type = 88; + pub const BPF_FUNC_map_peek_elem: Type = 89; + pub const BPF_FUNC_msg_push_data: Type = 90; + pub const BPF_FUNC_msg_pop_data: Type = 91; + pub const BPF_FUNC_rc_pointer_rel: Type = 92; + pub const BPF_FUNC_spin_lock: Type = 93; + pub const BPF_FUNC_spin_unlock: Type = 94; + pub const BPF_FUNC_sk_fullsock: Type = 95; + pub const BPF_FUNC_tcp_sock: Type = 96; + pub const BPF_FUNC_skb_ecn_set_ce: Type = 97; + pub const BPF_FUNC_get_listener_sock: Type = 98; + pub const BPF_FUNC_skc_lookup_tcp: Type = 99; + pub const BPF_FUNC_tcp_check_syncookie: Type = 100; + pub const BPF_FUNC_sysctl_get_name: Type = 101; + pub const BPF_FUNC_sysctl_get_current_value: Type = 102; + pub const BPF_FUNC_sysctl_get_new_value: Type = 103; + pub const BPF_FUNC_sysctl_set_new_value: Type = 104; + pub const BPF_FUNC_strtol: Type = 105; + pub const BPF_FUNC_strtoul: Type = 106; + pub const BPF_FUNC_sk_storage_get: Type = 107; + pub const BPF_FUNC_sk_storage_delete: Type = 108; + pub const BPF_FUNC_send_signal: Type = 109; + pub const BPF_FUNC_tcp_gen_syncookie: Type = 110; + pub const BPF_FUNC_skb_output: Type = 111; + pub const BPF_FUNC_probe_read_user: Type = 112; + pub const BPF_FUNC_probe_read_kernel: Type = 113; + pub const BPF_FUNC_probe_read_user_str: Type = 114; + pub const BPF_FUNC_probe_read_kernel_str: Type = 115; + pub const BPF_FUNC_tcp_send_ack: Type = 116; + pub const BPF_FUNC_send_signal_thread: Type = 117; + pub const BPF_FUNC_jiffies64: Type = 118; + pub const BPF_FUNC_read_branch_records: Type = 119; + pub const BPF_FUNC_get_ns_current_pid_tgid: Type = 120; + pub const BPF_FUNC_xdp_output: Type = 121; + pub const BPF_FUNC_get_netns_cookie: Type = 122; + pub const BPF_FUNC_get_current_ancestor_cgroup_id: Type = 123; + pub const BPF_FUNC_sk_assign: Type = 124; + pub const BPF_FUNC_ktime_get_boot_ns: Type = 125; + pub const BPF_FUNC_seq_printf: Type = 126; + pub const BPF_FUNC_seq_write: Type = 127; + pub const BPF_FUNC_sk_cgroup_id: Type = 128; + pub const BPF_FUNC_sk_ancestor_cgroup_id: Type = 129; + pub const BPF_FUNC_ringbuf_output: Type = 130; + pub const BPF_FUNC_ringbuf_reserve: Type = 131; + pub const BPF_FUNC_ringbuf_submit: Type = 132; + pub const BPF_FUNC_ringbuf_discard: Type = 133; + pub const BPF_FUNC_ringbuf_query: Type = 134; + pub const BPF_FUNC_csum_level: Type = 135; + pub const BPF_FUNC_skc_to_tcp6_sock: Type = 136; + pub const BPF_FUNC_skc_to_tcp_sock: Type = 137; + pub const BPF_FUNC_skc_to_tcp_timewait_sock: Type = 138; + pub const BPF_FUNC_skc_to_tcp_request_sock: Type = 139; + pub const BPF_FUNC_skc_to_udp6_sock: Type = 140; + pub const BPF_FUNC_get_task_stack: Type = 141; + pub const BPF_FUNC_load_hdr_opt: Type = 142; + pub const BPF_FUNC_store_hdr_opt: Type = 143; + pub const BPF_FUNC_reserve_hdr_opt: Type = 144; + pub const BPF_FUNC_inode_storage_get: Type = 145; + pub const BPF_FUNC_inode_storage_delete: Type = 146; + pub const BPF_FUNC_d_path: Type = 147; + pub const BPF_FUNC_copy_from_user: Type = 148; + pub const BPF_FUNC_snprintf_btf: Type = 149; + pub const BPF_FUNC_seq_printf_btf: Type = 150; + pub const BPF_FUNC_skb_cgroup_classid: Type = 151; + pub const BPF_FUNC_redirect_neigh: Type = 152; + pub const BPF_FUNC_per_cpu_ptr: Type = 153; + pub const BPF_FUNC_this_cpu_ptr: Type = 154; + pub const BPF_FUNC_redirect_peer: Type = 155; + pub const BPF_FUNC_task_storage_get: Type = 156; + pub const BPF_FUNC_task_storage_delete: Type = 157; + pub const BPF_FUNC_get_current_task_btf: Type = 158; + pub const BPF_FUNC_bprm_opts_set: Type = 159; + pub const BPF_FUNC_ktime_get_coarse_ns: Type = 160; + pub const BPF_FUNC_ima_inode_hash: Type = 161; + pub const BPF_FUNC_sock_from_file: Type = 162; + pub const BPF_FUNC_check_mtu: Type = 163; + pub const BPF_FUNC_for_each_map_elem: Type = 164; + pub const BPF_FUNC_snprintf: Type = 165; + pub const BPF_FUNC_sys_bpf: Type = 166; + pub const BPF_FUNC_btf_find_by_name_kind: Type = 167; + pub const BPF_FUNC_sys_close: Type = 168; + pub const BPF_FUNC_timer_init: Type = 169; + pub const BPF_FUNC_timer_set_callback: Type = 170; + pub const BPF_FUNC_timer_start: Type = 171; + pub const BPF_FUNC_timer_cancel: Type = 172; + pub const BPF_FUNC_get_func_ip: Type = 173; + pub const BPF_FUNC_get_attach_cookie: Type = 174; + pub const BPF_FUNC_task_pt_regs: Type = 175; + pub const BPF_FUNC_get_branch_snapshot: Type = 176; + pub const BPF_FUNC_trace_vprintk: Type = 177; + pub const BPF_FUNC_skc_to_unix_sock: Type = 178; + pub const BPF_FUNC_kallsyms_lookup_name: Type = 179; + pub const BPF_FUNC_find_vma: Type = 180; + pub const BPF_FUNC_loop: Type = 181; + pub const BPF_FUNC_strncmp: Type = 182; + pub const BPF_FUNC_get_func_arg: Type = 183; + pub const BPF_FUNC_get_func_ret: Type = 184; + pub const BPF_FUNC_get_func_arg_cnt: Type = 185; + pub const BPF_FUNC_get_retval: Type = 186; + pub const BPF_FUNC_set_retval: Type = 187; + pub const BPF_FUNC_xdp_get_buff_len: Type = 188; + pub const BPF_FUNC_xdp_load_bytes: Type = 189; + pub const BPF_FUNC_xdp_store_bytes: Type = 190; + pub const BPF_FUNC_copy_from_user_task: Type = 191; + pub const BPF_FUNC_skb_set_tstamp: Type = 192; + pub const BPF_FUNC_ima_file_hash: Type = 193; + pub const BPF_FUNC_kptr_xchg: Type = 194; + pub const BPF_FUNC_map_lookup_percpu_elem: Type = 195; + pub const BPF_FUNC_skc_to_mptcp_sock: Type = 196; + pub const BPF_FUNC_dynptr_from_mem: Type = 197; + pub const BPF_FUNC_ringbuf_reserve_dynptr: Type = 198; + pub const BPF_FUNC_ringbuf_submit_dynptr: Type = 199; + pub const BPF_FUNC_ringbuf_discard_dynptr: Type = 200; + pub const BPF_FUNC_dynptr_read: Type = 201; + pub const BPF_FUNC_dynptr_write: Type = 202; + pub const BPF_FUNC_dynptr_data: Type = 203; + pub const BPF_FUNC_tcp_raw_gen_syncookie_ipv4: Type = 204; + pub const BPF_FUNC_tcp_raw_gen_syncookie_ipv6: Type = 205; + pub const BPF_FUNC_tcp_raw_check_syncookie_ipv4: Type = 206; + pub const BPF_FUNC_tcp_raw_check_syncookie_ipv6: Type = 207; + pub const BPF_FUNC_ktime_get_tai_ns: Type = 208; + pub const BPF_FUNC_user_ringbuf_drain: Type = 209; + pub const BPF_FUNC_cgrp_storage_get: Type = 210; + pub const BPF_FUNC_cgrp_storage_delete: Type = 211; + pub const __BPF_FUNC_MAX_ID: Type = 212; +} +pub const BPF_F_RECOMPUTE_CSUM: _bindgen_ty_6 = 1; +pub const BPF_F_INVALIDATE_HASH: _bindgen_ty_6 = 2; +pub type _bindgen_ty_6 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_HDR_FIELD_MASK: _bindgen_ty_7 = 15; +pub type _bindgen_ty_7 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_PSEUDO_HDR: _bindgen_ty_8 = 16; +pub const BPF_F_MARK_MANGLED_0: _bindgen_ty_8 = 32; +pub const BPF_F_MARK_ENFORCE: _bindgen_ty_8 = 64; +pub type _bindgen_ty_8 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_INGRESS: _bindgen_ty_9 = 1; +pub type _bindgen_ty_9 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_TUNINFO_IPV6: _bindgen_ty_10 = 1; +pub type _bindgen_ty_10 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_SKIP_FIELD_MASK: _bindgen_ty_11 = 255; +pub const BPF_F_USER_STACK: _bindgen_ty_11 = 256; +pub const BPF_F_FAST_STACK_CMP: _bindgen_ty_11 = 512; +pub const BPF_F_REUSE_STACKID: _bindgen_ty_11 = 1024; +pub const BPF_F_USER_BUILD_ID: _bindgen_ty_11 = 2048; +pub type _bindgen_ty_11 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_ZERO_CSUM_TX: _bindgen_ty_12 = 2; +pub const BPF_F_DONT_FRAGMENT: _bindgen_ty_12 = 4; +pub const BPF_F_SEQ_NUMBER: _bindgen_ty_12 = 8; +pub const BPF_F_NO_TUNNEL_KEY: _bindgen_ty_12 = 16; +pub type _bindgen_ty_12 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_TUNINFO_FLAGS: _bindgen_ty_13 = 16; +pub type _bindgen_ty_13 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_INDEX_MASK: _bindgen_ty_14 = 4294967295; +pub const BPF_F_CURRENT_CPU: _bindgen_ty_14 = 4294967295; +pub const BPF_F_CTXLEN_MASK: _bindgen_ty_14 = 4503595332403200; +pub type _bindgen_ty_14 = ::aya_ebpf_cty::c_ulong; +pub const BPF_F_CURRENT_NETNS: _bindgen_ty_15 = -1; +pub type _bindgen_ty_15 = ::aya_ebpf_cty::c_int; +pub const BPF_CSUM_LEVEL_QUERY: _bindgen_ty_16 = 0; +pub const BPF_CSUM_LEVEL_INC: _bindgen_ty_16 = 1; +pub const BPF_CSUM_LEVEL_DEC: _bindgen_ty_16 = 2; +pub const BPF_CSUM_LEVEL_RESET: _bindgen_ty_16 = 3; +pub type _bindgen_ty_16 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_ADJ_ROOM_FIXED_GSO: _bindgen_ty_17 = 1; +pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: _bindgen_ty_17 = 2; +pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: _bindgen_ty_17 = 4; +pub const BPF_F_ADJ_ROOM_ENCAP_L4_GRE: _bindgen_ty_17 = 8; +pub const BPF_F_ADJ_ROOM_ENCAP_L4_UDP: _bindgen_ty_17 = 16; +pub const BPF_F_ADJ_ROOM_NO_CSUM_RESET: _bindgen_ty_17 = 32; +pub const BPF_F_ADJ_ROOM_ENCAP_L2_ETH: _bindgen_ty_17 = 64; +pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV4: _bindgen_ty_17 = 128; +pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV6: _bindgen_ty_17 = 256; +pub type _bindgen_ty_17 = ::aya_ebpf_cty::c_uint; +pub const BPF_ADJ_ROOM_ENCAP_L2_MASK: _bindgen_ty_18 = 255; +pub const BPF_ADJ_ROOM_ENCAP_L2_SHIFT: _bindgen_ty_18 = 56; +pub type _bindgen_ty_18 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_SYSCTL_BASE_NAME: _bindgen_ty_19 = 1; +pub type _bindgen_ty_19 = ::aya_ebpf_cty::c_uint; +pub const BPF_LOCAL_STORAGE_GET_F_CREATE: _bindgen_ty_20 = 1; +pub const BPF_SK_STORAGE_GET_F_CREATE: _bindgen_ty_20 = 1; +pub type _bindgen_ty_20 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_GET_BRANCH_RECORDS_SIZE: _bindgen_ty_21 = 1; +pub type _bindgen_ty_21 = ::aya_ebpf_cty::c_uint; +pub const BPF_RB_NO_WAKEUP: _bindgen_ty_22 = 1; +pub const BPF_RB_FORCE_WAKEUP: _bindgen_ty_22 = 2; +pub type _bindgen_ty_22 = ::aya_ebpf_cty::c_uint; +pub const BPF_RB_AVAIL_DATA: _bindgen_ty_23 = 0; +pub const BPF_RB_RING_SIZE: _bindgen_ty_23 = 1; +pub const BPF_RB_CONS_POS: _bindgen_ty_23 = 2; +pub const BPF_RB_PROD_POS: _bindgen_ty_23 = 3; +pub type _bindgen_ty_23 = ::aya_ebpf_cty::c_uint; +pub const BPF_RINGBUF_BUSY_BIT: _bindgen_ty_24 = 2147483648; +pub const BPF_RINGBUF_DISCARD_BIT: _bindgen_ty_24 = 1073741824; +pub const BPF_RINGBUF_HDR_SZ: _bindgen_ty_24 = 8; +pub type _bindgen_ty_24 = ::aya_ebpf_cty::c_uint; +pub const BPF_SK_LOOKUP_F_REPLACE: _bindgen_ty_25 = 1; +pub const BPF_SK_LOOKUP_F_NO_REUSEPORT: _bindgen_ty_25 = 2; +pub type _bindgen_ty_25 = ::aya_ebpf_cty::c_uint; +pub mod bpf_adj_room_mode { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_ADJ_ROOM_NET: Type = 0; + pub const BPF_ADJ_ROOM_MAC: Type = 1; +} +pub mod bpf_hdr_start_off { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_HDR_START_MAC: Type = 0; + pub const BPF_HDR_START_NET: Type = 1; +} +pub mod bpf_lwt_encap_mode { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_LWT_ENCAP_SEG6: Type = 0; + pub const BPF_LWT_ENCAP_SEG6_INLINE: Type = 1; + pub const BPF_LWT_ENCAP_IP: Type = 2; +} +pub const BPF_F_BPRM_SECUREEXEC: _bindgen_ty_26 = 1; +pub type _bindgen_ty_26 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_BROADCAST: _bindgen_ty_27 = 8; +pub const BPF_F_EXCLUDE_INGRESS: _bindgen_ty_27 = 16; +pub type _bindgen_ty_27 = ::aya_ebpf_cty::c_uint; +pub mod _bindgen_ty_28 { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_SKB_TSTAMP_UNSPEC: Type = 0; + pub const BPF_SKB_TSTAMP_DELIVERY_MONO: Type = 1; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct __sk_buff { + pub len: __u32, + pub pkt_type: __u32, + pub mark: __u32, + pub queue_mapping: __u32, + pub protocol: __u32, + pub vlan_present: __u32, + pub vlan_tci: __u32, + pub vlan_proto: __u32, + pub priority: __u32, + pub ingress_ifindex: __u32, + pub ifindex: __u32, + pub tc_index: __u32, + pub cb: [__u32; 5usize], + pub hash: __u32, + pub tc_classid: __u32, + pub data: __u32, + pub data_end: __u32, + pub napi_id: __u32, + pub family: __u32, + pub remote_ip4: __u32, + pub local_ip4: __u32, + pub remote_ip6: [__u32; 4usize], + pub local_ip6: [__u32; 4usize], + pub remote_port: __u32, + pub local_port: __u32, + pub data_meta: __u32, + pub __bindgen_anon_1: __sk_buff__bindgen_ty_1, + pub tstamp: __u64, + pub wire_len: __u32, + pub gso_segs: __u32, + pub __bindgen_anon_2: __sk_buff__bindgen_ty_2, + pub gso_size: __u32, + pub tstamp_type: __u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub hwtstamp: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union __sk_buff__bindgen_ty_1 { + pub flow_keys: *mut bpf_flow_keys, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl __sk_buff__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union __sk_buff__bindgen_ty_2 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl __sk_buff__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +impl __sk_buff { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_tunnel_key { + pub tunnel_id: __u32, + pub __bindgen_anon_1: bpf_tunnel_key__bindgen_ty_1, + pub tunnel_tos: __u8, + pub tunnel_ttl: __u8, + pub __bindgen_anon_2: bpf_tunnel_key__bindgen_ty_2, + pub tunnel_label: __u32, + pub __bindgen_anon_3: bpf_tunnel_key__bindgen_ty_3, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_tunnel_key__bindgen_ty_1 { + pub remote_ipv4: __u32, + pub remote_ipv6: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_tunnel_key__bindgen_ty_2 { + pub tunnel_ext: __u16, + pub tunnel_flags: __be16, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_tunnel_key__bindgen_ty_3 { + pub local_ipv4: __u32, + pub local_ipv6: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_xfrm_state { + pub reqid: __u32, + pub spi: __u32, + pub family: __u16, + pub ext: __u16, + pub __bindgen_anon_1: bpf_xfrm_state__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_xfrm_state__bindgen_ty_1 { + pub remote_ipv4: __u32, + pub remote_ipv6: [__u32; 4usize], +} +pub mod bpf_ret_code { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_OK: Type = 0; + pub const BPF_DROP: Type = 2; + pub const BPF_REDIRECT: Type = 7; + pub const BPF_LWT_REROUTE: Type = 128; + pub const BPF_FLOW_DISSECTOR_CONTINUE: Type = 129; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_sock { + pub bound_dev_if: __u32, + pub family: __u32, + pub type_: __u32, + pub protocol: __u32, + pub mark: __u32, + pub priority: __u32, + pub src_ip4: __u32, + pub src_ip6: [__u32; 4usize], + pub src_port: __u32, + pub dst_port: __be16, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, + pub dst_ip4: __u32, + pub dst_ip6: [__u32; 4usize], + pub state: __u32, + pub rx_queue_mapping: __s32, +} +impl bpf_sock { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_tcp_sock { + pub snd_cwnd: __u32, + pub srtt_us: __u32, + pub rtt_min: __u32, + pub snd_ssthresh: __u32, + pub rcv_nxt: __u32, + pub snd_nxt: __u32, + pub snd_una: __u32, + pub mss_cache: __u32, + pub ecn_flags: __u32, + pub rate_delivered: __u32, + pub rate_interval_us: __u32, + pub packets_out: __u32, + pub retrans_out: __u32, + pub total_retrans: __u32, + pub segs_in: __u32, + pub data_segs_in: __u32, + pub segs_out: __u32, + pub data_segs_out: __u32, + pub lost_out: __u32, + pub sacked_out: __u32, + pub bytes_received: __u64, + pub bytes_acked: __u64, + pub dsack_dups: __u32, + pub delivered: __u32, + pub delivered_ce: __u32, + pub icsk_retransmits: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sock_tuple { + pub __bindgen_anon_1: bpf_sock_tuple__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sock_tuple__bindgen_ty_1 { + pub ipv4: bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1, + pub ipv6: bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 { + pub saddr: __be32, + pub daddr: __be32, + pub sport: __be16, + pub dport: __be16, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 { + pub saddr: [__be32; 4usize], + pub daddr: [__be32; 4usize], + pub sport: __be16, + pub dport: __be16, +} +pub mod tcx_action_base { + pub type Type = ::aya_ebpf_cty::c_int; + pub const TCX_NEXT: Type = -1; + pub const TCX_PASS: Type = 0; + pub const TCX_DROP: Type = 2; + pub const TCX_REDIRECT: Type = 7; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_xdp_sock { + pub queue_id: __u32, +} +pub mod xdp_action { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const XDP_ABORTED: Type = 0; + pub const XDP_DROP: Type = 1; + pub const XDP_PASS: Type = 2; + pub const XDP_TX: Type = 3; + pub const XDP_REDIRECT: Type = 4; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct xdp_md { + pub data: __u32, + pub data_end: __u32, + pub data_meta: __u32, + pub ingress_ifindex: __u32, + pub rx_queue_index: __u32, + pub egress_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_devmap_val { + pub ifindex: __u32, + pub bpf_prog: bpf_devmap_val__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_devmap_val__bindgen_ty_1 { + pub fd: ::aya_ebpf_cty::c_int, + pub id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_cpumap_val { + pub qsize: __u32, + pub bpf_prog: bpf_cpumap_val__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_cpumap_val__bindgen_ty_1 { + pub fd: ::aya_ebpf_cty::c_int, + pub id: __u32, +} +pub mod sk_action { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const SK_DROP: Type = 0; + pub const SK_PASS: Type = 1; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sk_msg_md { + pub __bindgen_anon_1: sk_msg_md__bindgen_ty_1, + pub __bindgen_anon_2: sk_msg_md__bindgen_ty_2, + pub family: __u32, + pub remote_ip4: __u32, + pub local_ip4: __u32, + pub remote_ip6: [__u32; 4usize], + pub local_ip6: [__u32; 4usize], + pub remote_port: __u32, + pub local_port: __u32, + pub size: __u32, + pub __bindgen_anon_3: sk_msg_md__bindgen_ty_3, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sk_msg_md__bindgen_ty_1 { + pub data: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_msg_md__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sk_msg_md__bindgen_ty_2 { + pub data_end: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_msg_md__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sk_msg_md__bindgen_ty_3 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_msg_md__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sk_reuseport_md { + pub __bindgen_anon_1: sk_reuseport_md__bindgen_ty_1, + pub __bindgen_anon_2: sk_reuseport_md__bindgen_ty_2, + pub len: __u32, + pub eth_protocol: __u32, + pub ip_protocol: __u32, + pub bind_inany: __u32, + pub hash: __u32, + pub __bindgen_anon_3: sk_reuseport_md__bindgen_ty_3, + pub __bindgen_anon_4: sk_reuseport_md__bindgen_ty_4, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sk_reuseport_md__bindgen_ty_1 { + pub data: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_reuseport_md__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sk_reuseport_md__bindgen_ty_2 { + pub data_end: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_reuseport_md__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sk_reuseport_md__bindgen_ty_3 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_reuseport_md__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sk_reuseport_md__bindgen_ty_4 { + pub migrating_sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_reuseport_md__bindgen_ty_4 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_prog_info { + pub type_: __u32, + pub id: __u32, + pub tag: [__u8; 8usize], + pub jited_prog_len: __u32, + pub xlated_prog_len: __u32, + pub jited_prog_insns: __u64, + pub xlated_prog_insns: __u64, + pub load_time: __u64, + pub created_by_uid: __u32, + pub nr_map_ids: __u32, + pub map_ids: __u64, + pub name: [::aya_ebpf_cty::c_char; 16usize], + pub ifindex: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub netns_dev: __u64, + pub netns_ino: __u64, + pub nr_jited_ksyms: __u32, + pub nr_jited_func_lens: __u32, + pub jited_ksyms: __u64, + pub jited_func_lens: __u64, + pub btf_id: __u32, + pub func_info_rec_size: __u32, + pub func_info: __u64, + pub nr_func_info: __u32, + pub nr_line_info: __u32, + pub line_info: __u64, + pub jited_line_info: __u64, + pub nr_jited_line_info: __u32, + pub line_info_rec_size: __u32, + pub jited_line_info_rec_size: __u32, + pub nr_prog_tags: __u32, + pub prog_tags: __u64, + pub run_time_ns: __u64, + pub run_cnt: __u64, + pub recursion_misses: __u64, + pub verified_insns: __u32, + pub attach_btf_obj_id: __u32, + pub attach_btf_id: __u32, +} +impl bpf_prog_info { + #[inline] + pub fn gpl_compatible(&self) -> __u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_gpl_compatible(&mut self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let gpl_compatible: u32 = unsafe { ::core::mem::transmute(gpl_compatible) }; + gpl_compatible as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_map_info { + pub type_: __u32, + pub id: __u32, + pub key_size: __u32, + pub value_size: __u32, + pub max_entries: __u32, + pub map_flags: __u32, + pub name: [::aya_ebpf_cty::c_char; 16usize], + pub ifindex: __u32, + pub btf_vmlinux_value_type_id: __u32, + pub netns_dev: __u64, + pub netns_ino: __u64, + pub btf_id: __u32, + pub btf_key_type_id: __u32, + pub btf_value_type_id: __u32, + pub btf_vmlinux_id: __u32, + pub map_extra: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_btf_info { + pub btf: __u64, + pub btf_size: __u32, + pub id: __u32, + pub name: __u64, + pub name_len: __u32, + pub kernel_btf: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info { + pub type_: __u32, + pub id: __u32, + pub prog_id: __u32, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1 { + pub raw_tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_1, + pub tracing: bpf_link_info__bindgen_ty_1__bindgen_ty_2, + pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_3, + pub iter: bpf_link_info__bindgen_ty_1__bindgen_ty_4, + pub netns: bpf_link_info__bindgen_ty_1__bindgen_ty_5, + pub xdp: bpf_link_info__bindgen_ty_1__bindgen_ty_6, + pub struct_ops: bpf_link_info__bindgen_ty_1__bindgen_ty_7, + pub netfilter: bpf_link_info__bindgen_ty_1__bindgen_ty_8, + pub kprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_9, + pub uprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_10, + pub perf_event: bpf_link_info__bindgen_ty_1__bindgen_ty_11, + pub tcx: bpf_link_info__bindgen_ty_1__bindgen_ty_12, + pub netkit: bpf_link_info__bindgen_ty_1__bindgen_ty_13, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_1 { + pub tp_name: __u64, + pub tp_name_len: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_2 { + pub attach_type: __u32, + pub target_obj_id: __u32, + pub target_btf_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_3 { + pub cgroup_id: __u64, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4 { + pub target_name: __u64, + pub target_name_len: __u32, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, + pub __bindgen_anon_2: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 { + pub map: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 { + pub map_id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 { + pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1, + pub task: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 { + pub cgroup_id: __u64, + pub order: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 { + pub tid: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_5 { + pub netns_ino: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_6 { + pub ifindex: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_7 { + pub map_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_8 { + pub pf: __u32, + pub hooknum: __u32, + pub priority: __s32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_9 { + pub addrs: __u64, + pub count: __u32, + pub flags: __u32, + pub missed: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_10 { + pub path: __u64, + pub offsets: __u64, + pub ref_ctr_offsets: __u64, + pub cookies: __u64, + pub path_size: __u32, + pub count: __u32, + pub flags: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11 { + pub type_: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 { + pub uprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1, + pub kprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2, + pub tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3, + pub event: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 { + pub file_name: __u64, + pub name_len: __u32, + pub offset: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 { + pub func_name: __u64, + pub name_len: __u32, + pub offset: __u32, + pub addr: __u64, + pub missed: __u64, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 { + pub tp_name: __u64, + pub name_len: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 { + pub config: __u64, + pub type_: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_12 { + pub ifindex: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_13 { + pub ifindex: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sock_addr { + pub user_family: __u32, + pub user_ip4: __u32, + pub user_ip6: [__u32; 4usize], + pub user_port: __u32, + pub family: __u32, + pub type_: __u32, + pub protocol: __u32, + pub msg_src_ip4: __u32, + pub msg_src_ip6: [__u32; 4usize], + pub __bindgen_anon_1: bpf_sock_addr__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sock_addr__bindgen_ty_1 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sock_addr__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sock_ops { + pub op: __u32, + pub __bindgen_anon_1: bpf_sock_ops__bindgen_ty_1, + pub family: __u32, + pub remote_ip4: __u32, + pub local_ip4: __u32, + pub remote_ip6: [__u32; 4usize], + pub local_ip6: [__u32; 4usize], + pub remote_port: __u32, + pub local_port: __u32, + pub is_fullsock: __u32, + pub snd_cwnd: __u32, + pub srtt_us: __u32, + pub bpf_sock_ops_cb_flags: __u32, + pub state: __u32, + pub rtt_min: __u32, + pub snd_ssthresh: __u32, + pub rcv_nxt: __u32, + pub snd_nxt: __u32, + pub snd_una: __u32, + pub mss_cache: __u32, + pub ecn_flags: __u32, + pub rate_delivered: __u32, + pub rate_interval_us: __u32, + pub packets_out: __u32, + pub retrans_out: __u32, + pub total_retrans: __u32, + pub segs_in: __u32, + pub data_segs_in: __u32, + pub segs_out: __u32, + pub data_segs_out: __u32, + pub lost_out: __u32, + pub sacked_out: __u32, + pub sk_txhash: __u32, + pub bytes_received: __u64, + pub bytes_acked: __u64, + pub __bindgen_anon_2: bpf_sock_ops__bindgen_ty_2, + pub __bindgen_anon_3: bpf_sock_ops__bindgen_ty_3, + pub __bindgen_anon_4: bpf_sock_ops__bindgen_ty_4, + pub skb_len: __u32, + pub skb_tcp_flags: __u32, + pub skb_hwtstamp: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sock_ops__bindgen_ty_1 { + pub args: [__u32; 4usize], + pub reply: __u32, + pub replylong: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sock_ops__bindgen_ty_2 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sock_ops__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sock_ops__bindgen_ty_3 { + pub skb_data: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sock_ops__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sock_ops__bindgen_ty_4 { + pub skb_data_end: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sock_ops__bindgen_ty_4 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +pub const BPF_SOCK_OPS_RTO_CB_FLAG: _bindgen_ty_29 = 1; +pub const BPF_SOCK_OPS_RETRANS_CB_FLAG: _bindgen_ty_29 = 2; +pub const BPF_SOCK_OPS_STATE_CB_FLAG: _bindgen_ty_29 = 4; +pub const BPF_SOCK_OPS_RTT_CB_FLAG: _bindgen_ty_29 = 8; +pub const BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: _bindgen_ty_29 = 16; +pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: _bindgen_ty_29 = 32; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: _bindgen_ty_29 = 64; +pub const BPF_SOCK_OPS_ALL_CB_FLAGS: _bindgen_ty_29 = 127; +pub type _bindgen_ty_29 = ::aya_ebpf_cty::c_uint; +pub const BPF_SOCK_OPS_VOID: _bindgen_ty_30 = 0; +pub const BPF_SOCK_OPS_TIMEOUT_INIT: _bindgen_ty_30 = 1; +pub const BPF_SOCK_OPS_RWND_INIT: _bindgen_ty_30 = 2; +pub const BPF_SOCK_OPS_TCP_CONNECT_CB: _bindgen_ty_30 = 3; +pub const BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB: _bindgen_ty_30 = 4; +pub const BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: _bindgen_ty_30 = 5; +pub const BPF_SOCK_OPS_NEEDS_ECN: _bindgen_ty_30 = 6; +pub const BPF_SOCK_OPS_BASE_RTT: _bindgen_ty_30 = 7; +pub const BPF_SOCK_OPS_RTO_CB: _bindgen_ty_30 = 8; +pub const BPF_SOCK_OPS_RETRANS_CB: _bindgen_ty_30 = 9; +pub const BPF_SOCK_OPS_STATE_CB: _bindgen_ty_30 = 10; +pub const BPF_SOCK_OPS_TCP_LISTEN_CB: _bindgen_ty_30 = 11; +pub const BPF_SOCK_OPS_RTT_CB: _bindgen_ty_30 = 12; +pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: _bindgen_ty_30 = 13; +pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: _bindgen_ty_30 = 14; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: _bindgen_ty_30 = 15; +pub type _bindgen_ty_30 = ::aya_ebpf_cty::c_uint; +pub const BPF_TCP_ESTABLISHED: _bindgen_ty_31 = 1; +pub const BPF_TCP_SYN_SENT: _bindgen_ty_31 = 2; +pub const BPF_TCP_SYN_RECV: _bindgen_ty_31 = 3; +pub const BPF_TCP_FIN_WAIT1: _bindgen_ty_31 = 4; +pub const BPF_TCP_FIN_WAIT2: _bindgen_ty_31 = 5; +pub const BPF_TCP_TIME_WAIT: _bindgen_ty_31 = 6; +pub const BPF_TCP_CLOSE: _bindgen_ty_31 = 7; +pub const BPF_TCP_CLOSE_WAIT: _bindgen_ty_31 = 8; +pub const BPF_TCP_LAST_ACK: _bindgen_ty_31 = 9; +pub const BPF_TCP_LISTEN: _bindgen_ty_31 = 10; +pub const BPF_TCP_CLOSING: _bindgen_ty_31 = 11; +pub const BPF_TCP_NEW_SYN_RECV: _bindgen_ty_31 = 12; +pub const BPF_TCP_BOUND_INACTIVE: _bindgen_ty_31 = 13; +pub const BPF_TCP_MAX_STATES: _bindgen_ty_31 = 14; +pub type _bindgen_ty_31 = ::aya_ebpf_cty::c_uint; +pub mod _bindgen_ty_33 { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_LOAD_HDR_OPT_TCP_SYN: Type = 1; +} +pub mod _bindgen_ty_34 { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: Type = 1; + pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: Type = 2; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_perf_event_value { + pub counter: __u64, + pub enabled: __u64, + pub running: __u64, +} +pub const BPF_DEVCG_ACC_MKNOD: _bindgen_ty_35 = 1; +pub const BPF_DEVCG_ACC_READ: _bindgen_ty_35 = 2; +pub const BPF_DEVCG_ACC_WRITE: _bindgen_ty_35 = 4; +pub type _bindgen_ty_35 = ::aya_ebpf_cty::c_uint; +pub const BPF_DEVCG_DEV_BLOCK: _bindgen_ty_36 = 1; +pub const BPF_DEVCG_DEV_CHAR: _bindgen_ty_36 = 2; +pub type _bindgen_ty_36 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_cgroup_dev_ctx { + pub access_type: __u32, + pub major: __u32, + pub minor: __u32, +} +#[repr(C)] +#[derive(Debug)] +pub struct bpf_raw_tracepoint_args { + pub args: __IncompleteArrayField<__u64>, +} +pub const BPF_FIB_LOOKUP_DIRECT: _bindgen_ty_37 = 1; +pub const BPF_FIB_LOOKUP_OUTPUT: _bindgen_ty_37 = 2; +pub const BPF_FIB_LOOKUP_SKIP_NEIGH: _bindgen_ty_37 = 4; +pub const BPF_FIB_LOOKUP_TBID: _bindgen_ty_37 = 8; +pub const BPF_FIB_LOOKUP_SRC: _bindgen_ty_37 = 16; +pub type _bindgen_ty_37 = ::aya_ebpf_cty::c_uint; +pub const BPF_FIB_LKUP_RET_SUCCESS: _bindgen_ty_38 = 0; +pub const BPF_FIB_LKUP_RET_BLACKHOLE: _bindgen_ty_38 = 1; +pub const BPF_FIB_LKUP_RET_UNREACHABLE: _bindgen_ty_38 = 2; +pub const BPF_FIB_LKUP_RET_PROHIBIT: _bindgen_ty_38 = 3; +pub const BPF_FIB_LKUP_RET_NOT_FWDED: _bindgen_ty_38 = 4; +pub const BPF_FIB_LKUP_RET_FWD_DISABLED: _bindgen_ty_38 = 5; +pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: _bindgen_ty_38 = 6; +pub const BPF_FIB_LKUP_RET_NO_NEIGH: _bindgen_ty_38 = 7; +pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: _bindgen_ty_38 = 8; +pub const BPF_FIB_LKUP_RET_NO_SRC_ADDR: _bindgen_ty_38 = 9; +pub type _bindgen_ty_38 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_fib_lookup { + pub family: __u8, + pub l4_protocol: __u8, + pub sport: __be16, + pub dport: __be16, + pub __bindgen_anon_1: bpf_fib_lookup__bindgen_ty_1, + pub ifindex: __u32, + pub __bindgen_anon_2: bpf_fib_lookup__bindgen_ty_2, + pub __bindgen_anon_3: bpf_fib_lookup__bindgen_ty_3, + pub __bindgen_anon_4: bpf_fib_lookup__bindgen_ty_4, + pub __bindgen_anon_5: bpf_fib_lookup__bindgen_ty_5, + pub smac: [__u8; 6usize], + pub dmac: [__u8; 6usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_1 { + pub tot_len: __u16, + pub mtu_result: __u16, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_2 { + pub tos: __u8, + pub flowinfo: __be32, + pub rt_metric: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_3 { + pub ipv4_src: __be32, + pub ipv6_src: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_4 { + pub ipv4_dst: __be32, + pub ipv6_dst: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_5 { + pub __bindgen_anon_1: bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1, + pub tbid: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1 { + pub h_vlan_proto: __be16, + pub h_vlan_TCI: __be16, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_redir_neigh { + pub nh_family: __u32, + pub __bindgen_anon_1: bpf_redir_neigh__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_redir_neigh__bindgen_ty_1 { + pub ipv4_nh: __be32, + pub ipv6_nh: [__u32; 4usize], +} +pub mod bpf_check_mtu_flags { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MTU_CHK_SEGS: Type = 1; +} +pub mod bpf_check_mtu_ret { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MTU_CHK_RET_SUCCESS: Type = 0; + pub const BPF_MTU_CHK_RET_FRAG_NEEDED: Type = 1; + pub const BPF_MTU_CHK_RET_SEGS_TOOBIG: Type = 2; +} +pub mod bpf_task_fd_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_FD_TYPE_RAW_TRACEPOINT: Type = 0; + pub const BPF_FD_TYPE_TRACEPOINT: Type = 1; + pub const BPF_FD_TYPE_KPROBE: Type = 2; + pub const BPF_FD_TYPE_KRETPROBE: Type = 3; + pub const BPF_FD_TYPE_UPROBE: Type = 4; + pub const BPF_FD_TYPE_URETPROBE: Type = 5; +} +pub const BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: _bindgen_ty_39 = 1; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: _bindgen_ty_39 = 2; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: _bindgen_ty_39 = 4; +pub type _bindgen_ty_39 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_flow_keys { + pub nhoff: __u16, + pub thoff: __u16, + pub addr_proto: __u16, + pub is_frag: __u8, + pub is_first_frag: __u8, + pub is_encap: __u8, + pub ip_proto: __u8, + pub n_proto: __be16, + pub sport: __be16, + pub dport: __be16, + pub __bindgen_anon_1: bpf_flow_keys__bindgen_ty_1, + pub flags: __u32, + pub flow_label: __be32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_flow_keys__bindgen_ty_1 { + pub __bindgen_anon_1: bpf_flow_keys__bindgen_ty_1__bindgen_ty_1, + pub __bindgen_anon_2: bpf_flow_keys__bindgen_ty_1__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 { + pub ipv4_src: __be32, + pub ipv4_dst: __be32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 { + pub ipv6_src: [__u32; 4usize], + pub ipv6_dst: [__u32; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_func_info { + pub insn_off: __u32, + pub type_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_line_info { + pub insn_off: __u32, + pub file_name_off: __u32, + pub line_off: __u32, + pub line_col: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_spin_lock { + pub val: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_timer { + pub __opaque: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_dynptr { + pub __opaque: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_list_head { + pub __opaque: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_list_node { + pub __opaque: [__u64; 3usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_rb_root { + pub __opaque: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_rb_node { + pub __opaque: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_refcount { + pub __opaque: [__u32; 1usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_sysctl { + pub write: __u32, + pub file_pos: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sockopt { + pub __bindgen_anon_1: bpf_sockopt__bindgen_ty_1, + pub __bindgen_anon_2: bpf_sockopt__bindgen_ty_2, + pub __bindgen_anon_3: bpf_sockopt__bindgen_ty_3, + pub level: __s32, + pub optname: __s32, + pub optlen: __s32, + pub retval: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sockopt__bindgen_ty_1 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sockopt__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sockopt__bindgen_ty_2 { + pub optval: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sockopt__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sockopt__bindgen_ty_3 { + pub optval_end: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sockopt__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_pidns_info { + pub pid: __u32, + pub tgid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sk_lookup { + pub __bindgen_anon_1: bpf_sk_lookup__bindgen_ty_1, + pub family: __u32, + pub protocol: __u32, + pub remote_ip4: __u32, + pub remote_ip6: [__u32; 4usize], + pub remote_port: __be16, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, + pub local_ip4: __u32, + pub local_ip6: [__u32; 4usize], + pub local_port: __u32, + pub ingress_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sk_lookup__bindgen_ty_1 { + pub __bindgen_anon_1: bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +impl bpf_sk_lookup { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_ptr { + pub ptr: *mut ::aya_ebpf_cty::c_void, + pub type_id: __u32, + pub flags: __u32, +} +pub mod bpf_core_relo_kind { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_CORE_FIELD_BYTE_OFFSET: Type = 0; + pub const BPF_CORE_FIELD_BYTE_SIZE: Type = 1; + pub const BPF_CORE_FIELD_EXISTS: Type = 2; + pub const BPF_CORE_FIELD_SIGNED: Type = 3; + pub const BPF_CORE_FIELD_LSHIFT_U64: Type = 4; + pub const BPF_CORE_FIELD_RSHIFT_U64: Type = 5; + pub const BPF_CORE_TYPE_ID_LOCAL: Type = 6; + pub const BPF_CORE_TYPE_ID_TARGET: Type = 7; + pub const BPF_CORE_TYPE_EXISTS: Type = 8; + pub const BPF_CORE_TYPE_SIZE: Type = 9; + pub const BPF_CORE_ENUMVAL_EXISTS: Type = 10; + pub const BPF_CORE_ENUMVAL_VALUE: Type = 11; + pub const BPF_CORE_TYPE_MATCHES: Type = 12; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_core_relo { + pub insn_off: __u32, + pub type_id: __u32, + pub access_str_off: __u32, + pub kind: bpf_core_relo_kind::Type, +} +pub const BPF_F_TIMER_ABS: _bindgen_ty_41 = 1; +pub const BPF_F_TIMER_CPU_PIN: _bindgen_ty_41 = 2; +pub type _bindgen_ty_41 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_iter_num { + pub __opaque: [__u64; 1usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pt_regs { + pub gpr: [::aya_ebpf_cty::c_ulong; 32usize], + pub nip: ::aya_ebpf_cty::c_ulong, + pub msr: ::aya_ebpf_cty::c_ulong, + pub orig_gpr3: ::aya_ebpf_cty::c_ulong, + pub ctr: ::aya_ebpf_cty::c_ulong, + pub link: ::aya_ebpf_cty::c_ulong, + pub xer: ::aya_ebpf_cty::c_ulong, + pub ccr: ::aya_ebpf_cty::c_ulong, + pub softe: ::aya_ebpf_cty::c_ulong, + pub trap: ::aya_ebpf_cty::c_ulong, + pub dar: ::aya_ebpf_cty::c_ulong, + pub dsisr: ::aya_ebpf_cty::c_ulong, + pub result: ::aya_ebpf_cty::c_ulong, +} +pub type sa_family_t = ::aya_ebpf_cty::c_ushort; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sockaddr { + pub sa_family: sa_family_t, + pub sa_data: [::aya_ebpf_cty::c_char; 14usize], +} diff --git a/ebpf/aya-ebpf-bindings/src/powerpc64/helpers.rs b/ebpf/aya-ebpf-bindings/src/powerpc64/helpers.rs new file mode 100644 index 00000000..8aba5810 --- /dev/null +++ b/ebpf/aya-ebpf-bindings/src/powerpc64/helpers.rs @@ -0,0 +1,2148 @@ +use super::bindings::*; +pub unsafe fn bpf_map_lookup_elem( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(1usize); + fun(map, key) +} +pub unsafe fn bpf_map_update_elem( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + value: *const ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + value: *const ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(2usize); + fun(map, key, value, flags) +} +pub unsafe fn bpf_map_delete_elem( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(3usize); + fun(map, key) +} +pub unsafe fn bpf_probe_read( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(4usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_ktime_get_ns() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(5usize); + fun() +} +pub unsafe fn bpf_get_prandom_u32() -> __u32 { + let fun: unsafe extern "C" fn() -> __u32 = ::core::mem::transmute(7usize); + fun() +} +pub unsafe fn bpf_get_smp_processor_id() -> __u32 { + let fun: unsafe extern "C" fn() -> __u32 = ::core::mem::transmute(8usize); + fun() +} +pub unsafe fn bpf_skb_store_bytes( + skb: *mut __sk_buff, + offset: __u32, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(9usize); + fun(skb, offset, from, len, flags) +} +pub unsafe fn bpf_l3_csum_replace( + skb: *mut __sk_buff, + offset: __u32, + from: __u64, + to: __u64, + size: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + from: __u64, + to: __u64, + size: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(10usize); + fun(skb, offset, from, to, size) +} +pub unsafe fn bpf_l4_csum_replace( + skb: *mut __sk_buff, + offset: __u32, + from: __u64, + to: __u64, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + from: __u64, + to: __u64, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(11usize); + fun(skb, offset, from, to, flags) +} +pub unsafe fn bpf_tail_call( + ctx: *mut ::aya_ebpf_cty::c_void, + prog_array_map: *mut ::aya_ebpf_cty::c_void, + index: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + prog_array_map: *mut ::aya_ebpf_cty::c_void, + index: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(12usize); + fun(ctx, prog_array_map, index) +} +pub unsafe fn bpf_clone_redirect( + skb: *mut __sk_buff, + ifindex: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + ifindex: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(13usize); + fun(skb, ifindex, flags) +} +pub unsafe fn bpf_get_current_pid_tgid() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(14usize); + fun() +} +pub unsafe fn bpf_get_current_uid_gid() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(15usize); + fun() +} +pub unsafe fn bpf_get_current_comm( + buf: *mut ::aya_ebpf_cty::c_void, + size_of_buf: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + buf: *mut ::aya_ebpf_cty::c_void, + size_of_buf: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(16usize); + fun(buf, size_of_buf) +} +pub unsafe fn bpf_get_cgroup_classid(skb: *mut __sk_buff) -> __u32 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u32 = ::core::mem::transmute(17usize); + fun(skb) +} +pub unsafe fn bpf_skb_vlan_push( + skb: *mut __sk_buff, + vlan_proto: __be16, + vlan_tci: __u16, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + vlan_proto: __be16, + vlan_tci: __u16, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(18usize); + fun(skb, vlan_proto, vlan_tci) +} +pub unsafe fn bpf_skb_vlan_pop(skb: *mut __sk_buff) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(19usize); + fun(skb) +} +pub unsafe fn bpf_skb_get_tunnel_key( + skb: *mut __sk_buff, + key: *mut bpf_tunnel_key, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + key: *mut bpf_tunnel_key, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(20usize); + fun(skb, key, size, flags) +} +pub unsafe fn bpf_skb_set_tunnel_key( + skb: *mut __sk_buff, + key: *mut bpf_tunnel_key, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + key: *mut bpf_tunnel_key, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(21usize); + fun(skb, key, size, flags) +} +pub unsafe fn bpf_perf_event_read(map: *mut ::aya_ebpf_cty::c_void, flags: __u64) -> __u64 { + let fun: unsafe extern "C" fn(map: *mut ::aya_ebpf_cty::c_void, flags: __u64) -> __u64 = + ::core::mem::transmute(22usize); + fun(map, flags) +} +pub unsafe fn bpf_redirect(ifindex: __u32, flags: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(ifindex: __u32, flags: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(23usize); + fun(ifindex, flags) +} +pub unsafe fn bpf_get_route_realm(skb: *mut __sk_buff) -> __u32 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u32 = ::core::mem::transmute(24usize); + fun(skb) +} +pub unsafe fn bpf_perf_event_output( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(25usize); + fun(ctx, map, flags, data, size) +} +pub unsafe fn bpf_skb_load_bytes( + skb: *const ::aya_ebpf_cty::c_void, + offset: __u32, + to: *mut ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *const ::aya_ebpf_cty::c_void, + offset: __u32, + to: *mut ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(26usize); + fun(skb, offset, to, len) +} +pub unsafe fn bpf_get_stackid( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(27usize); + fun(ctx, map, flags) +} +pub unsafe fn bpf_csum_diff( + from: *mut __be32, + from_size: __u32, + to: *mut __be32, + to_size: __u32, + seed: __wsum, +) -> __s64 { + let fun: unsafe extern "C" fn( + from: *mut __be32, + from_size: __u32, + to: *mut __be32, + to_size: __u32, + seed: __wsum, + ) -> __s64 = ::core::mem::transmute(28usize); + fun(from, from_size, to, to_size, seed) +} +pub unsafe fn bpf_skb_get_tunnel_opt( + skb: *mut __sk_buff, + opt: *mut ::aya_ebpf_cty::c_void, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + opt: *mut ::aya_ebpf_cty::c_void, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(29usize); + fun(skb, opt, size) +} +pub unsafe fn bpf_skb_set_tunnel_opt( + skb: *mut __sk_buff, + opt: *mut ::aya_ebpf_cty::c_void, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + opt: *mut ::aya_ebpf_cty::c_void, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(30usize); + fun(skb, opt, size) +} +pub unsafe fn bpf_skb_change_proto( + skb: *mut __sk_buff, + proto: __be16, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + proto: __be16, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(31usize); + fun(skb, proto, flags) +} +pub unsafe fn bpf_skb_change_type(skb: *mut __sk_buff, type_: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, type_: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(32usize); + fun(skb, type_) +} +pub unsafe fn bpf_skb_under_cgroup( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + index: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + index: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(33usize); + fun(skb, map, index) +} +pub unsafe fn bpf_get_hash_recalc(skb: *mut __sk_buff) -> __u32 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u32 = ::core::mem::transmute(34usize); + fun(skb) +} +pub unsafe fn bpf_get_current_task() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(35usize); + fun() +} +pub unsafe fn bpf_probe_write_user( + dst: *mut ::aya_ebpf_cty::c_void, + src: *const ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + src: *const ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(36usize); + fun(dst, src, len) +} +pub unsafe fn bpf_current_task_under_cgroup( + map: *mut ::aya_ebpf_cty::c_void, + index: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + index: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(37usize); + fun(map, index) +} +pub unsafe fn bpf_skb_change_tail( + skb: *mut __sk_buff, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(38usize); + fun(skb, len, flags) +} +pub unsafe fn bpf_skb_pull_data(skb: *mut __sk_buff, len: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, len: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(39usize); + fun(skb, len) +} +pub unsafe fn bpf_csum_update(skb: *mut __sk_buff, csum: __wsum) -> __s64 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, csum: __wsum) -> __s64 = + ::core::mem::transmute(40usize); + fun(skb, csum) +} +pub unsafe fn bpf_set_hash_invalid(skb: *mut __sk_buff) { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) = ::core::mem::transmute(41usize); + fun(skb) +} +pub unsafe fn bpf_get_numa_node_id() -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn() -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(42usize); + fun() +} +pub unsafe fn bpf_skb_change_head( + skb: *mut __sk_buff, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(43usize); + fun(skb, len, flags) +} +pub unsafe fn bpf_xdp_adjust_head( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(44usize); + fun(xdp_md, delta) +} +pub unsafe fn bpf_probe_read_str( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(45usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_get_socket_cookie(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(46usize); + fun(ctx) +} +pub unsafe fn bpf_get_socket_uid(skb: *mut __sk_buff) -> __u32 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u32 = ::core::mem::transmute(47usize); + fun(skb) +} +pub unsafe fn bpf_set_hash(skb: *mut __sk_buff, hash: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, hash: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(48usize); + fun(skb, hash) +} +pub unsafe fn bpf_setsockopt( + bpf_socket: *mut ::aya_ebpf_cty::c_void, + level: ::aya_ebpf_cty::c_int, + optname: ::aya_ebpf_cty::c_int, + optval: *mut ::aya_ebpf_cty::c_void, + optlen: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + bpf_socket: *mut ::aya_ebpf_cty::c_void, + level: ::aya_ebpf_cty::c_int, + optname: ::aya_ebpf_cty::c_int, + optval: *mut ::aya_ebpf_cty::c_void, + optlen: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(49usize); + fun(bpf_socket, level, optname, optval, optlen) +} +pub unsafe fn bpf_skb_adjust_room( + skb: *mut __sk_buff, + len_diff: __s32, + mode: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + len_diff: __s32, + mode: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(50usize); + fun(skb, len_diff, mode, flags) +} +pub unsafe fn bpf_redirect_map( + map: *mut ::aya_ebpf_cty::c_void, + key: __u64, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: __u64, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(51usize); + fun(map, key, flags) +} +pub unsafe fn bpf_sk_redirect_map( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + key: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + key: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(52usize); + fun(skb, map, key, flags) +} +pub unsafe fn bpf_sock_map_update( + skops: *mut bpf_sock_ops, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(53usize); + fun(skops, map, key, flags) +} +pub unsafe fn bpf_xdp_adjust_meta( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(54usize); + fun(xdp_md, delta) +} +pub unsafe fn bpf_perf_event_read_value( + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + buf: *mut bpf_perf_event_value, + buf_size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + buf: *mut bpf_perf_event_value, + buf_size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(55usize); + fun(map, flags, buf, buf_size) +} +pub unsafe fn bpf_perf_prog_read_value( + ctx: *mut bpf_perf_event_data, + buf: *mut bpf_perf_event_value, + buf_size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_perf_event_data, + buf: *mut bpf_perf_event_value, + buf_size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(56usize); + fun(ctx, buf, buf_size) +} +pub unsafe fn bpf_getsockopt( + bpf_socket: *mut ::aya_ebpf_cty::c_void, + level: ::aya_ebpf_cty::c_int, + optname: ::aya_ebpf_cty::c_int, + optval: *mut ::aya_ebpf_cty::c_void, + optlen: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + bpf_socket: *mut ::aya_ebpf_cty::c_void, + level: ::aya_ebpf_cty::c_int, + optname: ::aya_ebpf_cty::c_int, + optval: *mut ::aya_ebpf_cty::c_void, + optlen: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(57usize); + fun(bpf_socket, level, optname, optval, optlen) +} +pub unsafe fn bpf_override_return(regs: *mut pt_regs, rc: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(regs: *mut pt_regs, rc: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(58usize); + fun(regs, rc) +} +pub unsafe fn bpf_sock_ops_cb_flags_set( + bpf_sock: *mut bpf_sock_ops, + argval: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + bpf_sock: *mut bpf_sock_ops, + argval: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(59usize); + fun(bpf_sock, argval) +} +pub unsafe fn bpf_msg_redirect_map( + msg: *mut sk_msg_md, + map: *mut ::aya_ebpf_cty::c_void, + key: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + map: *mut ::aya_ebpf_cty::c_void, + key: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(60usize); + fun(msg, map, key, flags) +} +pub unsafe fn bpf_msg_apply_bytes(msg: *mut sk_msg_md, bytes: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(msg: *mut sk_msg_md, bytes: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(61usize); + fun(msg, bytes) +} +pub unsafe fn bpf_msg_cork_bytes(msg: *mut sk_msg_md, bytes: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(msg: *mut sk_msg_md, bytes: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(62usize); + fun(msg, bytes) +} +pub unsafe fn bpf_msg_pull_data( + msg: *mut sk_msg_md, + start: __u32, + end: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + start: __u32, + end: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(63usize); + fun(msg, start, end, flags) +} +pub unsafe fn bpf_bind( + ctx: *mut bpf_sock_addr, + addr: *mut sockaddr, + addr_len: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sock_addr, + addr: *mut sockaddr, + addr_len: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(64usize); + fun(ctx, addr, addr_len) +} +pub unsafe fn bpf_xdp_adjust_tail( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(65usize); + fun(xdp_md, delta) +} +pub unsafe fn bpf_skb_get_xfrm_state( + skb: *mut __sk_buff, + index: __u32, + xfrm_state: *mut bpf_xfrm_state, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + index: __u32, + xfrm_state: *mut bpf_xfrm_state, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(66usize); + fun(skb, index, xfrm_state, size, flags) +} +pub unsafe fn bpf_get_stack( + ctx: *mut ::aya_ebpf_cty::c_void, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(67usize); + fun(ctx, buf, size, flags) +} +pub unsafe fn bpf_skb_load_bytes_relative( + skb: *const ::aya_ebpf_cty::c_void, + offset: __u32, + to: *mut ::aya_ebpf_cty::c_void, + len: __u32, + start_header: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *const ::aya_ebpf_cty::c_void, + offset: __u32, + to: *mut ::aya_ebpf_cty::c_void, + len: __u32, + start_header: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(68usize); + fun(skb, offset, to, len, start_header) +} +pub unsafe fn bpf_fib_lookup( + ctx: *mut ::aya_ebpf_cty::c_void, + params: *mut bpf_fib_lookup, + plen: ::aya_ebpf_cty::c_int, + flags: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + params: *mut bpf_fib_lookup, + plen: ::aya_ebpf_cty::c_int, + flags: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(69usize); + fun(ctx, params, plen, flags) +} +pub unsafe fn bpf_sock_hash_update( + skops: *mut bpf_sock_ops, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(70usize); + fun(skops, map, key, flags) +} +pub unsafe fn bpf_msg_redirect_hash( + msg: *mut sk_msg_md, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(71usize); + fun(msg, map, key, flags) +} +pub unsafe fn bpf_sk_redirect_hash( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(72usize); + fun(skb, map, key, flags) +} +pub unsafe fn bpf_lwt_push_encap( + skb: *mut __sk_buff, + type_: __u32, + hdr: *mut ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + type_: __u32, + hdr: *mut ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(73usize); + fun(skb, type_, hdr, len) +} +pub unsafe fn bpf_lwt_seg6_store_bytes( + skb: *mut __sk_buff, + offset: __u32, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(74usize); + fun(skb, offset, from, len) +} +pub unsafe fn bpf_lwt_seg6_adjust_srh( + skb: *mut __sk_buff, + offset: __u32, + delta: __s32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + delta: __s32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(75usize); + fun(skb, offset, delta) +} +pub unsafe fn bpf_lwt_seg6_action( + skb: *mut __sk_buff, + action: __u32, + param: *mut ::aya_ebpf_cty::c_void, + param_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + action: __u32, + param: *mut ::aya_ebpf_cty::c_void, + param_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(76usize); + fun(skb, action, param, param_len) +} +pub unsafe fn bpf_rc_repeat(ctx: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(77usize); + fun(ctx) +} +pub unsafe fn bpf_rc_keydown( + ctx: *mut ::aya_ebpf_cty::c_void, + protocol: __u32, + scancode: __u64, + toggle: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + protocol: __u32, + scancode: __u64, + toggle: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(78usize); + fun(ctx, protocol, scancode, toggle) +} +pub unsafe fn bpf_skb_cgroup_id(skb: *mut __sk_buff) -> __u64 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u64 = ::core::mem::transmute(79usize); + fun(skb) +} +pub unsafe fn bpf_get_current_cgroup_id() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(80usize); + fun() +} +pub unsafe fn bpf_get_local_storage( + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(81usize); + fun(map, flags) +} +pub unsafe fn bpf_sk_select_reuseport( + reuse: *mut sk_reuseport_md, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + reuse: *mut sk_reuseport_md, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(82usize); + fun(reuse, map, key, flags) +} +pub unsafe fn bpf_skb_ancestor_cgroup_id( + skb: *mut __sk_buff, + ancestor_level: ::aya_ebpf_cty::c_int, +) -> __u64 { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + ancestor_level: ::aya_ebpf_cty::c_int, + ) -> __u64 = ::core::mem::transmute(83usize); + fun(skb, ancestor_level) +} +pub unsafe fn bpf_sk_lookup_tcp( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, +) -> *mut bpf_sock { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, + ) -> *mut bpf_sock = ::core::mem::transmute(84usize); + fun(ctx, tuple, tuple_size, netns, flags) +} +pub unsafe fn bpf_sk_lookup_udp( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, +) -> *mut bpf_sock { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, + ) -> *mut bpf_sock = ::core::mem::transmute(85usize); + fun(ctx, tuple, tuple_size, netns, flags) +} +pub unsafe fn bpf_sk_release(sock: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(sock: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(86usize); + fun(sock) +} +pub unsafe fn bpf_map_push_elem( + map: *mut ::aya_ebpf_cty::c_void, + value: *const ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + value: *const ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(87usize); + fun(map, value, flags) +} +pub unsafe fn bpf_map_pop_elem( + map: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(88usize); + fun(map, value) +} +pub unsafe fn bpf_map_peek_elem( + map: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(89usize); + fun(map, value) +} +pub unsafe fn bpf_msg_push_data( + msg: *mut sk_msg_md, + start: __u32, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + start: __u32, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(90usize); + fun(msg, start, len, flags) +} +pub unsafe fn bpf_msg_pop_data( + msg: *mut sk_msg_md, + start: __u32, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + start: __u32, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(91usize); + fun(msg, start, len, flags) +} +pub unsafe fn bpf_rc_pointer_rel( + ctx: *mut ::aya_ebpf_cty::c_void, + rel_x: __s32, + rel_y: __s32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + rel_x: __s32, + rel_y: __s32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(92usize); + fun(ctx, rel_x, rel_y) +} +pub unsafe fn bpf_spin_lock(lock: *mut bpf_spin_lock) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(lock: *mut bpf_spin_lock) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(93usize); + fun(lock) +} +pub unsafe fn bpf_spin_unlock(lock: *mut bpf_spin_lock) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(lock: *mut bpf_spin_lock) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(94usize); + fun(lock) +} +pub unsafe fn bpf_sk_fullsock(sk: *mut bpf_sock) -> *mut bpf_sock { + let fun: unsafe extern "C" fn(sk: *mut bpf_sock) -> *mut bpf_sock = + ::core::mem::transmute(95usize); + fun(sk) +} +pub unsafe fn bpf_tcp_sock(sk: *mut bpf_sock) -> *mut bpf_tcp_sock { + let fun: unsafe extern "C" fn(sk: *mut bpf_sock) -> *mut bpf_tcp_sock = + ::core::mem::transmute(96usize); + fun(sk) +} +pub unsafe fn bpf_skb_ecn_set_ce(skb: *mut __sk_buff) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(97usize); + fun(skb) +} +pub unsafe fn bpf_get_listener_sock(sk: *mut bpf_sock) -> *mut bpf_sock { + let fun: unsafe extern "C" fn(sk: *mut bpf_sock) -> *mut bpf_sock = + ::core::mem::transmute(98usize); + fun(sk) +} +pub unsafe fn bpf_skc_lookup_tcp( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, +) -> *mut bpf_sock { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, + ) -> *mut bpf_sock = ::core::mem::transmute(99usize); + fun(ctx, tuple, tuple_size, netns, flags) +} +pub unsafe fn bpf_tcp_check_syncookie( + sk: *mut ::aya_ebpf_cty::c_void, + iph: *mut ::aya_ebpf_cty::c_void, + iph_len: __u32, + th: *mut tcphdr, + th_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + sk: *mut ::aya_ebpf_cty::c_void, + iph: *mut ::aya_ebpf_cty::c_void, + iph_len: __u32, + th: *mut tcphdr, + th_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(100usize); + fun(sk, iph, iph_len, th, th_len) +} +pub unsafe fn bpf_sysctl_get_name( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(101usize); + fun(ctx, buf, buf_len, flags) +} +pub unsafe fn bpf_sysctl_get_current_value( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(102usize); + fun(ctx, buf, buf_len) +} +pub unsafe fn bpf_sysctl_get_new_value( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(103usize); + fun(ctx, buf, buf_len) +} +pub unsafe fn bpf_sysctl_set_new_value( + ctx: *mut bpf_sysctl, + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sysctl, + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(104usize); + fun(ctx, buf, buf_len) +} +pub unsafe fn bpf_strtol( + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + res: *mut ::aya_ebpf_cty::c_long, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + res: *mut ::aya_ebpf_cty::c_long, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(105usize); + fun(buf, buf_len, flags, res) +} +pub unsafe fn bpf_strtoul( + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + res: *mut ::aya_ebpf_cty::c_ulong, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + res: *mut ::aya_ebpf_cty::c_ulong, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(106usize); + fun(buf, buf_len, flags, res) +} +pub unsafe fn bpf_sk_storage_get( + map: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(107usize); + fun(map, sk, value, flags) +} +pub unsafe fn bpf_sk_storage_delete( + map: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(108usize); + fun(map, sk) +} +pub unsafe fn bpf_send_signal(sig: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(sig: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(109usize); + fun(sig) +} +pub unsafe fn bpf_tcp_gen_syncookie( + sk: *mut ::aya_ebpf_cty::c_void, + iph: *mut ::aya_ebpf_cty::c_void, + iph_len: __u32, + th: *mut tcphdr, + th_len: __u32, +) -> __s64 { + let fun: unsafe extern "C" fn( + sk: *mut ::aya_ebpf_cty::c_void, + iph: *mut ::aya_ebpf_cty::c_void, + iph_len: __u32, + th: *mut tcphdr, + th_len: __u32, + ) -> __s64 = ::core::mem::transmute(110usize); + fun(sk, iph, iph_len, th, th_len) +} +pub unsafe fn bpf_skb_output( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(111usize); + fun(ctx, map, flags, data, size) +} +pub unsafe fn bpf_probe_read_user( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(112usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_probe_read_kernel( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(113usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_probe_read_user_str( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(114usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_probe_read_kernel_str( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(115usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_tcp_send_ack( + tp: *mut ::aya_ebpf_cty::c_void, + rcv_nxt: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + tp: *mut ::aya_ebpf_cty::c_void, + rcv_nxt: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(116usize); + fun(tp, rcv_nxt) +} +pub unsafe fn bpf_send_signal_thread(sig: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(sig: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(117usize); + fun(sig) +} +pub unsafe fn bpf_jiffies64() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(118usize); + fun() +} +pub unsafe fn bpf_read_branch_records( + ctx: *mut bpf_perf_event_data, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_perf_event_data, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(119usize); + fun(ctx, buf, size, flags) +} +pub unsafe fn bpf_get_ns_current_pid_tgid( + dev: __u64, + ino: __u64, + nsdata: *mut bpf_pidns_info, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dev: __u64, + ino: __u64, + nsdata: *mut bpf_pidns_info, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(120usize); + fun(dev, ino, nsdata, size) +} +pub unsafe fn bpf_xdp_output( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(121usize); + fun(ctx, map, flags, data, size) +} +pub unsafe fn bpf_get_netns_cookie(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(122usize); + fun(ctx) +} +pub unsafe fn bpf_get_current_ancestor_cgroup_id(ancestor_level: ::aya_ebpf_cty::c_int) -> __u64 { + let fun: unsafe extern "C" fn(ancestor_level: ::aya_ebpf_cty::c_int) -> __u64 = + ::core::mem::transmute(123usize); + fun(ancestor_level) +} +pub unsafe fn bpf_sk_assign( + ctx: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(124usize); + fun(ctx, sk, flags) +} +pub unsafe fn bpf_ktime_get_boot_ns() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(125usize); + fun() +} +pub unsafe fn bpf_seq_printf( + m: *mut seq_file, + fmt: *const ::aya_ebpf_cty::c_char, + fmt_size: __u32, + data: *const ::aya_ebpf_cty::c_void, + data_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + m: *mut seq_file, + fmt: *const ::aya_ebpf_cty::c_char, + fmt_size: __u32, + data: *const ::aya_ebpf_cty::c_void, + data_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(126usize); + fun(m, fmt, fmt_size, data, data_len) +} +pub unsafe fn bpf_seq_write( + m: *mut seq_file, + data: *const ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + m: *mut seq_file, + data: *const ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(127usize); + fun(m, data, len) +} +pub unsafe fn bpf_sk_cgroup_id(sk: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(128usize); + fun(sk) +} +pub unsafe fn bpf_sk_ancestor_cgroup_id( + sk: *mut ::aya_ebpf_cty::c_void, + ancestor_level: ::aya_ebpf_cty::c_int, +) -> __u64 { + let fun: unsafe extern "C" fn( + sk: *mut ::aya_ebpf_cty::c_void, + ancestor_level: ::aya_ebpf_cty::c_int, + ) -> __u64 = ::core::mem::transmute(129usize); + fun(sk, ancestor_level) +} +pub unsafe fn bpf_ringbuf_output( + ringbuf: *mut ::aya_ebpf_cty::c_void, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ringbuf: *mut ::aya_ebpf_cty::c_void, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(130usize); + fun(ringbuf, data, size, flags) +} +pub unsafe fn bpf_ringbuf_reserve( + ringbuf: *mut ::aya_ebpf_cty::c_void, + size: __u64, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + ringbuf: *mut ::aya_ebpf_cty::c_void, + size: __u64, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(131usize); + fun(ringbuf, size, flags) +} +pub unsafe fn bpf_ringbuf_submit(data: *mut ::aya_ebpf_cty::c_void, flags: __u64) { + let fun: unsafe extern "C" fn(data: *mut ::aya_ebpf_cty::c_void, flags: __u64) = + ::core::mem::transmute(132usize); + fun(data, flags) +} +pub unsafe fn bpf_ringbuf_discard(data: *mut ::aya_ebpf_cty::c_void, flags: __u64) { + let fun: unsafe extern "C" fn(data: *mut ::aya_ebpf_cty::c_void, flags: __u64) = + ::core::mem::transmute(133usize); + fun(data, flags) +} +pub unsafe fn bpf_ringbuf_query(ringbuf: *mut ::aya_ebpf_cty::c_void, flags: __u64) -> __u64 { + let fun: unsafe extern "C" fn(ringbuf: *mut ::aya_ebpf_cty::c_void, flags: __u64) -> __u64 = + ::core::mem::transmute(134usize); + fun(ringbuf, flags) +} +pub unsafe fn bpf_csum_level(skb: *mut __sk_buff, level: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, level: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(135usize); + fun(skb, level) +} +pub unsafe fn bpf_skc_to_tcp6_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp6_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp6_sock = + ::core::mem::transmute(136usize); + fun(sk) +} +pub unsafe fn bpf_skc_to_tcp_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp_sock = + ::core::mem::transmute(137usize); + fun(sk) +} +pub unsafe fn bpf_skc_to_tcp_timewait_sock( + sk: *mut ::aya_ebpf_cty::c_void, +) -> *mut tcp_timewait_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp_timewait_sock = + ::core::mem::transmute(138usize); + fun(sk) +} +pub unsafe fn bpf_skc_to_tcp_request_sock( + sk: *mut ::aya_ebpf_cty::c_void, +) -> *mut tcp_request_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp_request_sock = + ::core::mem::transmute(139usize); + fun(sk) +} +pub unsafe fn bpf_skc_to_udp6_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut udp6_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut udp6_sock = + ::core::mem::transmute(140usize); + fun(sk) +} +pub unsafe fn bpf_get_task_stack( + task: *mut task_struct, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + task: *mut task_struct, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(141usize); + fun(task, buf, size, flags) +} +pub unsafe fn bpf_load_hdr_opt( + skops: *mut bpf_sock_ops, + searchby_res: *mut ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + searchby_res: *mut ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(142usize); + fun(skops, searchby_res, len, flags) +} +pub unsafe fn bpf_store_hdr_opt( + skops: *mut bpf_sock_ops, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(143usize); + fun(skops, from, len, flags) +} +pub unsafe fn bpf_reserve_hdr_opt( + skops: *mut bpf_sock_ops, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(144usize); + fun(skops, len, flags) +} +pub unsafe fn bpf_inode_storage_get( + map: *mut ::aya_ebpf_cty::c_void, + inode: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + inode: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(145usize); + fun(map, inode, value, flags) +} +pub unsafe fn bpf_inode_storage_delete( + map: *mut ::aya_ebpf_cty::c_void, + inode: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_int { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + inode: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_int = ::core::mem::transmute(146usize); + fun(map, inode) +} +pub unsafe fn bpf_d_path( + path: *mut path, + buf: *mut ::aya_ebpf_cty::c_char, + sz: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + path: *mut path, + buf: *mut ::aya_ebpf_cty::c_char, + sz: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(147usize); + fun(path, buf, sz) +} +pub unsafe fn bpf_copy_from_user( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + user_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + user_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(148usize); + fun(dst, size, user_ptr) +} +pub unsafe fn bpf_snprintf_btf( + str_: *mut ::aya_ebpf_cty::c_char, + str_size: __u32, + ptr: *mut btf_ptr, + btf_ptr_size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + str_: *mut ::aya_ebpf_cty::c_char, + str_size: __u32, + ptr: *mut btf_ptr, + btf_ptr_size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(149usize); + fun(str_, str_size, ptr, btf_ptr_size, flags) +} +pub unsafe fn bpf_seq_printf_btf( + m: *mut seq_file, + ptr: *mut btf_ptr, + ptr_size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + m: *mut seq_file, + ptr: *mut btf_ptr, + ptr_size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(150usize); + fun(m, ptr, ptr_size, flags) +} +pub unsafe fn bpf_skb_cgroup_classid(skb: *mut __sk_buff) -> __u64 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u64 = ::core::mem::transmute(151usize); + fun(skb) +} +pub unsafe fn bpf_redirect_neigh( + ifindex: __u32, + params: *mut bpf_redir_neigh, + plen: ::aya_ebpf_cty::c_int, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ifindex: __u32, + params: *mut bpf_redir_neigh, + plen: ::aya_ebpf_cty::c_int, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(152usize); + fun(ifindex, params, plen, flags) +} +pub unsafe fn bpf_per_cpu_ptr( + percpu_ptr: *const ::aya_ebpf_cty::c_void, + cpu: __u32, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + percpu_ptr: *const ::aya_ebpf_cty::c_void, + cpu: __u32, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(153usize); + fun(percpu_ptr, cpu) +} +pub unsafe fn bpf_this_cpu_ptr( + percpu_ptr: *const ::aya_ebpf_cty::c_void, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + percpu_ptr: *const ::aya_ebpf_cty::c_void, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(154usize); + fun(percpu_ptr) +} +pub unsafe fn bpf_redirect_peer(ifindex: __u32, flags: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(ifindex: __u32, flags: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(155usize); + fun(ifindex, flags) +} +pub unsafe fn bpf_task_storage_get( + map: *mut ::aya_ebpf_cty::c_void, + task: *mut task_struct, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + task: *mut task_struct, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(156usize); + fun(map, task, value, flags) +} +pub unsafe fn bpf_task_storage_delete( + map: *mut ::aya_ebpf_cty::c_void, + task: *mut task_struct, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + task: *mut task_struct, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(157usize); + fun(map, task) +} +pub unsafe fn bpf_get_current_task_btf() -> *mut task_struct { + let fun: unsafe extern "C" fn() -> *mut task_struct = ::core::mem::transmute(158usize); + fun() +} +pub unsafe fn bpf_bprm_opts_set(bprm: *mut linux_binprm, flags: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(bprm: *mut linux_binprm, flags: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(159usize); + fun(bprm, flags) +} +pub unsafe fn bpf_ktime_get_coarse_ns() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(160usize); + fun() +} +pub unsafe fn bpf_ima_inode_hash( + inode: *mut inode, + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + inode: *mut inode, + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(161usize); + fun(inode, dst, size) +} +pub unsafe fn bpf_sock_from_file(file: *mut file) -> *mut socket { + let fun: unsafe extern "C" fn(file: *mut file) -> *mut socket = + ::core::mem::transmute(162usize); + fun(file) +} +pub unsafe fn bpf_check_mtu( + ctx: *mut ::aya_ebpf_cty::c_void, + ifindex: __u32, + mtu_len: *mut __u32, + len_diff: __s32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + ifindex: __u32, + mtu_len: *mut __u32, + len_diff: __s32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(163usize); + fun(ctx, ifindex, mtu_len, len_diff, flags) +} +pub unsafe fn bpf_for_each_map_elem( + map: *mut ::aya_ebpf_cty::c_void, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(164usize); + fun(map, callback_fn, callback_ctx, flags) +} +pub unsafe fn bpf_snprintf( + str_: *mut ::aya_ebpf_cty::c_char, + str_size: __u32, + fmt: *const ::aya_ebpf_cty::c_char, + data: *mut __u64, + data_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + str_: *mut ::aya_ebpf_cty::c_char, + str_size: __u32, + fmt: *const ::aya_ebpf_cty::c_char, + data: *mut __u64, + data_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(165usize); + fun(str_, str_size, fmt, data, data_len) +} +pub unsafe fn bpf_sys_bpf( + cmd: __u32, + attr: *mut ::aya_ebpf_cty::c_void, + attr_size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + cmd: __u32, + attr: *mut ::aya_ebpf_cty::c_void, + attr_size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(166usize); + fun(cmd, attr, attr_size) +} +pub unsafe fn bpf_btf_find_by_name_kind( + name: *mut ::aya_ebpf_cty::c_char, + name_sz: ::aya_ebpf_cty::c_int, + kind: __u32, + flags: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + name: *mut ::aya_ebpf_cty::c_char, + name_sz: ::aya_ebpf_cty::c_int, + kind: __u32, + flags: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(167usize); + fun(name, name_sz, kind, flags) +} +pub unsafe fn bpf_sys_close(fd: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(fd: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(168usize); + fun(fd) +} +pub unsafe fn bpf_timer_init( + timer: *mut bpf_timer, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + timer: *mut bpf_timer, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(169usize); + fun(timer, map, flags) +} +pub unsafe fn bpf_timer_set_callback( + timer: *mut bpf_timer, + callback_fn: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + timer: *mut bpf_timer, + callback_fn: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(170usize); + fun(timer, callback_fn) +} +pub unsafe fn bpf_timer_start( + timer: *mut bpf_timer, + nsecs: __u64, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + timer: *mut bpf_timer, + nsecs: __u64, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(171usize); + fun(timer, nsecs, flags) +} +pub unsafe fn bpf_timer_cancel(timer: *mut bpf_timer) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(timer: *mut bpf_timer) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(172usize); + fun(timer) +} +pub unsafe fn bpf_get_func_ip(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(173usize); + fun(ctx) +} +pub unsafe fn bpf_get_attach_cookie(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(174usize); + fun(ctx) +} +pub unsafe fn bpf_task_pt_regs(task: *mut task_struct) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(task: *mut task_struct) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(175usize); + fun(task) +} +pub unsafe fn bpf_get_branch_snapshot( + entries: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + entries: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(176usize); + fun(entries, size, flags) +} +pub unsafe fn bpf_trace_vprintk( + fmt: *const ::aya_ebpf_cty::c_char, + fmt_size: __u32, + data: *const ::aya_ebpf_cty::c_void, + data_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + fmt: *const ::aya_ebpf_cty::c_char, + fmt_size: __u32, + data: *const ::aya_ebpf_cty::c_void, + data_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(177usize); + fun(fmt, fmt_size, data, data_len) +} +pub unsafe fn bpf_skc_to_unix_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut unix_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut unix_sock = + ::core::mem::transmute(178usize); + fun(sk) +} +pub unsafe fn bpf_kallsyms_lookup_name( + name: *const ::aya_ebpf_cty::c_char, + name_sz: ::aya_ebpf_cty::c_int, + flags: ::aya_ebpf_cty::c_int, + res: *mut __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + name: *const ::aya_ebpf_cty::c_char, + name_sz: ::aya_ebpf_cty::c_int, + flags: ::aya_ebpf_cty::c_int, + res: *mut __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(179usize); + fun(name, name_sz, flags, res) +} +pub unsafe fn bpf_find_vma( + task: *mut task_struct, + addr: __u64, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + task: *mut task_struct, + addr: __u64, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(180usize); + fun(task, addr, callback_fn, callback_ctx, flags) +} +pub unsafe fn bpf_loop( + nr_loops: __u32, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + nr_loops: __u32, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(181usize); + fun(nr_loops, callback_fn, callback_ctx, flags) +} +pub unsafe fn bpf_strncmp( + s1: *const ::aya_ebpf_cty::c_char, + s1_sz: __u32, + s2: *const ::aya_ebpf_cty::c_char, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + s1: *const ::aya_ebpf_cty::c_char, + s1_sz: __u32, + s2: *const ::aya_ebpf_cty::c_char, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(182usize); + fun(s1, s1_sz, s2) +} +pub unsafe fn bpf_get_func_arg( + ctx: *mut ::aya_ebpf_cty::c_void, + n: __u32, + value: *mut __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + n: __u32, + value: *mut __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(183usize); + fun(ctx, n, value) +} +pub unsafe fn bpf_get_func_ret( + ctx: *mut ::aya_ebpf_cty::c_void, + value: *mut __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + value: *mut __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(184usize); + fun(ctx, value) +} +pub unsafe fn bpf_get_func_arg_cnt(ctx: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(185usize); + fun(ctx) +} +pub unsafe fn bpf_get_retval() -> ::aya_ebpf_cty::c_int { + let fun: unsafe extern "C" fn() -> ::aya_ebpf_cty::c_int = ::core::mem::transmute(186usize); + fun() +} +pub unsafe fn bpf_set_retval(retval: ::aya_ebpf_cty::c_int) -> ::aya_ebpf_cty::c_int { + let fun: unsafe extern "C" fn(retval: ::aya_ebpf_cty::c_int) -> ::aya_ebpf_cty::c_int = + ::core::mem::transmute(187usize); + fun(retval) +} +pub unsafe fn bpf_xdp_get_buff_len(xdp_md: *mut xdp_md) -> __u64 { + let fun: unsafe extern "C" fn(xdp_md: *mut xdp_md) -> __u64 = ::core::mem::transmute(188usize); + fun(xdp_md) +} +pub unsafe fn bpf_xdp_load_bytes( + xdp_md: *mut xdp_md, + offset: __u32, + buf: *mut ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + offset: __u32, + buf: *mut ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(189usize); + fun(xdp_md, offset, buf, len) +} +pub unsafe fn bpf_xdp_store_bytes( + xdp_md: *mut xdp_md, + offset: __u32, + buf: *mut ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + offset: __u32, + buf: *mut ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(190usize); + fun(xdp_md, offset, buf, len) +} +pub unsafe fn bpf_copy_from_user_task( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + user_ptr: *const ::aya_ebpf_cty::c_void, + tsk: *mut task_struct, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + user_ptr: *const ::aya_ebpf_cty::c_void, + tsk: *mut task_struct, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(191usize); + fun(dst, size, user_ptr, tsk, flags) +} +pub unsafe fn bpf_skb_set_tstamp( + skb: *mut __sk_buff, + tstamp: __u64, + tstamp_type: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + tstamp: __u64, + tstamp_type: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(192usize); + fun(skb, tstamp, tstamp_type) +} +pub unsafe fn bpf_ima_file_hash( + file: *mut file, + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + file: *mut file, + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(193usize); + fun(file, dst, size) +} +pub unsafe fn bpf_kptr_xchg( + map_value: *mut ::aya_ebpf_cty::c_void, + ptr: *mut ::aya_ebpf_cty::c_void, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map_value: *mut ::aya_ebpf_cty::c_void, + ptr: *mut ::aya_ebpf_cty::c_void, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(194usize); + fun(map_value, ptr) +} +pub unsafe fn bpf_map_lookup_percpu_elem( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + cpu: __u32, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + cpu: __u32, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(195usize); + fun(map, key, cpu) +} +pub unsafe fn bpf_skc_to_mptcp_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut mptcp_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut mptcp_sock = + ::core::mem::transmute(196usize); + fun(sk) +} +pub unsafe fn bpf_dynptr_from_mem( + data: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ptr: *mut bpf_dynptr, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + data: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ptr: *mut bpf_dynptr, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(197usize); + fun(data, size, flags, ptr) +} +pub unsafe fn bpf_ringbuf_reserve_dynptr( + ringbuf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ptr: *mut bpf_dynptr, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ringbuf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ptr: *mut bpf_dynptr, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(198usize); + fun(ringbuf, size, flags, ptr) +} +pub unsafe fn bpf_ringbuf_submit_dynptr(ptr: *mut bpf_dynptr, flags: __u64) { + let fun: unsafe extern "C" fn(ptr: *mut bpf_dynptr, flags: __u64) = + ::core::mem::transmute(199usize); + fun(ptr, flags) +} +pub unsafe fn bpf_ringbuf_discard_dynptr(ptr: *mut bpf_dynptr, flags: __u64) { + let fun: unsafe extern "C" fn(ptr: *mut bpf_dynptr, flags: __u64) = + ::core::mem::transmute(200usize); + fun(ptr, flags) +} +pub unsafe fn bpf_dynptr_read( + dst: *mut ::aya_ebpf_cty::c_void, + len: __u32, + src: *const bpf_dynptr, + offset: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + len: __u32, + src: *const bpf_dynptr, + offset: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(201usize); + fun(dst, len, src, offset, flags) +} +pub unsafe fn bpf_dynptr_write( + dst: *const bpf_dynptr, + offset: __u32, + src: *mut ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *const bpf_dynptr, + offset: __u32, + src: *mut ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(202usize); + fun(dst, offset, src, len, flags) +} +pub unsafe fn bpf_dynptr_data( + ptr: *const bpf_dynptr, + offset: __u32, + len: __u32, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + ptr: *const bpf_dynptr, + offset: __u32, + len: __u32, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(203usize); + fun(ptr, offset, len) +} +pub unsafe fn bpf_tcp_raw_gen_syncookie_ipv4( + iph: *mut iphdr, + th: *mut tcphdr, + th_len: __u32, +) -> __s64 { + let fun: unsafe extern "C" fn(iph: *mut iphdr, th: *mut tcphdr, th_len: __u32) -> __s64 = + ::core::mem::transmute(204usize); + fun(iph, th, th_len) +} +pub unsafe fn bpf_tcp_raw_gen_syncookie_ipv6( + iph: *mut ipv6hdr, + th: *mut tcphdr, + th_len: __u32, +) -> __s64 { + let fun: unsafe extern "C" fn(iph: *mut ipv6hdr, th: *mut tcphdr, th_len: __u32) -> __s64 = + ::core::mem::transmute(205usize); + fun(iph, th, th_len) +} +pub unsafe fn bpf_tcp_raw_check_syncookie_ipv4( + iph: *mut iphdr, + th: *mut tcphdr, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(iph: *mut iphdr, th: *mut tcphdr) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(206usize); + fun(iph, th) +} +pub unsafe fn bpf_tcp_raw_check_syncookie_ipv6( + iph: *mut ipv6hdr, + th: *mut tcphdr, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(iph: *mut ipv6hdr, th: *mut tcphdr) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(207usize); + fun(iph, th) +} +pub unsafe fn bpf_ktime_get_tai_ns() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(208usize); + fun() +} +pub unsafe fn bpf_user_ringbuf_drain( + map: *mut ::aya_ebpf_cty::c_void, + callback_fn: *mut ::aya_ebpf_cty::c_void, + ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + callback_fn: *mut ::aya_ebpf_cty::c_void, + ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(209usize); + fun(map, callback_fn, ctx, flags) +} +pub unsafe fn bpf_cgrp_storage_get( + map: *mut ::aya_ebpf_cty::c_void, + cgroup: *mut cgroup, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + cgroup: *mut cgroup, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(210usize); + fun(map, cgroup, value, flags) +} +pub unsafe fn bpf_cgrp_storage_delete( + map: *mut ::aya_ebpf_cty::c_void, + cgroup: *mut cgroup, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + cgroup: *mut cgroup, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(211usize); + fun(map, cgroup) +} diff --git a/ebpf/aya-ebpf-bindings/src/riscv64/bindings.rs b/ebpf/aya-ebpf-bindings/src/riscv64/bindings.rs index 695f3b36..98b85819 100644 --- a/ebpf/aya-ebpf-bindings/src/riscv64/bindings.rs +++ b/ebpf/aya-ebpf-bindings/src/riscv64/bindings.rs @@ -14,10 +14,7 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -27,21 +24,46 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; - if val { - *byte |= mask; - } else { - *byte &= !mask; - } + if val { byte | mask } else { byte & !mask } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -62,6 +84,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -77,6 +117,22 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } } #[repr(C)] #[derive(Default)] @@ -211,6 +267,9 @@ pub const TC_ACT_REDIRECT: u32 = 7; pub const TC_ACT_TRAP: u32 = 8; pub const TC_ACT_VALUE_MAX: u32 = 8; pub const TC_ACT_EXT_VAL_MASK: u32 = 268435455; +pub const TC_ACT_JUMP: u32 = 268435456; +pub const TC_ACT_GOTO_CHAIN: u32 = 536870912; +pub const TC_ACT_EXT_OPCODE_MAX: u32 = 536870912; pub const SOL_SOCKET: u32 = 1; pub const SO_DEBUG: u32 = 1; pub const SO_REUSEADDR: u32 = 2; @@ -284,6 +343,11 @@ pub const SO_PREFER_BUSY_POLL: u32 = 69; pub const SO_BUSY_POLL_BUDGET: u32 = 70; pub const SO_NETNS_COOKIE: u32 = 71; pub const SO_BUF_LOCK: u32 = 72; +pub const SO_RESERVE_MEM: u32 = 73; +pub const SO_TXREHASH: u32 = 74; +pub const SO_RCVMARK: u32 = 75; +pub const SO_PASSPIDFD: u32 = 76; +pub const SO_PEERPIDFD: u32 = 77; pub const SO_TIMESTAMP: u32 = 29; pub const SO_TIMESTAMPNS: u32 = 35; pub const SO_TIMESTAMPING: u32 = 37; @@ -438,6 +502,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn src_reg(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -449,6 +535,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -1720,6 +1828,13 @@ pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 { pub sport: __be16, pub dport: __be16, } +pub mod tcx_action_base { + pub type Type = ::aya_ebpf_cty::c_int; + pub const TCX_NEXT: Type = -1; + pub const TCX_PASS: Type = 0; + pub const TCX_DROP: Type = 2; + pub const TCX_REDIRECT: Type = 7; +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bpf_xdp_sock { @@ -1954,6 +2069,28 @@ impl bpf_prog_info { } } #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/ebpf/aya-ebpf-bindings/src/riscv64/mod.rs b/ebpf/aya-ebpf-bindings/src/riscv64/mod.rs deleted file mode 100644 index 226884ea..00000000 --- a/ebpf/aya-ebpf-bindings/src/riscv64/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -#![allow(clippy::all, dead_code)] -pub mod bindings; -pub mod helpers; diff --git a/ebpf/aya-ebpf-bindings/src/s390x/bindings.rs b/ebpf/aya-ebpf-bindings/src/s390x/bindings.rs new file mode 100644 index 00000000..15804301 --- /dev/null +++ b/ebpf/aya-ebpf-bindings/src/s390x/bindings.rs @@ -0,0 +1,3857 @@ +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { byte | mask } else { byte & !mask } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } +} +#[repr(C)] +#[derive(Default)] +pub struct __IncompleteArrayField(::core::marker::PhantomData, [T; 0]); +impl __IncompleteArrayField { + #[inline] + pub const fn new() -> Self { + __IncompleteArrayField(::core::marker::PhantomData, []) + } + #[inline] + pub fn as_ptr(&self) -> *const T { + self as *const _ as *const T + } + #[inline] + pub fn as_mut_ptr(&mut self) -> *mut T { + self as *mut _ as *mut T + } + #[inline] + pub unsafe fn as_slice(&self, len: usize) -> &[T] { + ::core::slice::from_raw_parts(self.as_ptr(), len) + } + #[inline] + pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { + ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len) + } +} +impl ::core::fmt::Debug for __IncompleteArrayField { + fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + fmt.write_str("__IncompleteArrayField") + } +} +pub const BPF_LD: u32 = 0; +pub const BPF_LDX: u32 = 1; +pub const BPF_ST: u32 = 2; +pub const BPF_STX: u32 = 3; +pub const BPF_ALU: u32 = 4; +pub const BPF_JMP: u32 = 5; +pub const BPF_RET: u32 = 6; +pub const BPF_MISC: u32 = 7; +pub const BPF_W: u32 = 0; +pub const BPF_H: u32 = 8; +pub const BPF_B: u32 = 16; +pub const BPF_IMM: u32 = 0; +pub const BPF_ABS: u32 = 32; +pub const BPF_IND: u32 = 64; +pub const BPF_MEM: u32 = 96; +pub const BPF_LEN: u32 = 128; +pub const BPF_MSH: u32 = 160; +pub const BPF_ADD: u32 = 0; +pub const BPF_SUB: u32 = 16; +pub const BPF_MUL: u32 = 32; +pub const BPF_DIV: u32 = 48; +pub const BPF_OR: u32 = 64; +pub const BPF_AND: u32 = 80; +pub const BPF_LSH: u32 = 96; +pub const BPF_RSH: u32 = 112; +pub const BPF_NEG: u32 = 128; +pub const BPF_MOD: u32 = 144; +pub const BPF_XOR: u32 = 160; +pub const BPF_JA: u32 = 0; +pub const BPF_JEQ: u32 = 16; +pub const BPF_JGT: u32 = 32; +pub const BPF_JGE: u32 = 48; +pub const BPF_JSET: u32 = 64; +pub const BPF_K: u32 = 0; +pub const BPF_X: u32 = 8; +pub const BPF_MAXINSNS: u32 = 4096; +pub const BPF_JMP32: u32 = 6; +pub const BPF_ALU64: u32 = 7; +pub const BPF_DW: u32 = 24; +pub const BPF_MEMSX: u32 = 128; +pub const BPF_ATOMIC: u32 = 192; +pub const BPF_XADD: u32 = 192; +pub const BPF_MOV: u32 = 176; +pub const BPF_ARSH: u32 = 192; +pub const BPF_END: u32 = 208; +pub const BPF_TO_LE: u32 = 0; +pub const BPF_TO_BE: u32 = 8; +pub const BPF_FROM_LE: u32 = 0; +pub const BPF_FROM_BE: u32 = 8; +pub const BPF_JNE: u32 = 80; +pub const BPF_JLT: u32 = 160; +pub const BPF_JLE: u32 = 176; +pub const BPF_JSGT: u32 = 96; +pub const BPF_JSGE: u32 = 112; +pub const BPF_JSLT: u32 = 192; +pub const BPF_JSLE: u32 = 208; +pub const BPF_JCOND: u32 = 224; +pub const BPF_CALL: u32 = 128; +pub const BPF_EXIT: u32 = 144; +pub const BPF_FETCH: u32 = 1; +pub const BPF_XCHG: u32 = 225; +pub const BPF_CMPXCHG: u32 = 241; +pub const BPF_F_ALLOW_OVERRIDE: u32 = 1; +pub const BPF_F_ALLOW_MULTI: u32 = 2; +pub const BPF_F_REPLACE: u32 = 4; +pub const BPF_F_BEFORE: u32 = 8; +pub const BPF_F_AFTER: u32 = 16; +pub const BPF_F_ID: u32 = 32; +pub const BPF_F_STRICT_ALIGNMENT: u32 = 1; +pub const BPF_F_ANY_ALIGNMENT: u32 = 2; +pub const BPF_F_TEST_RND_HI32: u32 = 4; +pub const BPF_F_TEST_STATE_FREQ: u32 = 8; +pub const BPF_F_SLEEPABLE: u32 = 16; +pub const BPF_F_XDP_HAS_FRAGS: u32 = 32; +pub const BPF_F_XDP_DEV_BOUND_ONLY: u32 = 64; +pub const BPF_F_TEST_REG_INVARIANTS: u32 = 128; +pub const BPF_F_NETFILTER_IP_DEFRAG: u32 = 1; +pub const BPF_PSEUDO_MAP_FD: u32 = 1; +pub const BPF_PSEUDO_MAP_IDX: u32 = 5; +pub const BPF_PSEUDO_MAP_VALUE: u32 = 2; +pub const BPF_PSEUDO_MAP_IDX_VALUE: u32 = 6; +pub const BPF_PSEUDO_BTF_ID: u32 = 3; +pub const BPF_PSEUDO_FUNC: u32 = 4; +pub const BPF_PSEUDO_CALL: u32 = 1; +pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2; +pub const BPF_F_QUERY_EFFECTIVE: u32 = 1; +pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1; +pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2; +pub const BPF_BUILD_ID_SIZE: u32 = 20; +pub const BPF_OBJ_NAME_LEN: u32 = 16; +pub const BPF_TAG_SIZE: u32 = 8; +pub const TC_ACT_UNSPEC: i32 = -1; +pub const TC_ACT_OK: u32 = 0; +pub const TC_ACT_RECLASSIFY: u32 = 1; +pub const TC_ACT_SHOT: u32 = 2; +pub const TC_ACT_PIPE: u32 = 3; +pub const TC_ACT_STOLEN: u32 = 4; +pub const TC_ACT_QUEUED: u32 = 5; +pub const TC_ACT_REPEAT: u32 = 6; +pub const TC_ACT_REDIRECT: u32 = 7; +pub const TC_ACT_TRAP: u32 = 8; +pub const TC_ACT_VALUE_MAX: u32 = 8; +pub const TC_ACT_EXT_VAL_MASK: u32 = 268435455; +pub const TC_ACT_JUMP: u32 = 268435456; +pub const TC_ACT_GOTO_CHAIN: u32 = 536870912; +pub const TC_ACT_EXT_OPCODE_MAX: u32 = 536870912; +pub const SOL_SOCKET: u32 = 1; +pub const SO_DEBUG: u32 = 1; +pub const SO_REUSEADDR: u32 = 2; +pub const SO_TYPE: u32 = 3; +pub const SO_ERROR: u32 = 4; +pub const SO_DONTROUTE: u32 = 5; +pub const SO_BROADCAST: u32 = 6; +pub const SO_SNDBUF: u32 = 7; +pub const SO_RCVBUF: u32 = 8; +pub const SO_SNDBUFFORCE: u32 = 32; +pub const SO_RCVBUFFORCE: u32 = 33; +pub const SO_KEEPALIVE: u32 = 9; +pub const SO_OOBINLINE: u32 = 10; +pub const SO_NO_CHECK: u32 = 11; +pub const SO_PRIORITY: u32 = 12; +pub const SO_LINGER: u32 = 13; +pub const SO_BSDCOMPAT: u32 = 14; +pub const SO_REUSEPORT: u32 = 15; +pub const SO_PASSCRED: u32 = 16; +pub const SO_PEERCRED: u32 = 17; +pub const SO_RCVLOWAT: u32 = 18; +pub const SO_SNDLOWAT: u32 = 19; +pub const SO_RCVTIMEO_OLD: u32 = 20; +pub const SO_SNDTIMEO_OLD: u32 = 21; +pub const SO_SECURITY_AUTHENTICATION: u32 = 22; +pub const SO_SECURITY_ENCRYPTION_TRANSPORT: u32 = 23; +pub const SO_SECURITY_ENCRYPTION_NETWORK: u32 = 24; +pub const SO_BINDTODEVICE: u32 = 25; +pub const SO_ATTACH_FILTER: u32 = 26; +pub const SO_DETACH_FILTER: u32 = 27; +pub const SO_GET_FILTER: u32 = 26; +pub const SO_PEERNAME: u32 = 28; +pub const SO_ACCEPTCONN: u32 = 30; +pub const SO_PEERSEC: u32 = 31; +pub const SO_PASSSEC: u32 = 34; +pub const SO_MARK: u32 = 36; +pub const SO_PROTOCOL: u32 = 38; +pub const SO_DOMAIN: u32 = 39; +pub const SO_RXQ_OVFL: u32 = 40; +pub const SO_WIFI_STATUS: u32 = 41; +pub const SO_PEEK_OFF: u32 = 42; +pub const SO_NOFCS: u32 = 43; +pub const SO_LOCK_FILTER: u32 = 44; +pub const SO_SELECT_ERR_QUEUE: u32 = 45; +pub const SO_BUSY_POLL: u32 = 46; +pub const SO_MAX_PACING_RATE: u32 = 47; +pub const SO_BPF_EXTENSIONS: u32 = 48; +pub const SO_INCOMING_CPU: u32 = 49; +pub const SO_ATTACH_BPF: u32 = 50; +pub const SO_DETACH_BPF: u32 = 27; +pub const SO_ATTACH_REUSEPORT_CBPF: u32 = 51; +pub const SO_ATTACH_REUSEPORT_EBPF: u32 = 52; +pub const SO_CNX_ADVICE: u32 = 53; +pub const SO_MEMINFO: u32 = 55; +pub const SO_INCOMING_NAPI_ID: u32 = 56; +pub const SO_COOKIE: u32 = 57; +pub const SO_PEERGROUPS: u32 = 59; +pub const SO_ZEROCOPY: u32 = 60; +pub const SO_TXTIME: u32 = 61; +pub const SO_BINDTOIFINDEX: u32 = 62; +pub const SO_TIMESTAMP_OLD: u32 = 29; +pub const SO_TIMESTAMPNS_OLD: u32 = 35; +pub const SO_TIMESTAMPING_OLD: u32 = 37; +pub const SO_TIMESTAMP_NEW: u32 = 63; +pub const SO_TIMESTAMPNS_NEW: u32 = 64; +pub const SO_TIMESTAMPING_NEW: u32 = 65; +pub const SO_RCVTIMEO_NEW: u32 = 66; +pub const SO_SNDTIMEO_NEW: u32 = 67; +pub const SO_DETACH_REUSEPORT_BPF: u32 = 68; +pub const SO_PREFER_BUSY_POLL: u32 = 69; +pub const SO_BUSY_POLL_BUDGET: u32 = 70; +pub const SO_NETNS_COOKIE: u32 = 71; +pub const SO_BUF_LOCK: u32 = 72; +pub const SO_RESERVE_MEM: u32 = 73; +pub const SO_TXREHASH: u32 = 74; +pub const SO_RCVMARK: u32 = 75; +pub const SO_PASSPIDFD: u32 = 76; +pub const SO_PEERPIDFD: u32 = 77; +pub const SO_TIMESTAMP: u32 = 29; +pub const SO_TIMESTAMPNS: u32 = 35; +pub const SO_TIMESTAMPING: u32 = 37; +pub const SO_RCVTIMEO: u32 = 20; +pub const SO_SNDTIMEO: u32 = 21; +pub type __u8 = ::aya_ebpf_cty::c_uchar; +pub type __s16 = ::aya_ebpf_cty::c_short; +pub type __u16 = ::aya_ebpf_cty::c_ushort; +pub type __s32 = ::aya_ebpf_cty::c_int; +pub type __u32 = ::aya_ebpf_cty::c_uint; +pub type __s64 = ::aya_ebpf_cty::c_longlong; +pub type __u64 = ::aya_ebpf_cty::c_ulonglong; +pub type __be16 = __u16; +pub type __be32 = __u32; +pub type __wsum = __u32; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_perf_event_data { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct linux_binprm { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pt_regs { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcphdr { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct seq_file { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcp6_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcp_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcp_timewait_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcp_request_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct udp6_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct unix_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct task_struct { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cgroup { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct path { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct inode { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct socket { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct file { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct mptcp_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct iphdr { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ipv6hdr { + _unused: [u8; 0], +} +pub mod bpf_cond_pseudo_jmp { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MAY_GOTO: Type = 0; +} +pub const BPF_REG_0: _bindgen_ty_1 = 0; +pub const BPF_REG_1: _bindgen_ty_1 = 1; +pub const BPF_REG_2: _bindgen_ty_1 = 2; +pub const BPF_REG_3: _bindgen_ty_1 = 3; +pub const BPF_REG_4: _bindgen_ty_1 = 4; +pub const BPF_REG_5: _bindgen_ty_1 = 5; +pub const BPF_REG_6: _bindgen_ty_1 = 6; +pub const BPF_REG_7: _bindgen_ty_1 = 7; +pub const BPF_REG_8: _bindgen_ty_1 = 8; +pub const BPF_REG_9: _bindgen_ty_1 = 9; +pub const BPF_REG_10: _bindgen_ty_1 = 10; +pub const __MAX_BPF_REG: _bindgen_ty_1 = 11; +pub type _bindgen_ty_1 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_insn { + pub code: __u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub off: __s16, + pub imm: __s32, +} +impl bpf_insn { + #[inline] + pub fn dst_reg(&self) -> __u8 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) } + } + #[inline] + pub fn set_dst_reg(&mut self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn src_reg(&self) -> __u8 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } + } + #[inline] + pub fn set_src_reg(&mut self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 4u8, { + let dst_reg: u8 = unsafe { ::core::mem::transmute(dst_reg) }; + dst_reg as u64 + }); + __bindgen_bitfield_unit.set(4usize, 4u8, { + let src_reg: u8 = unsafe { ::core::mem::transmute(src_reg) }; + src_reg as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug)] +pub struct bpf_lpm_trie_key { + pub prefixlen: __u32, + pub data: __IncompleteArrayField<__u8>, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_lpm_trie_key_hdr { + pub prefixlen: __u32, +} +#[repr(C)] +pub struct bpf_lpm_trie_key_u8 { + pub __bindgen_anon_1: bpf_lpm_trie_key_u8__bindgen_ty_1, + pub data: __IncompleteArrayField<__u8>, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_lpm_trie_key_u8__bindgen_ty_1 { + pub hdr: bpf_lpm_trie_key_hdr, + pub prefixlen: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_cgroup_storage_key { + pub cgroup_inode_id: __u64, + pub attach_type: __u32, +} +pub mod bpf_cgroup_iter_order { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_CGROUP_ITER_ORDER_UNSPEC: Type = 0; + pub const BPF_CGROUP_ITER_SELF_ONLY: Type = 1; + pub const BPF_CGROUP_ITER_DESCENDANTS_PRE: Type = 2; + pub const BPF_CGROUP_ITER_DESCENDANTS_POST: Type = 3; + pub const BPF_CGROUP_ITER_ANCESTORS_UP: Type = 4; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_iter_link_info { + pub map: bpf_iter_link_info__bindgen_ty_1, + pub cgroup: bpf_iter_link_info__bindgen_ty_2, + pub task: bpf_iter_link_info__bindgen_ty_3, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_iter_link_info__bindgen_ty_1 { + pub map_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_iter_link_info__bindgen_ty_2 { + pub order: bpf_cgroup_iter_order::Type, + pub cgroup_fd: __u32, + pub cgroup_id: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_iter_link_info__bindgen_ty_3 { + pub tid: __u32, + pub pid: __u32, + pub pid_fd: __u32, +} +pub mod bpf_cmd { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MAP_CREATE: Type = 0; + pub const BPF_MAP_LOOKUP_ELEM: Type = 1; + pub const BPF_MAP_UPDATE_ELEM: Type = 2; + pub const BPF_MAP_DELETE_ELEM: Type = 3; + pub const BPF_MAP_GET_NEXT_KEY: Type = 4; + pub const BPF_PROG_LOAD: Type = 5; + pub const BPF_OBJ_PIN: Type = 6; + pub const BPF_OBJ_GET: Type = 7; + pub const BPF_PROG_ATTACH: Type = 8; + pub const BPF_PROG_DETACH: Type = 9; + pub const BPF_PROG_TEST_RUN: Type = 10; + pub const BPF_PROG_RUN: Type = 10; + pub const BPF_PROG_GET_NEXT_ID: Type = 11; + pub const BPF_MAP_GET_NEXT_ID: Type = 12; + pub const BPF_PROG_GET_FD_BY_ID: Type = 13; + pub const BPF_MAP_GET_FD_BY_ID: Type = 14; + pub const BPF_OBJ_GET_INFO_BY_FD: Type = 15; + pub const BPF_PROG_QUERY: Type = 16; + pub const BPF_RAW_TRACEPOINT_OPEN: Type = 17; + pub const BPF_BTF_LOAD: Type = 18; + pub const BPF_BTF_GET_FD_BY_ID: Type = 19; + pub const BPF_TASK_FD_QUERY: Type = 20; + pub const BPF_MAP_LOOKUP_AND_DELETE_ELEM: Type = 21; + pub const BPF_MAP_FREEZE: Type = 22; + pub const BPF_BTF_GET_NEXT_ID: Type = 23; + pub const BPF_MAP_LOOKUP_BATCH: Type = 24; + pub const BPF_MAP_LOOKUP_AND_DELETE_BATCH: Type = 25; + pub const BPF_MAP_UPDATE_BATCH: Type = 26; + pub const BPF_MAP_DELETE_BATCH: Type = 27; + pub const BPF_LINK_CREATE: Type = 28; + pub const BPF_LINK_UPDATE: Type = 29; + pub const BPF_LINK_GET_FD_BY_ID: Type = 30; + pub const BPF_LINK_GET_NEXT_ID: Type = 31; + pub const BPF_ENABLE_STATS: Type = 32; + pub const BPF_ITER_CREATE: Type = 33; + pub const BPF_LINK_DETACH: Type = 34; + pub const BPF_PROG_BIND_MAP: Type = 35; + pub const BPF_TOKEN_CREATE: Type = 36; + pub const __MAX_BPF_CMD: Type = 37; +} +pub mod bpf_map_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MAP_TYPE_UNSPEC: Type = 0; + pub const BPF_MAP_TYPE_HASH: Type = 1; + pub const BPF_MAP_TYPE_ARRAY: Type = 2; + pub const BPF_MAP_TYPE_PROG_ARRAY: Type = 3; + pub const BPF_MAP_TYPE_PERF_EVENT_ARRAY: Type = 4; + pub const BPF_MAP_TYPE_PERCPU_HASH: Type = 5; + pub const BPF_MAP_TYPE_PERCPU_ARRAY: Type = 6; + pub const BPF_MAP_TYPE_STACK_TRACE: Type = 7; + pub const BPF_MAP_TYPE_CGROUP_ARRAY: Type = 8; + pub const BPF_MAP_TYPE_LRU_HASH: Type = 9; + pub const BPF_MAP_TYPE_LRU_PERCPU_HASH: Type = 10; + pub const BPF_MAP_TYPE_LPM_TRIE: Type = 11; + pub const BPF_MAP_TYPE_ARRAY_OF_MAPS: Type = 12; + pub const BPF_MAP_TYPE_HASH_OF_MAPS: Type = 13; + pub const BPF_MAP_TYPE_DEVMAP: Type = 14; + pub const BPF_MAP_TYPE_SOCKMAP: Type = 15; + pub const BPF_MAP_TYPE_CPUMAP: Type = 16; + pub const BPF_MAP_TYPE_XSKMAP: Type = 17; + pub const BPF_MAP_TYPE_SOCKHASH: Type = 18; + pub const BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED: Type = 19; + pub const BPF_MAP_TYPE_CGROUP_STORAGE: Type = 19; + pub const BPF_MAP_TYPE_REUSEPORT_SOCKARRAY: Type = 20; + pub const BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED: Type = 21; + pub const BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE: Type = 21; + pub const BPF_MAP_TYPE_QUEUE: Type = 22; + pub const BPF_MAP_TYPE_STACK: Type = 23; + pub const BPF_MAP_TYPE_SK_STORAGE: Type = 24; + pub const BPF_MAP_TYPE_DEVMAP_HASH: Type = 25; + pub const BPF_MAP_TYPE_STRUCT_OPS: Type = 26; + pub const BPF_MAP_TYPE_RINGBUF: Type = 27; + pub const BPF_MAP_TYPE_INODE_STORAGE: Type = 28; + pub const BPF_MAP_TYPE_TASK_STORAGE: Type = 29; + pub const BPF_MAP_TYPE_BLOOM_FILTER: Type = 30; + pub const BPF_MAP_TYPE_USER_RINGBUF: Type = 31; + pub const BPF_MAP_TYPE_CGRP_STORAGE: Type = 32; + pub const BPF_MAP_TYPE_ARENA: Type = 33; + pub const __MAX_BPF_MAP_TYPE: Type = 34; +} +pub mod bpf_prog_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_PROG_TYPE_UNSPEC: Type = 0; + pub const BPF_PROG_TYPE_SOCKET_FILTER: Type = 1; + pub const BPF_PROG_TYPE_KPROBE: Type = 2; + pub const BPF_PROG_TYPE_SCHED_CLS: Type = 3; + pub const BPF_PROG_TYPE_SCHED_ACT: Type = 4; + pub const BPF_PROG_TYPE_TRACEPOINT: Type = 5; + pub const BPF_PROG_TYPE_XDP: Type = 6; + pub const BPF_PROG_TYPE_PERF_EVENT: Type = 7; + pub const BPF_PROG_TYPE_CGROUP_SKB: Type = 8; + pub const BPF_PROG_TYPE_CGROUP_SOCK: Type = 9; + pub const BPF_PROG_TYPE_LWT_IN: Type = 10; + pub const BPF_PROG_TYPE_LWT_OUT: Type = 11; + pub const BPF_PROG_TYPE_LWT_XMIT: Type = 12; + pub const BPF_PROG_TYPE_SOCK_OPS: Type = 13; + pub const BPF_PROG_TYPE_SK_SKB: Type = 14; + pub const BPF_PROG_TYPE_CGROUP_DEVICE: Type = 15; + pub const BPF_PROG_TYPE_SK_MSG: Type = 16; + pub const BPF_PROG_TYPE_RAW_TRACEPOINT: Type = 17; + pub const BPF_PROG_TYPE_CGROUP_SOCK_ADDR: Type = 18; + pub const BPF_PROG_TYPE_LWT_SEG6LOCAL: Type = 19; + pub const BPF_PROG_TYPE_LIRC_MODE2: Type = 20; + pub const BPF_PROG_TYPE_SK_REUSEPORT: Type = 21; + pub const BPF_PROG_TYPE_FLOW_DISSECTOR: Type = 22; + pub const BPF_PROG_TYPE_CGROUP_SYSCTL: Type = 23; + pub const BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE: Type = 24; + pub const BPF_PROG_TYPE_CGROUP_SOCKOPT: Type = 25; + pub const BPF_PROG_TYPE_TRACING: Type = 26; + pub const BPF_PROG_TYPE_STRUCT_OPS: Type = 27; + pub const BPF_PROG_TYPE_EXT: Type = 28; + pub const BPF_PROG_TYPE_LSM: Type = 29; + pub const BPF_PROG_TYPE_SK_LOOKUP: Type = 30; + pub const BPF_PROG_TYPE_SYSCALL: Type = 31; + pub const BPF_PROG_TYPE_NETFILTER: Type = 32; + pub const __MAX_BPF_PROG_TYPE: Type = 33; +} +pub mod bpf_attach_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_CGROUP_INET_INGRESS: Type = 0; + pub const BPF_CGROUP_INET_EGRESS: Type = 1; + pub const BPF_CGROUP_INET_SOCK_CREATE: Type = 2; + pub const BPF_CGROUP_SOCK_OPS: Type = 3; + pub const BPF_SK_SKB_STREAM_PARSER: Type = 4; + pub const BPF_SK_SKB_STREAM_VERDICT: Type = 5; + pub const BPF_CGROUP_DEVICE: Type = 6; + pub const BPF_SK_MSG_VERDICT: Type = 7; + pub const BPF_CGROUP_INET4_BIND: Type = 8; + pub const BPF_CGROUP_INET6_BIND: Type = 9; + pub const BPF_CGROUP_INET4_CONNECT: Type = 10; + pub const BPF_CGROUP_INET6_CONNECT: Type = 11; + pub const BPF_CGROUP_INET4_POST_BIND: Type = 12; + pub const BPF_CGROUP_INET6_POST_BIND: Type = 13; + pub const BPF_CGROUP_UDP4_SENDMSG: Type = 14; + pub const BPF_CGROUP_UDP6_SENDMSG: Type = 15; + pub const BPF_LIRC_MODE2: Type = 16; + pub const BPF_FLOW_DISSECTOR: Type = 17; + pub const BPF_CGROUP_SYSCTL: Type = 18; + pub const BPF_CGROUP_UDP4_RECVMSG: Type = 19; + pub const BPF_CGROUP_UDP6_RECVMSG: Type = 20; + pub const BPF_CGROUP_GETSOCKOPT: Type = 21; + pub const BPF_CGROUP_SETSOCKOPT: Type = 22; + pub const BPF_TRACE_RAW_TP: Type = 23; + pub const BPF_TRACE_FENTRY: Type = 24; + pub const BPF_TRACE_FEXIT: Type = 25; + pub const BPF_MODIFY_RETURN: Type = 26; + pub const BPF_LSM_MAC: Type = 27; + pub const BPF_TRACE_ITER: Type = 28; + pub const BPF_CGROUP_INET4_GETPEERNAME: Type = 29; + pub const BPF_CGROUP_INET6_GETPEERNAME: Type = 30; + pub const BPF_CGROUP_INET4_GETSOCKNAME: Type = 31; + pub const BPF_CGROUP_INET6_GETSOCKNAME: Type = 32; + pub const BPF_XDP_DEVMAP: Type = 33; + pub const BPF_CGROUP_INET_SOCK_RELEASE: Type = 34; + pub const BPF_XDP_CPUMAP: Type = 35; + pub const BPF_SK_LOOKUP: Type = 36; + pub const BPF_XDP: Type = 37; + pub const BPF_SK_SKB_VERDICT: Type = 38; + pub const BPF_SK_REUSEPORT_SELECT: Type = 39; + pub const BPF_SK_REUSEPORT_SELECT_OR_MIGRATE: Type = 40; + pub const BPF_PERF_EVENT: Type = 41; + pub const BPF_TRACE_KPROBE_MULTI: Type = 42; + pub const BPF_LSM_CGROUP: Type = 43; + pub const BPF_STRUCT_OPS: Type = 44; + pub const BPF_NETFILTER: Type = 45; + pub const BPF_TCX_INGRESS: Type = 46; + pub const BPF_TCX_EGRESS: Type = 47; + pub const BPF_TRACE_UPROBE_MULTI: Type = 48; + pub const BPF_CGROUP_UNIX_CONNECT: Type = 49; + pub const BPF_CGROUP_UNIX_SENDMSG: Type = 50; + pub const BPF_CGROUP_UNIX_RECVMSG: Type = 51; + pub const BPF_CGROUP_UNIX_GETPEERNAME: Type = 52; + pub const BPF_CGROUP_UNIX_GETSOCKNAME: Type = 53; + pub const BPF_NETKIT_PRIMARY: Type = 54; + pub const BPF_NETKIT_PEER: Type = 55; + pub const __MAX_BPF_ATTACH_TYPE: Type = 56; +} +pub mod bpf_link_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_LINK_TYPE_UNSPEC: Type = 0; + pub const BPF_LINK_TYPE_RAW_TRACEPOINT: Type = 1; + pub const BPF_LINK_TYPE_TRACING: Type = 2; + pub const BPF_LINK_TYPE_CGROUP: Type = 3; + pub const BPF_LINK_TYPE_ITER: Type = 4; + pub const BPF_LINK_TYPE_NETNS: Type = 5; + pub const BPF_LINK_TYPE_XDP: Type = 6; + pub const BPF_LINK_TYPE_PERF_EVENT: Type = 7; + pub const BPF_LINK_TYPE_KPROBE_MULTI: Type = 8; + pub const BPF_LINK_TYPE_STRUCT_OPS: Type = 9; + pub const BPF_LINK_TYPE_NETFILTER: Type = 10; + pub const BPF_LINK_TYPE_TCX: Type = 11; + pub const BPF_LINK_TYPE_UPROBE_MULTI: Type = 12; + pub const BPF_LINK_TYPE_NETKIT: Type = 13; + pub const __MAX_BPF_LINK_TYPE: Type = 14; +} +pub mod bpf_perf_event_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_PERF_EVENT_UNSPEC: Type = 0; + pub const BPF_PERF_EVENT_UPROBE: Type = 1; + pub const BPF_PERF_EVENT_URETPROBE: Type = 2; + pub const BPF_PERF_EVENT_KPROBE: Type = 3; + pub const BPF_PERF_EVENT_KRETPROBE: Type = 4; + pub const BPF_PERF_EVENT_TRACEPOINT: Type = 5; + pub const BPF_PERF_EVENT_EVENT: Type = 6; +} +pub const BPF_F_KPROBE_MULTI_RETURN: _bindgen_ty_2 = 1; +pub type _bindgen_ty_2 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_UPROBE_MULTI_RETURN: _bindgen_ty_3 = 1; +pub type _bindgen_ty_3 = ::aya_ebpf_cty::c_uint; +pub mod bpf_addr_space_cast { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_ADDR_SPACE_CAST: Type = 1; +} +pub const BPF_ANY: _bindgen_ty_4 = 0; +pub const BPF_NOEXIST: _bindgen_ty_4 = 1; +pub const BPF_EXIST: _bindgen_ty_4 = 2; +pub const BPF_F_LOCK: _bindgen_ty_4 = 4; +pub type _bindgen_ty_4 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_NO_PREALLOC: _bindgen_ty_5 = 1; +pub const BPF_F_NO_COMMON_LRU: _bindgen_ty_5 = 2; +pub const BPF_F_NUMA_NODE: _bindgen_ty_5 = 4; +pub const BPF_F_RDONLY: _bindgen_ty_5 = 8; +pub const BPF_F_WRONLY: _bindgen_ty_5 = 16; +pub const BPF_F_STACK_BUILD_ID: _bindgen_ty_5 = 32; +pub const BPF_F_ZERO_SEED: _bindgen_ty_5 = 64; +pub const BPF_F_RDONLY_PROG: _bindgen_ty_5 = 128; +pub const BPF_F_WRONLY_PROG: _bindgen_ty_5 = 256; +pub const BPF_F_CLONE: _bindgen_ty_5 = 512; +pub const BPF_F_MMAPABLE: _bindgen_ty_5 = 1024; +pub const BPF_F_PRESERVE_ELEMS: _bindgen_ty_5 = 2048; +pub const BPF_F_INNER_MAP: _bindgen_ty_5 = 4096; +pub const BPF_F_LINK: _bindgen_ty_5 = 8192; +pub const BPF_F_PATH_FD: _bindgen_ty_5 = 16384; +pub const BPF_F_VTYPE_BTF_OBJ_FD: _bindgen_ty_5 = 32768; +pub const BPF_F_TOKEN_FD: _bindgen_ty_5 = 65536; +pub const BPF_F_SEGV_ON_FAULT: _bindgen_ty_5 = 131072; +pub const BPF_F_NO_USER_CONV: _bindgen_ty_5 = 262144; +pub type _bindgen_ty_5 = ::aya_ebpf_cty::c_uint; +pub mod bpf_stats_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_STATS_RUN_TIME: Type = 0; +} +pub mod bpf_stack_build_id_status { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_STACK_BUILD_ID_EMPTY: Type = 0; + pub const BPF_STACK_BUILD_ID_VALID: Type = 1; + pub const BPF_STACK_BUILD_ID_IP: Type = 2; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_stack_build_id { + pub status: __s32, + pub build_id: [::aya_ebpf_cty::c_uchar; 20usize], + pub __bindgen_anon_1: bpf_stack_build_id__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_stack_build_id__bindgen_ty_1 { + pub offset: __u64, + pub ip: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_1, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_2, + pub batch: bpf_attr__bindgen_ty_3, + pub __bindgen_anon_3: bpf_attr__bindgen_ty_4, + pub __bindgen_anon_4: bpf_attr__bindgen_ty_5, + pub __bindgen_anon_5: bpf_attr__bindgen_ty_6, + pub test: bpf_attr__bindgen_ty_7, + pub __bindgen_anon_6: bpf_attr__bindgen_ty_8, + pub info: bpf_attr__bindgen_ty_9, + pub query: bpf_attr__bindgen_ty_10, + pub raw_tracepoint: bpf_attr__bindgen_ty_11, + pub __bindgen_anon_7: bpf_attr__bindgen_ty_12, + pub task_fd_query: bpf_attr__bindgen_ty_13, + pub link_create: bpf_attr__bindgen_ty_14, + pub link_update: bpf_attr__bindgen_ty_15, + pub link_detach: bpf_attr__bindgen_ty_16, + pub enable_stats: bpf_attr__bindgen_ty_17, + pub iter_create: bpf_attr__bindgen_ty_18, + pub prog_bind_map: bpf_attr__bindgen_ty_19, + pub token_create: bpf_attr__bindgen_ty_20, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_1 { + pub map_type: __u32, + pub key_size: __u32, + pub value_size: __u32, + pub max_entries: __u32, + pub map_flags: __u32, + pub inner_map_fd: __u32, + pub numa_node: __u32, + pub map_name: [::aya_ebpf_cty::c_char; 16usize], + pub map_ifindex: __u32, + pub btf_fd: __u32, + pub btf_key_type_id: __u32, + pub btf_value_type_id: __u32, + pub btf_vmlinux_value_type_id: __u32, + pub map_extra: __u64, + pub value_type_btf_obj_fd: __s32, + pub map_token_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_2 { + pub map_fd: __u32, + pub key: __u64, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_2__bindgen_ty_1, + pub flags: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_2__bindgen_ty_1 { + pub value: __u64, + pub next_key: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_3 { + pub in_batch: __u64, + pub out_batch: __u64, + pub keys: __u64, + pub values: __u64, + pub count: __u32, + pub map_fd: __u32, + pub elem_flags: __u64, + pub flags: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_4 { + pub prog_type: __u32, + pub insn_cnt: __u32, + pub insns: __u64, + pub license: __u64, + pub log_level: __u32, + pub log_size: __u32, + pub log_buf: __u64, + pub kern_version: __u32, + pub prog_flags: __u32, + pub prog_name: [::aya_ebpf_cty::c_char; 16usize], + pub prog_ifindex: __u32, + pub expected_attach_type: __u32, + pub prog_btf_fd: __u32, + pub func_info_rec_size: __u32, + pub func_info: __u64, + pub func_info_cnt: __u32, + pub line_info_rec_size: __u32, + pub line_info: __u64, + pub line_info_cnt: __u32, + pub attach_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_4__bindgen_ty_1, + pub core_relo_cnt: __u32, + pub fd_array: __u64, + pub core_relos: __u64, + pub core_relo_rec_size: __u32, + pub log_true_size: __u32, + pub prog_token_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_4__bindgen_ty_1 { + pub attach_prog_fd: __u32, + pub attach_btf_obj_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_5 { + pub pathname: __u64, + pub bpf_fd: __u32, + pub file_flags: __u32, + pub path_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_6 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_6__bindgen_ty_1, + pub attach_bpf_fd: __u32, + pub attach_type: __u32, + pub attach_flags: __u32, + pub replace_bpf_fd: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_6__bindgen_ty_2, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_6__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_6__bindgen_ty_2 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_7 { + pub prog_fd: __u32, + pub retval: __u32, + pub data_size_in: __u32, + pub data_size_out: __u32, + pub data_in: __u64, + pub data_out: __u64, + pub repeat: __u32, + pub duration: __u32, + pub ctx_size_in: __u32, + pub ctx_size_out: __u32, + pub ctx_in: __u64, + pub ctx_out: __u64, + pub flags: __u32, + pub cpu: __u32, + pub batch_size: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_8 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_8__bindgen_ty_1, + pub next_id: __u32, + pub open_flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_8__bindgen_ty_1 { + pub start_id: __u32, + pub prog_id: __u32, + pub map_id: __u32, + pub btf_id: __u32, + pub link_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_9 { + pub bpf_fd: __u32, + pub info_len: __u32, + pub info: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_10 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_10__bindgen_ty_1, + pub attach_type: __u32, + pub query_flags: __u32, + pub attach_flags: __u32, + pub prog_ids: __u64, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_10__bindgen_ty_2, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub prog_attach_flags: __u64, + pub link_ids: __u64, + pub link_attach_flags: __u64, + pub revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_10__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_10__bindgen_ty_2 { + pub prog_cnt: __u32, + pub count: __u32, +} +impl bpf_attr__bindgen_ty_10 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_11 { + pub name: __u64, + pub prog_fd: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_attr__bindgen_ty_11 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_12 { + pub btf: __u64, + pub btf_log_buf: __u64, + pub btf_size: __u32, + pub btf_log_size: __u32, + pub btf_log_level: __u32, + pub btf_log_true_size: __u32, + pub btf_flags: __u32, + pub btf_token_fd: __s32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_13 { + pub pid: __u32, + pub fd: __u32, + pub flags: __u32, + pub buf_len: __u32, + pub buf: __u64, + pub prog_id: __u32, + pub fd_type: __u32, + pub probe_offset: __u64, + pub probe_addr: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_1, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_14__bindgen_ty_2, + pub attach_type: __u32, + pub flags: __u32, + pub __bindgen_anon_3: bpf_attr__bindgen_ty_14__bindgen_ty_3, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_1 { + pub prog_fd: __u32, + pub map_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3 { + pub target_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1, + pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2, + pub kprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3, + pub tracing: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4, + pub netfilter: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5, + pub tcx: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6, + pub uprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7, + pub netkit: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 { + pub iter_info: __u64, + pub iter_info_len: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 { + pub bpf_cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 { + pub flags: __u32, + pub cnt: __u32, + pub syms: __u64, + pub addrs: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 { + pub target_btf_id: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 { + pub pf: __u32, + pub hooknum: __u32, + pub priority: __s32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 { + pub path: __u64, + pub offsets: __u64, + pub ref_ctr_offsets: __u64, + pub cookies: __u64, + pub cnt: __u32, + pub flags: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_15 { + pub link_fd: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_15__bindgen_ty_1, + pub flags: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_15__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_15__bindgen_ty_1 { + pub new_prog_fd: __u32, + pub new_map_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_15__bindgen_ty_2 { + pub old_prog_fd: __u32, + pub old_map_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_16 { + pub link_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_17 { + pub type_: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_18 { + pub link_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_19 { + pub prog_fd: __u32, + pub map_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_20 { + pub flags: __u32, + pub bpffs_fd: __u32, +} +pub mod bpf_func_id { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_FUNC_unspec: Type = 0; + pub const BPF_FUNC_map_lookup_elem: Type = 1; + pub const BPF_FUNC_map_update_elem: Type = 2; + pub const BPF_FUNC_map_delete_elem: Type = 3; + pub const BPF_FUNC_probe_read: Type = 4; + pub const BPF_FUNC_ktime_get_ns: Type = 5; + pub const BPF_FUNC_trace_printk: Type = 6; + pub const BPF_FUNC_get_prandom_u32: Type = 7; + pub const BPF_FUNC_get_smp_processor_id: Type = 8; + pub const BPF_FUNC_skb_store_bytes: Type = 9; + pub const BPF_FUNC_l3_csum_replace: Type = 10; + pub const BPF_FUNC_l4_csum_replace: Type = 11; + pub const BPF_FUNC_tail_call: Type = 12; + pub const BPF_FUNC_clone_redirect: Type = 13; + pub const BPF_FUNC_get_current_pid_tgid: Type = 14; + pub const BPF_FUNC_get_current_uid_gid: Type = 15; + pub const BPF_FUNC_get_current_comm: Type = 16; + pub const BPF_FUNC_get_cgroup_classid: Type = 17; + pub const BPF_FUNC_skb_vlan_push: Type = 18; + pub const BPF_FUNC_skb_vlan_pop: Type = 19; + pub const BPF_FUNC_skb_get_tunnel_key: Type = 20; + pub const BPF_FUNC_skb_set_tunnel_key: Type = 21; + pub const BPF_FUNC_perf_event_read: Type = 22; + pub const BPF_FUNC_redirect: Type = 23; + pub const BPF_FUNC_get_route_realm: Type = 24; + pub const BPF_FUNC_perf_event_output: Type = 25; + pub const BPF_FUNC_skb_load_bytes: Type = 26; + pub const BPF_FUNC_get_stackid: Type = 27; + pub const BPF_FUNC_csum_diff: Type = 28; + pub const BPF_FUNC_skb_get_tunnel_opt: Type = 29; + pub const BPF_FUNC_skb_set_tunnel_opt: Type = 30; + pub const BPF_FUNC_skb_change_proto: Type = 31; + pub const BPF_FUNC_skb_change_type: Type = 32; + pub const BPF_FUNC_skb_under_cgroup: Type = 33; + pub const BPF_FUNC_get_hash_recalc: Type = 34; + pub const BPF_FUNC_get_current_task: Type = 35; + pub const BPF_FUNC_probe_write_user: Type = 36; + pub const BPF_FUNC_current_task_under_cgroup: Type = 37; + pub const BPF_FUNC_skb_change_tail: Type = 38; + pub const BPF_FUNC_skb_pull_data: Type = 39; + pub const BPF_FUNC_csum_update: Type = 40; + pub const BPF_FUNC_set_hash_invalid: Type = 41; + pub const BPF_FUNC_get_numa_node_id: Type = 42; + pub const BPF_FUNC_skb_change_head: Type = 43; + pub const BPF_FUNC_xdp_adjust_head: Type = 44; + pub const BPF_FUNC_probe_read_str: Type = 45; + pub const BPF_FUNC_get_socket_cookie: Type = 46; + pub const BPF_FUNC_get_socket_uid: Type = 47; + pub const BPF_FUNC_set_hash: Type = 48; + pub const BPF_FUNC_setsockopt: Type = 49; + pub const BPF_FUNC_skb_adjust_room: Type = 50; + pub const BPF_FUNC_redirect_map: Type = 51; + pub const BPF_FUNC_sk_redirect_map: Type = 52; + pub const BPF_FUNC_sock_map_update: Type = 53; + pub const BPF_FUNC_xdp_adjust_meta: Type = 54; + pub const BPF_FUNC_perf_event_read_value: Type = 55; + pub const BPF_FUNC_perf_prog_read_value: Type = 56; + pub const BPF_FUNC_getsockopt: Type = 57; + pub const BPF_FUNC_override_return: Type = 58; + pub const BPF_FUNC_sock_ops_cb_flags_set: Type = 59; + pub const BPF_FUNC_msg_redirect_map: Type = 60; + pub const BPF_FUNC_msg_apply_bytes: Type = 61; + pub const BPF_FUNC_msg_cork_bytes: Type = 62; + pub const BPF_FUNC_msg_pull_data: Type = 63; + pub const BPF_FUNC_bind: Type = 64; + pub const BPF_FUNC_xdp_adjust_tail: Type = 65; + pub const BPF_FUNC_skb_get_xfrm_state: Type = 66; + pub const BPF_FUNC_get_stack: Type = 67; + pub const BPF_FUNC_skb_load_bytes_relative: Type = 68; + pub const BPF_FUNC_fib_lookup: Type = 69; + pub const BPF_FUNC_sock_hash_update: Type = 70; + pub const BPF_FUNC_msg_redirect_hash: Type = 71; + pub const BPF_FUNC_sk_redirect_hash: Type = 72; + pub const BPF_FUNC_lwt_push_encap: Type = 73; + pub const BPF_FUNC_lwt_seg6_store_bytes: Type = 74; + pub const BPF_FUNC_lwt_seg6_adjust_srh: Type = 75; + pub const BPF_FUNC_lwt_seg6_action: Type = 76; + pub const BPF_FUNC_rc_repeat: Type = 77; + pub const BPF_FUNC_rc_keydown: Type = 78; + pub const BPF_FUNC_skb_cgroup_id: Type = 79; + pub const BPF_FUNC_get_current_cgroup_id: Type = 80; + pub const BPF_FUNC_get_local_storage: Type = 81; + pub const BPF_FUNC_sk_select_reuseport: Type = 82; + pub const BPF_FUNC_skb_ancestor_cgroup_id: Type = 83; + pub const BPF_FUNC_sk_lookup_tcp: Type = 84; + pub const BPF_FUNC_sk_lookup_udp: Type = 85; + pub const BPF_FUNC_sk_release: Type = 86; + pub const BPF_FUNC_map_push_elem: Type = 87; + pub const BPF_FUNC_map_pop_elem: Type = 88; + pub const BPF_FUNC_map_peek_elem: Type = 89; + pub const BPF_FUNC_msg_push_data: Type = 90; + pub const BPF_FUNC_msg_pop_data: Type = 91; + pub const BPF_FUNC_rc_pointer_rel: Type = 92; + pub const BPF_FUNC_spin_lock: Type = 93; + pub const BPF_FUNC_spin_unlock: Type = 94; + pub const BPF_FUNC_sk_fullsock: Type = 95; + pub const BPF_FUNC_tcp_sock: Type = 96; + pub const BPF_FUNC_skb_ecn_set_ce: Type = 97; + pub const BPF_FUNC_get_listener_sock: Type = 98; + pub const BPF_FUNC_skc_lookup_tcp: Type = 99; + pub const BPF_FUNC_tcp_check_syncookie: Type = 100; + pub const BPF_FUNC_sysctl_get_name: Type = 101; + pub const BPF_FUNC_sysctl_get_current_value: Type = 102; + pub const BPF_FUNC_sysctl_get_new_value: Type = 103; + pub const BPF_FUNC_sysctl_set_new_value: Type = 104; + pub const BPF_FUNC_strtol: Type = 105; + pub const BPF_FUNC_strtoul: Type = 106; + pub const BPF_FUNC_sk_storage_get: Type = 107; + pub const BPF_FUNC_sk_storage_delete: Type = 108; + pub const BPF_FUNC_send_signal: Type = 109; + pub const BPF_FUNC_tcp_gen_syncookie: Type = 110; + pub const BPF_FUNC_skb_output: Type = 111; + pub const BPF_FUNC_probe_read_user: Type = 112; + pub const BPF_FUNC_probe_read_kernel: Type = 113; + pub const BPF_FUNC_probe_read_user_str: Type = 114; + pub const BPF_FUNC_probe_read_kernel_str: Type = 115; + pub const BPF_FUNC_tcp_send_ack: Type = 116; + pub const BPF_FUNC_send_signal_thread: Type = 117; + pub const BPF_FUNC_jiffies64: Type = 118; + pub const BPF_FUNC_read_branch_records: Type = 119; + pub const BPF_FUNC_get_ns_current_pid_tgid: Type = 120; + pub const BPF_FUNC_xdp_output: Type = 121; + pub const BPF_FUNC_get_netns_cookie: Type = 122; + pub const BPF_FUNC_get_current_ancestor_cgroup_id: Type = 123; + pub const BPF_FUNC_sk_assign: Type = 124; + pub const BPF_FUNC_ktime_get_boot_ns: Type = 125; + pub const BPF_FUNC_seq_printf: Type = 126; + pub const BPF_FUNC_seq_write: Type = 127; + pub const BPF_FUNC_sk_cgroup_id: Type = 128; + pub const BPF_FUNC_sk_ancestor_cgroup_id: Type = 129; + pub const BPF_FUNC_ringbuf_output: Type = 130; + pub const BPF_FUNC_ringbuf_reserve: Type = 131; + pub const BPF_FUNC_ringbuf_submit: Type = 132; + pub const BPF_FUNC_ringbuf_discard: Type = 133; + pub const BPF_FUNC_ringbuf_query: Type = 134; + pub const BPF_FUNC_csum_level: Type = 135; + pub const BPF_FUNC_skc_to_tcp6_sock: Type = 136; + pub const BPF_FUNC_skc_to_tcp_sock: Type = 137; + pub const BPF_FUNC_skc_to_tcp_timewait_sock: Type = 138; + pub const BPF_FUNC_skc_to_tcp_request_sock: Type = 139; + pub const BPF_FUNC_skc_to_udp6_sock: Type = 140; + pub const BPF_FUNC_get_task_stack: Type = 141; + pub const BPF_FUNC_load_hdr_opt: Type = 142; + pub const BPF_FUNC_store_hdr_opt: Type = 143; + pub const BPF_FUNC_reserve_hdr_opt: Type = 144; + pub const BPF_FUNC_inode_storage_get: Type = 145; + pub const BPF_FUNC_inode_storage_delete: Type = 146; + pub const BPF_FUNC_d_path: Type = 147; + pub const BPF_FUNC_copy_from_user: Type = 148; + pub const BPF_FUNC_snprintf_btf: Type = 149; + pub const BPF_FUNC_seq_printf_btf: Type = 150; + pub const BPF_FUNC_skb_cgroup_classid: Type = 151; + pub const BPF_FUNC_redirect_neigh: Type = 152; + pub const BPF_FUNC_per_cpu_ptr: Type = 153; + pub const BPF_FUNC_this_cpu_ptr: Type = 154; + pub const BPF_FUNC_redirect_peer: Type = 155; + pub const BPF_FUNC_task_storage_get: Type = 156; + pub const BPF_FUNC_task_storage_delete: Type = 157; + pub const BPF_FUNC_get_current_task_btf: Type = 158; + pub const BPF_FUNC_bprm_opts_set: Type = 159; + pub const BPF_FUNC_ktime_get_coarse_ns: Type = 160; + pub const BPF_FUNC_ima_inode_hash: Type = 161; + pub const BPF_FUNC_sock_from_file: Type = 162; + pub const BPF_FUNC_check_mtu: Type = 163; + pub const BPF_FUNC_for_each_map_elem: Type = 164; + pub const BPF_FUNC_snprintf: Type = 165; + pub const BPF_FUNC_sys_bpf: Type = 166; + pub const BPF_FUNC_btf_find_by_name_kind: Type = 167; + pub const BPF_FUNC_sys_close: Type = 168; + pub const BPF_FUNC_timer_init: Type = 169; + pub const BPF_FUNC_timer_set_callback: Type = 170; + pub const BPF_FUNC_timer_start: Type = 171; + pub const BPF_FUNC_timer_cancel: Type = 172; + pub const BPF_FUNC_get_func_ip: Type = 173; + pub const BPF_FUNC_get_attach_cookie: Type = 174; + pub const BPF_FUNC_task_pt_regs: Type = 175; + pub const BPF_FUNC_get_branch_snapshot: Type = 176; + pub const BPF_FUNC_trace_vprintk: Type = 177; + pub const BPF_FUNC_skc_to_unix_sock: Type = 178; + pub const BPF_FUNC_kallsyms_lookup_name: Type = 179; + pub const BPF_FUNC_find_vma: Type = 180; + pub const BPF_FUNC_loop: Type = 181; + pub const BPF_FUNC_strncmp: Type = 182; + pub const BPF_FUNC_get_func_arg: Type = 183; + pub const BPF_FUNC_get_func_ret: Type = 184; + pub const BPF_FUNC_get_func_arg_cnt: Type = 185; + pub const BPF_FUNC_get_retval: Type = 186; + pub const BPF_FUNC_set_retval: Type = 187; + pub const BPF_FUNC_xdp_get_buff_len: Type = 188; + pub const BPF_FUNC_xdp_load_bytes: Type = 189; + pub const BPF_FUNC_xdp_store_bytes: Type = 190; + pub const BPF_FUNC_copy_from_user_task: Type = 191; + pub const BPF_FUNC_skb_set_tstamp: Type = 192; + pub const BPF_FUNC_ima_file_hash: Type = 193; + pub const BPF_FUNC_kptr_xchg: Type = 194; + pub const BPF_FUNC_map_lookup_percpu_elem: Type = 195; + pub const BPF_FUNC_skc_to_mptcp_sock: Type = 196; + pub const BPF_FUNC_dynptr_from_mem: Type = 197; + pub const BPF_FUNC_ringbuf_reserve_dynptr: Type = 198; + pub const BPF_FUNC_ringbuf_submit_dynptr: Type = 199; + pub const BPF_FUNC_ringbuf_discard_dynptr: Type = 200; + pub const BPF_FUNC_dynptr_read: Type = 201; + pub const BPF_FUNC_dynptr_write: Type = 202; + pub const BPF_FUNC_dynptr_data: Type = 203; + pub const BPF_FUNC_tcp_raw_gen_syncookie_ipv4: Type = 204; + pub const BPF_FUNC_tcp_raw_gen_syncookie_ipv6: Type = 205; + pub const BPF_FUNC_tcp_raw_check_syncookie_ipv4: Type = 206; + pub const BPF_FUNC_tcp_raw_check_syncookie_ipv6: Type = 207; + pub const BPF_FUNC_ktime_get_tai_ns: Type = 208; + pub const BPF_FUNC_user_ringbuf_drain: Type = 209; + pub const BPF_FUNC_cgrp_storage_get: Type = 210; + pub const BPF_FUNC_cgrp_storage_delete: Type = 211; + pub const __BPF_FUNC_MAX_ID: Type = 212; +} +pub const BPF_F_RECOMPUTE_CSUM: _bindgen_ty_6 = 1; +pub const BPF_F_INVALIDATE_HASH: _bindgen_ty_6 = 2; +pub type _bindgen_ty_6 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_HDR_FIELD_MASK: _bindgen_ty_7 = 15; +pub type _bindgen_ty_7 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_PSEUDO_HDR: _bindgen_ty_8 = 16; +pub const BPF_F_MARK_MANGLED_0: _bindgen_ty_8 = 32; +pub const BPF_F_MARK_ENFORCE: _bindgen_ty_8 = 64; +pub type _bindgen_ty_8 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_INGRESS: _bindgen_ty_9 = 1; +pub type _bindgen_ty_9 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_TUNINFO_IPV6: _bindgen_ty_10 = 1; +pub type _bindgen_ty_10 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_SKIP_FIELD_MASK: _bindgen_ty_11 = 255; +pub const BPF_F_USER_STACK: _bindgen_ty_11 = 256; +pub const BPF_F_FAST_STACK_CMP: _bindgen_ty_11 = 512; +pub const BPF_F_REUSE_STACKID: _bindgen_ty_11 = 1024; +pub const BPF_F_USER_BUILD_ID: _bindgen_ty_11 = 2048; +pub type _bindgen_ty_11 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_ZERO_CSUM_TX: _bindgen_ty_12 = 2; +pub const BPF_F_DONT_FRAGMENT: _bindgen_ty_12 = 4; +pub const BPF_F_SEQ_NUMBER: _bindgen_ty_12 = 8; +pub const BPF_F_NO_TUNNEL_KEY: _bindgen_ty_12 = 16; +pub type _bindgen_ty_12 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_TUNINFO_FLAGS: _bindgen_ty_13 = 16; +pub type _bindgen_ty_13 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_INDEX_MASK: _bindgen_ty_14 = 4294967295; +pub const BPF_F_CURRENT_CPU: _bindgen_ty_14 = 4294967295; +pub const BPF_F_CTXLEN_MASK: _bindgen_ty_14 = 4503595332403200; +pub type _bindgen_ty_14 = ::aya_ebpf_cty::c_ulong; +pub const BPF_F_CURRENT_NETNS: _bindgen_ty_15 = -1; +pub type _bindgen_ty_15 = ::aya_ebpf_cty::c_int; +pub const BPF_CSUM_LEVEL_QUERY: _bindgen_ty_16 = 0; +pub const BPF_CSUM_LEVEL_INC: _bindgen_ty_16 = 1; +pub const BPF_CSUM_LEVEL_DEC: _bindgen_ty_16 = 2; +pub const BPF_CSUM_LEVEL_RESET: _bindgen_ty_16 = 3; +pub type _bindgen_ty_16 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_ADJ_ROOM_FIXED_GSO: _bindgen_ty_17 = 1; +pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: _bindgen_ty_17 = 2; +pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: _bindgen_ty_17 = 4; +pub const BPF_F_ADJ_ROOM_ENCAP_L4_GRE: _bindgen_ty_17 = 8; +pub const BPF_F_ADJ_ROOM_ENCAP_L4_UDP: _bindgen_ty_17 = 16; +pub const BPF_F_ADJ_ROOM_NO_CSUM_RESET: _bindgen_ty_17 = 32; +pub const BPF_F_ADJ_ROOM_ENCAP_L2_ETH: _bindgen_ty_17 = 64; +pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV4: _bindgen_ty_17 = 128; +pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV6: _bindgen_ty_17 = 256; +pub type _bindgen_ty_17 = ::aya_ebpf_cty::c_uint; +pub const BPF_ADJ_ROOM_ENCAP_L2_MASK: _bindgen_ty_18 = 255; +pub const BPF_ADJ_ROOM_ENCAP_L2_SHIFT: _bindgen_ty_18 = 56; +pub type _bindgen_ty_18 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_SYSCTL_BASE_NAME: _bindgen_ty_19 = 1; +pub type _bindgen_ty_19 = ::aya_ebpf_cty::c_uint; +pub const BPF_LOCAL_STORAGE_GET_F_CREATE: _bindgen_ty_20 = 1; +pub const BPF_SK_STORAGE_GET_F_CREATE: _bindgen_ty_20 = 1; +pub type _bindgen_ty_20 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_GET_BRANCH_RECORDS_SIZE: _bindgen_ty_21 = 1; +pub type _bindgen_ty_21 = ::aya_ebpf_cty::c_uint; +pub const BPF_RB_NO_WAKEUP: _bindgen_ty_22 = 1; +pub const BPF_RB_FORCE_WAKEUP: _bindgen_ty_22 = 2; +pub type _bindgen_ty_22 = ::aya_ebpf_cty::c_uint; +pub const BPF_RB_AVAIL_DATA: _bindgen_ty_23 = 0; +pub const BPF_RB_RING_SIZE: _bindgen_ty_23 = 1; +pub const BPF_RB_CONS_POS: _bindgen_ty_23 = 2; +pub const BPF_RB_PROD_POS: _bindgen_ty_23 = 3; +pub type _bindgen_ty_23 = ::aya_ebpf_cty::c_uint; +pub const BPF_RINGBUF_BUSY_BIT: _bindgen_ty_24 = 2147483648; +pub const BPF_RINGBUF_DISCARD_BIT: _bindgen_ty_24 = 1073741824; +pub const BPF_RINGBUF_HDR_SZ: _bindgen_ty_24 = 8; +pub type _bindgen_ty_24 = ::aya_ebpf_cty::c_uint; +pub const BPF_SK_LOOKUP_F_REPLACE: _bindgen_ty_25 = 1; +pub const BPF_SK_LOOKUP_F_NO_REUSEPORT: _bindgen_ty_25 = 2; +pub type _bindgen_ty_25 = ::aya_ebpf_cty::c_uint; +pub mod bpf_adj_room_mode { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_ADJ_ROOM_NET: Type = 0; + pub const BPF_ADJ_ROOM_MAC: Type = 1; +} +pub mod bpf_hdr_start_off { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_HDR_START_MAC: Type = 0; + pub const BPF_HDR_START_NET: Type = 1; +} +pub mod bpf_lwt_encap_mode { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_LWT_ENCAP_SEG6: Type = 0; + pub const BPF_LWT_ENCAP_SEG6_INLINE: Type = 1; + pub const BPF_LWT_ENCAP_IP: Type = 2; +} +pub const BPF_F_BPRM_SECUREEXEC: _bindgen_ty_26 = 1; +pub type _bindgen_ty_26 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_BROADCAST: _bindgen_ty_27 = 8; +pub const BPF_F_EXCLUDE_INGRESS: _bindgen_ty_27 = 16; +pub type _bindgen_ty_27 = ::aya_ebpf_cty::c_uint; +pub mod _bindgen_ty_28 { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_SKB_TSTAMP_UNSPEC: Type = 0; + pub const BPF_SKB_TSTAMP_DELIVERY_MONO: Type = 1; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct __sk_buff { + pub len: __u32, + pub pkt_type: __u32, + pub mark: __u32, + pub queue_mapping: __u32, + pub protocol: __u32, + pub vlan_present: __u32, + pub vlan_tci: __u32, + pub vlan_proto: __u32, + pub priority: __u32, + pub ingress_ifindex: __u32, + pub ifindex: __u32, + pub tc_index: __u32, + pub cb: [__u32; 5usize], + pub hash: __u32, + pub tc_classid: __u32, + pub data: __u32, + pub data_end: __u32, + pub napi_id: __u32, + pub family: __u32, + pub remote_ip4: __u32, + pub local_ip4: __u32, + pub remote_ip6: [__u32; 4usize], + pub local_ip6: [__u32; 4usize], + pub remote_port: __u32, + pub local_port: __u32, + pub data_meta: __u32, + pub __bindgen_anon_1: __sk_buff__bindgen_ty_1, + pub tstamp: __u64, + pub wire_len: __u32, + pub gso_segs: __u32, + pub __bindgen_anon_2: __sk_buff__bindgen_ty_2, + pub gso_size: __u32, + pub tstamp_type: __u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub hwtstamp: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union __sk_buff__bindgen_ty_1 { + pub flow_keys: *mut bpf_flow_keys, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl __sk_buff__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union __sk_buff__bindgen_ty_2 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl __sk_buff__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +impl __sk_buff { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_tunnel_key { + pub tunnel_id: __u32, + pub __bindgen_anon_1: bpf_tunnel_key__bindgen_ty_1, + pub tunnel_tos: __u8, + pub tunnel_ttl: __u8, + pub __bindgen_anon_2: bpf_tunnel_key__bindgen_ty_2, + pub tunnel_label: __u32, + pub __bindgen_anon_3: bpf_tunnel_key__bindgen_ty_3, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_tunnel_key__bindgen_ty_1 { + pub remote_ipv4: __u32, + pub remote_ipv6: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_tunnel_key__bindgen_ty_2 { + pub tunnel_ext: __u16, + pub tunnel_flags: __be16, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_tunnel_key__bindgen_ty_3 { + pub local_ipv4: __u32, + pub local_ipv6: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_xfrm_state { + pub reqid: __u32, + pub spi: __u32, + pub family: __u16, + pub ext: __u16, + pub __bindgen_anon_1: bpf_xfrm_state__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_xfrm_state__bindgen_ty_1 { + pub remote_ipv4: __u32, + pub remote_ipv6: [__u32; 4usize], +} +pub mod bpf_ret_code { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_OK: Type = 0; + pub const BPF_DROP: Type = 2; + pub const BPF_REDIRECT: Type = 7; + pub const BPF_LWT_REROUTE: Type = 128; + pub const BPF_FLOW_DISSECTOR_CONTINUE: Type = 129; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_sock { + pub bound_dev_if: __u32, + pub family: __u32, + pub type_: __u32, + pub protocol: __u32, + pub mark: __u32, + pub priority: __u32, + pub src_ip4: __u32, + pub src_ip6: [__u32; 4usize], + pub src_port: __u32, + pub dst_port: __be16, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, + pub dst_ip4: __u32, + pub dst_ip6: [__u32; 4usize], + pub state: __u32, + pub rx_queue_mapping: __s32, +} +impl bpf_sock { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_tcp_sock { + pub snd_cwnd: __u32, + pub srtt_us: __u32, + pub rtt_min: __u32, + pub snd_ssthresh: __u32, + pub rcv_nxt: __u32, + pub snd_nxt: __u32, + pub snd_una: __u32, + pub mss_cache: __u32, + pub ecn_flags: __u32, + pub rate_delivered: __u32, + pub rate_interval_us: __u32, + pub packets_out: __u32, + pub retrans_out: __u32, + pub total_retrans: __u32, + pub segs_in: __u32, + pub data_segs_in: __u32, + pub segs_out: __u32, + pub data_segs_out: __u32, + pub lost_out: __u32, + pub sacked_out: __u32, + pub bytes_received: __u64, + pub bytes_acked: __u64, + pub dsack_dups: __u32, + pub delivered: __u32, + pub delivered_ce: __u32, + pub icsk_retransmits: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sock_tuple { + pub __bindgen_anon_1: bpf_sock_tuple__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sock_tuple__bindgen_ty_1 { + pub ipv4: bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1, + pub ipv6: bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 { + pub saddr: __be32, + pub daddr: __be32, + pub sport: __be16, + pub dport: __be16, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 { + pub saddr: [__be32; 4usize], + pub daddr: [__be32; 4usize], + pub sport: __be16, + pub dport: __be16, +} +pub mod tcx_action_base { + pub type Type = ::aya_ebpf_cty::c_int; + pub const TCX_NEXT: Type = -1; + pub const TCX_PASS: Type = 0; + pub const TCX_DROP: Type = 2; + pub const TCX_REDIRECT: Type = 7; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_xdp_sock { + pub queue_id: __u32, +} +pub mod xdp_action { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const XDP_ABORTED: Type = 0; + pub const XDP_DROP: Type = 1; + pub const XDP_PASS: Type = 2; + pub const XDP_TX: Type = 3; + pub const XDP_REDIRECT: Type = 4; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct xdp_md { + pub data: __u32, + pub data_end: __u32, + pub data_meta: __u32, + pub ingress_ifindex: __u32, + pub rx_queue_index: __u32, + pub egress_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_devmap_val { + pub ifindex: __u32, + pub bpf_prog: bpf_devmap_val__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_devmap_val__bindgen_ty_1 { + pub fd: ::aya_ebpf_cty::c_int, + pub id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_cpumap_val { + pub qsize: __u32, + pub bpf_prog: bpf_cpumap_val__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_cpumap_val__bindgen_ty_1 { + pub fd: ::aya_ebpf_cty::c_int, + pub id: __u32, +} +pub mod sk_action { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const SK_DROP: Type = 0; + pub const SK_PASS: Type = 1; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sk_msg_md { + pub __bindgen_anon_1: sk_msg_md__bindgen_ty_1, + pub __bindgen_anon_2: sk_msg_md__bindgen_ty_2, + pub family: __u32, + pub remote_ip4: __u32, + pub local_ip4: __u32, + pub remote_ip6: [__u32; 4usize], + pub local_ip6: [__u32; 4usize], + pub remote_port: __u32, + pub local_port: __u32, + pub size: __u32, + pub __bindgen_anon_3: sk_msg_md__bindgen_ty_3, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sk_msg_md__bindgen_ty_1 { + pub data: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_msg_md__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sk_msg_md__bindgen_ty_2 { + pub data_end: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_msg_md__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sk_msg_md__bindgen_ty_3 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_msg_md__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sk_reuseport_md { + pub __bindgen_anon_1: sk_reuseport_md__bindgen_ty_1, + pub __bindgen_anon_2: sk_reuseport_md__bindgen_ty_2, + pub len: __u32, + pub eth_protocol: __u32, + pub ip_protocol: __u32, + pub bind_inany: __u32, + pub hash: __u32, + pub __bindgen_anon_3: sk_reuseport_md__bindgen_ty_3, + pub __bindgen_anon_4: sk_reuseport_md__bindgen_ty_4, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sk_reuseport_md__bindgen_ty_1 { + pub data: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_reuseport_md__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sk_reuseport_md__bindgen_ty_2 { + pub data_end: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_reuseport_md__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sk_reuseport_md__bindgen_ty_3 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_reuseport_md__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sk_reuseport_md__bindgen_ty_4 { + pub migrating_sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_reuseport_md__bindgen_ty_4 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_prog_info { + pub type_: __u32, + pub id: __u32, + pub tag: [__u8; 8usize], + pub jited_prog_len: __u32, + pub xlated_prog_len: __u32, + pub jited_prog_insns: __u64, + pub xlated_prog_insns: __u64, + pub load_time: __u64, + pub created_by_uid: __u32, + pub nr_map_ids: __u32, + pub map_ids: __u64, + pub name: [::aya_ebpf_cty::c_char; 16usize], + pub ifindex: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub netns_dev: __u64, + pub netns_ino: __u64, + pub nr_jited_ksyms: __u32, + pub nr_jited_func_lens: __u32, + pub jited_ksyms: __u64, + pub jited_func_lens: __u64, + pub btf_id: __u32, + pub func_info_rec_size: __u32, + pub func_info: __u64, + pub nr_func_info: __u32, + pub nr_line_info: __u32, + pub line_info: __u64, + pub jited_line_info: __u64, + pub nr_jited_line_info: __u32, + pub line_info_rec_size: __u32, + pub jited_line_info_rec_size: __u32, + pub nr_prog_tags: __u32, + pub prog_tags: __u64, + pub run_time_ns: __u64, + pub run_cnt: __u64, + pub recursion_misses: __u64, + pub verified_insns: __u32, + pub attach_btf_obj_id: __u32, + pub attach_btf_id: __u32, +} +impl bpf_prog_info { + #[inline] + pub fn gpl_compatible(&self) -> __u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_gpl_compatible(&mut self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let gpl_compatible: u32 = unsafe { ::core::mem::transmute(gpl_compatible) }; + gpl_compatible as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_map_info { + pub type_: __u32, + pub id: __u32, + pub key_size: __u32, + pub value_size: __u32, + pub max_entries: __u32, + pub map_flags: __u32, + pub name: [::aya_ebpf_cty::c_char; 16usize], + pub ifindex: __u32, + pub btf_vmlinux_value_type_id: __u32, + pub netns_dev: __u64, + pub netns_ino: __u64, + pub btf_id: __u32, + pub btf_key_type_id: __u32, + pub btf_value_type_id: __u32, + pub btf_vmlinux_id: __u32, + pub map_extra: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_btf_info { + pub btf: __u64, + pub btf_size: __u32, + pub id: __u32, + pub name: __u64, + pub name_len: __u32, + pub kernel_btf: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info { + pub type_: __u32, + pub id: __u32, + pub prog_id: __u32, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1 { + pub raw_tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_1, + pub tracing: bpf_link_info__bindgen_ty_1__bindgen_ty_2, + pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_3, + pub iter: bpf_link_info__bindgen_ty_1__bindgen_ty_4, + pub netns: bpf_link_info__bindgen_ty_1__bindgen_ty_5, + pub xdp: bpf_link_info__bindgen_ty_1__bindgen_ty_6, + pub struct_ops: bpf_link_info__bindgen_ty_1__bindgen_ty_7, + pub netfilter: bpf_link_info__bindgen_ty_1__bindgen_ty_8, + pub kprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_9, + pub uprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_10, + pub perf_event: bpf_link_info__bindgen_ty_1__bindgen_ty_11, + pub tcx: bpf_link_info__bindgen_ty_1__bindgen_ty_12, + pub netkit: bpf_link_info__bindgen_ty_1__bindgen_ty_13, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_1 { + pub tp_name: __u64, + pub tp_name_len: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_2 { + pub attach_type: __u32, + pub target_obj_id: __u32, + pub target_btf_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_3 { + pub cgroup_id: __u64, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4 { + pub target_name: __u64, + pub target_name_len: __u32, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, + pub __bindgen_anon_2: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 { + pub map: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 { + pub map_id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 { + pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1, + pub task: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 { + pub cgroup_id: __u64, + pub order: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 { + pub tid: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_5 { + pub netns_ino: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_6 { + pub ifindex: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_7 { + pub map_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_8 { + pub pf: __u32, + pub hooknum: __u32, + pub priority: __s32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_9 { + pub addrs: __u64, + pub count: __u32, + pub flags: __u32, + pub missed: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_10 { + pub path: __u64, + pub offsets: __u64, + pub ref_ctr_offsets: __u64, + pub cookies: __u64, + pub path_size: __u32, + pub count: __u32, + pub flags: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11 { + pub type_: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 { + pub uprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1, + pub kprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2, + pub tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3, + pub event: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 { + pub file_name: __u64, + pub name_len: __u32, + pub offset: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 { + pub func_name: __u64, + pub name_len: __u32, + pub offset: __u32, + pub addr: __u64, + pub missed: __u64, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 { + pub tp_name: __u64, + pub name_len: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 { + pub config: __u64, + pub type_: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_12 { + pub ifindex: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_13 { + pub ifindex: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sock_addr { + pub user_family: __u32, + pub user_ip4: __u32, + pub user_ip6: [__u32; 4usize], + pub user_port: __u32, + pub family: __u32, + pub type_: __u32, + pub protocol: __u32, + pub msg_src_ip4: __u32, + pub msg_src_ip6: [__u32; 4usize], + pub __bindgen_anon_1: bpf_sock_addr__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sock_addr__bindgen_ty_1 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sock_addr__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sock_ops { + pub op: __u32, + pub __bindgen_anon_1: bpf_sock_ops__bindgen_ty_1, + pub family: __u32, + pub remote_ip4: __u32, + pub local_ip4: __u32, + pub remote_ip6: [__u32; 4usize], + pub local_ip6: [__u32; 4usize], + pub remote_port: __u32, + pub local_port: __u32, + pub is_fullsock: __u32, + pub snd_cwnd: __u32, + pub srtt_us: __u32, + pub bpf_sock_ops_cb_flags: __u32, + pub state: __u32, + pub rtt_min: __u32, + pub snd_ssthresh: __u32, + pub rcv_nxt: __u32, + pub snd_nxt: __u32, + pub snd_una: __u32, + pub mss_cache: __u32, + pub ecn_flags: __u32, + pub rate_delivered: __u32, + pub rate_interval_us: __u32, + pub packets_out: __u32, + pub retrans_out: __u32, + pub total_retrans: __u32, + pub segs_in: __u32, + pub data_segs_in: __u32, + pub segs_out: __u32, + pub data_segs_out: __u32, + pub lost_out: __u32, + pub sacked_out: __u32, + pub sk_txhash: __u32, + pub bytes_received: __u64, + pub bytes_acked: __u64, + pub __bindgen_anon_2: bpf_sock_ops__bindgen_ty_2, + pub __bindgen_anon_3: bpf_sock_ops__bindgen_ty_3, + pub __bindgen_anon_4: bpf_sock_ops__bindgen_ty_4, + pub skb_len: __u32, + pub skb_tcp_flags: __u32, + pub skb_hwtstamp: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sock_ops__bindgen_ty_1 { + pub args: [__u32; 4usize], + pub reply: __u32, + pub replylong: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sock_ops__bindgen_ty_2 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sock_ops__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sock_ops__bindgen_ty_3 { + pub skb_data: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sock_ops__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sock_ops__bindgen_ty_4 { + pub skb_data_end: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sock_ops__bindgen_ty_4 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +pub const BPF_SOCK_OPS_RTO_CB_FLAG: _bindgen_ty_29 = 1; +pub const BPF_SOCK_OPS_RETRANS_CB_FLAG: _bindgen_ty_29 = 2; +pub const BPF_SOCK_OPS_STATE_CB_FLAG: _bindgen_ty_29 = 4; +pub const BPF_SOCK_OPS_RTT_CB_FLAG: _bindgen_ty_29 = 8; +pub const BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: _bindgen_ty_29 = 16; +pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: _bindgen_ty_29 = 32; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: _bindgen_ty_29 = 64; +pub const BPF_SOCK_OPS_ALL_CB_FLAGS: _bindgen_ty_29 = 127; +pub type _bindgen_ty_29 = ::aya_ebpf_cty::c_uint; +pub const BPF_SOCK_OPS_VOID: _bindgen_ty_30 = 0; +pub const BPF_SOCK_OPS_TIMEOUT_INIT: _bindgen_ty_30 = 1; +pub const BPF_SOCK_OPS_RWND_INIT: _bindgen_ty_30 = 2; +pub const BPF_SOCK_OPS_TCP_CONNECT_CB: _bindgen_ty_30 = 3; +pub const BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB: _bindgen_ty_30 = 4; +pub const BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: _bindgen_ty_30 = 5; +pub const BPF_SOCK_OPS_NEEDS_ECN: _bindgen_ty_30 = 6; +pub const BPF_SOCK_OPS_BASE_RTT: _bindgen_ty_30 = 7; +pub const BPF_SOCK_OPS_RTO_CB: _bindgen_ty_30 = 8; +pub const BPF_SOCK_OPS_RETRANS_CB: _bindgen_ty_30 = 9; +pub const BPF_SOCK_OPS_STATE_CB: _bindgen_ty_30 = 10; +pub const BPF_SOCK_OPS_TCP_LISTEN_CB: _bindgen_ty_30 = 11; +pub const BPF_SOCK_OPS_RTT_CB: _bindgen_ty_30 = 12; +pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: _bindgen_ty_30 = 13; +pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: _bindgen_ty_30 = 14; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: _bindgen_ty_30 = 15; +pub type _bindgen_ty_30 = ::aya_ebpf_cty::c_uint; +pub const BPF_TCP_ESTABLISHED: _bindgen_ty_31 = 1; +pub const BPF_TCP_SYN_SENT: _bindgen_ty_31 = 2; +pub const BPF_TCP_SYN_RECV: _bindgen_ty_31 = 3; +pub const BPF_TCP_FIN_WAIT1: _bindgen_ty_31 = 4; +pub const BPF_TCP_FIN_WAIT2: _bindgen_ty_31 = 5; +pub const BPF_TCP_TIME_WAIT: _bindgen_ty_31 = 6; +pub const BPF_TCP_CLOSE: _bindgen_ty_31 = 7; +pub const BPF_TCP_CLOSE_WAIT: _bindgen_ty_31 = 8; +pub const BPF_TCP_LAST_ACK: _bindgen_ty_31 = 9; +pub const BPF_TCP_LISTEN: _bindgen_ty_31 = 10; +pub const BPF_TCP_CLOSING: _bindgen_ty_31 = 11; +pub const BPF_TCP_NEW_SYN_RECV: _bindgen_ty_31 = 12; +pub const BPF_TCP_BOUND_INACTIVE: _bindgen_ty_31 = 13; +pub const BPF_TCP_MAX_STATES: _bindgen_ty_31 = 14; +pub type _bindgen_ty_31 = ::aya_ebpf_cty::c_uint; +pub mod _bindgen_ty_33 { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_LOAD_HDR_OPT_TCP_SYN: Type = 1; +} +pub mod _bindgen_ty_34 { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: Type = 1; + pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: Type = 2; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_perf_event_value { + pub counter: __u64, + pub enabled: __u64, + pub running: __u64, +} +pub const BPF_DEVCG_ACC_MKNOD: _bindgen_ty_35 = 1; +pub const BPF_DEVCG_ACC_READ: _bindgen_ty_35 = 2; +pub const BPF_DEVCG_ACC_WRITE: _bindgen_ty_35 = 4; +pub type _bindgen_ty_35 = ::aya_ebpf_cty::c_uint; +pub const BPF_DEVCG_DEV_BLOCK: _bindgen_ty_36 = 1; +pub const BPF_DEVCG_DEV_CHAR: _bindgen_ty_36 = 2; +pub type _bindgen_ty_36 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_cgroup_dev_ctx { + pub access_type: __u32, + pub major: __u32, + pub minor: __u32, +} +#[repr(C)] +#[derive(Debug)] +pub struct bpf_raw_tracepoint_args { + pub args: __IncompleteArrayField<__u64>, +} +pub const BPF_FIB_LOOKUP_DIRECT: _bindgen_ty_37 = 1; +pub const BPF_FIB_LOOKUP_OUTPUT: _bindgen_ty_37 = 2; +pub const BPF_FIB_LOOKUP_SKIP_NEIGH: _bindgen_ty_37 = 4; +pub const BPF_FIB_LOOKUP_TBID: _bindgen_ty_37 = 8; +pub const BPF_FIB_LOOKUP_SRC: _bindgen_ty_37 = 16; +pub type _bindgen_ty_37 = ::aya_ebpf_cty::c_uint; +pub const BPF_FIB_LKUP_RET_SUCCESS: _bindgen_ty_38 = 0; +pub const BPF_FIB_LKUP_RET_BLACKHOLE: _bindgen_ty_38 = 1; +pub const BPF_FIB_LKUP_RET_UNREACHABLE: _bindgen_ty_38 = 2; +pub const BPF_FIB_LKUP_RET_PROHIBIT: _bindgen_ty_38 = 3; +pub const BPF_FIB_LKUP_RET_NOT_FWDED: _bindgen_ty_38 = 4; +pub const BPF_FIB_LKUP_RET_FWD_DISABLED: _bindgen_ty_38 = 5; +pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: _bindgen_ty_38 = 6; +pub const BPF_FIB_LKUP_RET_NO_NEIGH: _bindgen_ty_38 = 7; +pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: _bindgen_ty_38 = 8; +pub const BPF_FIB_LKUP_RET_NO_SRC_ADDR: _bindgen_ty_38 = 9; +pub type _bindgen_ty_38 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_fib_lookup { + pub family: __u8, + pub l4_protocol: __u8, + pub sport: __be16, + pub dport: __be16, + pub __bindgen_anon_1: bpf_fib_lookup__bindgen_ty_1, + pub ifindex: __u32, + pub __bindgen_anon_2: bpf_fib_lookup__bindgen_ty_2, + pub __bindgen_anon_3: bpf_fib_lookup__bindgen_ty_3, + pub __bindgen_anon_4: bpf_fib_lookup__bindgen_ty_4, + pub __bindgen_anon_5: bpf_fib_lookup__bindgen_ty_5, + pub smac: [__u8; 6usize], + pub dmac: [__u8; 6usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_1 { + pub tot_len: __u16, + pub mtu_result: __u16, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_2 { + pub tos: __u8, + pub flowinfo: __be32, + pub rt_metric: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_3 { + pub ipv4_src: __be32, + pub ipv6_src: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_4 { + pub ipv4_dst: __be32, + pub ipv6_dst: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_5 { + pub __bindgen_anon_1: bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1, + pub tbid: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1 { + pub h_vlan_proto: __be16, + pub h_vlan_TCI: __be16, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_redir_neigh { + pub nh_family: __u32, + pub __bindgen_anon_1: bpf_redir_neigh__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_redir_neigh__bindgen_ty_1 { + pub ipv4_nh: __be32, + pub ipv6_nh: [__u32; 4usize], +} +pub mod bpf_check_mtu_flags { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MTU_CHK_SEGS: Type = 1; +} +pub mod bpf_check_mtu_ret { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MTU_CHK_RET_SUCCESS: Type = 0; + pub const BPF_MTU_CHK_RET_FRAG_NEEDED: Type = 1; + pub const BPF_MTU_CHK_RET_SEGS_TOOBIG: Type = 2; +} +pub mod bpf_task_fd_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_FD_TYPE_RAW_TRACEPOINT: Type = 0; + pub const BPF_FD_TYPE_TRACEPOINT: Type = 1; + pub const BPF_FD_TYPE_KPROBE: Type = 2; + pub const BPF_FD_TYPE_KRETPROBE: Type = 3; + pub const BPF_FD_TYPE_UPROBE: Type = 4; + pub const BPF_FD_TYPE_URETPROBE: Type = 5; +} +pub const BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: _bindgen_ty_39 = 1; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: _bindgen_ty_39 = 2; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: _bindgen_ty_39 = 4; +pub type _bindgen_ty_39 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_flow_keys { + pub nhoff: __u16, + pub thoff: __u16, + pub addr_proto: __u16, + pub is_frag: __u8, + pub is_first_frag: __u8, + pub is_encap: __u8, + pub ip_proto: __u8, + pub n_proto: __be16, + pub sport: __be16, + pub dport: __be16, + pub __bindgen_anon_1: bpf_flow_keys__bindgen_ty_1, + pub flags: __u32, + pub flow_label: __be32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_flow_keys__bindgen_ty_1 { + pub __bindgen_anon_1: bpf_flow_keys__bindgen_ty_1__bindgen_ty_1, + pub __bindgen_anon_2: bpf_flow_keys__bindgen_ty_1__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 { + pub ipv4_src: __be32, + pub ipv4_dst: __be32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 { + pub ipv6_src: [__u32; 4usize], + pub ipv6_dst: [__u32; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_func_info { + pub insn_off: __u32, + pub type_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_line_info { + pub insn_off: __u32, + pub file_name_off: __u32, + pub line_off: __u32, + pub line_col: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_spin_lock { + pub val: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_timer { + pub __opaque: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_dynptr { + pub __opaque: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_list_head { + pub __opaque: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_list_node { + pub __opaque: [__u64; 3usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_rb_root { + pub __opaque: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_rb_node { + pub __opaque: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_refcount { + pub __opaque: [__u32; 1usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_sysctl { + pub write: __u32, + pub file_pos: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sockopt { + pub __bindgen_anon_1: bpf_sockopt__bindgen_ty_1, + pub __bindgen_anon_2: bpf_sockopt__bindgen_ty_2, + pub __bindgen_anon_3: bpf_sockopt__bindgen_ty_3, + pub level: __s32, + pub optname: __s32, + pub optlen: __s32, + pub retval: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sockopt__bindgen_ty_1 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sockopt__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sockopt__bindgen_ty_2 { + pub optval: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sockopt__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sockopt__bindgen_ty_3 { + pub optval_end: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sockopt__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_pidns_info { + pub pid: __u32, + pub tgid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sk_lookup { + pub __bindgen_anon_1: bpf_sk_lookup__bindgen_ty_1, + pub family: __u32, + pub protocol: __u32, + pub remote_ip4: __u32, + pub remote_ip6: [__u32; 4usize], + pub remote_port: __be16, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, + pub local_ip4: __u32, + pub local_ip6: [__u32; 4usize], + pub local_port: __u32, + pub ingress_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sk_lookup__bindgen_ty_1 { + pub __bindgen_anon_1: bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +impl bpf_sk_lookup { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_ptr { + pub ptr: *mut ::aya_ebpf_cty::c_void, + pub type_id: __u32, + pub flags: __u32, +} +pub mod bpf_core_relo_kind { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_CORE_FIELD_BYTE_OFFSET: Type = 0; + pub const BPF_CORE_FIELD_BYTE_SIZE: Type = 1; + pub const BPF_CORE_FIELD_EXISTS: Type = 2; + pub const BPF_CORE_FIELD_SIGNED: Type = 3; + pub const BPF_CORE_FIELD_LSHIFT_U64: Type = 4; + pub const BPF_CORE_FIELD_RSHIFT_U64: Type = 5; + pub const BPF_CORE_TYPE_ID_LOCAL: Type = 6; + pub const BPF_CORE_TYPE_ID_TARGET: Type = 7; + pub const BPF_CORE_TYPE_EXISTS: Type = 8; + pub const BPF_CORE_TYPE_SIZE: Type = 9; + pub const BPF_CORE_ENUMVAL_EXISTS: Type = 10; + pub const BPF_CORE_ENUMVAL_VALUE: Type = 11; + pub const BPF_CORE_TYPE_MATCHES: Type = 12; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_core_relo { + pub insn_off: __u32, + pub type_id: __u32, + pub access_str_off: __u32, + pub kind: bpf_core_relo_kind::Type, +} +pub const BPF_F_TIMER_ABS: _bindgen_ty_41 = 1; +pub const BPF_F_TIMER_CPU_PIN: _bindgen_ty_41 = 2; +pub type _bindgen_ty_41 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_iter_num { + pub __opaque: [__u64; 1usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union freg_t { + pub f: f32, + pub d: f64, + pub ui: __u64, + pub fp: freg_t__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct freg_t__bindgen_ty_1 { + pub hi: __u32, + pub lo: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct s390_fp_regs { + pub fpc: __u32, + pub pad: __u32, + pub fprs: [freg_t; 16usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct psw_t { + pub mask: ::aya_ebpf_cty::c_ulong, + pub addr: ::aya_ebpf_cty::c_ulong, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct user_pt_regs { + pub args: [::aya_ebpf_cty::c_ulong; 1usize], + pub psw: psw_t, + pub gprs: [::aya_ebpf_cty::c_ulong; 16usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct per_cr_words { + pub cr: [::aya_ebpf_cty::c_ulong; 3usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct per_cr_bits { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, + pub starting_addr: ::aya_ebpf_cty::c_ulong, + pub ending_addr: ::aya_ebpf_cty::c_ulong, +} +impl per_cr_bits { + #[inline] + pub fn em_branching(&self) -> ::aya_ebpf_cty::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u32) } + } + #[inline] + pub fn set_em_branching(&mut self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(32usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn em_branching_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_em_branching_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn em_instruction_fetch(&self) -> ::aya_ebpf_cty::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u32) } + } + #[inline] + pub fn set_em_instruction_fetch(&mut self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(33usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn em_instruction_fetch_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 33usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_em_instruction_fetch_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 33usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn em_storage_alteration(&self) -> ::aya_ebpf_cty::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u32) } + } + #[inline] + pub fn set_em_storage_alteration(&mut self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(34usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn em_storage_alteration_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 34usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_em_storage_alteration_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 34usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn em_gpr_alt_unused(&self) -> ::aya_ebpf_cty::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u32) } + } + #[inline] + pub fn set_em_gpr_alt_unused(&mut self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(35usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn em_gpr_alt_unused_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 35usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_em_gpr_alt_unused_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 35usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn em_store_real_address(&self) -> ::aya_ebpf_cty::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u32) } + } + #[inline] + pub fn set_em_store_real_address(&mut self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(36usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn em_store_real_address_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 36usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_em_store_real_address_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 36usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn branch_addr_ctl(&self) -> ::aya_ebpf_cty::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(40usize, 1u8) as u32) } + } + #[inline] + pub fn set_branch_addr_ctl(&mut self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(40usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn branch_addr_ctl_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 40usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_branch_addr_ctl_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 40usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn storage_alt_space_ctl(&self) -> ::aya_ebpf_cty::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(42usize, 1u8) as u32) } + } + #[inline] + pub fn set_storage_alt_space_ctl(&mut self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(42usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn storage_alt_space_ctl_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 42usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_storage_alt_space_ctl_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 42usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + em_branching: ::aya_ebpf_cty::c_uint, + em_instruction_fetch: ::aya_ebpf_cty::c_uint, + em_storage_alteration: ::aya_ebpf_cty::c_uint, + em_gpr_alt_unused: ::aya_ebpf_cty::c_uint, + em_store_real_address: ::aya_ebpf_cty::c_uint, + branch_addr_ctl: ::aya_ebpf_cty::c_uint, + storage_alt_space_ctl: ::aya_ebpf_cty::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(32usize, 1u8, { + let em_branching: u32 = unsafe { ::core::mem::transmute(em_branching) }; + em_branching as u64 + }); + __bindgen_bitfield_unit.set(33usize, 1u8, { + let em_instruction_fetch: u32 = unsafe { ::core::mem::transmute(em_instruction_fetch) }; + em_instruction_fetch as u64 + }); + __bindgen_bitfield_unit.set(34usize, 1u8, { + let em_storage_alteration: u32 = + unsafe { ::core::mem::transmute(em_storage_alteration) }; + em_storage_alteration as u64 + }); + __bindgen_bitfield_unit.set(35usize, 1u8, { + let em_gpr_alt_unused: u32 = unsafe { ::core::mem::transmute(em_gpr_alt_unused) }; + em_gpr_alt_unused as u64 + }); + __bindgen_bitfield_unit.set(36usize, 1u8, { + let em_store_real_address: u32 = + unsafe { ::core::mem::transmute(em_store_real_address) }; + em_store_real_address as u64 + }); + __bindgen_bitfield_unit.set(40usize, 1u8, { + let branch_addr_ctl: u32 = unsafe { ::core::mem::transmute(branch_addr_ctl) }; + branch_addr_ctl as u64 + }); + __bindgen_bitfield_unit.set(42usize, 1u8, { + let storage_alt_space_ctl: u32 = + unsafe { ::core::mem::transmute(storage_alt_space_ctl) }; + storage_alt_space_ctl as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct per_lowcore_words { + pub perc_atmid: ::aya_ebpf_cty::c_ushort, + pub address: ::aya_ebpf_cty::c_ulong, + pub access_id: ::aya_ebpf_cty::c_uchar, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct per_lowcore_bits { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, + pub address: ::aya_ebpf_cty::c_ulong, + pub _bitfield_align_2: [u8; 0], + pub _bitfield_2: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 7usize], +} +impl per_lowcore_bits { + #[inline] + pub fn perc_branching(&self) -> ::aya_ebpf_cty::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_perc_branching(&mut self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn perc_branching_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_perc_branching_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn perc_instruction_fetch(&self) -> ::aya_ebpf_cty::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_perc_instruction_fetch(&mut self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn perc_instruction_fetch_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_perc_instruction_fetch_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn perc_storage_alteration(&self) -> ::aya_ebpf_cty::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_perc_storage_alteration(&mut self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn perc_storage_alteration_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_perc_storage_alteration_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn perc_gpr_alt_unused(&self) -> ::aya_ebpf_cty::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_perc_gpr_alt_unused(&mut self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn perc_gpr_alt_unused_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_perc_gpr_alt_unused_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn perc_store_real_address(&self) -> ::aya_ebpf_cty::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_perc_store_real_address(&mut self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn perc_store_real_address_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_perc_store_real_address_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn atmid_psw_bit_31(&self) -> ::aya_ebpf_cty::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_atmid_psw_bit_31(&mut self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn atmid_psw_bit_31_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_atmid_psw_bit_31_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn atmid_validity_bit(&self) -> ::aya_ebpf_cty::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_atmid_validity_bit(&mut self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn atmid_validity_bit_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_atmid_validity_bit_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn atmid_psw_bit_32(&self) -> ::aya_ebpf_cty::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_atmid_psw_bit_32(&mut self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn atmid_psw_bit_32_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_atmid_psw_bit_32_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn atmid_psw_bit_5(&self) -> ::aya_ebpf_cty::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_atmid_psw_bit_5(&mut self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn atmid_psw_bit_5_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_atmid_psw_bit_5_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn atmid_psw_bit_16(&self) -> ::aya_ebpf_cty::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_atmid_psw_bit_16(&mut self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn atmid_psw_bit_16_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_atmid_psw_bit_16_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn atmid_psw_bit_17(&self) -> ::aya_ebpf_cty::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_atmid_psw_bit_17(&mut self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn atmid_psw_bit_17_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_atmid_psw_bit_17_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn si(&self) -> ::aya_ebpf_cty::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 2u8) as u32) } + } + #[inline] + pub fn set_si(&mut self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(14usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn si_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_si_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + perc_branching: ::aya_ebpf_cty::c_uint, + perc_instruction_fetch: ::aya_ebpf_cty::c_uint, + perc_storage_alteration: ::aya_ebpf_cty::c_uint, + perc_gpr_alt_unused: ::aya_ebpf_cty::c_uint, + perc_store_real_address: ::aya_ebpf_cty::c_uint, + atmid_psw_bit_31: ::aya_ebpf_cty::c_uint, + atmid_validity_bit: ::aya_ebpf_cty::c_uint, + atmid_psw_bit_32: ::aya_ebpf_cty::c_uint, + atmid_psw_bit_5: ::aya_ebpf_cty::c_uint, + atmid_psw_bit_16: ::aya_ebpf_cty::c_uint, + atmid_psw_bit_17: ::aya_ebpf_cty::c_uint, + si: ::aya_ebpf_cty::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let perc_branching: u32 = unsafe { ::core::mem::transmute(perc_branching) }; + perc_branching as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let perc_instruction_fetch: u32 = + unsafe { ::core::mem::transmute(perc_instruction_fetch) }; + perc_instruction_fetch as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let perc_storage_alteration: u32 = + unsafe { ::core::mem::transmute(perc_storage_alteration) }; + perc_storage_alteration as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let perc_gpr_alt_unused: u32 = unsafe { ::core::mem::transmute(perc_gpr_alt_unused) }; + perc_gpr_alt_unused as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let perc_store_real_address: u32 = + unsafe { ::core::mem::transmute(perc_store_real_address) }; + perc_store_real_address as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let atmid_psw_bit_31: u32 = unsafe { ::core::mem::transmute(atmid_psw_bit_31) }; + atmid_psw_bit_31 as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let atmid_validity_bit: u32 = unsafe { ::core::mem::transmute(atmid_validity_bit) }; + atmid_validity_bit as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let atmid_psw_bit_32: u32 = unsafe { ::core::mem::transmute(atmid_psw_bit_32) }; + atmid_psw_bit_32 as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let atmid_psw_bit_5: u32 = unsafe { ::core::mem::transmute(atmid_psw_bit_5) }; + atmid_psw_bit_5 as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let atmid_psw_bit_16: u32 = unsafe { ::core::mem::transmute(atmid_psw_bit_16) }; + atmid_psw_bit_16 as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let atmid_psw_bit_17: u32 = unsafe { ::core::mem::transmute(atmid_psw_bit_17) }; + atmid_psw_bit_17 as u64 + }); + __bindgen_bitfield_unit.set(14usize, 2u8, { + let si: u32 = unsafe { ::core::mem::transmute(si) }; + si as u64 + }); + __bindgen_bitfield_unit + } + #[inline] + pub fn access_id(&self) -> ::aya_ebpf_cty::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_2.get(4usize, 4u8) as u32) } + } + #[inline] + pub fn set_access_id(&mut self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_2.set(4usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn access_id_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_2), + 4usize, + 4u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_access_id_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_2), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_2( + access_id: ::aya_ebpf_cty::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(4usize, 4u8, { + let access_id: u32 = unsafe { ::core::mem::transmute(access_id) }; + access_id as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct per_struct { + pub control_regs: per_struct__bindgen_ty_1, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub starting_addr: ::aya_ebpf_cty::c_ulong, + pub ending_addr: ::aya_ebpf_cty::c_ulong, + pub lowcore: per_struct__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union per_struct__bindgen_ty_1 { + pub words: per_cr_words, + pub bits: per_cr_bits, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union per_struct__bindgen_ty_2 { + pub words: per_lowcore_words, + pub bits: per_lowcore_bits, +} +impl per_struct { + #[inline] + pub fn single_step(&self) -> ::aya_ebpf_cty::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_single_step(&mut self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn single_step_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_single_step_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn instruction_fetch(&self) -> ::aya_ebpf_cty::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_instruction_fetch(&mut self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn instruction_fetch_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_instruction_fetch_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + single_step: ::aya_ebpf_cty::c_uint, + instruction_fetch: ::aya_ebpf_cty::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let single_step: u32 = unsafe { ::core::mem::transmute(single_step) }; + single_step as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let instruction_fetch: u32 = unsafe { ::core::mem::transmute(instruction_fetch) }; + instruction_fetch as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct user_regs_struct { + pub psw: psw_t, + pub gprs: [::aya_ebpf_cty::c_ulong; 16usize], + pub acrs: [::aya_ebpf_cty::c_uint; 16usize], + pub orig_gpr2: ::aya_ebpf_cty::c_ulong, + pub fp_regs: s390_fp_regs, + pub per_info: per_struct, + pub ieee_instruction_pointer: ::aya_ebpf_cty::c_ulong, +} +pub type sa_family_t = ::aya_ebpf_cty::c_ushort; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sockaddr { + pub sa_family: sa_family_t, + pub sa_data: [::aya_ebpf_cty::c_char; 14usize], +} diff --git a/ebpf/aya-ebpf-bindings/src/s390x/helpers.rs b/ebpf/aya-ebpf-bindings/src/s390x/helpers.rs new file mode 100644 index 00000000..8aba5810 --- /dev/null +++ b/ebpf/aya-ebpf-bindings/src/s390x/helpers.rs @@ -0,0 +1,2148 @@ +use super::bindings::*; +pub unsafe fn bpf_map_lookup_elem( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(1usize); + fun(map, key) +} +pub unsafe fn bpf_map_update_elem( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + value: *const ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + value: *const ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(2usize); + fun(map, key, value, flags) +} +pub unsafe fn bpf_map_delete_elem( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(3usize); + fun(map, key) +} +pub unsafe fn bpf_probe_read( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(4usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_ktime_get_ns() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(5usize); + fun() +} +pub unsafe fn bpf_get_prandom_u32() -> __u32 { + let fun: unsafe extern "C" fn() -> __u32 = ::core::mem::transmute(7usize); + fun() +} +pub unsafe fn bpf_get_smp_processor_id() -> __u32 { + let fun: unsafe extern "C" fn() -> __u32 = ::core::mem::transmute(8usize); + fun() +} +pub unsafe fn bpf_skb_store_bytes( + skb: *mut __sk_buff, + offset: __u32, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(9usize); + fun(skb, offset, from, len, flags) +} +pub unsafe fn bpf_l3_csum_replace( + skb: *mut __sk_buff, + offset: __u32, + from: __u64, + to: __u64, + size: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + from: __u64, + to: __u64, + size: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(10usize); + fun(skb, offset, from, to, size) +} +pub unsafe fn bpf_l4_csum_replace( + skb: *mut __sk_buff, + offset: __u32, + from: __u64, + to: __u64, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + from: __u64, + to: __u64, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(11usize); + fun(skb, offset, from, to, flags) +} +pub unsafe fn bpf_tail_call( + ctx: *mut ::aya_ebpf_cty::c_void, + prog_array_map: *mut ::aya_ebpf_cty::c_void, + index: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + prog_array_map: *mut ::aya_ebpf_cty::c_void, + index: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(12usize); + fun(ctx, prog_array_map, index) +} +pub unsafe fn bpf_clone_redirect( + skb: *mut __sk_buff, + ifindex: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + ifindex: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(13usize); + fun(skb, ifindex, flags) +} +pub unsafe fn bpf_get_current_pid_tgid() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(14usize); + fun() +} +pub unsafe fn bpf_get_current_uid_gid() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(15usize); + fun() +} +pub unsafe fn bpf_get_current_comm( + buf: *mut ::aya_ebpf_cty::c_void, + size_of_buf: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + buf: *mut ::aya_ebpf_cty::c_void, + size_of_buf: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(16usize); + fun(buf, size_of_buf) +} +pub unsafe fn bpf_get_cgroup_classid(skb: *mut __sk_buff) -> __u32 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u32 = ::core::mem::transmute(17usize); + fun(skb) +} +pub unsafe fn bpf_skb_vlan_push( + skb: *mut __sk_buff, + vlan_proto: __be16, + vlan_tci: __u16, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + vlan_proto: __be16, + vlan_tci: __u16, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(18usize); + fun(skb, vlan_proto, vlan_tci) +} +pub unsafe fn bpf_skb_vlan_pop(skb: *mut __sk_buff) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(19usize); + fun(skb) +} +pub unsafe fn bpf_skb_get_tunnel_key( + skb: *mut __sk_buff, + key: *mut bpf_tunnel_key, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + key: *mut bpf_tunnel_key, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(20usize); + fun(skb, key, size, flags) +} +pub unsafe fn bpf_skb_set_tunnel_key( + skb: *mut __sk_buff, + key: *mut bpf_tunnel_key, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + key: *mut bpf_tunnel_key, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(21usize); + fun(skb, key, size, flags) +} +pub unsafe fn bpf_perf_event_read(map: *mut ::aya_ebpf_cty::c_void, flags: __u64) -> __u64 { + let fun: unsafe extern "C" fn(map: *mut ::aya_ebpf_cty::c_void, flags: __u64) -> __u64 = + ::core::mem::transmute(22usize); + fun(map, flags) +} +pub unsafe fn bpf_redirect(ifindex: __u32, flags: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(ifindex: __u32, flags: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(23usize); + fun(ifindex, flags) +} +pub unsafe fn bpf_get_route_realm(skb: *mut __sk_buff) -> __u32 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u32 = ::core::mem::transmute(24usize); + fun(skb) +} +pub unsafe fn bpf_perf_event_output( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(25usize); + fun(ctx, map, flags, data, size) +} +pub unsafe fn bpf_skb_load_bytes( + skb: *const ::aya_ebpf_cty::c_void, + offset: __u32, + to: *mut ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *const ::aya_ebpf_cty::c_void, + offset: __u32, + to: *mut ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(26usize); + fun(skb, offset, to, len) +} +pub unsafe fn bpf_get_stackid( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(27usize); + fun(ctx, map, flags) +} +pub unsafe fn bpf_csum_diff( + from: *mut __be32, + from_size: __u32, + to: *mut __be32, + to_size: __u32, + seed: __wsum, +) -> __s64 { + let fun: unsafe extern "C" fn( + from: *mut __be32, + from_size: __u32, + to: *mut __be32, + to_size: __u32, + seed: __wsum, + ) -> __s64 = ::core::mem::transmute(28usize); + fun(from, from_size, to, to_size, seed) +} +pub unsafe fn bpf_skb_get_tunnel_opt( + skb: *mut __sk_buff, + opt: *mut ::aya_ebpf_cty::c_void, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + opt: *mut ::aya_ebpf_cty::c_void, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(29usize); + fun(skb, opt, size) +} +pub unsafe fn bpf_skb_set_tunnel_opt( + skb: *mut __sk_buff, + opt: *mut ::aya_ebpf_cty::c_void, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + opt: *mut ::aya_ebpf_cty::c_void, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(30usize); + fun(skb, opt, size) +} +pub unsafe fn bpf_skb_change_proto( + skb: *mut __sk_buff, + proto: __be16, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + proto: __be16, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(31usize); + fun(skb, proto, flags) +} +pub unsafe fn bpf_skb_change_type(skb: *mut __sk_buff, type_: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, type_: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(32usize); + fun(skb, type_) +} +pub unsafe fn bpf_skb_under_cgroup( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + index: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + index: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(33usize); + fun(skb, map, index) +} +pub unsafe fn bpf_get_hash_recalc(skb: *mut __sk_buff) -> __u32 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u32 = ::core::mem::transmute(34usize); + fun(skb) +} +pub unsafe fn bpf_get_current_task() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(35usize); + fun() +} +pub unsafe fn bpf_probe_write_user( + dst: *mut ::aya_ebpf_cty::c_void, + src: *const ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + src: *const ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(36usize); + fun(dst, src, len) +} +pub unsafe fn bpf_current_task_under_cgroup( + map: *mut ::aya_ebpf_cty::c_void, + index: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + index: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(37usize); + fun(map, index) +} +pub unsafe fn bpf_skb_change_tail( + skb: *mut __sk_buff, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(38usize); + fun(skb, len, flags) +} +pub unsafe fn bpf_skb_pull_data(skb: *mut __sk_buff, len: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, len: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(39usize); + fun(skb, len) +} +pub unsafe fn bpf_csum_update(skb: *mut __sk_buff, csum: __wsum) -> __s64 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, csum: __wsum) -> __s64 = + ::core::mem::transmute(40usize); + fun(skb, csum) +} +pub unsafe fn bpf_set_hash_invalid(skb: *mut __sk_buff) { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) = ::core::mem::transmute(41usize); + fun(skb) +} +pub unsafe fn bpf_get_numa_node_id() -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn() -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(42usize); + fun() +} +pub unsafe fn bpf_skb_change_head( + skb: *mut __sk_buff, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(43usize); + fun(skb, len, flags) +} +pub unsafe fn bpf_xdp_adjust_head( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(44usize); + fun(xdp_md, delta) +} +pub unsafe fn bpf_probe_read_str( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(45usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_get_socket_cookie(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(46usize); + fun(ctx) +} +pub unsafe fn bpf_get_socket_uid(skb: *mut __sk_buff) -> __u32 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u32 = ::core::mem::transmute(47usize); + fun(skb) +} +pub unsafe fn bpf_set_hash(skb: *mut __sk_buff, hash: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, hash: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(48usize); + fun(skb, hash) +} +pub unsafe fn bpf_setsockopt( + bpf_socket: *mut ::aya_ebpf_cty::c_void, + level: ::aya_ebpf_cty::c_int, + optname: ::aya_ebpf_cty::c_int, + optval: *mut ::aya_ebpf_cty::c_void, + optlen: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + bpf_socket: *mut ::aya_ebpf_cty::c_void, + level: ::aya_ebpf_cty::c_int, + optname: ::aya_ebpf_cty::c_int, + optval: *mut ::aya_ebpf_cty::c_void, + optlen: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(49usize); + fun(bpf_socket, level, optname, optval, optlen) +} +pub unsafe fn bpf_skb_adjust_room( + skb: *mut __sk_buff, + len_diff: __s32, + mode: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + len_diff: __s32, + mode: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(50usize); + fun(skb, len_diff, mode, flags) +} +pub unsafe fn bpf_redirect_map( + map: *mut ::aya_ebpf_cty::c_void, + key: __u64, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: __u64, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(51usize); + fun(map, key, flags) +} +pub unsafe fn bpf_sk_redirect_map( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + key: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + key: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(52usize); + fun(skb, map, key, flags) +} +pub unsafe fn bpf_sock_map_update( + skops: *mut bpf_sock_ops, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(53usize); + fun(skops, map, key, flags) +} +pub unsafe fn bpf_xdp_adjust_meta( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(54usize); + fun(xdp_md, delta) +} +pub unsafe fn bpf_perf_event_read_value( + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + buf: *mut bpf_perf_event_value, + buf_size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + buf: *mut bpf_perf_event_value, + buf_size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(55usize); + fun(map, flags, buf, buf_size) +} +pub unsafe fn bpf_perf_prog_read_value( + ctx: *mut bpf_perf_event_data, + buf: *mut bpf_perf_event_value, + buf_size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_perf_event_data, + buf: *mut bpf_perf_event_value, + buf_size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(56usize); + fun(ctx, buf, buf_size) +} +pub unsafe fn bpf_getsockopt( + bpf_socket: *mut ::aya_ebpf_cty::c_void, + level: ::aya_ebpf_cty::c_int, + optname: ::aya_ebpf_cty::c_int, + optval: *mut ::aya_ebpf_cty::c_void, + optlen: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + bpf_socket: *mut ::aya_ebpf_cty::c_void, + level: ::aya_ebpf_cty::c_int, + optname: ::aya_ebpf_cty::c_int, + optval: *mut ::aya_ebpf_cty::c_void, + optlen: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(57usize); + fun(bpf_socket, level, optname, optval, optlen) +} +pub unsafe fn bpf_override_return(regs: *mut pt_regs, rc: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(regs: *mut pt_regs, rc: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(58usize); + fun(regs, rc) +} +pub unsafe fn bpf_sock_ops_cb_flags_set( + bpf_sock: *mut bpf_sock_ops, + argval: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + bpf_sock: *mut bpf_sock_ops, + argval: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(59usize); + fun(bpf_sock, argval) +} +pub unsafe fn bpf_msg_redirect_map( + msg: *mut sk_msg_md, + map: *mut ::aya_ebpf_cty::c_void, + key: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + map: *mut ::aya_ebpf_cty::c_void, + key: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(60usize); + fun(msg, map, key, flags) +} +pub unsafe fn bpf_msg_apply_bytes(msg: *mut sk_msg_md, bytes: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(msg: *mut sk_msg_md, bytes: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(61usize); + fun(msg, bytes) +} +pub unsafe fn bpf_msg_cork_bytes(msg: *mut sk_msg_md, bytes: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(msg: *mut sk_msg_md, bytes: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(62usize); + fun(msg, bytes) +} +pub unsafe fn bpf_msg_pull_data( + msg: *mut sk_msg_md, + start: __u32, + end: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + start: __u32, + end: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(63usize); + fun(msg, start, end, flags) +} +pub unsafe fn bpf_bind( + ctx: *mut bpf_sock_addr, + addr: *mut sockaddr, + addr_len: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sock_addr, + addr: *mut sockaddr, + addr_len: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(64usize); + fun(ctx, addr, addr_len) +} +pub unsafe fn bpf_xdp_adjust_tail( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(65usize); + fun(xdp_md, delta) +} +pub unsafe fn bpf_skb_get_xfrm_state( + skb: *mut __sk_buff, + index: __u32, + xfrm_state: *mut bpf_xfrm_state, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + index: __u32, + xfrm_state: *mut bpf_xfrm_state, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(66usize); + fun(skb, index, xfrm_state, size, flags) +} +pub unsafe fn bpf_get_stack( + ctx: *mut ::aya_ebpf_cty::c_void, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(67usize); + fun(ctx, buf, size, flags) +} +pub unsafe fn bpf_skb_load_bytes_relative( + skb: *const ::aya_ebpf_cty::c_void, + offset: __u32, + to: *mut ::aya_ebpf_cty::c_void, + len: __u32, + start_header: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *const ::aya_ebpf_cty::c_void, + offset: __u32, + to: *mut ::aya_ebpf_cty::c_void, + len: __u32, + start_header: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(68usize); + fun(skb, offset, to, len, start_header) +} +pub unsafe fn bpf_fib_lookup( + ctx: *mut ::aya_ebpf_cty::c_void, + params: *mut bpf_fib_lookup, + plen: ::aya_ebpf_cty::c_int, + flags: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + params: *mut bpf_fib_lookup, + plen: ::aya_ebpf_cty::c_int, + flags: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(69usize); + fun(ctx, params, plen, flags) +} +pub unsafe fn bpf_sock_hash_update( + skops: *mut bpf_sock_ops, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(70usize); + fun(skops, map, key, flags) +} +pub unsafe fn bpf_msg_redirect_hash( + msg: *mut sk_msg_md, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(71usize); + fun(msg, map, key, flags) +} +pub unsafe fn bpf_sk_redirect_hash( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(72usize); + fun(skb, map, key, flags) +} +pub unsafe fn bpf_lwt_push_encap( + skb: *mut __sk_buff, + type_: __u32, + hdr: *mut ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + type_: __u32, + hdr: *mut ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(73usize); + fun(skb, type_, hdr, len) +} +pub unsafe fn bpf_lwt_seg6_store_bytes( + skb: *mut __sk_buff, + offset: __u32, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(74usize); + fun(skb, offset, from, len) +} +pub unsafe fn bpf_lwt_seg6_adjust_srh( + skb: *mut __sk_buff, + offset: __u32, + delta: __s32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + delta: __s32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(75usize); + fun(skb, offset, delta) +} +pub unsafe fn bpf_lwt_seg6_action( + skb: *mut __sk_buff, + action: __u32, + param: *mut ::aya_ebpf_cty::c_void, + param_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + action: __u32, + param: *mut ::aya_ebpf_cty::c_void, + param_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(76usize); + fun(skb, action, param, param_len) +} +pub unsafe fn bpf_rc_repeat(ctx: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(77usize); + fun(ctx) +} +pub unsafe fn bpf_rc_keydown( + ctx: *mut ::aya_ebpf_cty::c_void, + protocol: __u32, + scancode: __u64, + toggle: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + protocol: __u32, + scancode: __u64, + toggle: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(78usize); + fun(ctx, protocol, scancode, toggle) +} +pub unsafe fn bpf_skb_cgroup_id(skb: *mut __sk_buff) -> __u64 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u64 = ::core::mem::transmute(79usize); + fun(skb) +} +pub unsafe fn bpf_get_current_cgroup_id() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(80usize); + fun() +} +pub unsafe fn bpf_get_local_storage( + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(81usize); + fun(map, flags) +} +pub unsafe fn bpf_sk_select_reuseport( + reuse: *mut sk_reuseport_md, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + reuse: *mut sk_reuseport_md, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(82usize); + fun(reuse, map, key, flags) +} +pub unsafe fn bpf_skb_ancestor_cgroup_id( + skb: *mut __sk_buff, + ancestor_level: ::aya_ebpf_cty::c_int, +) -> __u64 { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + ancestor_level: ::aya_ebpf_cty::c_int, + ) -> __u64 = ::core::mem::transmute(83usize); + fun(skb, ancestor_level) +} +pub unsafe fn bpf_sk_lookup_tcp( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, +) -> *mut bpf_sock { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, + ) -> *mut bpf_sock = ::core::mem::transmute(84usize); + fun(ctx, tuple, tuple_size, netns, flags) +} +pub unsafe fn bpf_sk_lookup_udp( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, +) -> *mut bpf_sock { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, + ) -> *mut bpf_sock = ::core::mem::transmute(85usize); + fun(ctx, tuple, tuple_size, netns, flags) +} +pub unsafe fn bpf_sk_release(sock: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(sock: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(86usize); + fun(sock) +} +pub unsafe fn bpf_map_push_elem( + map: *mut ::aya_ebpf_cty::c_void, + value: *const ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + value: *const ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(87usize); + fun(map, value, flags) +} +pub unsafe fn bpf_map_pop_elem( + map: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(88usize); + fun(map, value) +} +pub unsafe fn bpf_map_peek_elem( + map: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(89usize); + fun(map, value) +} +pub unsafe fn bpf_msg_push_data( + msg: *mut sk_msg_md, + start: __u32, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + start: __u32, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(90usize); + fun(msg, start, len, flags) +} +pub unsafe fn bpf_msg_pop_data( + msg: *mut sk_msg_md, + start: __u32, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + start: __u32, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(91usize); + fun(msg, start, len, flags) +} +pub unsafe fn bpf_rc_pointer_rel( + ctx: *mut ::aya_ebpf_cty::c_void, + rel_x: __s32, + rel_y: __s32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + rel_x: __s32, + rel_y: __s32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(92usize); + fun(ctx, rel_x, rel_y) +} +pub unsafe fn bpf_spin_lock(lock: *mut bpf_spin_lock) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(lock: *mut bpf_spin_lock) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(93usize); + fun(lock) +} +pub unsafe fn bpf_spin_unlock(lock: *mut bpf_spin_lock) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(lock: *mut bpf_spin_lock) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(94usize); + fun(lock) +} +pub unsafe fn bpf_sk_fullsock(sk: *mut bpf_sock) -> *mut bpf_sock { + let fun: unsafe extern "C" fn(sk: *mut bpf_sock) -> *mut bpf_sock = + ::core::mem::transmute(95usize); + fun(sk) +} +pub unsafe fn bpf_tcp_sock(sk: *mut bpf_sock) -> *mut bpf_tcp_sock { + let fun: unsafe extern "C" fn(sk: *mut bpf_sock) -> *mut bpf_tcp_sock = + ::core::mem::transmute(96usize); + fun(sk) +} +pub unsafe fn bpf_skb_ecn_set_ce(skb: *mut __sk_buff) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(97usize); + fun(skb) +} +pub unsafe fn bpf_get_listener_sock(sk: *mut bpf_sock) -> *mut bpf_sock { + let fun: unsafe extern "C" fn(sk: *mut bpf_sock) -> *mut bpf_sock = + ::core::mem::transmute(98usize); + fun(sk) +} +pub unsafe fn bpf_skc_lookup_tcp( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, +) -> *mut bpf_sock { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, + ) -> *mut bpf_sock = ::core::mem::transmute(99usize); + fun(ctx, tuple, tuple_size, netns, flags) +} +pub unsafe fn bpf_tcp_check_syncookie( + sk: *mut ::aya_ebpf_cty::c_void, + iph: *mut ::aya_ebpf_cty::c_void, + iph_len: __u32, + th: *mut tcphdr, + th_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + sk: *mut ::aya_ebpf_cty::c_void, + iph: *mut ::aya_ebpf_cty::c_void, + iph_len: __u32, + th: *mut tcphdr, + th_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(100usize); + fun(sk, iph, iph_len, th, th_len) +} +pub unsafe fn bpf_sysctl_get_name( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(101usize); + fun(ctx, buf, buf_len, flags) +} +pub unsafe fn bpf_sysctl_get_current_value( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(102usize); + fun(ctx, buf, buf_len) +} +pub unsafe fn bpf_sysctl_get_new_value( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(103usize); + fun(ctx, buf, buf_len) +} +pub unsafe fn bpf_sysctl_set_new_value( + ctx: *mut bpf_sysctl, + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sysctl, + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(104usize); + fun(ctx, buf, buf_len) +} +pub unsafe fn bpf_strtol( + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + res: *mut ::aya_ebpf_cty::c_long, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + res: *mut ::aya_ebpf_cty::c_long, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(105usize); + fun(buf, buf_len, flags, res) +} +pub unsafe fn bpf_strtoul( + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + res: *mut ::aya_ebpf_cty::c_ulong, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + res: *mut ::aya_ebpf_cty::c_ulong, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(106usize); + fun(buf, buf_len, flags, res) +} +pub unsafe fn bpf_sk_storage_get( + map: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(107usize); + fun(map, sk, value, flags) +} +pub unsafe fn bpf_sk_storage_delete( + map: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(108usize); + fun(map, sk) +} +pub unsafe fn bpf_send_signal(sig: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(sig: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(109usize); + fun(sig) +} +pub unsafe fn bpf_tcp_gen_syncookie( + sk: *mut ::aya_ebpf_cty::c_void, + iph: *mut ::aya_ebpf_cty::c_void, + iph_len: __u32, + th: *mut tcphdr, + th_len: __u32, +) -> __s64 { + let fun: unsafe extern "C" fn( + sk: *mut ::aya_ebpf_cty::c_void, + iph: *mut ::aya_ebpf_cty::c_void, + iph_len: __u32, + th: *mut tcphdr, + th_len: __u32, + ) -> __s64 = ::core::mem::transmute(110usize); + fun(sk, iph, iph_len, th, th_len) +} +pub unsafe fn bpf_skb_output( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(111usize); + fun(ctx, map, flags, data, size) +} +pub unsafe fn bpf_probe_read_user( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(112usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_probe_read_kernel( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(113usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_probe_read_user_str( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(114usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_probe_read_kernel_str( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(115usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_tcp_send_ack( + tp: *mut ::aya_ebpf_cty::c_void, + rcv_nxt: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + tp: *mut ::aya_ebpf_cty::c_void, + rcv_nxt: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(116usize); + fun(tp, rcv_nxt) +} +pub unsafe fn bpf_send_signal_thread(sig: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(sig: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(117usize); + fun(sig) +} +pub unsafe fn bpf_jiffies64() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(118usize); + fun() +} +pub unsafe fn bpf_read_branch_records( + ctx: *mut bpf_perf_event_data, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_perf_event_data, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(119usize); + fun(ctx, buf, size, flags) +} +pub unsafe fn bpf_get_ns_current_pid_tgid( + dev: __u64, + ino: __u64, + nsdata: *mut bpf_pidns_info, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dev: __u64, + ino: __u64, + nsdata: *mut bpf_pidns_info, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(120usize); + fun(dev, ino, nsdata, size) +} +pub unsafe fn bpf_xdp_output( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(121usize); + fun(ctx, map, flags, data, size) +} +pub unsafe fn bpf_get_netns_cookie(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(122usize); + fun(ctx) +} +pub unsafe fn bpf_get_current_ancestor_cgroup_id(ancestor_level: ::aya_ebpf_cty::c_int) -> __u64 { + let fun: unsafe extern "C" fn(ancestor_level: ::aya_ebpf_cty::c_int) -> __u64 = + ::core::mem::transmute(123usize); + fun(ancestor_level) +} +pub unsafe fn bpf_sk_assign( + ctx: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(124usize); + fun(ctx, sk, flags) +} +pub unsafe fn bpf_ktime_get_boot_ns() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(125usize); + fun() +} +pub unsafe fn bpf_seq_printf( + m: *mut seq_file, + fmt: *const ::aya_ebpf_cty::c_char, + fmt_size: __u32, + data: *const ::aya_ebpf_cty::c_void, + data_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + m: *mut seq_file, + fmt: *const ::aya_ebpf_cty::c_char, + fmt_size: __u32, + data: *const ::aya_ebpf_cty::c_void, + data_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(126usize); + fun(m, fmt, fmt_size, data, data_len) +} +pub unsafe fn bpf_seq_write( + m: *mut seq_file, + data: *const ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + m: *mut seq_file, + data: *const ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(127usize); + fun(m, data, len) +} +pub unsafe fn bpf_sk_cgroup_id(sk: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(128usize); + fun(sk) +} +pub unsafe fn bpf_sk_ancestor_cgroup_id( + sk: *mut ::aya_ebpf_cty::c_void, + ancestor_level: ::aya_ebpf_cty::c_int, +) -> __u64 { + let fun: unsafe extern "C" fn( + sk: *mut ::aya_ebpf_cty::c_void, + ancestor_level: ::aya_ebpf_cty::c_int, + ) -> __u64 = ::core::mem::transmute(129usize); + fun(sk, ancestor_level) +} +pub unsafe fn bpf_ringbuf_output( + ringbuf: *mut ::aya_ebpf_cty::c_void, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ringbuf: *mut ::aya_ebpf_cty::c_void, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(130usize); + fun(ringbuf, data, size, flags) +} +pub unsafe fn bpf_ringbuf_reserve( + ringbuf: *mut ::aya_ebpf_cty::c_void, + size: __u64, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + ringbuf: *mut ::aya_ebpf_cty::c_void, + size: __u64, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(131usize); + fun(ringbuf, size, flags) +} +pub unsafe fn bpf_ringbuf_submit(data: *mut ::aya_ebpf_cty::c_void, flags: __u64) { + let fun: unsafe extern "C" fn(data: *mut ::aya_ebpf_cty::c_void, flags: __u64) = + ::core::mem::transmute(132usize); + fun(data, flags) +} +pub unsafe fn bpf_ringbuf_discard(data: *mut ::aya_ebpf_cty::c_void, flags: __u64) { + let fun: unsafe extern "C" fn(data: *mut ::aya_ebpf_cty::c_void, flags: __u64) = + ::core::mem::transmute(133usize); + fun(data, flags) +} +pub unsafe fn bpf_ringbuf_query(ringbuf: *mut ::aya_ebpf_cty::c_void, flags: __u64) -> __u64 { + let fun: unsafe extern "C" fn(ringbuf: *mut ::aya_ebpf_cty::c_void, flags: __u64) -> __u64 = + ::core::mem::transmute(134usize); + fun(ringbuf, flags) +} +pub unsafe fn bpf_csum_level(skb: *mut __sk_buff, level: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, level: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(135usize); + fun(skb, level) +} +pub unsafe fn bpf_skc_to_tcp6_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp6_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp6_sock = + ::core::mem::transmute(136usize); + fun(sk) +} +pub unsafe fn bpf_skc_to_tcp_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp_sock = + ::core::mem::transmute(137usize); + fun(sk) +} +pub unsafe fn bpf_skc_to_tcp_timewait_sock( + sk: *mut ::aya_ebpf_cty::c_void, +) -> *mut tcp_timewait_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp_timewait_sock = + ::core::mem::transmute(138usize); + fun(sk) +} +pub unsafe fn bpf_skc_to_tcp_request_sock( + sk: *mut ::aya_ebpf_cty::c_void, +) -> *mut tcp_request_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp_request_sock = + ::core::mem::transmute(139usize); + fun(sk) +} +pub unsafe fn bpf_skc_to_udp6_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut udp6_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut udp6_sock = + ::core::mem::transmute(140usize); + fun(sk) +} +pub unsafe fn bpf_get_task_stack( + task: *mut task_struct, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + task: *mut task_struct, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(141usize); + fun(task, buf, size, flags) +} +pub unsafe fn bpf_load_hdr_opt( + skops: *mut bpf_sock_ops, + searchby_res: *mut ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + searchby_res: *mut ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(142usize); + fun(skops, searchby_res, len, flags) +} +pub unsafe fn bpf_store_hdr_opt( + skops: *mut bpf_sock_ops, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(143usize); + fun(skops, from, len, flags) +} +pub unsafe fn bpf_reserve_hdr_opt( + skops: *mut bpf_sock_ops, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(144usize); + fun(skops, len, flags) +} +pub unsafe fn bpf_inode_storage_get( + map: *mut ::aya_ebpf_cty::c_void, + inode: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + inode: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(145usize); + fun(map, inode, value, flags) +} +pub unsafe fn bpf_inode_storage_delete( + map: *mut ::aya_ebpf_cty::c_void, + inode: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_int { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + inode: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_int = ::core::mem::transmute(146usize); + fun(map, inode) +} +pub unsafe fn bpf_d_path( + path: *mut path, + buf: *mut ::aya_ebpf_cty::c_char, + sz: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + path: *mut path, + buf: *mut ::aya_ebpf_cty::c_char, + sz: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(147usize); + fun(path, buf, sz) +} +pub unsafe fn bpf_copy_from_user( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + user_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + user_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(148usize); + fun(dst, size, user_ptr) +} +pub unsafe fn bpf_snprintf_btf( + str_: *mut ::aya_ebpf_cty::c_char, + str_size: __u32, + ptr: *mut btf_ptr, + btf_ptr_size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + str_: *mut ::aya_ebpf_cty::c_char, + str_size: __u32, + ptr: *mut btf_ptr, + btf_ptr_size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(149usize); + fun(str_, str_size, ptr, btf_ptr_size, flags) +} +pub unsafe fn bpf_seq_printf_btf( + m: *mut seq_file, + ptr: *mut btf_ptr, + ptr_size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + m: *mut seq_file, + ptr: *mut btf_ptr, + ptr_size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(150usize); + fun(m, ptr, ptr_size, flags) +} +pub unsafe fn bpf_skb_cgroup_classid(skb: *mut __sk_buff) -> __u64 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u64 = ::core::mem::transmute(151usize); + fun(skb) +} +pub unsafe fn bpf_redirect_neigh( + ifindex: __u32, + params: *mut bpf_redir_neigh, + plen: ::aya_ebpf_cty::c_int, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ifindex: __u32, + params: *mut bpf_redir_neigh, + plen: ::aya_ebpf_cty::c_int, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(152usize); + fun(ifindex, params, plen, flags) +} +pub unsafe fn bpf_per_cpu_ptr( + percpu_ptr: *const ::aya_ebpf_cty::c_void, + cpu: __u32, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + percpu_ptr: *const ::aya_ebpf_cty::c_void, + cpu: __u32, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(153usize); + fun(percpu_ptr, cpu) +} +pub unsafe fn bpf_this_cpu_ptr( + percpu_ptr: *const ::aya_ebpf_cty::c_void, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + percpu_ptr: *const ::aya_ebpf_cty::c_void, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(154usize); + fun(percpu_ptr) +} +pub unsafe fn bpf_redirect_peer(ifindex: __u32, flags: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(ifindex: __u32, flags: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(155usize); + fun(ifindex, flags) +} +pub unsafe fn bpf_task_storage_get( + map: *mut ::aya_ebpf_cty::c_void, + task: *mut task_struct, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + task: *mut task_struct, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(156usize); + fun(map, task, value, flags) +} +pub unsafe fn bpf_task_storage_delete( + map: *mut ::aya_ebpf_cty::c_void, + task: *mut task_struct, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + task: *mut task_struct, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(157usize); + fun(map, task) +} +pub unsafe fn bpf_get_current_task_btf() -> *mut task_struct { + let fun: unsafe extern "C" fn() -> *mut task_struct = ::core::mem::transmute(158usize); + fun() +} +pub unsafe fn bpf_bprm_opts_set(bprm: *mut linux_binprm, flags: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(bprm: *mut linux_binprm, flags: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(159usize); + fun(bprm, flags) +} +pub unsafe fn bpf_ktime_get_coarse_ns() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(160usize); + fun() +} +pub unsafe fn bpf_ima_inode_hash( + inode: *mut inode, + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + inode: *mut inode, + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(161usize); + fun(inode, dst, size) +} +pub unsafe fn bpf_sock_from_file(file: *mut file) -> *mut socket { + let fun: unsafe extern "C" fn(file: *mut file) -> *mut socket = + ::core::mem::transmute(162usize); + fun(file) +} +pub unsafe fn bpf_check_mtu( + ctx: *mut ::aya_ebpf_cty::c_void, + ifindex: __u32, + mtu_len: *mut __u32, + len_diff: __s32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + ifindex: __u32, + mtu_len: *mut __u32, + len_diff: __s32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(163usize); + fun(ctx, ifindex, mtu_len, len_diff, flags) +} +pub unsafe fn bpf_for_each_map_elem( + map: *mut ::aya_ebpf_cty::c_void, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(164usize); + fun(map, callback_fn, callback_ctx, flags) +} +pub unsafe fn bpf_snprintf( + str_: *mut ::aya_ebpf_cty::c_char, + str_size: __u32, + fmt: *const ::aya_ebpf_cty::c_char, + data: *mut __u64, + data_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + str_: *mut ::aya_ebpf_cty::c_char, + str_size: __u32, + fmt: *const ::aya_ebpf_cty::c_char, + data: *mut __u64, + data_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(165usize); + fun(str_, str_size, fmt, data, data_len) +} +pub unsafe fn bpf_sys_bpf( + cmd: __u32, + attr: *mut ::aya_ebpf_cty::c_void, + attr_size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + cmd: __u32, + attr: *mut ::aya_ebpf_cty::c_void, + attr_size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(166usize); + fun(cmd, attr, attr_size) +} +pub unsafe fn bpf_btf_find_by_name_kind( + name: *mut ::aya_ebpf_cty::c_char, + name_sz: ::aya_ebpf_cty::c_int, + kind: __u32, + flags: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + name: *mut ::aya_ebpf_cty::c_char, + name_sz: ::aya_ebpf_cty::c_int, + kind: __u32, + flags: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(167usize); + fun(name, name_sz, kind, flags) +} +pub unsafe fn bpf_sys_close(fd: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(fd: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(168usize); + fun(fd) +} +pub unsafe fn bpf_timer_init( + timer: *mut bpf_timer, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + timer: *mut bpf_timer, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(169usize); + fun(timer, map, flags) +} +pub unsafe fn bpf_timer_set_callback( + timer: *mut bpf_timer, + callback_fn: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + timer: *mut bpf_timer, + callback_fn: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(170usize); + fun(timer, callback_fn) +} +pub unsafe fn bpf_timer_start( + timer: *mut bpf_timer, + nsecs: __u64, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + timer: *mut bpf_timer, + nsecs: __u64, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(171usize); + fun(timer, nsecs, flags) +} +pub unsafe fn bpf_timer_cancel(timer: *mut bpf_timer) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(timer: *mut bpf_timer) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(172usize); + fun(timer) +} +pub unsafe fn bpf_get_func_ip(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(173usize); + fun(ctx) +} +pub unsafe fn bpf_get_attach_cookie(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(174usize); + fun(ctx) +} +pub unsafe fn bpf_task_pt_regs(task: *mut task_struct) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(task: *mut task_struct) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(175usize); + fun(task) +} +pub unsafe fn bpf_get_branch_snapshot( + entries: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + entries: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(176usize); + fun(entries, size, flags) +} +pub unsafe fn bpf_trace_vprintk( + fmt: *const ::aya_ebpf_cty::c_char, + fmt_size: __u32, + data: *const ::aya_ebpf_cty::c_void, + data_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + fmt: *const ::aya_ebpf_cty::c_char, + fmt_size: __u32, + data: *const ::aya_ebpf_cty::c_void, + data_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(177usize); + fun(fmt, fmt_size, data, data_len) +} +pub unsafe fn bpf_skc_to_unix_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut unix_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut unix_sock = + ::core::mem::transmute(178usize); + fun(sk) +} +pub unsafe fn bpf_kallsyms_lookup_name( + name: *const ::aya_ebpf_cty::c_char, + name_sz: ::aya_ebpf_cty::c_int, + flags: ::aya_ebpf_cty::c_int, + res: *mut __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + name: *const ::aya_ebpf_cty::c_char, + name_sz: ::aya_ebpf_cty::c_int, + flags: ::aya_ebpf_cty::c_int, + res: *mut __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(179usize); + fun(name, name_sz, flags, res) +} +pub unsafe fn bpf_find_vma( + task: *mut task_struct, + addr: __u64, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + task: *mut task_struct, + addr: __u64, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(180usize); + fun(task, addr, callback_fn, callback_ctx, flags) +} +pub unsafe fn bpf_loop( + nr_loops: __u32, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + nr_loops: __u32, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(181usize); + fun(nr_loops, callback_fn, callback_ctx, flags) +} +pub unsafe fn bpf_strncmp( + s1: *const ::aya_ebpf_cty::c_char, + s1_sz: __u32, + s2: *const ::aya_ebpf_cty::c_char, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + s1: *const ::aya_ebpf_cty::c_char, + s1_sz: __u32, + s2: *const ::aya_ebpf_cty::c_char, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(182usize); + fun(s1, s1_sz, s2) +} +pub unsafe fn bpf_get_func_arg( + ctx: *mut ::aya_ebpf_cty::c_void, + n: __u32, + value: *mut __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + n: __u32, + value: *mut __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(183usize); + fun(ctx, n, value) +} +pub unsafe fn bpf_get_func_ret( + ctx: *mut ::aya_ebpf_cty::c_void, + value: *mut __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + value: *mut __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(184usize); + fun(ctx, value) +} +pub unsafe fn bpf_get_func_arg_cnt(ctx: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(185usize); + fun(ctx) +} +pub unsafe fn bpf_get_retval() -> ::aya_ebpf_cty::c_int { + let fun: unsafe extern "C" fn() -> ::aya_ebpf_cty::c_int = ::core::mem::transmute(186usize); + fun() +} +pub unsafe fn bpf_set_retval(retval: ::aya_ebpf_cty::c_int) -> ::aya_ebpf_cty::c_int { + let fun: unsafe extern "C" fn(retval: ::aya_ebpf_cty::c_int) -> ::aya_ebpf_cty::c_int = + ::core::mem::transmute(187usize); + fun(retval) +} +pub unsafe fn bpf_xdp_get_buff_len(xdp_md: *mut xdp_md) -> __u64 { + let fun: unsafe extern "C" fn(xdp_md: *mut xdp_md) -> __u64 = ::core::mem::transmute(188usize); + fun(xdp_md) +} +pub unsafe fn bpf_xdp_load_bytes( + xdp_md: *mut xdp_md, + offset: __u32, + buf: *mut ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + offset: __u32, + buf: *mut ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(189usize); + fun(xdp_md, offset, buf, len) +} +pub unsafe fn bpf_xdp_store_bytes( + xdp_md: *mut xdp_md, + offset: __u32, + buf: *mut ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + offset: __u32, + buf: *mut ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(190usize); + fun(xdp_md, offset, buf, len) +} +pub unsafe fn bpf_copy_from_user_task( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + user_ptr: *const ::aya_ebpf_cty::c_void, + tsk: *mut task_struct, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + user_ptr: *const ::aya_ebpf_cty::c_void, + tsk: *mut task_struct, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(191usize); + fun(dst, size, user_ptr, tsk, flags) +} +pub unsafe fn bpf_skb_set_tstamp( + skb: *mut __sk_buff, + tstamp: __u64, + tstamp_type: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + tstamp: __u64, + tstamp_type: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(192usize); + fun(skb, tstamp, tstamp_type) +} +pub unsafe fn bpf_ima_file_hash( + file: *mut file, + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + file: *mut file, + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(193usize); + fun(file, dst, size) +} +pub unsafe fn bpf_kptr_xchg( + map_value: *mut ::aya_ebpf_cty::c_void, + ptr: *mut ::aya_ebpf_cty::c_void, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map_value: *mut ::aya_ebpf_cty::c_void, + ptr: *mut ::aya_ebpf_cty::c_void, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(194usize); + fun(map_value, ptr) +} +pub unsafe fn bpf_map_lookup_percpu_elem( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + cpu: __u32, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + cpu: __u32, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(195usize); + fun(map, key, cpu) +} +pub unsafe fn bpf_skc_to_mptcp_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut mptcp_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut mptcp_sock = + ::core::mem::transmute(196usize); + fun(sk) +} +pub unsafe fn bpf_dynptr_from_mem( + data: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ptr: *mut bpf_dynptr, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + data: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ptr: *mut bpf_dynptr, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(197usize); + fun(data, size, flags, ptr) +} +pub unsafe fn bpf_ringbuf_reserve_dynptr( + ringbuf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ptr: *mut bpf_dynptr, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ringbuf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ptr: *mut bpf_dynptr, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(198usize); + fun(ringbuf, size, flags, ptr) +} +pub unsafe fn bpf_ringbuf_submit_dynptr(ptr: *mut bpf_dynptr, flags: __u64) { + let fun: unsafe extern "C" fn(ptr: *mut bpf_dynptr, flags: __u64) = + ::core::mem::transmute(199usize); + fun(ptr, flags) +} +pub unsafe fn bpf_ringbuf_discard_dynptr(ptr: *mut bpf_dynptr, flags: __u64) { + let fun: unsafe extern "C" fn(ptr: *mut bpf_dynptr, flags: __u64) = + ::core::mem::transmute(200usize); + fun(ptr, flags) +} +pub unsafe fn bpf_dynptr_read( + dst: *mut ::aya_ebpf_cty::c_void, + len: __u32, + src: *const bpf_dynptr, + offset: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + len: __u32, + src: *const bpf_dynptr, + offset: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(201usize); + fun(dst, len, src, offset, flags) +} +pub unsafe fn bpf_dynptr_write( + dst: *const bpf_dynptr, + offset: __u32, + src: *mut ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *const bpf_dynptr, + offset: __u32, + src: *mut ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(202usize); + fun(dst, offset, src, len, flags) +} +pub unsafe fn bpf_dynptr_data( + ptr: *const bpf_dynptr, + offset: __u32, + len: __u32, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + ptr: *const bpf_dynptr, + offset: __u32, + len: __u32, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(203usize); + fun(ptr, offset, len) +} +pub unsafe fn bpf_tcp_raw_gen_syncookie_ipv4( + iph: *mut iphdr, + th: *mut tcphdr, + th_len: __u32, +) -> __s64 { + let fun: unsafe extern "C" fn(iph: *mut iphdr, th: *mut tcphdr, th_len: __u32) -> __s64 = + ::core::mem::transmute(204usize); + fun(iph, th, th_len) +} +pub unsafe fn bpf_tcp_raw_gen_syncookie_ipv6( + iph: *mut ipv6hdr, + th: *mut tcphdr, + th_len: __u32, +) -> __s64 { + let fun: unsafe extern "C" fn(iph: *mut ipv6hdr, th: *mut tcphdr, th_len: __u32) -> __s64 = + ::core::mem::transmute(205usize); + fun(iph, th, th_len) +} +pub unsafe fn bpf_tcp_raw_check_syncookie_ipv4( + iph: *mut iphdr, + th: *mut tcphdr, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(iph: *mut iphdr, th: *mut tcphdr) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(206usize); + fun(iph, th) +} +pub unsafe fn bpf_tcp_raw_check_syncookie_ipv6( + iph: *mut ipv6hdr, + th: *mut tcphdr, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(iph: *mut ipv6hdr, th: *mut tcphdr) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(207usize); + fun(iph, th) +} +pub unsafe fn bpf_ktime_get_tai_ns() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(208usize); + fun() +} +pub unsafe fn bpf_user_ringbuf_drain( + map: *mut ::aya_ebpf_cty::c_void, + callback_fn: *mut ::aya_ebpf_cty::c_void, + ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + callback_fn: *mut ::aya_ebpf_cty::c_void, + ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(209usize); + fun(map, callback_fn, ctx, flags) +} +pub unsafe fn bpf_cgrp_storage_get( + map: *mut ::aya_ebpf_cty::c_void, + cgroup: *mut cgroup, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + cgroup: *mut cgroup, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(210usize); + fun(map, cgroup, value, flags) +} +pub unsafe fn bpf_cgrp_storage_delete( + map: *mut ::aya_ebpf_cty::c_void, + cgroup: *mut cgroup, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + cgroup: *mut cgroup, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(211usize); + fun(map, cgroup) +} diff --git a/ebpf/aya-ebpf-bindings/src/x86_64/bindings.rs b/ebpf/aya-ebpf-bindings/src/x86_64/bindings.rs index ba28b9e2..89fec488 100644 --- a/ebpf/aya-ebpf-bindings/src/x86_64/bindings.rs +++ b/ebpf/aya-ebpf-bindings/src/x86_64/bindings.rs @@ -14,10 +14,7 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -27,21 +24,46 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; - if val { - *byte |= mask; - } else { - *byte &= !mask; - } + if val { byte | mask } else { byte & !mask } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -62,6 +84,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -77,6 +117,22 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } } #[repr(C)] #[derive(Default)] @@ -211,6 +267,9 @@ pub const TC_ACT_REDIRECT: u32 = 7; pub const TC_ACT_TRAP: u32 = 8; pub const TC_ACT_VALUE_MAX: u32 = 8; pub const TC_ACT_EXT_VAL_MASK: u32 = 268435455; +pub const TC_ACT_JUMP: u32 = 268435456; +pub const TC_ACT_GOTO_CHAIN: u32 = 536870912; +pub const TC_ACT_EXT_OPCODE_MAX: u32 = 536870912; pub const SOL_SOCKET: u32 = 1; pub const SO_DEBUG: u32 = 1; pub const SO_REUSEADDR: u32 = 2; @@ -284,6 +343,11 @@ pub const SO_PREFER_BUSY_POLL: u32 = 69; pub const SO_BUSY_POLL_BUDGET: u32 = 70; pub const SO_NETNS_COOKIE: u32 = 71; pub const SO_BUF_LOCK: u32 = 72; +pub const SO_RESERVE_MEM: u32 = 73; +pub const SO_TXREHASH: u32 = 74; +pub const SO_RCVMARK: u32 = 75; +pub const SO_PASSPIDFD: u32 = 76; +pub const SO_PEERPIDFD: u32 = 77; pub const SO_TIMESTAMP: u32 = 29; pub const SO_TIMESTAMPNS: u32 = 35; pub const SO_TIMESTAMPING: u32 = 37; @@ -433,6 +497,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn src_reg(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -444,6 +530,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -1715,6 +1823,13 @@ pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 { pub sport: __be16, pub dport: __be16, } +pub mod tcx_action_base { + pub type Type = ::aya_ebpf_cty::c_int; + pub const TCX_NEXT: Type = -1; + pub const TCX_PASS: Type = 0; + pub const TCX_DROP: Type = 2; + pub const TCX_REDIRECT: Type = 7; +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bpf_xdp_sock { @@ -1949,6 +2064,28 @@ impl bpf_prog_info { } } #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/ebpf/aya-ebpf-bindings/src/x86_64/mod.rs b/ebpf/aya-ebpf-bindings/src/x86_64/mod.rs deleted file mode 100644 index 226884ea..00000000 --- a/ebpf/aya-ebpf-bindings/src/x86_64/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -#![allow(clippy::all, dead_code)] -pub mod bindings; -pub mod helpers; diff --git a/ebpf/aya-ebpf-cty/.travis.yml b/ebpf/aya-ebpf-cty/.travis.yml deleted file mode 100644 index 3cf0a771..00000000 --- a/ebpf/aya-ebpf-cty/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -language: rust - -matrix: - include: - # MSRV - - env: TARGET=x86_64-unknown-linux-gnu - rust: 1.30.0 - - - env: TARGET=x86_64-unknown-linux-gnu - rust: stable - -before_install: set -e - -install: - - sh ci/install.sh - -script: - - sh ci/script.sh - -after_script: set +e - -cache: cargo - -branches: - only: - - master - - staging - - trying - -notifications: - email: - on_success: never diff --git a/ebpf/aya-ebpf-cty/CHANGELOG.md b/ebpf/aya-ebpf-cty/CHANGELOG.md index eb19d2ce..23c0b0a1 100644 --- a/ebpf/aya-ebpf-cty/CHANGELOG.md +++ b/ebpf/aya-ebpf-cty/CHANGELOG.md @@ -65,8 +65,39 @@ This project adheres to $[Semantic Versioning](http://semver.org/). [v0.1.2]: https://github.com/japaric/cty/compare/v0.1.1...v0.1.2 [v0.1.1]: https://github.com/japaric/cty/compare/v0.1.0...v0.1.1 +## v0.2.2 (2024-10-09) + +### Other + + - add archs powerpc64 and s390x to aya + bpfman, a project using aya, has a requirement to support powerpc64 and + s390x architectures. Adding these two architectures to aya. + +### Commit Statistics + + + + - 3 commits contributed to the release. + - 185 days passed between releases. + - 1 commit was understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Merge pull request #974 from Billy99/billy99-arch-ppc64-s390x ([`ab5e688`](https://github.com/aya-rs/aya/commit/ab5e688fd49fcfb402ad47d51cb445437fbd8cb7)) + - Add archs powerpc64 and s390x to aya ([`b513af1`](https://github.com/aya-rs/aya/commit/b513af12e8baa5c5097eaf0afdae61a830c3f877)) + - Allowlist expected cfgs ([`e4f9ed8`](https://github.com/aya-rs/aya/commit/e4f9ed8d79e4cd19ab5124352fca9e6cbdc1030b)) +
+ ## v0.2.1 (2024-04-06) + + ### Chore - Rename bpf -> ebpf @@ -75,7 +106,7 @@ This project adheres to $[Semantic Versioning](http://semver.org/). - - 2 commits contributed to the release over the course of 29 calendar days. + - 3 commits contributed to the release. - 1 commit was understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages @@ -86,6 +117,7 @@ This project adheres to $[Semantic Versioning](http://semver.org/).
view details * **Uncategorized** + - Release aya-ebpf-cty v0.2.1, aya-ebpf-bindings v0.1.0, aya-ebpf-macros v0.1.0, aya-ebpf v0.1.0 ([`e372fcf`](https://github.com/aya-rs/aya/commit/e372fcf653304c6d7c2647cd7812ca11474f41fc)) - Merge pull request #528 from dave-tucker/rename-all-the-things ([`63d8d4d`](https://github.com/aya-rs/aya/commit/63d8d4d34bdbbee149047dc0a5e9c2b191f3b32d)) - Rename bpf -> ebpf ([`21f570a`](https://github.com/aya-rs/aya/commit/21f570a19cd8d6e8eeaa6127d936877a701ceac3))
diff --git a/ebpf/aya-ebpf-cty/Cargo.toml b/ebpf/aya-ebpf-cty/Cargo.toml index 94c4cbf4..a848b6aa 100644 --- a/ebpf/aya-ebpf-cty/Cargo.toml +++ b/ebpf/aya-ebpf-cty/Cargo.toml @@ -3,9 +3,17 @@ categories = ["embedded", "external-ffi-bindings", "no-std"] description = "Type aliases to C types like c_int for use with bindgen" documentation = "https://docs.rs/aya-bpf-cty" name = "aya-ebpf-cty" -version = "0.2.1" +version = "0.2.2" + authors.workspace = true +edition.workspace = true +homepage.workspace = true license.workspace = true repository.workspace = true -homepage.workspace = true -edition.workspace = true +rust-version.workspace = true + +[lints] +workspace = true + +[build-dependencies] +aya-build = { version = "^0.1.2", path = "../../aya-build" } diff --git a/ebpf/aya-ebpf-cty/build.rs b/ebpf/aya-ebpf-cty/build.rs index 1488a7f2..e19ca950 100644 --- a/ebpf/aya-ebpf-cty/build.rs +++ b/ebpf/aya-ebpf-cty/build.rs @@ -1,14 +1,5 @@ -use std::env; - fn main() { - println!("cargo:rerun-if-env-changed=CARGO_CFG_BPF_TARGET_ARCH"); - if let Ok(arch) = env::var("CARGO_CFG_BPF_TARGET_ARCH") { - println!("cargo:rustc-cfg=bpf_target_arch=\"{arch}\""); - } else { - let arch = env::var("HOST").unwrap(); - let arch = arch.split_once('-').map_or(&*arch, |x| x.0); - println!("cargo:rustc-cfg=bpf_target_arch=\"{arch}\""); - } - println!("cargo::rustc-check-cfg=cfg(bpf_target_arch, values(\"x86_64\",\"arm\",\"aarch64\",\"riscv64\"))"); println!("cargo::rustc-check-cfg=cfg(target_arch, values(\"asmjs\",\"nvptx\",\"xtensa\"))"); + + aya_build::emit_bpf_target_arch_cfg() } diff --git a/ebpf/aya-ebpf-cty/ci/install.sh b/ebpf/aya-ebpf-cty/ci/install.sh deleted file mode 100644 index 58ed3c9e..00000000 --- a/ebpf/aya-ebpf-cty/ci/install.sh +++ /dev/null @@ -1,7 +0,0 @@ -set -ex - -main() { - return -} - -main diff --git a/ebpf/aya-ebpf-cty/ci/script.sh b/ebpf/aya-ebpf-cty/ci/script.sh deleted file mode 100644 index 46ac0c26..00000000 --- a/ebpf/aya-ebpf-cty/ci/script.sh +++ /dev/null @@ -1,10 +0,0 @@ -set -ex - -main() { - for target in $(rustup target list | grep linux-gnu | cut -d' ' -f1); do - rustup target add $target || continue - cargo check --target $target - done -} - -main diff --git a/ebpf/aya-ebpf-cty/src/lib.rs b/ebpf/aya-ebpf-cty/src/lib.rs index b2530c12..8e64fd30 100644 --- a/ebpf/aya-ebpf-cty/src/lib.rs +++ b/ebpf/aya-ebpf-cty/src/lib.rs @@ -5,8 +5,7 @@ //! This crate is guaranteed to compile on stable Rust 1.30.0 and up. It *might* compile with older //! versions but that may change in any new patch release. #![no_std] -#![allow(non_camel_case_types)] -#![deny(warnings)] +#![expect(non_camel_case_types)] // AD = Architecture dependent pub use ad::*; @@ -18,16 +17,17 @@ mod ad { pub type c_int = i32; pub type c_uint = u32; - #[cfg(bpf_target_arch = "arm")] + #[cfg(any( + bpf_target_arch = "aarch64", + bpf_target_arch = "arm", + bpf_target_arch = "powerpc64", + bpf_target_arch = "riscv64", + bpf_target_arch = "s390x", + bpf_target_arch = "mips", + ))] pub type c_char = super::c_uchar; - #[cfg(bpf_target_arch = "aarch64")] - pub type c_char = super::c_uchar; - - #[cfg(bpf_target_arch = "riscv64")] - pub type c_char = super::c_uchar; - - #[cfg(bpf_target_arch = "x86_64")] + #[cfg(any(bpf_target_arch = "loongarch64", bpf_target_arch = "x86_64"))] pub type c_char = super::c_schar; } @@ -51,14 +51,15 @@ mod ad { } #[cfg(any( + target_arch = "loongarch64", target_arch = "mips", target_arch = "mips64", + target_arch = "nvptx", + target_arch = "nvptx64", target_arch = "sparc64", target_arch = "x86", target_arch = "x86_64", - target_arch = "nvptx", - target_arch = "nvptx64", - target_arch = "xtensa" + target_arch = "xtensa", ))] mod ad { pub type c_char = super::c_schar; diff --git a/ebpf/aya-ebpf/CHANGELOG.md b/ebpf/aya-ebpf/CHANGELOG.md index d2ea288e..fb00292b 100644 --- a/ebpf/aya-ebpf/CHANGELOG.md +++ b/ebpf/aya-ebpf/CHANGELOG.md @@ -5,6 +5,68 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## v0.1.1 (2024-10-09) + +### New Features + + - Implement memmove + The compiler will emit this function for certain operations, but aya + currently does not provide an implementation. + This leads to ebpf loading failures as the kernel can't find the symbol when + loading the program. + + The implementation is based on https://github.com/rust-lang/compiler-builtins/blob/master/src/mem/mod.rs#L29-L40 + and https://github.com/rust-lang/compiler-builtins/blob/master/src/mem/impls.rs#L128-L135 + Only the simplest case has been implemented, none of the word optimizations, + since memcpy also doesn't seem to have them. + +### Bug Fixes + + - Remove PerfEventArray::with_max_entries + This API doesn't make sense as the max_entries needs to be set to the + number of online CPUs by the loader. + +### Other + + - Add set_reply accessor to SockOpsContext + - add archs powerpc64 and s390x to aya + bpfman, a project using aya, has a requirement to support powerpc64 and + s390x architectures. Adding these two architectures to aya. + - moved ret from ProbeContext into new RetProbeContext + Created retprobe.rs to hold RetProbeContext and moved the ret from + ProbeContext in probe.rs into RetProbeContext. Now, only kprobe (which + uses ProbeContext) can access args, and kretprobe (which uses + RetProbeContext) can access ret. + +### Commit Statistics + + + + - 11 commits contributed to the release. + - 185 days passed between releases. + - 5 commits were understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Merge pull request #1020 from l2dy/sockops-ctx ([`635ed3b`](https://github.com/aya-rs/aya/commit/635ed3baed5442c1364a360d7234b72c4ffe3fd8)) + - Add set_reply accessor to SockOpsContext ([`95e1763`](https://github.com/aya-rs/aya/commit/95e1763e30e0dcfe1256ecd9e32ca27dd65342b4)) + - Merge pull request #974 from Billy99/billy99-arch-ppc64-s390x ([`ab5e688`](https://github.com/aya-rs/aya/commit/ab5e688fd49fcfb402ad47d51cb445437fbd8cb7)) + - Add archs powerpc64 and s390x to aya ([`b513af1`](https://github.com/aya-rs/aya/commit/b513af12e8baa5c5097eaf0afdae61a830c3f877)) + - Appease nightly clippy ([`bce3c4f`](https://github.com/aya-rs/aya/commit/bce3c4fb1d0cd6e8f9f64420c59e02a42c96b2c8)) + - Remove PerfEventArray::with_max_entries ([`ef0d125`](https://github.com/aya-rs/aya/commit/ef0d1253efcc5a385afc74668d4f28580d328822)) + - Implement memmove ([`7ad3926`](https://github.com/aya-rs/aya/commit/7ad3926d996f6471da05a8f3cab0283bb38c1498)) + - Allowlist expected cfgs ([`e4f9ed8`](https://github.com/aya-rs/aya/commit/e4f9ed8d79e4cd19ab5124352fca9e6cbdc1030b)) + - Deny warnings ([`b603c66`](https://github.com/aya-rs/aya/commit/b603c665a9a2ec48de2c4b412876bd015e5ead15)) + - Moved ret from ProbeContext into new RetProbeContext ([`2d38b23`](https://github.com/aya-rs/aya/commit/2d38b23b99cd259f7a249f4c63b12da909c67015)) + - Appease clippy ([`57cd351`](https://github.com/aya-rs/aya/commit/57cd35172f1534444a548460de6eae4680488711)) +
+ ## v0.1.0 (2024-04-06) @@ -31,7 +93,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - - 9 commits contributed to the release over the course of 31 calendar days. + - 10 commits contributed to the release. - 5 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages @@ -42,6 +104,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
view details * **Uncategorized** + - Release aya-ebpf v0.1.0 ([`c3ae6f9`](https://github.com/aya-rs/aya/commit/c3ae6f90d8d3be8b31d1de9ccc042133f9ac8f44)) - Release aya-ebpf-macros v0.1.0, aya-ebpf v0.1.0 ([`eb3947b`](https://github.com/aya-rs/aya/commit/eb3947bf14e8e7ab0f70e12306e38fb8056edf57)) - Release aya-ebpf-bindings v0.1.0, aya-ebpf-macros v0.1.0, aya-ebpf v0.1.0 ([`a34c5e4`](https://github.com/aya-rs/aya/commit/a34c5e43b85dd176b9b18f1cc9c9d80d52f10a1f)) - Add version keys to Cargo.toml(s) ([`a4ae8ad`](https://github.com/aya-rs/aya/commit/a4ae8adb0db75f2b82b10b0740447a1dbead62c0)) diff --git a/ebpf/aya-ebpf/Cargo.toml b/ebpf/aya-ebpf/Cargo.toml index 099b1482..e2067982 100644 --- a/ebpf/aya-ebpf/Cargo.toml +++ b/ebpf/aya-ebpf/Cargo.toml @@ -1,25 +1,23 @@ [package] -name = "aya-ebpf" -version = "0.1.0" description = "A library for writing eBPF programs" +name = "aya-ebpf" +version = "0.1.1" + authors.workspace = true +edition.workspace = true +homepage.workspace = true license.workspace = true repository.workspace = true -homepage.workspace = true -edition.workspace = true +rust-version.workspace = true + +[lints] +workspace = true [dependencies] -aya-ebpf-cty = { version = "0.2.1", path = "../aya-ebpf-cty" } -aya-ebpf-macros = { version = "^0.1.0", path = "../../aya-ebpf-macros" } -aya-ebpf-bindings = { version = "^0.1.0", path = "../aya-ebpf-bindings" } -const-assert = { workspace = true, optional = true } +aya-ebpf-bindings = { version = "^0.1.1", path = "../aya-ebpf-bindings" } +aya-ebpf-cty = { version = "^0.2.2", path = "../aya-ebpf-cty" } +aya-ebpf-macros = { version = "^0.1.1", path = "../../aya-ebpf-macros" } [build-dependencies] +aya-build = { version = "^0.1.2", path = "../../aya-build" } rustversion = { workspace = true } - -[features] -default = [] -# TODO(https://github.com/rust-lang/rust/issues/76560): Always utilize the -# logic gated behind this feature. This is not currently possible because the -# underlying `const_generic_exprs` language feature is still incomplete. -const_assert = ["const-assert"] diff --git a/ebpf/aya-ebpf/build.rs b/ebpf/aya-ebpf/build.rs index e087046a..255b9959 100644 --- a/ebpf/aya-ebpf/build.rs +++ b/ebpf/aya-ebpf/build.rs @@ -1,22 +1,14 @@ -use std::env; - fn main() { + println!("cargo::rustc-check-cfg=cfg(generic_const_exprs)"); check_rust_version(); - println!("cargo:rerun-if-env-changed=CARGO_CFG_BPF_TARGET_ARCH"); - if let Ok(arch) = env::var("CARGO_CFG_BPF_TARGET_ARCH") { - println!("cargo:rustc-cfg=bpf_target_arch=\"{arch}\""); - } else { - let arch = env::var("HOST").unwrap(); - let arch = arch.split_once('-').map_or(&*arch, |x| x.0); - println!("cargo:rustc-cfg=bpf_target_arch=\"{arch}\""); - } - println!("cargo::rustc-check-cfg=cfg(bpf_target_arch, values(\"x86_64\",\"arm\",\"aarch64\",\"riscv64\"))"); - println!("cargo::rustc-check-cfg=cfg(unstable)"); + + aya_build::emit_bpf_target_arch_cfg() } #[rustversion::nightly] fn check_rust_version() { - println!("cargo:rustc-cfg=unstable"); + // TODO(https://github.com/rust-lang/rust/issues/141492): restore this. + // println!("cargo:rustc-cfg=generic_const_exprs"); } #[rustversion::not(nightly)] diff --git a/ebpf/aya-ebpf/src/args.rs b/ebpf/aya-ebpf/src/args.rs index 7cee97a8..ba153361 100644 --- a/ebpf/aya-ebpf/src/args.rs +++ b/ebpf/aya-ebpf/src/args.rs @@ -1,325 +1,303 @@ -// aarch64 uses user_pt_regs instead of pt_regs -#[cfg(not(any(bpf_target_arch = "aarch64", bpf_target_arch = "riscv64")))] -use crate::bindings::pt_regs; -#[cfg(bpf_target_arch = "aarch64")] -use crate::bindings::user_pt_regs as pt_regs; -#[cfg(bpf_target_arch = "riscv64")] -use crate::bindings::user_regs_struct as pt_regs; -use crate::{cty::c_void, helpers::bpf_probe_read}; +use crate::bindings::{bpf_raw_tracepoint_args, pt_regs}; -/// A trait that indicates a valid type for an argument which can be coerced from a BTF -/// context. -/// -/// Users should not implement this trait. -/// -/// SAFETY: This trait is _only_ safe to implement on primitive types that can fit into -/// a `u64`. For example, integers and raw pointers may be coerced from a BTF context. -pub unsafe trait FromBtfArgument: Sized { - /// Coerces a `T` from the `n`th argument from a BTF context where `n` starts - /// at 0 and increases by 1 for each successive argument. - /// - /// SAFETY: This function is deeply unsafe, as we are reading raw pointers into kernel - /// memory. In particular, the value of `n` must not exceed the number of function - /// arguments. Moreover, `ctx` must be a valid pointer to a BTF context, and `T` must - /// be the right type for the given argument. - unsafe fn from_argument(ctx: *const c_void, n: usize) -> Self; -} - -unsafe impl FromBtfArgument for *const T { - unsafe fn from_argument(ctx: *const c_void, n: usize) -> *const T { - // BTF arguments are exposed as an array of `usize` where `usize` can - // either be treated as a pointer or a primitive type - *(ctx as *const usize).add(n) as _ +mod sealed { + #[expect(clippy::missing_safety_doc)] + pub unsafe trait Argument { + fn from_register(value: u64) -> Self; } -} -/// Helper macro to implement [`FromBtfArgument`] for a primitive type. -macro_rules! unsafe_impl_from_btf_argument { - ($type:ident) => { - unsafe impl FromBtfArgument for $type { - unsafe fn from_argument(ctx: *const c_void, n: usize) -> Self { - // BTF arguments are exposed as an array of `usize` where `usize` can - // either be treated as a pointer or a primitive type - *(ctx as *const usize).add(n) as _ - } + macro_rules! unsafe_impl_argument { + ($($( { $($generics:tt)* } )? $ty:ty $( { where $($where:tt)* } )?),+ $(,)?) => { + $( + #[allow(clippy::cast_lossless, trivial_numeric_casts)] + unsafe impl$($($generics)*)? Argument for $ty $(where $($where)*)? { + fn from_register(value: u64) -> Self { + value as Self + } + } + )+ } - }; -} + } -unsafe_impl_from_btf_argument!(u8); -unsafe_impl_from_btf_argument!(u16); -unsafe_impl_from_btf_argument!(u32); -unsafe_impl_from_btf_argument!(u64); -unsafe_impl_from_btf_argument!(i8); -unsafe_impl_from_btf_argument!(i16); -unsafe_impl_from_btf_argument!(i32); -unsafe_impl_from_btf_argument!(i64); -unsafe_impl_from_btf_argument!(usize); -unsafe_impl_from_btf_argument!(isize); - -pub struct PtRegs { - regs: *mut pt_regs, + unsafe_impl_argument!( + i8, + u8, + i16, + u16, + i32, + u32, + i64, + u64, + i128, + u128, + isize, + usize, + {} *const T {where T: 'static}, + {} *mut T {where T: 'static}, + ); } -/// A portable wrapper around pt_regs, user_pt_regs and user_regs_struct. -impl PtRegs { - pub fn new(regs: *mut pt_regs) -> Self { - PtRegs { regs } - } +pub trait Argument: sealed::Argument {} - /// Returns the value of the register used to pass arg `n`. - pub fn arg(&self, n: usize) -> Option { - T::from_argument(unsafe { &*self.regs }, n) - } - - /// Returns the value of the register used to pass the return value. - pub fn ret(&self) -> Option { - T::from_retval(unsafe { &*self.regs }) - } +impl Argument for T {} - /// Returns a pointer to the wrapped value. - pub fn as_ptr(&self) -> *mut pt_regs { - self.regs - } +/// Coerces a `T` from the `n`th argument from a BTF context where `n` starts +/// at 0 and increases by 1 for each successive argument. +pub(crate) fn btf_arg(ctx: &impl crate::EbpfContext, n: usize) -> T { + // BTF arguments are exposed as an array of `usize` where `usize` can + // either be treated as a pointer or a primitive type + let ptr: *const usize = ctx.as_ptr().cast(); + let ptr = unsafe { ptr.add(n) }; + T::from_register(unsafe { *ptr as u64 }) } -/// A trait that indicates a valid type for an argument which can be coerced from -/// a pt_regs context. -/// -/// Any implementation of this trait is strictly architecture-specific and depends on the -/// layout of the underlying pt_regs struct and the target processor's calling -/// conventions. Users should not implement this trait. -pub trait FromPtRegs: Sized { - /// Coerces a `T` from the `n`th argument of a pt_regs context where `n` starts - /// at 0 and increases by 1 for each successive argument. - fn from_argument(ctx: &pt_regs, n: usize) -> Option; - - /// Coerces a `T` from the return value of a pt_regs context. - fn from_retval(ctx: &pt_regs) -> Option; +trait PtRegsLayout { + type Reg; + + fn arg_reg(&self, index: usize) -> Option<&Self::Reg>; + fn rc_reg(&self) -> &Self::Reg; } -#[cfg(bpf_target_arch = "x86_64")] -impl FromPtRegs for *const T { - fn from_argument(ctx: &pt_regs, n: usize) -> Option { - match n { - 0 => unsafe { bpf_probe_read(&ctx.rdi).map(|v| v as *const _).ok() }, - 1 => unsafe { bpf_probe_read(&ctx.rsi).map(|v| v as *const _).ok() }, - 2 => unsafe { bpf_probe_read(&ctx.rdx).map(|v| v as *const _).ok() }, - 3 => unsafe { bpf_probe_read(&ctx.rcx).map(|v| v as *const _).ok() }, - 4 => unsafe { bpf_probe_read(&ctx.r8).map(|v| v as *const _).ok() }, - 5 => unsafe { bpf_probe_read(&ctx.r9).map(|v| v as *const _).ok() }, +#[cfg(bpf_target_arch = "aarch64")] +impl PtRegsLayout for pt_regs { + type Reg = crate::bindings::__u64; + + fn arg_reg(&self, index: usize) -> Option<&Self::Reg> { + // AArch64 arguments align with libbpf's __PT_PARM{1..8}_REG (regs[0..7]). + // https://github.com/torvalds/linux/blob/v6.17/arch/arm64/include/uapi/asm/ptrace.h#L88-L93 + // https://github.com/torvalds/linux/blob/v6.17/tools/lib/bpf/bpf_tracing.h#L229-L244 + match index { + 0..=7 => Some(&self.regs[index]), _ => None, } } - fn from_retval(ctx: &pt_regs) -> Option { - unsafe { bpf_probe_read(&ctx.rax).map(|v| v as *const _).ok() } + fn rc_reg(&self) -> &Self::Reg { + // Return codes use libbpf's __PT_RC_REG (regs[0]/x0). + // https://github.com/torvalds/linux/blob/v6.17/tools/lib/bpf/bpf_tracing.h#L248-L251 + &self.regs[0] } } #[cfg(bpf_target_arch = "arm")] -impl FromPtRegs for *const T { - fn from_argument(ctx: &pt_regs, n: usize) -> Option { - if n <= 6 { - unsafe { bpf_probe_read(&ctx.uregs[n]).map(|v| v as *const _).ok() } - } else { - None +impl PtRegsLayout for pt_regs { + type Reg = crate::cty::c_long; + + fn arg_reg(&self, index: usize) -> Option<&Self::Reg> { + // ARM arguments follow libbpf's __PT_PARM{1..7}_REG mapping (uregs[0..6]). + // https://github.com/torvalds/linux/blob/v6.17/arch/arm/include/uapi/asm/ptrace.h#L124-L152 + // https://github.com/torvalds/linux/blob/v6.17/tools/lib/bpf/bpf_tracing.h#L198-L210 + match index { + 0..=6 => Some(&self.uregs[index]), + _ => None, } } - fn from_retval(ctx: &pt_regs) -> Option { - unsafe { bpf_probe_read(&ctx.uregs[0]).map(|v| v as *const _).ok() } + fn rc_reg(&self) -> &Self::Reg { + // Return codes use libbpf's __PT_RC_REG (uregs[0]). + // https://github.com/torvalds/linux/blob/v6.17/tools/lib/bpf/bpf_tracing.h#L211-L214 + &self.uregs[0] } } -#[cfg(bpf_target_arch = "aarch64")] -impl FromPtRegs for *const T { - fn from_argument(ctx: &pt_regs, n: usize) -> Option { - if n <= 7 { - unsafe { bpf_probe_read(&ctx.regs[n]).map(|v| v as *const _).ok() } - } else { - None +#[cfg(bpf_target_arch = "loongarch64")] +impl PtRegsLayout for pt_regs { + type Reg = crate::cty::c_ulong; + + fn arg_reg(&self, index: usize) -> Option<&Self::Reg> { + // LoongArch arguments correspond to libbpf's __PT_PARM{1..8}_REG (regs[4..11]). + // https://github.com/torvalds/linux/blob/v6.17/arch/loongarch/include/asm/ptrace.h#L20-L33 + // https://github.com/torvalds/linux/blob/v6.17/tools/lib/bpf/bpf_tracing.h#L427-L444 + match index { + 0..=7 => Some(&self.regs[4 + index]), + _ => None, } } - fn from_retval(ctx: &pt_regs) -> Option { - unsafe { bpf_probe_read(&ctx.regs[0]).map(|v| v as *const _).ok() } + fn rc_reg(&self) -> &Self::Reg { + // Return codes use libbpf's __PT_RC_REG (regs[4], a0). + // https://github.com/torvalds/linux/blob/v6.17/tools/lib/bpf/bpf_tracing.h#L445-L447 + &self.regs[4] } } -#[cfg(bpf_target_arch = "riscv64")] -impl FromPtRegs for *const T { - fn from_argument(ctx: &pt_regs, n: usize) -> Option { - match n { - 0 => unsafe { bpf_probe_read(&ctx.a0).map(|v| v as *const _).ok() }, - 1 => unsafe { bpf_probe_read(&ctx.a1).map(|v| v as *const _).ok() }, - 2 => unsafe { bpf_probe_read(&ctx.a2).map(|v| v as *const _).ok() }, - 3 => unsafe { bpf_probe_read(&ctx.a3).map(|v| v as *const _).ok() }, - 4 => unsafe { bpf_probe_read(&ctx.a4).map(|v| v as *const _).ok() }, - 5 => unsafe { bpf_probe_read(&ctx.a5).map(|v| v as *const _).ok() }, - 6 => unsafe { bpf_probe_read(&ctx.a6).map(|v| v as *const _).ok() }, - 7 => unsafe { bpf_probe_read(&ctx.a7).map(|v| v as *const _).ok() }, +#[cfg(bpf_target_arch = "mips")] +impl PtRegsLayout for pt_regs { + type Reg = crate::bindings::__u64; + + fn arg_reg(&self, index: usize) -> Option<&Self::Reg> { + // MIPS N64 arguments correspond to libbpf's __PT_PARM{1..8}_REG (regs[4..11]). + // https://github.com/torvalds/linux/blob/v6.17/arch/mips/include/asm/ptrace.h#L28-L52 + // https://github.com/torvalds/linux/blob/v6.17/tools/lib/bpf/bpf_tracing.h#L261-L275 + match index { + 0..=7 => Some(&self.regs[4 + index]), _ => None, } } - fn from_retval(ctx: &pt_regs) -> Option { - unsafe { bpf_probe_read(&ctx.ra).map(|v| v as *const _).ok() } + fn rc_reg(&self) -> &Self::Reg { + // Return codes use libbpf's __PT_RC_REG (regs[2], which aliases MIPS $v0). + // https://github.com/torvalds/linux/blob/v6.17/tools/lib/bpf/bpf_tracing.h#L277-L279 + &self.regs[2] } } -#[cfg(bpf_target_arch = "x86_64")] -impl FromPtRegs for *mut T { - fn from_argument(ctx: &pt_regs, n: usize) -> Option { - match n { - 0 => unsafe { bpf_probe_read(&ctx.rdi).map(|v| v as *mut _).ok() }, - 1 => unsafe { bpf_probe_read(&ctx.rsi).map(|v| v as *mut _).ok() }, - 2 => unsafe { bpf_probe_read(&ctx.rdx).map(|v| v as *mut _).ok() }, - 3 => unsafe { bpf_probe_read(&ctx.rcx).map(|v| v as *mut _).ok() }, - 4 => unsafe { bpf_probe_read(&ctx.r8).map(|v| v as *mut _).ok() }, - 5 => unsafe { bpf_probe_read(&ctx.r9).map(|v| v as *mut _).ok() }, +#[cfg(bpf_target_arch = "powerpc64")] +impl PtRegsLayout for pt_regs { + type Reg = crate::cty::c_ulong; + + fn arg_reg(&self, index: usize) -> Option<&Self::Reg> { + // PowerPC64 arguments follow libbpf's __PT_PARM{1..8}_REG (gpr[3..10]). + // https://github.com/torvalds/linux/blob/v6.17/arch/powerpc/include/asm/ptrace.h#L28-L56 + // https://github.com/torvalds/linux/blob/v6.17/tools/lib/bpf/bpf_tracing.h#L290-L308 + match index { + 0..=7 => Some(&self.gpr[3 + index]), _ => None, } } - fn from_retval(ctx: &pt_regs) -> Option { - unsafe { bpf_probe_read(&ctx.rax).map(|v| v as *mut _).ok() } + fn rc_reg(&self) -> &Self::Reg { + // Return codes use libbpf's __PT_RC_REG (gpr[3]). + // https://github.com/torvalds/linux/blob/v6.17/tools/lib/bpf/bpf_tracing.h#L311-L314 + &self.gpr[3] } } -#[cfg(bpf_target_arch = "arm")] -impl FromPtRegs for *mut T { - fn from_argument(ctx: &pt_regs, n: usize) -> Option { - if n <= 6 { - unsafe { bpf_probe_read(&ctx.uregs[n]).map(|v| v as *mut _).ok() } - } else { - None +#[cfg(bpf_target_arch = "riscv64")] +impl PtRegsLayout for pt_regs { + type Reg = crate::cty::c_ulong; + + fn arg_reg(&self, index: usize) -> Option<&Self::Reg> { + // RISC-V arguments track libbpf's __PT_PARM{1..8}_REG (a0-a7). + // https://github.com/torvalds/linux/blob/v6.17/arch/riscv/include/asm/ptrace.h#L15-L55 + // https://github.com/torvalds/linux/blob/v6.17/tools/lib/bpf/bpf_tracing.h#L360-L376 + match index { + 0 => Some(&self.a0), + 1 => Some(&self.a1), + 2 => Some(&self.a2), + 3 => Some(&self.a3), + 4 => Some(&self.a4), + 5 => Some(&self.a5), + 6 => Some(&self.a6), + 7 => Some(&self.a7), + _ => None, } } - fn from_retval(ctx: &pt_regs) -> Option { - unsafe { bpf_probe_read(&ctx.uregs[0]).map(|v| v as *mut _).ok() } + fn rc_reg(&self) -> &Self::Reg { + // Return codes use libbpf's __PT_RC_REG (a0). + // https://github.com/torvalds/linux/blob/v6.17/tools/lib/bpf/bpf_tracing.h#L379-L382 + &self.a0 } } -#[cfg(bpf_target_arch = "aarch64")] -impl FromPtRegs for *mut T { - fn from_argument(ctx: &pt_regs, n: usize) -> Option { - if n <= 7 { - unsafe { bpf_probe_read(&ctx.regs[n]).map(|v| v as *mut _).ok() } - } else { - None +#[cfg(bpf_target_arch = "s390x")] +impl PtRegsLayout for pt_regs { + type Reg = crate::cty::c_ulong; + + fn arg_reg(&self, index: usize) -> Option<&Self::Reg> { + // s390 arguments match libbpf's __PT_PARM{1..5}_REG (gprs[2..6]). + // https://github.com/torvalds/linux/blob/v6.17/arch/s390/include/asm/ptrace.h#L111-L131 + // https://github.com/torvalds/linux/blob/v6.17/tools/lib/bpf/bpf_tracing.h#L170-L181 + match index { + 0..=4 => Some(&self.gprs[2 + index]), + _ => None, } } - fn from_retval(ctx: &pt_regs) -> Option { - unsafe { bpf_probe_read(&ctx.regs[0]).map(|v| v as *mut _).ok() } + fn rc_reg(&self) -> &Self::Reg { + // Return codes use libbpf's __PT_RC_REG (gprs[2]). + // https://github.com/torvalds/linux/blob/v6.17/tools/lib/bpf/bpf_tracing.h#L186-L188 + &self.gprs[2] } } -#[cfg(bpf_target_arch = "riscv64")] -impl FromPtRegs for *mut T { - fn from_argument(ctx: &pt_regs, n: usize) -> Option { - match n { - 0 => unsafe { bpf_probe_read(&ctx.a0).map(|v| v as *mut _).ok() }, - 1 => unsafe { bpf_probe_read(&ctx.a1).map(|v| v as *mut _).ok() }, - 2 => unsafe { bpf_probe_read(&ctx.a2).map(|v| v as *mut _).ok() }, - 3 => unsafe { bpf_probe_read(&ctx.a3).map(|v| v as *mut _).ok() }, - 4 => unsafe { bpf_probe_read(&ctx.a4).map(|v| v as *mut _).ok() }, - 5 => unsafe { bpf_probe_read(&ctx.a5).map(|v| v as *mut _).ok() }, - 6 => unsafe { bpf_probe_read(&ctx.a6).map(|v| v as *mut _).ok() }, - 7 => unsafe { bpf_probe_read(&ctx.a7).map(|v| v as *mut _).ok() }, +#[cfg(bpf_target_arch = "x86_64")] +impl PtRegsLayout for pt_regs { + type Reg = crate::cty::c_ulong; + + fn arg_reg(&self, index: usize) -> Option<&Self::Reg> { + // x86-64 arguments mirror libbpf's __PT_PARM{1..6}_REG mapping (rdi, rsi, rdx, rcx, r8, r9). + // https://github.com/torvalds/linux/blob/v6.17/arch/x86/include/asm/ptrace.h#L103-L155 + // https://github.com/torvalds/linux/blob/v6.17/tools/lib/bpf/bpf_tracing.h#L134-L152 + match index { + 0 => Some(&self.rdi), + 1 => Some(&self.rsi), + 2 => Some(&self.rdx), + 3 => Some(&self.rcx), + 4 => Some(&self.r8), + 5 => Some(&self.r9), _ => None, } } - fn from_retval(ctx: &pt_regs) -> Option { - unsafe { bpf_probe_read(&ctx.ra).map(|v| v as *mut _).ok() } + fn rc_reg(&self) -> &Self::Reg { + // Return codes use libbpf's __PT_RC_REG (rax). + // https://github.com/torvalds/linux/blob/v6.17/tools/lib/bpf/bpf_tracing.h#L148-L152 + &self.rax } } -/// Helper macro to implement [`FromPtRegs`] for a primitive type. -macro_rules! impl_from_pt_regs { - ($type:ident) => { - #[cfg(bpf_target_arch = "x86_64")] - impl FromPtRegs for $type { - fn from_argument(ctx: &pt_regs, n: usize) -> Option { - match n { - 0 => Some(ctx.rdi as *const $type as _), - 1 => Some(ctx.rsi as *const $type as _), - 2 => Some(ctx.rdx as *const $type as _), - 3 => Some(ctx.rcx as *const $type as _), - 4 => Some(ctx.r8 as *const $type as _), - 5 => Some(ctx.r9 as *const $type as _), - _ => None, - } - } - - fn from_retval(ctx: &pt_regs) -> Option { - Some(ctx.rax as *const $type as _) - } - } - - #[cfg(bpf_target_arch = "arm")] - impl FromPtRegs for $type { - fn from_argument(ctx: &pt_regs, n: usize) -> Option { - if n <= 6 { - Some(ctx.uregs[n] as *const $type as _) - } else { - None - } - } - - fn from_retval(ctx: &pt_regs) -> Option { - Some(ctx.uregs[0] as *const $type as _) - } - } - - #[cfg(bpf_target_arch = "aarch64")] - impl FromPtRegs for $type { - fn from_argument(ctx: &pt_regs, n: usize) -> Option { - if n <= 7 { - Some(ctx.regs[n] as *const $type as _) - } else { - None - } - } - - fn from_retval(ctx: &pt_regs) -> Option { - Some(ctx.regs[0] as *const $type as _) - } - } - - #[cfg(bpf_target_arch = "riscv64")] - impl FromPtRegs for $type { - fn from_argument(ctx: &pt_regs, n: usize) -> Option { - match n { - 0 => Some(ctx.a0 as *const $type as _), - 1 => Some(ctx.a1 as *const $type as _), - 2 => Some(ctx.a2 as *const $type as _), - 3 => Some(ctx.a3 as *const $type as _), - 4 => Some(ctx.a4 as *const $type as _), - 5 => Some(ctx.a5 as *const $type as _), - 6 => Some(ctx.a6 as *const $type as _), - 7 => Some(ctx.a7 as *const $type as _), - _ => None, - } - } +/// Coerces a `T` from the `n`th argument of a pt_regs context where `n` starts +/// at 0 and increases by 1 for each successive argument. +pub(crate) fn arg(ctx: &pt_regs, n: usize) -> Option { + let reg = ctx.arg_reg(n)?; + #[allow( + clippy::cast_sign_loss, + clippy::unnecessary_cast, + trivial_numeric_casts + )] + Some(T::from_register((*reg) as u64)) +} - fn from_retval(ctx: &pt_regs) -> Option { - Some(ctx.ra as *const $type as _) - } - } - }; +/// Coerces a `T` from the return value of a pt_regs context. +pub(crate) fn ret(ctx: &pt_regs) -> T { + let reg = ctx.rc_reg(); + #[allow( + clippy::cast_sign_loss, + clippy::unnecessary_cast, + trivial_numeric_casts + )] + T::from_register((*reg) as u64) } -impl_from_pt_regs!(u8); -impl_from_pt_regs!(u16); -impl_from_pt_regs!(u32); -impl_from_pt_regs!(u64); -impl_from_pt_regs!(i8); -impl_from_pt_regs!(i16); -impl_from_pt_regs!(i32); -impl_from_pt_regs!(i64); -impl_from_pt_regs!(usize); -impl_from_pt_regs!(isize); +/// Returns the n-th argument of the raw tracepoint. +/// +/// # Safety +/// +/// This method is unsafe because it performs raw pointer conversion and makes assumptions +/// about the structure of the `bpf_raw_tracepoint_args` type. The tracepoint arguments are +/// represented as an array of `__u64` values. To be precise, the wrapped +/// `bpf_raw_tracepoint_args` binding defines it as `__IncompleteArrayField<__u64>` and the +/// original C type as `__u64 args[0]`. This method provides a way to access these arguments +/// conveniently in Rust using `__IncompleteArrayField::as_slice` to represent that array +/// as a slice of length n and then retrieve the n-th element of it. +/// +/// However, the method does not check the total number of available arguments for a given +/// tracepoint and assumes that the slice has at least `n` elements, leading to undefined +/// behavior if this condition is not met. Such check is impossible to do, because the +/// tracepoint context doesn't contain any information about number of arguments. +/// +/// This method also cannot guarantee that the requested type matches the actual value type. +/// Wrong assumptions about types can lead to undefined behavior. The tracepoint context +/// doesn't provide any type information. +/// +/// The caller is responsible for ensuring they have accurate knowledge of the arguments +/// and their respective types for the accessed tracepoint context. +pub(crate) fn raw_tracepoint_arg(ctx: &bpf_raw_tracepoint_args, n: usize) -> T { + // Raw tracepoint arguments are exposed as `__u64 args[0]`. + // https://github.com/torvalds/linux/blob/v6.17/include/uapi/linux/bpf.h#L7231-L7233 + // They are represented as `__IncompleteArrayField` in the Rust + // wrapper. + // + // The most convenient way of accessing such type in Rust is to use + // `__IncompleteArrayField::as_slice` to represent that array as a + // slice of length n and then retrieve the n-th element of it. + // + // We don't know how many arguments are there for the given tracepoint, + // so we just assume that the slice has at least n elements. The whole + // assumption and implementation is unsafe. + let ptr = ctx.args.as_ptr(); + let ptr = unsafe { ptr.add(n) }; + T::from_register(unsafe { *ptr }) +} diff --git a/ebpf/aya-ebpf/src/bindings.rs b/ebpf/aya-ebpf/src/bindings.rs new file mode 100644 index 00000000..d227c48e --- /dev/null +++ b/ebpf/aya-ebpf/src/bindings.rs @@ -0,0 +1,16 @@ +#[cfg(any( + bpf_target_arch = "arm", + bpf_target_arch = "mips", + bpf_target_arch = "powerpc64", + bpf_target_arch = "x86_64", +))] +pub use aya_ebpf_bindings::bindings::pt_regs; +#[cfg(any( + bpf_target_arch = "aarch64", + bpf_target_arch = "loongarch64", + bpf_target_arch = "s390x", +))] +pub use aya_ebpf_bindings::bindings::user_pt_regs as pt_regs; +#[cfg(bpf_target_arch = "riscv64")] +pub use aya_ebpf_bindings::bindings::user_regs_struct as pt_regs; +pub use aya_ebpf_bindings::bindings::*; diff --git a/ebpf/aya-ebpf/src/btf_maps/array.rs b/ebpf/aya-ebpf/src/btf_maps/array.rs new file mode 100644 index 00000000..91878fa2 --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/array.rs @@ -0,0 +1,57 @@ +use core::{borrow::Borrow, cell::UnsafeCell, ptr::NonNull}; + +use crate::{bindings::bpf_map_type::BPF_MAP_TYPE_ARRAY, btf_map_def, cty::c_long, insert, lookup}; + +btf_map_def!(ArrayDef, BPF_MAP_TYPE_ARRAY); + +#[repr(transparent)] +pub struct Array(UnsafeCell>); + +unsafe impl Sync for Array {} + +impl Array { + /// Creates a new [`Array`] instance with elements of type `T`, maximum + /// capacity of `M` and additional flags `F`. + /// + /// # Example + /// + /// ```rust + /// use aya_ebpf::{btf_maps::Array, macros::btf_map}; + /// + /// #[btf_map] + /// static ARRAY: Array = Array::new(); + /// ``` + #[expect( + clippy::new_without_default, + reason = "BPF maps are always used as static variables, therefore this method has to be `const`. `Default::default` is not `const`." + )] + pub const fn new() -> Self { + Self(UnsafeCell::new(ArrayDef::new())) + } + + #[inline(always)] + pub fn get(&self, index: u32) -> Option<&T> { + unsafe { self.lookup(index).map(|p| p.as_ref()) } + } + + #[inline(always)] + pub fn get_ptr(&self, index: u32) -> Option<*const T> { + unsafe { self.lookup(index).map(|p| p.as_ptr().cast_const()) } + } + + #[inline(always)] + pub fn get_ptr_mut(&self, index: u32) -> Option<*mut T> { + unsafe { self.lookup(index).map(|p| p.as_ptr()) } + } + + #[inline(always)] + unsafe fn lookup(&self, index: u32) -> Option> { + lookup(self.0.get().cast(), &index) + } + + /// Sets the value of the element at the given index. + #[inline(always)] + pub fn set(&self, index: u32, value: impl Borrow, flags: u64) -> Result<(), c_long> { + insert(self.0.get().cast(), &index, value.borrow(), flags) + } +} diff --git a/ebpf/aya-ebpf/src/btf_maps/mod.rs b/ebpf/aya-ebpf/src/btf_maps/mod.rs new file mode 100644 index 00000000..a65a4a7e --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/mod.rs @@ -0,0 +1,55 @@ +use core::marker::PhantomData; + +pub mod array; +pub mod sk_storage; + +pub use array::Array; +pub use sk_storage::SkStorage; + +/// A marker used to remove names of annotated types in LLVM debug info and +/// therefore also in BTF. +#[repr(transparent)] +pub(crate) struct AyaBtfMapMarker(PhantomData<()>); + +impl AyaBtfMapMarker { + pub(crate) const fn new() -> Self { + Self(PhantomData) + } +} + +#[macro_export] +macro_rules! btf_map_def { + ($name:ident, $t:ident) => { + #[expect( + dead_code, + reason = "These fields exist only for BTF metadata exposure. None of them are actually used." + )] + pub struct $name { + r#type: *const [i32; $t as usize], + key: *const K, + value: *const V, + max_entries: *const [i32; M], + map_flags: *const [i32; F], + + // Anonymize the struct. + _anon: $crate::btf_maps::AyaBtfMapMarker, + } + + #[expect( + clippy::new_without_default, + reason = "BPF maps are always used as static variables, therefore this method has to be `const`. `Default::default` is not `const`." + )] + impl $name { + pub const fn new() -> $name { + $name { + r#type: ::core::ptr::null(), + key: ::core::ptr::null(), + value: ::core::ptr::null(), + max_entries: ::core::ptr::null(), + map_flags: ::core::ptr::null(), + _anon: $crate::btf_maps::AyaBtfMapMarker::new(), + } + } + } + }; +} diff --git a/ebpf/aya-ebpf/src/btf_maps/sk_storage.rs b/ebpf/aya-ebpf/src/btf_maps/sk_storage.rs new file mode 100644 index 00000000..935bf1b4 --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/sk_storage.rs @@ -0,0 +1,87 @@ +use core::{cell::UnsafeCell, ptr}; + +use aya_ebpf_bindings::bindings::{ + BPF_F_NO_PREALLOC, BPF_SK_STORAGE_GET_F_CREATE, bpf_map_type::BPF_MAP_TYPE_SK_STORAGE, bpf_sock, +}; +use aya_ebpf_cty::{c_long, c_void}; + +use crate::{ + btf_map_def, + helpers::generated::{bpf_sk_storage_delete, bpf_sk_storage_get}, + programs::sock_addr::SockAddrContext, +}; + +btf_map_def!(SkStorageDef, BPF_MAP_TYPE_SK_STORAGE); + +// TODO(https://github.com/rust-lang/rust/issues/76560): this should be: +// +// { F | BPF_F_NO_PREALLOC as usize }. +#[repr(transparent)] +pub struct SkStorage(UnsafeCell>); + +unsafe impl Sync for SkStorage {} + +impl SkStorage { + #[expect( + clippy::new_without_default, + reason = "BPF maps are always used as static variables, therefore this method has to be `const`. `Default::default` is not `const`." + )] + pub const fn new() -> Self { + Self(UnsafeCell::new(SkStorageDef::new())) + } + + #[inline(always)] + fn as_ptr(&self) -> *mut c_void { + let Self(inner) = self; + + inner.get().cast() + } + + #[inline(always)] + fn get_ptr(&self, ctx: &SockAddrContext, value: *mut T, flags: u64) -> *mut T { + let sock_addr = unsafe { &*ctx.sock_addr }; + let sk = unsafe { sock_addr.__bindgen_anon_1.sk }; + unsafe { bpf_sk_storage_get(self.as_ptr(), sk.cast(), value.cast(), flags) }.cast::() + } + + /// Gets a mutable reference to the value associated with `sk`. + /// + /// # Safety + /// + /// This function may dereference the pointer `sk`. + #[inline(always)] + pub unsafe fn get_ptr_mut(&self, ctx: &SockAddrContext) -> *mut T { + self.get_ptr(ctx, ptr::null_mut(), 0) + } + + /// Gets a mutable reference to the value associated with `sk`. + /// + /// If no value is associated with `sk`, `value` will be inserted.` + /// + /// # Safety + /// + /// This function may dereference the pointer `sk`. + #[inline(always)] + pub unsafe fn get_or_insert_ptr_mut( + &self, + ctx: &SockAddrContext, + value: Option<&mut T>, + ) -> *mut T { + self.get_ptr( + ctx, + value.map_or(ptr::null_mut(), ptr::from_mut), + BPF_SK_STORAGE_GET_F_CREATE.into(), + ) + } + + /// Deletes the value associated with `sk`. + /// + /// # Safety + /// + /// This function may dereference the pointer `sk`. + #[inline(always)] + pub unsafe fn delete(&self, sk: *mut bpf_sock) -> Result<(), c_long> { + let ret = unsafe { bpf_sk_storage_delete(self.as_ptr(), sk.cast()) }; + if ret == 0 { Ok(()) } else { Err(ret) } + } +} diff --git a/ebpf/aya-ebpf/src/helpers.rs b/ebpf/aya-ebpf/src/helpers.rs index ad7e0ce5..44b61342 100644 --- a/ebpf/aya-ebpf/src/helpers.rs +++ b/ebpf/aya-ebpf/src/helpers.rs @@ -1,21 +1,27 @@ -//! This module contains kernel helper functions that may be exposed to specific BPF -//! program types. These helpers can be used to perform common tasks, query and operate on -//! data exposed by the kernel, and perform some operations that would normally be denied -//! by the BPF verifier. +//! This module contains kernel helper functions that may be exposed to specific +//! BPF program types. //! -//! Here, we provide some higher-level wrappers around the underlying kernel helpers, but -//! also expose bindings to the underlying helpers as a fall-back in case of a missing -//! implementation. - -use core::mem::{self, MaybeUninit}; +//! These helpers can be used to perform common tasks, query and operate on data +//! exposed by the kernel, and perform some operations that would normally be +//! denied by the BPF verifier. +//! +//! Here, we provide some higher-level wrappers around the underlying kernel +//! helpers, but also expose bindings to the underlying helpers as a fall-back +//! in case of a missing implementation. + +use core::{ + cmp::Ordering, + ffi::CStr, + mem::{self, MaybeUninit}, +}; -pub use aya_ebpf_bindings::helpers as gen; +pub use aya_ebpf_bindings::helpers as generated; #[doc(hidden)] -pub use gen::*; +pub use generated::*; use crate::{ check_bounds_signed, - cty::{c_char, c_long, c_void}, + cty::{c_char, c_long}, }; /// Read bytes stored at `src` and store them as a `T`. @@ -29,7 +35,6 @@ use crate::{ /// # Examples /// /// ```no_run -/// # #![allow(dead_code)] /// # use aya_ebpf::{cty::{c_int, c_long}, helpers::bpf_probe_read}; /// # fn try_test() -> Result<(), c_long> { /// # let kernel_ptr: *const c_int = 0 as _; @@ -46,13 +51,15 @@ use crate::{ #[inline] pub unsafe fn bpf_probe_read(src: *const T) -> Result { let mut v: MaybeUninit = MaybeUninit::uninit(); - let ret = gen::bpf_probe_read( - v.as_mut_ptr() as *mut c_void, - mem::size_of::() as u32, - src as *const c_void, - ); + let ret = unsafe { + generated::bpf_probe_read( + v.as_mut_ptr().cast(), + mem::size_of::() as u32, + src.cast(), + ) + }; if ret == 0 { - Ok(v.assume_init()) + Ok(unsafe { v.assume_init() }) } else { Err(ret) } @@ -66,7 +73,6 @@ pub unsafe fn bpf_probe_read(src: *const T) -> Result { /// # Examples /// /// ```no_run -/// # #![allow(dead_code)] /// # use aya_ebpf::{cty::{c_int, c_long}, helpers::bpf_probe_read_buf}; /// # fn try_test() -> Result<(), c_long> { /// # let ptr: *const u8 = 0 as _; @@ -82,16 +88,9 @@ pub unsafe fn bpf_probe_read(src: *const T) -> Result { /// On failure, this function returns a negative value wrapped in an `Err`. #[inline] pub unsafe fn bpf_probe_read_buf(src: *const u8, dst: &mut [u8]) -> Result<(), c_long> { - let ret = gen::bpf_probe_read( - dst.as_mut_ptr() as *mut c_void, - dst.len() as u32, - src as *const c_void, - ); - if ret == 0 { - Ok(()) - } else { - Err(ret) - } + let ret = + unsafe { generated::bpf_probe_read(dst.as_mut_ptr().cast(), dst.len() as u32, src.cast()) }; + if ret == 0 { Ok(()) } else { Err(ret) } } /// Read bytes stored at the _user space_ pointer `src` and store them as a `T`. @@ -102,7 +101,6 @@ pub unsafe fn bpf_probe_read_buf(src: *const u8, dst: &mut [u8]) -> Result<(), c /// # Examples /// /// ```no_run -/// # #![allow(dead_code)] /// # use aya_ebpf::{cty::{c_int, c_long}, helpers::bpf_probe_read_user}; /// # fn try_test() -> Result<(), c_long> { /// # let user_ptr: *const c_int = 0 as _; @@ -119,13 +117,15 @@ pub unsafe fn bpf_probe_read_buf(src: *const u8, dst: &mut [u8]) -> Result<(), c #[inline] pub unsafe fn bpf_probe_read_user(src: *const T) -> Result { let mut v: MaybeUninit = MaybeUninit::uninit(); - let ret = gen::bpf_probe_read_user( - v.as_mut_ptr() as *mut c_void, - mem::size_of::() as u32, - src as *const c_void, - ); + let ret = unsafe { + generated::bpf_probe_read_user( + v.as_mut_ptr().cast(), + mem::size_of::() as u32, + src.cast(), + ) + }; if ret == 0 { - Ok(v.assume_init()) + Ok(unsafe { v.assume_init() }) } else { Err(ret) } @@ -137,7 +137,6 @@ pub unsafe fn bpf_probe_read_user(src: *const T) -> Result { /// # Examples /// /// ```no_run -/// # #![allow(dead_code)] /// # use aya_ebpf::{cty::{c_int, c_long}, helpers::bpf_probe_read_user_buf}; /// # fn try_test() -> Result<(), c_long> { /// # let user_ptr: *const u8 = 0 as _; @@ -153,16 +152,10 @@ pub unsafe fn bpf_probe_read_user(src: *const T) -> Result { /// On failure, this function returns a negative value wrapped in an `Err`. #[inline] pub unsafe fn bpf_probe_read_user_buf(src: *const u8, dst: &mut [u8]) -> Result<(), c_long> { - let ret = gen::bpf_probe_read_user( - dst.as_mut_ptr() as *mut c_void, - dst.len() as u32, - src as *const c_void, - ); - if ret == 0 { - Ok(()) - } else { - Err(ret) - } + let ret = unsafe { + generated::bpf_probe_read_user(dst.as_mut_ptr().cast(), dst.len() as u32, src.cast()) + }; + if ret == 0 { Ok(()) } else { Err(ret) } } /// Read bytes stored at the _kernel space_ pointer `src` and store them as a `T`. @@ -173,7 +166,6 @@ pub unsafe fn bpf_probe_read_user_buf(src: *const u8, dst: &mut [u8]) -> Result< /// # Examples /// /// ```no_run -/// # #![allow(dead_code)] /// # use aya_ebpf::{cty::{c_int, c_long}, helpers::bpf_probe_read_kernel}; /// # fn try_test() -> Result<(), c_long> { /// # let kernel_ptr: *const c_int = 0 as _; @@ -190,13 +182,15 @@ pub unsafe fn bpf_probe_read_user_buf(src: *const u8, dst: &mut [u8]) -> Result< #[inline] pub unsafe fn bpf_probe_read_kernel(src: *const T) -> Result { let mut v: MaybeUninit = MaybeUninit::uninit(); - let ret = gen::bpf_probe_read_kernel( - v.as_mut_ptr() as *mut c_void, - mem::size_of::() as u32, - src as *const c_void, - ); + let ret = unsafe { + generated::bpf_probe_read_kernel( + v.as_mut_ptr().cast(), + mem::size_of::() as u32, + src.cast(), + ) + }; if ret == 0 { - Ok(v.assume_init()) + Ok(unsafe { v.assume_init() }) } else { Err(ret) } @@ -208,7 +202,6 @@ pub unsafe fn bpf_probe_read_kernel(src: *const T) -> Result { /// # Examples /// /// ```no_run -/// # #![allow(dead_code)] /// # use aya_ebpf::{cty::{c_int, c_long}, helpers::bpf_probe_read_kernel_buf}; /// # fn try_test() -> Result<(), c_long> { /// # let kernel_ptr: *const u8 = 0 as _; @@ -224,16 +217,10 @@ pub unsafe fn bpf_probe_read_kernel(src: *const T) -> Result { /// On failure, this function returns a negative value wrapped in an `Err`. #[inline] pub unsafe fn bpf_probe_read_kernel_buf(src: *const u8, dst: &mut [u8]) -> Result<(), c_long> { - let ret = gen::bpf_probe_read_kernel( - dst.as_mut_ptr() as *mut c_void, - dst.len() as u32, - src as *const c_void, - ); - if ret == 0 { - Ok(()) - } else { - Err(ret) - } + let ret = unsafe { + generated::bpf_probe_read_kernel(dst.as_mut_ptr().cast(), dst.len() as u32, src.cast()) + }; + if ret == 0 { Ok(()) } else { Err(ret) } } /// Read a null-terminated string stored at `src` into `dest`. @@ -247,11 +234,12 @@ pub unsafe fn bpf_probe_read_kernel_buf(src: *const u8, dst: &mut [u8]) -> Resul /// # Examples /// /// ```no_run -/// # #![allow(dead_code)] +/// # #[expect(deprecated)] /// # use aya_ebpf::{cty::c_long, helpers::bpf_probe_read_str}; /// # fn try_test() -> Result<(), c_long> { /// # let kernel_ptr: *const u8 = 0 as _; /// let mut my_str = [0u8; 16]; +/// # #[expect(deprecated)] /// let num_read = unsafe { bpf_probe_read_str(kernel_ptr, &mut my_str)? }; /// /// // Do something with num_read and my_str @@ -267,11 +255,9 @@ pub unsafe fn bpf_probe_read_kernel_buf(src: *const u8, dst: &mut [u8]) -> Resul )] #[inline] pub unsafe fn bpf_probe_read_str(src: *const u8, dest: &mut [u8]) -> Result { - let len = gen::bpf_probe_read_str( - dest.as_mut_ptr() as *mut c_void, - dest.len() as u32, - src as *const c_void, - ); + let len = unsafe { + generated::bpf_probe_read_str(dest.as_mut_ptr().cast(), dest.len() as u32, src.cast()) + }; let len = usize::try_from(len).map_err(|core::num::TryFromIntError { .. }| -1)?; // this can never happen, it's needed to tell the verifier that len is bounded. Ok(len.min(dest.len())) @@ -285,11 +271,12 @@ pub unsafe fn bpf_probe_read_str(src: *const u8, dest: &mut [u8]) -> Result Result<(), c_long> { /// # let user_ptr: *const u8 = 0 as _; /// let mut my_str = [0u8; 16]; +/// # #[expect(deprecated)] /// let num_read = unsafe { bpf_probe_read_user_str(user_ptr, &mut my_str)? }; /// /// // Do something with num_read and my_str @@ -303,11 +290,9 @@ pub unsafe fn bpf_probe_read_str(src: *const u8, dest: &mut [u8]) -> Result Result { - let len = gen::bpf_probe_read_user_str( - dest.as_mut_ptr() as *mut c_void, - dest.len() as u32, - src as *const c_void, - ); + let len = unsafe { + generated::bpf_probe_read_user_str(dest.as_mut_ptr().cast(), dest.len() as u32, src.cast()) + }; let len = usize::try_from(len).map_err(|core::num::TryFromIntError { .. }| -1)?; // this can never happen, it's needed to tell the verifier that len is bounded. Ok(len.min(dest.len())) @@ -326,7 +311,6 @@ pub unsafe fn bpf_probe_read_user_str(src: *const u8, dest: &mut [u8]) -> Result /// eBPF stack limit is 512 bytes): /// /// ```no_run -/// # #![allow(dead_code)] /// # use aya_ebpf::{cty::c_long, helpers::bpf_probe_read_user_str_bytes}; /// # fn try_test() -> Result<(), c_long> { /// # let user_ptr: *const u8 = 0 as _; @@ -350,7 +334,7 @@ pub unsafe fn bpf_probe_read_user_str(src: *const u8, dest: &mut [u8]) -> Result /// } /// /// #[map] -/// pub static mut BUF: PerCpuArray = PerCpuArray::with_max_entries(1, 0); +/// pub static BUF: PerCpuArray = PerCpuArray::with_max_entries(1, 0); /// /// # fn try_test() -> Result<(), c_long> { /// # let user_ptr: *const u8 = 0 as _; @@ -369,7 +353,6 @@ pub unsafe fn bpf_probe_read_user_str(src: *const u8, dest: &mut [u8]) -> Result /// [core::str::from_utf8_unchecked]: /// /// ```no_run -/// # #![allow(dead_code)] /// # use aya_ebpf::{cty::c_long, helpers::bpf_probe_read_user_str_bytes}; /// # use aya_ebpf::{macros::map, maps::PerCpuArray}; /// # #[repr(C)] @@ -377,7 +360,7 @@ pub unsafe fn bpf_probe_read_user_str(src: *const u8, dest: &mut [u8]) -> Result /// # pub buf: [u8; 4096], /// # } /// # #[map] -/// # pub static mut BUF: PerCpuArray = PerCpuArray::with_max_entries(1, 0); +/// # pub static BUF: PerCpuArray = PerCpuArray::with_max_entries(1, 0); /// # fn try_test() -> Result<(), c_long> { /// # let user_ptr: *const u8 = 0 as _; /// # let buf = unsafe { @@ -401,11 +384,9 @@ pub unsafe fn bpf_probe_read_user_str_bytes( src: *const u8, dest: &mut [u8], ) -> Result<&[u8], c_long> { - let len = gen::bpf_probe_read_user_str( - dest.as_mut_ptr() as *mut c_void, - dest.len() as u32, - src as *const c_void, - ); + let len = unsafe { + generated::bpf_probe_read_user_str(dest.as_mut_ptr().cast(), dest.len() as u32, src.cast()) + }; read_str_bytes(len, dest) } @@ -435,11 +416,12 @@ fn read_str_bytes(len: i64, dest: &[u8]) -> Result<&[u8], c_long> { /// # Examples /// /// ```no_run -/// # #![allow(dead_code)] +/// # #[expect(deprecated)] /// # use aya_ebpf::{cty::c_long, helpers::bpf_probe_read_kernel_str}; /// # fn try_test() -> Result<(), c_long> { /// # let kernel_ptr: *const u8 = 0 as _; /// let mut my_str = [0u8; 16]; +/// # #[expect(deprecated)] /// let num_read = unsafe { bpf_probe_read_kernel_str(kernel_ptr, &mut my_str)? }; /// /// // Do something with num_read and my_str @@ -453,11 +435,13 @@ fn read_str_bytes(len: i64, dest: &[u8]) -> Result<&[u8], c_long> { #[deprecated(note = "Use bpf_probe_read_kernel_str_bytes instead")] #[inline] pub unsafe fn bpf_probe_read_kernel_str(src: *const u8, dest: &mut [u8]) -> Result { - let len = gen::bpf_probe_read_kernel_str( - dest.as_mut_ptr() as *mut c_void, - dest.len() as u32, - src as *const c_void, - ); + let len = unsafe { + generated::bpf_probe_read_kernel_str( + dest.as_mut_ptr().cast(), + dest.len() as u32, + src.cast(), + ) + }; let len = usize::try_from(len).map_err(|core::num::TryFromIntError { .. }| -1)?; // this can never happen, it's needed to tell the verifier that len is bounded. Ok(len.min(dest.len())) @@ -476,7 +460,6 @@ pub unsafe fn bpf_probe_read_kernel_str(src: *const u8, dest: &mut [u8]) -> Resu /// eBPF stack limit is 512 bytes): /// /// ```no_run -/// # #![allow(dead_code)] /// # use aya_ebpf::{cty::c_long, helpers::bpf_probe_read_kernel_str_bytes}; /// # fn try_test() -> Result<(), c_long> { /// # let kernel_ptr: *const u8 = 0 as _; @@ -491,7 +474,6 @@ pub unsafe fn bpf_probe_read_kernel_str(src: *const u8, dest: &mut [u8]) -> Resu /// With a `PerCpuArray` (with size defined by us): /// /// ```no_run -/// # #![allow(dead_code)] /// # use aya_ebpf::{cty::c_long, helpers::bpf_probe_read_kernel_str_bytes}; /// use aya_ebpf::{macros::map, maps::PerCpuArray}; /// @@ -501,7 +483,7 @@ pub unsafe fn bpf_probe_read_kernel_str(src: *const u8, dest: &mut [u8]) -> Resu /// } /// /// #[map] -/// pub static mut BUF: PerCpuArray = PerCpuArray::with_max_entries(1, 0); +/// pub static BUF: PerCpuArray = PerCpuArray::with_max_entries(1, 0); /// /// # fn try_test() -> Result<(), c_long> { /// # let kernel_ptr: *const u8 = 0 as _; @@ -520,7 +502,6 @@ pub unsafe fn bpf_probe_read_kernel_str(src: *const u8, dest: &mut [u8]) -> Resu /// [core::str::from_utf8_unchecked]: /// /// ```no_run -/// # #![allow(dead_code)] /// # use aya_ebpf::{cty::c_long, helpers::bpf_probe_read_kernel_str_bytes}; /// # use aya_ebpf::{macros::map, maps::PerCpuArray}; /// # #[repr(C)] @@ -528,7 +509,7 @@ pub unsafe fn bpf_probe_read_kernel_str(src: *const u8, dest: &mut [u8]) -> Resu /// # pub buf: [u8; 4096], /// # } /// # #[map] -/// # pub static mut BUF: PerCpuArray = PerCpuArray::with_max_entries(1, 0); +/// # pub static BUF: PerCpuArray = PerCpuArray::with_max_entries(1, 0); /// # fn try_test() -> Result<(), c_long> { /// # let kernel_ptr: *const u8 = 0 as _; /// # let buf = unsafe { @@ -552,11 +533,13 @@ pub unsafe fn bpf_probe_read_kernel_str_bytes( src: *const u8, dest: &mut [u8], ) -> Result<&[u8], c_long> { - let len = gen::bpf_probe_read_kernel_str( - dest.as_mut_ptr() as *mut c_void, - dest.len() as u32, - src as *const c_void, - ); + let len = unsafe { + generated::bpf_probe_read_kernel_str( + dest.as_mut_ptr().cast(), + dest.len() as u32, + src.cast(), + ) + }; read_str_bytes(len, dest) } @@ -566,7 +549,6 @@ pub unsafe fn bpf_probe_read_kernel_str_bytes( /// # Examples /// /// ```no_run -/// # #![allow(dead_code)] /// # use aya_ebpf::{ /// # cty::{c_int, c_long}, /// # helpers::bpf_probe_write_user, @@ -587,16 +569,10 @@ pub unsafe fn bpf_probe_read_kernel_str_bytes( /// On failure, this function returns a negative value wrapped in an `Err`. #[inline] pub unsafe fn bpf_probe_write_user(dst: *mut T, src: *const T) -> Result<(), c_long> { - let ret = gen::bpf_probe_write_user( - dst as *mut c_void, - src as *const c_void, - mem::size_of::() as u32, - ); - if ret == 0 { - Ok(()) - } else { - Err(ret) - } + let ret = unsafe { + generated::bpf_probe_write_user(dst.cast(), src.cast(), mem::size_of::() as u32) + }; + if ret == 0 { Ok(()) } else { Err(ret) } } /// Read the `comm` field associated with the current task struct @@ -605,7 +581,6 @@ pub unsafe fn bpf_probe_write_user(dst: *mut T, src: *const T) -> Result<(), /// # Examples /// /// ```no_run -/// # #![allow(dead_code)] /// # use aya_ebpf::helpers::bpf_get_current_comm; /// let comm = bpf_get_current_comm(); /// @@ -618,12 +593,10 @@ pub unsafe fn bpf_probe_write_user(dst: *mut T, src: *const T) -> Result<(), #[inline] pub fn bpf_get_current_comm() -> Result<[u8; 16], c_long> { let mut comm: [u8; 16usize] = [0; 16]; - let ret = unsafe { gen::bpf_get_current_comm(&mut comm as *mut _ as *mut c_void, 16u32) }; - if ret == 0 { - Ok(comm) - } else { - Err(ret) - } + let ret = unsafe { + generated::bpf_get_current_comm(comm.as_mut_ptr().cast(), mem::size_of_val(&comm) as u32) + }; + if ret == 0 { Ok(comm) } else { Err(ret) } } /// Read the process id and thread group id associated with the current task struct as @@ -642,7 +615,6 @@ pub fn bpf_get_current_comm() -> Result<[u8; 16], c_long> { /// # Examples /// /// ```no_run -/// # #![allow(dead_code)] /// # use aya_ebpf::helpers::bpf_get_current_pid_tgid; /// let tgid = (bpf_get_current_pid_tgid() >> 32) as u32; /// let pid = bpf_get_current_pid_tgid() as u32; @@ -651,7 +623,7 @@ pub fn bpf_get_current_comm() -> Result<[u8; 16], c_long> { /// ``` #[inline] pub fn bpf_get_current_pid_tgid() -> u64 { - unsafe { gen::bpf_get_current_pid_tgid() } + unsafe { generated::bpf_get_current_pid_tgid() } } /// Read the user id and group id associated with the current task struct as @@ -665,7 +637,6 @@ pub fn bpf_get_current_pid_tgid() -> u64 { /// # Examples /// /// ```no_run -/// # #![allow(dead_code)] /// # use aya_ebpf::helpers::bpf_get_current_uid_gid; /// let gid = (bpf_get_current_uid_gid() >> 32) as u32; /// let uid = bpf_get_current_uid_gid() as u32; @@ -674,7 +645,7 @@ pub fn bpf_get_current_pid_tgid() -> u64 { /// ``` #[inline] pub fn bpf_get_current_uid_gid() -> u64 { - unsafe { gen::bpf_get_current_uid_gid() } + unsafe { generated::bpf_get_current_uid_gid() } } /// Prints a debug message to the BPF debugging pipe. @@ -749,8 +720,9 @@ macro_rules! impl_integer_promotion { /// Create `printk` arguments from integer types. impl From<$ty> for PrintkArg { #[inline] - fn from(x: $ty) -> PrintkArg { - PrintkArg((x as $via).to_ne_bytes()) + #[allow(trivial_numeric_casts)] + fn from(x: $ty) -> Self { + Self((x as $via).to_ne_bytes()) } } )*} @@ -774,7 +746,7 @@ impl_integer_promotion!( impl From<*const T> for PrintkArg { #[inline] fn from(x: *const T) -> Self { - PrintkArg((x as usize).to_ne_bytes()) + Self((x as usize).to_ne_bytes()) } } @@ -782,7 +754,7 @@ impl From<*const T> for PrintkArg { impl From<*mut T> for PrintkArg { #[inline] fn from(x: *mut T) -> Self { - PrintkArg((x as usize).to_ne_bytes()) + Self((x as usize).to_ne_bytes()) } } @@ -822,10 +794,10 @@ pub unsafe fn bpf_printk_impl( // arguments. We also can't turn the definitions in `helpers.rs` into // `const`s because MIRI believes casting arbitrary integers to function // pointers to be an error. - let printk: unsafe extern "C" fn(fmt: *const c_char, fmt_size: u32, ...) -> c_long = - mem::transmute(6usize); + let printk: extern "C" fn(fmt: *const c_char, fmt_size: u32, ...) -> c_long = + unsafe { mem::transmute(6usize) }; - let fmt_ptr = fmt.as_ptr() as *const c_char; + let fmt_ptr = fmt.as_ptr().cast(); let fmt_size = fmt.len() as u32; match NUM_ARGS { @@ -833,6 +805,33 @@ pub unsafe fn bpf_printk_impl( 1 => printk(fmt_ptr, fmt_size, args[0]), 2 => printk(fmt_ptr, fmt_size, args[0], args[1]), 3 => printk(fmt_ptr, fmt_size, args[0], args[1], args[2]), - _ => gen::bpf_trace_vprintk(fmt_ptr, fmt_size, args.as_ptr() as _, (NUM_ARGS * 8) as _), + _ => unsafe { + generated::bpf_trace_vprintk( + fmt_ptr, + fmt_size, + args.as_ptr().cast(), + (NUM_ARGS * 8) as u32, + ) + }, } } + +/// Compares the given byte `s1` with a [`&CStr`](core::ffi::CStr) `s2`. +/// +/// # Examples +/// +/// ```no_run +/// # use aya_ebpf::helpers::bpf_strncmp; +/// # let data = b"something"; +/// assert_ne!(bpf_strncmp(data, c"foo"), core::cmp::Ordering::Equal); +/// ``` +#[inline] +pub fn bpf_strncmp(s1: &[u8; N], s2: &CStr) -> Ordering { + // NB: s1 does not need to be null-terminated. + // + // See https://github.com/torvalds/linux/blob/adc218676/include/uapi/linux/bpf.h#L5391-L5393. + // + // NB: s1's size must be known at compile time to appease the verifier. This is also the typical + // usage of strncmp in C programs. + unsafe { generated::bpf_strncmp(s1.as_ptr().cast(), N as u32, s2.as_ptr().cast()) }.cmp(&0) +} diff --git a/ebpf/aya-ebpf/src/lib.rs b/ebpf/aya-ebpf/src/lib.rs index 04a4002e..b0e4e344 100644 --- a/ebpf/aya-ebpf/src/lib.rs +++ b/ebpf/aya-ebpf/src/lib.rs @@ -9,31 +9,38 @@ html_favicon_url = "https://aya-rs.dev/assets/images/crabby.svg" )] #![cfg_attr( - feature = "const_assert", - allow(incomplete_features), + generic_const_exprs, + expect(incomplete_features), + expect(unstable_features), feature(generic_const_exprs) )] -#![cfg_attr(unstable, feature(never_type))] -#![cfg_attr(target_arch = "bpf", feature(asm_experimental_arch))] -#![allow(clippy::missing_safety_doc)] -#![deny(warnings)] +#![cfg_attr( + target_arch = "bpf", + expect(unused_crate_dependencies, reason = "compiler_builtins"), + expect(unstable_features), + feature(asm_experimental_arch) +)] #![warn(clippy::cast_lossless, clippy::cast_sign_loss)] #![no_std] -pub use aya_ebpf_bindings::bindings; - mod args; -pub use args::PtRegs; +pub mod bindings; +pub use args::Argument; +pub mod btf_maps; +#[expect(clippy::missing_safety_doc)] pub mod helpers; pub mod maps; pub mod programs; -use core::ffi::c_void; +use core::ptr::{self, NonNull}; pub use aya_ebpf_cty as cty; pub use aya_ebpf_macros as macros; -use cty::{c_int, c_long}; -use helpers::{bpf_get_current_comm, bpf_get_current_pid_tgid, bpf_get_current_uid_gid}; +use cty::{c_long, c_void}; +use helpers::{ + bpf_get_current_comm, bpf_get_current_pid_tgid, bpf_get_current_uid_gid, bpf_map_delete_elem, + bpf_map_lookup_elem, bpf_map_update_elem, +}; pub const TASK_COMM_LEN: usize = 16; @@ -62,19 +69,47 @@ pub trait EbpfContext { } } -#[no_mangle] -pub unsafe extern "C" fn memset(s: *mut u8, c: c_int, n: usize) { - #[allow(clippy::cast_sign_loss)] - let b = c as u8; - for i in 0..n { - *s.add(i) = b; +mod intrinsics { + use super::cty::c_int; + + #[unsafe(no_mangle)] + unsafe extern "C" fn memset(s: *mut u8, c: c_int, n: usize) { + #[expect(clippy::cast_sign_loss)] + let b = c as u8; + for i in 0..n { + unsafe { *s.add(i) = b } + } } -} -#[no_mangle] -pub unsafe extern "C" fn memcpy(dest: *mut u8, src: *mut u8, n: usize) { - for i in 0..n { - *dest.add(i) = *src.add(i); + #[unsafe(no_mangle)] + unsafe extern "C" fn memcpy(dest: *mut u8, src: *mut u8, n: usize) { + unsafe { copy_forward(dest, src, n) } + } + + #[unsafe(no_mangle)] + unsafe extern "C" fn memmove(dest: *mut u8, src: *mut u8, n: usize) { + let delta = (dest as usize).wrapping_sub(src as usize); + if delta >= n { + // We can copy forwards because either dest is far enough ahead of src, + // or src is ahead of dest (and delta overflowed). + unsafe { copy_forward(dest, src, n) } + } else { + unsafe { copy_backward(dest, src, n) } + } + } + + #[inline(always)] + unsafe fn copy_forward(dest: *mut u8, src: *mut u8, n: usize) { + for i in 0..n { + unsafe { *dest.add(i) = *src.add(i) } + } + } + + #[inline(always)] + unsafe fn copy_backward(dest: *mut u8, src: *mut u8, n: usize) { + for i in (0..n).rev() { + unsafe { *dest.add(i) = *src.add(i) } + } } } @@ -105,3 +140,28 @@ pub fn check_bounds_signed(value: i64, lower: i64, upper: i64) -> bool { unimplemented!() } } + +#[inline] +fn insert(def: *mut c_void, key: &K, value: &V, flags: u64) -> Result<(), c_long> { + let key = ptr::from_ref(key); + let value = ptr::from_ref(value); + match unsafe { bpf_map_update_elem(def.cast(), key.cast(), value.cast(), flags) } { + 0 => Ok(()), + ret => Err(ret), + } +} + +#[inline] +fn remove(def: *mut c_void, key: &K) -> Result<(), c_long> { + let key = ptr::from_ref(key); + match unsafe { bpf_map_delete_elem(def.cast(), key.cast()) } { + 0 => Ok(()), + ret => Err(ret), + } +} + +#[inline] +fn lookup(def: *mut c_void, key: &K) -> Option> { + let key = ptr::from_ref(key); + NonNull::new(unsafe { bpf_map_lookup_elem(def.cast(), key.cast()) }.cast()) +} diff --git a/ebpf/aya-ebpf/src/maps/array.rs b/ebpf/aya-ebpf/src/maps/array.rs index a062ed5b..c9e98b1a 100644 --- a/ebpf/aya-ebpf/src/maps/array.rs +++ b/ebpf/aya-ebpf/src/maps/array.rs @@ -1,10 +1,10 @@ -use core::{cell::UnsafeCell, marker::PhantomData, mem, ptr::NonNull}; +use core::{borrow::Borrow, cell::UnsafeCell, marker::PhantomData, mem, ptr::NonNull}; -use aya_ebpf_cty::c_void; +use aya_ebpf_cty::c_long; use crate::{ bindings::{bpf_map_def, bpf_map_type::BPF_MAP_TYPE_ARRAY}, - helpers::bpf_map_lookup_elem, + insert, lookup, maps::PinningType, }; @@ -17,8 +17,8 @@ pub struct Array { unsafe impl Sync for Array {} impl Array { - pub const fn with_max_entries(max_entries: u32, flags: u32) -> Array { - Array { + pub const fn with_max_entries(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_ARRAY, key_size: mem::size_of::() as u32, @@ -32,8 +32,8 @@ impl Array { } } - pub const fn pinned(max_entries: u32, flags: u32) -> Array { - Array { + pub const fn pinned(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_ARRAY, key_size: mem::size_of::() as u32, @@ -49,13 +49,12 @@ impl Array { #[inline(always)] pub fn get(&self, index: u32) -> Option<&T> { - // FIXME: alignment unsafe { self.lookup(index).map(|p| p.as_ref()) } } #[inline(always)] pub fn get_ptr(&self, index: u32) -> Option<*const T> { - unsafe { self.lookup(index).map(|p| p.as_ptr() as *const T) } + unsafe { self.lookup(index).map(|p| p.as_ptr().cast_const()) } } #[inline(always)] @@ -65,10 +64,12 @@ impl Array { #[inline(always)] unsafe fn lookup(&self, index: u32) -> Option> { - let ptr = bpf_map_lookup_elem( - self.def.get() as *mut _, - &index as *const _ as *const c_void, - ); - NonNull::new(ptr as *mut T) + lookup(self.def.get().cast(), &index) + } + + /// Sets the value of the element at the given index. + #[inline(always)] + pub fn set(&self, index: u32, value: impl Borrow, flags: u64) -> Result<(), c_long> { + insert(self.def.get().cast(), &index, value.borrow(), flags) } } diff --git a/ebpf/aya-ebpf/src/maps/bloom_filter.rs b/ebpf/aya-ebpf/src/maps/bloom_filter.rs index 210a9a95..52e7cb45 100644 --- a/ebpf/aya-ebpf/src/maps/bloom_filter.rs +++ b/ebpf/aya-ebpf/src/maps/bloom_filter.rs @@ -1,6 +1,4 @@ -use core::{marker::PhantomData, mem}; - -use aya_ebpf_cty::c_void; +use core::{borrow::Borrow, marker::PhantomData, mem, ptr}; use crate::{ bindings::{bpf_map_def, bpf_map_type::BPF_MAP_TYPE_BLOOM_FILTER}, @@ -15,8 +13,8 @@ pub struct BloomFilter { } impl BloomFilter { - pub const fn with_max_entries(max_entries: u32, flags: u32) -> BloomFilter { - BloomFilter { + pub const fn with_max_entries(max_entries: u32, flags: u32) -> Self { + Self { def: build_def::( BPF_MAP_TYPE_BLOOM_FILTER, max_entries, @@ -27,8 +25,8 @@ impl BloomFilter { } } - pub const fn pinned(max_entries: u32, flags: u32) -> BloomFilter { - BloomFilter { + pub const fn pinned(max_entries: u32, flags: u32) -> Self { + Self { def: build_def::( BPF_MAP_TYPE_BLOOM_FILTER, max_entries, @@ -40,22 +38,22 @@ impl BloomFilter { } #[inline] - pub fn contains(&mut self, value: &T) -> Result<(), i64> { + pub fn contains(&mut self, value: impl Borrow) -> Result<(), i64> { let ret = unsafe { bpf_map_peek_elem( - &mut self.def as *mut _ as *mut _, - value as *const _ as *mut c_void, + ptr::from_ref(&self.def).cast_mut().cast(), + ptr::from_ref(value.borrow()).cast_mut().cast(), ) }; (ret == 0).then_some(()).ok_or(ret) } #[inline] - pub fn insert(&mut self, value: &T, flags: u64) -> Result<(), i64> { + pub fn insert(&mut self, value: impl Borrow, flags: u64) -> Result<(), i64> { let ret = unsafe { bpf_map_push_elem( - &mut self.def as *mut _ as *mut _, - value as *const _ as *const _, + ptr::from_ref(&self.def).cast_mut().cast(), + ptr::from_ref(value.borrow()).cast(), flags, ) }; diff --git a/ebpf/aya-ebpf/src/maps/hash_map.rs b/ebpf/aya-ebpf/src/maps/hash_map.rs index 765188dc..1b34ac03 100644 --- a/ebpf/aya-ebpf/src/maps/hash_map.rs +++ b/ebpf/aya-ebpf/src/maps/hash_map.rs @@ -1,14 +1,15 @@ -use core::{cell::UnsafeCell, marker::PhantomData, mem, ptr::NonNull}; +use core::{borrow::Borrow, cell::UnsafeCell, marker::PhantomData, mem}; use aya_ebpf_bindings::bindings::bpf_map_type::{ BPF_MAP_TYPE_LRU_HASH, BPF_MAP_TYPE_LRU_PERCPU_HASH, BPF_MAP_TYPE_PERCPU_HASH, }; -use aya_ebpf_cty::{c_long, c_void}; +use aya_ebpf_cty::c_long; use crate::{ bindings::{bpf_map_def, bpf_map_type::BPF_MAP_TYPE_HASH}, - helpers::{bpf_map_delete_elem, bpf_map_lookup_elem, bpf_map_update_elem}, + insert, lookup, maps::PinningType, + remove, }; #[repr(transparent)] @@ -21,8 +22,8 @@ pub struct HashMap { unsafe impl Sync for HashMap {} impl HashMap { - pub const fn with_max_entries(max_entries: u32, flags: u32) -> HashMap { - HashMap { + pub const fn with_max_entries(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(build_def::( BPF_MAP_TYPE_HASH, max_entries, @@ -34,8 +35,8 @@ impl HashMap { } } - pub const fn pinned(max_entries: u32, flags: u32) -> HashMap { - HashMap { + pub const fn pinned(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(build_def::( BPF_MAP_TYPE_HASH, max_entries, @@ -48,21 +49,23 @@ impl HashMap { } /// Retrieve the value associate with `key` from the map. - /// This function is unsafe. Unless the map flag `BPF_F_NO_PREALLOC` is used, the kernel does not - /// make guarantee on the atomicity of `insert` or `remove`, and any element removed from the - /// map might get aliased by another element in the map, causing garbage to be read, or - /// corruption in case of writes. + /// + /// # Safety + /// + /// Unless the map flag `BPF_F_NO_PREALLOC` is used, the kernel does not guarantee the atomicity + /// of `insert` or `remove`, and any element removed from the map might get aliased by another + /// element in the map, causing garbage to be read, or corruption in case of writes. #[inline] - pub unsafe fn get(&self, key: &K) -> Option<&V> { - get(self.def.get(), key) + pub unsafe fn get(&self, key: impl Borrow) -> Option<&V> { + unsafe { get(self.def.get(), key.borrow()) } } /// Retrieve the value associate with `key` from the map. /// The same caveat as `get` applies, but this returns a raw pointer and it's up to the caller /// to decide whether it's safe to dereference the pointer or not. #[inline] - pub fn get_ptr(&self, key: &K) -> Option<*const V> { - get_ptr(self.def.get(), key) + pub fn get_ptr(&self, key: impl Borrow) -> Option<*const V> { + get_ptr(self.def.get(), key.borrow()) } /// Retrieve the value associate with `key` from the map. @@ -70,18 +73,23 @@ impl HashMap { /// concurrent writes, but it's up to the caller to decide whether it's safe to dereference the /// pointer or not. #[inline] - pub fn get_ptr_mut(&self, key: &K) -> Option<*mut V> { - get_ptr_mut(self.def.get(), key) + pub fn get_ptr_mut(&self, key: impl Borrow) -> Option<*mut V> { + get_ptr_mut(self.def.get(), key.borrow()) } #[inline] - pub fn insert(&self, key: &K, value: &V, flags: u64) -> Result<(), c_long> { - insert(self.def.get(), key, value, flags) + pub fn insert( + &self, + key: impl Borrow, + value: impl Borrow, + flags: u64, + ) -> Result<(), c_long> { + insert(self.def.get().cast(), key.borrow(), value.borrow(), flags) } #[inline] - pub fn remove(&self, key: &K) -> Result<(), c_long> { - remove(self.def.get(), key) + pub fn remove(&self, key: impl Borrow) -> Result<(), c_long> { + remove(self.def.get().cast(), key.borrow()) } } @@ -95,8 +103,8 @@ pub struct LruHashMap { unsafe impl Sync for LruHashMap {} impl LruHashMap { - pub const fn with_max_entries(max_entries: u32, flags: u32) -> LruHashMap { - LruHashMap { + pub const fn with_max_entries(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(build_def::( BPF_MAP_TYPE_LRU_HASH, max_entries, @@ -108,8 +116,8 @@ impl LruHashMap { } } - pub const fn pinned(max_entries: u32, flags: u32) -> LruHashMap { - LruHashMap { + pub const fn pinned(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(build_def::( BPF_MAP_TYPE_LRU_HASH, max_entries, @@ -122,21 +130,23 @@ impl LruHashMap { } /// Retrieve the value associate with `key` from the map. - /// This function is unsafe. Unless the map flag `BPF_F_NO_PREALLOC` is used, the kernel does not - /// make guarantee on the atomicity of `insert` or `remove`, and any element removed from the - /// map might get aliased by another element in the map, causing garbage to be read, or - /// corruption in case of writes. + /// + /// # Safety + /// + /// Unless the map flag `BPF_F_NO_PREALLOC` is used, the kernel does not guarantee the atomicity + /// of `insert` or `remove`, and any element removed from the map might get aliased by another + /// element in the map, causing garbage to be read, or corruption in case of writes. #[inline] - pub unsafe fn get(&self, key: &K) -> Option<&V> { - get(self.def.get(), key) + pub unsafe fn get(&self, key: impl Borrow) -> Option<&V> { + unsafe { get(self.def.get(), key.borrow()) } } /// Retrieve the value associate with `key` from the map. /// The same caveat as `get` applies, but this returns a raw pointer and it's up to the caller /// to decide whether it's safe to dereference the pointer or not. #[inline] - pub fn get_ptr(&self, key: &K) -> Option<*const V> { - get_ptr(self.def.get(), key) + pub fn get_ptr(&self, key: impl Borrow) -> Option<*const V> { + get_ptr(self.def.get(), key.borrow()) } /// Retrieve the value associate with `key` from the map. @@ -144,18 +154,23 @@ impl LruHashMap { /// concurrent writes, but it's up to the caller to decide whether it's safe to dereference the /// pointer or not. #[inline] - pub fn get_ptr_mut(&self, key: &K) -> Option<*mut V> { - get_ptr_mut(self.def.get(), key) + pub fn get_ptr_mut(&self, key: impl Borrow) -> Option<*mut V> { + get_ptr_mut(self.def.get(), key.borrow()) } #[inline] - pub fn insert(&self, key: &K, value: &V, flags: u64) -> Result<(), c_long> { - insert(self.def.get(), key, value, flags) + pub fn insert( + &self, + key: impl Borrow, + value: impl Borrow, + flags: u64, + ) -> Result<(), c_long> { + insert(self.def.get().cast(), key.borrow(), value.borrow(), flags) } #[inline] - pub fn remove(&self, key: &K) -> Result<(), c_long> { - remove(self.def.get(), key) + pub fn remove(&self, key: impl Borrow) -> Result<(), c_long> { + remove(self.def.get().cast(), key.borrow()) } } @@ -169,8 +184,8 @@ pub struct PerCpuHashMap { unsafe impl Sync for PerCpuHashMap {} impl PerCpuHashMap { - pub const fn with_max_entries(max_entries: u32, flags: u32) -> PerCpuHashMap { - PerCpuHashMap { + pub const fn with_max_entries(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(build_def::( BPF_MAP_TYPE_PERCPU_HASH, max_entries, @@ -182,8 +197,8 @@ impl PerCpuHashMap { } } - pub const fn pinned(max_entries: u32, flags: u32) -> PerCpuHashMap { - PerCpuHashMap { + pub const fn pinned(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(build_def::( BPF_MAP_TYPE_PERCPU_HASH, max_entries, @@ -196,21 +211,23 @@ impl PerCpuHashMap { } /// Retrieve the value associate with `key` from the map. - /// This function is unsafe. Unless the map flag `BPF_F_NO_PREALLOC` is used, the kernel does not - /// make guarantee on the atomicity of `insert` or `remove`, and any element removed from the - /// map might get aliased by another element in the map, causing garbage to be read, or - /// corruption in case of writes. + /// + /// # Safety + /// + /// Unless the map flag `BPF_F_NO_PREALLOC` is used, the kernel does not guarantee the atomicity + /// of `insert` or `remove`, and any element removed from the map might get aliased by another + /// element in the map, causing garbage to be read, or corruption in case of writes. #[inline] - pub unsafe fn get(&self, key: &K) -> Option<&V> { - get(self.def.get(), key) + pub unsafe fn get(&self, key: impl Borrow) -> Option<&V> { + unsafe { get(self.def.get(), key.borrow()) } } /// Retrieve the value associate with `key` from the map. /// The same caveat as `get` applies, but this returns a raw pointer and it's up to the caller /// to decide whether it's safe to dereference the pointer or not. #[inline] - pub fn get_ptr(&self, key: &K) -> Option<*const V> { - get_ptr(self.def.get(), key) + pub fn get_ptr(&self, key: impl Borrow) -> Option<*const V> { + get_ptr(self.def.get(), key.borrow()) } /// Retrieve the value associate with `key` from the map. @@ -218,18 +235,23 @@ impl PerCpuHashMap { /// concurrent writes, but it's up to the caller to decide whether it's safe to dereference the /// pointer or not. #[inline] - pub fn get_ptr_mut(&self, key: &K) -> Option<*mut V> { - get_ptr_mut(self.def.get(), key) + pub fn get_ptr_mut(&self, key: impl Borrow) -> Option<*mut V> { + get_ptr_mut(self.def.get(), key.borrow()) } #[inline] - pub fn insert(&self, key: &K, value: &V, flags: u64) -> Result<(), c_long> { - insert(self.def.get(), key, value, flags) + pub fn insert( + &self, + key: impl Borrow, + value: impl Borrow, + flags: u64, + ) -> Result<(), c_long> { + insert(self.def.get().cast(), key.borrow(), value.borrow(), flags) } #[inline] - pub fn remove(&self, key: &K) -> Result<(), c_long> { - remove(self.def.get(), key) + pub fn remove(&self, key: impl Borrow) -> Result<(), c_long> { + remove(self.def.get().cast(), key.borrow()) } } @@ -243,8 +265,8 @@ pub struct LruPerCpuHashMap { unsafe impl Sync for LruPerCpuHashMap {} impl LruPerCpuHashMap { - pub const fn with_max_entries(max_entries: u32, flags: u32) -> LruPerCpuHashMap { - LruPerCpuHashMap { + pub const fn with_max_entries(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(build_def::( BPF_MAP_TYPE_LRU_PERCPU_HASH, max_entries, @@ -256,8 +278,8 @@ impl LruPerCpuHashMap { } } - pub const fn pinned(max_entries: u32, flags: u32) -> LruPerCpuHashMap { - LruPerCpuHashMap { + pub const fn pinned(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(build_def::( BPF_MAP_TYPE_LRU_PERCPU_HASH, max_entries, @@ -270,21 +292,23 @@ impl LruPerCpuHashMap { } /// Retrieve the value associate with `key` from the map. - /// This function is unsafe. Unless the map flag `BPF_F_NO_PREALLOC` is used, the kernel does not - /// make guarantee on the atomicity of `insert` or `remove`, and any element removed from the - /// map might get aliased by another element in the map, causing garbage to be read, or - /// corruption in case of writes. + /// + /// # Safety + /// + /// Unless the map flag `BPF_F_NO_PREALLOC` is used, the kernel does not guarantee the atomicity + /// of `insert` or `remove`, and any element removed from the map might get aliased by another + /// element in the map, causing garbage to be read, or corruption in case of writes. #[inline] - pub unsafe fn get(&self, key: &K) -> Option<&V> { - get(self.def.get(), key) + pub unsafe fn get(&self, key: impl Borrow) -> Option<&V> { + unsafe { get(self.def.get(), key.borrow()) } } /// Retrieve the value associate with `key` from the map. /// The same caveat as `get` applies, but this returns a raw pointer and it's up to the caller /// to decide whether it's safe to dereference the pointer or not. #[inline] - pub fn get_ptr(&self, key: &K) -> Option<*const V> { - get_ptr(self.def.get(), key) + pub fn get_ptr(&self, key: impl Borrow) -> Option<*const V> { + get_ptr(self.def.get(), key.borrow()) } /// Retrieve the value associate with `key` from the map. @@ -292,18 +316,23 @@ impl LruPerCpuHashMap { /// concurrent writes, but it's up to the caller to decide whether it's safe to dereference the /// pointer or not. #[inline] - pub fn get_ptr_mut(&self, key: &K) -> Option<*mut V> { - get_ptr_mut(self.def.get(), key) + pub fn get_ptr_mut(&self, key: impl Borrow) -> Option<*mut V> { + get_ptr_mut(self.def.get(), key.borrow()) } #[inline] - pub fn insert(&self, key: &K, value: &V, flags: u64) -> Result<(), c_long> { - insert(self.def.get(), key, value, flags) + pub fn insert( + &self, + key: impl Borrow, + value: impl Borrow, + flags: u64, + ) -> Result<(), c_long> { + insert(self.def.get().cast(), key.borrow(), value.borrow(), flags) } #[inline] - pub fn remove(&self, key: &K) -> Result<(), c_long> { - remove(self.def.get(), key) + pub fn remove(&self, key: impl Borrow) -> Result<(), c_long> { + remove(self.def.get().cast(), key.borrow()) } } @@ -319,40 +348,17 @@ const fn build_def(ty: u32, max_entries: u32, flags: u32, pin: PinningType } } -#[inline] -fn get_ptr_mut(def: *mut bpf_map_def, key: &K) -> Option<*mut V> { - unsafe { - let value = bpf_map_lookup_elem(def as *mut _, key as *const _ as *const c_void); - // FIXME: alignment - NonNull::new(value as *mut V).map(|p| p.as_ptr()) - } -} - -#[inline] -fn get_ptr(def: *mut bpf_map_def, key: &K) -> Option<*const V> { - get_ptr_mut(def, key).map(|p| p as *const V) -} - #[inline] unsafe fn get<'a, K, V>(def: *mut bpf_map_def, key: &K) -> Option<&'a V> { - get_ptr(def, key).map(|p| &*p) + get_ptr(def, key).map(|p| unsafe { &*p }) } #[inline] -fn insert(def: *mut bpf_map_def, key: &K, value: &V, flags: u64) -> Result<(), c_long> { - let ret = unsafe { - bpf_map_update_elem( - def as *mut _, - key as *const _ as *const _, - value as *const _ as *const _, - flags, - ) - }; - (ret == 0).then_some(()).ok_or(ret) +fn get_ptr_mut(def: *mut bpf_map_def, key: &K) -> Option<*mut V> { + lookup(def.cast(), key).map(|p| p.as_ptr()) } #[inline] -fn remove(def: *mut bpf_map_def, key: &K) -> Result<(), c_long> { - let ret = unsafe { bpf_map_delete_elem(def as *mut _, key as *const _ as *const c_void) }; - (ret == 0).then_some(()).ok_or(ret) +fn get_ptr(def: *mut bpf_map_def, key: &K) -> Option<*const V> { + lookup::<_, V>(def.cast(), key).map(|p| p.as_ptr().cast_const()) } diff --git a/ebpf/aya-ebpf/src/maps/lpm_trie.rs b/ebpf/aya-ebpf/src/maps/lpm_trie.rs index 16f94726..b86f7d60 100644 --- a/ebpf/aya-ebpf/src/maps/lpm_trie.rs +++ b/ebpf/aya-ebpf/src/maps/lpm_trie.rs @@ -1,12 +1,13 @@ -use core::{cell::UnsafeCell, marker::PhantomData, mem, ptr::NonNull}; +use core::{borrow::Borrow, cell::UnsafeCell, marker::PhantomData, mem}; use aya_ebpf_bindings::bindings::BPF_F_NO_PREALLOC; -use aya_ebpf_cty::{c_long, c_void}; +use aya_ebpf_cty::c_long; use crate::{ bindings::{bpf_map_def, bpf_map_type::BPF_MAP_TYPE_LPM_TRIE}, - helpers::{bpf_map_delete_elem, bpf_map_lookup_elem, bpf_map_update_elem}, + insert, lookup, maps::PinningType, + remove, }; #[repr(transparent)] @@ -18,7 +19,7 @@ pub struct LpmTrie { unsafe impl Sync for LpmTrie {} -#[repr(packed)] +#[repr(C, packed)] pub struct Key { /// Represents the number of bits matched against. pub prefix_len: u32, @@ -33,9 +34,9 @@ impl Key { } impl LpmTrie { - pub const fn with_max_entries(max_entries: u32, flags: u32) -> LpmTrie { + pub const fn with_max_entries(max_entries: u32, flags: u32) -> Self { let flags = flags | BPF_F_NO_PREALLOC; - LpmTrie { + Self { def: UnsafeCell::new(build_def::( BPF_MAP_TYPE_LPM_TRIE, max_entries, @@ -47,9 +48,9 @@ impl LpmTrie { } } - pub const fn pinned(max_entries: u32, flags: u32) -> LpmTrie { + pub const fn pinned(max_entries: u32, flags: u32) -> Self { let flags = flags | BPF_F_NO_PREALLOC; - LpmTrie { + Self { def: UnsafeCell::new(build_def::( BPF_MAP_TYPE_LPM_TRIE, max_entries, @@ -62,34 +63,23 @@ impl LpmTrie { } #[inline] - pub fn get(&self, key: &Key) -> Option<&V> { - unsafe { - let value = - bpf_map_lookup_elem(self.def.get() as *mut _, key as *const _ as *const c_void); - // FIXME: alignment - NonNull::new(value as *mut V).map(|p| p.as_ref()) - } + pub fn get(&self, key: impl Borrow>) -> Option<&V> { + lookup(self.def.get().cast(), key.borrow()).map(|p| unsafe { p.as_ref() }) } #[inline] - pub fn insert(&self, key: &Key, value: &V, flags: u64) -> Result<(), c_long> { - let ret = unsafe { - bpf_map_update_elem( - self.def.get() as *mut _, - key as *const _ as *const _, - value as *const _ as *const _, - flags, - ) - }; - (ret == 0).then_some(()).ok_or(ret) + pub fn insert( + &self, + key: impl Borrow>, + value: impl Borrow, + flags: u64, + ) -> Result<(), c_long> { + insert(self.def.get().cast(), key.borrow(), value.borrow(), flags) } #[inline] - pub fn remove(&self, key: &Key) -> Result<(), c_long> { - let ret = unsafe { - bpf_map_delete_elem(self.def.get() as *mut _, key as *const _ as *const c_void) - }; - (ret == 0).then_some(()).ok_or(ret) + pub fn remove(&self, key: impl Borrow>) -> Result<(), c_long> { + remove(self.def.get().cast(), key.borrow()) } } diff --git a/ebpf/aya-ebpf/src/maps/per_cpu_array.rs b/ebpf/aya-ebpf/src/maps/per_cpu_array.rs index f353d50f..c1837859 100644 --- a/ebpf/aya-ebpf/src/maps/per_cpu_array.rs +++ b/ebpf/aya-ebpf/src/maps/per_cpu_array.rs @@ -1,10 +1,8 @@ use core::{cell::UnsafeCell, marker::PhantomData, mem, ptr::NonNull}; -use aya_ebpf_cty::c_void; - use crate::{ bindings::{bpf_map_def, bpf_map_type::BPF_MAP_TYPE_PERCPU_ARRAY}, - helpers::bpf_map_lookup_elem, + lookup, maps::PinningType, }; @@ -17,8 +15,8 @@ pub struct PerCpuArray { unsafe impl Sync for PerCpuArray {} impl PerCpuArray { - pub const fn with_max_entries(max_entries: u32, flags: u32) -> PerCpuArray { - PerCpuArray { + pub const fn with_max_entries(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_PERCPU_ARRAY, key_size: mem::size_of::() as u32, @@ -32,8 +30,8 @@ impl PerCpuArray { } } - pub const fn pinned(max_entries: u32, flags: u32) -> PerCpuArray { - PerCpuArray { + pub const fn pinned(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_PERCPU_ARRAY, key_size: mem::size_of::() as u32, @@ -57,7 +55,7 @@ impl PerCpuArray { #[inline(always)] pub fn get_ptr(&self, index: u32) -> Option<*const T> { - unsafe { self.lookup(index).map(|p| p.as_ptr() as *const T) } + unsafe { self.lookup(index).map(|p| p.as_ptr().cast_const()) } } #[inline(always)] @@ -67,10 +65,6 @@ impl PerCpuArray { #[inline(always)] unsafe fn lookup(&self, index: u32) -> Option> { - let ptr = bpf_map_lookup_elem( - self.def.get() as *mut _, - &index as *const _ as *const c_void, - ); - NonNull::new(ptr as *mut T) + lookup(self.def.get().cast(), &index) } } diff --git a/ebpf/aya-ebpf/src/maps/perf/perf_event_array.rs b/ebpf/aya-ebpf/src/maps/perf/perf_event_array.rs index 6d0e51e8..3dd61b30 100644 --- a/ebpf/aya-ebpf/src/maps/perf/perf_event_array.rs +++ b/ebpf/aya-ebpf/src/maps/perf/perf_event_array.rs @@ -1,10 +1,10 @@ -use core::{cell::UnsafeCell, marker::PhantomData, mem}; +use core::{borrow::Borrow, cell::UnsafeCell, marker::PhantomData, mem, ptr}; use crate::{ - bindings::{bpf_map_def, bpf_map_type::BPF_MAP_TYPE_PERF_EVENT_ARRAY, BPF_F_CURRENT_CPU}, + EbpfContext, + bindings::{BPF_F_CURRENT_CPU, bpf_map_def, bpf_map_type::BPF_MAP_TYPE_PERF_EVENT_ARRAY}, helpers::bpf_perf_event_output, maps::PinningType, - EbpfContext, }; #[repr(transparent)] @@ -16,17 +16,13 @@ pub struct PerfEventArray { unsafe impl Sync for PerfEventArray {} impl PerfEventArray { - pub const fn new(flags: u32) -> PerfEventArray { - PerfEventArray::with_max_entries(0, flags) - } - - pub const fn with_max_entries(max_entries: u32, flags: u32) -> PerfEventArray { - PerfEventArray { + pub const fn new(flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_PERF_EVENT_ARRAY, key_size: mem::size_of::() as u32, value_size: mem::size_of::() as u32, - max_entries, + max_entries: 0, map_flags: flags, id: 0, pinning: PinningType::None as u32, @@ -35,13 +31,13 @@ impl PerfEventArray { } } - pub const fn pinned(max_entries: u32, flags: u32) -> PerfEventArray { - PerfEventArray { + pub const fn pinned(flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_PERF_EVENT_ARRAY, key_size: mem::size_of::() as u32, value_size: mem::size_of::() as u32, - max_entries, + max_entries: 0, map_flags: flags, id: 0, pinning: PinningType::ByName as u32, @@ -50,19 +46,26 @@ impl PerfEventArray { } } - pub fn output(&self, ctx: &C, data: &T, flags: u32) { + pub fn output(&self, ctx: &C, data: impl Borrow, flags: u32) { self.output_at_index(ctx, BPF_F_CURRENT_CPU as u32, data, flags) } - pub fn output_at_index(&self, ctx: &C, index: u32, data: &T, flags: u32) { - let flags = u64::from(flags) << 32 | u64::from(index); + pub fn output_at_index( + &self, + ctx: &C, + index: u32, + data: impl Borrow, + flags: u32, + ) { + let data = data.borrow(); + let flags = (u64::from(flags) << 32) | u64::from(index); unsafe { bpf_perf_event_output( ctx.as_ptr(), - self.def.get() as *mut _, + self.def.get().cast(), flags, - data as *const _ as *mut _, - mem::size_of::() as u64, + ptr::from_ref(data).cast_mut().cast(), + mem::size_of_val(data) as u64, ); } } diff --git a/ebpf/aya-ebpf/src/maps/perf/perf_event_byte_array.rs b/ebpf/aya-ebpf/src/maps/perf/perf_event_byte_array.rs index f7cf75cf..ba85799c 100644 --- a/ebpf/aya-ebpf/src/maps/perf/perf_event_byte_array.rs +++ b/ebpf/aya-ebpf/src/maps/perf/perf_event_byte_array.rs @@ -1,10 +1,10 @@ use core::{cell::UnsafeCell, mem}; use crate::{ - bindings::{bpf_map_def, bpf_map_type::BPF_MAP_TYPE_PERF_EVENT_ARRAY, BPF_F_CURRENT_CPU}, + EbpfContext, + bindings::{BPF_F_CURRENT_CPU, bpf_map_def, bpf_map_type::BPF_MAP_TYPE_PERF_EVENT_ARRAY}, helpers::bpf_perf_event_output, maps::PinningType, - EbpfContext, }; #[repr(transparent)] @@ -15,17 +15,13 @@ pub struct PerfEventByteArray { unsafe impl Sync for PerfEventByteArray {} impl PerfEventByteArray { - pub const fn new(flags: u32) -> PerfEventByteArray { - PerfEventByteArray::with_max_entries(0, flags) - } - - pub const fn with_max_entries(max_entries: u32, flags: u32) -> PerfEventByteArray { - PerfEventByteArray { + pub const fn new(flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_PERF_EVENT_ARRAY, key_size: mem::size_of::() as u32, value_size: mem::size_of::() as u32, - max_entries, + max_entries: 0, map_flags: flags, id: 0, pinning: PinningType::None as u32, @@ -33,13 +29,13 @@ impl PerfEventByteArray { } } - pub const fn pinned(max_entries: u32, flags: u32) -> PerfEventByteArray { - PerfEventByteArray { + pub const fn pinned(flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_PERF_EVENT_ARRAY, key_size: mem::size_of::() as u32, value_size: mem::size_of::() as u32, - max_entries, + max_entries: 0, map_flags: flags, id: 0, pinning: PinningType::ByName as u32, @@ -52,13 +48,13 @@ impl PerfEventByteArray { } pub fn output_at_index(&self, ctx: &C, index: u32, data: &[u8], flags: u32) { - let flags = u64::from(flags) << 32 | u64::from(index); + let flags = (u64::from(flags) << 32) | u64::from(index); unsafe { bpf_perf_event_output( ctx.as_ptr(), - self.def.get() as *mut _, + self.def.get().cast(), flags, - data.as_ptr() as *mut _, + data.as_ptr().cast_mut().cast(), data.len() as u64, ); } diff --git a/ebpf/aya-ebpf/src/maps/program_array.rs b/ebpf/aya-ebpf/src/maps/program_array.rs index 786b98a7..8241eed2 100644 --- a/ebpf/aya-ebpf/src/maps/program_array.rs +++ b/ebpf/aya-ebpf/src/maps/program_array.rs @@ -3,10 +3,10 @@ use core::{cell::UnsafeCell, hint::unreachable_unchecked, mem}; use aya_ebpf_cty::c_long; use crate::{ + EbpfContext, bindings::{bpf_map_def, bpf_map_type::BPF_MAP_TYPE_PROG_ARRAY}, helpers::bpf_tail_call, maps::PinningType, - EbpfContext, }; /// A BPF map that stores an array of program indices for tail calling. @@ -14,7 +14,6 @@ use crate::{ /// # Examples /// /// ```no_run -/// # #![allow(dead_code)] /// use aya_ebpf::{macros::map, maps::ProgramArray, cty::c_long}; /// # use aya_ebpf::{programs::LsmContext}; /// @@ -24,8 +23,8 @@ use crate::{ /// # unsafe fn try_test(ctx: &LsmContext) -> Result<(), c_long> { /// let index: u32 = 13; /// -/// if let Err(e) = JUMP_TABLE.tail_call(ctx, index) { -/// return Err(e); +/// unsafe { +/// JUMP_TABLE.tail_call(ctx, index)?; /// } /// /// # Err(-1) @@ -39,8 +38,8 @@ pub struct ProgramArray { unsafe impl Sync for ProgramArray {} impl ProgramArray { - pub const fn with_max_entries(max_entries: u32, flags: u32) -> ProgramArray { - ProgramArray { + pub const fn with_max_entries(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_PROG_ARRAY, key_size: mem::size_of::() as u32, @@ -53,8 +52,8 @@ impl ProgramArray { } } - pub const fn pinned(max_entries: u32, flags: u32) -> ProgramArray { - ProgramArray { + pub const fn pinned(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_PROG_ARRAY, key_size: mem::size_of::() as u32, @@ -80,36 +79,16 @@ impl ProgramArray { /// /// On success, this function **does not return** into the original program. /// On failure, a negative error is returned, wrapped in `Err()`. - #[cfg(not(unstable))] - pub unsafe fn tail_call(&self, ctx: &C, index: u32) -> Result<(), c_long> { - let res = bpf_tail_call(ctx.as_ptr(), self.def.get() as *mut _, index); - if res != 0 { - Err(res) - } else { - unreachable_unchecked() - } - } - - /// Perform a tail call into a program indexed by this map. - /// - /// # Safety - /// - /// This function is inherently unsafe, since it causes control flow to jump into - /// another eBPF program. This can have side effects, such as drop methods not being - /// called. Note that tail calling into an eBPF program is not the same thing as - /// a function call -- control flow never returns to the caller. - /// - /// # Return Value - /// - /// On success, this function **does not return** into the original program. - /// On failure, a negative error is returned, wrapped in `Err()`. - #[cfg(unstable)] - pub unsafe fn tail_call(&self, ctx: &C, index: u32) -> Result { - let res = bpf_tail_call(ctx.as_ptr(), self.def.get() as *mut _, index); + pub unsafe fn tail_call( + &self, + ctx: &C, + index: u32, + ) -> Result { + let res = unsafe { bpf_tail_call(ctx.as_ptr(), self.def.get().cast(), index) }; if res != 0 { Err(res) } else { - unreachable_unchecked() + unsafe { unreachable_unchecked() } } } } diff --git a/ebpf/aya-ebpf/src/maps/queue.rs b/ebpf/aya-ebpf/src/maps/queue.rs index 8c8f0bb1..596905b8 100644 --- a/ebpf/aya-ebpf/src/maps/queue.rs +++ b/ebpf/aya-ebpf/src/maps/queue.rs @@ -1,8 +1,8 @@ -use core::{cell::UnsafeCell, marker::PhantomData, mem}; +use core::{borrow::Borrow, cell::UnsafeCell, marker::PhantomData, mem, ptr}; use crate::{ bindings::{bpf_map_def, bpf_map_type::BPF_MAP_TYPE_QUEUE}, - helpers::{bpf_map_pop_elem, bpf_map_push_elem}, + helpers::{bpf_map_peek_elem, bpf_map_pop_elem, bpf_map_push_elem}, maps::PinningType, }; @@ -15,8 +15,8 @@ pub struct Queue { unsafe impl Sync for Queue {} impl Queue { - pub const fn with_max_entries(max_entries: u32, flags: u32) -> Queue { - Queue { + pub const fn with_max_entries(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_QUEUE, key_size: 0, @@ -30,8 +30,8 @@ impl Queue { } } - pub const fn pinned(max_entries: u32, flags: u32) -> Queue { - Queue { + pub const fn pinned(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_QUEUE, key_size: 0, @@ -45,11 +45,11 @@ impl Queue { } } - pub fn push(&self, value: &T, flags: u64) -> Result<(), i64> { + pub fn push(&self, value: impl Borrow, flags: u64) -> Result<(), i64> { let ret = unsafe { bpf_map_push_elem( - self.def.get() as *mut _, - value as *const _ as *const _, + self.def.get().cast(), + ptr::from_ref(value.borrow()).cast(), flags, ) }; @@ -58,8 +58,16 @@ impl Queue { pub fn pop(&self) -> Option { unsafe { - let mut value = mem::MaybeUninit::uninit(); - let ret = bpf_map_pop_elem(self.def.get() as *mut _, value.as_mut_ptr() as *mut _); + let mut value = mem::MaybeUninit::::uninit(); + let ret = bpf_map_pop_elem(self.def.get().cast(), value.as_mut_ptr().cast()); + (ret == 0).then_some(value.assume_init()) + } + } + + pub fn peek(&self) -> Option { + unsafe { + let mut value = mem::MaybeUninit::::uninit(); + let ret = bpf_map_peek_elem(self.def.get().cast(), value.as_mut_ptr().cast()); (ret == 0).then_some(value.assume_init()) } } diff --git a/ebpf/aya-ebpf/src/maps/ring_buf.rs b/ebpf/aya-ebpf/src/maps/ring_buf.rs index ee544efe..873462be 100644 --- a/ebpf/aya-ebpf/src/maps/ring_buf.rs +++ b/ebpf/aya-ebpf/src/maps/ring_buf.rs @@ -1,13 +1,11 @@ use core::{ + borrow::Borrow, cell::UnsafeCell, mem, mem::MaybeUninit, ops::{Deref, DerefMut}, }; -#[cfg(feature = "const_assert")] -use const_assert::{Assert, IsTrue}; - use crate::{ bindings::{bpf_map_def, bpf_map_type::BPF_MAP_TYPE_RINGBUF}, helpers::{ @@ -17,6 +15,17 @@ use crate::{ maps::PinningType, }; +#[cfg(generic_const_exprs)] +mod const_assert { + pub struct Assert {} + + pub trait IsTrue {} + + impl IsTrue for Assert {} +} +#[cfg(generic_const_exprs)] +use const_assert::{Assert, IsTrue}; + #[repr(transparent)] pub struct RingBuf { def: UnsafeCell, @@ -24,6 +33,45 @@ pub struct RingBuf { unsafe impl Sync for RingBuf {} +/// A ring buffer entry, returned from [`RingBuf::reserve_bytes`]. +/// +/// You must [`submit`] or [`discard`] this entry before it gets dropped. +/// +/// [`submit`]: RingBufBytes::submit +/// [`discard`]: RingBufBytes::discard +#[must_use = "eBPF verifier requires ring buffer entries to be either submitted or discarded"] +pub struct RingBufBytes<'a>(&'a mut [u8]); + +impl Deref for RingBufBytes<'_> { + type Target = [u8]; + + fn deref(&self) -> &Self::Target { + let Self(inner) = self; + inner + } +} + +impl DerefMut for RingBufBytes<'_> { + fn deref_mut(&mut self) -> &mut Self::Target { + let Self(inner) = self; + inner + } +} + +impl RingBufBytes<'_> { + /// Commit this ring buffer entry. The entry will be made visible to the userspace reader. + pub fn submit(self, flags: u64) { + let Self(inner) = self; + unsafe { bpf_ringbuf_submit(inner.as_mut_ptr().cast(), flags) }; + } + + /// Discard this ring buffer entry. The entry will be skipped by the userspace reader. + pub fn discard(self, flags: u64) { + let Self(inner) = self; + unsafe { bpf_ringbuf_discard(inner.as_mut_ptr().cast(), flags) }; + } +} + /// A ring buffer entry, returned from [`RingBuf::reserve`]. /// /// You must [`submit`] or [`discard`] this entry before it gets dropped. @@ -37,25 +85,29 @@ impl Deref for RingBufEntry { type Target = MaybeUninit; fn deref(&self) -> &Self::Target { - self.0 + let Self(inner) = self; + inner } } impl DerefMut for RingBufEntry { fn deref_mut(&mut self) -> &mut Self::Target { - self.0 + let Self(inner) = self; + inner } } impl RingBufEntry { /// Discard this ring buffer entry. The entry will be skipped by the userspace reader. pub fn discard(self, flags: u64) { - unsafe { bpf_ringbuf_discard(self.0.as_mut_ptr() as *mut _, flags) }; + let Self(inner) = self; + unsafe { bpf_ringbuf_discard(inner.as_mut_ptr().cast(), flags) }; } /// Commit this ring buffer entry. The entry will be made visible to the userspace reader. pub fn submit(self, flags: u64) { - unsafe { bpf_ringbuf_submit(self.0.as_mut_ptr() as *mut _, flags) }; + let Self(inner) = self; + unsafe { bpf_ringbuf_submit(inner.as_mut_ptr().cast(), flags) }; } } @@ -90,10 +142,26 @@ impl RingBuf { } } + /// Reserve a dynamically sized byte buffer in the ring buffer. + /// + /// Returns `None` if the ring buffer is full. + /// + /// Note that using this method requires care; the verifier does not allow truly dynamic + /// allocation sizes. In other words, it is incumbent upon users of this function to convince + /// the verifier that `size` is a compile-time constant. Good luck! + pub fn reserve_bytes(&self, size: usize, flags: u64) -> Option> { + let ptr = + unsafe { bpf_ringbuf_reserve(self.def.get().cast(), size as u64, flags) }.cast::(); + (!ptr.is_null()).then(|| { + let inner = unsafe { core::slice::from_raw_parts_mut(ptr, size) }; + RingBufBytes(inner) + }) + } + /// Reserve memory in the ring buffer that can fit `T`. /// /// Returns `None` if the ring buffer is full. - #[cfg(feature = "const_assert")] + #[cfg(generic_const_exprs)] pub fn reserve(&self, flags: u64) -> Option> where Assert<{ 8 % mem::align_of::() == 0 }>: IsTrue, @@ -109,7 +177,7 @@ impl RingBuf { /// be equal or smaller than 8. If you use this with a `T` that isn't properly aligned, this /// function will be compiled to a panic; depending on your panic_handler, this may make /// the eBPF program fail to load, or it may make it have undefined behavior. - #[cfg(not(feature = "const_assert"))] + #[cfg(not(generic_const_exprs))] pub fn reserve(&self, flags: u64) -> Option> { assert_eq!(8 % mem::align_of::(), 0); self.reserve_impl(flags) @@ -117,8 +185,9 @@ impl RingBuf { fn reserve_impl(&self, flags: u64) -> Option> { let ptr = unsafe { - bpf_ringbuf_reserve(self.def.get() as *mut _, mem::size_of::() as _, flags) - } as *mut MaybeUninit; + bpf_ringbuf_reserve(self.def.get().cast(), mem::size_of::() as u64, flags) + } + .cast::>(); unsafe { ptr.as_mut() }.map(|ptr| RingBufEntry(ptr)) } @@ -137,27 +206,24 @@ impl RingBuf { /// /// [`reserve`]: RingBuf::reserve /// [`submit`]: RingBufEntry::submit - pub fn output(&self, data: &T, flags: u64) -> Result<(), i64> { + pub fn output(&self, data: impl Borrow, flags: u64) -> Result<(), i64> { + let data = data.borrow(); assert_eq!(8 % mem::align_of_val(data), 0); let ret = unsafe { bpf_ringbuf_output( - self.def.get() as *mut _, - data as *const _ as *mut _, - mem::size_of_val(data) as _, + self.def.get().cast(), + core::ptr::from_ref(data).cast_mut().cast(), + mem::size_of_val(data) as u64, flags, ) }; - if ret < 0 { - Err(ret) - } else { - Ok(()) - } + if ret < 0 { Err(ret) } else { Ok(()) } } /// Query various information about the ring buffer. /// /// Consult `bpf_ringbuf_query` documentation for a list of allowed flags. pub fn query(&self, flags: u64) -> u64 { - unsafe { bpf_ringbuf_query(self.def.get() as *mut _, flags) } + unsafe { bpf_ringbuf_query(self.def.get().cast(), flags) } } } diff --git a/ebpf/aya-ebpf/src/maps/sock_hash.rs b/ebpf/aya-ebpf/src/maps/sock_hash.rs index 3ccf52b8..fc070a97 100644 --- a/ebpf/aya-ebpf/src/maps/sock_hash.rs +++ b/ebpf/aya-ebpf/src/maps/sock_hash.rs @@ -1,16 +1,20 @@ -use core::{borrow::Borrow, cell::UnsafeCell, marker::PhantomData, mem}; - -use aya_ebpf_cty::c_void; +use core::{ + borrow::{Borrow, BorrowMut}, + cell::UnsafeCell, + marker::PhantomData, + mem, ptr, +}; use crate::{ + EbpfContext as _, bindings::{bpf_map_def, bpf_map_type::BPF_MAP_TYPE_SOCKHASH, bpf_sock_ops}, helpers::{ - bpf_map_lookup_elem, bpf_msg_redirect_hash, bpf_sk_assign, bpf_sk_redirect_hash, - bpf_sk_release, bpf_sock_hash_update, + bpf_msg_redirect_hash, bpf_sk_assign, bpf_sk_redirect_hash, bpf_sk_release, + bpf_sock_hash_update, }, + lookup, maps::PinningType, programs::{SkBuffContext, SkLookupContext, SkMsgContext}, - EbpfContext, }; #[repr(transparent)] @@ -22,8 +26,8 @@ pub struct SockHash { unsafe impl Sync for SockHash {} impl SockHash { - pub const fn with_max_entries(max_entries: u32, flags: u32) -> SockHash { - SockHash { + pub const fn with_max_entries(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_SOCKHASH, key_size: mem::size_of::() as u32, @@ -37,8 +41,8 @@ impl SockHash { } } - pub const fn pinned(max_entries: u32, flags: u32) -> SockHash { - SockHash { + pub const fn pinned(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_SOCKHASH, key_size: mem::size_of::() as u32, @@ -52,35 +56,50 @@ impl SockHash { } } - pub fn update(&self, key: &mut K, sk_ops: &mut bpf_sock_ops, flags: u64) -> Result<(), i64> { + pub fn update( + &self, + mut key: impl BorrowMut, + mut sk_ops: impl BorrowMut, + flags: u64, + ) -> Result<(), i64> { let ret = unsafe { bpf_sock_hash_update( - sk_ops as *mut _, - self.def.get() as *mut _, - key as *mut _ as *mut c_void, + ptr::from_mut(sk_ops.borrow_mut()), + self.def.get().cast(), + ptr::from_mut(key.borrow_mut()).cast(), flags, ) }; (ret == 0).then_some(()).ok_or(ret) } - pub fn redirect_msg(&self, ctx: &SkMsgContext, key: &mut K, flags: u64) -> i64 { + pub fn redirect_msg( + &self, + ctx: impl Borrow, + mut key: impl BorrowMut, + flags: u64, + ) -> i64 { unsafe { bpf_msg_redirect_hash( - ctx.as_ptr() as *mut _, - self.def.get() as *mut _, - key as *mut _ as *mut _, + ctx.borrow().msg, + self.def.get().cast(), + ptr::from_mut(key.borrow_mut()).cast(), flags, ) } } - pub fn redirect_skb(&self, ctx: &SkBuffContext, key: &mut K, flags: u64) -> i64 { + pub fn redirect_skb( + &self, + ctx: impl Borrow, + mut key: impl BorrowMut, + flags: u64, + ) -> i64 { unsafe { bpf_sk_redirect_hash( - ctx.as_ptr() as *mut _, - self.def.get() as *mut _, - key as *mut _ as *mut _, + ctx.borrow().skb.skb, + self.def.get().cast(), + ptr::from_mut(key.borrow_mut()).cast(), flags, ) } @@ -88,21 +107,16 @@ impl SockHash { pub fn redirect_sk_lookup( &mut self, - ctx: &SkLookupContext, + ctx: impl Borrow, key: impl Borrow, flags: u64, ) -> Result<(), u32> { - unsafe { - let sk = bpf_map_lookup_elem( - &mut self.def as *mut _ as *mut _, - &key as *const _ as *const c_void, - ); - if sk.is_null() { - return Err(1); - } - let ret = bpf_sk_assign(ctx.as_ptr() as *mut _, sk, flags); - bpf_sk_release(sk); - (ret == 0).then_some(()).ok_or(1) + let sk = lookup(self.def.get().cast(), key.borrow()).ok_or(1u32)?; + let ret = unsafe { bpf_sk_assign(ctx.borrow().as_ptr().cast(), sk.as_ptr(), flags) }; + unsafe { bpf_sk_release(sk.as_ptr()) }; + match ret { + 0 => Ok(()), + _ret => Err(1), } } } diff --git a/ebpf/aya-ebpf/src/maps/sock_map.rs b/ebpf/aya-ebpf/src/maps/sock_map.rs index 5d741a9a..a3353161 100644 --- a/ebpf/aya-ebpf/src/maps/sock_map.rs +++ b/ebpf/aya-ebpf/src/maps/sock_map.rs @@ -1,16 +1,15 @@ use core::{cell::UnsafeCell, mem}; -use aya_ebpf_cty::c_void; - use crate::{ + EbpfContext as _, bindings::{bpf_map_def, bpf_map_type::BPF_MAP_TYPE_SOCKMAP, bpf_sock_ops}, helpers::{ - bpf_map_lookup_elem, bpf_msg_redirect_map, bpf_sk_assign, bpf_sk_redirect_map, - bpf_sk_release, bpf_sock_map_update, + bpf_msg_redirect_map, bpf_sk_assign, bpf_sk_redirect_map, bpf_sk_release, + bpf_sock_map_update, }, + lookup, maps::PinningType, programs::{SkBuffContext, SkLookupContext, SkMsgContext}, - EbpfContext, }; #[repr(transparent)] @@ -21,8 +20,8 @@ pub struct SockMap { unsafe impl Sync for SockMap {} impl SockMap { - pub const fn with_max_entries(max_entries: u32, flags: u32) -> SockMap { - SockMap { + pub const fn with_max_entries(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_SOCKMAP, key_size: mem::size_of::() as u32, @@ -35,8 +34,8 @@ impl SockMap { } } - pub const fn pinned(max_entries: u32, flags: u32) -> SockMap { - SockMap { + pub const fn pinned(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_SOCKMAP, key_size: mem::size_of::() as u32, @@ -49,41 +48,27 @@ impl SockMap { } } + #[expect(clippy::missing_safety_doc)] pub unsafe fn update( &self, mut index: u32, sk_ops: *mut bpf_sock_ops, flags: u64, ) -> Result<(), i64> { - let ret = bpf_sock_map_update( - sk_ops, - self.def.get() as *mut _, - &mut index as *mut _ as *mut c_void, - flags, - ); - if ret == 0 { - Ok(()) - } else { - Err(ret) - } + let index: *mut _ = &mut index; + let ret = + unsafe { bpf_sock_map_update(sk_ops, self.def.get().cast(), index.cast(), flags) }; + if ret == 0 { Ok(()) } else { Err(ret) } } + #[expect(clippy::missing_safety_doc)] pub unsafe fn redirect_msg(&self, ctx: &SkMsgContext, index: u32, flags: u64) -> i64 { - bpf_msg_redirect_map( - ctx.as_ptr() as *mut _, - self.def.get() as *mut _, - index, - flags, - ) + unsafe { bpf_msg_redirect_map(ctx.as_ptr().cast(), self.def.get().cast(), index, flags) } } + #[expect(clippy::missing_safety_doc)] pub unsafe fn redirect_skb(&self, ctx: &SkBuffContext, index: u32, flags: u64) -> i64 { - bpf_sk_redirect_map( - ctx.as_ptr() as *mut _, - self.def.get() as *mut _, - index, - flags, - ) + unsafe { bpf_sk_redirect_map(ctx.as_ptr().cast(), self.def.get().cast(), index, flags) } } pub fn redirect_sk_lookup( @@ -92,17 +77,12 @@ impl SockMap { index: u32, flags: u64, ) -> Result<(), u32> { - unsafe { - let sk = bpf_map_lookup_elem( - &mut self.def as *mut _ as *mut _, - &index as *const _ as *const c_void, - ); - if sk.is_null() { - return Err(1); - } - let ret = bpf_sk_assign(ctx.as_ptr() as *mut _, sk, flags); - bpf_sk_release(sk); - (ret == 0).then_some(()).ok_or(1) + let sk = lookup(self.def.get().cast(), &index).ok_or(1u32)?; + let ret = unsafe { bpf_sk_assign(ctx.as_ptr().cast(), sk.as_ptr(), flags) }; + unsafe { bpf_sk_release(sk.as_ptr()) }; + match ret { + 0 => Ok(()), + _ret => Err(1), } } } diff --git a/ebpf/aya-ebpf/src/maps/stack.rs b/ebpf/aya-ebpf/src/maps/stack.rs index 6328693d..f50a9a84 100644 --- a/ebpf/aya-ebpf/src/maps/stack.rs +++ b/ebpf/aya-ebpf/src/maps/stack.rs @@ -1,8 +1,8 @@ -use core::{marker::PhantomData, mem}; +use core::{borrow::Borrow, marker::PhantomData, mem, ptr}; use crate::{ bindings::{bpf_map_def, bpf_map_type::BPF_MAP_TYPE_STACK}, - helpers::{bpf_map_pop_elem, bpf_map_push_elem}, + helpers::{bpf_map_peek_elem, bpf_map_pop_elem, bpf_map_push_elem}, maps::PinningType, }; @@ -13,8 +13,8 @@ pub struct Stack { } impl Stack { - pub const fn with_max_entries(max_entries: u32, flags: u32) -> Stack { - Stack { + pub const fn with_max_entries(max_entries: u32, flags: u32) -> Self { + Self { def: bpf_map_def { type_: BPF_MAP_TYPE_STACK, key_size: 0, @@ -28,8 +28,8 @@ impl Stack { } } - pub const fn pinned(max_entries: u32, flags: u32) -> Stack { - Stack { + pub const fn pinned(max_entries: u32, flags: u32) -> Self { + Self { def: bpf_map_def { type_: BPF_MAP_TYPE_STACK, key_size: 0, @@ -43,23 +43,34 @@ impl Stack { } } - pub fn push(&mut self, value: &T, flags: u64) -> Result<(), i64> { + pub fn push(&self, value: impl Borrow, flags: u64) -> Result<(), i64> { let ret = unsafe { bpf_map_push_elem( - &mut self.def as *mut _ as *mut _, - value as *const _ as *const _, + ptr::from_ref(&self.def).cast_mut().cast(), + ptr::from_ref(value.borrow()).cast(), flags, ) }; (ret == 0).then_some(()).ok_or(ret) } - pub fn pop(&mut self) -> Option { + pub fn pop(&self) -> Option { unsafe { - let mut value = mem::MaybeUninit::uninit(); + let mut value = mem::MaybeUninit::::uninit(); let ret = bpf_map_pop_elem( - &mut self.def as *mut _ as *mut _, - value.as_mut_ptr() as *mut _, + ptr::from_ref(&self.def).cast_mut().cast(), + value.as_mut_ptr().cast(), + ); + (ret == 0).then_some(value.assume_init()) + } + } + + pub fn peek(&self) -> Option { + unsafe { + let mut value = mem::MaybeUninit::::uninit(); + let ret = bpf_map_peek_elem( + ptr::from_ref(&self.def).cast_mut().cast(), + value.as_mut_ptr().cast(), ); (ret == 0).then_some(value.assume_init()) } diff --git a/ebpf/aya-ebpf/src/maps/stack_trace.rs b/ebpf/aya-ebpf/src/maps/stack_trace.rs index 6685b4c5..a7931694 100644 --- a/ebpf/aya-ebpf/src/maps/stack_trace.rs +++ b/ebpf/aya-ebpf/src/maps/stack_trace.rs @@ -1,10 +1,10 @@ -use core::{cell::UnsafeCell, mem}; +use core::{borrow::Borrow, cell::UnsafeCell, mem}; use crate::{ + EbpfContext, bindings::{bpf_map_def, bpf_map_type::BPF_MAP_TYPE_STACK_TRACE}, helpers::bpf_get_stackid, maps::PinningType, - EbpfContext, }; #[repr(transparent)] @@ -17,8 +17,8 @@ unsafe impl Sync for StackTrace {} const PERF_MAX_STACK_DEPTH: u32 = 127; impl StackTrace { - pub const fn with_max_entries(max_entries: u32, flags: u32) -> StackTrace { - StackTrace { + pub const fn with_max_entries(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_STACK_TRACE, key_size: mem::size_of::() as u32, @@ -31,8 +31,8 @@ impl StackTrace { } } - pub const fn pinned(max_entries: u32, flags: u32) -> StackTrace { - StackTrace { + pub const fn pinned(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_STACK_TRACE, key_size: mem::size_of::() as u32, @@ -45,12 +45,13 @@ impl StackTrace { } } - pub unsafe fn get_stackid(&self, ctx: &C, flags: u64) -> Result { - let ret = bpf_get_stackid(ctx.as_ptr(), self.def.get() as *mut _, flags); - if ret < 0 { - Err(ret) - } else { - Ok(ret) - } + #[expect(clippy::missing_safety_doc)] + pub unsafe fn get_stackid( + &self, + ctx: impl Borrow, + flags: u64, + ) -> Result { + let ret = unsafe { bpf_get_stackid(ctx.borrow().as_ptr(), self.def.get().cast(), flags) }; + if ret < 0 { Err(ret) } else { Ok(ret) } } } diff --git a/ebpf/aya-ebpf/src/maps/xdp/cpu_map.rs b/ebpf/aya-ebpf/src/maps/xdp/cpu_map.rs index 665526ba..fdc5f91f 100644 --- a/ebpf/aya-ebpf/src/maps/xdp/cpu_map.rs +++ b/ebpf/aya-ebpf/src/maps/xdp/cpu_map.rs @@ -52,8 +52,8 @@ impl CpuMap { /// #[map] /// static MAP: CpuMap = CpuMap::with_max_entries(8, 0); /// ``` - pub const fn with_max_entries(max_entries: u32, flags: u32) -> CpuMap { - CpuMap { + pub const fn with_max_entries(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_CPUMAP, key_size: mem::size_of::() as u32, @@ -79,8 +79,8 @@ impl CpuMap { /// #[map] /// static MAP: CpuMap = CpuMap::pinned(8, 0); /// ``` - pub const fn pinned(max_entries: u32, flags: u32) -> CpuMap { - CpuMap { + pub const fn pinned(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_CPUMAP, key_size: mem::size_of::() as u32, diff --git a/ebpf/aya-ebpf/src/maps/xdp/dev_map.rs b/ebpf/aya-ebpf/src/maps/xdp/dev_map.rs index 209349bb..bef5916a 100644 --- a/ebpf/aya-ebpf/src/maps/xdp/dev_map.rs +++ b/ebpf/aya-ebpf/src/maps/xdp/dev_map.rs @@ -1,12 +1,11 @@ -use core::{cell::UnsafeCell, mem, num::NonZeroU32, ptr::NonNull}; +use core::{cell::UnsafeCell, mem, num::NonZeroU32}; use aya_ebpf_bindings::bindings::bpf_devmap_val; -use aya_ebpf_cty::c_void; use super::try_redirect_map; use crate::{ bindings::{bpf_map_def, bpf_map_type::BPF_MAP_TYPE_DEVMAP}, - helpers::bpf_map_lookup_elem, + lookup, maps::PinningType, }; @@ -49,8 +48,8 @@ impl DevMap { /// #[map] /// static MAP: DevMap = DevMap::with_max_entries(8, 0); /// ``` - pub const fn with_max_entries(max_entries: u32, flags: u32) -> DevMap { - DevMap { + pub const fn with_max_entries(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_DEVMAP, key_size: mem::size_of::() as u32, @@ -74,8 +73,8 @@ impl DevMap { /// #[map] /// static MAP: DevMap = DevMap::pinned(8, 0); /// ``` - pub const fn pinned(max_entries: u32, flags: u32) -> DevMap { - DevMap { + pub const fn pinned(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_DEVMAP, key_size: mem::size_of::() as u32, @@ -106,18 +105,14 @@ impl DevMap { /// ``` #[inline(always)] pub fn get(&self, index: u32) -> Option { - unsafe { - let value = bpf_map_lookup_elem( - self.def.get() as *mut _, - &index as *const _ as *const c_void, - ); - NonNull::new(value as *mut bpf_devmap_val).map(|p| DevMapValue { - if_index: p.as_ref().ifindex, - // SAFETY: map writes use fd, map reads use id. - // https://elixir.bootlin.com/linux/v6.2/source/include/uapi/linux/bpf.h#L6136 - prog_id: NonZeroU32::new(p.as_ref().bpf_prog.id), - }) - } + let value = lookup(self.def.get().cast(), &index)?; + let value: &bpf_devmap_val = unsafe { value.as_ref() }; + Some(DevMapValue { + if_index: value.ifindex, + // SAFETY: map writes use fd, map reads use id. + // https://elixir.bootlin.com/linux/v6.2/source/include/uapi/linux/bpf.h#L6136 + prog_id: NonZeroU32::new(unsafe { value.bpf_prog.id }), + }) } /// Redirects the current packet on the interface at `index`. diff --git a/ebpf/aya-ebpf/src/maps/xdp/dev_map_hash.rs b/ebpf/aya-ebpf/src/maps/xdp/dev_map_hash.rs index 64dfb545..f2f277a0 100644 --- a/ebpf/aya-ebpf/src/maps/xdp/dev_map_hash.rs +++ b/ebpf/aya-ebpf/src/maps/xdp/dev_map_hash.rs @@ -1,12 +1,11 @@ -use core::{cell::UnsafeCell, mem, num::NonZeroU32, ptr::NonNull}; +use core::{cell::UnsafeCell, mem, num::NonZeroU32}; use aya_ebpf_bindings::bindings::bpf_devmap_val; -use aya_ebpf_cty::c_void; use super::{dev_map::DevMapValue, try_redirect_map}; use crate::{ bindings::{bpf_map_def, bpf_map_type::BPF_MAP_TYPE_DEVMAP_HASH}, - helpers::bpf_map_lookup_elem, + lookup, maps::PinningType, }; @@ -51,8 +50,8 @@ impl DevMapHash { /// #[map] /// static MAP: DevMapHash = DevMapHash::with_max_entries(8, 0); /// ``` - pub const fn with_max_entries(max_entries: u32, flags: u32) -> DevMapHash { - DevMapHash { + pub const fn with_max_entries(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_DEVMAP_HASH, key_size: mem::size_of::() as u32, @@ -76,8 +75,8 @@ impl DevMapHash { /// #[map] /// static MAP: DevMapHash = DevMapHash::pinned(8, 0); /// ``` - pub const fn pinned(max_entries: u32, flags: u32) -> DevMapHash { - DevMapHash { + pub const fn pinned(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_DEVMAP_HASH, key_size: mem::size_of::() as u32, @@ -108,16 +107,14 @@ impl DevMapHash { /// ``` #[inline(always)] pub fn get(&self, key: u32) -> Option { - unsafe { - let value = - bpf_map_lookup_elem(self.def.get() as *mut _, &key as *const _ as *const c_void); - NonNull::new(value as *mut bpf_devmap_val).map(|p| DevMapValue { - if_index: p.as_ref().ifindex, - // SAFETY: map writes use fd, map reads use id. - // https://elixir.bootlin.com/linux/v6.2/source/include/uapi/linux/bpf.h#L6136 - prog_id: NonZeroU32::new(p.as_ref().bpf_prog.id), - }) - } + let value = lookup(self.def.get().cast(), &key)?; + let value: &bpf_devmap_val = unsafe { value.as_ref() }; + Some(DevMapValue { + if_index: value.ifindex, + // SAFETY: map writes use fd, map reads use id. + // https://elixir.bootlin.com/linux/v6.2/source/include/uapi/linux/bpf.h#L6136 + prog_id: NonZeroU32::new(unsafe { value.bpf_prog.id }), + }) } /// Redirects the current packet on the interface at `key`. diff --git a/ebpf/aya-ebpf/src/maps/xdp/mod.rs b/ebpf/aya-ebpf/src/maps/xdp/mod.rs index fdb2af35..68c34d4b 100644 --- a/ebpf/aya-ebpf/src/maps/xdp/mod.rs +++ b/ebpf/aya-ebpf/src/maps/xdp/mod.rs @@ -25,7 +25,7 @@ fn try_redirect_map(def: &UnsafeCell, key: u32, flags: u64) -> Resu // Return XDP_REDIRECT on success, or the value of the two lower bits of the flags argument on // error. Thus I have no idea why it returns a long (i64) instead of something saner, hence the // unsigned_abs. - let ret = unsafe { bpf_redirect_map(def.get() as *mut _, key.into(), flags) }; + let ret = unsafe { bpf_redirect_map(def.get().cast(), key.into(), flags) }; match ret.unsigned_abs() as u32 { XDP_REDIRECT => Ok(XDP_REDIRECT), ret => Err(ret), diff --git a/ebpf/aya-ebpf/src/maps/xdp/xsk_map.rs b/ebpf/aya-ebpf/src/maps/xdp/xsk_map.rs index 4ce352ec..7a7cbdd5 100644 --- a/ebpf/aya-ebpf/src/maps/xdp/xsk_map.rs +++ b/ebpf/aya-ebpf/src/maps/xdp/xsk_map.rs @@ -1,12 +1,11 @@ -use core::{cell::UnsafeCell, mem, ptr::NonNull}; +use core::{cell::UnsafeCell, mem}; use aya_ebpf_bindings::bindings::bpf_xdp_sock; -use aya_ebpf_cty::c_void; use super::try_redirect_map; use crate::{ bindings::{bpf_map_def, bpf_map_type::BPF_MAP_TYPE_XSKMAP}, - helpers::bpf_map_lookup_elem, + lookup, maps::PinningType, }; @@ -70,8 +69,8 @@ impl XskMap { /// #[map] /// static SOCKS: XskMap = XskMap::with_max_entries(8, 0); /// ``` - pub const fn with_max_entries(max_entries: u32, flags: u32) -> XskMap { - XskMap { + pub const fn with_max_entries(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_XSKMAP, key_size: mem::size_of::() as u32, @@ -95,8 +94,8 @@ impl XskMap { /// #[map] /// static SOCKS: XskMap = XskMap::pinned(8, 0); /// ``` - pub const fn pinned(max_entries: u32, flags: u32) -> XskMap { - XskMap { + pub const fn pinned(max_entries: u32, flags: u32) -> Self { + Self { def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_XSKMAP, key_size: mem::size_of::() as u32, @@ -125,13 +124,9 @@ impl XskMap { /// ``` #[inline(always)] pub fn get(&self, index: u32) -> Option { - unsafe { - let value = bpf_map_lookup_elem( - self.def.get() as *mut _, - &index as *const _ as *const c_void, - ); - NonNull::new(value as *mut bpf_xdp_sock).map(|p| p.as_ref().queue_id) - } + let value = lookup(self.def.get().cast(), &index)?; + let value: &bpf_xdp_sock = unsafe { value.as_ref() }; + Some(value.queue_id) } /// Redirects the current packet to the AF_XDP socket at `index`. diff --git a/ebpf/aya-ebpf/src/programs/device.rs b/ebpf/aya-ebpf/src/programs/device.rs index 899aa7fc..c5cbfe9a 100644 --- a/ebpf/aya-ebpf/src/programs/device.rs +++ b/ebpf/aya-ebpf/src/programs/device.rs @@ -1,19 +1,19 @@ use core::ffi::c_void; -use crate::{bindings::bpf_cgroup_dev_ctx, EbpfContext}; +use crate::{EbpfContext, bindings::bpf_cgroup_dev_ctx}; pub struct DeviceContext { pub device: *mut bpf_cgroup_dev_ctx, } impl DeviceContext { - pub fn new(device: *mut bpf_cgroup_dev_ctx) -> DeviceContext { - DeviceContext { device } + pub fn new(device: *mut bpf_cgroup_dev_ctx) -> Self { + Self { device } } } impl EbpfContext for DeviceContext { fn as_ptr(&self) -> *mut c_void { - self.device as *mut _ + self.device.cast() } } diff --git a/ebpf/aya-ebpf/src/programs/fentry.rs b/ebpf/aya-ebpf/src/programs/fentry.rs index af82ca7c..0e61236d 100644 --- a/ebpf/aya-ebpf/src/programs/fentry.rs +++ b/ebpf/aya-ebpf/src/programs/fentry.rs @@ -1,14 +1,14 @@ use core::ffi::c_void; -use crate::{args::FromBtfArgument, EbpfContext}; +use crate::{Argument, EbpfContext, args::btf_arg}; pub struct FEntryContext { ctx: *mut c_void, } impl FEntryContext { - pub fn new(ctx: *mut c_void) -> FEntryContext { - FEntryContext { ctx } + pub fn new(ctx: *mut c_void) -> Self { + Self { ctx } } /// Returns the `n`th argument to passed to the probe function, starting from 0. @@ -16,10 +16,10 @@ impl FEntryContext { /// # Examples /// /// ```no_run - /// # #![allow(non_camel_case_types)] - /// # #![allow(dead_code)] /// # use aya_ebpf::{cty::c_int, programs::FEntryContext}; + /// # #[expect(non_camel_case_types)] /// # type pid_t = c_int; + /// # #[expect(non_camel_case_types)] /// # struct task_struct { /// # pid: pid_t, /// # } @@ -31,8 +31,8 @@ impl FEntryContext { /// Ok(0) /// } /// ``` - pub unsafe fn arg(&self, n: usize) -> T { - T::from_argument(self.ctx as *const _, n) + pub fn arg(&self, n: usize) -> T { + btf_arg(self, n) } } diff --git a/ebpf/aya-ebpf/src/programs/fexit.rs b/ebpf/aya-ebpf/src/programs/fexit.rs index d9728832..d936c310 100644 --- a/ebpf/aya-ebpf/src/programs/fexit.rs +++ b/ebpf/aya-ebpf/src/programs/fexit.rs @@ -1,14 +1,14 @@ use core::ffi::c_void; -use crate::{args::FromBtfArgument, EbpfContext}; +use crate::{Argument, EbpfContext, args::btf_arg}; pub struct FExitContext { ctx: *mut c_void, } impl FExitContext { - pub fn new(ctx: *mut c_void) -> FExitContext { - FExitContext { ctx } + pub fn new(ctx: *mut c_void) -> Self { + Self { ctx } } /// Returns the `n`th argument to passed to the probe function, starting from 0. @@ -16,10 +16,10 @@ impl FExitContext { /// # Examples /// /// ```no_run - /// # #![allow(non_camel_case_types)] - /// # #![allow(dead_code)] /// # use aya_ebpf::{cty::c_int, programs::FExitContext}; + /// # #[expect(non_camel_case_types)] /// # type pid_t = c_int; + /// # #[expect(non_camel_case_types)] /// # struct task_struct { /// # pid: pid_t, /// # } @@ -31,8 +31,8 @@ impl FExitContext { /// Ok(0) /// } /// ``` - pub unsafe fn arg(&self, n: usize) -> T { - T::from_argument(self.ctx as *const _, n) + pub fn arg(&self, n: usize) -> T { + btf_arg(self, n) } } diff --git a/ebpf/aya-ebpf/src/programs/flow_dissector.rs b/ebpf/aya-ebpf/src/programs/flow_dissector.rs new file mode 100644 index 00000000..a0c5e579 --- /dev/null +++ b/ebpf/aya-ebpf/src/programs/flow_dissector.rs @@ -0,0 +1,44 @@ +use aya_ebpf_cty::{c_long, c_void}; + +use crate::{ + EbpfContext, + bindings::{__sk_buff, bpf_flow_keys}, + programs::sk_buff::SkBuff, +}; + +pub struct FlowDissectorContext { + skb: SkBuff, +} + +impl FlowDissectorContext { + pub fn new(skb: *mut __sk_buff) -> Self { + let skb = SkBuff { skb }; + Self { skb } + } + + #[inline] + pub fn data(&self) -> usize { + self.skb.data() + } + + #[inline] + pub fn data_end(&self) -> usize { + self.skb.data_end() + } + + #[inline] + pub fn flow_keys(&mut self) -> &mut bpf_flow_keys { + unsafe { &mut *(*self.skb.skb).__bindgen_anon_1.flow_keys } + } + + #[inline(always)] + pub fn load_bytes(&self, offset: usize, dst: &mut [u8]) -> Result { + self.skb.load_bytes(offset, dst) + } +} + +impl EbpfContext for FlowDissectorContext { + fn as_ptr(&self) -> *mut c_void { + self.skb.as_ptr() + } +} diff --git a/ebpf/aya-ebpf/src/programs/lsm.rs b/ebpf/aya-ebpf/src/programs/lsm.rs index 0ad29590..4e0111d5 100644 --- a/ebpf/aya-ebpf/src/programs/lsm.rs +++ b/ebpf/aya-ebpf/src/programs/lsm.rs @@ -1,14 +1,14 @@ use core::ffi::c_void; -use crate::{args::FromBtfArgument, EbpfContext}; +use crate::{Argument, EbpfContext, args::btf_arg}; pub struct LsmContext { ctx: *mut c_void, } impl LsmContext { - pub fn new(ctx: *mut c_void) -> LsmContext { - LsmContext { ctx } + pub fn new(ctx: *mut c_void) -> Self { + Self { ctx } } /// Returns the `n`th argument passed to the LSM hook, starting from 0. @@ -22,14 +22,9 @@ impl LsmContext { /// this code path, or 0 if this is the first LSM program to be called. This phony /// argument is always last in the argument list. /// - /// SAFETY: This function is deeply unsafe, as we are reading raw pointers into kernel memory. - /// In particular, the value of `n` must not exceed the number of function arguments. - /// Luckily, the BPF verifier will catch this for us. - /// /// # Examples /// /// ```no_run - /// # #![allow(dead_code)] /// # use aya_ebpf::{programs::LsmContext, cty::{c_int, c_ulong}}; /// unsafe fn try_lsm_mmap_addr(ctx: LsmContext) -> Result { /// // In the kernel, this hook is defined as: @@ -50,8 +45,8 @@ impl LsmContext { /// ``` /// /// [1]: https://elixir.bootlin.com/linux/latest/source/include/linux/lsm_hook_defs.h - pub unsafe fn arg(&self, n: usize) -> T { - T::from_argument(self.ctx as *const _, n) + pub fn arg(&self, n: usize) -> T { + btf_arg(self, n) } } diff --git a/ebpf/aya-ebpf/src/programs/mod.rs b/ebpf/aya-ebpf/src/programs/mod.rs index 557e688f..f95b38de 100644 --- a/ebpf/aya-ebpf/src/programs/mod.rs +++ b/ebpf/aya-ebpf/src/programs/mod.rs @@ -1,6 +1,7 @@ pub mod device; pub mod fentry; pub mod fexit; +pub mod flow_dissector; pub mod lsm; pub mod perf_event; pub mod probe; @@ -22,6 +23,7 @@ pub mod xdp; pub use device::DeviceContext; pub use fentry::FEntryContext; pub use fexit::FExitContext; +pub use flow_dissector::FlowDissectorContext; pub use lsm::LsmContext; pub use perf_event::PerfEventContext; pub use probe::ProbeContext; diff --git a/ebpf/aya-ebpf/src/programs/perf_event.rs b/ebpf/aya-ebpf/src/programs/perf_event.rs index b0460f6d..d847fc31 100644 --- a/ebpf/aya-ebpf/src/programs/perf_event.rs +++ b/ebpf/aya-ebpf/src/programs/perf_event.rs @@ -7,8 +7,8 @@ pub struct PerfEventContext { } impl PerfEventContext { - pub fn new(ctx: *mut c_void) -> PerfEventContext { - PerfEventContext { ctx } + pub fn new(ctx: *mut c_void) -> Self { + Self { ctx } } } diff --git a/ebpf/aya-ebpf/src/programs/probe.rs b/ebpf/aya-ebpf/src/programs/probe.rs index 3f9b965b..e2ee6e0e 100644 --- a/ebpf/aya-ebpf/src/programs/probe.rs +++ b/ebpf/aya-ebpf/src/programs/probe.rs @@ -1,22 +1,14 @@ use core::ffi::c_void; -#[cfg(not(any(bpf_target_arch = "aarch64", bpf_target_arch = "riscv64")))] -use crate::bindings::pt_regs; -#[cfg(bpf_target_arch = "aarch64")] -use crate::bindings::user_pt_regs as pt_regs; -#[cfg(bpf_target_arch = "riscv64")] -use crate::bindings::user_regs_struct as pt_regs; -use crate::{args::FromPtRegs, EbpfContext}; +use crate::{Argument, EbpfContext, args::arg, bindings::pt_regs}; pub struct ProbeContext { pub regs: *mut pt_regs, } impl ProbeContext { - pub fn new(ctx: *mut c_void) -> ProbeContext { - ProbeContext { - regs: ctx as *mut pt_regs, - } + pub fn new(ctx: *mut c_void) -> Self { + Self { regs: ctx.cast() } } /// Returns the `n`th argument to passed to the probe function, starting from 0. @@ -24,29 +16,31 @@ impl ProbeContext { /// # Examples /// /// ```no_run - /// # #![allow(non_camel_case_types)] - /// # #![allow(dead_code)] /// # use aya_ebpf::{programs::ProbeContext, cty::c_int, helpers::bpf_probe_read}; + /// # #[expect(non_camel_case_types)] /// # type pid_t = c_int; + /// # #[expect(non_camel_case_types)] /// # struct task_struct { /// # pid: pid_t, /// # } /// unsafe fn try_kprobe_try_to_wake_up(ctx: ProbeContext) -> Result { /// let tp: *const task_struct = ctx.arg(0).ok_or(1u32)?; - /// let pid = bpf_probe_read(&(*tp).pid as *const pid_t).map_err(|_| 1u32)?; + /// let pid = unsafe { + /// bpf_probe_read(core::ptr::addr_of!((*tp).pid)) + /// }.map_err(|err| err as u32)?; /// /// // Do something with pid or something else with tp /// /// Ok(0) /// } /// ``` - pub fn arg(&self, n: usize) -> Option { - T::from_argument(unsafe { &*self.regs }, n) + pub fn arg(&self, n: usize) -> Option { + arg(unsafe { &*self.regs }, n) } } impl EbpfContext for ProbeContext { fn as_ptr(&self) -> *mut c_void { - self.regs as *mut c_void + self.regs.cast() } } diff --git a/ebpf/aya-ebpf/src/programs/raw_tracepoint.rs b/ebpf/aya-ebpf/src/programs/raw_tracepoint.rs index 2c2c1b4d..81bcf54c 100644 --- a/ebpf/aya-ebpf/src/programs/raw_tracepoint.rs +++ b/ebpf/aya-ebpf/src/programs/raw_tracepoint.rs @@ -1,19 +1,23 @@ use core::ffi::c_void; -use crate::EbpfContext; +use crate::{Argument, EbpfContext, args::raw_tracepoint_arg, bindings::bpf_raw_tracepoint_args}; pub struct RawTracePointContext { - ctx: *mut c_void, + ctx: *mut bpf_raw_tracepoint_args, } impl RawTracePointContext { - pub fn new(ctx: *mut c_void) -> RawTracePointContext { - RawTracePointContext { ctx } + pub fn new(ctx: *mut c_void) -> Self { + Self { ctx: ctx.cast() } + } + + pub fn arg(&self, n: usize) -> T { + raw_tracepoint_arg(unsafe { &*self.ctx }, n) } } impl EbpfContext for RawTracePointContext { fn as_ptr(&self) -> *mut c_void { - self.ctx + self.ctx.cast() } } diff --git a/ebpf/aya-ebpf/src/programs/retprobe.rs b/ebpf/aya-ebpf/src/programs/retprobe.rs index 2cff9b55..c669f25e 100644 --- a/ebpf/aya-ebpf/src/programs/retprobe.rs +++ b/ebpf/aya-ebpf/src/programs/retprobe.rs @@ -1,22 +1,14 @@ use core::ffi::c_void; -#[cfg(not(any(bpf_target_arch = "aarch64", bpf_target_arch = "riscv64")))] -use crate::bindings::pt_regs; -#[cfg(bpf_target_arch = "aarch64")] -use crate::bindings::user_pt_regs as pt_regs; -#[cfg(bpf_target_arch = "riscv64")] -use crate::bindings::user_regs_struct as pt_regs; -use crate::{args::FromPtRegs, EbpfContext}; +use crate::{Argument, EbpfContext, args::ret, bindings::pt_regs}; pub struct RetProbeContext { pub regs: *mut pt_regs, } impl RetProbeContext { - pub fn new(ctx: *mut c_void) -> RetProbeContext { - RetProbeContext { - regs: ctx as *mut pt_regs, - } + pub fn new(ctx: *mut c_void) -> Self { + Self { regs: ctx.cast() } } /// Returns the return value of the probed function. @@ -24,23 +16,22 @@ impl RetProbeContext { /// # Examples /// /// ```no_run - /// # #![allow(dead_code)] /// # use aya_ebpf::{programs::RetProbeContext, cty::c_int}; /// unsafe fn try_kretprobe_try_to_wake_up(ctx: RetProbeContext) -> Result { - /// let retval: c_int = ctx.ret().ok_or(1u32)?; + /// let retval: c_int = ctx.ret(); /// /// // Do something with retval /// /// Ok(0) /// } /// ``` - pub fn ret(&self) -> Option { - T::from_retval(unsafe { &*self.regs }) + pub fn ret(&self) -> T { + ret(unsafe { &*self.regs }) } } impl EbpfContext for RetProbeContext { fn as_ptr(&self) -> *mut c_void { - self.regs as *mut c_void + self.regs.cast() } } diff --git a/ebpf/aya-ebpf/src/programs/sk_buff.rs b/ebpf/aya-ebpf/src/programs/sk_buff.rs index becdf85d..deb9654b 100644 --- a/ebpf/aya-ebpf/src/programs/sk_buff.rs +++ b/ebpf/aya-ebpf/src/programs/sk_buff.rs @@ -1,6 +1,7 @@ use core::{ ffi::c_void, mem::{self, MaybeUninit}, + ptr, }; use aya_ebpf_bindings::helpers::{ @@ -10,18 +11,18 @@ use aya_ebpf_bindings::helpers::{ }; use aya_ebpf_cty::c_long; -use crate::{bindings::__sk_buff, EbpfContext}; +use crate::{EbpfContext, bindings::__sk_buff}; pub struct SkBuff { pub skb: *mut __sk_buff, } impl SkBuff { - pub fn new(skb: *mut __sk_buff) -> SkBuff { - SkBuff { skb } + pub fn new(skb: *mut __sk_buff) -> Self { + Self { skb } } - #[allow(clippy::len_without_is_empty)] + #[expect(clippy::len_without_is_empty)] #[inline] pub fn len(&self) -> u32 { unsafe { (*self.skb).len } @@ -65,8 +66,8 @@ impl SkBuff { let ret = bpf_skb_load_bytes( self.skb as *const _, offset as u32, - &mut data as *mut _ as *mut _, - mem::size_of::() as u32, + ptr::from_mut(&mut data).cast(), + mem::size_of_val(&data) as u32, ); if ret == 0 { Ok(data.assume_init()) @@ -93,34 +94,26 @@ impl SkBuff { let len_u32 = u32::try_from(len).map_err(|core::num::TryFromIntError { .. }| -1)?; let ret = unsafe { bpf_skb_load_bytes( - self.skb as *const _, + self.skb.cast(), offset as u32, - dst.as_mut_ptr() as *mut _, + dst.as_mut_ptr().cast(), len_u32, ) }; - if ret == 0 { - Ok(len) - } else { - Err(ret) - } + if ret == 0 { Ok(len) } else { Err(ret) } } #[inline] pub fn store(&mut self, offset: usize, v: &T, flags: u64) -> Result<(), c_long> { unsafe { let ret = bpf_skb_store_bytes( - self.skb as *mut _, + self.skb.cast(), offset as u32, - v as *const _ as *const _, - mem::size_of::() as u32, + ptr::from_ref(v).cast(), + mem::size_of_val(v) as u32, flags, ); - if ret == 0 { - Ok(()) - } else { - Err(ret) - } + if ret == 0 { Ok(()) } else { Err(ret) } } } @@ -133,12 +126,8 @@ impl SkBuff { size: u64, ) -> Result<(), c_long> { unsafe { - let ret = bpf_l3_csum_replace(self.skb as *mut _, offset as u32, from, to, size); - if ret == 0 { - Ok(()) - } else { - Err(ret) - } + let ret = bpf_l3_csum_replace(self.skb.cast(), offset as u32, from, to, size); + if ret == 0 { Ok(()) } else { Err(ret) } } } @@ -151,53 +140,33 @@ impl SkBuff { flags: u64, ) -> Result<(), c_long> { unsafe { - let ret = bpf_l4_csum_replace(self.skb as *mut _, offset as u32, from, to, flags); - if ret == 0 { - Ok(()) - } else { - Err(ret) - } + let ret = bpf_l4_csum_replace(self.skb.cast(), offset as u32, from, to, flags); + if ret == 0 { Ok(()) } else { Err(ret) } } } #[inline] pub fn adjust_room(&self, len_diff: i32, mode: u32, flags: u64) -> Result<(), c_long> { - let ret = unsafe { bpf_skb_adjust_room(self.as_ptr() as *mut _, len_diff, mode, flags) }; - if ret == 0 { - Ok(()) - } else { - Err(ret) - } + let ret = unsafe { bpf_skb_adjust_room(self.skb, len_diff, mode, flags) }; + if ret == 0 { Ok(()) } else { Err(ret) } } #[inline] pub fn clone_redirect(&self, if_index: u32, flags: u64) -> Result<(), c_long> { - let ret = unsafe { bpf_clone_redirect(self.as_ptr() as *mut _, if_index, flags) }; - if ret == 0 { - Ok(()) - } else { - Err(ret) - } + let ret = unsafe { bpf_clone_redirect(self.skb, if_index, flags) }; + if ret == 0 { Ok(()) } else { Err(ret) } } #[inline] pub fn change_proto(&self, proto: u16, flags: u64) -> Result<(), c_long> { - let ret = unsafe { bpf_skb_change_proto(self.as_ptr() as *mut _, proto, flags) }; - if ret == 0 { - Ok(()) - } else { - Err(ret) - } + let ret = unsafe { bpf_skb_change_proto(self.skb, proto, flags) }; + if ret == 0 { Ok(()) } else { Err(ret) } } #[inline] pub fn change_type(&self, ty: u32) -> Result<(), c_long> { - let ret = unsafe { bpf_skb_change_type(self.as_ptr() as *mut _, ty) }; - if ret == 0 { - Ok(()) - } else { - Err(ret) - } + let ret = unsafe { bpf_skb_change_type(self.skb, ty) }; + if ret == 0 { Ok(()) } else { Err(ret) } } /// Pulls in non-linear data in case the skb is non-linear. @@ -207,16 +176,12 @@ impl SkBuff { /// for reading and writing with direct packet access. #[inline(always)] pub fn pull_data(&self, len: u32) -> Result<(), c_long> { - let ret = unsafe { bpf_skb_pull_data(self.as_ptr() as *mut _, len) }; - if ret == 0 { - Ok(()) - } else { - Err(ret) - } + let ret = unsafe { bpf_skb_pull_data(self.skb, len) }; + if ret == 0 { Ok(()) } else { Err(ret) } } pub(crate) fn as_ptr(&self) -> *mut c_void { - self.skb as *mut _ + self.skb.cast() } #[inline] @@ -265,12 +230,12 @@ pub struct SkBuffContext { } impl SkBuffContext { - pub fn new(skb: *mut __sk_buff) -> SkBuffContext { + pub fn new(skb: *mut __sk_buff) -> Self { let skb = SkBuff { skb }; - SkBuffContext { skb } + Self { skb } } - #[allow(clippy::len_without_is_empty)] + #[expect(clippy::len_without_is_empty)] #[inline] pub fn len(&self) -> u32 { self.skb.len() @@ -316,11 +281,11 @@ impl SkBuffContext { /// use core::mem; /// /// use aya_ebpf::{bindings::TC_ACT_PIPE, macros::map, maps::PerCpuArray, programs::SkBuffContext}; - /// # #[allow(non_camel_case_types)] + /// # #[expect(non_camel_case_types)] /// # struct ethhdr {}; - /// # #[allow(non_camel_case_types)] + /// # #[expect(non_camel_case_types)] /// # struct iphdr {}; - /// # #[allow(non_camel_case_types)] + /// # #[expect(non_camel_case_types)] /// # struct tcphdr {}; /// /// const ETH_HDR_LEN: usize = mem::size_of::(); @@ -333,7 +298,7 @@ impl SkBuffContext { /// } /// /// #[map] - /// pub static mut BUF: PerCpuArray = PerCpuArray::with_max_entries(1, 0); + /// pub static BUF: PerCpuArray = PerCpuArray::with_max_entries(1, 0); /// /// fn try_cgroup_skb(ctx: SkBuffContext) -> Result { /// let buf = unsafe { @@ -405,11 +370,11 @@ impl SkBuffContext { /// /// ```no_run /// use aya_ebpf::programs::SkBuffContext; - /// # #[allow(non_camel_case_types)] + /// # #[expect(non_camel_case_types)] /// # struct ethhdr {}; - /// # #[allow(non_camel_case_types)] + /// # #[expect(non_camel_case_types)] /// # struct iphdr {}; - /// # #[allow(non_camel_case_types)] + /// # #[expect(non_camel_case_types)] /// # struct udphdr {}; /// /// const ETH_HLEN: usize = core::mem::size_of::(); @@ -419,8 +384,8 @@ impl SkBuffContext { /// fn try_cgroup_skb(ctx: SkBuffContext) -> Result { /// let len = ETH_HLEN + IP_HLEN + UDP_HLEN; /// match ctx.pull_data(len as u32) { - /// Ok(_) => return Ok(0), - /// Err(ret) => return Err(ret as i32), + /// Ok(()) => Ok(0), + /// Err(ret) => Err(ret as i32), /// } /// } /// ``` diff --git a/ebpf/aya-ebpf/src/programs/sk_lookup.rs b/ebpf/aya-ebpf/src/programs/sk_lookup.rs index 02532f57..86796f88 100644 --- a/ebpf/aya-ebpf/src/programs/sk_lookup.rs +++ b/ebpf/aya-ebpf/src/programs/sk_lookup.rs @@ -1,19 +1,19 @@ use core::ffi::c_void; -use crate::{bindings::bpf_sk_lookup, EbpfContext}; +use crate::{EbpfContext, bindings::bpf_sk_lookup}; pub struct SkLookupContext { pub lookup: *mut bpf_sk_lookup, } impl SkLookupContext { - pub fn new(lookup: *mut bpf_sk_lookup) -> SkLookupContext { - SkLookupContext { lookup } + pub fn new(lookup: *mut bpf_sk_lookup) -> Self { + Self { lookup } } } impl EbpfContext for SkLookupContext { fn as_ptr(&self) -> *mut c_void { - self.lookup as *mut _ + self.lookup.cast() } } diff --git a/ebpf/aya-ebpf/src/programs/sk_msg.rs b/ebpf/aya-ebpf/src/programs/sk_msg.rs index cee6d4d2..39a4047e 100644 --- a/ebpf/aya-ebpf/src/programs/sk_msg.rs +++ b/ebpf/aya-ebpf/src/programs/sk_msg.rs @@ -1,9 +1,9 @@ use core::ffi::c_void; use crate::{ + EbpfContext, bindings::sk_msg_md, helpers::{bpf_msg_pop_data, bpf_msg_push_data}, - EbpfContext, }; pub struct SkMsgContext { @@ -11,8 +11,8 @@ pub struct SkMsgContext { } impl SkMsgContext { - pub fn new(msg: *mut sk_msg_md) -> SkMsgContext { - SkMsgContext { msg } + pub fn new(msg: *mut sk_msg_md) -> Self { + Self { msg } } pub fn size(&self) -> u32 { @@ -29,25 +29,17 @@ impl SkMsgContext { pub fn push_data(&self, start: u32, len: u32, flags: u64) -> Result<(), i64> { let ret = unsafe { bpf_msg_push_data(self.msg, start, len, flags) }; - if ret == 0 { - Ok(()) - } else { - Err(ret) - } + if ret == 0 { Ok(()) } else { Err(ret) } } pub fn pop_data(&self, start: u32, len: u32, flags: u64) -> Result<(), i64> { let ret = unsafe { bpf_msg_pop_data(self.msg, start, len, flags) }; - if ret == 0 { - Ok(()) - } else { - Err(ret) - } + if ret == 0 { Ok(()) } else { Err(ret) } } } impl EbpfContext for SkMsgContext { fn as_ptr(&self) -> *mut c_void { - self.msg as *mut _ + self.msg.cast() } } diff --git a/ebpf/aya-ebpf/src/programs/sock.rs b/ebpf/aya-ebpf/src/programs/sock.rs index 64bd02fb..31412940 100644 --- a/ebpf/aya-ebpf/src/programs/sock.rs +++ b/ebpf/aya-ebpf/src/programs/sock.rs @@ -1,19 +1,19 @@ use core::ffi::c_void; -use crate::{bindings::bpf_sock, EbpfContext}; +use crate::{EbpfContext, bindings::bpf_sock}; pub struct SockContext { pub sock: *mut bpf_sock, } impl SockContext { - pub fn new(sock: *mut bpf_sock) -> SockContext { - SockContext { sock } + pub fn new(sock: *mut bpf_sock) -> Self { + Self { sock } } } impl EbpfContext for SockContext { fn as_ptr(&self) -> *mut c_void { - self.sock as *mut _ + self.sock.cast() } } diff --git a/ebpf/aya-ebpf/src/programs/sock_addr.rs b/ebpf/aya-ebpf/src/programs/sock_addr.rs index d882c058..8829e30a 100644 --- a/ebpf/aya-ebpf/src/programs/sock_addr.rs +++ b/ebpf/aya-ebpf/src/programs/sock_addr.rs @@ -1,19 +1,19 @@ use core::ffi::c_void; -use crate::{bindings::bpf_sock_addr, EbpfContext}; +use crate::{EbpfContext, bindings::bpf_sock_addr}; pub struct SockAddrContext { pub sock_addr: *mut bpf_sock_addr, } impl SockAddrContext { - pub fn new(sock_addr: *mut bpf_sock_addr) -> SockAddrContext { - SockAddrContext { sock_addr } + pub fn new(sock_addr: *mut bpf_sock_addr) -> Self { + Self { sock_addr } } } impl EbpfContext for SockAddrContext { fn as_ptr(&self) -> *mut c_void { - self.sock_addr as *mut _ + self.sock_addr.cast() } } diff --git a/ebpf/aya-ebpf/src/programs/sock_ops.rs b/ebpf/aya-ebpf/src/programs/sock_ops.rs index 9934a7a6..f0661334 100644 --- a/ebpf/aya-ebpf/src/programs/sock_ops.rs +++ b/ebpf/aya-ebpf/src/programs/sock_ops.rs @@ -2,15 +2,15 @@ use core::ffi::c_void; use aya_ebpf_bindings::helpers::bpf_sock_ops_cb_flags_set; -use crate::{bindings::bpf_sock_ops, EbpfContext}; +use crate::{EbpfContext, bindings::bpf_sock_ops}; pub struct SockOpsContext { pub ops: *mut bpf_sock_ops, } impl SockOpsContext { - pub fn new(ops: *mut bpf_sock_ops) -> SockOpsContext { - SockOpsContext { ops } + pub fn new(ops: *mut bpf_sock_ops) -> Self { + Self { ops } } pub fn op(&self) -> u32 { @@ -27,11 +27,7 @@ impl SockOpsContext { pub fn set_cb_flags(&self, flags: i32) -> Result<(), i64> { let ret = unsafe { bpf_sock_ops_cb_flags_set(self.ops, flags) }; - if ret == 0 { - Ok(()) - } else { - Err(ret) - } + if ret == 0 { Ok(()) } else { Err(ret) } } pub fn remote_ip4(&self) -> u32 { @@ -61,10 +57,14 @@ impl SockOpsContext { pub fn arg(&self, n: usize) -> u32 { unsafe { (*self.ops).__bindgen_anon_1.args[n] } } + + pub fn set_reply(&mut self, reply: u32) { + unsafe { (*self.ops).__bindgen_anon_1.reply = reply } + } } impl EbpfContext for SockOpsContext { fn as_ptr(&self) -> *mut c_void { - self.ops as *mut _ + self.ops.cast() } } diff --git a/ebpf/aya-ebpf/src/programs/sockopt.rs b/ebpf/aya-ebpf/src/programs/sockopt.rs index 21e162d9..3ac13573 100644 --- a/ebpf/aya-ebpf/src/programs/sockopt.rs +++ b/ebpf/aya-ebpf/src/programs/sockopt.rs @@ -1,19 +1,19 @@ use core::ffi::c_void; -use crate::{bindings::bpf_sockopt, EbpfContext}; +use crate::{EbpfContext, bindings::bpf_sockopt}; pub struct SockoptContext { pub sockopt: *mut bpf_sockopt, } impl SockoptContext { - pub fn new(sockopt: *mut bpf_sockopt) -> SockoptContext { - SockoptContext { sockopt } + pub fn new(sockopt: *mut bpf_sockopt) -> Self { + Self { sockopt } } } impl EbpfContext for SockoptContext { fn as_ptr(&self) -> *mut c_void { - self.sockopt as *mut _ + self.sockopt.cast() } } diff --git a/ebpf/aya-ebpf/src/programs/sysctl.rs b/ebpf/aya-ebpf/src/programs/sysctl.rs index fb1a76c1..c57eff94 100644 --- a/ebpf/aya-ebpf/src/programs/sysctl.rs +++ b/ebpf/aya-ebpf/src/programs/sysctl.rs @@ -1,19 +1,19 @@ use core::ffi::c_void; -use crate::{bindings::bpf_sysctl, EbpfContext}; +use crate::{EbpfContext, bindings::bpf_sysctl}; pub struct SysctlContext { pub sysctl: *mut bpf_sysctl, } impl SysctlContext { - pub fn new(sysctl: *mut bpf_sysctl) -> SysctlContext { - SysctlContext { sysctl } + pub fn new(sysctl: *mut bpf_sysctl) -> Self { + Self { sysctl } } } impl EbpfContext for SysctlContext { fn as_ptr(&self) -> *mut c_void { - self.sysctl as *mut _ + self.sysctl.cast() } } diff --git a/ebpf/aya-ebpf/src/programs/tc.rs b/ebpf/aya-ebpf/src/programs/tc.rs index 7c349d5b..8304d58c 100644 --- a/ebpf/aya-ebpf/src/programs/tc.rs +++ b/ebpf/aya-ebpf/src/programs/tc.rs @@ -1,18 +1,18 @@ use aya_ebpf_cty::{c_long, c_void}; -use crate::{bindings::__sk_buff, programs::sk_buff::SkBuff, EbpfContext}; +use crate::{EbpfContext, bindings::__sk_buff, programs::sk_buff::SkBuff}; pub struct TcContext { pub skb: SkBuff, } impl TcContext { - pub fn new(skb: *mut __sk_buff) -> TcContext { + pub fn new(skb: *mut __sk_buff) -> Self { let skb = SkBuff { skb }; - TcContext { skb } + Self { skb } } - #[allow(clippy::len_without_is_empty)] + #[expect(clippy::len_without_is_empty)] #[inline] pub fn len(&self) -> u32 { self.skb.len() @@ -68,11 +68,11 @@ impl TcContext { /// use core::mem; /// /// use aya_ebpf::{bindings::TC_ACT_PIPE, macros::map, maps::PerCpuArray, programs::TcContext}; - /// # #[allow(non_camel_case_types)] + /// # #[expect(non_camel_case_types)] /// # struct ethhdr {}; - /// # #[allow(non_camel_case_types)] + /// # #[expect(non_camel_case_types)] /// # struct iphdr {}; - /// # #[allow(non_camel_case_types)] + /// # #[expect(non_camel_case_types)] /// # struct tcphdr {}; /// /// const ETH_HDR_LEN: usize = mem::size_of::(); @@ -85,7 +85,7 @@ impl TcContext { /// } /// /// #[map] - /// pub static mut BUF: PerCpuArray = PerCpuArray::with_max_entries(1, 0); + /// pub static BUF: PerCpuArray = PerCpuArray::with_max_entries(1, 0); /// /// fn try_classifier(ctx: TcContext) -> Result { /// let buf = unsafe { @@ -162,11 +162,11 @@ impl TcContext { /// /// ```no_run /// use aya_ebpf::programs::TcContext; - /// # #[allow(non_camel_case_types)] + /// # #[expect(non_camel_case_types)] /// # struct ethhdr {}; - /// # #[allow(non_camel_case_types)] + /// # #[expect(non_camel_case_types)] /// # struct iphdr {}; - /// # #[allow(non_camel_case_types)] + /// # #[expect(non_camel_case_types)] /// # struct udphdr {}; /// /// const ETH_HLEN: usize = core::mem::size_of::(); @@ -176,8 +176,8 @@ impl TcContext { /// fn try_classifier(ctx: TcContext) -> Result { /// let len = ETH_HLEN + IP_HLEN + UDP_HLEN; /// match ctx.pull_data(len as u32) { - /// Ok(_) => return Ok(0), - /// Err(ret) => return Err(ret as i32), + /// Ok(()) => Ok(0), + /// Err(ret) => Err(ret as i32), /// } /// } /// ``` diff --git a/ebpf/aya-ebpf/src/programs/tp_btf.rs b/ebpf/aya-ebpf/src/programs/tp_btf.rs index 0c8a7991..c5daf637 100644 --- a/ebpf/aya-ebpf/src/programs/tp_btf.rs +++ b/ebpf/aya-ebpf/src/programs/tp_btf.rs @@ -1,14 +1,14 @@ use core::ffi::c_void; -use crate::{args::FromBtfArgument, EbpfContext}; +use crate::{Argument, EbpfContext, args::btf_arg}; pub struct BtfTracePointContext { ctx: *mut c_void, } impl BtfTracePointContext { - pub fn new(ctx: *mut c_void) -> BtfTracePointContext { - BtfTracePointContext { ctx } + pub fn new(ctx: *mut c_void) -> Self { + Self { ctx } } /// Returns the `n`th argument of the BTF tracepoint, starting from 0. @@ -16,14 +16,9 @@ impl BtfTracePointContext { /// You can use the tplist tool provided by bcc to get a list of tracepoints and their /// arguments. TODO: document this better, possibly add a tplist alternative to aya. /// - /// SAFETY: This function is deeply unsafe, as we are reading raw pointers into kernel memory. - /// In particular, the value of `n` must not exceed the number of function arguments. - /// Luckily, the BPF verifier will catch this for us. - /// /// # Examples /// /// ```no_run - /// # #![allow(dead_code)] /// # use aya_ebpf::{programs::BtfTracePointContext, cty::{c_int, c_ulong, c_char}}; /// unsafe fn try_tp_btf_sched_process_fork(ctx: BtfTracePointContext) -> Result { /// // Grab arguments @@ -40,8 +35,8 @@ impl BtfTracePointContext { /// ``` /// /// [1]: https://elixir.bootlin.com/linux/latest/source/include/linux/lsm_hook_defs.h - pub unsafe fn arg(&self, n: usize) -> T { - T::from_argument(self.ctx as *const _, n) + pub fn arg(&self, n: usize) -> T { + btf_arg(self, n) } } diff --git a/ebpf/aya-ebpf/src/programs/tracepoint.rs b/ebpf/aya-ebpf/src/programs/tracepoint.rs index c1f2dd66..f53b1ee2 100644 --- a/ebpf/aya-ebpf/src/programs/tracepoint.rs +++ b/ebpf/aya-ebpf/src/programs/tracepoint.rs @@ -1,18 +1,19 @@ use core::ffi::c_void; -use crate::{helpers::bpf_probe_read, EbpfContext}; +use crate::{EbpfContext, helpers::bpf_probe_read}; pub struct TracePointContext { ctx: *mut c_void, } impl TracePointContext { - pub fn new(ctx: *mut c_void) -> TracePointContext { - TracePointContext { ctx } + pub fn new(ctx: *mut c_void) -> Self { + Self { ctx } } + #[expect(clippy::missing_safety_doc)] pub unsafe fn read_at(&self, offset: usize) -> Result { - bpf_probe_read(self.ctx.add(offset) as *const T) + unsafe { bpf_probe_read(self.ctx.add(offset).cast()) } } } diff --git a/ebpf/aya-ebpf/src/programs/xdp.rs b/ebpf/aya-ebpf/src/programs/xdp.rs index 7513b46d..8ce99d13 100644 --- a/ebpf/aya-ebpf/src/programs/xdp.rs +++ b/ebpf/aya-ebpf/src/programs/xdp.rs @@ -1,14 +1,14 @@ use core::ffi::c_void; -use crate::{bindings::xdp_md, EbpfContext}; +use crate::{EbpfContext, bindings::xdp_md}; pub struct XdpContext { pub ctx: *mut xdp_md, } impl XdpContext { - pub fn new(ctx: *mut xdp_md) -> XdpContext { - XdpContext { ctx } + pub fn new(ctx: *mut xdp_md) -> Self { + Self { ctx } } #[inline] @@ -32,10 +32,22 @@ impl XdpContext { pub fn metadata_end(&self) -> usize { self.data() } + + /// Return the index of the ingress interface. + #[inline] + pub fn ingress_ifindex(&self) -> usize { + unsafe { (*self.ctx).ingress_ifindex as usize } + } + + /// Return the index of the receive queue. + #[inline] + pub fn rx_queue_index(&self) -> u32 { + unsafe { (*self.ctx).rx_queue_index } + } } impl EbpfContext for XdpContext { fn as_ptr(&self) -> *mut c_void { - self.ctx as *mut _ + self.ctx.cast() } } diff --git a/ebpf/aya-log-ebpf/CHANGELOG.md b/ebpf/aya-log-ebpf/CHANGELOG.md index ba6eefc3..d25856d3 100644 --- a/ebpf/aya-log-ebpf/CHANGELOG.md +++ b/ebpf/aya-log-ebpf/CHANGELOG.md @@ -5,11 +5,40 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.1.1 (2024-10-09) + +Maintenance release. Update to latest aya-ebpf version v0.1.1. + +### Chore + + - Prepare for aya-log-ebpf release + +### Commit Statistics + + + + - 2 commits contributed to the release. + - 179 days passed between releases. + - 1 commit was understood as [conventional](https://www.conventionalcommits.org). + - 0 issues like '(#ID)' were seen in commit messages + +### Commit Details + + + +
view details + + * **Uncategorized** + - Prepare for aya-log-ebpf release ([`c3f0c7d`](https://github.com/aya-rs/aya/commit/c3f0c7dc3fb285da091454426eeda0723389f0f1)) + - Release aya-ebpf-cty v0.2.2, aya-ebpf-bindings v0.1.1, aya-ebpf-macros v0.1.1, aya-ebpf v0.1.1 ([`59082f5`](https://github.com/aya-rs/aya/commit/59082f572c01e8356312ed53bdb818cfbea944b5)) +
+ ## v0.1.0 (2024-04-12) + ### Chore @@ -25,7 +54,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - - 7 commits contributed to the release over the course of 37 calendar days. + - 8 commits contributed to the release. - 4 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages @@ -36,6 +65,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
view details * **Uncategorized** + - Release aya-log-ebpf v0.1.0 ([`843f4a6`](https://github.com/aya-rs/aya/commit/843f4a6cc6a8e295ae36ea0c986c8295cef66c0d)) - Release aya-log-ebpf-macros v0.1.0 ([`2eac95f`](https://github.com/aya-rs/aya/commit/2eac95f6d9075053fbabc67b92b7aa66008b057e)) - Add missing changelogs ([`1d515fe`](https://github.com/aya-rs/aya/commit/1d515fe810c6e646ca405d8f97803698deda148c)) - Release aya-ebpf-bindings v0.1.0, aya-ebpf-macros v0.1.0, aya-ebpf v0.1.0 ([`a34c5e4`](https://github.com/aya-rs/aya/commit/a34c5e43b85dd176b9b18f1cc9c9d80d52f10a1f)) diff --git a/ebpf/aya-log-ebpf/Cargo.toml b/ebpf/aya-log-ebpf/Cargo.toml index d33f7029..90c54198 100644 --- a/ebpf/aya-log-ebpf/Cargo.toml +++ b/ebpf/aya-log-ebpf/Cargo.toml @@ -1,17 +1,19 @@ [package] -name = "aya-log-ebpf" -version = "0.1.0" description = "Logging for eBPF programs" +name = "aya-log-ebpf" +version = "0.1.1" + authors.workspace = true +edition.workspace = true +homepage.workspace = true license.workspace = true repository.workspace = true -homepage.workspace = true -edition.workspace = true +rust-version.workspace = true + +[lints] +workspace = true [dependencies] -aya-ebpf = { version = "^0.1.0", path = "../aya-ebpf" } -aya-log-common = { version = "0.1.14", path = "../../aya-log-common" } +aya-ebpf = { version = "^0.1.1", path = "../aya-ebpf" } +aya-log-common = { version = "^0.1.15", path = "../../aya-log-common" } aya-log-ebpf-macros = { version = "^0.1.0", path = "../../aya-log-ebpf-macros" } - -[lib] -path = "src/lib.rs" diff --git a/ebpf/aya-log-ebpf/src/lib.rs b/ebpf/aya-log-ebpf/src/lib.rs index d546a406..a865d1fd 100644 --- a/ebpf/aya-log-ebpf/src/lib.rs +++ b/ebpf/aya-log-ebpf/src/lib.rs @@ -1,39 +1,45 @@ +#![cfg_attr( + target_arch = "bpf", + expect(unused_crate_dependencies, reason = "compiler_builtins") +)] #![no_std] #![warn(clippy::cast_lossless, clippy::cast_sign_loss)] -#[cfg(target_arch = "bpf")] -use aya_ebpf::macros::map; -use aya_ebpf::maps::{PerCpuArray, PerfEventByteArray}; -pub use aya_log_common::{write_record_header, Level, WriteToBuf, LOG_BUF_CAPACITY}; pub use aya_log_ebpf_macros::{debug, error, info, log, trace, warn}; -#[doc(hidden)] -#[repr(C)] -pub struct LogBuf { - pub buf: [u8; LOG_BUF_CAPACITY], -} - -#[doc(hidden)] -// This cfg_attr prevents compilation failures on macOS where the generated section name doesn't -// meet mach-o's requirements. We wouldn't ordinarily build this crate for macOS, but we do so -// because the integration-test crate depends on this crate transitively. See comment in -// test/integration-test/Cargo.toml. -#[cfg_attr(target_arch = "bpf", map)] -pub static mut AYA_LOG_BUF: PerCpuArray = PerCpuArray::with_max_entries(1, 0); - -#[doc(hidden)] -// This cfg_attr prevents compilation failures on macOS where the generated section name doesn't -// meet mach-o's requirements. We wouldn't ordinarily build this crate for macOS, but we do so -// because the integration-test crate depends on this crate transitively. See comment in -// test/integration-test/Cargo.toml. -#[cfg_attr(target_arch = "bpf", map)] -pub static mut AYA_LOGS: PerfEventByteArray = PerfEventByteArray::new(0); - #[doc(hidden)] pub mod macro_support { + #[cfg(target_arch = "bpf")] + use aya_ebpf::macros::map; + use aya_ebpf::maps::RingBuf; pub use aya_log_common::{ - DefaultFormatter, DisplayHint, IpFormatter, Level, LowerHexFormatter, LowerMacFormatter, - UpperHexFormatter, UpperMacFormatter, LOG_BUF_CAPACITY, + Argument, DefaultFormatter, DisplayHint, Field, Header, IpFormatter, Level, LogValueLength, + LowerHexFormatter, LowerMacFormatter, PointerFormatter, UpperHexFormatter, + UpperMacFormatter, }; - pub use aya_log_ebpf_macros::log; + + // This cfg_attr prevents compilation failures on macOS where the generated section name doesn't + // meet mach-o's requirements. We wouldn't ordinarily build this crate for macOS, but we do so + // because the integration-test crate depends on this crate transitively. See comment in + // test/integration-test/Cargo.toml. + #[cfg_attr(target_arch = "bpf", map)] + // This cfg_attr prevents compilation failures on macOS where the generated section name doesn't + // meet mach-o's requirements. We wouldn't ordinarily build this crate for macOS, but we do so + // because the integration-test crate depends on this crate transitively. See comment in + // test/integration-test/Cargo.toml. + #[cfg_attr(target_arch = "bpf", map)] + pub static AYA_LOGS: RingBuf = RingBuf::with_byte_size(1 << 17 /* 128 KiB */, 0); + + /// Global log level controlling which log statements are active. + /// + /// Userspace may patch this symbol before load via `EbpfLoader::override_global`. + #[unsafe(no_mangle)] + pub static AYA_LOG_LEVEL: u8 = 0xff; + + /// Returns `true` if the provided level is enabled according to [`AYA_LOG_LEVEL`]. + #[inline(always)] + pub fn level_enabled(level: Level) -> bool { + let current_level = unsafe { core::ptr::read_volatile(&AYA_LOG_LEVEL) }; + level as u8 <= current_level + } } diff --git a/netlify.toml b/netlify.toml index 178413df..1aa9d7b4 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,3 +1,3 @@ [build] -publish = "site" command = "rustup toolchain install nightly -c rust-src && cargo xtask docs" +publish = "site" diff --git a/release.toml b/release.toml index fb4d710e..0f941e9c 100644 --- a/release.toml +++ b/release.toml @@ -1,2 +1,2 @@ -pre-release-commit-message = "{{crate_name}}: release version {{version}}" consolidate-commits = true +pre-release-commit-message = "{{crate_name}}: release version {{version}}" diff --git a/test-distro/Cargo.toml b/test-distro/Cargo.toml new file mode 100644 index 00000000..5ec27d2f --- /dev/null +++ b/test-distro/Cargo.toml @@ -0,0 +1,38 @@ +[package] +name = "test-distro" +publish = false +version = "0.1.0" + +authors.workspace = true +edition.workspace = true +homepage.workspace = true +license.workspace = true +repository.workspace = true + +[[bin]] +name = "init" +path = "src/init.rs" + +[[bin]] +name = "modprobe" +path = "src/modprobe.rs" + +[[bin]] +name = "depmod" +path = "src/depmod.rs" + +[dependencies] +anyhow = { workspace = true, features = ["std"] } +clap = { workspace = true, default-features = true, features = ["derive"] } +glob = { workspace = true } +nix = { workspace = true, features = [ + "user", + "fs", + "mount", + "reboot", + "kmod", + "feature", +] } +object = { workspace = true, features = ["elf", "read_core", "std"] } +walkdir = { workspace = true } +xz2 = { workspace = true, optional = true } # Optional to allow building without a cross toolchain. diff --git a/test-distro/src/depmod.rs b/test-distro/src/depmod.rs new file mode 100644 index 00000000..2e782d34 --- /dev/null +++ b/test-distro/src/depmod.rs @@ -0,0 +1,124 @@ +//! depmod is used to build the modules.alias file to assist with loading +//! kernel modules. +//! +//! This implementation is incredibly naive and is only designed to work within +//! the constraints of the test environment. Not for production use. + +use std::{ + fs::File, + io::{BufWriter, Write as _}, + path::PathBuf, +}; + +use anyhow::{Context as _, anyhow}; +use clap::Parser; +use object::{Object, ObjectSection, ObjectSymbol, Section}; +use test_distro::{read_to_end, resolve_modules_dir}; +use walkdir::WalkDir; + +#[derive(Parser)] +struct Args { + #[clap(long, short)] + base_dir: Option, +} + +fn main() -> anyhow::Result<()> { + let Args { base_dir } = Parser::parse(); + + let modules_dir = if let Some(base_dir) = base_dir { + base_dir + } else { + resolve_modules_dir().context("failed to resolve modules dir")? + }; + + let modules_alias = modules_dir.join("modules.alias"); + let f = std::fs::OpenOptions::new() + .create(true) + .write(true) + .truncate(true) + .open(&modules_alias) + .with_context(|| format!("failed to open: {}", modules_alias.display()))?; + let mut output = BufWriter::new(&f); + for entry in WalkDir::new(modules_dir) { + let entry = entry.context("failed to read entry in walkdir")?; + if !entry.file_type().is_file() { + continue; + } + let path = entry.path(); + + let module_name = path + .file_name() + .ok_or_else(|| anyhow!("{} does not have a file name", path.display()))? + .to_str() + .ok_or_else(|| anyhow!("{} is not valid utf-8", path.display()))?; + + let (module_name, compressed) = if let Some(module_name) = module_name.strip_suffix(".xz") { + (module_name, true) + } else { + (module_name, false) + }; + + let module_name = if let Some(module_name) = module_name.strip_suffix(".ko") { + module_name + } else { + // Not a kernel module + continue; + }; + + let contents = read_to_end(path, compressed) + .with_context(|| format!("read_to_end({})", path.display()))?; + + read_aliases_from_module(&contents, module_name, &mut output) + .with_context(|| format!("failed to read aliases from module {}", path.display()))?; + } + Ok(()) +} + +fn read_aliases_from_module( + contents: &[u8], + module_name: &str, + output: &mut BufWriter<&File>, +) -> Result<(), anyhow::Error> { + let obj = object::read::File::parse(contents).context("failed to parse")?; + + let section = (|| -> anyhow::Result>> { + for s in obj.sections() { + let name = s + .name_bytes() + .with_context(|| format!("failed to get name of section idx {}", s.index()))?; + if name == b".modinfo" { + return Ok(Some(s)); + } + } + Ok(None) + })()?; + let section = section.context("failed to find .modinfo section")?; + let section_idx = section.index(); + let data = section + .data() + .context("failed to get modinfo section data")?; + + for s in obj.symbols() { + if s.section_index() != Some(section_idx) { + continue; + } + let name = s + .name() + .with_context(|| format!("failed to get name of symbol idx {}", s.index()))?; + if name.contains("alias") { + let start = s.address() as usize; + let end = start + s.size() as usize; + let sym_data = &data[start..end]; + let cstr = std::ffi::CStr::from_bytes_with_nul(sym_data) + .with_context(|| format!("failed to convert {sym_data:?} to cstr"))?; + let sym_str = cstr + .to_str() + .with_context(|| format!("failed to convert {cstr:?} to str"))?; + let alias = sym_str + .strip_prefix("alias=") + .with_context(|| format!("failed to strip prefix 'alias=' from {sym_str}"))?; + writeln!(output, "alias {alias} {module_name}").expect("write"); + } + } + Ok(()) +} diff --git a/init/src/main.rs b/test-distro/src/init.rs similarity index 74% rename from init/src/main.rs rename to test-distro/src/init.rs index ddb46e64..5833adc0 100644 --- a/init/src/main.rs +++ b/test-distro/src/init.rs @@ -15,7 +15,7 @@ impl std::fmt::Display for Errors { if i != 0 { writeln!(f)?; } - write!(f, "{:?}", error)?; + write!(f, "{error:?}")?; } Ok(()) } @@ -57,6 +57,14 @@ fn run() -> anyhow::Result<()> { data: None, target_mode: Some(RXRXRX), }, + Mount { + source: "dev", + target: "/dev", + fstype: "devtmpfs", + flags: nix::mount::MsFlags::empty(), + data: None, + target_mode: None, + }, Mount { source: "sysfs", target: "/sys", @@ -81,6 +89,22 @@ fn run() -> anyhow::Result<()> { data: None, target_mode: None, }, + Mount { + source: "cgroup2", + target: "/sys/fs/cgroup", + fstype: "cgroup2", + flags: nix::mount::MsFlags::empty(), + data: None, + target_mode: None, + }, + Mount { + source: "securityfs", + target: "/sys/kernel/security", + fstype: "securityfs", + flags: nix::mount::MsFlags::empty(), + data: None, + target_mode: None, + }, ] { match target_mode { None => { @@ -126,20 +150,31 @@ fn run() -> anyhow::Result<()> { .map(|entry| { let entry = entry.context("read_dir(/bin) failed")?; let path = entry.path(); - let status = std::process::Command::new(&path) - .args(&args) + let mut cmd = std::process::Command::new(&path); + cmd.args(&args) + .env("RUST_BACKTRACE", "1") + .env("RUST_LOG", "debug"); + + println!("running {cmd:?}"); + + let status = cmd .status() - .with_context(|| format!("failed to execute {}", path.display()))?; + .with_context(|| format!("failed to run {cmd:?}"))?; if status.code() == Some(0) { Ok(()) } else { - Err(anyhow::anyhow!("{} failed: {status:?}", path.display())) + Err(anyhow::anyhow!("{cmd:?} failed: {status:?}")) } }) - .filter_map(|result| match result { - Ok(()) => None, - Err(err) => Some(err), + .filter_map(|result| { + // TODO(https://github.com/rust-lang/rust-clippy/issues/14112): Remove this allowance + // when the lint behaves more sensibly. + #[expect(clippy::manual_ok_err)] + match result { + Ok(()) => None, + Err(err) => Some(err), + } }) .collect::>(); if errors.is_empty() { @@ -160,6 +195,10 @@ fn main() { } } let how = nix::sys::reboot::RebootMode::RB_POWER_OFF; - let _: std::convert::Infallible = nix::sys::reboot::reboot(how) - .unwrap_or_else(|err| panic!("reboot({how:?}) failed: {err:?}")); + match nix::sys::reboot::reboot(how) { + Ok(infallible) => match infallible {}, + Err(err) => { + panic!("reboot({how:?}) failed: {err:?}") + } + } } diff --git a/test-distro/src/lib.rs b/test-distro/src/lib.rs new file mode 100644 index 00000000..77a9b299 --- /dev/null +++ b/test-distro/src/lib.rs @@ -0,0 +1,65 @@ +use std::path::PathBuf; + +use anyhow::Context as _; +use nix::sys::utsname::uname; + +/// Kernel modules are in `/lib/modules`. +/// They may be in the root of this directory, +/// or in subdirectory named after the kernel release. +pub fn resolve_modules_dir() -> anyhow::Result { + let modules_dir = PathBuf::from("/lib/modules"); + let stat = modules_dir + .metadata() + .with_context(|| format!("stat(): {}", modules_dir.display()))?; + if stat.is_dir() { + return Ok(modules_dir); + } + + let utsname = uname().context("uname()")?; + let release = utsname.release(); + let modules_dir = modules_dir.join(release); + let stat = modules_dir + .metadata() + .with_context(|| format!("stat(): {}", modules_dir.display()))?; + anyhow::ensure!( + stat.is_dir(), + "{} is not a directory", + modules_dir.display() + ); + Ok(modules_dir) +} + +pub fn read_to_end(path: &std::path::Path, compressed: bool) -> anyhow::Result> { + use std::io::Read as _; + + let mut f = std::fs::File::open(path).context("open()")?; + + let mut contents = Vec::new(); + + if compressed { + #[cfg(feature = "xz2")] + { + let stat = f.metadata().context("metadata()")?; + #[expect(clippy::manual_ok_err)] + let len = match usize::try_from(stat.len()) { + Ok(len) => Some(len), + Err(std::num::TryFromIntError { .. }) => None, + } + .and_then(|len| len.checked_mul(2)) + .ok_or_else(|| anyhow::anyhow!("2 * {stat:?}.len() is too large to fit in a usize"))?; + contents.reserve(len); + + xz2::read::XzDecoder::new(f).read_to_end(&mut contents) + } + + #[cfg(not(feature = "xz2"))] + { + anyhow::bail!("cannot read {} without xz2 feature", path.display()); + } + } else { + f.read_to_end(&mut contents) + } + .context("read_to_end()")?; + + Ok(contents) +} diff --git a/test-distro/src/modprobe.rs b/test-distro/src/modprobe.rs new file mode 100644 index 00000000..de56c757 --- /dev/null +++ b/test-distro/src/modprobe.rs @@ -0,0 +1,122 @@ +//! modprobe is used to load kernel modules into the kernel. +//! +//! This implementation is incredibly naive and is only designed to work within +//! the constraints of the test environment. Not for production use. + +use std::{fs::File, io::BufRead as _, path::Path}; + +use anyhow::{Context as _, anyhow, bail}; +use clap::Parser; +use glob::glob; +use nix::kmod::init_module; +use test_distro::{read_to_end, resolve_modules_dir}; + +macro_rules! output { + ($quiet:expr, $($arg:tt)*) => { + if !$quiet { + println!($($arg)*); + } + }; +} + +#[derive(Parser)] +struct Args { + /// Suppress all output and don't return an error code. + #[clap(short, long, default_value = "false")] + quiet: bool, + + /// The name of the module to load. + /// This can be either an alias like `net-sched-sch-ingress` or a module + /// name like `sch_ingress`. + name: String, +} + +fn main() -> anyhow::Result<()> { + let Args { quiet, name } = Parser::parse(); + let ret = try_main(quiet, name); + if quiet { Ok(()) } else { ret } +} + +fn try_main(quiet: bool, name: String) -> anyhow::Result<()> { + let modules_dir = resolve_modules_dir()?; + + output!(quiet, "resolving alias for module: {}", name); + let module = resolve_alias(quiet, &modules_dir, &name)?; + + let pattern = format!( + "{}/kernel/**/{}.ko*", + modules_dir + .to_str() + .ok_or_else(|| anyhow!("failed to convert {} to string", modules_dir.display()))?, + module + ); + let module_path = glob(&pattern) + .with_context(|| format!("failed to glob: {pattern}"))? + .next() + .ok_or_else(|| anyhow!("module not found: {}", module))? + .context("glob error")?; + + output!(quiet, "loading module: {}", module_path.display()); + + let extension = module_path + .as_path() + .extension() + .ok_or_else(|| anyhow!("module has no extension: {}", module_path.display()))?; + + let contents = read_to_end(&module_path, extension == "xz") + .with_context(|| format!("read_to_end({})", module_path.display()))?; + + if !contents.starts_with(&[0x7f, 0x45, 0x4c, 0x46]) { + bail!("module is not an valid ELF file"); + } + + match init_module(&contents, c"") { + Ok(()) => { + output!(quiet, "module loaded successfully"); + Ok(()) + } + Err(e) => { + if e == nix::errno::Errno::EEXIST { + Err(anyhow!("module already loaded")) + } else { + Err(anyhow!("failed to load module: {}", e)) + } + } + } +} + +fn resolve_alias(quiet: bool, module_dir: &Path, name: &str) -> anyhow::Result { + let modules_alias = module_dir.join("modules.alias"); + output!( + quiet, + "opening modules.alias file: {}", + modules_alias.display() + ); + let alias_file = File::open(&modules_alias) + .with_context(|| format!("open(): {}", modules_alias.display()))?; + let alias_file = std::io::BufReader::new(alias_file); + + for line in alias_file.lines() { + let line = line?; + if line.starts_with("alias ") { + let mut parts = line.split_whitespace(); + let prefix = parts.next(); + if prefix != Some("alias") { + bail!("alias line incorrect prefix: {}", line); + } + let alias = parts + .next() + .with_context(|| format!("alias line missing alias: {line}"))?; + let module = parts + .next() + .with_context(|| format!("alias line missing module: {line}"))?; + if parts.next().is_some() { + bail!("alias line has too many parts: {}", line); + } + if alias == name { + return Ok(module.to_string()); + } + } + } + bail!("alias not found: {}", name) +} diff --git a/test/README.md b/test/README.md index fa3eebca..57da51ed 100644 --- a/test/README.md +++ b/test/README.md @@ -27,7 +27,7 @@ cargo xtask integration-test local ### Virtualized ```bash -cargo xtask integration-test vm +cargo xtask integration-test vm --cache-dir ... ``` ### Writing an integration test diff --git a/init/Cargo.toml b/test/integration-common/Cargo.toml similarity index 54% rename from init/Cargo.toml rename to test/integration-common/Cargo.toml index eda21d06..437f87e9 100644 --- a/init/Cargo.toml +++ b/test/integration-common/Cargo.toml @@ -1,13 +1,20 @@ [package] -name = "init" -version = "0.1.0" +name = "integration-common" publish = false +version = "0.1.0" + authors.workspace = true +edition.workspace = true +homepage.workspace = true license.workspace = true repository.workspace = true -homepage.workspace = true -edition.workspace = true +rust-version.workspace = true + +[lints] +workspace = true [dependencies] -anyhow = { workspace = true, features = ["std"] } -nix = { workspace = true, features = ["fs", "mount", "reboot"] } +aya = { path = "../../aya", optional = true } + +[features] +user = ["aya"] diff --git a/test/integration-common/src/lib.rs b/test/integration-common/src/lib.rs new file mode 100644 index 00000000..89179841 --- /dev/null +++ b/test/integration-common/src/lib.rs @@ -0,0 +1,114 @@ +#![no_std] + +pub mod array { + pub const GET_INDEX: u32 = 0; + pub const GET_PTR_INDEX: u32 = 1; + pub const GET_PTR_MUT_INDEX: u32 = 2; +} + +pub mod bpf_probe_read { + pub const RESULT_BUF_LEN: usize = 1024; + + #[derive(Copy, Clone)] + #[repr(C)] + pub struct TestResult { + pub buf: [u8; RESULT_BUF_LEN], + pub len: Option>, + } + + #[cfg(feature = "user")] + unsafe impl aya::Pod for TestResult {} +} + +pub mod log { + pub const BUF_LEN: usize = 1024; + + #[derive(Copy, Clone)] + #[repr(C)] + pub struct Buffer { + pub buf: [u8; BUF_LEN], // 64 KiB, one more than LogValueLength::MAX. + pub len: usize, + } + + #[cfg(feature = "user")] + unsafe impl aya::Pod for Buffer {} +} + +pub mod raw_tracepoint { + #[repr(C)] + #[derive(Clone, Copy)] + pub struct SysEnterEvent { + pub common_type: u16, + pub common_flags: u8, + _padding: u8, // Padding must be explicit to ensure zero-initialization. + } + + #[cfg(feature = "user")] + unsafe impl aya::Pod for SysEnterEvent {} +} + +pub mod ring_buf { + // This structure's definition is duplicated in the probe. + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq, Default)] + pub struct Registers { + pub dropped: u64, + pub rejected: u64, + } + + impl core::ops::Add for Registers { + type Output = Self; + fn add(self, rhs: Self) -> Self::Output { + Self { + dropped: self.dropped + rhs.dropped, + rejected: self.rejected + rhs.rejected, + } + } + } + + impl<'a> core::iter::Sum<&'a Self> for Registers { + fn sum>(iter: I) -> Self { + iter.fold(Default::default(), |a, b| a + *b) + } + } + + #[cfg(feature = "user")] + unsafe impl aya::Pod for Registers {} +} + +pub mod strncmp { + #[derive(Copy, Clone)] + #[repr(C)] + pub struct TestResult(pub core::cmp::Ordering); + + #[cfg(feature = "user")] + unsafe impl aya::Pod for TestResult {} +} + +pub mod linear_data_structures { + pub const PEEK_INDEX: u32 = 0; + pub const POP_INDEX: u32 = 1; +} + +pub mod sk_storage { + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + #[repr(C)] + pub enum Ip { + V4(u32), + V6([u32; 4]), + } + + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + #[repr(C)] + pub struct Value { + pub user_family: u32, + pub user_ip: Ip, + pub user_port: u32, + pub family: u32, + pub type_: u32, + pub protocol: u32, + } + + #[cfg(feature = "user")] + unsafe impl aya::Pod for Value {} +} diff --git a/test/integration-ebpf/.cargo/config.toml b/test/integration-ebpf/.cargo/config.toml deleted file mode 100644 index d8d7a20c..00000000 --- a/test/integration-ebpf/.cargo/config.toml +++ /dev/null @@ -1,12 +0,0 @@ -# We have this so that one doesn't need to manually pass -# --target=bpfel-unknown-none -Z build-std=core when running cargo -# check/build/doc etc. -# -# NB: this file gets loaded only if you run cargo from this directory, it's -# ignored if you run from the workspace root. See -# https://doc.rust-lang.org/cargo/reference/config.html#hierarchical-structure -[build] -target = ["bpfeb-unknown-none", "bpfel-unknown-none"] - -[unstable] -build-std = ["core"] diff --git a/test/integration-ebpf/Cargo.toml b/test/integration-ebpf/Cargo.toml index b4146daa..cb52e728 100644 --- a/test/integration-ebpf/Cargo.toml +++ b/test/integration-ebpf/Cargo.toml @@ -1,21 +1,41 @@ [package] name = "integration-ebpf" -version = "0.1.0" publish = false +version = "0.1.0" + authors.workspace = true +edition.workspace = true +homepage.workspace = true license.workspace = true repository.workspace = true -homepage.workspace = true -edition.workspace = true +rust-version.workspace = true + +[lints] +workspace = true [dependencies] aya-ebpf = { path = "../../ebpf/aya-ebpf" } aya-log-ebpf = { path = "../../ebpf/aya-log-ebpf" } +ebpf-panic = { path = "../../ebpf-panic" } +integration-common = { path = "../integration-common" } +network-types = { workspace = true } [build-dependencies] -which = { workspace = true } +which = { workspace = true, features = ["real-sys"] } xtask = { path = "../../xtask" } +[[bin]] +name = "array" +path = "src/array.rs" + +[[bin]] +name = "bpf_probe_read" +path = "src/bpf_probe_read.rs" + +[[bin]] +name = "linear_data_structures" +path = "src/linear_data_structures.rs" + [[bin]] name = "log" path = "src/log.rs" @@ -24,6 +44,10 @@ path = "src/log.rs" name = "map_test" path = "src/map_test.rs" +[[bin]] +name = "memmove_test" +path = "src/memmove_test.rs" + [[bin]] name = "name_test" path = "src/name_test.rs" @@ -33,29 +57,49 @@ name = "pass" path = "src/pass.rs" [[bin]] -name = "test" -path = "src/test.rs" +name = "raw_tracepoint" +path = "src/raw_tracepoint.rs" + +[[bin]] +name = "redirect" +path = "src/redirect.rs" [[bin]] name = "relocations" path = "src/relocations.rs" [[bin]] -name = "bpf_probe_read" -path = "src/bpf_probe_read.rs" +name = "ring_buf" +path = "src/ring_buf.rs" [[bin]] -name = "two_progs" -path = "src/two_progs.rs" +name = "sk_storage" +path = "src/sk_storage.rs" [[bin]] -name = "redirect" -path = "src/redirect.rs" +name = "simple_prog" +path = "src/simple_prog.rs" + +[[bin]] +name = "strncmp" +path = "src/strncmp.rs" + +[[bin]] +name = "tcx" +path = "src/tcx.rs" + +[[bin]] +name = "test" +path = "src/test.rs" + +[[bin]] +name = "two_progs" +path = "src/two_progs.rs" [[bin]] name = "xdp_sec" path = "src/xdp_sec.rs" [[bin]] -name = "ring_buf" -path = "src/ring_buf.rs" +name = "uprobe_cookie" +path = "src/uprobe_cookie.rs" diff --git a/test/integration-ebpf/build.rs b/test/integration-ebpf/build.rs index d339e195..f6067c5a 100644 --- a/test/integration-ebpf/build.rs +++ b/test/integration-ebpf/build.rs @@ -14,9 +14,8 @@ use xtask::AYA_BUILD_INTEGRATION_BPF; /// which would likely mean far too much cache invalidation. /// /// [bindeps]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html?highlight=feature#artifact-dependencies - fn main() { - println!("cargo:rerun-if-env-changed={}", AYA_BUILD_INTEGRATION_BPF); + println!("cargo:rerun-if-env-changed={AYA_BUILD_INTEGRATION_BPF}"); let build_integration_bpf = env::var(AYA_BUILD_INTEGRATION_BPF) .as_deref() diff --git a/test/integration-ebpf/rust-toolchain.toml b/test/integration-ebpf/rust-toolchain.toml deleted file mode 100644 index 5d56faf9..00000000 --- a/test/integration-ebpf/rust-toolchain.toml +++ /dev/null @@ -1,2 +0,0 @@ -[toolchain] -channel = "nightly" diff --git a/test/integration-ebpf/src/array.rs b/test/integration-ebpf/src/array.rs new file mode 100644 index 00000000..659f06fc --- /dev/null +++ b/test/integration-ebpf/src/array.rs @@ -0,0 +1,91 @@ +#![no_std] +#![no_main] +#![expect(unused_crate_dependencies, reason = "used in other bins")] + +#[cfg(not(test))] +extern crate ebpf_panic; + +use aya_ebpf::{ + btf_maps::Array, + cty::c_long, + macros::{btf_map, map, uprobe}, + maps::Array as LegacyArray, + programs::ProbeContext, +}; +use integration_common::array::{GET_INDEX, GET_PTR_INDEX, GET_PTR_MUT_INDEX}; + +#[btf_map] +static RESULT: Array = Array::new(); +#[btf_map] +static ARRAY: Array = Array::new(); + +#[map] +static RESULT_LEGACY: LegacyArray = LegacyArray::with_max_entries(3, 0); +#[map] +static ARRAY_LEGACY: LegacyArray = LegacyArray::with_max_entries(10, 0); + +macro_rules! define_array_test { + ( + $result_map:ident, + $array_map:ident, + $result_set_fn:ident, + $set_prog:ident, + $get_prog:ident, + $get_ptr_prog:ident, + $get_ptr_mut_prog:ident + $(,)? + ) => { + #[inline(always)] + fn $result_set_fn(index: u32, value: u32) -> Result<(), c_long> { + let ptr = $result_map.get_ptr_mut(index).ok_or(-1)?; + let dst = unsafe { ptr.as_mut() }; + let dst_res = dst.ok_or(-1)?; + *dst_res = value; + Ok(()) + } + + #[uprobe] + fn $set_prog(ctx: ProbeContext) -> Result<(), c_long> { + let index = ctx.arg(0).ok_or(-1)?; + let value = ctx.arg(1).ok_or(-1)?; + $array_map.set(index, &value, 0)?; + Ok(()) + } + + #[uprobe] + fn $get_prog(ctx: ProbeContext) -> Result<(), c_long> { + let index = ctx.arg(0).ok_or(-1)?; + let value = $array_map.get(index).ok_or(-1)?; + $result_set_fn(GET_INDEX, *value)?; + Ok(()) + } + + #[uprobe] + fn $get_ptr_prog(ctx: ProbeContext) -> Result<(), c_long> { + let index = ctx.arg(0).ok_or(-1)?; + let value = $array_map.get_ptr(index).ok_or(-1)?; + $result_set_fn(GET_PTR_INDEX, unsafe { *value })?; + Ok(()) + } + + #[uprobe] + fn $get_ptr_mut_prog(ctx: ProbeContext) -> Result<(), c_long> { + let index = ctx.arg(0).ok_or(-1)?; + let ptr = $array_map.get_ptr_mut(index).ok_or(-1)?; + let value = unsafe { *ptr }; + $result_set_fn(GET_PTR_MUT_INDEX, value)?; + Ok(()) + } + }; +} + +define_array_test!(RESULT, ARRAY, result_set, set, get, get_ptr, get_ptr_mut); +define_array_test!( + RESULT_LEGACY, + ARRAY_LEGACY, + result_set_legacy, + set_legacy, + get_legacy, + get_ptr_legacy, + get_ptr_mut_legacy, +); diff --git a/test/integration-ebpf/src/bpf_probe_read.rs b/test/integration-ebpf/src/bpf_probe_read.rs index 87118198..24c16d16 100644 --- a/test/integration-ebpf/src/bpf_probe_read.rs +++ b/test/integration-ebpf/src/bpf_probe_read.rs @@ -1,5 +1,6 @@ #![no_std] #![no_main] +#![expect(unused_crate_dependencies, reason = "used in other bins")] use aya_ebpf::{ helpers::{bpf_probe_read_kernel_str_bytes, bpf_probe_read_user_str_bytes}, @@ -7,8 +8,9 @@ use aya_ebpf::{ maps::Array, programs::ProbeContext, }; - -const RESULT_BUF_LEN: usize = 1024; +use integration_common::bpf_probe_read::{RESULT_BUF_LEN, TestResult}; +#[cfg(not(test))] +extern crate ebpf_panic; fn read_str_bytes( fun: unsafe fn(*const u8, &mut [u8]) -> Result<&[u8], i64>, @@ -30,9 +32,8 @@ fn read_str_bytes( }; *len = None; - // len comes from ctx.arg(1) so it's dynamic and the verifier - // doesn't see any bounds. We do len.min(RESULT_BUF_LEN) here to - // ensure that the verifier can see the upper bound, or you get: + // len comes from ctx.arg(1) so it's dynamic and the verifier doesn't see any bounds. We slice + // here to ensure that the verifier can see the upper bound, or you get: // // 18: (79) r7 = *(u64 *)(r7 +8) ; R7_w=scalar() // [snip] @@ -47,12 +48,6 @@ fn read_str_bytes( *len = Some(unsafe { fun(iptr, buf) }.map(<[_]>::len)); } -#[repr(C)] -struct TestResult { - buf: [u8; RESULT_BUF_LEN], - len: Option>, -} - #[map] static RESULT: Array = Array::with_max_entries(1, 0); @@ -60,7 +55,7 @@ static RESULT: Array = Array::with_max_entries(1, 0); static KERNEL_BUFFER: Array<[u8; RESULT_BUF_LEN]> = Array::with_max_entries(1, 0); #[uprobe] -pub fn test_bpf_probe_read_user_str_bytes(ctx: ProbeContext) { +fn test_bpf_probe_read_user_str_bytes(ctx: ProbeContext) { read_str_bytes( bpf_probe_read_user_str_bytes, ctx.arg::<*const u8>(0), @@ -69,7 +64,7 @@ pub fn test_bpf_probe_read_user_str_bytes(ctx: ProbeContext) { } #[uprobe] -pub fn test_bpf_probe_read_kernel_str_bytes(ctx: ProbeContext) { +fn test_bpf_probe_read_kernel_str_bytes(ctx: ProbeContext) { read_str_bytes( bpf_probe_read_kernel_str_bytes, KERNEL_BUFFER @@ -79,9 +74,3 @@ pub fn test_bpf_probe_read_kernel_str_bytes(ctx: ProbeContext) { ctx.arg::(0), ); } - -#[cfg(not(test))] -#[panic_handler] -fn panic(_info: &core::panic::PanicInfo) -> ! { - loop {} -} diff --git a/test/integration-ebpf/src/lib.rs b/test/integration-ebpf/src/lib.rs index 3ac3e595..a1562fc9 100644 --- a/test/integration-ebpf/src/lib.rs +++ b/test/integration-ebpf/src/lib.rs @@ -1,3 +1,4 @@ #![no_std] +#![expect(unused_crate_dependencies, reason = "used in bins")] // This file exists to enable the library target. diff --git a/test/integration-ebpf/src/linear_data_structures.rs b/test/integration-ebpf/src/linear_data_structures.rs new file mode 100644 index 00000000..8d027fc2 --- /dev/null +++ b/test/integration-ebpf/src/linear_data_structures.rs @@ -0,0 +1,70 @@ +#![no_std] +#![no_main] +#![expect(unused_crate_dependencies, reason = "used in other bins")] + +#[cfg(not(test))] +extern crate ebpf_panic; + +use aya_ebpf::{ + cty::c_long, + macros::{map, uprobe}, + maps::{Array, Queue, Stack}, + programs::ProbeContext, +}; +use integration_common::linear_data_structures::{PEEK_INDEX, POP_INDEX}; + +#[map] +static RESULT: Array = Array::::with_max_entries(2, 0); + +#[inline(always)] +fn result_set(index: u32, value: u64) -> Result<(), c_long> { + let ptr = RESULT.get_ptr_mut(index).ok_or(-1)?; + let dst = unsafe { ptr.as_mut() }; + let dst_res = dst.ok_or(-1)?; + *dst_res = value; + Ok(()) +} + +macro_rules! define_linear_ds_test { + ($Type:ident, $map_ident:ident, + push_fn: $push_fn:ident, + pop_fn: $pop_fn:ident, + peek_fn: $peek_fn:ident, + ) => { + #[map] + static $map_ident: $Type = $Type::with_max_entries(10, 0); + + #[uprobe] + fn $push_fn(ctx: ProbeContext) -> Result<(), c_long> { + let value = ctx.arg(0).ok_or(-1)?; + $map_ident.push(&value, 0)?; + Ok(()) + } + + #[uprobe] + fn $pop_fn(_: ProbeContext) -> Result<(), c_long> { + let value = $map_ident.pop().ok_or(-1)?; + result_set(POP_INDEX, value)?; + Ok(()) + } + + #[uprobe] + fn $peek_fn(_: ProbeContext) -> Result<(), c_long> { + let value = $map_ident.peek().ok_or(-1)?; + result_set(PEEK_INDEX, value)?; + Ok(()) + } + }; +} + +define_linear_ds_test!(Stack, TEST_STACK, + push_fn: test_stack_push, + pop_fn: test_stack_pop, + peek_fn: test_stack_peek, +); + +define_linear_ds_test!(Queue, TEST_QUEUE, + push_fn: test_queue_push, + pop_fn: test_queue_pop, + peek_fn: test_queue_peek, +); diff --git a/test/integration-ebpf/src/log.rs b/test/integration-ebpf/src/log.rs index b4f71341..b55b7276 100644 --- a/test/integration-ebpf/src/log.rs +++ b/test/integration-ebpf/src/log.rs @@ -1,11 +1,31 @@ #![no_std] #![no_main] +#![expect(unused_crate_dependencies, reason = "used in other bins")] -use aya_ebpf::{macros::uprobe, programs::ProbeContext}; +use core::{ + hint::black_box, + net::{IpAddr, Ipv4Addr, Ipv6Addr}, +}; + +use aya_ebpf::{ + macros::{map, uprobe}, + maps::Array, + programs::ProbeContext, +}; use aya_log_ebpf::{debug, error, info, trace, warn}; +use integration_common::log::Buffer; +#[cfg(not(test))] +extern crate ebpf_panic; + +#[map] +static BUFFER: Array = Array::with_max_entries(1, 0); + +const TWO_KB_ARRAY: [u8; 2048] = [0u8; 2048]; +const FOUR_KB_ARRAY: [u8; 4096] = [0u8; 4096]; +const EIGHT_KB_ARRAY: [u8; 8192] = [0u8; 8192]; #[uprobe] -pub fn test_log(ctx: ProbeContext) { +fn test_log(ctx: ProbeContext) { debug!(&ctx, "Hello from eBPF!"); error!( &ctx, @@ -15,22 +35,62 @@ pub fn test_log(ctx: ProbeContext) { "wao", "wao".as_bytes() ); - let ipv4 = 167772161u32; // 10.0.0.1 - let ipv6 = [ - 32u8, 1u8, 13u8, 184u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 1u8, - ]; // 2001:db8::1 - info!(&ctx, "ipv4: {:i}, ipv6: {:i}", ipv4, ipv6); + + // 10.0.0.1 + let ipv4 = Ipv4Addr::new(10, 0, 0, 1); + // 2001:db8::1 + let ipv6 = Ipv6Addr::new(8193, 3512, 0, 0, 0, 0, 0, 1); + info!( + &ctx, + "ip structs, without format hint: ipv4: {}, ipv6: {}", ipv4, ipv6 + ); + info!( + &ctx, + "ip structs, with format hint: ipv4: {:i}, ipv6: {:i}", ipv4, ipv6 + ); + + let ipv4_enum = IpAddr::V4(ipv4); + let ipv6_enum = IpAddr::V6(ipv6); + info!( + &ctx, + "ip enums, without format hint: ipv4: {}, ipv6: {}", ipv4_enum, ipv6_enum + ); + info!( + &ctx, + "ip enums, with format hint: ipv4: {:i}, ipv6: {:i}", ipv4_enum, ipv6_enum + ); + + // We don't format `Ipv6Addr::to_bits`, because `u128` is not supported by + // eBPF. Even though Rust compiler does not complain, verifier would throw + // an error about returning values not fitting into 64-bit registers. + info!(&ctx, "ip as bits: ipv4: {:i}", ipv4.to_bits()); + + info!( + &ctx, + "ip as octets: ipv4: {:i}, ipv6: {:i}", + ipv4.octets(), + ipv6.octets() + ); + let mac = [4u8, 32u8, 6u8, 9u8, 0u8, 64u8]; trace!(&ctx, "mac lc: {:mac}, mac uc: {:MAC}", mac, mac); let hex = 0x2f; warn!(&ctx, "hex lc: {:x}, hex uc: {:X}", hex, hex); let hex = [0xde, 0xad, 0xbe, 0xef].as_slice(); debug!(&ctx, "hex lc: {:x}, hex uc: {:X}", hex, hex); - let len = 42; - let size = 43; - let slice = 44; - let record = 45; - debug!(&ctx, "{} {} {} {}", len, size, slice, record); + let header = 42; + let tmp = 43; + let kind = 44; + let value = 45; + let size = 46; + let op = 47; + let buf = 48; + debug!( + &ctx, + "{} {} {} {} {} {} {}", header, tmp, kind, value, size, op, buf + ); + let ptr = 0xdeadbeef as *const u8; + debug!(&ctx, "ptr: {:p}", ptr); // Testing compilation only. if false { @@ -44,12 +104,28 @@ pub fn test_log(ctx: ProbeContext) { let no_copy = NoCopy {}; - debug!(&ctx, "{:x}", no_copy.consume()); + // Check usage in expression position. + let () = debug!(&ctx, "{:x}", no_copy.consume()); } + + let Some(Buffer { buf, len }) = BUFFER.get(0) else { + return; + }; + let len = *len; + let buf = &buf[..core::cmp::min(len, buf.len())]; + info!(&ctx, "variable length buffer: {:x}", buf); + + info!(&ctx, "2KiB array: {:x}", TWO_KB_ARRAY.as_slice()); + info!(&ctx, "4KiB array: {:x}", FOUR_KB_ARRAY.as_slice()); + // This one is too big and should be dropped. + info!(&ctx, "8KiB array: {:x}", EIGHT_KB_ARRAY.as_slice()); } -#[cfg(not(test))] -#[panic_handler] -fn panic(_info: &core::panic::PanicInfo) -> ! { - loop {} +#[uprobe] +fn test_log_omission(ctx: ProbeContext) { + debug!( + &ctx, + "This is the last u32: {}", + black_box(0u32..).last().unwrap_or(u32::MAX) + ); } diff --git a/test/integration-ebpf/src/map_test.rs b/test/integration-ebpf/src/map_test.rs index 242207b8..0135487a 100644 --- a/test/integration-ebpf/src/map_test.rs +++ b/test/integration-ebpf/src/map_test.rs @@ -1,33 +1,54 @@ #![no_std] #![no_main] +#![expect(unused_crate_dependencies, reason = "used in other bins")] use aya_ebpf::{ - bindings::xdp_action, - macros::{map, xdp}, - maps::Array, - programs::XdpContext, + macros::{map, socket_filter, uprobe}, + maps::{Array, HashMap}, + programs::{ProbeContext, SkBuffContext}, }; +#[cfg(not(test))] +extern crate ebpf_panic; +// Introduced in kernel v3.19. #[map] static FOO: Array = Array::::with_max_entries(10, 0); +// Introduced in kernel v3.19. #[map(name = "BAR")] -static BAZ: Array = Array::::with_max_entries(10, 0); +static BAZ: HashMap = HashMap::::with_max_entries(8, 0); -#[xdp(frags)] -pub fn pass(ctx: XdpContext) -> u32 { - match unsafe { try_pass(ctx) } { - Ok(ret) => ret, - Err(_) => xdp_action::XDP_ABORTED, - } -} +// The limit of map names is 16 (including a NUL byte). Ensure that we are +// able to create maps with names exceeding that limit by truncating them. +#[map(name = "MAP_WITH_LOOOONG_NAAAAAAAAME")] +static MAP_WITH_LOOOONG_NAAAAAAAAME: HashMap = HashMap::::with_max_entries(8, 0); -unsafe fn try_pass(_ctx: XdpContext) -> Result { - Ok(xdp_action::XDP_PASS) +// Introduced in kernel v3.19. +#[socket_filter] +fn simple_prog(_ctx: SkBuffContext) -> i64 { + // So that these maps show up under the `map_ids` field. + FOO.get(0); + // If we use the literal value `0` instead of the local variable `i`, then an additional + // `.rodata` map will be associated with the program. + let i = 0; + BAZ.get_ptr(i); + + 0 } -#[cfg(not(test))] -#[panic_handler] -fn panic(_info: &core::panic::PanicInfo) -> ! { - loop {} +#[uprobe] +fn simple_prog_mut(_ctx: ProbeContext) -> i64 { + if let Some(array_value) = FOO.get_ptr_mut(0) { + unsafe { + *array_value += 1; + } + } + + if let Some(map_value) = BAZ.get_ptr_mut(0) { + unsafe { + *map_value += 1; + } + } + + 0 } diff --git a/test/integration-ebpf/src/memmove_test.rs b/test/integration-ebpf/src/memmove_test.rs new file mode 100644 index 00000000..c39a292a --- /dev/null +++ b/test/integration-ebpf/src/memmove_test.rs @@ -0,0 +1,58 @@ +#![no_std] +#![no_main] +#![expect(unused_crate_dependencies, reason = "used in other bins")] + +use core::mem; + +use aya_ebpf::{ + bindings::{BPF_F_NO_PREALLOC, xdp_action}, + macros::{map, xdp}, + maps::HashMap, + programs::XdpContext, +}; +#[cfg(not(test))] +extern crate ebpf_panic; +use network_types::{ + eth::{EthHdr, EtherType}, + ip::Ipv6Hdr, +}; + +#[inline(always)] +fn ptr_at(ctx: &XdpContext, offset: usize) -> Result<*const T, ()> { + let start = ctx.data(); + let end = ctx.data_end(); + let len = mem::size_of::(); + + if start + offset + len > end { + return Err(()); + } + + Ok((start + offset) as *const T) +} + +struct Value { + pub orig_ip: [u8; 16], +} + +#[map] +static RULES: HashMap = HashMap::::with_max_entries(1, BPF_F_NO_PREALLOC); + +#[xdp] +fn do_dnat(ctx: XdpContext) -> u32 { + try_do_dnat(ctx).unwrap_or(xdp_action::XDP_DROP) +} + +fn try_do_dnat(ctx: XdpContext) -> Result { + let index = 0; + if let Some(nat) = unsafe { RULES.get(index) } { + let hproto: *const EtherType = ptr_at(&ctx, mem::offset_of!(EthHdr, ether_type))?; + match unsafe { *hproto } { + EtherType::Ipv6 => { + let ip_hdr: *const Ipv6Hdr = ptr_at(&ctx, EthHdr::LEN)?; + unsafe { (*ip_hdr.cast_mut()).dst_addr = nat.orig_ip }; + } + _ => return Ok(xdp_action::XDP_PASS), + } + } + Ok(xdp_action::XDP_PASS) +} diff --git a/test/integration-ebpf/src/name_test.rs b/test/integration-ebpf/src/name_test.rs index d1b48950..713d3258 100644 --- a/test/integration-ebpf/src/name_test.rs +++ b/test/integration-ebpf/src/name_test.rs @@ -1,10 +1,13 @@ #![no_std] #![no_main] +#![expect(unused_crate_dependencies, reason = "used in other bins")] use aya_ebpf::{bindings::xdp_action, macros::xdp, programs::XdpContext}; +#[cfg(not(test))] +extern crate ebpf_panic; #[xdp] -pub fn ihaveaverylongname(ctx: XdpContext) -> u32 { +fn ihaveaverylongname(ctx: XdpContext) -> u32 { match unsafe { try_pass(ctx) } { Ok(ret) => ret, Err(_) => xdp_action::XDP_ABORTED, @@ -14,9 +17,3 @@ pub fn ihaveaverylongname(ctx: XdpContext) -> u32 { unsafe fn try_pass(_ctx: XdpContext) -> Result { Ok(xdp_action::XDP_PASS) } - -#[cfg(not(test))] -#[panic_handler] -fn panic(_info: &core::panic::PanicInfo) -> ! { - loop {} -} diff --git a/test/integration-ebpf/src/pass.rs b/test/integration-ebpf/src/pass.rs index 795d82b0..f1d75e51 100644 --- a/test/integration-ebpf/src/pass.rs +++ b/test/integration-ebpf/src/pass.rs @@ -1,12 +1,15 @@ #![no_std] #![no_main] +#![expect(unused_crate_dependencies, reason = "used in other bins")] use aya_ebpf::{bindings::xdp_action, macros::xdp, programs::XdpContext}; +#[cfg(not(test))] +extern crate ebpf_panic; // Note: the `frags` attribute causes this probe to be incompatible with kernel versions < 5.18.0. // See https://github.com/torvalds/linux/commit/c2f2cdb. #[xdp(frags)] -pub fn pass(ctx: XdpContext) -> u32 { +fn pass(ctx: XdpContext) -> u32 { match unsafe { try_pass(ctx) } { Ok(ret) => ret, Err(_) => xdp_action::XDP_ABORTED, @@ -16,9 +19,3 @@ pub fn pass(ctx: XdpContext) -> u32 { unsafe fn try_pass(_ctx: XdpContext) -> Result { Ok(xdp_action::XDP_PASS) } - -#[cfg(not(test))] -#[panic_handler] -fn panic(_info: &core::panic::PanicInfo) -> ! { - loop {} -} diff --git a/test/integration-ebpf/src/raw_tracepoint.rs b/test/integration-ebpf/src/raw_tracepoint.rs new file mode 100644 index 00000000..1c371c6a --- /dev/null +++ b/test/integration-ebpf/src/raw_tracepoint.rs @@ -0,0 +1,30 @@ +#![no_std] +#![no_main] +#![expect(unused_crate_dependencies, reason = "used in other bins")] + +use aya_ebpf::{ + macros::{map, raw_tracepoint}, + maps::Array, + programs::RawTracePointContext, +}; +#[cfg(not(test))] +extern crate ebpf_panic; +use integration_common::raw_tracepoint::SysEnterEvent; + +#[map] +static RESULT: Array = Array::with_max_entries(1, 0); + +#[raw_tracepoint(tracepoint = "sys_enter")] +fn sys_enter(ctx: RawTracePointContext) -> i32 { + let common_type: u16 = ctx.arg(0); + let common_flags: u8 = ctx.arg(1); + + if let Some(ptr) = RESULT.get_ptr_mut(0) { + unsafe { + (*ptr).common_type = common_type; + (*ptr).common_flags = common_flags; + } + } + + 0 +} diff --git a/test/integration-ebpf/src/redirect.rs b/test/integration-ebpf/src/redirect.rs index 83a44423..7dcb847e 100644 --- a/test/integration-ebpf/src/redirect.rs +++ b/test/integration-ebpf/src/redirect.rs @@ -1,5 +1,6 @@ #![no_std] #![no_main] +#![expect(unused_crate_dependencies, reason = "used in other bins")] use aya_ebpf::{ bindings::xdp_action, @@ -7,6 +8,8 @@ use aya_ebpf::{ maps::{Array, CpuMap, DevMap, DevMapHash, XskMap}, programs::XdpContext, }; +#[cfg(not(test))] +extern crate ebpf_panic; #[map] static SOCKS: XskMap = XskMap::with_max_entries(1, 0); @@ -22,52 +25,55 @@ static CPUS: CpuMap = CpuMap::with_max_entries(1, 0); /// counts how many times the map programs got executed. /// This allows the test harness to assert that a specific step got executed. #[map] -static mut HITS: Array = Array::with_max_entries(2, 0); +static HITS: Array = Array::with_max_entries(2, 0); #[xdp] -pub fn redirect_sock(_ctx: XdpContext) -> u32 { - SOCKS.redirect(0, 0).unwrap_or(xdp_action::XDP_ABORTED) +fn redirect_sock(ctx: XdpContext) -> u32 { + let queue_id = ctx.rx_queue_index(); + if SOCKS.get(queue_id) == Some(queue_id) { + // Queue ID matches, redirect to AF_XDP socket. + SOCKS + .redirect(queue_id, 0) + .unwrap_or(xdp_action::XDP_ABORTED) + } else { + // Queue ID did not match, pass packet to kernel network stack. + xdp_action::XDP_PASS + } } #[xdp] -pub fn redirect_dev(_ctx: XdpContext) -> u32 { +fn redirect_dev(_ctx: XdpContext) -> u32 { inc_hit(0); DEVS.redirect(0, 0).unwrap_or(xdp_action::XDP_ABORTED) } #[xdp] -pub fn redirect_dev_hash(_ctx: XdpContext) -> u32 { +fn redirect_dev_hash(_ctx: XdpContext) -> u32 { inc_hit(0); DEVS_HASH.redirect(10, 0).unwrap_or(xdp_action::XDP_ABORTED) } #[xdp] -pub fn redirect_cpu(_ctx: XdpContext) -> u32 { +fn redirect_cpu(_ctx: XdpContext) -> u32 { inc_hit(0); CPUS.redirect(0, 0).unwrap_or(xdp_action::XDP_ABORTED) } #[xdp(map = "cpumap")] -pub fn redirect_cpu_chain(_ctx: XdpContext) -> u32 { +fn redirect_cpu_chain(_ctx: XdpContext) -> u32 { inc_hit(1); xdp_action::XDP_PASS } #[xdp(map = "devmap")] -pub fn redirect_dev_chain(_ctx: XdpContext) -> u32 { +fn redirect_dev_chain(_ctx: XdpContext) -> u32 { inc_hit(1); xdp_action::XDP_PASS } #[inline(always)] fn inc_hit(index: u32) { - if let Some(hit) = unsafe { HITS.get_ptr_mut(index) } { + if let Some(hit) = HITS.get_ptr_mut(index) { unsafe { *hit += 1 }; } } - -#[cfg(not(test))] -#[panic_handler] -fn panic(_info: &core::panic::PanicInfo) -> ! { - loop {} -} diff --git a/test/integration-ebpf/src/relocations.rs b/test/integration-ebpf/src/relocations.rs index de5bb0f9..4e6b6fb2 100644 --- a/test/integration-ebpf/src/relocations.rs +++ b/test/integration-ebpf/src/relocations.rs @@ -1,5 +1,6 @@ #![no_std] #![no_main] +#![expect(unused_crate_dependencies, reason = "used in other bins")] use core::hint; @@ -8,12 +9,14 @@ use aya_ebpf::{ maps::Array, programs::ProbeContext, }; +#[cfg(not(test))] +extern crate ebpf_panic; #[map] -static mut RESULTS: Array = Array::with_max_entries(3, 0); +static RESULTS: Array = Array::with_max_entries(3, 0); #[uprobe] -pub fn test_64_32_call_relocs(_ctx: ProbeContext) { +fn test_64_32_call_relocs(_ctx: ProbeContext) { // this will link set_result and do a forward call set_result(0, hint::black_box(1)); @@ -38,9 +41,3 @@ fn set_result(index: u32, value: u64) { fn set_result_backward(index: u32, value: u64) { set_result(index, value); } - -#[cfg(not(test))] -#[panic_handler] -fn panic(_info: &core::panic::PanicInfo) -> ! { - loop {} -} diff --git a/test/integration-ebpf/src/ring_buf.rs b/test/integration-ebpf/src/ring_buf.rs index 66af6cef..cac357f5 100644 --- a/test/integration-ebpf/src/ring_buf.rs +++ b/test/integration-ebpf/src/ring_buf.rs @@ -1,22 +1,19 @@ #![no_std] #![no_main] +#![expect(unused_crate_dependencies, reason = "used in other bins")] use aya_ebpf::{ macros::{map, uprobe}, maps::{PerCpuArray, RingBuf}, programs::ProbeContext, }; +use integration_common::ring_buf::Registers; +#[cfg(not(test))] +extern crate ebpf_panic; #[map] static RING_BUF: RingBuf = RingBuf::with_byte_size(0, 0); -// This structure's definition is duplicated in userspace. -#[repr(C)] -struct Registers { - dropped: u64, - rejected: u64, -} - // Use a PerCpuArray to store the registers so that we can update the values from multiple CPUs // without needing synchronization. Atomics exist [1], but aren't exposed. // @@ -25,7 +22,7 @@ struct Registers { static REGISTERS: PerCpuArray = PerCpuArray::with_max_entries(1, 0); #[uprobe] -pub fn ring_buf_test(ctx: ProbeContext) { +fn ring_buf_test(ctx: ProbeContext) { let Registers { dropped, rejected } = match REGISTERS.get_ptr_mut(0) { Some(regs) => unsafe { &mut *regs }, None => return, @@ -43,7 +40,7 @@ pub fn ring_buf_test(ctx: ProbeContext) { Some(arg) => arg, None => return, }; - if arg % 2 == 0 { + if arg.is_multiple_of(2) { entry.write(arg); entry.submit(0); } else { @@ -51,9 +48,3 @@ pub fn ring_buf_test(ctx: ProbeContext) { entry.discard(0); } } - -#[cfg(not(test))] -#[panic_handler] -fn panic(_info: &core::panic::PanicInfo) -> ! { - loop {} -} diff --git a/test/integration-ebpf/src/simple_prog.rs b/test/integration-ebpf/src/simple_prog.rs new file mode 100644 index 00000000..0f84975d --- /dev/null +++ b/test/integration-ebpf/src/simple_prog.rs @@ -0,0 +1,13 @@ +#![no_std] +#![no_main] +#![expect(unused_crate_dependencies, reason = "used in other bins")] + +use aya_ebpf::{macros::socket_filter, programs::SkBuffContext}; +#[cfg(not(test))] +extern crate ebpf_panic; + +// Introduced in kernel v3.19. +#[socket_filter] +fn simple_prog(_ctx: SkBuffContext) -> i64 { + 0 +} diff --git a/test/integration-ebpf/src/sk_storage.rs b/test/integration-ebpf/src/sk_storage.rs new file mode 100644 index 00000000..a625c90b --- /dev/null +++ b/test/integration-ebpf/src/sk_storage.rs @@ -0,0 +1,78 @@ +#![no_std] +#![no_main] +#![expect(unused_crate_dependencies, reason = "used in other bins")] + +use aya_ebpf::{ + bindings::sk_action, + btf_maps::SkStorage, + macros::{btf_map, cgroup_sock_addr}, + programs::SockAddrContext, +}; +use integration_common::sk_storage::{Ip, Value}; +#[cfg(not(test))] +extern crate ebpf_panic; + +#[btf_map] +static SOCKET_STORAGE: SkStorage = SkStorage::new(); + +#[cgroup_sock_addr(connect4)] +pub(crate) fn sk_storage_connect4(ctx: SockAddrContext) -> i32 { + let sock_addr = unsafe { &*ctx.sock_addr }; + + let storage = unsafe { SOCKET_STORAGE.get_or_insert_ptr_mut(&ctx, None) }; + if !storage.is_null() { + unsafe { + *storage = Value { + user_family: sock_addr.user_family, + user_ip: Ip::V4(sock_addr.user_ip4), + user_port: sock_addr.user_port, + family: sock_addr.family, + type_: sock_addr.type_, + protocol: sock_addr.protocol, + } + } + } + + sk_action::SK_PASS as i32 +} + +#[cgroup_sock_addr(connect6)] +pub(crate) fn sk_storage_connect6(ctx: SockAddrContext) -> i32 { + let sock_addr = unsafe { &*ctx.sock_addr }; + + let storage = unsafe { SOCKET_STORAGE.get_or_insert_ptr_mut(&ctx, None) }; + if !storage.is_null() { + let mut user_ip6 = [0u32; 4]; + unsafe { + // Verifier dislikes the naive thing: + // + // ; let sk = unsafe { sock_addr.__bindgen_anon_1.sk }; + // 0: (79) r2 = *(u64 *)(r1 +64) ; R1=ctx(off=0,imm=0) R2_w=sock(off=0,imm=0) + // ; user_family: sock_addr.user_family, + // 1: (61) r3 = *(u32 *)(r1 +0) ; R1=ctx(off=0,imm=0) R3_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) + // ; user_ip: Ip::V6(sock_addr.user_ip6), + // 2: (bf) r4 = r1 ; R1=ctx(off=0,imm=0) R4_w=ctx(off=0,imm=0) + // 3: (07) r4 += 8 ; R4_w=ctx(off=8,imm=0) + // ; let mut value = Value { + // 4: (bf) r5 = r10 ; R5_w=fp0 R10=fp0 + // 5: (07) r5 += -32 ; R5_w=fp-32 + // ; user_ip: Ip::V6(sock_addr.user_ip6), + // 6: (61) r0 = *(u32 *)(r4 +0) + // dereference of modified ctx ptr R4 off=8 disallowed + user_ip6[0] = sock_addr.user_ip6[0]; + user_ip6[1] = sock_addr.user_ip6[1]; + user_ip6[2] = sock_addr.user_ip6[2]; + user_ip6[3] = sock_addr.user_ip6[3]; + *storage = Value { + user_family: sock_addr.user_family, + user_ip: Ip::V6(user_ip6), + user_port: sock_addr.user_port, + family: sock_addr.family, + type_: sock_addr.type_, + protocol: sock_addr.protocol, + } + } + } + + sk_action::SK_PASS as i32 +} diff --git a/test/integration-ebpf/src/strncmp.rs b/test/integration-ebpf/src/strncmp.rs new file mode 100644 index 00000000..4e57dd7b --- /dev/null +++ b/test/integration-ebpf/src/strncmp.rs @@ -0,0 +1,31 @@ +#![no_std] +#![no_main] +#![expect(unused_crate_dependencies, reason = "used in other bins")] + +use aya_ebpf::{ + cty::c_long, + helpers::{bpf_probe_read_user_str_bytes, bpf_strncmp}, + macros::{map, uprobe}, + maps::Array, + programs::ProbeContext, +}; +use integration_common::strncmp::TestResult; +#[cfg(not(test))] +extern crate ebpf_panic; + +#[map] +static RESULT: Array = Array::with_max_entries(1, 0); + +#[uprobe] +fn test_bpf_strncmp(ctx: ProbeContext) -> Result<(), c_long> { + let s1: *const u8 = ctx.arg(0).ok_or(-1)?; + let mut b1 = [0u8; 3]; + let _: &[u8] = unsafe { bpf_probe_read_user_str_bytes(s1, &mut b1) }?; + + let ptr = RESULT.get_ptr_mut(0).ok_or(-1)?; + let dst = unsafe { ptr.as_mut() }; + let TestResult(dst_res) = dst.ok_or(-1)?; + *dst_res = bpf_strncmp(&b1, c"ff"); + + Ok(()) +} diff --git a/test/integration-ebpf/src/tcx.rs b/test/integration-ebpf/src/tcx.rs new file mode 100644 index 00000000..50997fd2 --- /dev/null +++ b/test/integration-ebpf/src/tcx.rs @@ -0,0 +1,12 @@ +#![no_std] +#![no_main] +#![expect(unused_crate_dependencies, reason = "used in other bins")] + +use aya_ebpf::{bindings::tcx_action_base::TCX_NEXT, macros::classifier, programs::TcContext}; +#[cfg(not(test))] +extern crate ebpf_panic; + +#[classifier] +fn tcx_next(_ctx: TcContext) -> i32 { + TCX_NEXT +} diff --git a/test/integration-ebpf/src/test.rs b/test/integration-ebpf/src/test.rs index 88f01e89..487bc4de 100644 --- a/test/integration-ebpf/src/test.rs +++ b/test/integration-ebpf/src/test.rs @@ -1,51 +1,63 @@ #![no_std] #![no_main] +#![expect(unused_crate_dependencies, reason = "used in other bins")] use aya_ebpf::{ - bindings::xdp_action, - macros::{kprobe, kretprobe, tracepoint, uprobe, uretprobe, xdp}, - programs::{ProbeContext, RetProbeContext, TracePointContext, XdpContext}, + bindings::{bpf_ret_code, xdp_action}, + macros::{ + flow_dissector, kprobe, kretprobe, lsm, lsm_cgroup, tracepoint, uprobe, uretprobe, xdp, + }, + programs::{ + FlowDissectorContext, LsmContext, ProbeContext, RetProbeContext, TracePointContext, + XdpContext, + }, }; +#[cfg(not(test))] +extern crate ebpf_panic; #[xdp] -pub fn pass(ctx: XdpContext) -> u32 { - match unsafe { try_pass(ctx) } { - Ok(ret) => ret, - Err(_) => xdp_action::XDP_ABORTED, - } -} - -unsafe fn try_pass(_ctx: XdpContext) -> Result { - Ok(xdp_action::XDP_PASS) +fn pass(_ctx: XdpContext) -> u32 { + xdp_action::XDP_PASS } #[kprobe] -pub fn test_kprobe(_ctx: ProbeContext) -> u32 { +fn test_kprobe(_ctx: ProbeContext) -> u32 { 0 } #[kretprobe] -pub fn test_kretprobe(_ctx: RetProbeContext) -> u32 { +fn test_kretprobe(_ctx: RetProbeContext) -> u32 { 0 } #[tracepoint] -pub fn test_tracepoint(_ctx: TracePointContext) -> u32 { +fn test_tracepoint(_ctx: TracePointContext) -> u32 { 0 } #[uprobe] -pub fn test_uprobe(_ctx: ProbeContext) -> u32 { +fn test_uprobe(_ctx: ProbeContext) -> u32 { 0 } #[uretprobe] -pub fn test_uretprobe(_ctx: RetProbeContext) -> u32 { +fn test_uretprobe(_ctx: RetProbeContext) -> u32 { 0 } -#[cfg(not(test))] -#[panic_handler] -fn panic(_info: &core::panic::PanicInfo) -> ! { - loop {} +#[flow_dissector] +fn test_flow(_ctx: FlowDissectorContext) -> u32 { + // TODO: write an actual flow dissector. See tools/testing/selftests/bpf/progs/bpf_flow.c in the + // Linux kernel for inspiration. + bpf_ret_code::BPF_FLOW_DISSECTOR_CONTINUE +} + +#[lsm(hook = "socket_bind")] +fn test_lsm(_ctx: LsmContext) -> i32 { + -1 // Disallow. +} + +#[lsm_cgroup(hook = "socket_bind")] +fn test_lsm_cgroup(_ctx: LsmContext) -> i32 { + 0 // Disallow. } diff --git a/test/integration-ebpf/src/two_progs.rs b/test/integration-ebpf/src/two_progs.rs index 17d08168..3267b9cb 100644 --- a/test/integration-ebpf/src/two_progs.rs +++ b/test/integration-ebpf/src/two_progs.rs @@ -1,21 +1,16 @@ -// Two programs in the same ELF section - #![no_std] #![no_main] +#![expect(unused_crate_dependencies, reason = "used in other bins")] use aya_ebpf::{macros::tracepoint, programs::TracePointContext}; +#[cfg(not(test))] +extern crate ebpf_panic; #[tracepoint] -pub fn test_tracepoint_one(_ctx: TracePointContext) -> u32 { +fn test_tracepoint_one(_ctx: TracePointContext) -> u32 { 0 } #[tracepoint] -pub fn test_tracepoint_two(_ctx: TracePointContext) -> u32 { +fn test_tracepoint_two(_ctx: TracePointContext) -> u32 { 0 } - -#[cfg(not(test))] -#[panic_handler] -fn panic(_info: &core::panic::PanicInfo) -> ! { - loop {} -} diff --git a/test/integration-ebpf/src/uprobe_cookie.rs b/test/integration-ebpf/src/uprobe_cookie.rs new file mode 100644 index 00000000..a83f2b4c --- /dev/null +++ b/test/integration-ebpf/src/uprobe_cookie.rs @@ -0,0 +1,22 @@ +#![no_std] +#![no_main] +#![expect(unused_crate_dependencies, reason = "used in other bins")] + +use aya_ebpf::{ + EbpfContext as _, helpers, + macros::{map, uprobe}, + maps::RingBuf, + programs::ProbeContext, +}; +#[cfg(not(test))] +extern crate ebpf_panic; + +#[map] +static RING_BUF: RingBuf = RingBuf::with_byte_size(0, 0); + +#[uprobe] +fn uprobe_cookie(ctx: ProbeContext) { + let cookie = unsafe { helpers::bpf_get_attach_cookie(ctx.as_ptr()) }; + let cookie_bytes = cookie.to_le_bytes(); + let _res = RING_BUF.output::<[u8]>(cookie_bytes, 0); +} diff --git a/test/integration-ebpf/src/xdp_sec.rs b/test/integration-ebpf/src/xdp_sec.rs index c9eed920..8d564f9c 100644 --- a/test/integration-ebpf/src/xdp_sec.rs +++ b/test/integration-ebpf/src/xdp_sec.rs @@ -1,12 +1,15 @@ #![no_std] #![no_main] +#![expect(unused_crate_dependencies, reason = "used in other bins")] use aya_ebpf::{bindings::xdp_action::XDP_PASS, macros::xdp, programs::XdpContext}; +#[cfg(not(test))] +extern crate ebpf_panic; macro_rules! probe { ($name:ident, ($($arg:ident $(= $value:literal)?),*) ) => { #[xdp($($arg $(= $value)?),*)] - pub fn $name(_ctx: XdpContext) -> u32 { + fn $name(_ctx: XdpContext) -> u32 { XDP_PASS } }; @@ -18,9 +21,3 @@ probe!(xdp_cpumap, (map = "cpumap")); probe!(xdp_devmap, (map = "devmap")); probe!(xdp_frags_cpumap, (frags, map = "cpumap")); probe!(xdp_frags_devmap, (frags, map = "devmap")); - -#[cfg(not(test))] -#[panic_handler] -fn panic(_info: &core::panic::PanicInfo) -> ! { - loop {} -} diff --git a/test/integration-test/Cargo.toml b/test/integration-test/Cargo.toml index dc9c7667..e443af2f 100644 --- a/test/integration-test/Cargo.toml +++ b/test/integration-test/Cargo.toml @@ -1,46 +1,58 @@ [package] name = "integration-test" -version = "0.1.0" publish = false +version = "0.1.0" + authors.workspace = true +edition.workspace = true +homepage.workspace = true license.workspace = true repository.workspace = true -homepage.workspace = true -edition.workspace = true +rust-version.workspace = true + +[lints] +workspace = true [dependencies] +aya = { path = "../../aya", version = "^0.13.1", default-features = false } + +[dev-dependencies] anyhow = { workspace = true, features = ["std"] } assert_matches = { workspace = true } -aya = { path = "../../aya", version = "^0.12.0", default-features = false } -aya-log = { path = "../../aya-log", version = "^0.2.0", default-features = false } -aya-obj = { path = "../../aya-obj", version = "^0.1.0", default-features = false } -env_logger = { workspace = true } +aya-log = { path = "../../aya-log", version = "^0.2.1", default-features = false } +aya-obj = { path = "../../aya-obj", version = "^0.2.1", default-features = false } epoll = { workspace = true } -futures = { workspace = true, features = ["std"] } +futures = { workspace = true, features = ["alloc"] } +integration-common = { path = "../integration-common", features = ["user"] } libc = { workspace = true } log = { workspace = true } -netns-rs = { workspace = true } +nix = { workspace = true, features = ["mount", "sched"] } object = { workspace = true, features = ["elf", "read_core", "std"] } -rand = { workspace = true, features = ["std", "std_rng"] } +procfs = { workspace = true, features = ["flate2"] } +rand = { workspace = true, features = ["thread_rng"] } rbpf = { workspace = true } +scopeguard = { workspace = true } test-case = { workspace = true } test-log = { workspace = true, features = ["log"] } -tokio = { workspace = true, features = ["macros", "rt-multi-thread", "time"] } +tokio = { workspace = true, features = [ + "macros", + "net", + "rt-multi-thread", + "time", +] } xdpilone = { workspace = true } [build-dependencies] +anyhow = { workspace = true } +aya-build = { path = "../../aya-build" } cargo_metadata = { workspace = true } # TODO(https://github.com/rust-lang/cargo/issues/12375): this should be an artifact dependency, but # it's not possible to tell cargo to use `-Z build-std` to build it. We cargo-in-cargo in the build # script to build this, but we want to teach cargo about the dependecy so that cache invalidation # works properly. # -# Note also that https://github.com/rust-lang/cargo/issues/10593 occurs when `target = ...` is added -# to an artifact dependency; it seems possible to work around that by setting `resolver = "1"` in -# Cargo.toml in the workspace root. -# # Finally note that *any* usage of `artifact = ...` in *any* Cargo.toml in the workspace breaks # workflows with stable cargo; stable cargo outright refuses to load manifests that use unstable # features. integration-ebpf = { path = "../integration-ebpf" } -xtask = { workspace = true } +xtask = { path = "../../xtask" } diff --git a/test/integration-test/bpf/enum_signed_32_checked_variants_reloc.bpf.c b/test/integration-test/bpf/enum_signed_32_checked_variants_reloc.bpf.c new file mode 100644 index 00000000..1b223c6e --- /dev/null +++ b/test/integration-test/bpf/enum_signed_32_checked_variants_reloc.bpf.c @@ -0,0 +1,33 @@ +#include "reloc.h" + +enum relocated_enum_signed_32_checked_variants { +#ifndef TARGET + S32_VAL_A = -0x7AAAAAAA, +#endif + S32_VAL_B = -0x7BBBBBBB, +#ifdef TARGET + S32_VAL_C = -0x7CCCCCCC +#endif +}; + +__noinline int enum_signed_32_checked_variants_global() { +#ifndef TARGET + if (bpf_core_enum_value_exists(enum relocated_enum_signed_32_checked_variants, + S32_VAL_A)) { + return set_output(bpf_core_enum_value( + enum relocated_enum_signed_32_checked_variants, S32_VAL_A)); +#else + if (bpf_core_enum_value_exists(enum relocated_enum_signed_32_checked_variants, + S32_VAL_C)) { + return set_output(bpf_core_enum_value( + enum relocated_enum_signed_32_checked_variants, S32_VAL_C)); +#endif + } else { + return set_output(bpf_core_enum_value( + enum relocated_enum_signed_32_checked_variants, S32_VAL_B)); + } +} + +SEC("uprobe") int program(void *ctx) { + return enum_signed_32_checked_variants_global(); +} diff --git a/test/integration-test/bpf/enum_signed_32_reloc.bpf.c b/test/integration-test/bpf/enum_signed_32_reloc.bpf.c new file mode 100644 index 00000000..5bec3a08 --- /dev/null +++ b/test/integration-test/bpf/enum_signed_32_reloc.bpf.c @@ -0,0 +1,17 @@ +#include "reloc.h" + +enum relocated_enum_signed_32 { + S32_VAL = +#ifndef TARGET + -0x7AAAAAAA +#else + -0x7BBBBBBB +#endif +}; + +__noinline int enum_signed_32_global() { + return set_output( + bpf_core_enum_value(enum relocated_enum_signed_32, S32_VAL)); +} + +SEC("uprobe") int program(void *ctx) { return enum_signed_32_global(); } diff --git a/test/integration-test/bpf/enum_signed_64_checked_variants_reloc.bpf.c b/test/integration-test/bpf/enum_signed_64_checked_variants_reloc.bpf.c new file mode 100644 index 00000000..ef809bab --- /dev/null +++ b/test/integration-test/bpf/enum_signed_64_checked_variants_reloc.bpf.c @@ -0,0 +1,33 @@ +#include "reloc.h" + +enum relocated_enum_signed_64_checked_variants { +#ifndef TARGET + S64_VAL_A = -0xAAAAAAABBBBBBB, +#endif + S64_VAL_B = -0xCCCCCCCDDDDDDD, +#ifdef TARGET + S64_VAL_C = -0xEEEEEEEFFFFFFF +#endif +}; + +__noinline int enum_signed_64_checked_variants_global() { +#ifndef TARGET + if (bpf_core_enum_value_exists(enum relocated_enum_signed_64_checked_variants, + S64_VAL_A)) { + return set_output(bpf_core_enum_value( + enum relocated_enum_signed_64_checked_variants, S64_VAL_A)); +#else + if (bpf_core_enum_value_exists(enum relocated_enum_signed_64_checked_variants, + S64_VAL_C)) { + return set_output(bpf_core_enum_value( + enum relocated_enum_signed_64_checked_variants, S64_VAL_C)); +#endif + } else { + return set_output(bpf_core_enum_value( + enum relocated_enum_signed_64_checked_variants, S64_VAL_B)); + } +} + +SEC("uprobe") int program(void *ctx) { + return enum_signed_64_checked_variants_global(); +} diff --git a/test/integration-test/bpf/enum_signed_64_reloc.bpf.c b/test/integration-test/bpf/enum_signed_64_reloc.bpf.c new file mode 100644 index 00000000..2cfc5668 --- /dev/null +++ b/test/integration-test/bpf/enum_signed_64_reloc.bpf.c @@ -0,0 +1,17 @@ +#include "reloc.h" + +enum relocated_enum_signed_64 { + S64_VAL = +#ifndef TARGET + -0xAAAAAAABBBBBBBB +#else + -0xCCCCCCCDDDDDDDD +#endif +}; + +__noinline int enum_signed_64_global() { + return set_output( + bpf_core_enum_value(enum relocated_enum_signed_64, S64_VAL)); +} + +SEC("uprobe") int program(void *ctx) { return enum_signed_64_global(); } diff --git a/test/integration-test/bpf/enum_unsigned_32_checked_variants_reloc.bpf.c b/test/integration-test/bpf/enum_unsigned_32_checked_variants_reloc.bpf.c new file mode 100644 index 00000000..9c1ddb93 --- /dev/null +++ b/test/integration-test/bpf/enum_unsigned_32_checked_variants_reloc.bpf.c @@ -0,0 +1,33 @@ +#include "reloc.h" + +enum relocated_enum_unsigned_32_checked_variants { +#ifndef TARGET + U32_VAL_A = 0xAAAAAAAA, +#endif + U32_VAL_B = 0xBBBBBBBB, +#ifdef TARGET + U32_VAL_C = 0xCCCCCCCC +#endif +}; + +__noinline int enum_unsigned_32_checked_variants_global() { +#ifndef TARGET + if (bpf_core_enum_value_exists( + enum relocated_enum_unsigned_32_checked_variants, U32_VAL_A)) { + return set_output(bpf_core_enum_value( + enum relocated_enum_unsigned_32_checked_variants, U32_VAL_A)); +#else + if (bpf_core_enum_value_exists( + enum relocated_enum_unsigned_32_checked_variants, U32_VAL_C)) { + return set_output(bpf_core_enum_value( + enum relocated_enum_unsigned_32_checked_variants, U32_VAL_C)); +#endif + } else { + return set_output(bpf_core_enum_value( + enum relocated_enum_unsigned_32_checked_variants, U32_VAL_B)); + } +} + +SEC("uprobe") int program(void *ctx) { + return enum_unsigned_32_checked_variants_global(); +} diff --git a/test/integration-test/bpf/enum_unsigned_32_reloc.bpf.c b/test/integration-test/bpf/enum_unsigned_32_reloc.bpf.c new file mode 100644 index 00000000..7adbef61 --- /dev/null +++ b/test/integration-test/bpf/enum_unsigned_32_reloc.bpf.c @@ -0,0 +1,17 @@ +#include "reloc.h" + +enum relocated_enum_unsigned_32 { + U32_VAL = +#ifndef TARGET + 0xAAAAAAAA +#else + 0xBBBBBBBB +#endif +}; + +__noinline int enum_unsigned_32_global() { + return set_output( + bpf_core_enum_value(enum relocated_enum_unsigned_32, U32_VAL)); +} + +SEC("uprobe") int program(void *ctx) { return enum_unsigned_32_global(); } diff --git a/test/integration-test/bpf/enum_unsigned_64_checked_variants_reloc.bpf.c b/test/integration-test/bpf/enum_unsigned_64_checked_variants_reloc.bpf.c new file mode 100644 index 00000000..09c39beb --- /dev/null +++ b/test/integration-test/bpf/enum_unsigned_64_checked_variants_reloc.bpf.c @@ -0,0 +1,33 @@ +#include "reloc.h" + +enum relocated_enum_unsigned_64_checked_variants { +#ifndef TARGET + U64_VAL_A = 0xAAAAAAAABBBBBBBB, +#endif + U64_VAL_B = 0xCCCCCCCCDDDDDDDD, +#ifdef TARGET + U64_VAL_C = 0xEEEEEEEEFFFFFFFF +#endif +}; + +__noinline int enum_unsigned_64_checked_variants_global() { +#ifndef TARGET + if (bpf_core_enum_value_exists( + enum relocated_enum_unsigned_64_checked_variants, U64_VAL_A)) { + return set_output(bpf_core_enum_value( + enum relocated_enum_unsigned_64_checked_variants, U64_VAL_A)); +#else + if (bpf_core_enum_value_exists( + enum relocated_enum_unsigned_64_checked_variants, U64_VAL_C)) { + return set_output(bpf_core_enum_value( + enum relocated_enum_unsigned_64_checked_variants, U64_VAL_C)); +#endif + } else { + return set_output(bpf_core_enum_value( + enum relocated_enum_unsigned_64_checked_variants, U64_VAL_B)); + } +} + +SEC("uprobe") int program(void *ctx) { + return enum_unsigned_64_checked_variants_global(); +} diff --git a/test/integration-test/bpf/enum_unsigned_64_reloc.bpf.c b/test/integration-test/bpf/enum_unsigned_64_reloc.bpf.c new file mode 100644 index 00000000..05d4643e --- /dev/null +++ b/test/integration-test/bpf/enum_unsigned_64_reloc.bpf.c @@ -0,0 +1,17 @@ +#include "reloc.h" + +enum relocated_enum_unsigned_64 { + U64_VAL = +#ifndef TARGET + 0xAAAAAAAABBBBBBBB +#else + 0xCCCCCCCCDDDDDDDD +#endif +}; + +__noinline int enum_unsigned_64_global() { + return set_output( + bpf_core_enum_value(enum relocated_enum_unsigned_64, U64_VAL)); +} + +SEC("uprobe") int program(void *ctx) { return enum_unsigned_64_global(); } diff --git a/test/integration-test/bpf/field_reloc.bpf.c b/test/integration-test/bpf/field_reloc.bpf.c new file mode 100644 index 00000000..7bbc9847 --- /dev/null +++ b/test/integration-test/bpf/field_reloc.bpf.c @@ -0,0 +1,9 @@ +#include "reloc.h" +#include "struct_with_scalars.h" + +__noinline int field_global() { + struct relocated_struct_with_scalars s = {1, 2, 3}; + return set_output(__builtin_preserve_access_index(s.b)); +} + +SEC("uprobe") int program(void *ctx) { return field_global(); } diff --git a/test/integration-test/bpf/iter.bpf.c b/test/integration-test/bpf/iter.bpf.c new file mode 100644 index 00000000..75f385b5 --- /dev/null +++ b/test/integration-test/bpf/iter.bpf.c @@ -0,0 +1,23 @@ +// clang-format off +#include +#include +// clang-format on + +char _license[] SEC("license") = "GPL"; + +SEC("iter/task") +int iter_task(struct bpf_iter__task *ctx) { + struct seq_file *seq = ctx->meta->seq; + struct task_struct *task = ctx->task; + // Verifier requires this check. + if (task == NULL) { + return 0; + } + + if (ctx->meta->seq_num == 0) { + BPF_SEQ_PRINTF(seq, "tgid pid name\n"); + } + BPF_SEQ_PRINTF(seq, "%-8d %-8d %s\n", task->tgid, task->pid, task->comm); + + return 0; +} diff --git a/test/integration-test/bpf/pointer_reloc.bpf.c b/test/integration-test/bpf/pointer_reloc.bpf.c new file mode 100644 index 00000000..1193222b --- /dev/null +++ b/test/integration-test/bpf/pointer_reloc.bpf.c @@ -0,0 +1,21 @@ +#include "reloc.h" + +struct relocated_struct_with_pointer { +#ifndef TARGET + struct relocated_struct_with_pointer *first; +#endif + struct relocated_struct_with_pointer *second; +#ifdef TARGET + struct relocated_struct_with_pointer *first; +#endif +}; + +__noinline int pointer_global() { + struct relocated_struct_with_pointer s = { + (struct relocated_struct_with_pointer *)42, + (struct relocated_struct_with_pointer *)21, + }; + return set_output((__u64)__builtin_preserve_access_index(s.first)); +} + +SEC("uprobe") int program(void *ctx) { return pointer_global(); } diff --git a/test/integration-test/bpf/reloc.bpf.c b/test/integration-test/bpf/reloc.bpf.c deleted file mode 100644 index f8104bbb..00000000 --- a/test/integration-test/bpf/reloc.bpf.c +++ /dev/null @@ -1,269 +0,0 @@ -// clang-format off -#include -#include -#include -// clang-format on - -char _license[] SEC("license") = "GPL"; - -struct { - __uint(type, BPF_MAP_TYPE_ARRAY); - __type(key, __u32); - __type(value, __u64); - __uint(max_entries, 1); -} output_map SEC(".maps"); - -long set_output(__u64 value) { - __u32 key = 0; - return bpf_map_update_elem(&output_map, &key, &value, BPF_ANY); -} - -struct relocated_struct_with_scalars { -#ifndef TARGET - __u8 a; -#endif - __u8 b; - __u8 c; -#ifdef TARGET - __u8 d; -#endif -}; - -__noinline int field_global() { - struct relocated_struct_with_scalars s = {1, 2, 3}; - return set_output(__builtin_preserve_access_index(s.b)); -} - -SEC("uprobe") int field(void *ctx) { return field_global(); } - -struct relocated_struct_with_pointer { -#ifndef TARGET - struct relocated_struct_with_pointer *first; -#endif - struct relocated_struct_with_pointer *second; -#ifdef TARGET - struct relocated_struct_with_pointer *first; -#endif -}; - -__noinline int pointer_global() { - struct relocated_struct_with_pointer s = { - (struct relocated_struct_with_pointer *)42, - (struct relocated_struct_with_pointer *)21, - }; - return set_output((__u64)__builtin_preserve_access_index(s.first)); -} - -SEC("uprobe") int pointer(void *ctx) { return pointer_global(); } - -__noinline int struct_flavors_global() { - struct relocated_struct_with_scalars s = {1, 2, 3}; -#ifndef TARGET - if (bpf_core_field_exists(s.a)) { - return set_output(__builtin_preserve_access_index(s.a)); -#else - if (bpf_core_field_exists(s.d)) { - return set_output(__builtin_preserve_access_index(s.d)); -#endif - } else { - return set_output(__builtin_preserve_access_index(s.c)); - } -} - -SEC("uprobe") int struct_flavors(void *ctx) { return struct_flavors_global(); } - -enum relocated_enum_unsigned_32 { - U32_VAL = -#ifndef TARGET - 0xAAAAAAAA -#else - 0xBBBBBBBB -#endif -}; - -__noinline int enum_unsigned_32_global() { - return set_output( - bpf_core_enum_value(enum relocated_enum_unsigned_32, U32_VAL)); -} - -SEC("uprobe") int enum_unsigned_32(void *ctx) { - return enum_unsigned_32_global(); -} - -enum relocated_enum_unsigned_32_checked_variants { -#ifndef TARGET - U32_VAL_A = 0xAAAAAAAA, -#endif - U32_VAL_B = 0xBBBBBBBB, -#ifdef TARGET - U32_VAL_C = 0xCCCCCCCC -#endif -}; - -__noinline int enum_unsigned_32_checked_variants_global() { -#ifndef TARGET - if (bpf_core_enum_value_exists( - enum relocated_enum_unsigned_32_checked_variants, U32_VAL_A)) { - return set_output(bpf_core_enum_value( - enum relocated_enum_unsigned_32_checked_variants, U32_VAL_A)); -#else - if (bpf_core_enum_value_exists( - enum relocated_enum_unsigned_32_checked_variants, U32_VAL_C)) { - return set_output(bpf_core_enum_value( - enum relocated_enum_unsigned_32_checked_variants, U32_VAL_C)); -#endif - } else { - return set_output(bpf_core_enum_value( - enum relocated_enum_unsigned_32_checked_variants, U32_VAL_B)); - } -} - -SEC("uprobe") int enum_unsigned_32_checked_variants(void *ctx) { - return enum_unsigned_32_checked_variants_global(); -} - -enum relocated_enum_signed_32 { - S32_VAL = -#ifndef TARGET - -0x7AAAAAAA -#else - -0x7BBBBBBB -#endif -}; - -__noinline int enum_signed_32_global() { - return set_output( - bpf_core_enum_value(enum relocated_enum_signed_32, S32_VAL)); -} - -SEC("uprobe") int enum_signed_32(void *ctx) { return enum_signed_32_global(); } - -enum relocated_enum_signed_32_checked_variants { -#ifndef TARGET - S32_VAL_A = -0x7AAAAAAA, -#endif - S32_VAL_B = -0x7BBBBBBB, -#ifdef TARGET - S32_VAL_C = -0x7CCCCCCC -#endif -}; - -__noinline int enum_signed_32_checked_variants_global() { -#ifndef TARGET - if (bpf_core_enum_value_exists(enum relocated_enum_signed_32_checked_variants, - S32_VAL_A)) { - return set_output(bpf_core_enum_value( - enum relocated_enum_signed_32_checked_variants, S32_VAL_A)); -#else - if (bpf_core_enum_value_exists(enum relocated_enum_signed_32_checked_variants, - S32_VAL_C)) { - return set_output(bpf_core_enum_value( - enum relocated_enum_signed_32_checked_variants, S32_VAL_C)); -#endif - } else { - return set_output(bpf_core_enum_value( - enum relocated_enum_signed_32_checked_variants, S32_VAL_B)); - } -} - -SEC("uprobe") int enum_signed_32_checked_variants(void *ctx) { - return enum_signed_32_checked_variants_global(); -} - -enum relocated_enum_unsigned_64 { - U64_VAL = -#ifndef TARGET - 0xAAAAAAAABBBBBBBB -#else - 0xCCCCCCCCDDDDDDDD -#endif -}; - -__noinline int enum_unsigned_64_global() { - return set_output( - bpf_core_enum_value(enum relocated_enum_unsigned_64, U64_VAL)); -} - -SEC("uprobe") int enum_unsigned_64(void *ctx) { - return enum_unsigned_64_global(); -} - -enum relocated_enum_unsigned_64_checked_variants { -#ifndef TARGET - U64_VAL_A = 0xAAAAAAAABBBBBBBB, -#endif - U64_VAL_B = 0xCCCCCCCCDDDDDDDD, -#ifdef TARGET - U64_VAL_C = 0xEEEEEEEEFFFFFFFF -#endif -}; - -__noinline int enum_unsigned_64_checked_variants_global() { -#ifndef TARGET - if (bpf_core_enum_value_exists( - enum relocated_enum_unsigned_64_checked_variants, U64_VAL_A)) { - return set_output(bpf_core_enum_value( - enum relocated_enum_unsigned_64_checked_variants, U64_VAL_A)); -#else - if (bpf_core_enum_value_exists( - enum relocated_enum_unsigned_64_checked_variants, U64_VAL_C)) { - return set_output(bpf_core_enum_value( - enum relocated_enum_unsigned_64_checked_variants, U64_VAL_C)); -#endif - } else { - return set_output(bpf_core_enum_value( - enum relocated_enum_unsigned_64_checked_variants, U64_VAL_B)); - } -} - -SEC("uprobe") int enum_unsigned_64_checked_variants(void *ctx) { - return enum_unsigned_64_checked_variants_global(); -} - -enum relocated_enum_signed_64 { - S64_VAL = -#ifndef TARGET - -0xAAAAAAABBBBBBBB -#else - -0xCCCCCCCDDDDDDDD -#endif -}; - -__noinline int enum_signed_64_global() { - return set_output( - bpf_core_enum_value(enum relocated_enum_signed_64, S64_VAL)); -} - -SEC("uprobe") int enum_signed_64(void *ctx) { return enum_signed_64_global(); } - -enum relocated_enum_signed_64_checked_variants { -#ifndef TARGET - S64_VAL_A = -0xAAAAAAABBBBBBB, -#endif - S64_VAL_B = -0xCCCCCCCDDDDDDD, -#ifdef TARGET - S64_VAL_C = -0xEEEEEEEFFFFFFF -#endif -}; - -__noinline int enum_signed_64_checked_variants_global() { -#ifndef TARGET - if (bpf_core_enum_value_exists(enum relocated_enum_signed_64_checked_variants, - S64_VAL_A)) { - return set_output(bpf_core_enum_value( - enum relocated_enum_signed_64_checked_variants, S64_VAL_A)); -#else - if (bpf_core_enum_value_exists(enum relocated_enum_signed_64_checked_variants, - S64_VAL_C)) { - return set_output(bpf_core_enum_value( - enum relocated_enum_signed_64_checked_variants, S64_VAL_C)); -#endif - } else { - return set_output(bpf_core_enum_value( - enum relocated_enum_signed_64_checked_variants, S64_VAL_B)); - } -} - -SEC("uprobe") int enum_signed_64_checked_variants(void *ctx) { - return enum_signed_64_checked_variants_global(); -} diff --git a/test/integration-test/bpf/reloc.h b/test/integration-test/bpf/reloc.h new file mode 100644 index 00000000..c471c6ca --- /dev/null +++ b/test/integration-test/bpf/reloc.h @@ -0,0 +1,19 @@ +// clang-format off +#include +#include +#include +// clang-format on + +char _license[] SEC("license") = "GPL"; + +struct { + __uint(type, BPF_MAP_TYPE_ARRAY); + __type(key, __u32); + __type(value, __u64); + __uint(max_entries, 1); +} output_map SEC(".maps"); + +long set_output(__u64 value) { + __u32 key = 0; + return bpf_map_update_elem(&output_map, &key, &value, BPF_ANY); +} diff --git a/test/integration-test/bpf/struct_flavors_reloc.bpf.c b/test/integration-test/bpf/struct_flavors_reloc.bpf.c new file mode 100644 index 00000000..39d0c96e --- /dev/null +++ b/test/integration-test/bpf/struct_flavors_reloc.bpf.c @@ -0,0 +1,18 @@ +#include "reloc.h" +#include "struct_with_scalars.h" + +__noinline int struct_flavors_global() { + struct relocated_struct_with_scalars s = {1, 2, 3}; +#ifndef TARGET + if (bpf_core_field_exists(s.a)) { + return set_output(__builtin_preserve_access_index(s.a)); +#else + if (bpf_core_field_exists(s.d)) { + return set_output(__builtin_preserve_access_index(s.d)); +#endif + } else { + return set_output(__builtin_preserve_access_index(s.c)); + } +} + +SEC("uprobe") int program(void *ctx) { return struct_flavors_global(); } diff --git a/test/integration-test/bpf/struct_with_scalars.h b/test/integration-test/bpf/struct_with_scalars.h new file mode 100644 index 00000000..185e756b --- /dev/null +++ b/test/integration-test/bpf/struct_with_scalars.h @@ -0,0 +1,10 @@ +struct relocated_struct_with_scalars { +#ifndef TARGET + __u8 a; +#endif + __u8 b; + __u8 c; +#ifdef TARGET + __u8 d; +#endif +}; diff --git a/test/integration-test/bpf/variables_reloc.bpf.c b/test/integration-test/bpf/variables_reloc.bpf.c new file mode 100644 index 00000000..08712937 --- /dev/null +++ b/test/integration-test/bpf/variables_reloc.bpf.c @@ -0,0 +1,21 @@ +// clang-format off +#include +#include +// clang-format on + +volatile unsigned int key1 = 0; // .bss +volatile unsigned int key2 = 1; // .data +volatile const unsigned int key3 = 2; // .rodata + +SEC("xdp") +int variables_reloc(struct xdp_md *ctx) { + if (key1 == 0 && key2 != 1 && key3 != 2) { + key1 += 1; + key2 += 1; + return XDP_DROP; + } else { + return XDP_PASS; + } +} + +char _license[] SEC("license") = "GPL"; diff --git a/test/integration-test/build.rs b/test/integration-test/build.rs index 128f25e4..881cdd57 100644 --- a/test/integration-test/build.rs +++ b/test/integration-test/build.rs @@ -1,26 +1,20 @@ +#![expect( + unused_crate_dependencies, + reason = "integration-ebpf library target; see below" +)] + use std::{ env, ffi::OsString, fs, - io::{BufRead as _, BufReader}, - path::PathBuf, + path::{Path, PathBuf}, process::{Child, Command, Output, Stdio}, }; -use cargo_metadata::{ - Artifact, CompilerMessage, Message, Metadata, MetadataCommand, Package, Target, -}; -use xtask::{exec, AYA_BUILD_INTEGRATION_BPF, LIBBPF_DIR}; +use anyhow::{Context as _, Ok, Result, anyhow}; +use cargo_metadata::{Metadata, MetadataCommand, Package, Target, TargetKind}; +use xtask::{AYA_BUILD_INTEGRATION_BPF, LIBBPF_DIR, exec, install_libbpf_headers_cmd}; -/// This crate has a runtime dependency on artifacts produced by the `integration-ebpf` crate. This -/// would be better expressed as one or more [artifact-dependencies][bindeps] but issues such as: -/// -/// * https://github.com/rust-lang/cargo/issues/12374 -/// * https://github.com/rust-lang/cargo/issues/12375 -/// * https://github.com/rust-lang/cargo/issues/12385 -/// -/// prevent their use for the time being. -/// /// This file, along with the xtask crate, allows analysis tools such as `cargo check`, `cargo /// clippy`, and even `cargo build` to work as users expect. Prior to this file's existence, this /// crate's undeclared dependency on artifacts from `integration-ebpf` would cause build (and `cargo check`, @@ -34,76 +28,91 @@ use xtask::{exec, AYA_BUILD_INTEGRATION_BPF, LIBBPF_DIR}; /// occur on metadata-only actions such as `cargo check` or `cargo clippy` of this crate. This means /// that naively attempting to `cargo test --no-run` this crate will produce binaries that fail at /// runtime because the stubs are inadequate for actually running the tests. -/// -/// [bindeps]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html?highlight=feature#artifact-dependencies - -fn main() { - println!("cargo:rerun-if-env-changed={}", AYA_BUILD_INTEGRATION_BPF); - - let build_integration_bpf = env::var(AYA_BUILD_INTEGRATION_BPF) - .as_deref() - .map(str::parse) - .map(Result::unwrap) +fn main() -> Result<()> { + println!("cargo:rerun-if-env-changed={AYA_BUILD_INTEGRATION_BPF}"); + + // TODO(https://github.com/rust-lang/cargo/issues/4001): generalize this and move it to + // aya-build if we can determine that we're in a check build. + let build_integration_bpf = env::var_os(AYA_BUILD_INTEGRATION_BPF) + .map(|build_integration_bpf| { + let build_integration_bpf = std::str::from_utf8( + build_integration_bpf.as_encoded_bytes(), + ) + .with_context(|| format!("{AYA_BUILD_INTEGRATION_BPF}={build_integration_bpf:?}"))?; + let build_integration_bpf = build_integration_bpf + .parse() + .with_context(|| format!("{AYA_BUILD_INTEGRATION_BPF}={build_integration_bpf}"))?; + Ok(build_integration_bpf) + }) + .transpose()? .unwrap_or_default(); - let Metadata { packages, .. } = MetadataCommand::new().no_deps().exec().unwrap(); + let Metadata { + packages, + workspace_root, + .. + } = MetadataCommand::new() + .no_deps() + .exec() + .context("MetadataCommand::exec")?; let integration_ebpf_package = packages .into_iter() - .find(|Package { name, .. }| name == "integration-ebpf") - .unwrap(); + .find(|Package { name, .. }| name.as_str() == "integration-ebpf") + .ok_or_else(|| anyhow!("integration-ebpf package not found"))?; - let manifest_dir = env::var_os("CARGO_MANIFEST_DIR").unwrap(); + let manifest_dir = + env::var_os("CARGO_MANIFEST_DIR").ok_or(anyhow!("CARGO_MANIFEST_DIR not set"))?; let manifest_dir = PathBuf::from(manifest_dir); - let out_dir = env::var_os("OUT_DIR").unwrap(); + let out_dir = env::var_os("OUT_DIR").ok_or(anyhow!("OUT_DIR not set"))?; let out_dir = PathBuf::from(out_dir); - let endian = env::var_os("CARGO_CFG_TARGET_ENDIAN").unwrap(); - let target = if endian == "big" { - "bpfeb" - } else if endian == "little" { - "bpfel" - } else { - panic!("unsupported endian={:?}", endian) - }; - const C_BPF: &[(&str, bool)] = &[ ("ext.bpf.c", false), + ("iter.bpf.c", true), ("main.bpf.c", false), ("multimap-btf.bpf.c", false), - ("reloc.bpf.c", true), + ("enum_signed_32_checked_variants_reloc.bpf.c", true), + ("enum_signed_32_reloc.bpf.c", true), + ("enum_signed_64_checked_variants_reloc.bpf.c", true), + ("enum_signed_64_reloc.bpf.c", true), + ("enum_unsigned_32_checked_variants_reloc.bpf.c", true), + ("enum_unsigned_32_reloc.bpf.c", true), + ("enum_unsigned_64_checked_variants_reloc.bpf.c", true), + ("enum_unsigned_64_reloc.bpf.c", true), + ("field_reloc.bpf.c", true), + ("pointer_reloc.bpf.c", true), + ("struct_flavors_reloc.bpf.c", true), ("text_64_64_reloc.c", false), + ("variables_reloc.bpf.c", false), ]; + const C_BPF_HEADERS: &[&str] = &["reloc.h", "struct_with_scalars.h"]; if build_integration_bpf { - let libbpf_dir = manifest_dir - .parent() - .unwrap() - .parent() - .unwrap() - .join(LIBBPF_DIR); - println!("cargo:rerun-if-changed={}", libbpf_dir.to_str().unwrap()); - - let libbpf_headers_dir = out_dir.join("libbpf_headers"); + let endian = env::var_os("CARGO_CFG_TARGET_ENDIAN") + .ok_or(anyhow!("CARGO_CFG_TARGET_ENDIAN not set"))?; + let target = if endian == "big" { + "bpfeb" + } else if endian == "little" { + "bpfel" + } else { + return Err(anyhow!("unsupported endian={endian:?}")); + }; - let mut includedir = OsString::new(); - includedir.push("INCLUDEDIR="); - includedir.push(&libbpf_headers_dir); + let libbpf_dir = workspace_root.join(LIBBPF_DIR); + println!("cargo:rerun-if-changed={libbpf_dir}"); - exec( - Command::new("make") - .arg("-C") - .arg(libbpf_dir.join("src")) - .arg(includedir) - .arg("install_headers"), - ) - .unwrap(); + let libbpf_headers_dir = out_dir.join("libbpf_headers"); + let mut cmd = install_libbpf_headers_cmd(&libbpf_dir, &libbpf_headers_dir); + cmd.stdout(Stdio::null()); + exec(&mut cmd)?; let bpf_dir = manifest_dir.join("bpf"); let mut target_arch = OsString::new(); target_arch.push("-D__TARGET_ARCH_"); - let arch = env::var_os("CARGO_CFG_TARGET_ARCH").unwrap(); + let arch = + env::var_os("CARGO_CFG_TARGET_ARCH").ok_or(anyhow!("CARGO_CFG_TARGET_ARCH not set"))?; if arch == "x86_64" { target_arch.push("x86"); } else if arch == "aarch64" { @@ -133,12 +142,33 @@ fn main() { cmd }; + let rerun_if_changed = |path: &Path| { + use std::{io::Write as _, os::unix::ffi::OsStrExt as _}; + + let mut stdout = std::io::stdout().lock(); + stdout.write_all("cargo:rerun-if-changed=".as_bytes())?; + stdout.write_all(path.as_os_str().as_bytes())?; + stdout.write_all("\n".as_bytes())?; + + Ok(()) + }; + + for hdr in C_BPF_HEADERS { + let hdr = bpf_dir.join(hdr); + let exists = hdr + .try_exists() + .with_context(|| format!("{}", hdr.display()))?; + anyhow::ensure!(exists, "{}", hdr.display()); + rerun_if_changed(&hdr).with_context(|| format!("{}", hdr.display()))?; + } + for (src, build_btf) in C_BPF { let dst = out_dir.join(src).with_extension("o"); let src = bpf_dir.join(src); - println!("cargo:rerun-if-changed={}", src.to_str().unwrap()); - exec(clang().arg(&src).arg("-o").arg(&dst)).unwrap(); + rerun_if_changed(&src).with_context(|| format!("{}", src.display()))?; + + exec(clang().arg(&src).arg("-o").arg(&dst))?; if *build_btf { let mut cmd = clang(); @@ -148,10 +178,10 @@ fn main() { .args(["-o", "-"]) .stdout(Stdio::piped()) .spawn() - .unwrap_or_else(|err| panic!("failed to spawn {cmd:?}: {err}")); + .with_context(|| format!("failed to spawn {cmd:?}"))?; let Child { stdout, .. } = &mut child; - let stdout = stdout.take().unwrap(); + let stdout = stdout.take().expect("stdout"); let dst = dst.with_extension("target.o"); @@ -160,131 +190,57 @@ fn main() { output.push(dst); exec( // NB: objcopy doesn't support reading from stdin, so we have to use llvm-objcopy. - Command::new("llvm-objcopy") + Command::new(env::var_os("LLVM_OBJCOPY").unwrap_or("llvm-objcopy".into())) .arg("--dump-section") .arg(output) .arg("-") - .stdin(stdout), - ) - .unwrap(); + .stdin(stdout) + .stdout(Stdio::null()), + )?; let output = child .wait_with_output() - .unwrap_or_else(|err| panic!("failed to wait for {cmd:?}: {err}")); + .with_context(|| format!("failed to wait for {cmd:?}"))?; let Output { status, .. } = &output; - assert_eq!(status.code(), Some(0), "{cmd:?} failed: {output:?}"); - } - } - - let target = format!("{target}-unknown-none"); - - let Package { manifest_path, .. } = integration_ebpf_package; - let integration_ebpf_dir = manifest_path.parent().unwrap(); - - // We have a build-dependency on `integration-ebpf`, so cargo will automatically rebuild us - // if `integration-ebpf`'s *library* target or any of its dependencies change. Since we - // depend on `integration-ebpf`'s *binary* targets, that only gets us half of the way. This - // stanza ensures cargo will rebuild us on changes to the binaries too, which gets us the - // rest of the way. - println!("cargo:rerun-if-changed={}", integration_ebpf_dir.as_str()); - - let mut cmd = Command::new("cargo"); - cmd.args([ - "build", - "-Z", - "build-std=core", - "--bins", - "--message-format=json", - "--release", - "--target", - &target, - ]); - - cmd.env("CARGO_CFG_BPF_TARGET_ARCH", arch); - - // Workaround to make sure that the rust-toolchain.toml is respected. - for key in ["RUSTUP_TOOLCHAIN", "RUSTC"] { - cmd.env_remove(key); - } - cmd.current_dir(integration_ebpf_dir); - - // Workaround for https://github.com/rust-lang/cargo/issues/6412 where cargo flocks itself. - let ebpf_target_dir = out_dir.join("integration-ebpf"); - cmd.arg("--target-dir").arg(&ebpf_target_dir); - - let mut child = cmd - .stdout(Stdio::piped()) - .stderr(Stdio::piped()) - .spawn() - .unwrap_or_else(|err| panic!("failed to spawn {cmd:?}: {err}")); - let Child { stdout, stderr, .. } = &mut child; - - // Trampoline stdout to cargo warnings. - let stderr = stderr.take().unwrap(); - let stderr = BufReader::new(stderr); - let stderr = std::thread::spawn(move || { - for line in stderr.lines() { - let line = line.unwrap(); - println!("cargo:warning={line}"); - } - }); - - let stdout = stdout.take().unwrap(); - let stdout = BufReader::new(stdout); - let mut executables = Vec::new(); - for message in Message::parse_stream(stdout) { - #[allow(clippy::collapsible_match)] - match message.expect("valid JSON") { - Message::CompilerArtifact(Artifact { - executable, - target: Target { name, .. }, - .. - }) => { - if let Some(executable) = executable { - executables.push((name, executable.into_std_path_buf())); - } - } - Message::CompilerMessage(CompilerMessage { message, .. }) => { - for line in message.rendered.unwrap_or_default().split('\n') { - println!("cargo:warning={line}"); - } - } - Message::TextLine(line) => { - println!("cargo:warning={line}"); + if !status.success() { + return Err(anyhow!("{cmd:?} failed: {status:?}")); } - _ => {} } } - let status = child - .wait() - .unwrap_or_else(|err| panic!("failed to wait for {cmd:?}: {err}")); - assert_eq!(status.code(), Some(0), "{cmd:?} failed: {status:?}"); - - stderr.join().map_err(std::panic::resume_unwind).unwrap(); - - for (name, binary) in executables { - let dst = out_dir.join(name); - let _: u64 = fs::copy(&binary, &dst) - .unwrap_or_else(|err| panic!("failed to copy {binary:?} to {dst:?}: {err}")); - } + let Package { + name, + manifest_path, + .. + } = integration_ebpf_package; + let integration_ebpf_package = aya_build::Package { + name: name.as_str(), + root_dir: manifest_path + .parent() + .ok_or_else(|| anyhow!("no parent for {manifest_path}"))? + .as_str(), + ..Default::default() + }; + aya_build::build_ebpf([integration_ebpf_package], aya_build::Toolchain::default())?; } else { for (src, build_btf) in C_BPF { let dst = out_dir.join(src).with_extension("o"); - fs::write(&dst, []).unwrap_or_else(|err| panic!("failed to create {dst:?}: {err}")); + fs::write(&dst, []).with_context(|| format!("failed to create {}", dst.display()))?; if *build_btf { let dst = dst.with_extension("target.o"); - fs::write(&dst, []).unwrap_or_else(|err| panic!("failed to create {dst:?}: {err}")); + fs::write(&dst, []) + .with_context(|| format!("failed to create {}", dst.display()))?; } } let Package { targets, .. } = integration_ebpf_package; for Target { name, kind, .. } in targets { - if *kind != ["bin"] { + if *kind != [TargetKind::Bin] { continue; } let dst = out_dir.join(name); - fs::write(&dst, []).unwrap_or_else(|err| panic!("failed to create {dst:?}: {err}")); + fs::write(&dst, []).with_context(|| format!("failed to create {}", dst.display()))?; } } + Ok(()) } diff --git a/test/integration-test/src/lib.rs b/test/integration-test/src/lib.rs index d4708033..64f37d18 100644 --- a/test/integration-test/src/lib.rs +++ b/test/integration-test/src/lib.rs @@ -1,27 +1,64 @@ -use aya::include_bytes_aligned; +macro_rules! bpf_file { + ($($uppercase:ident => $lowercase:literal),* $(,)?) => { + $( + pub const $uppercase: &[u8] = aya::include_bytes_aligned!(concat!(env!("OUT_DIR"), "/", $lowercase)); + )* + }; +} -pub const EXT: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/ext.bpf.o")); -pub const MAIN: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/main.bpf.o")); -pub const MULTIMAP_BTF: &[u8] = - include_bytes_aligned!(concat!(env!("OUT_DIR"), "/multimap-btf.bpf.o")); -pub const RELOC_BPF: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/reloc.bpf.o")); -pub const RELOC_BTF: &[u8] = - include_bytes_aligned!(concat!(env!("OUT_DIR"), "/reloc.bpf.target.o")); -pub const TEXT_64_64_RELOC: &[u8] = - include_bytes_aligned!(concat!(env!("OUT_DIR"), "/text_64_64_reloc.o")); +bpf_file!( + EXT => "ext.bpf.o", + ITER_TASK => "iter.bpf.o", + MAIN => "main.bpf.o", + MULTIMAP_BTF => "multimap-btf.bpf.o", -pub const LOG: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/log")); -pub const MAP_TEST: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/map_test")); -pub const NAME_TEST: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/name_test")); -pub const PASS: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/pass")); -pub const TEST: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/test")); -pub const RELOCATIONS: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/relocations")); -pub const TWO_PROGS: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/two_progs")); -pub const BPF_PROBE_READ: &[u8] = - include_bytes_aligned!(concat!(env!("OUT_DIR"), "/bpf_probe_read")); -pub const REDIRECT: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/redirect")); -pub const XDP_SEC: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/xdp_sec")); -pub const RING_BUF: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/ring_buf")); + ENUM_SIGNED_32_RELOC_BPF => "enum_signed_32_reloc.bpf.o", + ENUM_SIGNED_32_RELOC_BTF => "enum_signed_32_reloc.bpf.target.o", + ENUM_SIGNED_32_CHECKED_VARIANTS_RELOC_BPF => "enum_signed_32_checked_variants_reloc.bpf.o", + ENUM_SIGNED_32_CHECKED_VARIANTS_RELOC_BTF => "enum_signed_32_checked_variants_reloc.bpf.target.o", + ENUM_SIGNED_64_RELOC_BPF => "enum_signed_64_reloc.bpf.o", + ENUM_SIGNED_64_RELOC_BTF => "enum_signed_64_reloc.bpf.target.o", + ENUM_SIGNED_64_CHECKED_VARIANTS_RELOC_BPF => "enum_signed_64_checked_variants_reloc.bpf.o", + ENUM_SIGNED_64_CHECKED_VARIANTS_RELOC_BTF => "enum_signed_64_checked_variants_reloc.bpf.target.o", + ENUM_UNSIGNED_32_RELOC_BPF => "enum_unsigned_32_reloc.bpf.o", + ENUM_UNSIGNED_32_RELOC_BTF => "enum_unsigned_32_reloc.bpf.target.o", + ENUM_UNSIGNED_32_CHECKED_VARIANTS_RELOC_BPF => "enum_unsigned_32_checked_variants_reloc.bpf.o", + ENUM_UNSIGNED_32_CHECKED_VARIANTS_RELOC_BTF => "enum_unsigned_32_checked_variants_reloc.bpf.target.o", + ENUM_UNSIGNED_64_RELOC_BPF => "enum_unsigned_64_reloc.bpf.o", + ENUM_UNSIGNED_64_RELOC_BTF => "enum_unsigned_64_reloc.bpf.target.o", + ENUM_UNSIGNED_64_CHECKED_VARIANTS_RELOC_BPF => "enum_unsigned_64_checked_variants_reloc.bpf.o", + ENUM_UNSIGNED_64_CHECKED_VARIANTS_RELOC_BTF => "enum_unsigned_64_checked_variants_reloc.bpf.target.o", + FIELD_RELOC_BPF => "field_reloc.bpf.o", + FIELD_RELOC_BTF => "field_reloc.bpf.target.o", + POINTER_RELOC_BPF => "pointer_reloc.bpf.o", + POINTER_RELOC_BTF => "pointer_reloc.bpf.target.o", + STRUCT_FLAVORS_RELOC_BPF => "struct_flavors_reloc.bpf.o", + STRUCT_FLAVORS_RELOC_BTF => "struct_flavors_reloc.bpf.target.o", + + TEXT_64_64_RELOC => "text_64_64_reloc.o", + VARIABLES_RELOC => "variables_reloc.bpf.o", + + ARRAY => "array", + BPF_PROBE_READ => "bpf_probe_read", + LINEAR_DATA_STRUCTURES => "linear_data_structures", + LOG => "log", + MAP_TEST => "map_test", + MEMMOVE_TEST => "memmove_test", + NAME_TEST => "name_test", + PASS => "pass", + RAW_TRACEPOINT => "raw_tracepoint", + REDIRECT => "redirect", + RELOCATIONS => "relocations", + RING_BUF => "ring_buf", + SIMPLE_PROG => "simple_prog", + SK_STORAGE => "sk_storage", + STRNCMP => "strncmp", + TCX => "tcx", + TEST => "test", + TWO_PROGS => "two_progs", + XDP_SEC => "xdp_sec", + UPROBE_COOKIE => "uprobe_cookie", +); #[cfg(test)] mod tests; diff --git a/test/integration-test/src/tests.rs b/test/integration-test/src/tests.rs index f37d54bb..8c605313 100644 --- a/test/integration-test/src/tests.rs +++ b/test/integration-test/src/tests.rs @@ -1,10 +1,23 @@ +mod array; mod bpf_probe_read; mod btf_relocations; mod elf; +mod feature_probe; +mod info; +mod iter; +mod linear_data_structures; mod load; mod log; +mod lsm; +mod map_pin; +mod maps_disjoint; +mod raw_tracepoint; mod rbpf; mod relocations; mod ring_buf; +mod sk_storage; mod smoke; +mod strncmp; +mod tcx; +mod uprobe_cookie; mod xdp; diff --git a/test/integration-test/src/tests/array.rs b/test/integration-test/src/tests/array.rs new file mode 100644 index 00000000..8a78b246 --- /dev/null +++ b/test/integration-test/src/tests/array.rs @@ -0,0 +1,88 @@ +use aya::{EbpfLoader, maps::Array, programs::UProbe}; +use integration_common::array::{GET_INDEX, GET_PTR_INDEX, GET_PTR_MUT_INDEX}; + +#[unsafe(no_mangle)] +#[inline(never)] +extern "C" fn set(index: u32, value: u32) { + std::hint::black_box((index, value)); +} + +#[unsafe(no_mangle)] +#[inline(never)] +extern "C" fn get(index: u32) { + std::hint::black_box(index); +} + +#[unsafe(no_mangle)] +#[inline(never)] +extern "C" fn get_ptr(index: u32) { + std::hint::black_box(index); +} + +#[unsafe(no_mangle)] +#[inline(never)] +extern "C" fn get_ptr_mut(index: u32) { + std::hint::black_box(index); +} + +#[test_log::test] +fn test_array() { + let mut ebpf = EbpfLoader::new().load(crate::ARRAY).unwrap(); + for (result_map, array_map, progs_and_symbols) in [ + // BTF map definitions. + ( + "RESULT", + "ARRAY", + [ + ("set", "set"), + ("get", "get"), + ("get_ptr", "get_ptr"), + ("get_ptr_mut", "get_ptr_mut"), + ], + ), + // Legacy map definitions. + ( + "RESULT_LEGACY", + "ARRAY_LEGACY", + [ + ("set_legacy", "set"), + ("get_legacy", "get"), + ("get_ptr_legacy", "get_ptr"), + ("get_ptr_mut_legacy", "get_ptr_mut"), + ], + ), + ] { + for (prog_name, symbol) in progs_and_symbols { + let prog: &mut UProbe = ebpf.program_mut(prog_name).unwrap().try_into().unwrap(); + prog.load().unwrap(); + prog.attach(symbol, "/proc/self/exe", None, None).unwrap(); + } + let result_array = ebpf.map(result_map).unwrap(); + let result_array = Array::<_, u32>::try_from(result_array).unwrap(); + let array = ebpf.map(array_map).unwrap(); + let array = Array::<_, u32>::try_from(array).unwrap(); + let seq = 0..9; + for i in seq.clone() { + set(i, i.pow(2)); + } + for i in seq.clone() { + // Assert the value returned by user-space API. + let expected_value = i.pow(2); + let value = array.get(&i, 0).unwrap(); + assert_eq!(value, expected_value); + // Assert the value returned by eBPF in-kernel API. + get(i); + let result = result_array.get(&GET_INDEX, 0).unwrap(); + assert_eq!(result, expected_value); + get_ptr(i); + let result = result_array.get(&GET_PTR_INDEX, 0).unwrap(); + assert_eq!(result, expected_value); + } + for i in seq.clone() { + let value = i.pow(2); + get_ptr_mut(i); + let result = result_array.get(&GET_PTR_MUT_INDEX, 0).unwrap(); + assert_eq!(result, value); + } + } +} diff --git a/test/integration-test/src/tests/bpf_probe_read.rs b/test/integration-test/src/tests/bpf_probe_read.rs index 6479a2df..98d491ed 100644 --- a/test/integration-test/src/tests/bpf_probe_read.rs +++ b/test/integration-test/src/tests/bpf_probe_read.rs @@ -1,24 +1,13 @@ -use aya::{maps::Array, programs::UProbe, Ebpf}; -use test_log::test; +use aya::{Ebpf, maps::Array, programs::UProbe}; +use integration_common::bpf_probe_read::{RESULT_BUF_LEN, TestResult}; -const RESULT_BUF_LEN: usize = 1024; - -#[derive(Copy, Clone)] -#[repr(C)] -struct TestResult { - buf: [u8; RESULT_BUF_LEN], - len: Option>, -} - -unsafe impl aya::Pod for TestResult {} - -#[test] +#[test_log::test] fn bpf_probe_read_user_str_bytes() { let bpf = set_user_buffer(b"foo\0", RESULT_BUF_LEN); assert_eq!(result_bytes(&bpf), b"foo"); } -#[test] +#[test_log::test] fn bpf_probe_read_user_str_bytes_truncate() { let s = vec![b'a'; RESULT_BUF_LEN]; let bpf = set_user_buffer(&s, RESULT_BUF_LEN); @@ -26,25 +15,25 @@ fn bpf_probe_read_user_str_bytes_truncate() { assert_eq!(result_bytes(&bpf), &s[..RESULT_BUF_LEN - 1]); } -#[test] +#[test_log::test] fn bpf_probe_read_user_str_bytes_empty_string() { let bpf = set_user_buffer(b"\0", RESULT_BUF_LEN); assert_eq!(result_bytes(&bpf), b""); } -#[test] +#[test_log::test] fn bpf_probe_read_user_str_bytes_empty_dest() { let bpf = set_user_buffer(b"foo\0", 0); assert_eq!(result_bytes(&bpf), b""); } -#[test] +#[test_log::test] fn bpf_probe_read_kernel_str_bytes() { let bpf = set_kernel_buffer(b"foo\0", RESULT_BUF_LEN); assert_eq!(result_bytes(&bpf), b"foo"); } -#[test] +#[test_log::test] fn bpf_probe_read_kernel_str_bytes_truncate() { let s = vec![b'a'; RESULT_BUF_LEN]; let bpf = set_kernel_buffer(&s, RESULT_BUF_LEN); @@ -52,13 +41,13 @@ fn bpf_probe_read_kernel_str_bytes_truncate() { assert_eq!(result_bytes(&bpf), &s[..RESULT_BUF_LEN - 1]); } -#[test] +#[test_log::test] fn bpf_probe_read_kernel_str_bytes_empty_string() { let bpf = set_kernel_buffer(b"\0", RESULT_BUF_LEN); assert_eq!(result_bytes(&bpf), b""); } -#[test] +#[test_log::test] fn bpf_probe_read_kernel_str_bytes_empty_dest() { let bpf = set_kernel_buffer(b"foo\0", 0); assert_eq!(result_bytes(&bpf), b""); @@ -110,20 +99,20 @@ fn load_and_attach_uprobe(prog_name: &str, func_name: &str, bytes: &[u8]) -> Ebp let prog: &mut UProbe = bpf.program_mut(prog_name).unwrap().try_into().unwrap(); prog.load().unwrap(); - prog.attach(Some(func_name), 0, "/proc/self/exe", None) + prog.attach(func_name, "/proc/self/exe", None, None) .unwrap(); bpf } -#[no_mangle] +#[unsafe(no_mangle)] #[inline(never)] -pub extern "C" fn trigger_bpf_probe_read_user(string: *const u8, len: usize) { +extern "C" fn trigger_bpf_probe_read_user(string: *const u8, len: usize) { core::hint::black_box((string, len)); } -#[no_mangle] +#[unsafe(no_mangle)] #[inline(never)] -pub extern "C" fn trigger_bpf_probe_read_kernel(len: usize) { +extern "C" fn trigger_bpf_probe_read_kernel(len: usize) { core::hint::black_box(len); } diff --git a/test/integration-test/src/tests/btf_relocations.rs b/test/integration-test/src/tests/btf_relocations.rs index 29616850..0c64c426 100644 --- a/test/integration-test/src/tests/btf_relocations.rs +++ b/test/integration-test/src/tests/btf_relocations.rs @@ -1,57 +1,100 @@ -use aya::{maps::Array, programs::UProbe, util::KernelVersion, Btf, EbpfLoader, Endianness}; +use aya::{EbpfLoader, Endianness, maps::Array, programs::UProbe}; +use aya_obj::btf::Btf; use test_case::test_case; -#[test_case("enum_signed_32", false, Some((KernelVersion::new(6, 0, 0), "https://github.com/torvalds/linux/commit/6089fb3")), -0x7AAAAAAAi32 as u64)] -#[test_case("enum_signed_32", true, Some((KernelVersion::new(6, 0, 0), "https://github.com/torvalds/linux/commit/6089fb3")), -0x7BBBBBBBi32 as u64)] -#[test_case("enum_signed_32_checked_variants", false, Some((KernelVersion::new(6, 0, 0), "https://github.com/torvalds/linux/commit/6089fb3")), -0x7AAAAAAAi32 as u64)] -#[test_case("enum_signed_32_checked_variants", true, Some((KernelVersion::new(6, 0, 0), "https://github.com/torvalds/linux/commit/6089fb3")), -0x7BBBBBBBi32 as u64)] -#[test_case("enum_signed_64", false, Some((KernelVersion::new(6, 0, 0), "https://github.com/torvalds/linux/commit/6089fb3")), -0xAAAAAAABBBBBBBBi64 as u64)] -#[test_case("enum_signed_64", true, Some((KernelVersion::new(6, 0, 0), "https://github.com/torvalds/linux/commit/6089fb3")), -0xCCCCCCCDDDDDDDDi64 as u64)] -#[test_case("enum_signed_64_checked_variants", false, Some((KernelVersion::new(6, 0, 0), "https://github.com/torvalds/linux/commit/6089fb3")), -0xAAAAAAABBBBBBBi64 as u64)] -#[test_case("enum_signed_64_checked_variants", true, Some((KernelVersion::new(6, 0, 0), "https://github.com/torvalds/linux/commit/6089fb3")), -0xCCCCCCCDDDDDDDi64 as u64)] -#[test_case("enum_unsigned_32", false, None, 0xAAAAAAAA)] -#[test_case("enum_unsigned_32", true, None, 0xBBBBBBBB)] -#[test_case("enum_unsigned_32_checked_variants", false, None, 0xAAAAAAAA)] -#[test_case("enum_unsigned_32_checked_variants", true, None, 0xBBBBBBBB)] -#[test_case("enum_unsigned_64", false, Some((KernelVersion::new(6, 0, 0), "https://github.com/torvalds/linux/commit/6089fb3")), 0xAAAAAAAABBBBBBBB)] -#[test_case("enum_unsigned_64", true, Some((KernelVersion::new(6, 0, 0), "https://github.com/torvalds/linux/commit/6089fb3")), 0xCCCCCCCCDDDDDDDD)] -#[test_case("enum_unsigned_64_checked_variants", false, Some((KernelVersion::new(6, 0, 0), "https://github.com/torvalds/linux/commit/6089fb3")), 0xAAAAAAAABBBBBBBB)] -#[test_case("enum_unsigned_64_checked_variants", true, Some((KernelVersion::new(6, 0, 0), "https://github.com/torvalds/linux/commit/6089fb3")), 0xCCCCCCCCDDDDDDDD)] -#[test_case("field", false, None, 2)] -#[test_case("field", true, None, 1)] -#[test_case("pointer", false, None, 42)] -#[test_case("pointer", true, None, 21)] -#[test_case("struct_flavors", false, None, 1)] -#[test_case("struct_flavors", true, None, 2)] +#[derive(Debug)] +enum Requirements {} + +#[test_case(crate::ENUM_SIGNED_32_RELOC_BPF, None, None,-0x7AAAAAAAi32 as u64)] +#[test_case(crate::ENUM_SIGNED_32_RELOC_BPF, Some(crate::ENUM_SIGNED_32_RELOC_BTF), None, -0x7BBBBBBBi32 as u64)] +#[test_case(crate::ENUM_SIGNED_32_CHECKED_VARIANTS_RELOC_BPF, None, None,-0x7AAAAAAAi32 as u64)] +#[test_case(crate::ENUM_SIGNED_32_CHECKED_VARIANTS_RELOC_BPF, Some(crate::ENUM_SIGNED_32_CHECKED_VARIANTS_RELOC_BTF), None, -0x7BBBBBBBi32 as u64)] +#[test_case(crate::ENUM_SIGNED_64_RELOC_BPF, None, None,-0xAAAAAAABBBBBBBBi64 as u64)] +#[test_case(crate::ENUM_SIGNED_64_RELOC_BPF, Some(crate::ENUM_SIGNED_64_RELOC_BTF), None, -0xCCCCCCCDDDDDDDDi64 as u64)] +#[test_case(crate::ENUM_SIGNED_64_CHECKED_VARIANTS_RELOC_BPF, None, None,-0xAAAAAAABBBBBBBi64 as u64)] +#[test_case(crate::ENUM_SIGNED_64_CHECKED_VARIANTS_RELOC_BPF, Some(crate::ENUM_SIGNED_64_CHECKED_VARIANTS_RELOC_BTF), None, -0xCCCCCCCDDDDDDDi64 as u64)] +#[test_case(crate::ENUM_UNSIGNED_32_RELOC_BPF, None, None, 0xAAAAAAAA)] +#[test_case( + crate::ENUM_UNSIGNED_32_RELOC_BPF, + Some(crate::ENUM_UNSIGNED_32_RELOC_BTF), + None, + 0xBBBBBBBB +)] +#[test_case( + crate::ENUM_UNSIGNED_32_CHECKED_VARIANTS_RELOC_BPF, + None, + None, + 0xAAAAAAAA +)] +#[test_case( + crate::ENUM_UNSIGNED_32_CHECKED_VARIANTS_RELOC_BPF, + Some(crate::ENUM_UNSIGNED_32_CHECKED_VARIANTS_RELOC_BTF), + None, + 0xBBBBBBBB +)] +#[test_case(crate::ENUM_UNSIGNED_64_RELOC_BPF, None, None, 0xAAAAAAAABBBBBBBB)] +#[test_case( + crate::ENUM_UNSIGNED_64_RELOC_BPF, + Some(crate::ENUM_UNSIGNED_64_RELOC_BTF), + None, + 0xCCCCCCCCDDDDDDDD +)] +#[test_case( + crate::ENUM_UNSIGNED_64_CHECKED_VARIANTS_RELOC_BPF, + None, + None, + 0xAAAAAAAABBBBBBBB +)] +#[test_case( + crate::ENUM_UNSIGNED_64_CHECKED_VARIANTS_RELOC_BPF, + Some(crate::ENUM_UNSIGNED_64_CHECKED_VARIANTS_RELOC_BTF), + None, + 0xCCCCCCCCDDDDDDDD +)] +#[test_case(crate::FIELD_RELOC_BPF, None, None, 2)] +#[test_case(crate::FIELD_RELOC_BPF, Some(crate::FIELD_RELOC_BTF), None, 1)] +#[test_case(crate::POINTER_RELOC_BPF, None, None, 42)] +#[test_case(crate::POINTER_RELOC_BPF, Some(crate::POINTER_RELOC_BTF), None, 21)] +#[test_case(crate::STRUCT_FLAVORS_RELOC_BPF, None, None, 1)] +#[test_case( + crate::STRUCT_FLAVORS_RELOC_BPF, + Some(crate::STRUCT_FLAVORS_RELOC_BTF), + None, + 2 +)] +#[test_log::test] fn relocation_tests( - program: &str, - with_relocations: bool, - required_kernel_version: Option<(KernelVersion, &str)>, + bpf: &[u8], + btf: Option<&[u8]>, + requirements: Option, expected: u64, ) { - if let Some((required_kernel_version, commit)) = required_kernel_version { - let current_kernel_version = KernelVersion::current().unwrap(); - if current_kernel_version < required_kernel_version { - eprintln!("skipping test on kernel {current_kernel_version:?}, support for {program} was added in {required_kernel_version:?}; see {commit}"); - return; + let features = aya::features(); + + let btf = btf.map(|btf| Btf::parse(btf, Endianness::default()).unwrap()); + + let mut bpf = match EbpfLoader::new().btf(btf.as_ref()).load(bpf) { + Ok(bpf) => { + if let Some(requirements) = requirements { + // We'll want to panic here if we expect some feature we don't have. + match requirements {} + } + bpf } - } - let mut bpf = EbpfLoader::new() - .btf( - with_relocations - .then(|| Btf::parse(crate::RELOC_BTF, Endianness::default()).unwrap()) - .as_ref(), - ) - .load(crate::RELOC_BPF) - .unwrap(); - let program: &mut UProbe = bpf.program_mut(program).unwrap().try_into().unwrap(); + Err(err) => panic!( + "err={err:?} requirements={requirements:?} features={:?}", + features.btf() + ), + }; + + let program: &mut UProbe = bpf.program_mut("program").unwrap().try_into().unwrap(); program.load().unwrap(); program .attach( - Some("trigger_btf_relocations_program"), - 0, + "trigger_btf_relocations_program", "/proc/self/exe", None, + None, ) .unwrap(); @@ -62,8 +105,8 @@ fn relocation_tests( assert_eq!(output_map.get(&key, 0).unwrap(), expected) } -#[no_mangle] +#[unsafe(no_mangle)] #[inline(never)] -pub extern "C" fn trigger_btf_relocations_program() { +extern "C" fn trigger_btf_relocations_program() { core::hint::black_box(trigger_btf_relocations_program); } diff --git a/test/integration-test/src/tests/elf.rs b/test/integration-test/src/tests/elf.rs index 3a5ad0a3..6d6f8d0f 100644 --- a/test/integration-test/src/tests/elf.rs +++ b/test/integration-test/src/tests/elf.rs @@ -1,7 +1,6 @@ -use object::{Object, ObjectSymbol}; -use test_log::test; +use object::{Object as _, ObjectSymbol as _}; -#[test] +#[test_log::test] fn test_maps() { let obj_file = object::File::parse(crate::MAP_TEST).unwrap(); assert!(obj_file.section_by_name("maps").is_some()); diff --git a/test/integration-test/src/tests/feature_probe.rs b/test/integration-test/src/tests/feature_probe.rs new file mode 100644 index 00000000..7ffbf78b --- /dev/null +++ b/test/integration-test/src/tests/feature_probe.rs @@ -0,0 +1,241 @@ +//! Test feature probing against kernel version. + +use aya::{ + Btf, + maps::MapType, + programs::{LsmAttachType, ProgramType}, + sys::{is_map_supported, is_program_supported}, + util::KernelVersion, +}; +use procfs::kernel_config; + +use crate::utils::kernel_assert; + +#[test_log::test] +fn probe_supported_programs() { + let current = aya::util::KernelVersion::current().unwrap(); + let kernel_config = kernel_config().unwrap(); + + macro_rules! is_supported { + ($prog_type:expr) => { + is_program_supported($prog_type).unwrap() + }; + } + + let kern_version = KernelVersion::new(3, 19, 0); + kernel_assert!(is_supported!(ProgramType::SocketFilter), kern_version); + + let kern_version = KernelVersion::new(4, 1, 0); + kernel_assert!(is_supported!(ProgramType::KProbe), kern_version); + kernel_assert!(is_supported!(ProgramType::SchedClassifier), kern_version); + kernel_assert!(is_supported!(ProgramType::SchedAction), kern_version); + + let kern_version = KernelVersion::new(4, 7, 0); + kernel_assert!(is_supported!(ProgramType::TracePoint), kern_version); + + let kern_version = KernelVersion::new(4, 8, 0); + kernel_assert!(is_supported!(ProgramType::Xdp), kern_version); + + let kern_version = KernelVersion::new(4, 9, 0); + kernel_assert!(is_supported!(ProgramType::PerfEvent), kern_version); + + let kern_version = KernelVersion::new(4, 10, 0); + kernel_assert!(is_supported!(ProgramType::CgroupSkb), kern_version); + kernel_assert!(is_supported!(ProgramType::CgroupSock), kern_version); + kernel_assert!(is_supported!(ProgramType::LwtInput), kern_version); + kernel_assert!(is_supported!(ProgramType::LwtOutput), kern_version); + kernel_assert!(is_supported!(ProgramType::LwtXmit), kern_version); + + let kern_version = KernelVersion::new(4, 13, 0); + kernel_assert!(is_supported!(ProgramType::SockOps), kern_version); + + let kern_version = KernelVersion::new(4, 14, 0); + kernel_assert!(is_supported!(ProgramType::SkSkb), kern_version); + + let kern_version = KernelVersion::new(4, 15, 0); + kernel_assert!(is_supported!(ProgramType::CgroupDevice), kern_version); + + let kern_version = KernelVersion::new(4, 17, 0); + kernel_assert!(is_supported!(ProgramType::SkMsg), kern_version); + kernel_assert!(is_supported!(ProgramType::RawTracePoint), kern_version); + kernel_assert!(is_supported!(ProgramType::CgroupSockAddr), kern_version); + + let kern_version = KernelVersion::new(4, 18, 0); + kernel_assert!(is_supported!(ProgramType::LwtSeg6local), kern_version); + + if current >= kern_version { + // `lirc_mode2` requires CONFIG_BPF_LIRC_MODE2=y + let lirc_mode2_config = matches!( + kernel_config.get("CONFIG_BPF_LIRC_MODE2"), + Some(procfs::ConfigSetting::Yes) + ); + assert_eq!( + is_supported!(ProgramType::LircMode2), + lirc_mode2_config, + "current={current}" + ); + if !lirc_mode2_config { + eprintln!("CONFIG_BPF_LIRC_MODE2 required for lirc_mode2 program type"); + } + } else { + assert!( + !is_supported!(ProgramType::LircMode2), + "{current} < {kern_version}" + ); + } + + let kern_version = KernelVersion::new(4, 19, 0); + kernel_assert!(is_supported!(ProgramType::SkReuseport), kern_version); + + let kern_version = KernelVersion::new(4, 20, 0); + kernel_assert!(is_supported!(ProgramType::FlowDissector), kern_version); + + let kern_version = KernelVersion::new(5, 2, 0); + kernel_assert!(is_supported!(ProgramType::CgroupSysctl), kern_version); + kernel_assert!( + is_supported!(ProgramType::RawTracePointWritable), + kern_version + ); + + let kern_version = KernelVersion::new(5, 3, 0); + kernel_assert!(is_supported!(ProgramType::CgroupSockopt), kern_version); + + let kern_version = KernelVersion::new(5, 5, 0); + kernel_assert!(is_supported!(ProgramType::Tracing), kern_version); // Requires `CONFIG_DEBUG_INFO_BTF=y` + + let kern_version = KernelVersion::new(5, 6, 0); + kernel_assert!(is_supported!(ProgramType::StructOps), kern_version); + kernel_assert!(is_supported!(ProgramType::Extension), kern_version); + + { + let kern_version = if cfg!(target_arch = "aarch64") { + KernelVersion::new(6, 4, 0) + } else { + KernelVersion::new(5, 7, 0) + }; + // `lsm` requires `CONFIG_DEBUG_INFO_BTF=y` & `CONFIG_BPF_LSM=y` + // Ways to check if `CONFIG_BPF_LSM` is enabled: + // - kernel config has `CONFIG_BPF_LSM=y`, but config is not always exposed. + // - an LSM hook is present in BTF, e.g. `bpf_lsm_bpf`. hooks are found in `bpf_lsm.c` + if current >= kern_version { + let lsm_enabled = matches!( + kernel_config.get("CONFIG_BPF_LSM"), + Some(procfs::ConfigSetting::Yes) + ) || Btf::from_sys_fs() + .and_then(|btf| { + btf.id_by_type_name_kind("bpf_lsm_bpf", aya_obj::btf::BtfKind::Func) + }) + .is_ok(); + assert_eq!( + is_supported!(ProgramType::Lsm(LsmAttachType::Mac)), + lsm_enabled, + "current={current}" + ); + if !lsm_enabled { + eprintln!("CONFIG_BPF_LSM required for lsm program type"); + } + } else { + assert!( + !is_supported!(ProgramType::Lsm(LsmAttachType::Mac)), + "{current} < {kern_version}" + ); + } + } + + let kern_version = KernelVersion::new(5, 9, 0); + kernel_assert!(is_supported!(ProgramType::SkLookup), kern_version); + + let kern_version = KernelVersion::new(5, 14, 0); + kernel_assert!(is_supported!(ProgramType::Syscall), kern_version); + + let kern_version = KernelVersion::new(6, 4, 0); + kernel_assert!(is_supported!(ProgramType::Netfilter), kern_version); +} + +#[test_log::test] +fn probe_supported_maps() { + macro_rules! is_supported { + ($map_type:expr) => { + is_map_supported($map_type).unwrap() + }; + } + + let kern_version = KernelVersion::new(3, 19, 0); + kernel_assert!(is_supported!(MapType::Hash), kern_version); + kernel_assert!(is_supported!(MapType::Array), kern_version); + + let kern_version = KernelVersion::new(4, 2, 0); + kernel_assert!(is_supported!(MapType::ProgramArray), kern_version); + + let kern_version = KernelVersion::new(4, 3, 0); + kernel_assert!(is_supported!(MapType::PerfEventArray), kern_version); + + let kern_version = KernelVersion::new(4, 6, 0); + kernel_assert!(is_supported!(MapType::PerCpuHash), kern_version); + kernel_assert!(is_supported!(MapType::PerCpuArray), kern_version); + kernel_assert!(is_supported!(MapType::StackTrace), kern_version); + + let kern_version = KernelVersion::new(4, 8, 0); + kernel_assert!(is_supported!(MapType::CgroupArray), kern_version); + + let kern_version = KernelVersion::new(4, 10, 0); + kernel_assert!(is_supported!(MapType::LruHash), kern_version); + kernel_assert!(is_supported!(MapType::LruPerCpuHash), kern_version); + + let kern_version = KernelVersion::new(4, 11, 0); + kernel_assert!(is_supported!(MapType::LpmTrie), kern_version); + + let kern_version = KernelVersion::new(4, 12, 0); + kernel_assert!(is_supported!(MapType::ArrayOfMaps), kern_version); + kernel_assert!(is_supported!(MapType::HashOfMaps), kern_version); + + let kern_version = KernelVersion::new(4, 14, 0); + kernel_assert!(is_supported!(MapType::DevMap), kern_version); + kernel_assert!(is_supported!(MapType::SockMap), kern_version); + + let kern_version = KernelVersion::new(4, 15, 0); + kernel_assert!(is_supported!(MapType::CpuMap), kern_version); + + let kern_version = KernelVersion::new(4, 18, 0); + kernel_assert!(is_supported!(MapType::XskMap), kern_version); + kernel_assert!(is_supported!(MapType::SockHash), kern_version); + + let kern_version = KernelVersion::new(4, 19, 0); + kernel_assert!(is_supported!(MapType::CgroupStorage), kern_version); + kernel_assert!(is_supported!(MapType::ReuseportSockArray), kern_version); + + let kern_version = KernelVersion::new(4, 20, 0); + kernel_assert!(is_supported!(MapType::PerCpuCgroupStorage), kern_version); + kernel_assert!(is_supported!(MapType::Queue), kern_version); + kernel_assert!(is_supported!(MapType::Stack), kern_version); + + let kern_version = KernelVersion::new(5, 2, 0); + kernel_assert!(is_supported!(MapType::SkStorage), kern_version); + + let kern_version = KernelVersion::new(5, 4, 0); + kernel_assert!(is_supported!(MapType::DevMapHash), kern_version); + + let kern_version = KernelVersion::new(5, 6, 0); + kernel_assert!(is_supported!(MapType::StructOps), kern_version); + + let kern_version = KernelVersion::new(5, 8, 0); + kernel_assert!(is_supported!(MapType::RingBuf), kern_version); + + let kern_version = KernelVersion::new(5, 10, 0); + kernel_assert!(is_supported!(MapType::InodeStorage), kern_version); // Requires `CONFIG_BPF_LSM=y` + + let kern_version = KernelVersion::new(5, 11, 0); + kernel_assert!(is_supported!(MapType::TaskStorage), kern_version); + + let kern_version = KernelVersion::new(5, 16, 0); + kernel_assert!(is_supported!(MapType::BloomFilter), kern_version); + + let kern_version = KernelVersion::new(6, 1, 0); + kernel_assert!(is_supported!(MapType::UserRingBuf), kern_version); + + let kern_version = KernelVersion::new(6, 2, 0); + kernel_assert!(is_supported!(MapType::CgrpStorage), kern_version); + + let kern_version = KernelVersion::new(6, 9, 0); + kernel_assert!(is_supported!(MapType::Arena), kern_version); +} diff --git a/test/integration-test/src/tests/info.rs b/test/integration-test/src/tests/info.rs new file mode 100644 index 00000000..9a4740c3 --- /dev/null +++ b/test/integration-test/src/tests/info.rs @@ -0,0 +1,340 @@ +//! Tests the Info API. + +// TODO: Figure out a way to assert that field is truly not present. +// We can call `bpf_obj_get_info_by_fd()` and fill our target field with arbitrary data. +// `E2BIG` error from `bpf_check_uarg_tail_zero()` will detect if we're accessing fields that +// isn't supported on the kernel. +// Issue is that `bpf_obj_get_info_by_fd()` will need to be public. :/ + +use std::{fs, panic, path::Path, time::SystemTime}; + +use aya::{ + Ebpf, + maps::{Array, HashMap, IterableMap as _, MapError, MapType, loaded_maps}, + programs::{ProgramError, ProgramType, SocketFilter, TracePoint, UProbe, loaded_programs}, + sys::{is_map_supported, is_program_supported}, + util::KernelVersion, +}; +use aya_obj::generated::bpf_prog_type; +use libc::EINVAL; + +use crate::utils::{kernel_assert, kernel_assert_eq}; + +#[test_log::test] +fn test_loaded_programs() { + if !is_program_supported(ProgramType::SocketFilter).unwrap() { + eprintln!("skipping test - socket_filter program not supported"); + return; + } + + // Since we are only testing the programs for their metadata, there is no need to "attach" them. + let mut bpf = Ebpf::load(crate::TEST).unwrap(); + let prog: &mut UProbe = bpf.program_mut("test_uprobe").unwrap().try_into().unwrap(); + prog.load().unwrap(); + let test_prog = prog.info().unwrap(); + + // Ensure loaded program doesn't panic + let mut programs = loaded_programs().peekable(); + if let Err(err) = programs.peek().unwrap() { + if let ProgramError::SyscallError(err) = &err { + // Skip entire test since feature not available + if err.io_error.raw_os_error() == Some(EINVAL) { + eprintln!("skipping test - `loaded_programs()` not supported"); + return; + } + } + panic!("{err}"); + } + + // Loaded programs should contain our test program + let mut programs = programs.filter_map(|prog| prog.ok()); + kernel_assert!( + programs.any(|prog| prog.id() == test_prog.id()), + KernelVersion::new(4, 13, 0) + ); + + // Use loaded programs to find our test program and exercise `from_program_info()`. + let info = loaded_programs() + .filter_map(|prog| prog.ok()) + .find(|prog| prog.id() == test_prog.id()) + .unwrap(); + + let mut p: UProbe = unsafe { + UProbe::from_program_info(info, "test_uprobe".into(), aya::programs::ProbeKind::UProbe) + .unwrap() + }; + + // Ensure we can perform basic operations on the re-created program. + let res = p + .attach("uprobe_function", "/proc/self/exe", None, None) + .unwrap(); + + // Ensure the program can be detached. + p.detach(res).unwrap(); +} + +#[test_log::test] +fn test_program_info() { + if !is_program_supported(ProgramType::SocketFilter).unwrap() { + eprintln!("skipping test - socket_filter program not supported"); + return; + } + + // Kernels below v4.15 have been observed to have `bpf_jit_enable` disabled by default. + let _guard = ensure_sysctl_enabled("/proc/sys/net/core/bpf_jit_enable"); + + let mut bpf = Ebpf::load(crate::SIMPLE_PROG).unwrap(); + let prog: &mut SocketFilter = bpf.program_mut("simple_prog").unwrap().try_into().unwrap(); + prog.load().unwrap(); + let test_prog = prog.info().unwrap(); + + // Test `bpf_prog_info` fields. + kernel_assert_eq!( + bpf_prog_type::BPF_PROG_TYPE_SOCKET_FILTER, + test_prog.program_type(), + KernelVersion::new(4, 13, 0), + ); + kernel_assert!(test_prog.id() > 0, KernelVersion::new(4, 13, 0)); + kernel_assert!(test_prog.tag() > 0, KernelVersion::new(4, 13, 0)); + kernel_assert!(test_prog.size_jitted() > 0, KernelVersion::new(4, 13, 0)); + kernel_assert!( + test_prog.size_translated().is_some(), + KernelVersion::new(4, 13, 0), + ); + kernel_assert!( + test_prog.loaded_at().is_some(), + KernelVersion::new(4, 15, 0), + ); + kernel_assert_eq!( + Some(0), + test_prog.created_by_uid(), + KernelVersion::new(4, 15, 0), + ); + let maps = test_prog.map_ids().unwrap(); + kernel_assert_eq!(maps, Some(Vec::new()), KernelVersion::new(4, 15, 0)); + kernel_assert_eq!( + Some("simple_prog"), + test_prog.name_as_str(), + KernelVersion::new(4, 15, 0), + ); + kernel_assert_eq!( + Some(true), + test_prog.gpl_compatible(), + KernelVersion::new(4, 18, 0), + ); + kernel_assert!( + test_prog.verified_instruction_count().is_some(), + KernelVersion::new(5, 16, 0), + ); + + // We can't reliably test these fields since `0` can be interpreted as the actual value or + // unavailable. + test_prog.btf_id(); + + // Ensure rest of the fields do not panic. + test_prog.memory_locked().unwrap(); + test_prog.fd().unwrap(); +} + +#[test_log::test] +fn test_loaded_at() { + if !is_program_supported(ProgramType::SocketFilter).unwrap() { + eprintln!("skipping test - socket_filter program not supported"); + return; + } + + let mut bpf: Ebpf = Ebpf::load(crate::SIMPLE_PROG).unwrap(); + let prog: &mut SocketFilter = bpf.program_mut("simple_prog").unwrap().try_into().unwrap(); + + // SystemTime is not monotonic, which can cause this test to flake. We don't expect the clock + // timestamp to continuously jump around, so we add some retries. If the test is ever correct, + // we know that the value returned by loaded_at() was reasonable relative to SystemTime::now(). + let mut failures = Vec::new(); + for () in std::iter::repeat_n((), 5) { + let t1 = SystemTime::now(); + prog.load().unwrap(); + + let t2 = SystemTime::now(); + let loaded_at = match prog.info().unwrap().loaded_at() { + Some(time) => time, + None => { + eprintln!("skipping test - `bpf_prog_info.load_time` field not supported"); + return; + } + }; + prog.unload().unwrap(); + + let range = t1..t2; + if range.contains(&loaded_at) { + failures.clear(); + break; + } + failures.push(LoadedAtRange(loaded_at, range)); + } + assert!( + failures.is_empty(), + "loaded_at was not in range: {failures:?}", + ); + + struct LoadedAtRange(SystemTime, std::ops::Range); + impl std::fmt::Debug for LoadedAtRange { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let Self(loaded_at, range) = self; + write!(f, "{range:?}.contains({loaded_at:?})") + } + } +} + +#[test_log::test] +fn test_prog_stats() { + if !is_program_supported(ProgramType::TracePoint).unwrap() { + eprintln!("skipping test - tracepoint program not supported"); + return; + } + if !Path::new("/sys/kernel/debug/tracing/events/syscalls/sys_enter_bpf").exists() { + eprintln!("skipping test - `syscalls/sys_enter_bpf` not available"); + return; + } + + let _guard = ensure_sysctl_enabled("/proc/sys/kernel/bpf_stats_enabled"); + + let mut bpf = Ebpf::load(crate::TEST).unwrap(); + let prog: &mut TracePoint = bpf + .program_mut("test_tracepoint") + .unwrap() + .try_into() + .unwrap(); + prog.load().unwrap(); + prog.attach("syscalls", "sys_enter_bpf").unwrap(); + let test_prog = prog.info().unwrap(); + + kernel_assert!(test_prog.run_count() > 0, KernelVersion::new(5, 1, 0)); +} + +#[test_log::test] +fn list_loaded_maps() { + if !is_program_supported(ProgramType::SocketFilter).unwrap() { + eprintln!("skipping test - socket_filter program not supported"); + return; + } else if !is_map_supported(MapType::Hash).unwrap() { + eprintln!("skipping test - hash map not supported"); + return; + } else if !is_map_supported(MapType::Array).unwrap() { + eprintln!("skipping test - array map not supported"); + return; + } + + // Load a program with maps. + let mut bpf: Ebpf = Ebpf::load(crate::MAP_TEST).unwrap(); + let prog: &mut SocketFilter = bpf.program_mut("simple_prog").unwrap().try_into().unwrap(); + prog.load().unwrap(); + + // Ensure the loaded_maps() api doesn't panic + let mut maps = loaded_maps().peekable(); + if let Err(err) = maps.peek().unwrap() { + if let MapError::SyscallError(err) = &err { + if err.io_error.raw_os_error() == Some(EINVAL) { + eprintln!("skipping test - `loaded_maps()` not supported"); + return; + } + } + panic!("{err}"); + } + + // Loaded maps should contain our test maps + let maps: Vec<_> = maps.filter_map(|m| m.ok()).collect(); + if let Ok(info) = &prog.info() { + if let Some(map_ids) = info.map_ids().unwrap() { + assert_eq!(2, map_ids.len()); + for id in map_ids { + assert!( + maps.iter().any(|m| m.id() == id), + "expected `loaded_maps()` to have `map_ids` from program", + ); + } + } + } + + let hash: HashMap<_, u32, u8> = HashMap::try_from(bpf.map("BAR").unwrap()).unwrap(); + let hash_id = hash.map().info().unwrap().id(); + kernel_assert!( + maps.iter().any(|map| map.id() == hash_id), + KernelVersion::new(4, 13, 0), + ); + + let array: Array<_, u32> = Array::try_from(bpf.map("FOO").unwrap()).unwrap(); + let array_id = array.map().info().unwrap().id(); + kernel_assert!( + maps.iter().any(|map| map.id() == array_id), + KernelVersion::new(4, 13, 0), + ); +} + +#[test_log::test] +fn test_map_info() { + if !is_program_supported(ProgramType::SocketFilter).unwrap() { + eprintln!("skipping test - socket_filter program not supported"); + return; + } else if !is_map_supported(MapType::Hash).unwrap() { + eprintln!("skipping test - hash map not supported"); + return; + } else if !is_map_supported(MapType::Array).unwrap() { + eprintln!("skipping test - array map not supported"); + return; + } + + let mut bpf: Ebpf = Ebpf::load(crate::MAP_TEST).unwrap(); + let prog: &mut SocketFilter = bpf.program_mut("simple_prog").unwrap().try_into().unwrap(); + prog.load().unwrap(); + + // Test `bpf_map_info` fields. + let hash: HashMap<_, u32, u8> = HashMap::try_from(bpf.map("BAR").unwrap()).unwrap(); + let hash = hash.map().info().unwrap(); + kernel_assert_eq!( + MapType::Hash, + hash.map_type().unwrap_or(MapType::Unspecified), + KernelVersion::new(4, 13, 0), + ); + kernel_assert!(hash.id() > 0, KernelVersion::new(4, 13, 0)); + kernel_assert_eq!(4, hash.key_size(), KernelVersion::new(4, 13, 0)); + kernel_assert_eq!(1, hash.value_size(), KernelVersion::new(4, 13, 0)); + kernel_assert_eq!(8, hash.max_entries(), KernelVersion::new(4, 13, 0)); + kernel_assert_eq!( + Some("BAR"), + hash.name_as_str(), + KernelVersion::new(4, 15, 0), + ); + + hash.map_flags(); + hash.fd().unwrap(); + + let array: Array<_, u32> = Array::try_from(bpf.map("FOO").unwrap()).unwrap(); + let array = array.map().info().unwrap(); + kernel_assert_eq!( + MapType::Array, + array.map_type().unwrap_or(MapType::Unspecified), + KernelVersion::new(4, 13, 0), + ); + kernel_assert!(array.id() > 0, KernelVersion::new(4, 13, 0)); + kernel_assert_eq!(4, array.key_size(), KernelVersion::new(4, 13, 0)); + kernel_assert_eq!(4, array.value_size(), KernelVersion::new(4, 13, 0)); + kernel_assert_eq!(10, array.max_entries(), KernelVersion::new(4, 13, 0)); + kernel_assert_eq!( + Some("FOO"), + array.name_as_str(), + KernelVersion::new(4, 15, 0), + ); + + array.map_flags(); + array.fd().unwrap(); +} + +fn ensure_sysctl_enabled<'a>( + path: &'a str, +) -> Option> { + let content = fs::read_to_string(path).unwrap(); + (!content.starts_with('1')).then(move || { + fs::write(path, b"1").unwrap(); + scopeguard::guard(path, |path| fs::write(path, b"0").unwrap()) + }) +} diff --git a/test/integration-test/src/tests/iter.rs b/test/integration-test/src/tests/iter.rs new file mode 100644 index 00000000..47229c99 --- /dev/null +++ b/test/integration-test/src/tests/iter.rs @@ -0,0 +1,27 @@ +use std::io::BufRead as _; + +use aya::{Btf, Ebpf, programs::Iter}; + +#[test_log::test] +fn iter_task() { + let mut ebpf = Ebpf::load(crate::ITER_TASK).unwrap(); + let btf = Btf::from_sys_fs().unwrap(); + let prog: &mut Iter = ebpf.program_mut("iter_task").unwrap().try_into().unwrap(); + prog.load("task", &btf).unwrap(); + + let link_id = prog.attach().unwrap(); + let link = prog.take_link(link_id).unwrap(); + let file = link.into_file().unwrap(); + let reader = std::io::BufReader::new(file); + + let mut lines = reader.lines(); + let line_title = lines.next().unwrap().unwrap(); + let line_init = lines.next().unwrap().unwrap(); + + assert_eq!(line_title, "tgid pid name"); + let expected_values = ["1 1 init", "1 1 systemd"]; + assert!( + expected_values.contains(&line_init.as_str()), + "Unexpected line_init value: '{line_init}', expected one of: {expected_values:?}" + ); +} diff --git a/test/integration-test/src/tests/linear_data_structures.rs b/test/integration-test/src/tests/linear_data_structures.rs new file mode 100644 index 00000000..12e0be67 --- /dev/null +++ b/test/integration-test/src/tests/linear_data_structures.rs @@ -0,0 +1,94 @@ +use aya::{EbpfLoader, maps::Array, programs::UProbe}; +use integration_common::linear_data_structures::{PEEK_INDEX, POP_INDEX}; + +enum Order { + Lifo, + Fifo, +} + +macro_rules! define_linear_ds_host_test { + ( + push_prog: $push_prog:literal, + pop_prog: $pop_prog:literal, + peek_prog: $peek_prog:literal, + push_fn: $push_fn:ident, + pop_fn: $pop_fn:ident, + peek_fn: $peek_fn:ident, + test_fn: $test_fn:ident, + order: $order:expr, + ) => { + #[unsafe(no_mangle)] + #[inline(never)] + extern "C" fn $push_fn(arg: u64) { + core::hint::black_box(arg); + } + #[unsafe(no_mangle)] + #[inline(never)] + extern "C" fn $peek_fn(marker: u64) -> u64 { + core::hint::black_box($peek_fn); + marker + 1 + } + #[unsafe(no_mangle)] + #[inline(never)] + extern "C" fn $pop_fn(marker: u64) -> u64 { + core::hint::black_box($pop_fn); + marker + 2 + } + + #[test_log::test] + fn $test_fn() { + let mut bpf = EbpfLoader::new() + .load(crate::LINEAR_DATA_STRUCTURES) + .unwrap(); + for (prog_name, symbol) in [ + ($push_prog, stringify!($push_fn)), + ($peek_prog, stringify!($peek_fn)), + ($pop_prog, stringify!($pop_fn)), + ] { + let prog: &mut UProbe = bpf.program_mut(prog_name).unwrap().try_into().unwrap(); + prog.load().unwrap(); + prog.attach(symbol, "/proc/self/exe", None, None).unwrap(); + } + let array_map = bpf.map("RESULT").unwrap(); + let array = Array::<_, u64>::try_from(array_map).unwrap(); + let seq = 0..9; + for i in seq.clone() { + $push_fn(i); + } + let mut rev = seq.clone().rev(); + let mut seq = seq; + let iter: &mut dyn Iterator = match $order { + Order::Lifo => &mut rev, + Order::Fifo => &mut seq, + }; + for i in iter { + $peek_fn(i); + assert_eq!(array.get(&PEEK_INDEX, 0).unwrap(), i); + $pop_fn(i); + assert_eq!(array.get(&POP_INDEX, 0).unwrap(), i); + } + } + }; +} + +define_linear_ds_host_test!( + push_prog: "test_stack_push", + pop_prog: "test_stack_pop", + peek_prog: "test_stack_peek", + push_fn: trigger_stack_push, + pop_fn: trigger_stack_pop, + peek_fn: trigger_stack_peek, + test_fn: stack_basic, + order: Order::Lifo, +); + +define_linear_ds_host_test!( + push_prog: "test_queue_push", + pop_prog: "test_queue_pop", + peek_prog: "test_queue_peek", + push_fn: trigger_queue_push, + pop_fn: trigger_queue_pop, + peek_fn: trigger_queue_peek, + test_fn: queue_basic, + order: Order::Fifo, +); diff --git a/test/integration-test/src/tests/load.rs b/test/integration-test/src/tests/load.rs index ffc8ddf7..dd50fe2d 100644 --- a/test/integration-test/src/tests/load.rs +++ b/test/integration-test/src/tests/load.rs @@ -1,27 +1,28 @@ -use std::{ - convert::TryInto as _, - fs::remove_file, - path::Path, - thread, - time::{Duration, SystemTime}, -}; +use std::{convert::TryInto as _, fs::remove_file, path::Path, thread, time::Duration}; +use assert_matches::assert_matches; use aya::{ + Ebpf, maps::Array, + pin::PinError, programs::{ - links::{FdLink, PinnedLink}, - loaded_links, loaded_programs, KProbe, TracePoint, UProbe, Xdp, XdpFlags, + FlowDissector, KProbe, ProbeKind, Program, ProgramError, TracePoint, UProbe, Xdp, XdpFlags, + flow_dissector::{FlowDissectorLink, FlowDissectorLinkId}, + kprobe::{KProbeLink, KProbeLinkId}, + links::{FdLink, LinkError, PinnedLink}, + loaded_links, loaded_programs, + trace_point::{TracePointLink, TracePointLinkId}, + uprobe::{UProbeLink, UProbeLinkId}, + xdp::{XdpLink, XdpLinkId}, }, util::KernelVersion, - Ebpf, }; use aya_obj::programs::XdpAttachType; -use test_log::test; const MAX_RETRIES: usize = 100; -const RETRY_DURATION: Duration = Duration::from_millis(10); +pub(crate) const RETRY_DURATION: Duration = Duration::from_millis(10); -#[test] +#[test_log::test] fn long_name() { let mut bpf = Ebpf::load(crate::NAME_TEST).unwrap(); let name_prog: &mut Xdp = bpf @@ -37,7 +38,14 @@ fn long_name() { // Therefore, as long as we were able to load the program, this is good enough. } -#[test] +#[test_log::test] +fn memmove() { + let mut bpf = Ebpf::load(crate::MEMMOVE_TEST).unwrap(); + let prog: &mut Xdp = bpf.program_mut("do_dnat").unwrap().try_into().unwrap(); + prog.load().unwrap(); +} + +#[test_log::test] fn multiple_btf_maps() { let mut bpf = Ebpf::load(crate::MULTIMAP_BTF).unwrap(); @@ -48,7 +56,7 @@ fn multiple_btf_maps() { let prog: &mut UProbe = bpf.program_mut("bpf_prog").unwrap().try_into().unwrap(); prog.load().unwrap(); - prog.attach(Some("trigger_bpf_program"), 0, "/proc/self/exe", None) + prog.attach("trigger_bpf_program", "/proc/self/exe", None, None) .unwrap(); trigger_bpf_program(); @@ -67,7 +75,7 @@ fn multiple_btf_maps() { remove_file(map_pin).unwrap(); } -#[test] +#[test_log::test] fn pin_lifecycle_multiple_btf_maps() { let mut bpf = Ebpf::load(crate::MULTIMAP_BTF).unwrap(); @@ -98,7 +106,7 @@ fn pin_lifecycle_multiple_btf_maps() { let prog: &mut UProbe = bpf.program_mut("bpf_prog").unwrap().try_into().unwrap(); prog.load().unwrap(); - prog.attach(Some("trigger_bpf_program"), 0, "/proc/self/exe", None) + prog.attach("trigger_bpf_program", "/proc/self/exe", None, None) .unwrap(); trigger_bpf_program(); @@ -127,9 +135,9 @@ fn pin_lifecycle_multiple_btf_maps() { remove_file(map_pin_by_name_path).unwrap(); } -#[no_mangle] +#[unsafe(no_mangle)] #[inline(never)] -pub extern "C" fn trigger_bpf_program() { +extern "C" fn trigger_bpf_program() { core::hint::black_box(trigger_bpf_program); } @@ -165,7 +173,7 @@ fn assert_loaded_and_linked(name: &str) { // program in the middle of a `loaded_programs()` call. loaded_links() .filter_map(|link| link.ok()) - .find_map(|link| (link.prog_id == prog_id).then_some(link.id)) + .find_map(|link| (link.program_id() == prog_id).then_some(link.id())) }); assert!( poll_loaded_link_id @@ -196,414 +204,400 @@ fn assert_unloaded(name: &str) { ) } -#[test] -fn unload_xdp() { - let mut bpf = Ebpf::load(crate::TEST).unwrap(); - let prog: &mut Xdp = bpf.program_mut("pass").unwrap().try_into().unwrap(); - prog.load().unwrap(); - assert_loaded("pass"); - let link = prog.attach("lo", XdpFlags::default()).unwrap(); - { - let _link_owned = prog.take_link(link).unwrap(); - prog.unload().unwrap(); - assert_loaded_and_linked("pass"); - }; +trait UnloadProgramOps { + type LinkId; + type OwnedLink; - assert_unloaded("pass"); - prog.load().unwrap(); + fn load(&mut self) -> Result<(), ProgramError>; + fn unload(&mut self) -> Result<(), ProgramError>; + fn take_link(&mut self, id: Self::LinkId) -> Result; +} - assert_loaded("pass"); - prog.attach("lo", XdpFlags::default()).unwrap(); +macro_rules! impl_unload_program_ops { + ($program:ty, $link_id:ty, $link:ty) => { + impl UnloadProgramOps for $program { + type LinkId = $link_id; + type OwnedLink = $link; - assert_loaded("pass"); - prog.unload().unwrap(); + fn load(&mut self) -> Result<(), ProgramError> { + <$program>::load(self) + } - assert_unloaded("pass"); -} + fn unload(&mut self) -> Result<(), ProgramError> { + <$program>::unload(self) + } -#[test] -fn test_loaded_at() { - let mut bpf = Ebpf::load(crate::TEST).unwrap(); - let prog: &mut Xdp = bpf.program_mut("pass").unwrap().try_into().unwrap(); - - // SystemTime is not monotonic, which can cause this test to flake. We don't expect the clock - // timestamp to continuously jump around, so we add some retries. If the test is ever correct, - // we know that the value returned by loaded_at() was reasonable relative to SystemTime::now(). - let mut failures = Vec::new(); - for _ in 0..5 { - let t1 = SystemTime::now(); - prog.load().unwrap(); - let t2 = SystemTime::now(); - let loaded_at = prog.info().unwrap().loaded_at(); - prog.unload().unwrap(); - let range = t1..t2; - if range.contains(&loaded_at) { - failures.clear(); - break; + fn take_link(&mut self, id: Self::LinkId) -> Result { + <$program>::take_link(self, id) + } } - failures.push(LoadedAtRange(loaded_at, range)); - } - assert!( - failures.is_empty(), - "loaded_at was not in range: {failures:?}", - ); + }; +} - struct LoadedAtRange(SystemTime, std::ops::Range); - impl std::fmt::Debug for LoadedAtRange { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let Self(loaded_at, range) = self; - write!(f, "{range:?}.contains({loaded_at:?})") - } - } +impl_unload_program_ops!(Xdp, XdpLinkId, XdpLink); +impl_unload_program_ops!(KProbe, KProbeLinkId, KProbeLink); +impl_unload_program_ops!(TracePoint, TracePointLinkId, TracePointLink); +impl_unload_program_ops!(UProbe, UProbeLinkId, UProbeLink); +impl_unload_program_ops!(FlowDissector, FlowDissectorLinkId, FlowDissectorLink); + +#[test_log::test] +fn unload_xdp() { + type P = Xdp; + + let program_name = "pass"; + let attach = |prog: &mut P| prog.attach("lo", XdpFlags::default()).unwrap(); + run_unload_program_test( + crate::TEST, + program_name, + attach, + /* expect_fd_link: */ + true, // xdp fallback is automatic, minimum version unclear. + ); } -#[test] -fn unload_kprobe() { - let mut bpf = Ebpf::load(crate::TEST).unwrap(); - let prog: &mut KProbe = bpf.program_mut("test_kprobe").unwrap().try_into().unwrap(); +fn run_unload_program_test

( + bpf_image: &[u8], + program_name: &str, + attach: fn(&mut P) -> P::LinkId, + expect_fd_link: bool, +) where + P: UnloadProgramOps, + P::OwnedLink: TryInto, + for<'a> &'a mut Program: TryInto<&'a mut P, Error = ProgramError>, +{ + let mut bpf = Ebpf::load(bpf_image).unwrap(); + let prog: &mut P = bpf.program_mut(program_name).unwrap().try_into().unwrap(); prog.load().unwrap(); - assert_loaded("test_kprobe"); - let link = prog.attach("try_to_wake_up", 0).unwrap(); - { - let _link_owned = prog.take_link(link).unwrap(); - prog.unload().unwrap(); - assert_loaded_and_linked("test_kprobe"); - }; + assert_loaded(program_name); + let link = attach(prog); + let owned_link: P::OwnedLink = prog.take_link(link).unwrap(); + match owned_link.try_into() { + Ok(_fd_link) => { + assert!( + expect_fd_link, + "{program_name}: unexpectedly obtained an fd-backed link", + ); + prog.unload().unwrap(); + assert_loaded_and_linked(program_name); + } + Err(err) => { + assert_matches!(err, LinkError::InvalidLink); + assert!( + !expect_fd_link, + "{program_name}: expected to obtain an fd-backed link on this kernel" + ); + prog.unload().unwrap(); + } + } - assert_unloaded("test_kprobe"); + assert_unloaded(program_name); prog.load().unwrap(); - assert_loaded("test_kprobe"); - prog.attach("try_to_wake_up", 0).unwrap(); + assert_loaded(program_name); + attach(prog); - assert_loaded("test_kprobe"); + assert_loaded(program_name); prog.unload().unwrap(); - assert_unloaded("test_kprobe"); + assert_unloaded(program_name); } -#[test] -fn basic_tracepoint() { - let mut bpf = Ebpf::load(crate::TEST).unwrap(); - let prog: &mut TracePoint = bpf - .program_mut("test_tracepoint") - .unwrap() - .try_into() - .unwrap(); - - prog.load().unwrap(); - assert_loaded("test_tracepoint"); - let link = prog.attach("syscalls", "sys_enter_kill").unwrap(); - - { - let _link_owned = prog.take_link(link).unwrap(); - prog.unload().unwrap(); - assert_loaded_and_linked("test_tracepoint"); - }; - - assert_unloaded("test_tracepoint"); - prog.load().unwrap(); - - assert_loaded("test_tracepoint"); - prog.attach("syscalls", "sys_enter_kill").unwrap(); - - assert_loaded("test_tracepoint"); - prog.unload().unwrap(); +#[test_log::test] +fn unload_kprobe() { + type P = KProbe; + + let program_name = "test_kprobe"; + let attach = |prog: &mut P| prog.attach("try_to_wake_up", 0).unwrap(); + run_unload_program_test( + crate::TEST, + program_name, + attach, + aya::features().bpf_perf_link(), // probe uses perf_attach. + ); +} - assert_unloaded("test_tracepoint"); +#[test_log::test] +fn basic_tracepoint() { + type P = TracePoint; + + let program_name = "test_tracepoint"; + let attach = |prog: &mut P| prog.attach("syscalls", "sys_enter_kill").unwrap(); + run_unload_program_test( + crate::TEST, + program_name, + attach, + aya::features().bpf_perf_link(), // tracepoint uses perf_attach. + ); } -#[test] +#[test_log::test] fn basic_uprobe() { - let mut bpf = Ebpf::load(crate::TEST).unwrap(); - let prog: &mut UProbe = bpf.program_mut("test_uprobe").unwrap().try_into().unwrap(); + type P = UProbe; - prog.load().unwrap(); - assert_loaded("test_uprobe"); - let link = prog - .attach(Some("uprobe_function"), 0, "/proc/self/exe", None) - .unwrap(); - - { - let _link_owned = prog.take_link(link).unwrap(); - prog.unload().unwrap(); - assert_loaded_and_linked("test_uprobe"); + let program_name = "test_uprobe"; + let attach = |prog: &mut P| { + prog.attach("uprobe_function", "/proc/self/exe", None, None) + .unwrap() }; + run_unload_program_test( + crate::TEST, + program_name, + attach, + aya::features().bpf_perf_link(), // probe uses perf_attach. + ); +} - assert_unloaded("test_uprobe"); - prog.load().unwrap(); - - assert_loaded("test_uprobe"); - prog.attach(Some("uprobe_function"), 0, "/proc/self/exe", None) - .unwrap(); +#[test_log::test] +fn basic_flow_dissector() { + type P = FlowDissector; - assert_loaded("test_uprobe"); - prog.unload().unwrap(); - - assert_unloaded("test_uprobe"); + let program_name = "test_flow"; + let attach = |prog: &mut P| { + let net_ns = std::fs::File::open("/proc/self/ns/net").unwrap(); + prog.attach(net_ns).unwrap() + }; + run_unload_program_test( + crate::TEST, + program_name, + attach, + KernelVersion::current().unwrap() >= KernelVersion::new(5, 7, 0), // See FlowDissector::attach. + ); } -#[test] +#[test_log::test] fn pin_link() { - let kernel_version = KernelVersion::current().unwrap(); - if kernel_version < KernelVersion::new(5, 9, 0) { - eprintln!("skipping test on kernel {kernel_version:?}, XDP uses netlink"); - return; - } + type P = Xdp; + + let program_name = "pass"; + let attach = |prog: &mut P| prog.attach("lo", XdpFlags::default()).unwrap(); let mut bpf = Ebpf::load(crate::TEST).unwrap(); - let prog: &mut Xdp = bpf.program_mut("pass").unwrap().try_into().unwrap(); + let prog: &mut P = bpf.program_mut(program_name).unwrap().try_into().unwrap(); prog.load().unwrap(); - let link_id = prog.attach("lo", XdpFlags::default()).unwrap(); + let link_id = attach(prog); let link = prog.take_link(link_id).unwrap(); - assert_loaded("pass"); + assert_loaded(program_name); let fd_link: FdLink = link.try_into().unwrap(); let pinned = fd_link.pin("/sys/fs/bpf/aya-xdp-test-lo").unwrap(); // because of the pin, the program is still attached prog.unload().unwrap(); - assert_loaded("pass"); + assert_loaded(program_name); // delete the pin, but the program is still attached let new_link = pinned.unpin().unwrap(); - assert_loaded("pass"); + assert_loaded(program_name); // finally when new_link is dropped we're detached drop(new_link); - assert_unloaded("pass"); + assert_unloaded(program_name); } -#[test] -fn pin_lifecycle() { - let kernel_version = KernelVersion::current().unwrap(); - if kernel_version < KernelVersion::new(5, 18, 0) { - eprintln!("skipping test on kernel {kernel_version:?}, support for BPF_F_XDP_HAS_FRAGS was added in 5.18.0; see https://github.com/torvalds/linux/commit/c2f2cdb"); - return; - } - - // 1. Load Program and Pin - { - let mut bpf = Ebpf::load(crate::PASS).unwrap(); - let prog: &mut Xdp = bpf.program_mut("pass").unwrap().try_into().unwrap(); - prog.load().unwrap(); - prog.pin("/sys/fs/bpf/aya-xdp-test-prog").unwrap(); - } - - // should still be loaded since prog was pinned - assert_loaded("pass"); - - // 2. Load program from bpffs but don't attach it - { - let _ = Xdp::from_pin("/sys/fs/bpf/aya-xdp-test-prog", XdpAttachType::Interface).unwrap(); - } +trait PinProgramOps { + fn pin>(&mut self, path: P) -> Result<(), PinError>; + fn unpin(&mut self) -> Result<(), std::io::Error>; +} - // should still be loaded since prog was pinned - assert_loaded("pass"); +macro_rules! impl_pin_program_ops { + ($program:ty) => { + impl PinProgramOps for $program { + fn pin>(&mut self, path: P) -> Result<(), PinError> { + <$program>::pin(self, path) + } - // 3. Load program from bpffs and attach - { - let mut prog = - Xdp::from_pin("/sys/fs/bpf/aya-xdp-test-prog", XdpAttachType::Interface).unwrap(); - let link_id = prog.attach("lo", XdpFlags::default()).unwrap(); - let link = prog.take_link(link_id).unwrap(); - let fd_link: FdLink = link.try_into().unwrap(); - fd_link.pin("/sys/fs/bpf/aya-xdp-test-lo").unwrap(); + fn unpin(&mut self) -> Result<(), std::io::Error> { + <$program>::unpin(self) + } + } + }; +} - // Unpin the program. It will stay attached since its links were pinned. - prog.unpin().unwrap(); - } +impl_pin_program_ops!(Xdp); +impl_pin_program_ops!(KProbe); +impl_pin_program_ops!(TracePoint); +impl_pin_program_ops!(UProbe); - // should still be loaded since link was pinned - assert_loaded_and_linked("pass"); +#[test_log::test] +fn pin_lifecycle() { + type P = Xdp; - // 4. Load a new version of the program, unpin link, and atomically replace old program - { - let mut bpf = Ebpf::load(crate::PASS).unwrap(); - let prog: &mut Xdp = bpf.program_mut("pass").unwrap().try_into().unwrap(); - prog.load().unwrap(); + let program_name = "pass"; + let attach = |prog: &mut P| prog.attach("lo", XdpFlags::default()).unwrap(); + let program_pin = "/sys/fs/bpf/aya-xdp-test-prog"; + let link_pin = "/sys/fs/bpf/aya-xdp-test-lo"; + let from_pin = |program_pin: &str| P::from_pin(program_pin, XdpAttachType::Interface).unwrap(); - let link = PinnedLink::from_pin("/sys/fs/bpf/aya-xdp-test-lo") - .unwrap() - .unpin() - .unwrap(); - prog.attach_to_link(link.try_into().unwrap()).unwrap(); - assert_loaded("pass"); + let kernel_version = KernelVersion::current().unwrap(); + if kernel_version < KernelVersion::new(5, 18, 0) { + eprintln!( + "skipping test on kernel {kernel_version:?}, support for BPF_F_XDP_HAS_FRAGS was added in 5.18.0; see https://github.com/torvalds/linux/commit/c2f2cdb" + ); + return; } - - // program should be unloaded - assert_unloaded("pass"); + run_pin_program_lifecycle_test( + crate::PASS, + program_name, + program_pin, + link_pin, + from_pin, + attach, + Some(|prog: &mut P, pinned: FdLink| { + prog.attach_to_link(pinned.try_into().unwrap()).unwrap() + }), + /* expect_fd_link: */ + true, // xdp fallback is automatic, minimum version unclear. + ); } -#[test] -fn pin_lifecycle_tracepoint() { - // 1. Load Program and Pin - { - let mut bpf = Ebpf::load(crate::TEST).unwrap(); - let prog: &mut TracePoint = bpf - .program_mut("test_tracepoint") - .unwrap() - .try_into() - .unwrap(); +#[expect(clippy::too_many_arguments, reason = "let's see you do better")] +fn run_pin_program_lifecycle_test

( + bpf_image: &[u8], + program_name: &str, + program_pin: &str, + link_pin: &str, + from_pin: fn(&str) -> P, + attach: fn(&mut P) -> P::LinkId, + attach_to_link: Option P::LinkId>, + expect_fd_link: bool, +) where + P: UnloadProgramOps + PinProgramOps, + P::OwnedLink: TryInto, + for<'a> &'a mut Program: TryInto<&'a mut P, Error = ProgramError>, +{ + let mut prog = { + // 1. Load Program and Pin + let mut bpf = Ebpf::load(bpf_image).unwrap(); + let prog: &mut P = bpf.program_mut(program_name).unwrap().try_into().unwrap(); prog.load().unwrap(); - prog.pin("/sys/fs/bpf/aya-tracepoint-test-prog").unwrap(); - } - - // should still be loaded since prog was pinned - assert_loaded("test_tracepoint"); + prog.pin(program_pin).unwrap(); - // 2. Load program from bpffs but don't attach it - { - let _ = TracePoint::from_pin("/sys/fs/bpf/aya-tracepoint-test-prog").unwrap(); - } + // 2. Load program from bpffs but don't attach it + let prog = from_pin(program_pin); + scopeguard::guard(prog, |mut prog| prog.unpin().unwrap()) + }; // should still be loaded since prog was pinned - assert_loaded("test_tracepoint"); + assert_loaded(program_name); // 3. Load program from bpffs and attach { - let mut prog = TracePoint::from_pin("/sys/fs/bpf/aya-tracepoint-test-prog").unwrap(); - let link_id = prog.attach("syscalls", "sys_enter_kill").unwrap(); + let link_id = attach(&mut *prog); let link = prog.take_link(link_id).unwrap(); - let fd_link: FdLink = link.try_into().unwrap(); - fd_link - .pin("/sys/fs/bpf/aya-tracepoint-test-sys-enter-kill") - .unwrap(); - - // Unpin the program. It will stay attached since its links were pinned. - prog.unpin().unwrap(); - } - - // should still be loaded since link was pinned - assert_loaded_and_linked("test_tracepoint"); - - // 4. unpin link, and make sure everything is unloaded - { - PinnedLink::from_pin("/sys/fs/bpf/aya-tracepoint-test-sys-enter-kill") - .unwrap() - .unpin() - .unwrap(); + match link.try_into() { + Ok(fd_link) => { + assert!( + expect_fd_link, + "{program_name}: unexpectedly obtained an fd-backed link when perf-link support is unavailable" + ); + fd_link.pin(link_pin).unwrap(); + + // Unpin the program. It will stay attached since its links were pinned. + drop(prog); + + // should still be loaded since link was pinned + assert_loaded_and_linked(program_name); + + // 4. Load a new version of the program, unpin link, and atomically replace old program + { + let link = PinnedLink::from_pin(link_pin).unwrap().unpin().unwrap(); + if let Some(attach_to_link) = attach_to_link { + let mut bpf = Ebpf::load(bpf_image).unwrap(); + let prog: &mut P = + bpf.program_mut(program_name).unwrap().try_into().unwrap(); + prog.load().unwrap(); + attach_to_link(prog, link); + assert_loaded(program_name); + } + } + } + Err(err) => { + assert_matches!(err, LinkError::InvalidLink); + assert!( + !expect_fd_link, + "{program_name}: expected an fd-backed link on this kernel" + ); + + // Unpin the program. It will be unloaded since its link was not pinned. + drop(prog); + } + }; } // program should be unloaded - assert_unloaded("test_tracepoint"); + assert_unloaded(program_name); } -#[test] -fn pin_lifecycle_kprobe() { - // 1. Load Program and Pin - { - let mut bpf = Ebpf::load(crate::TEST).unwrap(); - let prog: &mut KProbe = bpf.program_mut("test_kprobe").unwrap().try_into().unwrap(); - prog.load().unwrap(); - prog.pin("/sys/fs/bpf/aya-kprobe-test-prog").unwrap(); - } - - // should still be loaded since prog was pinned - assert_loaded("test_kprobe"); - - // 2. Load program from bpffs but don't attach it - { - let _ = KProbe::from_pin( - "/sys/fs/bpf/aya-kprobe-test-prog", - aya::programs::ProbeKind::KProbe, - ) - .unwrap(); - } - - // should still be loaded since prog was pinned - assert_loaded("test_kprobe"); - - // 3. Load program from bpffs and attach - { - let mut prog = KProbe::from_pin( - "/sys/fs/bpf/aya-kprobe-test-prog", - aya::programs::ProbeKind::KProbe, - ) - .unwrap(); - let link_id = prog.attach("try_to_wake_up", 0).unwrap(); - let link = prog.take_link(link_id).unwrap(); - let fd_link: FdLink = link.try_into().unwrap(); - fd_link - .pin("/sys/fs/bpf/aya-kprobe-test-try-to-wake-up") - .unwrap(); - - // Unpin the program. It will stay attached since its links were pinned. - prog.unpin().unwrap(); - } - - // should still be loaded since link was pinned - assert_loaded_and_linked("test_kprobe"); - - // 4. unpin link, and make sure everything is unloaded - { - PinnedLink::from_pin("/sys/fs/bpf/aya-kprobe-test-try-to-wake-up") - .unwrap() - .unpin() - .unwrap(); - } +#[test_log::test] +fn pin_lifecycle_tracepoint() { + type P = TracePoint; + + let program_name = "test_tracepoint"; + let attach = |prog: &mut P| prog.attach("syscalls", "sys_enter_kill").unwrap(); + let program_pin = "/sys/fs/bpf/aya-tracepoint-test-prog"; + let link_pin = "/sys/fs/bpf/aya-tracepoint-test-sys-enter-kill"; + let from_pin = |program_pin: &str| P::from_pin(program_pin).unwrap(); + run_pin_program_lifecycle_test( + crate::TEST, + program_name, + program_pin, + link_pin, + from_pin, + attach, + None, + aya::features().bpf_perf_link(), // tracepoint uses perf_attach. + ); +} - // program should be unloaded - assert_unloaded("test_kprobe"); +#[test_log::test] +fn pin_lifecycle_kprobe() { + type P = KProbe; + + let program_name = "test_kprobe"; + let attach = |prog: &mut P| prog.attach("try_to_wake_up", 0).unwrap(); + let program_pin = "/sys/fs/bpf/aya-kprobe-test-prog"; + let link_pin = "/sys/fs/bpf/aya-kprobe-test-try-to-wake-up"; + let from_pin = |program_pin: &str| P::from_pin(program_pin, ProbeKind::KProbe).unwrap(); + run_pin_program_lifecycle_test( + crate::TEST, + program_name, + program_pin, + link_pin, + from_pin, + attach, + None, + aya::features().bpf_perf_link(), // probe uses perf_attach. + ); } -#[no_mangle] +#[unsafe(no_mangle)] #[inline(never)] extern "C" fn uprobe_function() { core::hint::black_box(uprobe_function); } -#[test] +#[test_log::test] fn pin_lifecycle_uprobe() { - const FIRST_PIN_PATH: &str = "/sys/fs/bpf/aya-uprobe-test-prog-1"; - const SECOND_PIN_PATH: &str = "/sys/fs/bpf/aya-uprobe-test-prog-2"; + type P = UProbe; - // 1. Load Program and Pin - { - let mut bpf = Ebpf::load(crate::TEST).unwrap(); - let prog: &mut UProbe = bpf.program_mut("test_uprobe").unwrap().try_into().unwrap(); - prog.load().unwrap(); - prog.pin(FIRST_PIN_PATH).unwrap(); - } - - // should still be loaded since prog was pinned - assert_loaded("test_uprobe"); - - // 2. Load program from bpffs but don't attach it - { - let _ = UProbe::from_pin(FIRST_PIN_PATH, aya::programs::ProbeKind::UProbe).unwrap(); - } - - // should still be loaded since prog was pinned - assert_loaded("test_uprobe"); - - // 3. Load program from bpffs and attach - { - let mut prog = UProbe::from_pin(FIRST_PIN_PATH, aya::programs::ProbeKind::UProbe).unwrap(); - let link_id = prog - .attach(Some("uprobe_function"), 0, "/proc/self/exe", None) - .unwrap(); - let link = prog.take_link(link_id).unwrap(); - let fd_link: FdLink = link.try_into().unwrap(); - fd_link.pin(SECOND_PIN_PATH).unwrap(); - - // Unpin the program. It will stay attached since its links were pinned. - prog.unpin().unwrap(); - } - - // should still be loaded since link was pinned - assert_loaded_and_linked("test_uprobe"); - - // 4. unpin link, and make sure everything is unloaded - { - PinnedLink::from_pin(SECOND_PIN_PATH) + let program_name = "test_uprobe"; + let attach = |prog: &mut P| { + prog.attach("uprobe_function", "/proc/self/exe", None, None) .unwrap() - .unpin() - .unwrap(); - } - - // program should be unloaded - assert_unloaded("test_uprobe"); + }; + let program_pin = "/sys/fs/bpf/aya-uprobe-test-prog"; + let link_pin = "/sys/fs/bpf/aya-uprobe-test-uprobe-function"; + let from_pin = |program_pin: &str| P::from_pin(program_pin, ProbeKind::UProbe).unwrap(); + run_pin_program_lifecycle_test( + crate::TEST, + program_name, + program_pin, + link_pin, + from_pin, + attach, + None, + aya::features().bpf_perf_link(), // probe uses perf_attach. + ); // Make sure the function isn't optimized out. uprobe_function(); diff --git a/test/integration-test/src/tests/log.rs b/test/integration-test/src/tests/log.rs index 56f5edec..58d89c8f 100644 --- a/test/integration-test/src/tests/log.rs +++ b/test/integration-test/src/tests/log.rs @@ -1,32 +1,30 @@ -use std::{ - borrow::Cow, - sync::{Arc, Mutex}, -}; +use std::{borrow::Cow, sync::Mutex}; -use aya::{programs::UProbe, Ebpf}; +use aya::{Ebpf, EbpfLoader, maps::Array, programs::UProbe}; use aya_log::EbpfLogger; +use integration_common::log::{BUF_LEN, Buffer}; use log::{Level, Log, Record}; -use test_log::test; -#[no_mangle] +#[unsafe(no_mangle)] #[inline(never)] -pub extern "C" fn trigger_ebpf_program() { +extern "C" fn trigger_ebpf_program() { core::hint::black_box(trigger_ebpf_program); } struct TestingLogger { - log: F, + log: Mutex, } -impl Log for TestingLogger { - fn enabled(&self, _metadata: &log::Metadata) -> bool { +impl)> Log for TestingLogger { + fn enabled(&self, _metadata: &log::Metadata<'_>) -> bool { true } fn flush(&self) {} - fn log(&self, record: &Record) { + fn log(&self, record: &Record<'_>) { let Self { log } = self; + let mut log = log.lock().unwrap(); log(record); } } @@ -38,52 +36,48 @@ struct CapturedLog<'a> { pub target: Cow<'a, str>, } -#[test(tokio::test)] -async fn log() { +#[test_log::test] +fn log() { let mut bpf = Ebpf::load(crate::LOG).unwrap(); - let captured_logs = Arc::new(Mutex::new(Vec::new())); { - let captured_logs = captured_logs.clone(); - EbpfLogger::init_with_logger( - &mut bpf, - TestingLogger { - log: move |record: &Record| { - let mut logs = captured_logs.lock().unwrap(); - logs.push(CapturedLog { - body: format!("{}", record.args()).into(), - level: record.level(), - target: record.target().to_string().into(), - }); + let buffer = bpf.map_mut("BUFFER").unwrap(); + let mut buffer: Array<_, Buffer> = Array::try_from(buffer).unwrap(); + buffer + .set( + 0, + Buffer { + buf: [0xff; BUF_LEN], + len: 3, }, - }, - ) - .unwrap(); + 0, + ) + .unwrap(); } + let mut captured_logs = Vec::new(); + let logger = TestingLogger { + log: Mutex::new(|record: &Record<'_>| { + captured_logs.push(CapturedLog { + body: format!("{}", record.args()).into(), + level: record.level(), + target: record.target().to_string().into(), + }); + }), + }; + let mut logger = EbpfLogger::init_with_logger(&mut bpf, &logger).unwrap(); + let prog: &mut UProbe = bpf.program_mut("test_log").unwrap().try_into().unwrap(); prog.load().unwrap(); - prog.attach(Some("trigger_ebpf_program"), 0, "/proc/self/exe", None) + prog.attach("trigger_ebpf_program", "/proc/self/exe", None, None) .unwrap(); // Call the function that the uprobe is attached to, so it starts logging. trigger_ebpf_program(); - let mut logs = 0; - let records = loop { - tokio::time::sleep(std::time::Duration::from_millis(100)).await; - let records = captured_logs.lock().unwrap(); - let len = records.len(); - if len == 0 { - continue; - } - if len == logs { - break records; - } - logs = len; - }; + logger.flush(); - let mut records = records.iter(); + let mut records = captured_logs.iter(); assert_eq!( records.next(), @@ -106,7 +100,52 @@ async fn log() { assert_eq!( records.next(), Some(&CapturedLog { - body: "ipv4: 10.0.0.1, ipv6: 2001:db8::1".into(), + body: "ip structs, without format hint: ipv4: 10.0.0.1, ipv6: 2001:db8::1".into(), + level: Level::Info, + target: "log".into(), + }) + ); + + assert_eq!( + records.next(), + Some(&CapturedLog { + body: "ip structs, with format hint: ipv4: 10.0.0.1, ipv6: 2001:db8::1".into(), + level: Level::Info, + target: "log".into(), + }) + ); + + assert_eq!( + records.next(), + Some(&CapturedLog { + body: "ip enums, without format hint: ipv4: 10.0.0.1, ipv6: 2001:db8::1".into(), + level: Level::Info, + target: "log".into(), + }) + ); + + assert_eq!( + records.next(), + Some(&CapturedLog { + body: "ip enums, with format hint: ipv4: 10.0.0.1, ipv6: 2001:db8::1".into(), + level: Level::Info, + target: "log".into(), + }) + ); + + assert_eq!( + records.next(), + Some(&CapturedLog { + body: "ip as bits: ipv4: 10.0.0.1".into(), + level: Level::Info, + target: "log".into(), + }) + ); + + assert_eq!( + records.next(), + Some(&CapturedLog { + body: "ip as octets: ipv4: 10.0.0.1, ipv6: 2001:db8::1".into(), level: Level::Info, target: "log".into(), }) @@ -142,11 +181,135 @@ async fn log() { assert_eq!( records.next(), Some(&CapturedLog { - body: "42 43 44 45".into(), + body: "42 43 44 45 46 47 48".into(), level: Level::Debug, target: "log".into(), }) ); + assert_eq!( + records.next(), + Some(&CapturedLog { + body: "ptr: 0xdeadbeef".into(), + level: Level::Debug, + target: "log".into(), + }) + ); + + assert_eq!( + records.next(), + Some(&CapturedLog { + body: "variable length buffer: ffffff".into(), + level: Level::Info, + target: "log".into(), + }) + ); + + assert_eq!( + records.next(), + Some(&CapturedLog { + body: format!("2KiB array: {}", "00".repeat(2048)).into(), + level: Level::Info, + target: "log".into(), + }) + ); + + assert_eq!( + records.next(), + Some(&CapturedLog { + body: format!("4KiB array: {}", "00".repeat(4096)).into(), + level: Level::Info, + target: "log".into(), + }) + ); + + assert_eq!(records.next(), None); +} + +#[test_log::test] +fn log_level_only_error_warn() { + let level = aya_log::Level::Warn as u8; + let mut bpf = EbpfLoader::new() + .override_global(aya_log::LEVEL, &level, true /* must_exist */) + .load(crate::LOG) + .unwrap(); + + let mut captured_logs = Vec::new(); + let logger = TestingLogger { + log: Mutex::new(|record: &Record<'_>| { + captured_logs.push(CapturedLog { + body: format!("{}", record.args()).into(), + level: record.level(), + target: record.target().to_string().into(), + }); + }), + }; + let mut logger = EbpfLogger::init_with_logger(&mut bpf, &logger).unwrap(); + + let prog: &mut UProbe = bpf.program_mut("test_log").unwrap().try_into().unwrap(); + prog.load().unwrap(); + prog.attach("trigger_ebpf_program", "/proc/self/exe", None, None) + .unwrap(); + + trigger_ebpf_program(); + logger.flush(); + + let mut records = captured_logs.iter(); + + assert_eq!( + records.next(), + Some(&CapturedLog { + body: "69, 420, wao, 77616f".into(), + level: Level::Error, + target: "log".into(), + }) + ); + + assert_eq!( + records.next(), + Some(&CapturedLog { + body: "hex lc: 2f, hex uc: 2F".into(), + level: Level::Warn, + target: "log".into(), + }) + ); + + assert_eq!(records.next(), None); +} + +#[test_log::test] +fn log_level_prevents_verif_fail() { + let level = aya_log::Level::Warn as u8; + let mut bpf = EbpfLoader::new() + .override_global(aya_log::LEVEL, &level, true /* must_exist */) + .load(crate::LOG) + .unwrap(); + + let mut captured_logs = Vec::new(); + let logger = TestingLogger { + log: Mutex::new(|record: &Record<'_>| { + captured_logs.push(CapturedLog { + body: format!("{}", record.args()).into(), + level: record.level(), + target: record.target().to_string().into(), + }); + }), + }; + let mut logger = EbpfLogger::init_with_logger(&mut bpf, &logger).unwrap(); + + let prog: &mut UProbe = bpf + .program_mut("test_log_omission") + .unwrap() + .try_into() + .unwrap(); + prog.load().unwrap(); + prog.attach("trigger_ebpf_program", "/proc/self/exe", None, None) + .unwrap(); + + trigger_ebpf_program(); + logger.flush(); + + let mut records = captured_logs.iter(); + assert_eq!(records.next(), None); } diff --git a/test/integration-test/src/tests/lsm.rs b/test/integration-test/src/tests/lsm.rs new file mode 100644 index 00000000..795441ea --- /dev/null +++ b/test/integration-test/src/tests/lsm.rs @@ -0,0 +1,115 @@ +use assert_matches::assert_matches; +use aya::{ + Btf, Ebpf, + programs::{Lsm, LsmAttachType, LsmCgroup, ProgramError, ProgramType}, + sys::{SyscallError, is_program_supported}, + util::KernelVersion, +}; + +use crate::utils::Cgroup; + +macro_rules! expect_permission_denied { + ($result:expr) => { + let result = $result; + if !std::fs::read_to_string("/sys/kernel/security/lsm").unwrap().contains("bpf") { + assert_matches!(result, Ok(_)); + } else { + assert_matches!(result, Err(e) => assert_eq!( + e.kind(), std::io::ErrorKind::PermissionDenied) + ); + } + }; +} + +#[test] +fn lsm() { + let btf = Btf::from_sys_fs().unwrap(); + + let mut bpf: Ebpf = Ebpf::load(crate::TEST).unwrap(); + let prog = bpf.program_mut("test_lsm").unwrap(); + let prog: &mut Lsm = prog.try_into().unwrap(); + prog.load("socket_bind", &btf).unwrap(); + + assert_matches!(std::net::TcpListener::bind("127.0.0.1:0"), Ok(_)); + + let link_id = { + let result = prog.attach(); + if !is_program_supported(ProgramType::Lsm(LsmAttachType::Mac)).unwrap() { + assert_matches!(result, Err(ProgramError::SyscallError(SyscallError { call, io_error })) => { + assert_eq!(call, "bpf_raw_tracepoint_open"); + assert_eq!(io_error.raw_os_error(), Some(524)); + }); + eprintln!("skipping test - LSM programs not supported"); + return; + } + result.unwrap() + }; + + expect_permission_denied!(std::net::TcpListener::bind("127.0.0.1:0")); + + prog.detach(link_id).unwrap(); + + assert_matches!(std::net::TcpListener::bind("127.0.0.1:0"), Ok(_)); +} + +#[test] +fn lsm_cgroup() { + let mut bpf: Ebpf = Ebpf::load(crate::TEST).unwrap(); + let prog = bpf.program_mut("test_lsm_cgroup").unwrap(); + let prog: &mut LsmCgroup = prog.try_into().unwrap(); + let btf = Btf::from_sys_fs().expect("could not get btf from sys"); + match prog.load("socket_bind", &btf) { + Ok(()) => {} + Err(err) => match err { + ProgramError::LoadError { io_error, .. } + if !is_program_supported(ProgramType::Lsm(LsmAttachType::Cgroup)).unwrap() => + { + assert_eq!(io_error.raw_os_error(), Some(libc::EINVAL)); + eprintln!("skipping test - LSM cgroup programs not supported at load"); + return; + } + err => panic!("unexpected error loading LSM cgroup program: {err}"), + }, + } + + assert_matches!(std::net::TcpListener::bind("127.0.0.1:0"), Ok(_)); + + let pid = std::process::id(); + let root = Cgroup::root(); + let cgroup = root.create_child("aya-test-lsm-cgroup"); + + let link_id = { + let result = prog.attach(cgroup.fd()); + + // See https://www.exein.io/blog/exploring-bpf-lsm-support-on-aarch64-with-ftrace. + if cfg!(target_arch = "aarch64") + && KernelVersion::current().unwrap() < KernelVersion::new(6, 4, 0) + { + assert_matches!(result, Err(ProgramError::SyscallError(SyscallError { call, io_error })) => { + assert_eq!(call, "bpf_link_create"); + assert_eq!(io_error.raw_os_error(), Some(524)); + }); + eprintln!("skipping test - LSM cgroup programs not supported at attach"); + return; + } + result.unwrap() + }; + + let cgroup = cgroup.into_cgroup(); + + cgroup.write_pid(pid); + + expect_permission_denied!(std::net::TcpListener::bind("127.0.0.1:0")); + + root.write_pid(pid); + + assert_matches!(std::net::TcpListener::bind("127.0.0.1:0"), Ok(_)); + + cgroup.write_pid(pid); + + expect_permission_denied!(std::net::TcpListener::bind("127.0.0.1:0")); + + prog.detach(link_id).unwrap(); + + assert_matches!(std::net::TcpListener::bind("127.0.0.1:0"), Ok(_)); +} diff --git a/test/integration-test/src/tests/map_pin.rs b/test/integration-test/src/tests/map_pin.rs new file mode 100644 index 00000000..adf84f78 --- /dev/null +++ b/test/integration-test/src/tests/map_pin.rs @@ -0,0 +1,60 @@ +use std::path::Path; + +use aya::{ + Ebpf, + maps::{HashMap, Map, MapData, MapType}, + programs::{ProgramType, SocketFilter}, + sys::{is_map_supported, is_program_supported}, +}; +use rand::Rng as _; +use scopeguard::defer; + +#[test_log::test] +fn pin_and_reopen_hashmap() { + // This ProgramType and these two MapTypes are needed because the MAP_TEST sample program uses all three. + if !is_program_supported(ProgramType::SocketFilter).unwrap() { + eprintln!("skipping test - socket_filter program not supported"); + return; + } else if !is_map_supported(MapType::Hash).unwrap() { + eprintln!("skipping test - hash map not supported"); + return; + } else if !is_map_supported(MapType::Array).unwrap() { + eprintln!("skipping test - array map not supported"); + return; + } + + // Load the eBPF program to create the file descriptor associated with the BAR map. This is + // required to read and write to the map which we test below. + let mut bpf: Ebpf = Ebpf::load(crate::MAP_TEST).unwrap(); + let prog: &mut SocketFilter = bpf.program_mut("simple_prog").unwrap().try_into().unwrap(); + prog.load().unwrap(); + + let mut hash_to_pin: HashMap<_, u32, u8> = + HashMap::try_from(bpf.map_mut("BAR").unwrap()).unwrap(); + hash_to_pin.insert(0, 1, 0).unwrap(); + + let mut rng = rand::rng(); + let pin_path = Path::new("/sys/fs/bpf/").join(format!( + "test_pin_and_reopen_hashmap_{:x}", + rng.random::() + )); + hash_to_pin.pin(&pin_path).unwrap(); + defer! { + std::fs::remove_file(&pin_path).unwrap(); + } + + // Get fresh reference since pin() will consume hash_to_pin. + let hash_from_bpf: HashMap<_, u32, u8> = HashMap::try_from(bpf.map("BAR").unwrap()).unwrap(); + + // This is the critical part of the test. We reopen the map using the pin and verify both + // references point to the same underlying map data without needing to call bpf.map_mut. + let reopened_map_data = MapData::from_pin(&pin_path).unwrap(); + let mut reopened_map = Map::from_map_data(reopened_map_data).unwrap(); + let mut hash_from_pin: HashMap<_, u32, u8> = HashMap::try_from(&mut reopened_map).unwrap(); + assert_eq!(hash_from_pin.get(&0, 0).unwrap(), 1); + + // Try updating data in the map using the pin to verify both maps point and can mutate the same data. + hash_from_pin.insert(0, 2, 0).unwrap(); + assert_eq!(hash_from_bpf.get(&0, 0).unwrap(), 2); + assert_eq!(hash_from_pin.get(&0, 0).unwrap(), 2); +} diff --git a/test/integration-test/src/tests/maps_disjoint.rs b/test/integration-test/src/tests/maps_disjoint.rs new file mode 100644 index 00000000..79f6fe23 --- /dev/null +++ b/test/integration-test/src/tests/maps_disjoint.rs @@ -0,0 +1,44 @@ +use aya::{ + Ebpf, + maps::{Array, HashMap}, + programs::UProbe, +}; + +#[unsafe(no_mangle)] +#[inline(never)] +extern "C" fn trigger_ebpf_program_maps_disjoint() { + core::hint::black_box(trigger_ebpf_program_maps_disjoint); +} + +#[test_log::test] +fn test_maps_disjoint() { + let mut bpf: Ebpf = Ebpf::load(crate::MAP_TEST).unwrap(); + let prog: &mut UProbe = bpf + .program_mut("simple_prog_mut") + .unwrap() + .try_into() + .unwrap(); + + prog.load().unwrap(); + prog.attach( + "trigger_ebpf_program_maps_disjoint", + "/proc/self/exe", + None, + None, + ) + .unwrap(); + + let [foo, bar, baz] = bpf.maps_disjoint_mut(["FOO", "BAR", "BAZ"]); + + let mut foo: Array<_, u32> = Array::try_from(foo.unwrap()).unwrap(); + let mut bar: HashMap<_, u32, u8> = HashMap::try_from(bar.unwrap()).unwrap(); + assert!(baz.is_none()); + + foo.set(0, 5, 0).unwrap(); + bar.insert(0, 10, 0).unwrap(); + + trigger_ebpf_program_maps_disjoint(); + + assert_eq!(foo.get(&0, 0).unwrap(), 6); + assert_eq!(bar.get(&0, 0).unwrap(), 11); +} diff --git a/test/integration-test/src/tests/raw_tracepoint.rs b/test/integration-test/src/tests/raw_tracepoint.rs new file mode 100644 index 00000000..bfec4c06 --- /dev/null +++ b/test/integration-test/src/tests/raw_tracepoint.rs @@ -0,0 +1,40 @@ +use aya::{Ebpf, maps::Array, programs::RawTracePoint}; +use integration_common::raw_tracepoint::SysEnterEvent; + +fn get_event(bpf: &mut Ebpf) -> SysEnterEvent { + let map: Array<_, SysEnterEvent> = Array::try_from(bpf.map_mut("RESULT").unwrap()).unwrap(); + map.get(&0, 0).unwrap() +} + +#[test_log::test] +fn raw_tracepoint() { + let mut bpf = Ebpf::load(crate::RAW_TRACEPOINT).unwrap(); + + // Check start condition. + { + let SysEnterEvent { + common_type, + common_flags, + .. + } = get_event(&mut bpf); + assert_eq!(common_type, 0); + assert_eq!(common_flags, 0); + } + + // NB: we cannot fetch `map` just once above because both `Ebpf::map_mut` and + // `Ebpf::program_mut` take &mut self, resulting in overlapping mutable borrows. + let prog: &mut RawTracePoint = bpf.program_mut("sys_enter").unwrap().try_into().unwrap(); + prog.load().unwrap(); + prog.attach("sys_enter").unwrap(); + + // Check that a syscall was traced. + { + let SysEnterEvent { + common_type, + common_flags, + .. + } = get_event(&mut bpf); + assert_ne!(common_type, 0); + assert_ne!(common_flags, 0); + } +} diff --git a/test/integration-test/src/tests/rbpf.rs b/test/integration-test/src/tests/rbpf.rs index 900d1462..faa7a034 100644 --- a/test/integration-test/src/tests/rbpf.rs +++ b/test/integration-test/src/tests/rbpf.rs @@ -1,11 +1,10 @@ -use core::{mem::size_of, ptr::null_mut, slice::from_raw_parts}; +use core::{mem::size_of, ptr, slice::from_raw_parts}; use std::collections::HashMap; use assert_matches::assert_matches; -use aya_obj::{generated::bpf_insn, programs::XdpAttachType, Object, ProgramSection}; -use test_log::test; +use aya_obj::{Object, ProgramSection, generated::bpf_insn, programs::XdpAttachType}; -#[test] +#[test_log::test] fn run_with_rbpf() { let object = Object::parse(crate::PASS).unwrap(); @@ -25,7 +24,7 @@ fn run_with_rbpf() { .instructions; let data = unsafe { from_raw_parts( - instructions.as_ptr() as *const u8, + instructions.as_ptr().cast(), instructions.len() * size_of::(), ) }; @@ -35,9 +34,9 @@ fn run_with_rbpf() { assert_eq!(vm.execute_program().unwrap(), XDP_PASS); } -static mut MULTIMAP_MAPS: [*mut Vec; 3] = [null_mut(); 3]; +static mut MULTIMAP_MAPS: [*mut Vec; 3] = [ptr::null_mut(); 3]; -#[test] +#[test_log::test] fn use_map_with_rbpf() { let mut object = Object::parse(crate::MULTIMAP_BTF).unwrap(); @@ -53,6 +52,9 @@ fn use_map_with_rbpf() { // so we keeps the pointers to our maps in MULTIMAP_MAPS, to be used in helpers. let mut maps = HashMap::new(); let mut map_instances = vec![vec![0u64], vec![0u64], vec![0u64]]; + unsafe { + MULTIMAP_MAPS = [ptr::null_mut(); 3]; + } for (name, map) in object.maps.iter() { assert_eq!(map.key_size(), size_of::() as u32); assert_eq!(map.value_size(), size_of::() as u32); @@ -65,14 +67,14 @@ fn use_map_with_rbpf() { "map_1" => 0, "map_2" => 1, "map_pin_by_name" => 2, - n => panic!("Unexpected map: {n}"), + n => panic!("unexpected map: {n}"), }; let fd = map_id as i32 | 0xCAFE00; maps.insert(name.to_owned(), (fd, map.clone())); unsafe { - MULTIMAP_MAPS[map_id] = &mut map_instances[map_id] as *mut _; + MULTIMAP_MAPS[map_id] = ptr::from_mut(&mut map_instances[map_id]); } } @@ -100,7 +102,7 @@ fn use_map_with_rbpf() { .instructions; let data = unsafe { from_raw_parts( - instructions.as_ptr() as *const u8, + instructions.as_ptr().cast(), instructions.len() * size_of::(), ) }; @@ -110,10 +112,6 @@ fn use_map_with_rbpf() { assert_eq!(vm.execute_program().unwrap(), 0); assert_eq!(map_instances, [[24], [42], [44]]); - - unsafe { - MULTIMAP_MAPS.iter_mut().for_each(|v| *v = null_mut()); - } } #[track_caller] diff --git a/test/integration-test/src/tests/relocations.rs b/test/integration-test/src/tests/relocations.rs index eb43466a..88b3e2b4 100644 --- a/test/integration-test/src/tests/relocations.rs +++ b/test/integration-test/src/tests/relocations.rs @@ -1,7 +1,10 @@ -use aya::{programs::UProbe, util::KernelVersion, Ebpf}; -use test_log::test; +use aya::{ + Ebpf, + programs::{UProbe, Xdp}, + util::KernelVersion, +}; -#[test] +#[test_log::test] fn relocations() { let bpf = load_and_attach("test_64_32_call_relocs", crate::RELOCATIONS); @@ -13,11 +16,13 @@ fn relocations() { assert_eq!(m.get(&2, 0).unwrap(), 3); } -#[test] +#[test_log::test] fn text_64_64_reloc() { let kernel_version = KernelVersion::current().unwrap(); if kernel_version < KernelVersion::new(5, 13, 0) { - eprintln!("skipping test on kernel {kernel_version:?}, support for bpf_for_each_map_elem was added in 5.13.0; see https://github.com/torvalds/linux/commit/69c087b"); + eprintln!( + "skipping test on kernel {kernel_version:?}, support for bpf_for_each_map_elem was added in 5.13.0; see https://github.com/torvalds/linux/commit/69c087b" + ); return; } @@ -33,25 +38,31 @@ fn text_64_64_reloc() { assert_eq!(m.get(&1, 0).unwrap(), 3); } +#[test_log::test] +fn variables_reloc() { + let mut bpf = Ebpf::load(crate::VARIABLES_RELOC).unwrap(); + let prog: &mut Xdp = bpf + .program_mut("variables_reloc") + .unwrap() + .try_into() + .unwrap(); + prog.load().unwrap(); +} + fn load_and_attach(name: &str, bytes: &[u8]) -> Ebpf { let mut bpf = Ebpf::load(bytes).unwrap(); let prog: &mut UProbe = bpf.program_mut(name).unwrap().try_into().unwrap(); prog.load().unwrap(); - prog.attach( - Some("trigger_relocations_program"), - 0, - "/proc/self/exe", - None, - ) - .unwrap(); + prog.attach("trigger_relocations_program", "/proc/self/exe", None, None) + .unwrap(); bpf } -#[no_mangle] +#[unsafe(no_mangle)] #[inline(never)] -pub extern "C" fn trigger_relocations_program() { +extern "C" fn trigger_relocations_program() { core::hint::black_box(trigger_relocations_program); } diff --git a/test/integration-test/src/tests/ring_buf.rs b/test/integration-test/src/tests/ring_buf.rs index 18e38de9..d30bbd1c 100644 --- a/test/integration-test/src/tests/ring_buf.rs +++ b/test/integration-test/src/tests/ring_buf.rs @@ -1,53 +1,27 @@ use std::{ mem, os::fd::AsRawFd as _, + path::Path, sync::{ - atomic::{AtomicBool, Ordering}, Arc, + atomic::{AtomicBool, Ordering}, }, thread, + time::Duration, }; use anyhow::Context as _; use assert_matches::assert_matches; use aya::{ - maps::{array::PerCpuArray, ring_buf::RingBuf, MapData}, + Ebpf, EbpfLoader, + maps::{MapData, array::PerCpuArray, ring_buf::RingBuf}, programs::UProbe, - Ebpf, EbpfLoader, Pod, }; use aya_obj::generated::BPF_RINGBUF_HDR_SZ; +use integration_common::ring_buf::Registers; use rand::Rng as _; -use test_log::test; -use tokio::{ - io::unix::AsyncFd, - time::{sleep, Duration}, -}; - -// This structure's definition is duplicated in the probe. -#[repr(C)] -#[derive(Clone, Copy, Debug, Eq, PartialEq, Default)] -struct Registers { - dropped: u64, - rejected: u64, -} - -impl std::ops::Add for Registers { - type Output = Self; - fn add(self, rhs: Self) -> Self::Output { - Self { - dropped: self.dropped + rhs.dropped, - rejected: self.rejected + rhs.rejected, - } - } -} - -impl<'a> std::iter::Sum<&'a Registers> for Registers { - fn sum>(iter: I) -> Self { - iter.fold(Default::default(), |a, b| a + *b) - } -} - -unsafe impl Pod for Registers {} +use scopeguard::defer; +use tokio::io::{Interest, unix::AsyncFd}; struct RingBufTest { _bpf: Ebpf, @@ -63,14 +37,25 @@ const RING_BUF_MAX_ENTRIES: usize = 512; impl RingBufTest { fn new() -> Self { + Self::new_with_mutators(|_loader| {}, |_bpf| {}) + } + + // Allows the test to mutate the EbpfLoader before it loads the object file from disk, and to + // mutate the loaded Ebpf object after it has been loaded from disk but before it is loaded + // into the kernel. + fn new_with_mutators<'loader>( + loader_fn: impl FnOnce(&mut EbpfLoader<'loader>), + bpf_fn: impl FnOnce(&mut Ebpf), + ) -> Self { const RING_BUF_BYTE_SIZE: u32 = (RING_BUF_MAX_ENTRIES * (mem::size_of::() + BPF_RINGBUF_HDR_SZ as usize)) as u32; // Use the loader API to control the size of the ring_buf. - let mut bpf = EbpfLoader::new() - .set_max_entries("RING_BUF", RING_BUF_BYTE_SIZE) - .load(crate::RING_BUF) - .unwrap(); + let mut loader = EbpfLoader::new(); + loader.map_max_entries("RING_BUF", RING_BUF_BYTE_SIZE); + loader_fn(&mut loader); + let mut bpf = loader.load(crate::RING_BUF).unwrap(); + bpf_fn(&mut bpf); let ring_buf = bpf.take_map("RING_BUF").unwrap(); let ring_buf = RingBuf::try_from(ring_buf).unwrap(); let regs = bpf.take_map("REGISTERS").unwrap(); @@ -82,10 +67,10 @@ impl RingBufTest { .unwrap(); prog.load().unwrap(); prog.attach( - Some("ring_buf_trigger_ebpf_program"), - 0, + "ring_buf_trigger_ebpf_program", "/proc/self/exe", None, + None, ) .unwrap(); @@ -102,8 +87,8 @@ struct WithData(RingBufTest, Vec); impl WithData { fn new(n: usize) -> Self { Self(RingBufTest::new(), { - let mut rng = rand::thread_rng(); - std::iter::repeat_with(|| rng.gen()).take(n).collect() + let mut rng = rand::rng(); + std::iter::repeat_with(|| rng.random()).take(n).collect() }) } } @@ -166,9 +151,9 @@ fn ring_buf(n: usize) { assert_eq!(rejected, expected_rejected); } -#[no_mangle] +#[unsafe(no_mangle)] #[inline(never)] -pub extern "C" fn ring_buf_trigger_ebpf_program(arg: u64) { +extern "C" fn ring_buf_trigger_ebpf_program(arg: u64) { std::hint::black_box(arg); } @@ -176,7 +161,8 @@ pub extern "C" fn ring_buf_trigger_ebpf_program(arg: u64) { // to fill the ring_buf. We just ensure that the number of events we see is sane given // what the producer sees, and that the logic does not hang. This exercises interleaving // discards, successful commits, and drops due to the ring_buf being full. -#[test(tokio::test(flavor = "multi_thread"))] +#[tokio::test(flavor = "multi_thread")] +#[test_log::test] async fn ring_buf_async_with_drops() { let WithData( RingBufTest { @@ -187,7 +173,7 @@ async fn ring_buf_async_with_drops() { data, ) = WithData::new(RING_BUF_MAX_ENTRIES * 8); - let mut async_fd = AsyncFd::new(ring_buf).unwrap(); + let mut async_fd = AsyncFd::with_interest(ring_buf, Interest::READABLE).unwrap(); // Spawn the writer which internally will spawn many parallel writers. // Construct an AsyncFd from the RingBuf in order to receive readiness notifications. @@ -203,49 +189,42 @@ async fn ring_buf_async_with_drops() { seen += 1; } }; - use futures::future::{ - select, - Either::{Left, Right}, - }; - let writer = futures::future::try_join_all(data.chunks(8).map(ToOwned::to_owned).map(|v| { - tokio::spawn(async { - for value in v { - ring_buf_trigger_ebpf_program(value); - } - }) - })); - let readable = { - let mut writer = writer; - loop { - let readable = Box::pin(async_fd.readable_mut()); - writer = match select(readable, writer).await { - Left((guard, writer)) => { - let mut guard = guard.unwrap(); - process_ring_buf(guard.get_inner_mut()); - guard.clear_ready(); - writer - } - Right((writer, readable)) => { - writer.unwrap(); - break readable; + let mut writer = + futures::future::try_join_all(data.chunks(8).map(ToOwned::to_owned).map(|v| { + tokio::spawn(async { + for value in v { + ring_buf_trigger_ebpf_program(value); } + }) + })); + loop { + let readable = async_fd.readable_mut(); + futures::pin_mut!(readable); + match futures::future::select(readable, &mut writer).await { + futures::future::Either::Left((guard, _writer)) => { + let mut guard = guard.unwrap(); + process_ring_buf(guard.get_inner_mut()); + guard.clear_ready(); } - } - }; + futures::future::Either::Right((writer, readable)) => { + writer.unwrap(); + + // If there's more to read, we should receive a readiness notification in a timely + // manner. If we don't then, then assert that there's nothing else to read. Note + // that it's important to wait some time before attempting to read, otherwise we may + // catch up with the producer before epoll has an opportunity to send a + // notification; our consumer thread can race with the kernel epoll check. + match tokio::time::timeout(Duration::from_millis(10), readable).await { + Err(tokio::time::error::Elapsed { .. }) => (), + Ok(guard) => { + let mut guard = guard.unwrap(); + process_ring_buf(guard.get_inner_mut()); + guard.clear_ready(); + } + } - // If there's more to read, we should receive a readiness notification in a timely manner. - // If we don't then, then assert that there's nothing else to read. Note that it's important - // to wait some time before attempting to read, otherwise we may catch up with the producer - // before epoll has an opportunity to send a notification; our consumer thread can race - // with the kernel epoll check. - let sleep_fut = sleep(Duration::from_millis(10)); - tokio::pin!(sleep_fut); - match select(sleep_fut, readable).await { - Left(((), _)) => {} - Right((guard, _)) => { - let mut guard = guard.unwrap(); - process_ring_buf(guard.get_inner_mut()); - guard.clear_ready(); + break; + } } } @@ -268,7 +247,7 @@ async fn ring_buf_async_with_drops() { "seen={seen}, rejected={rejected}, dropped={dropped}, total={total}, max_seen={max_seen}, \ max_rejected={max_rejected}, max_dropped={max_dropped}", ); - assert_eq!(seen + rejected + dropped, total, "{facts}",); + assert_eq!(seen + rejected + dropped, total, "{facts}"); assert!( (0u64..=max_dropped).contains(&dropped), "dropped={dropped} not in 0..={max_dropped}; {facts}", @@ -283,7 +262,8 @@ async fn ring_buf_async_with_drops() { ); } -#[test(tokio::test(flavor = "multi_thread"))] +#[tokio::test(flavor = "multi_thread")] +#[test_log::test] async fn ring_buf_async_no_drop() { let WithData( RingBufTest { @@ -295,20 +275,24 @@ async fn ring_buf_async_no_drop() { ) = WithData::new(RING_BUF_MAX_ENTRIES * 3); let writer = { - let data = data.to_owned(); + let mut rng = rand::rng(); + let data: Vec<_> = data + .iter() + .copied() + .map(|value| (value, Duration::from_nanos(rng.random_range(0..10)))) + .collect(); tokio::spawn(async move { - for value in data { + for (value, duration) in data { // Sleep a tad so we feel confident that the consumer will keep up // and no messages will be dropped. - let dur = Duration::from_nanos(rand::thread_rng().gen_range(0..10)); - sleep(dur).await; + tokio::time::sleep(duration).await; ring_buf_trigger_ebpf_program(value); } }) }; // Construct an AsyncFd from the RingBuf in order to receive readiness notifications. - let mut async_fd = AsyncFd::new(ring_buf).unwrap(); + let mut async_fd = AsyncFd::with_interest(ring_buf, Interest::READABLE).unwrap(); // Note that unlike in the synchronous case where all of the entries are written before any of // them are read, in this case we expect all of the entries to make their way to userspace // because entries are being consumed as they are produced. @@ -347,7 +331,7 @@ async fn ring_buf_async_no_drop() { // This test reproduces a bug where the ring buffer would not be notified of new entries if the // state was not properly synchronized between the producer and consumer. This would result in the // consumer never being woken up and the test hanging. -#[test] +#[test_log::test] fn ring_buf_epoll_wakeup() { let RingBufTest { mut ring_buf, @@ -381,7 +365,8 @@ fn ring_buf_epoll_wakeup() { } // This test is like the above test but uses tokio and AsyncFd instead of raw epoll. -#[test(tokio::test)] +#[tokio::test] +#[test_log::test] async fn ring_buf_asyncfd_events() { let RingBufTest { ring_buf, @@ -389,7 +374,7 @@ async fn ring_buf_asyncfd_events() { _bpf, } = RingBufTest::new(); - let mut async_fd = AsyncFd::new(ring_buf).unwrap(); + let mut async_fd = AsyncFd::with_interest(ring_buf, Interest::READABLE).unwrap(); let mut total_events = 0; let writer = WriterThread::spawn(); while total_events < WriterThread::NUM_MESSAGES { @@ -440,3 +425,70 @@ impl WriterThread { thread.join().unwrap(); } } + +// This tests that a ring buffer can be pinned and then re-opened and attached to a subsequent +// program. It ensures that the producer position is properly synchronized between the two +// programs, and that no unread data is lost. +#[tokio::test(flavor = "multi_thread")] +#[test_log::test] +async fn ring_buf_pinned() { + let pin_path = + Path::new("/sys/fs/bpf/").join(format!("ring_buf_{}", rand::rng().random::())); + + let RingBufTest { + mut ring_buf, + regs: _, + _bpf, + } = RingBufTest::new_with_mutators( + |_loader| {}, + |bpf| { + let ring_buf = bpf.map_mut("RING_BUF").unwrap(); + ring_buf.pin(&pin_path).unwrap(); + }, + ); + defer! { std::fs::remove_file(&pin_path).unwrap() } + + // Write a few items to the ring buffer. + let to_write_before_reopen = [2, 4, 6, 8]; + for v in to_write_before_reopen { + ring_buf_trigger_ebpf_program(v); + } + let (to_read_before_reopen, to_read_after_reopen) = to_write_before_reopen.split_at(2); + for v in to_read_before_reopen { + let item = ring_buf.next().unwrap(); + let item: [u8; 8] = item.as_ref().try_into().unwrap(); + assert_eq!(item, v.to_ne_bytes()); + } + drop(ring_buf); + drop(_bpf); + + // Reopen the ring buffer using the pinned map. + let RingBufTest { + mut ring_buf, + regs: _, + _bpf, + } = RingBufTest::new_with_mutators( + |loader| { + loader.map_pin_path("RING_BUF", &pin_path); + }, + |_bpf| {}, + ); + let to_write_after_reopen = [10, 12]; + + // Write some more data. + for v in to_write_after_reopen { + ring_buf_trigger_ebpf_program(v); + } + // Read both the data that was written before the ring buffer was reopened and the data that + // was written after it was reopened. + for v in to_read_after_reopen + .iter() + .chain(to_write_after_reopen.iter()) + { + let item = ring_buf.next().unwrap(); + let item: [u8; 8] = item.as_ref().try_into().unwrap(); + assert_eq!(item, v.to_ne_bytes()); + } + // Make sure there is nothing else in the ring buffer. + assert_matches!(ring_buf.next(), None); +} diff --git a/test/integration-test/src/tests/sk_storage.rs b/test/integration-test/src/tests/sk_storage.rs new file mode 100644 index 00000000..ba37515d --- /dev/null +++ b/test/integration-test/src/tests/sk_storage.rs @@ -0,0 +1,98 @@ +use std::net::{Ipv4Addr, Ipv6Addr, SocketAddr, TcpListener, TcpStream}; + +use assert_matches::assert_matches; +use aya::{ + EbpfLoader, + maps::{MapError, SkStorage}, + programs::{CgroupAttachMode, CgroupSockAddr}, +}; +use integration_common::sk_storage::{Ip, Value}; +use libc::{self}; +use test_log::test; + +use crate::utils::{Cgroup, NetNsGuard}; + +#[test] +fn sk_storage_connect() { + let mut ebpf = EbpfLoader::new().load(crate::SK_STORAGE).unwrap(); + + let storage = ebpf.take_map("SOCKET_STORAGE").unwrap(); + let mut storage = SkStorage::<_, Value>::try_from(storage).unwrap(); + + let _netns = NetNsGuard::new(); + let root_cgroup = Cgroup::root(); + let cgroup = root_cgroup.create_child("aya-test-sk-storage"); + let cgroup_fd = cgroup.fd(); + + let guards = ebpf + .programs_mut() + .map(|(name, prog)| { + let prog: &mut CgroupSockAddr = prog.try_into().expect(name); + prog.load().expect(name); + let link_id = prog + .attach(cgroup_fd, CgroupAttachMode::Single) + .expect(name); + scopeguard::guard((), |()| { + prog.detach(link_id).expect(name); + }) + }) + .collect::>(); + + let cgroup = cgroup.into_cgroup(); + cgroup.write_pid(std::process::id()); + + let listener4 = TcpListener::bind((Ipv4Addr::LOCALHOST, 0)).unwrap(); + let addr4 = listener4.local_addr().unwrap(); + let listener6 = TcpListener::bind((Ipv6Addr::LOCALHOST, 0)).unwrap(); + let addr6 = listener6.local_addr().unwrap(); + + { + let client4 = TcpStream::connect(addr4).unwrap(); + assert_matches!(storage.get(&client4, 0), Ok(value4) => { + assert_eq!(value4, expected_value(&addr4)); + }); + storage.remove(&client4).unwrap(); + assert_matches!(storage.get(&client4, 0), Err(MapError::KeyNotFound)); + + let client6 = TcpStream::connect(addr6).unwrap(); + assert_matches!(storage.get(&client6, 0), Ok(value6) => { + assert_eq!(value6, expected_value(&addr6)); + }); + storage.remove(&client6).unwrap(); + assert_matches!(storage.get(&client6, 0), Err(MapError::KeyNotFound)); + } + + // Detach. + drop(guards); + + { + let client4 = TcpStream::connect(addr4).unwrap(); + assert_matches!(storage.get(&client4, 0), Err(MapError::KeyNotFound)); + + let client6 = TcpStream::connect(addr6).unwrap(); + assert_matches!(storage.get(&client6, 0), Err(MapError::KeyNotFound)); + } +} + +fn expected_value(addr: &SocketAddr) -> Value { + match addr { + SocketAddr::V4(addr) => Value { + user_family: libc::AF_INET as u32, + user_ip: Ip::V4(u32::from_ne_bytes(addr.ip().octets())), + user_port: u32::from(addr.port().to_be()), + family: libc::AF_INET as u32, + type_: libc::SOCK_STREAM as u32, + protocol: libc::IPPROTO_TCP as u32, + }, + SocketAddr::V6(addr) => Value { + user_family: libc::AF_INET6 as u32, + user_ip: Ip::V6(unsafe { + core::mem::transmute::<[u8; 16], [u32; 4]>(addr.ip().octets()) + }), + user_port: u32::from(addr.port().to_be()), + family: libc::AF_INET6 as u32, + type_: libc::SOCK_STREAM as u32, + protocol: libc::IPPROTO_TCP as u32, + }, + } +} diff --git a/test/integration-test/src/tests/smoke.rs b/test/integration-test/src/tests/smoke.rs index 708b889b..8f6200c4 100644 --- a/test/integration-test/src/tests/smoke.rs +++ b/test/integration-test/src/tests/smoke.rs @@ -1,18 +1,31 @@ use aya::{ - maps::loaded_maps, - programs::{loaded_programs, Extension, TracePoint, Xdp, XdpFlags}, - util::KernelVersion, Ebpf, EbpfLoader, + programs::{Extension, TracePoint, Xdp, XdpFlags, tc}, + util::KernelVersion, }; -use test_log::test; use crate::utils::NetNsGuard; -#[test] +#[test_log::test] +fn modprobe() { + // This very simple looking test is actually quite complex. + // The call to tc::qdisc_add_clsact() causes the linux kernel to call into + // `__request_module()`, which via the usermodehelper calls out into the + // `/sbin/modprobe` to load the required kernel module. + // In order for this test to pass, all of that machinery must work + // correctly within the test environment. + let _netns = NetNsGuard::new(); + + tc::qdisc_add_clsact("lo").unwrap(); +} + +#[test_log::test] fn xdp() { let kernel_version = KernelVersion::current().unwrap(); if kernel_version < KernelVersion::new(5, 18, 0) { - eprintln!("skipping test on kernel {kernel_version:?}, support for BPF_F_XDP_HAS_FRAGS was added in 5.18.0; see https://github.com/torvalds/linux/commit/c2f2cdb"); + eprintln!( + "skipping test on kernel {kernel_version:?}, support for BPF_F_XDP_HAS_FRAGS was added in 5.18.0; see https://github.com/torvalds/linux/commit/c2f2cdb" + ); return; } @@ -24,7 +37,7 @@ fn xdp() { dispatcher.attach("lo", XdpFlags::default()).unwrap(); } -#[test] +#[test_log::test] fn two_progs() { let mut bpf = Ebpf::load(crate::TWO_PROGS).unwrap(); @@ -46,7 +59,7 @@ fn two_progs() { prog_two.attach("sched", "sched_switch").unwrap(); } -#[test] +#[test_log::test] fn extension() { let kernel_version = KernelVersion::current().unwrap(); if kernel_version < KernelVersion::new(5, 9, 0) { @@ -70,57 +83,3 @@ fn extension() { .load(pass.fd().unwrap().try_clone().unwrap(), "xdp_pass") .unwrap(); } - -#[test] -fn list_loaded_programs() { - // Load a program. - let mut bpf = Ebpf::load(crate::PASS).unwrap(); - let dispatcher: &mut Xdp = bpf.program_mut("pass").unwrap().try_into().unwrap(); - dispatcher.load().unwrap(); - dispatcher.attach("lo", XdpFlags::default()).unwrap(); - - // Ensure the loaded_programs() api doesn't panic. - let prog = loaded_programs() - .map(|p| p.unwrap()) - .find(|p| p.name_as_str().unwrap() == "pass") - .unwrap(); - - // Ensure all relevant helper functions don't panic. - prog.name(); - prog.id(); - prog.tag(); - prog.program_type(); - prog.gpl_compatible(); - prog.map_ids().unwrap(); - prog.btf_id(); - prog.size_translated(); - prog.memory_locked().unwrap(); - prog.verified_instruction_count(); - prog.loaded_at(); - prog.fd().unwrap(); -} - -#[test] -fn list_loaded_maps() { - // Load a program with maps. - let mut bpf = Ebpf::load(crate::MAP_TEST).unwrap(); - let dispatcher: &mut Xdp = bpf.program_mut("pass").unwrap().try_into().unwrap(); - dispatcher.load().unwrap(); - dispatcher.attach("lo", XdpFlags::default()).unwrap(); - - // Ensure the loaded_maps() api doesn't panic and retrieve a map. - let map = loaded_maps() - .map(|m| m.unwrap()) - .find(|m| m.name_as_str().unwrap() == "FOO") - .unwrap(); - - // Ensure all relevant helper functions don't panic. - map.name(); - map.id(); - map.map_type(); - map.key_size(); - map.value_size(); - map.max_entries(); - map.map_flags(); - map.fd().unwrap(); -} diff --git a/test/integration-test/src/tests/strncmp.rs b/test/integration-test/src/tests/strncmp.rs new file mode 100644 index 00000000..9428e000 --- /dev/null +++ b/test/integration-test/src/tests/strncmp.rs @@ -0,0 +1,57 @@ +use std::{ + cmp::Ordering, + ffi::{CStr, c_char}, +}; + +use aya::{ + Ebpf, + maps::{Array, MapData}, + programs::UProbe, + util::KernelVersion, +}; +use integration_common::strncmp::TestResult; + +#[test_log::test] +fn bpf_strncmp() { + let kernel_version = KernelVersion::current().unwrap(); + if kernel_version < KernelVersion::new(5, 17, 0) { + eprintln!("skipping test on kernel {kernel_version:?}, bpf_strncmp was added in 5.17"); + return; + } + + let mut bpf = Ebpf::load(crate::STRNCMP).unwrap(); + + { + let prog: &mut UProbe = bpf + .program_mut("test_bpf_strncmp") + .unwrap() + .try_into() + .unwrap(); + prog.load().unwrap(); + + prog.attach("trigger_bpf_strncmp", "/proc/self/exe", None, None) + .unwrap(); + } + + let array = Array::<_, TestResult>::try_from(bpf.map("RESULT").unwrap()).unwrap(); + + assert_eq!(do_bpf_strncmp(&array, c"ff"), Ordering::Equal); + + // This is truncated in BPF; the buffer size is 3 including the null terminator. + assert_eq!(do_bpf_strncmp(&array, c"fff"), Ordering::Equal); + + assert_eq!(do_bpf_strncmp(&array, c"aa"), Ordering::Less); + assert_eq!(do_bpf_strncmp(&array, c"zz"), Ordering::Greater); +} + +fn do_bpf_strncmp(array: &Array<&MapData, TestResult>, s1: &CStr) -> Ordering { + trigger_bpf_strncmp(s1.as_ptr()); + let TestResult(ord) = array.get(&0, 0).unwrap(); + ord +} + +#[unsafe(no_mangle)] +#[inline(never)] +extern "C" fn trigger_bpf_strncmp(s1: *const c_char) { + core::hint::black_box(s1); +} diff --git a/test/integration-test/src/tests/tcx.rs b/test/integration-test/src/tests/tcx.rs new file mode 100644 index 00000000..9069f34f --- /dev/null +++ b/test/integration-test/src/tests/tcx.rs @@ -0,0 +1,101 @@ +use aya::{ + Ebpf, + programs::{LinkOrder, ProgramId, SchedClassifier, TcAttachType, tc::TcAttachOptions}, + util::KernelVersion, +}; + +use crate::utils::NetNsGuard; + +#[test_log::test] +fn tcx() { + let kernel_version = KernelVersion::current().unwrap(); + if kernel_version < KernelVersion::new(6, 6, 0) { + eprintln!("skipping tcx_attach test on kernel {kernel_version:?}"); + return; + } + + let _netns = NetNsGuard::new(); + + // We need a dedicated `Ebpf` instance for each program that we load + // since TCX does not allow the same program ID to be attached multiple + // times to the same interface/direction. + // + // Variables declared within this macro are within a closure scope to avoid + // variable name conflicts. + // + // Yields a tuple of the `Ebpf` which must remain in scope for the duration + // of the test, and the link ID of the attached program. + macro_rules! attach_program_with_link_order_inner { + ($program_name:ident, $link_order:expr) => { + let mut ebpf = Ebpf::load(crate::TCX).unwrap(); + let $program_name: &mut SchedClassifier = + ebpf.program_mut("tcx_next").unwrap().try_into().unwrap(); + $program_name.load().unwrap(); + }; + } + macro_rules! attach_program_with_link_order { + ($program_name:ident, $link_order:expr) => { + attach_program_with_link_order_inner!($program_name, $link_order); + $program_name + .attach_with_options( + "lo", + TcAttachType::Ingress, + TcAttachOptions::TcxOrder($link_order), + ) + .unwrap(); + }; + ($program_name:ident, $link_id_name:ident, $link_order:expr) => { + attach_program_with_link_order_inner!($program_name, $link_order); + let $link_id_name = $program_name + .attach_with_options( + "lo", + TcAttachType::Ingress, + TcAttachOptions::TcxOrder($link_order), + ) + .unwrap(); + }; + } + + attach_program_with_link_order!(default, LinkOrder::default()); + attach_program_with_link_order!(first, LinkOrder::first()); + attach_program_with_link_order!(last, last_link_id, LinkOrder::last()); + + let last_link = last.take_link(last_link_id).unwrap(); + + attach_program_with_link_order!(before_last, LinkOrder::before_link(&last_link).unwrap()); + attach_program_with_link_order!(after_last, LinkOrder::after_link(&last_link).unwrap()); + + attach_program_with_link_order!(before_default, LinkOrder::before_program(default).unwrap()); + attach_program_with_link_order!(after_default, LinkOrder::after_program(default).unwrap()); + + attach_program_with_link_order!( + before_first, + LinkOrder::before_program_id(unsafe { ProgramId::new(first.info().unwrap().id()) }) + ); + attach_program_with_link_order!( + after_first, + LinkOrder::after_program_id(unsafe { ProgramId::new(first.info().unwrap().id()) }) + ); + + let expected_order = [ + before_first, + first, + after_first, + before_default, + default, + after_default, + before_last, + last, + after_last, + ] + .iter() + .map(|program| program.info().unwrap().id()) + .collect::>(); + + let (revision, got_order) = SchedClassifier::query_tcx("lo", TcAttachType::Ingress).unwrap(); + assert_eq!(revision, (expected_order.len() + 1) as u64); + assert_eq!( + got_order.iter().map(|p| p.id()).collect::>(), + expected_order + ); +} diff --git a/test/integration-test/src/tests/uprobe_cookie.rs b/test/integration-test/src/tests/uprobe_cookie.rs new file mode 100644 index 00000000..e90f7bbe --- /dev/null +++ b/test/integration-test/src/tests/uprobe_cookie.rs @@ -0,0 +1,69 @@ +use aya::{EbpfLoader, maps::ring_buf::RingBuf, programs::UProbe, util::KernelVersion}; + +#[test_log::test] +fn test_uprobe_cookie() { + let kernel_version = KernelVersion::current().unwrap(); + if kernel_version < KernelVersion::new(5, 15, 0) { + eprintln!( + "skipping test on kernel {kernel_version:?}, bpf_get_attach_cookie was added in 5.15" + ); + return; + } + const RING_BUF_BYTE_SIZE: u32 = 512; // arbitrary, but big enough + + let mut bpf = EbpfLoader::new() + .map_max_entries("RING_BUF", RING_BUF_BYTE_SIZE) + .load(crate::UPROBE_COOKIE) + .unwrap(); + let ring_buf = bpf.take_map("RING_BUF").unwrap(); + let mut ring_buf = RingBuf::try_from(ring_buf).unwrap(); + let prog: &mut UProbe = bpf + .program_mut("uprobe_cookie") + .unwrap() + .try_into() + .unwrap(); + prog.load().unwrap(); + const PROG_A: &str = "uprobe_cookie_trigger_ebpf_program_a"; + const PROG_B: &str = "uprobe_cookie_trigger_ebpf_program_b"; + let attach = |prog: &mut UProbe, fn_name, cookie| { + prog.attach(fn_name, "/proc/self/exe", None, Some(cookie)) + .unwrap() + }; + + // Note that the arguments we pass to the functions are meaningless, but we + // pass the value we expect to see in the ring buffer from the cookie for + // readability. + let a = attach(prog, PROG_A, 1); + let _b = attach(prog, PROG_B, 2); + uprobe_cookie_trigger_ebpf_program_a(1); + uprobe_cookie_trigger_ebpf_program_b(2); + uprobe_cookie_trigger_ebpf_program_a(1); + prog.detach(a).unwrap(); + let _a = attach(prog, PROG_A, 3); + uprobe_cookie_trigger_ebpf_program_a(3); + const EXP: &[u64] = &[1, 2, 1, 3]; + + let mut seen = Vec::new(); + while let Some(read) = ring_buf.next() { + let read = read.as_ref(); + match read.try_into() { + Ok(read) => seen.push(u64::from_le_bytes(read)), + Err(std::array::TryFromSliceError { .. }) => { + panic!("invalid ring buffer data: {read:x?}") + } + } + } + assert_eq!(seen, EXP); +} + +#[unsafe(no_mangle)] +#[inline(never)] +extern "C" fn uprobe_cookie_trigger_ebpf_program_a(arg: u64) { + std::hint::black_box(arg); +} + +#[unsafe(no_mangle)] +#[inline(never)] +extern "C" fn uprobe_cookie_trigger_ebpf_program_b(arg: u32) { + std::hint::black_box(arg); +} diff --git a/test/integration-test/src/tests/xdp.rs b/test/integration-test/src/tests/xdp.rs index fb137d89..08161872 100644 --- a/test/integration-test/src/tests/xdp.rs +++ b/test/integration-test/src/tests/xdp.rs @@ -1,17 +1,18 @@ -use std::{ffi::CStr, mem::MaybeUninit, net::UdpSocket, num::NonZeroU32, time::Duration}; +use std::{net::UdpSocket, num::NonZeroU32, time::Duration}; +use assert_matches::assert_matches; use aya::{ - maps::{Array, CpuMap, XskMap}, - programs::{Xdp, XdpFlags}, Ebpf, + maps::{Array, CpuMap, XskMap}, + programs::{ProgramError, Xdp, XdpError, XdpFlags, xdp::XdpLinkId}, + util::KernelVersion, }; -use object::{Object, ObjectSection, ObjectSymbol, SymbolSection}; -use test_log::test; +use object::{Object as _, ObjectSection as _, ObjectSymbol as _, SymbolSection}; use xdpilone::{BufIdx, IfInfo, Socket, SocketConfig, Umem, UmemConfig}; use crate::utils::NetNsGuard; -#[test] +#[test_log::test] fn af_xdp() { let _netns = NetNsGuard::new(); @@ -26,25 +27,33 @@ fn af_xdp() { xdp.load().unwrap(); xdp.attach("lo", XdpFlags::default()).unwrap(); + const SIZE: usize = 2 * 4096; + // So this needs to be page aligned. Pages are 4k on all mainstream architectures except for // Apple Silicon which uses 16k pages. So let's align on that for tests to run natively there. #[repr(C, align(16384))] - struct PacketMap(MaybeUninit<[u8; 4096]>); + struct PageAligned([u8; SIZE]); - // Safety: don't access alloc down the line. - let mut alloc = Box::new(PacketMap(MaybeUninit::uninit())); + let mut alloc = Box::new(PageAligned([0; SIZE])); let umem = { - // Safety: this is a shared buffer between the kernel and us, uninitialized memory is valid. - let mem = unsafe { alloc.0.assume_init_mut() }.as_mut().into(); + let PageAligned(mem) = alloc.as_mut(); + let mem = mem.as_mut().into(); // Safety: we cannot access `mem` further down the line because it falls out of scope. unsafe { Umem::new(UmemConfig::default(), mem).unwrap() } }; let mut iface = IfInfo::invalid(); - iface - .from_name(CStr::from_bytes_with_nul(b"lo\0").unwrap()) - .unwrap(); - let sock = Socket::with_shared(&iface, &umem).unwrap(); + iface.from_name(c"lo").unwrap(); + let sock = match Socket::with_shared(&iface, &umem) { + Ok(sock) => sock, + Err(err) => { + if err.get_raw() == libc::ENOPROTOOPT { + eprintln!("skipping test - AF_XDP sockets not available: {err}"); + return; + } + panic!("failed to create AF_XDP socket: {err} {}", err.get_raw()); + } + }; let mut fq_cq = umem.fq_cq(&sock).unwrap(); // Fill Queue / Completion Queue @@ -60,10 +69,12 @@ fn af_xdp() { socks.set(0, rx.as_raw_fd(), 0).unwrap(); let frame = umem.frame(BufIdx(0)).unwrap(); + let frame1 = umem.frame(BufIdx(1)).unwrap(); - // Produce a frame to be filled by the kernel - let mut writer = fq_cq.fill(1); + // Produce two frames to be filled by the kernel + let mut writer = fq_cq.fill(2); writer.insert_once(frame.offset); + writer.insert_once(frame1.offset); writer.commit(); let sock = UdpSocket::bind("127.0.0.1:0").unwrap(); @@ -84,9 +95,20 @@ fn af_xdp() { assert_eq!(&udp[0..2], port.to_be_bytes().as_slice()); // Source assert_eq!(&udp[2..4], 1777u16.to_be_bytes().as_slice()); // Dest assert_eq!(payload, b"hello AF_XDP"); + + assert_eq!(rx.available(), 1); + // Removes socket from map, no more packets will be redirected. + socks.unset(0).unwrap(); + assert_eq!(rx.available(), 1); + sock.send_to(b"hello AF_XDP", "127.0.0.1:1777").unwrap(); + assert_eq!(rx.available(), 1); + // Adds socket to map again, packets will be redirected again. + socks.set(0, rx.as_raw_fd(), 0).unwrap(); + sock.send_to(b"hello AF_XDP", "127.0.0.1:1777").unwrap(); + assert_eq!(rx.available(), 2); } -#[test] +#[test_log::test] fn prog_sections() { let obj_file = object::File::parse(crate::XDP_SEC).unwrap(); @@ -99,7 +121,7 @@ fn prog_sections() { } #[track_caller] -fn ensure_symbol(obj_file: &object::File, sec_name: &str, sym_name: &str) { +fn ensure_symbol(obj_file: &object::File<'_>, sec_name: &str, sym_name: &str) { let sec = obj_file.section_by_name(sec_name).unwrap_or_else(|| { let secs = obj_file .sections() @@ -120,7 +142,7 @@ fn ensure_symbol(obj_file: &object::File, sec_name: &str, sym_name: &str) { ); } -#[test] +#[test_log::test] fn map_load() { let bpf = Ebpf::load(crate::XDP_SEC).unwrap(); @@ -132,7 +154,7 @@ fn map_load() { bpf.program("xdp_frags_devmap").unwrap(); } -#[test] +#[test_log::test] fn cpumap_chain() { let _netns = NetNsGuard::new(); @@ -157,7 +179,21 @@ fn cpumap_chain() { // Load the main program let xdp: &mut Xdp = bpf.program_mut("redirect_cpu").unwrap().try_into().unwrap(); xdp.load().unwrap(); - xdp.attach("lo", XdpFlags::default()).unwrap(); + let result = xdp.attach("lo", XdpFlags::default()); + // Generic devices did not support cpumap XDP programs until 5.15. + // + // See https://github.com/torvalds/linux/commit/11941f8a85362f612df61f4aaab0e41b64d2111d. + if KernelVersion::current().unwrap() < KernelVersion::new(5, 15, 0) { + assert_matches!(result, Err(ProgramError::XdpError(XdpError::NetlinkError(err))) => { + assert_eq!(err.raw_os_error(), Some(libc::EINVAL)) + }); + eprintln!( + "skipping test - cpumap attachment not supported on generic (loopback) interface" + ); + return; + } else { + let _: XdpLinkId = result.unwrap(); + }; const PAYLOAD: &str = "hello cpumap"; diff --git a/test/integration-test/src/utils.rs b/test/integration-test/src/utils.rs index 28b68d4a..bad1f4af 100644 --- a/test/integration-test/src/utils.rs +++ b/test/integration-test/src/utils.rs @@ -1,41 +1,170 @@ //! Utilities to run tests use std::{ + borrow::Cow, + cell::OnceCell, ffi::CString, - io, process, + fs, + io::{self, Write as _}, + path::Path, + process, sync::atomic::{AtomicU64, Ordering}, }; +use anyhow::{Context as _, Result}; use aya::netlink_set_link_up; use libc::if_nametoindex; -use netns_rs::{get_from_current_thread, NetNs}; -pub struct NetNsGuard { +const CGROUP_ROOT: &str = "/sys/fs/cgroup"; +const CGROUP_PROCS: &str = "cgroup.procs"; + +pub(crate) struct ChildCgroup<'a> { + parent: &'a Cgroup<'a>, + path: Cow<'a, Path>, + fd: OnceCell, +} + +pub(crate) enum Cgroup<'a> { + Root, + Child(ChildCgroup<'a>), +} + +impl Cgroup<'static> { + pub(crate) fn root() -> Self { + Self::Root + } +} + +impl<'a> Cgroup<'a> { + fn path(&self) -> &Path { + match self { + Self::Root => Path::new(CGROUP_ROOT), + Self::Child(ChildCgroup { + parent: _, + path, + fd: _, + }) => path, + } + } + + pub(crate) fn create_child(&'a self, name: &str) -> ChildCgroup<'a> { + let path = self.path().join(name); + fs::create_dir(&path).unwrap(); + + ChildCgroup { + parent: self, + path: path.into(), + fd: OnceCell::new(), + } + } + + pub(crate) fn write_pid(&self, pid: u32) { + fs::write(self.path().join(CGROUP_PROCS), format!("{pid}\n")).unwrap(); + } +} + +impl<'a> ChildCgroup<'a> { + pub(crate) fn fd(&self) -> &fs::File { + let Self { + parent: _, + path, + fd, + } = self; + fd.get_or_init(|| { + fs::OpenOptions::new() + .read(true) + .open(path.as_ref()) + .unwrap() + }) + } + + pub(crate) fn into_cgroup(self) -> Cgroup<'a> { + Cgroup::Child(self) + } +} + +impl Drop for ChildCgroup<'_> { + fn drop(&mut self) { + let Self { + parent, + path, + fd: _, + } = self; + + match (|| -> Result<()> { + let dst = parent.path().join(CGROUP_PROCS); + let mut dst = fs::OpenOptions::new() + .append(true) + .open(&dst) + .with_context(|| { + format!( + "fs::OpenOptions::new().append(true).open(\"{}\")", + dst.display() + ) + })?; + let pids = path.as_ref().join(CGROUP_PROCS); + let pids = fs::read_to_string(&pids) + .with_context(|| format!("fs::read_to_string(\"{}\")", pids.display()))?; + for pid in pids.split_inclusive('\n') { + dst.write_all(pid.as_bytes()) + .with_context(|| format!("dst.write_all(\"{}\")", pid))?; + } + + fs::remove_dir(&path) + .with_context(|| format!("fs::remove_dir(\"{}\")", path.display()))?; + Ok(()) + })() { + Ok(()) => (), + Err(err) => { + // Avoid panic in panic. + if std::thread::panicking() { + eprintln!("{err:?}"); + } else { + panic!("{err:?}"); + } + } + } + } +} + +pub(crate) struct NetNsGuard { name: String, - old_ns: NetNs, - ns: Option, + old_ns: fs::File, } impl NetNsGuard { - pub fn new() -> Self { - let old_ns = get_from_current_thread().expect("Failed to get current netns"); + const PERSIST_DIR: &str = "/var/run/netns/"; + + pub(crate) fn new() -> Self { + let current_thread_netns_path = format!("/proc/self/task/{}/ns/net", nix::unistd::gettid()); + let old_ns = fs::File::open(¤t_thread_netns_path).unwrap_or_else(|err| { + panic!("fs::File::open(\"{current_thread_netns_path}\"): {err:?}") + }); static COUNTER: AtomicU64 = AtomicU64::new(0); let pid = process::id(); let name = format!("aya-test-{pid}-{}", COUNTER.fetch_add(1, Ordering::Relaxed)); - // Create and enter netns - let ns = NetNs::new(&name).unwrap_or_else(|e| panic!("Failed to create netns {name}: {e}")); - let netns = Self { - old_ns, - ns: Some(ns), - name, - }; + fs::create_dir_all(Self::PERSIST_DIR) + .unwrap_or_else(|err| panic!("fs::create_dir_all(\"{}\"): {err:?}", Self::PERSIST_DIR)); + let ns_path = Path::new(Self::PERSIST_DIR).join(&name); + let _: fs::File = fs::File::create(&ns_path) + .unwrap_or_else(|err| panic!("fs::File::create(\"{}\"): {err:?}", ns_path.display())); + nix::sched::unshare(nix::sched::CloneFlags::CLONE_NEWNET) + .expect("nix::sched::unshare(CLONE_NEWNET)"); - let ns = netns.ns.as_ref().unwrap(); - ns.enter() - .unwrap_or_else(|e| panic!("Failed to enter network namespace {}: {e}", netns.name)); - println!("Entered network namespace {}", netns.name); + nix::mount::mount( + Some(current_thread_netns_path.as_str()), + &ns_path, + Some("none"), + nix::mount::MsFlags::MS_BIND, + None::<&str>, + ) + .expect("nix::mount::mount"); + + println!("entered network namespace {name}"); + + let ns = Self { old_ns, name }; // By default, the loopback in a new netns is down. Set it up. let lo = CString::new("lo").unwrap(); @@ -43,30 +172,73 @@ impl NetNsGuard { let idx = if_nametoindex(lo.as_ptr()); if idx == 0 { panic!( - "Interface `lo` not found in netns {}: {}", - netns.name, + "interface `lo` not found in netns {}: {}", + ns.name, io::Error::last_os_error() ); } netlink_set_link_up(idx as i32) - .unwrap_or_else(|e| panic!("Failed to set `lo` up in netns {}: {e}", netns.name)); + .unwrap_or_else(|e| panic!("failed to set `lo` up in netns {}: {e}", ns.name)); } - netns + ns } } impl Drop for NetNsGuard { fn drop(&mut self) { - // Avoid panic in panic - if let Err(e) = self.old_ns.enter() { - eprintln!("Failed to return to original netns: {e}"); - } - if let Some(ns) = self.ns.take() { - if let Err(e) = ns.remove() { - eprintln!("Failed to remove netns {}: {e}", self.name); + let Self { old_ns, name } = self; + match (|| -> Result<()> { + nix::sched::setns(old_ns, nix::sched::CloneFlags::CLONE_NEWNET) + .context("nix::sched::setns(_, CLONE_NEWNET)")?; + let ns_path = Path::new(Self::PERSIST_DIR).join(&name); + nix::mount::umount2(&ns_path, nix::mount::MntFlags::MNT_DETACH).with_context(|| { + format!("nix::mount::umount2(\"{}\", MNT_DETACH)", ns_path.display()) + })?; + fs::remove_file(&ns_path) + .with_context(|| format!("fs::remove_file(\"{}\")", ns_path.display()))?; + Ok(()) + })() { + Ok(()) => (), + Err(err) => { + // Avoid panic in panic. + if std::thread::panicking() { + eprintln!("{err:?}"); + } else { + panic!("{err:?}"); + } } } - println!("Exited network namespace {}", self.name); } } + +/// If the `KernelVersion::current >= $version`, `assert!($cond)`, else `assert!(!$cond)`. +macro_rules! kernel_assert { + ($cond:expr, $version:expr $(,)?) => { + let current = aya::util::KernelVersion::current().unwrap(); + let required: aya::util::KernelVersion = $version; + if current >= required { + assert!($cond, "{current} >= {required}"); + } else { + assert!(!$cond, "{current} < {required}"); + } + }; +} + +pub(crate) use kernel_assert; + +/// If the `KernelVersion::current >= $version`, `assert_eq!($left, $right)`, else +/// `assert_ne!($left, $right)`. +macro_rules! kernel_assert_eq { + ($left:expr, $right:expr, $version:expr $(,)?) => { + let current = aya::util::KernelVersion::current().unwrap(); + let required: aya::util::KernelVersion = $version; + if current >= required { + assert_eq!($left, $right, "{current} >= {required}"); + } else { + assert_ne!($left, $right, "{current} < {required}"); + } + }; +} + +pub(crate) use kernel_assert_eq; diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index 0c617dea..d615859f 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -1,15 +1,21 @@ [package] name = "xtask" -version = "0.1.0" publish = false +version = "0.1.0" + authors.workspace = true +edition.workspace = true +homepage.workspace = true license.workspace = true repository.workspace = true -homepage.workspace = true -edition.workspace = true +rust-version.workspace = true + +[lints] +workspace = true [dependencies] anyhow = { workspace = true, features = ["std"] } +ar = { workspace = true } aya-tool = { path = "../aya-tool", version = "0.1.0", default-features = false } cargo_metadata = { workspace = true } clap = { workspace = true, features = ["derive"] } @@ -22,5 +28,7 @@ quote = { workspace = true } rustdoc-json = { workspace = true } rustup-toolchain = { workspace = true } syn = { workspace = true } +tar = { workspace = true } tempfile = { workspace = true } -which = { workspace = true } +walkdir = { workspace = true } +xz2 = { workspace = true } diff --git a/xtask/patches/gen_init_cpio.c.macos.diff b/xtask/patches/gen_init_cpio.c.macos.diff new file mode 100644 index 00000000..f15c322e --- /dev/null +++ b/xtask/patches/gen_init_cpio.c.macos.diff @@ -0,0 +1,32 @@ +diff --git a/gen_init_cpio.c b/gen_init_cpio.c +index 75e9561b..406c4d0a 100644 +--- a/gen_init_cpio.c ++++ b/gen_init_cpio.c +@@ -453,6 +453,7 @@ static int cpio_mkfile(const char *name, const char *location, + push_pad(namepadlen ? namepadlen : padlen(offset, 4)) < 0) + goto error; + ++#ifdef __linux__ + if (size) { + this_read = copy_file_range(file, NULL, outfd, NULL, size, 0); + if (this_read > 0) { +@@ -463,6 +464,7 @@ static int cpio_mkfile(const char *name, const char *location, + } + /* short or failed copy falls back to read/write... */ + } ++#endif + + while (size) { + unsigned char filebuf[65536]; +@@ -671,7 +673,10 @@ int main (int argc, char *argv[]) + break; + case 'o': + outfd = open(optarg, +- O_WRONLY | O_CREAT | O_LARGEFILE | O_TRUNC, ++#ifdef O_LARGEFILE ++ O_LARGEFILE | ++#endif ++ O_WRONLY | O_CREAT | O_TRUNC, + 0600); + if (outfd < 0) { + fprintf(stderr, "failed to open %s\n", optarg); diff --git a/xtask/public-api/aya-build.txt b/xtask/public-api/aya-build.txt new file mode 100644 index 00000000..a5af3847 --- /dev/null +++ b/xtask/public-api/aya-build.txt @@ -0,0 +1,59 @@ +pub mod aya_build +pub enum aya_build::Toolchain<'a> +pub aya_build::Toolchain::Custom(&'a str) +pub aya_build::Toolchain::Nightly +impl<'a> core::default::Default for aya_build::Toolchain<'a> +pub fn aya_build::Toolchain<'a>::default() -> aya_build::Toolchain<'a> +impl<'a> core::marker::Freeze for aya_build::Toolchain<'a> +impl<'a> core::marker::Send for aya_build::Toolchain<'a> +impl<'a> core::marker::Sync for aya_build::Toolchain<'a> +impl<'a> core::marker::Unpin for aya_build::Toolchain<'a> +impl<'a> core::panic::unwind_safe::RefUnwindSafe for aya_build::Toolchain<'a> +impl<'a> core::panic::unwind_safe::UnwindSafe for aya_build::Toolchain<'a> +impl core::convert::Into for aya_build::Toolchain<'a> where U: core::convert::From +pub fn aya_build::Toolchain<'a>::into(self) -> U +impl core::convert::TryFrom for aya_build::Toolchain<'a> where U: core::convert::Into +pub type aya_build::Toolchain<'a>::Error = core::convert::Infallible +pub fn aya_build::Toolchain<'a>::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_build::Toolchain<'a> where U: core::convert::TryFrom +pub type aya_build::Toolchain<'a>::Error = >::Error +pub fn aya_build::Toolchain<'a>::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_build::Toolchain<'a> where T: 'static + ?core::marker::Sized +pub fn aya_build::Toolchain<'a>::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_build::Toolchain<'a> where T: ?core::marker::Sized +pub fn aya_build::Toolchain<'a>::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_build::Toolchain<'a> where T: ?core::marker::Sized +pub fn aya_build::Toolchain<'a>::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_build::Toolchain<'a> +pub fn aya_build::Toolchain<'a>::from(t: T) -> T +pub struct aya_build::Package<'a> +pub aya_build::Package::features: &'a [&'a str] +pub aya_build::Package::name: &'a str +pub aya_build::Package::no_default_features: bool +pub aya_build::Package::root_dir: &'a str +impl<'a> core::default::Default for aya_build::Package<'a> +pub fn aya_build::Package<'a>::default() -> aya_build::Package<'a> +impl<'a> core::marker::Freeze for aya_build::Package<'a> +impl<'a> core::marker::Send for aya_build::Package<'a> +impl<'a> core::marker::Sync for aya_build::Package<'a> +impl<'a> core::marker::Unpin for aya_build::Package<'a> +impl<'a> core::panic::unwind_safe::RefUnwindSafe for aya_build::Package<'a> +impl<'a> core::panic::unwind_safe::UnwindSafe for aya_build::Package<'a> +impl core::convert::Into for aya_build::Package<'a> where U: core::convert::From +pub fn aya_build::Package<'a>::into(self) -> U +impl core::convert::TryFrom for aya_build::Package<'a> where U: core::convert::Into +pub type aya_build::Package<'a>::Error = core::convert::Infallible +pub fn aya_build::Package<'a>::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_build::Package<'a> where U: core::convert::TryFrom +pub type aya_build::Package<'a>::Error = >::Error +pub fn aya_build::Package<'a>::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_build::Package<'a> where T: 'static + ?core::marker::Sized +pub fn aya_build::Package<'a>::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_build::Package<'a> where T: ?core::marker::Sized +pub fn aya_build::Package<'a>::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_build::Package<'a> where T: ?core::marker::Sized +pub fn aya_build::Package<'a>::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_build::Package<'a> +pub fn aya_build::Package<'a>::from(t: T) -> T +pub fn aya_build::build_ebpf<'a>(packages: impl core::iter::traits::collect::IntoIterator>, toolchain: aya_build::Toolchain<'a>) -> anyhow::Result<()> +pub fn aya_build::emit_bpf_target_arch_cfg() diff --git a/xtask/public-api/aya-ebpf-bindings.txt b/xtask/public-api/aya-ebpf-bindings.txt index d6350de4..7a38ec39 100644 --- a/xtask/public-api/aya-ebpf-bindings.txt +++ b/xtask/public-api/aya-ebpf-bindings.txt @@ -1,514 +1,520 @@ pub mod aya_ebpf_bindings pub mod aya_ebpf_bindings::bindings pub mod aya_ebpf_bindings::bindings::_bindgen_ty_28 -pub const aya_ebpf_bindings::bindings::_bindgen_ty_28::BPF_SKB_TSTAMP_DELIVERY_MONO: aya_ebpf_bindings::bindings::_bindgen_ty_28::Type = 1u32 -pub const aya_ebpf_bindings::bindings::_bindgen_ty_28::BPF_SKB_TSTAMP_UNSPEC: aya_ebpf_bindings::bindings::_bindgen_ty_28::Type = 0u32 +pub const aya_ebpf_bindings::bindings::_bindgen_ty_28::BPF_SKB_TSTAMP_DELIVERY_MONO: aya_ebpf_bindings::bindings::_bindgen_ty_28::Type +pub const aya_ebpf_bindings::bindings::_bindgen_ty_28::BPF_SKB_TSTAMP_UNSPEC: aya_ebpf_bindings::bindings::_bindgen_ty_28::Type pub type aya_ebpf_bindings::bindings::_bindgen_ty_28::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::_bindgen_ty_33 -pub const aya_ebpf_bindings::bindings::_bindgen_ty_33::BPF_LOAD_HDR_OPT_TCP_SYN: aya_ebpf_bindings::bindings::_bindgen_ty_33::Type = 1u32 +pub const aya_ebpf_bindings::bindings::_bindgen_ty_33::BPF_LOAD_HDR_OPT_TCP_SYN: aya_ebpf_bindings::bindings::_bindgen_ty_33::Type pub type aya_ebpf_bindings::bindings::_bindgen_ty_33::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::_bindgen_ty_34 -pub const aya_ebpf_bindings::bindings::_bindgen_ty_34::BPF_WRITE_HDR_TCP_CURRENT_MSS: aya_ebpf_bindings::bindings::_bindgen_ty_34::Type = 1u32 -pub const aya_ebpf_bindings::bindings::_bindgen_ty_34::BPF_WRITE_HDR_TCP_SYNACK_COOKIE: aya_ebpf_bindings::bindings::_bindgen_ty_34::Type = 2u32 +pub const aya_ebpf_bindings::bindings::_bindgen_ty_34::BPF_WRITE_HDR_TCP_CURRENT_MSS: aya_ebpf_bindings::bindings::_bindgen_ty_34::Type +pub const aya_ebpf_bindings::bindings::_bindgen_ty_34::BPF_WRITE_HDR_TCP_SYNACK_COOKIE: aya_ebpf_bindings::bindings::_bindgen_ty_34::Type pub type aya_ebpf_bindings::bindings::_bindgen_ty_34::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::bpf_addr_space_cast -pub const aya_ebpf_bindings::bindings::bpf_addr_space_cast::BPF_ADDR_SPACE_CAST: aya_ebpf_bindings::bindings::bpf_addr_space_cast::Type = 1u32 +pub const aya_ebpf_bindings::bindings::bpf_addr_space_cast::BPF_ADDR_SPACE_CAST: aya_ebpf_bindings::bindings::bpf_addr_space_cast::Type pub type aya_ebpf_bindings::bindings::bpf_addr_space_cast::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::bpf_adj_room_mode -pub const aya_ebpf_bindings::bindings::bpf_adj_room_mode::BPF_ADJ_ROOM_MAC: aya_ebpf_bindings::bindings::bpf_adj_room_mode::Type = 1u32 -pub const aya_ebpf_bindings::bindings::bpf_adj_room_mode::BPF_ADJ_ROOM_NET: aya_ebpf_bindings::bindings::bpf_adj_room_mode::Type = 0u32 +pub const aya_ebpf_bindings::bindings::bpf_adj_room_mode::BPF_ADJ_ROOM_MAC: aya_ebpf_bindings::bindings::bpf_adj_room_mode::Type +pub const aya_ebpf_bindings::bindings::bpf_adj_room_mode::BPF_ADJ_ROOM_NET: aya_ebpf_bindings::bindings::bpf_adj_room_mode::Type pub type aya_ebpf_bindings::bindings::bpf_adj_room_mode::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::bpf_attach_type -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_DEVICE: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 6u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_GETSOCKOPT: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 21u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET4_BIND: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 8u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET4_CONNECT: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 10u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET4_GETPEERNAME: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 29u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET4_GETSOCKNAME: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 31u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET4_POST_BIND: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 12u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET6_BIND: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 9u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET6_CONNECT: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 11u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET6_GETPEERNAME: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 30u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET6_GETSOCKNAME: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 32u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET6_POST_BIND: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 13u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET_EGRESS: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 1u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET_INGRESS: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 0u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET_SOCK_CREATE: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 2u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET_SOCK_RELEASE: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 34u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_SETSOCKOPT: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 22u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_SOCK_OPS: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 3u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_SYSCTL: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 18u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_UDP4_RECVMSG: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 19u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_UDP4_SENDMSG: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 14u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_UDP6_RECVMSG: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 20u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_UDP6_SENDMSG: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 15u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_UNIX_CONNECT: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 49u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_UNIX_GETPEERNAME: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 52u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_UNIX_GETSOCKNAME: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 53u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_UNIX_RECVMSG: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 51u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_UNIX_SENDMSG: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 50u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_FLOW_DISSECTOR: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 17u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_LIRC_MODE2: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 16u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_LSM_CGROUP: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 43u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_LSM_MAC: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 27u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_MODIFY_RETURN: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 26u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_NETFILTER: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 45u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_NETKIT_PEER: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 55u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_NETKIT_PRIMARY: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 54u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_PERF_EVENT: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 41u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_SK_LOOKUP: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 36u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_SK_MSG_VERDICT: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 7u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_SK_REUSEPORT_SELECT: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 39u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_SK_REUSEPORT_SELECT_OR_MIGRATE: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 40u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_SK_SKB_STREAM_PARSER: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 4u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_SK_SKB_STREAM_VERDICT: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 5u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_SK_SKB_VERDICT: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 38u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_STRUCT_OPS: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 44u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_TCX_EGRESS: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 47u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_TCX_INGRESS: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 46u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_TRACE_FENTRY: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 24u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_TRACE_FEXIT: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 25u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_TRACE_ITER: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 28u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_TRACE_KPROBE_MULTI: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 42u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_TRACE_RAW_TP: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 23u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_TRACE_UPROBE_MULTI: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 48u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_XDP: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 37u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_XDP_CPUMAP: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 35u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_XDP_DEVMAP: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 33u32 -pub const aya_ebpf_bindings::bindings::bpf_attach_type::__MAX_BPF_ATTACH_TYPE: aya_ebpf_bindings::bindings::bpf_attach_type::Type = 56u32 +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_DEVICE: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_GETSOCKOPT: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET4_BIND: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET4_CONNECT: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET4_GETPEERNAME: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET4_GETSOCKNAME: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET4_POST_BIND: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET6_BIND: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET6_CONNECT: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET6_GETPEERNAME: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET6_GETSOCKNAME: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET6_POST_BIND: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET_EGRESS: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET_INGRESS: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET_SOCK_CREATE: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_INET_SOCK_RELEASE: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_SETSOCKOPT: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_SOCK_OPS: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_SYSCTL: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_UDP4_RECVMSG: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_UDP4_SENDMSG: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_UDP6_RECVMSG: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_UDP6_SENDMSG: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_UNIX_CONNECT: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_UNIX_GETPEERNAME: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_UNIX_GETSOCKNAME: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_UNIX_RECVMSG: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_CGROUP_UNIX_SENDMSG: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_FLOW_DISSECTOR: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_LIRC_MODE2: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_LSM_CGROUP: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_LSM_MAC: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_MODIFY_RETURN: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_NETFILTER: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_NETKIT_PEER: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_NETKIT_PRIMARY: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_PERF_EVENT: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_SK_LOOKUP: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_SK_MSG_VERDICT: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_SK_REUSEPORT_SELECT: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_SK_REUSEPORT_SELECT_OR_MIGRATE: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_SK_SKB_STREAM_PARSER: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_SK_SKB_STREAM_VERDICT: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_SK_SKB_VERDICT: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_STRUCT_OPS: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_TCX_EGRESS: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_TCX_INGRESS: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_TRACE_FENTRY: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_TRACE_FEXIT: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_TRACE_ITER: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_TRACE_KPROBE_MULTI: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_TRACE_RAW_TP: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_TRACE_UPROBE_MULTI: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_XDP: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_XDP_CPUMAP: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::BPF_XDP_DEVMAP: aya_ebpf_bindings::bindings::bpf_attach_type::Type +pub const aya_ebpf_bindings::bindings::bpf_attach_type::__MAX_BPF_ATTACH_TYPE: aya_ebpf_bindings::bindings::bpf_attach_type::Type pub type aya_ebpf_bindings::bindings::bpf_attach_type::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::bpf_cgroup_iter_order -pub const aya_ebpf_bindings::bindings::bpf_cgroup_iter_order::BPF_CGROUP_ITER_ANCESTORS_UP: aya_ebpf_bindings::bindings::bpf_cgroup_iter_order::Type = 4u32 -pub const aya_ebpf_bindings::bindings::bpf_cgroup_iter_order::BPF_CGROUP_ITER_DESCENDANTS_POST: aya_ebpf_bindings::bindings::bpf_cgroup_iter_order::Type = 3u32 -pub const aya_ebpf_bindings::bindings::bpf_cgroup_iter_order::BPF_CGROUP_ITER_DESCENDANTS_PRE: aya_ebpf_bindings::bindings::bpf_cgroup_iter_order::Type = 2u32 -pub const aya_ebpf_bindings::bindings::bpf_cgroup_iter_order::BPF_CGROUP_ITER_ORDER_UNSPEC: aya_ebpf_bindings::bindings::bpf_cgroup_iter_order::Type = 0u32 -pub const aya_ebpf_bindings::bindings::bpf_cgroup_iter_order::BPF_CGROUP_ITER_SELF_ONLY: aya_ebpf_bindings::bindings::bpf_cgroup_iter_order::Type = 1u32 +pub const aya_ebpf_bindings::bindings::bpf_cgroup_iter_order::BPF_CGROUP_ITER_ANCESTORS_UP: aya_ebpf_bindings::bindings::bpf_cgroup_iter_order::Type +pub const aya_ebpf_bindings::bindings::bpf_cgroup_iter_order::BPF_CGROUP_ITER_DESCENDANTS_POST: aya_ebpf_bindings::bindings::bpf_cgroup_iter_order::Type +pub const aya_ebpf_bindings::bindings::bpf_cgroup_iter_order::BPF_CGROUP_ITER_DESCENDANTS_PRE: aya_ebpf_bindings::bindings::bpf_cgroup_iter_order::Type +pub const aya_ebpf_bindings::bindings::bpf_cgroup_iter_order::BPF_CGROUP_ITER_ORDER_UNSPEC: aya_ebpf_bindings::bindings::bpf_cgroup_iter_order::Type +pub const aya_ebpf_bindings::bindings::bpf_cgroup_iter_order::BPF_CGROUP_ITER_SELF_ONLY: aya_ebpf_bindings::bindings::bpf_cgroup_iter_order::Type pub type aya_ebpf_bindings::bindings::bpf_cgroup_iter_order::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::bpf_check_mtu_flags -pub const aya_ebpf_bindings::bindings::bpf_check_mtu_flags::BPF_MTU_CHK_SEGS: aya_ebpf_bindings::bindings::bpf_check_mtu_flags::Type = 1u32 +pub const aya_ebpf_bindings::bindings::bpf_check_mtu_flags::BPF_MTU_CHK_SEGS: aya_ebpf_bindings::bindings::bpf_check_mtu_flags::Type pub type aya_ebpf_bindings::bindings::bpf_check_mtu_flags::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::bpf_check_mtu_ret -pub const aya_ebpf_bindings::bindings::bpf_check_mtu_ret::BPF_MTU_CHK_RET_FRAG_NEEDED: aya_ebpf_bindings::bindings::bpf_check_mtu_ret::Type = 1u32 -pub const aya_ebpf_bindings::bindings::bpf_check_mtu_ret::BPF_MTU_CHK_RET_SEGS_TOOBIG: aya_ebpf_bindings::bindings::bpf_check_mtu_ret::Type = 2u32 -pub const aya_ebpf_bindings::bindings::bpf_check_mtu_ret::BPF_MTU_CHK_RET_SUCCESS: aya_ebpf_bindings::bindings::bpf_check_mtu_ret::Type = 0u32 +pub const aya_ebpf_bindings::bindings::bpf_check_mtu_ret::BPF_MTU_CHK_RET_FRAG_NEEDED: aya_ebpf_bindings::bindings::bpf_check_mtu_ret::Type +pub const aya_ebpf_bindings::bindings::bpf_check_mtu_ret::BPF_MTU_CHK_RET_SEGS_TOOBIG: aya_ebpf_bindings::bindings::bpf_check_mtu_ret::Type +pub const aya_ebpf_bindings::bindings::bpf_check_mtu_ret::BPF_MTU_CHK_RET_SUCCESS: aya_ebpf_bindings::bindings::bpf_check_mtu_ret::Type pub type aya_ebpf_bindings::bindings::bpf_check_mtu_ret::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::bpf_cmd -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_BTF_GET_FD_BY_ID: aya_ebpf_bindings::bindings::bpf_cmd::Type = 19u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_BTF_GET_NEXT_ID: aya_ebpf_bindings::bindings::bpf_cmd::Type = 23u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_BTF_LOAD: aya_ebpf_bindings::bindings::bpf_cmd::Type = 18u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_ENABLE_STATS: aya_ebpf_bindings::bindings::bpf_cmd::Type = 32u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_ITER_CREATE: aya_ebpf_bindings::bindings::bpf_cmd::Type = 33u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_LINK_CREATE: aya_ebpf_bindings::bindings::bpf_cmd::Type = 28u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_LINK_DETACH: aya_ebpf_bindings::bindings::bpf_cmd::Type = 34u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_LINK_GET_FD_BY_ID: aya_ebpf_bindings::bindings::bpf_cmd::Type = 30u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_LINK_GET_NEXT_ID: aya_ebpf_bindings::bindings::bpf_cmd::Type = 31u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_LINK_UPDATE: aya_ebpf_bindings::bindings::bpf_cmd::Type = 29u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_CREATE: aya_ebpf_bindings::bindings::bpf_cmd::Type = 0u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_DELETE_BATCH: aya_ebpf_bindings::bindings::bpf_cmd::Type = 27u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_DELETE_ELEM: aya_ebpf_bindings::bindings::bpf_cmd::Type = 3u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_FREEZE: aya_ebpf_bindings::bindings::bpf_cmd::Type = 22u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_GET_FD_BY_ID: aya_ebpf_bindings::bindings::bpf_cmd::Type = 14u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_GET_NEXT_ID: aya_ebpf_bindings::bindings::bpf_cmd::Type = 12u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_GET_NEXT_KEY: aya_ebpf_bindings::bindings::bpf_cmd::Type = 4u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_LOOKUP_AND_DELETE_BATCH: aya_ebpf_bindings::bindings::bpf_cmd::Type = 25u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_LOOKUP_AND_DELETE_ELEM: aya_ebpf_bindings::bindings::bpf_cmd::Type = 21u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_LOOKUP_BATCH: aya_ebpf_bindings::bindings::bpf_cmd::Type = 24u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_LOOKUP_ELEM: aya_ebpf_bindings::bindings::bpf_cmd::Type = 1u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_UPDATE_BATCH: aya_ebpf_bindings::bindings::bpf_cmd::Type = 26u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_UPDATE_ELEM: aya_ebpf_bindings::bindings::bpf_cmd::Type = 2u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_OBJ_GET: aya_ebpf_bindings::bindings::bpf_cmd::Type = 7u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_OBJ_GET_INFO_BY_FD: aya_ebpf_bindings::bindings::bpf_cmd::Type = 15u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_OBJ_PIN: aya_ebpf_bindings::bindings::bpf_cmd::Type = 6u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_PROG_ATTACH: aya_ebpf_bindings::bindings::bpf_cmd::Type = 8u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_PROG_BIND_MAP: aya_ebpf_bindings::bindings::bpf_cmd::Type = 35u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_PROG_DETACH: aya_ebpf_bindings::bindings::bpf_cmd::Type = 9u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_PROG_GET_FD_BY_ID: aya_ebpf_bindings::bindings::bpf_cmd::Type = 13u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_PROG_GET_NEXT_ID: aya_ebpf_bindings::bindings::bpf_cmd::Type = 11u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_PROG_LOAD: aya_ebpf_bindings::bindings::bpf_cmd::Type = 5u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_PROG_QUERY: aya_ebpf_bindings::bindings::bpf_cmd::Type = 16u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_PROG_RUN: aya_ebpf_bindings::bindings::bpf_cmd::Type = 10u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_PROG_TEST_RUN: aya_ebpf_bindings::bindings::bpf_cmd::Type = 10u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_RAW_TRACEPOINT_OPEN: aya_ebpf_bindings::bindings::bpf_cmd::Type = 17u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_TASK_FD_QUERY: aya_ebpf_bindings::bindings::bpf_cmd::Type = 20u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_TOKEN_CREATE: aya_ebpf_bindings::bindings::bpf_cmd::Type = 36u32 -pub const aya_ebpf_bindings::bindings::bpf_cmd::__MAX_BPF_CMD: aya_ebpf_bindings::bindings::bpf_cmd::Type = 37u32 +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_BTF_GET_FD_BY_ID: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_BTF_GET_NEXT_ID: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_BTF_LOAD: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_ENABLE_STATS: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_ITER_CREATE: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_LINK_CREATE: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_LINK_DETACH: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_LINK_GET_FD_BY_ID: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_LINK_GET_NEXT_ID: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_LINK_UPDATE: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_CREATE: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_DELETE_BATCH: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_DELETE_ELEM: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_FREEZE: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_GET_FD_BY_ID: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_GET_NEXT_ID: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_GET_NEXT_KEY: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_LOOKUP_AND_DELETE_BATCH: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_LOOKUP_AND_DELETE_ELEM: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_LOOKUP_BATCH: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_LOOKUP_ELEM: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_UPDATE_BATCH: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_MAP_UPDATE_ELEM: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_OBJ_GET: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_OBJ_GET_INFO_BY_FD: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_OBJ_PIN: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_PROG_ATTACH: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_PROG_BIND_MAP: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_PROG_DETACH: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_PROG_GET_FD_BY_ID: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_PROG_GET_NEXT_ID: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_PROG_LOAD: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_PROG_QUERY: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_PROG_RUN: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_PROG_TEST_RUN: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_RAW_TRACEPOINT_OPEN: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_TASK_FD_QUERY: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::BPF_TOKEN_CREATE: aya_ebpf_bindings::bindings::bpf_cmd::Type +pub const aya_ebpf_bindings::bindings::bpf_cmd::__MAX_BPF_CMD: aya_ebpf_bindings::bindings::bpf_cmd::Type pub type aya_ebpf_bindings::bindings::bpf_cmd::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::bpf_cond_pseudo_jmp -pub const aya_ebpf_bindings::bindings::bpf_cond_pseudo_jmp::BPF_MAY_GOTO: aya_ebpf_bindings::bindings::bpf_cond_pseudo_jmp::Type = 0u32 +pub const aya_ebpf_bindings::bindings::bpf_cond_pseudo_jmp::BPF_MAY_GOTO: aya_ebpf_bindings::bindings::bpf_cond_pseudo_jmp::Type pub type aya_ebpf_bindings::bindings::bpf_cond_pseudo_jmp::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::bpf_core_relo_kind -pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_ENUMVAL_EXISTS: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type = 10u32 -pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_ENUMVAL_VALUE: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type = 11u32 -pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_FIELD_BYTE_OFFSET: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type = 0u32 -pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_FIELD_BYTE_SIZE: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type = 1u32 -pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_FIELD_EXISTS: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type = 2u32 -pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_FIELD_LSHIFT_U64: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type = 4u32 -pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_FIELD_RSHIFT_U64: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type = 5u32 -pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_FIELD_SIGNED: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type = 3u32 -pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_TYPE_EXISTS: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type = 8u32 -pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_TYPE_ID_LOCAL: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type = 6u32 -pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_TYPE_ID_TARGET: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type = 7u32 -pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_TYPE_MATCHES: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type = 12u32 -pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_TYPE_SIZE: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type = 9u32 +pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_ENUMVAL_EXISTS: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type +pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_ENUMVAL_VALUE: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type +pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_FIELD_BYTE_OFFSET: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type +pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_FIELD_BYTE_SIZE: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type +pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_FIELD_EXISTS: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type +pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_FIELD_LSHIFT_U64: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type +pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_FIELD_RSHIFT_U64: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type +pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_FIELD_SIGNED: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type +pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_TYPE_EXISTS: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type +pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_TYPE_ID_LOCAL: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type +pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_TYPE_ID_TARGET: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type +pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_TYPE_MATCHES: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type +pub const aya_ebpf_bindings::bindings::bpf_core_relo_kind::BPF_CORE_TYPE_SIZE: aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type pub type aya_ebpf_bindings::bindings::bpf_core_relo_kind::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::bpf_func_id -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_bind: aya_ebpf_bindings::bindings::bpf_func_id::Type = 64u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_bprm_opts_set: aya_ebpf_bindings::bindings::bpf_func_id::Type = 159u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_btf_find_by_name_kind: aya_ebpf_bindings::bindings::bpf_func_id::Type = 167u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_cgrp_storage_delete: aya_ebpf_bindings::bindings::bpf_func_id::Type = 211u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_cgrp_storage_get: aya_ebpf_bindings::bindings::bpf_func_id::Type = 210u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_check_mtu: aya_ebpf_bindings::bindings::bpf_func_id::Type = 163u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_clone_redirect: aya_ebpf_bindings::bindings::bpf_func_id::Type = 13u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_copy_from_user: aya_ebpf_bindings::bindings::bpf_func_id::Type = 148u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_copy_from_user_task: aya_ebpf_bindings::bindings::bpf_func_id::Type = 191u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_csum_diff: aya_ebpf_bindings::bindings::bpf_func_id::Type = 28u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_csum_level: aya_ebpf_bindings::bindings::bpf_func_id::Type = 135u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_csum_update: aya_ebpf_bindings::bindings::bpf_func_id::Type = 40u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_current_task_under_cgroup: aya_ebpf_bindings::bindings::bpf_func_id::Type = 37u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_d_path: aya_ebpf_bindings::bindings::bpf_func_id::Type = 147u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_dynptr_data: aya_ebpf_bindings::bindings::bpf_func_id::Type = 203u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_dynptr_from_mem: aya_ebpf_bindings::bindings::bpf_func_id::Type = 197u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_dynptr_read: aya_ebpf_bindings::bindings::bpf_func_id::Type = 201u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_dynptr_write: aya_ebpf_bindings::bindings::bpf_func_id::Type = 202u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_fib_lookup: aya_ebpf_bindings::bindings::bpf_func_id::Type = 69u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_find_vma: aya_ebpf_bindings::bindings::bpf_func_id::Type = 180u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_for_each_map_elem: aya_ebpf_bindings::bindings::bpf_func_id::Type = 164u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_attach_cookie: aya_ebpf_bindings::bindings::bpf_func_id::Type = 174u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_branch_snapshot: aya_ebpf_bindings::bindings::bpf_func_id::Type = 176u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_cgroup_classid: aya_ebpf_bindings::bindings::bpf_func_id::Type = 17u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_current_ancestor_cgroup_id: aya_ebpf_bindings::bindings::bpf_func_id::Type = 123u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_current_cgroup_id: aya_ebpf_bindings::bindings::bpf_func_id::Type = 80u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_current_comm: aya_ebpf_bindings::bindings::bpf_func_id::Type = 16u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_current_pid_tgid: aya_ebpf_bindings::bindings::bpf_func_id::Type = 14u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_current_task: aya_ebpf_bindings::bindings::bpf_func_id::Type = 35u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_current_task_btf: aya_ebpf_bindings::bindings::bpf_func_id::Type = 158u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_current_uid_gid: aya_ebpf_bindings::bindings::bpf_func_id::Type = 15u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_func_arg: aya_ebpf_bindings::bindings::bpf_func_id::Type = 183u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_func_arg_cnt: aya_ebpf_bindings::bindings::bpf_func_id::Type = 185u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_func_ip: aya_ebpf_bindings::bindings::bpf_func_id::Type = 173u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_func_ret: aya_ebpf_bindings::bindings::bpf_func_id::Type = 184u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_hash_recalc: aya_ebpf_bindings::bindings::bpf_func_id::Type = 34u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_listener_sock: aya_ebpf_bindings::bindings::bpf_func_id::Type = 98u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_local_storage: aya_ebpf_bindings::bindings::bpf_func_id::Type = 81u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_netns_cookie: aya_ebpf_bindings::bindings::bpf_func_id::Type = 122u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_ns_current_pid_tgid: aya_ebpf_bindings::bindings::bpf_func_id::Type = 120u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_numa_node_id: aya_ebpf_bindings::bindings::bpf_func_id::Type = 42u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_prandom_u32: aya_ebpf_bindings::bindings::bpf_func_id::Type = 7u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_retval: aya_ebpf_bindings::bindings::bpf_func_id::Type = 186u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_route_realm: aya_ebpf_bindings::bindings::bpf_func_id::Type = 24u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_smp_processor_id: aya_ebpf_bindings::bindings::bpf_func_id::Type = 8u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_socket_cookie: aya_ebpf_bindings::bindings::bpf_func_id::Type = 46u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_socket_uid: aya_ebpf_bindings::bindings::bpf_func_id::Type = 47u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_stack: aya_ebpf_bindings::bindings::bpf_func_id::Type = 67u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_stackid: aya_ebpf_bindings::bindings::bpf_func_id::Type = 27u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_task_stack: aya_ebpf_bindings::bindings::bpf_func_id::Type = 141u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_getsockopt: aya_ebpf_bindings::bindings::bpf_func_id::Type = 57u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ima_file_hash: aya_ebpf_bindings::bindings::bpf_func_id::Type = 193u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ima_inode_hash: aya_ebpf_bindings::bindings::bpf_func_id::Type = 161u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_inode_storage_delete: aya_ebpf_bindings::bindings::bpf_func_id::Type = 146u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_inode_storage_get: aya_ebpf_bindings::bindings::bpf_func_id::Type = 145u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_jiffies64: aya_ebpf_bindings::bindings::bpf_func_id::Type = 118u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_kallsyms_lookup_name: aya_ebpf_bindings::bindings::bpf_func_id::Type = 179u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_kptr_xchg: aya_ebpf_bindings::bindings::bpf_func_id::Type = 194u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ktime_get_boot_ns: aya_ebpf_bindings::bindings::bpf_func_id::Type = 125u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ktime_get_coarse_ns: aya_ebpf_bindings::bindings::bpf_func_id::Type = 160u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ktime_get_ns: aya_ebpf_bindings::bindings::bpf_func_id::Type = 5u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ktime_get_tai_ns: aya_ebpf_bindings::bindings::bpf_func_id::Type = 208u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_l3_csum_replace: aya_ebpf_bindings::bindings::bpf_func_id::Type = 10u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_l4_csum_replace: aya_ebpf_bindings::bindings::bpf_func_id::Type = 11u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_load_hdr_opt: aya_ebpf_bindings::bindings::bpf_func_id::Type = 142u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_loop: aya_ebpf_bindings::bindings::bpf_func_id::Type = 181u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_lwt_push_encap: aya_ebpf_bindings::bindings::bpf_func_id::Type = 73u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_lwt_seg6_action: aya_ebpf_bindings::bindings::bpf_func_id::Type = 76u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_lwt_seg6_adjust_srh: aya_ebpf_bindings::bindings::bpf_func_id::Type = 75u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_lwt_seg6_store_bytes: aya_ebpf_bindings::bindings::bpf_func_id::Type = 74u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_map_delete_elem: aya_ebpf_bindings::bindings::bpf_func_id::Type = 3u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_map_lookup_elem: aya_ebpf_bindings::bindings::bpf_func_id::Type = 1u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_map_lookup_percpu_elem: aya_ebpf_bindings::bindings::bpf_func_id::Type = 195u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_map_peek_elem: aya_ebpf_bindings::bindings::bpf_func_id::Type = 89u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_map_pop_elem: aya_ebpf_bindings::bindings::bpf_func_id::Type = 88u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_map_push_elem: aya_ebpf_bindings::bindings::bpf_func_id::Type = 87u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_map_update_elem: aya_ebpf_bindings::bindings::bpf_func_id::Type = 2u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_msg_apply_bytes: aya_ebpf_bindings::bindings::bpf_func_id::Type = 61u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_msg_cork_bytes: aya_ebpf_bindings::bindings::bpf_func_id::Type = 62u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_msg_pop_data: aya_ebpf_bindings::bindings::bpf_func_id::Type = 91u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_msg_pull_data: aya_ebpf_bindings::bindings::bpf_func_id::Type = 63u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_msg_push_data: aya_ebpf_bindings::bindings::bpf_func_id::Type = 90u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_msg_redirect_hash: aya_ebpf_bindings::bindings::bpf_func_id::Type = 71u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_msg_redirect_map: aya_ebpf_bindings::bindings::bpf_func_id::Type = 60u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_override_return: aya_ebpf_bindings::bindings::bpf_func_id::Type = 58u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_per_cpu_ptr: aya_ebpf_bindings::bindings::bpf_func_id::Type = 153u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_perf_event_output: aya_ebpf_bindings::bindings::bpf_func_id::Type = 25u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_perf_event_read: aya_ebpf_bindings::bindings::bpf_func_id::Type = 22u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_perf_event_read_value: aya_ebpf_bindings::bindings::bpf_func_id::Type = 55u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_perf_prog_read_value: aya_ebpf_bindings::bindings::bpf_func_id::Type = 56u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_probe_read: aya_ebpf_bindings::bindings::bpf_func_id::Type = 4u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_probe_read_kernel: aya_ebpf_bindings::bindings::bpf_func_id::Type = 113u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_probe_read_kernel_str: aya_ebpf_bindings::bindings::bpf_func_id::Type = 115u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_probe_read_str: aya_ebpf_bindings::bindings::bpf_func_id::Type = 45u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_probe_read_user: aya_ebpf_bindings::bindings::bpf_func_id::Type = 112u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_probe_read_user_str: aya_ebpf_bindings::bindings::bpf_func_id::Type = 114u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_probe_write_user: aya_ebpf_bindings::bindings::bpf_func_id::Type = 36u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_rc_keydown: aya_ebpf_bindings::bindings::bpf_func_id::Type = 78u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_rc_pointer_rel: aya_ebpf_bindings::bindings::bpf_func_id::Type = 92u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_rc_repeat: aya_ebpf_bindings::bindings::bpf_func_id::Type = 77u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_read_branch_records: aya_ebpf_bindings::bindings::bpf_func_id::Type = 119u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_redirect: aya_ebpf_bindings::bindings::bpf_func_id::Type = 23u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_redirect_map: aya_ebpf_bindings::bindings::bpf_func_id::Type = 51u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_redirect_neigh: aya_ebpf_bindings::bindings::bpf_func_id::Type = 152u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_redirect_peer: aya_ebpf_bindings::bindings::bpf_func_id::Type = 155u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_reserve_hdr_opt: aya_ebpf_bindings::bindings::bpf_func_id::Type = 144u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ringbuf_discard: aya_ebpf_bindings::bindings::bpf_func_id::Type = 133u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ringbuf_discard_dynptr: aya_ebpf_bindings::bindings::bpf_func_id::Type = 200u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ringbuf_output: aya_ebpf_bindings::bindings::bpf_func_id::Type = 130u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ringbuf_query: aya_ebpf_bindings::bindings::bpf_func_id::Type = 134u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ringbuf_reserve: aya_ebpf_bindings::bindings::bpf_func_id::Type = 131u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ringbuf_reserve_dynptr: aya_ebpf_bindings::bindings::bpf_func_id::Type = 198u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ringbuf_submit: aya_ebpf_bindings::bindings::bpf_func_id::Type = 132u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ringbuf_submit_dynptr: aya_ebpf_bindings::bindings::bpf_func_id::Type = 199u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_send_signal: aya_ebpf_bindings::bindings::bpf_func_id::Type = 109u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_send_signal_thread: aya_ebpf_bindings::bindings::bpf_func_id::Type = 117u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_seq_printf: aya_ebpf_bindings::bindings::bpf_func_id::Type = 126u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_seq_printf_btf: aya_ebpf_bindings::bindings::bpf_func_id::Type = 150u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_seq_write: aya_ebpf_bindings::bindings::bpf_func_id::Type = 127u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_set_hash: aya_ebpf_bindings::bindings::bpf_func_id::Type = 48u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_set_hash_invalid: aya_ebpf_bindings::bindings::bpf_func_id::Type = 41u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_set_retval: aya_ebpf_bindings::bindings::bpf_func_id::Type = 187u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_setsockopt: aya_ebpf_bindings::bindings::bpf_func_id::Type = 49u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_ancestor_cgroup_id: aya_ebpf_bindings::bindings::bpf_func_id::Type = 129u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_assign: aya_ebpf_bindings::bindings::bpf_func_id::Type = 124u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_cgroup_id: aya_ebpf_bindings::bindings::bpf_func_id::Type = 128u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_fullsock: aya_ebpf_bindings::bindings::bpf_func_id::Type = 95u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_lookup_tcp: aya_ebpf_bindings::bindings::bpf_func_id::Type = 84u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_lookup_udp: aya_ebpf_bindings::bindings::bpf_func_id::Type = 85u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_redirect_hash: aya_ebpf_bindings::bindings::bpf_func_id::Type = 72u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_redirect_map: aya_ebpf_bindings::bindings::bpf_func_id::Type = 52u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_release: aya_ebpf_bindings::bindings::bpf_func_id::Type = 86u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_select_reuseport: aya_ebpf_bindings::bindings::bpf_func_id::Type = 82u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_storage_delete: aya_ebpf_bindings::bindings::bpf_func_id::Type = 108u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_storage_get: aya_ebpf_bindings::bindings::bpf_func_id::Type = 107u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_adjust_room: aya_ebpf_bindings::bindings::bpf_func_id::Type = 50u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_ancestor_cgroup_id: aya_ebpf_bindings::bindings::bpf_func_id::Type = 83u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_cgroup_classid: aya_ebpf_bindings::bindings::bpf_func_id::Type = 151u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_cgroup_id: aya_ebpf_bindings::bindings::bpf_func_id::Type = 79u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_change_head: aya_ebpf_bindings::bindings::bpf_func_id::Type = 43u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_change_proto: aya_ebpf_bindings::bindings::bpf_func_id::Type = 31u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_change_tail: aya_ebpf_bindings::bindings::bpf_func_id::Type = 38u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_change_type: aya_ebpf_bindings::bindings::bpf_func_id::Type = 32u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_ecn_set_ce: aya_ebpf_bindings::bindings::bpf_func_id::Type = 97u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_get_tunnel_key: aya_ebpf_bindings::bindings::bpf_func_id::Type = 20u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_get_tunnel_opt: aya_ebpf_bindings::bindings::bpf_func_id::Type = 29u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_get_xfrm_state: aya_ebpf_bindings::bindings::bpf_func_id::Type = 66u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_load_bytes: aya_ebpf_bindings::bindings::bpf_func_id::Type = 26u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_load_bytes_relative: aya_ebpf_bindings::bindings::bpf_func_id::Type = 68u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_output: aya_ebpf_bindings::bindings::bpf_func_id::Type = 111u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_pull_data: aya_ebpf_bindings::bindings::bpf_func_id::Type = 39u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_set_tstamp: aya_ebpf_bindings::bindings::bpf_func_id::Type = 192u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_set_tunnel_key: aya_ebpf_bindings::bindings::bpf_func_id::Type = 21u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_set_tunnel_opt: aya_ebpf_bindings::bindings::bpf_func_id::Type = 30u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_store_bytes: aya_ebpf_bindings::bindings::bpf_func_id::Type = 9u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_under_cgroup: aya_ebpf_bindings::bindings::bpf_func_id::Type = 33u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_vlan_pop: aya_ebpf_bindings::bindings::bpf_func_id::Type = 19u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_vlan_push: aya_ebpf_bindings::bindings::bpf_func_id::Type = 18u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skc_lookup_tcp: aya_ebpf_bindings::bindings::bpf_func_id::Type = 99u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skc_to_mptcp_sock: aya_ebpf_bindings::bindings::bpf_func_id::Type = 196u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skc_to_tcp6_sock: aya_ebpf_bindings::bindings::bpf_func_id::Type = 136u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skc_to_tcp_request_sock: aya_ebpf_bindings::bindings::bpf_func_id::Type = 139u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skc_to_tcp_sock: aya_ebpf_bindings::bindings::bpf_func_id::Type = 137u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skc_to_tcp_timewait_sock: aya_ebpf_bindings::bindings::bpf_func_id::Type = 138u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skc_to_udp6_sock: aya_ebpf_bindings::bindings::bpf_func_id::Type = 140u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skc_to_unix_sock: aya_ebpf_bindings::bindings::bpf_func_id::Type = 178u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_snprintf: aya_ebpf_bindings::bindings::bpf_func_id::Type = 165u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_snprintf_btf: aya_ebpf_bindings::bindings::bpf_func_id::Type = 149u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sock_from_file: aya_ebpf_bindings::bindings::bpf_func_id::Type = 162u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sock_hash_update: aya_ebpf_bindings::bindings::bpf_func_id::Type = 70u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sock_map_update: aya_ebpf_bindings::bindings::bpf_func_id::Type = 53u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sock_ops_cb_flags_set: aya_ebpf_bindings::bindings::bpf_func_id::Type = 59u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_spin_lock: aya_ebpf_bindings::bindings::bpf_func_id::Type = 93u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_spin_unlock: aya_ebpf_bindings::bindings::bpf_func_id::Type = 94u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_store_hdr_opt: aya_ebpf_bindings::bindings::bpf_func_id::Type = 143u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_strncmp: aya_ebpf_bindings::bindings::bpf_func_id::Type = 182u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_strtol: aya_ebpf_bindings::bindings::bpf_func_id::Type = 105u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_strtoul: aya_ebpf_bindings::bindings::bpf_func_id::Type = 106u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sys_bpf: aya_ebpf_bindings::bindings::bpf_func_id::Type = 166u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sys_close: aya_ebpf_bindings::bindings::bpf_func_id::Type = 168u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sysctl_get_current_value: aya_ebpf_bindings::bindings::bpf_func_id::Type = 102u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sysctl_get_name: aya_ebpf_bindings::bindings::bpf_func_id::Type = 101u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sysctl_get_new_value: aya_ebpf_bindings::bindings::bpf_func_id::Type = 103u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sysctl_set_new_value: aya_ebpf_bindings::bindings::bpf_func_id::Type = 104u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_tail_call: aya_ebpf_bindings::bindings::bpf_func_id::Type = 12u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_task_pt_regs: aya_ebpf_bindings::bindings::bpf_func_id::Type = 175u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_task_storage_delete: aya_ebpf_bindings::bindings::bpf_func_id::Type = 157u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_task_storage_get: aya_ebpf_bindings::bindings::bpf_func_id::Type = 156u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_tcp_check_syncookie: aya_ebpf_bindings::bindings::bpf_func_id::Type = 100u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_tcp_gen_syncookie: aya_ebpf_bindings::bindings::bpf_func_id::Type = 110u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_tcp_raw_check_syncookie_ipv4: aya_ebpf_bindings::bindings::bpf_func_id::Type = 206u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_tcp_raw_check_syncookie_ipv6: aya_ebpf_bindings::bindings::bpf_func_id::Type = 207u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_tcp_raw_gen_syncookie_ipv4: aya_ebpf_bindings::bindings::bpf_func_id::Type = 204u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_tcp_raw_gen_syncookie_ipv6: aya_ebpf_bindings::bindings::bpf_func_id::Type = 205u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_tcp_send_ack: aya_ebpf_bindings::bindings::bpf_func_id::Type = 116u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_tcp_sock: aya_ebpf_bindings::bindings::bpf_func_id::Type = 96u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_this_cpu_ptr: aya_ebpf_bindings::bindings::bpf_func_id::Type = 154u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_timer_cancel: aya_ebpf_bindings::bindings::bpf_func_id::Type = 172u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_timer_init: aya_ebpf_bindings::bindings::bpf_func_id::Type = 169u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_timer_set_callback: aya_ebpf_bindings::bindings::bpf_func_id::Type = 170u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_timer_start: aya_ebpf_bindings::bindings::bpf_func_id::Type = 171u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_trace_printk: aya_ebpf_bindings::bindings::bpf_func_id::Type = 6u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_trace_vprintk: aya_ebpf_bindings::bindings::bpf_func_id::Type = 177u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_unspec: aya_ebpf_bindings::bindings::bpf_func_id::Type = 0u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_user_ringbuf_drain: aya_ebpf_bindings::bindings::bpf_func_id::Type = 209u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_xdp_adjust_head: aya_ebpf_bindings::bindings::bpf_func_id::Type = 44u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_xdp_adjust_meta: aya_ebpf_bindings::bindings::bpf_func_id::Type = 54u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_xdp_adjust_tail: aya_ebpf_bindings::bindings::bpf_func_id::Type = 65u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_xdp_get_buff_len: aya_ebpf_bindings::bindings::bpf_func_id::Type = 188u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_xdp_load_bytes: aya_ebpf_bindings::bindings::bpf_func_id::Type = 189u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_xdp_output: aya_ebpf_bindings::bindings::bpf_func_id::Type = 121u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_xdp_store_bytes: aya_ebpf_bindings::bindings::bpf_func_id::Type = 190u32 -pub const aya_ebpf_bindings::bindings::bpf_func_id::__BPF_FUNC_MAX_ID: aya_ebpf_bindings::bindings::bpf_func_id::Type = 212u32 +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_bind: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_bprm_opts_set: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_btf_find_by_name_kind: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_cgrp_storage_delete: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_cgrp_storage_get: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_check_mtu: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_clone_redirect: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_copy_from_user: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_copy_from_user_task: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_csum_diff: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_csum_level: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_csum_update: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_current_task_under_cgroup: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_d_path: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_dynptr_data: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_dynptr_from_mem: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_dynptr_read: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_dynptr_write: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_fib_lookup: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_find_vma: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_for_each_map_elem: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_attach_cookie: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_branch_snapshot: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_cgroup_classid: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_current_ancestor_cgroup_id: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_current_cgroup_id: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_current_comm: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_current_pid_tgid: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_current_task: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_current_task_btf: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_current_uid_gid: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_func_arg: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_func_arg_cnt: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_func_ip: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_func_ret: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_hash_recalc: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_listener_sock: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_local_storage: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_netns_cookie: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_ns_current_pid_tgid: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_numa_node_id: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_prandom_u32: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_retval: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_route_realm: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_smp_processor_id: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_socket_cookie: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_socket_uid: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_stack: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_stackid: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_get_task_stack: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_getsockopt: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ima_file_hash: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ima_inode_hash: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_inode_storage_delete: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_inode_storage_get: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_jiffies64: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_kallsyms_lookup_name: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_kptr_xchg: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ktime_get_boot_ns: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ktime_get_coarse_ns: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ktime_get_ns: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ktime_get_tai_ns: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_l3_csum_replace: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_l4_csum_replace: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_load_hdr_opt: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_loop: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_lwt_push_encap: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_lwt_seg6_action: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_lwt_seg6_adjust_srh: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_lwt_seg6_store_bytes: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_map_delete_elem: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_map_lookup_elem: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_map_lookup_percpu_elem: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_map_peek_elem: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_map_pop_elem: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_map_push_elem: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_map_update_elem: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_msg_apply_bytes: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_msg_cork_bytes: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_msg_pop_data: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_msg_pull_data: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_msg_push_data: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_msg_redirect_hash: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_msg_redirect_map: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_override_return: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_per_cpu_ptr: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_perf_event_output: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_perf_event_read: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_perf_event_read_value: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_perf_prog_read_value: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_probe_read: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_probe_read_kernel: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_probe_read_kernel_str: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_probe_read_str: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_probe_read_user: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_probe_read_user_str: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_probe_write_user: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_rc_keydown: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_rc_pointer_rel: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_rc_repeat: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_read_branch_records: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_redirect: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_redirect_map: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_redirect_neigh: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_redirect_peer: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_reserve_hdr_opt: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ringbuf_discard: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ringbuf_discard_dynptr: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ringbuf_output: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ringbuf_query: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ringbuf_reserve: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ringbuf_reserve_dynptr: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ringbuf_submit: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_ringbuf_submit_dynptr: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_send_signal: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_send_signal_thread: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_seq_printf: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_seq_printf_btf: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_seq_write: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_set_hash: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_set_hash_invalid: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_set_retval: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_setsockopt: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_ancestor_cgroup_id: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_assign: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_cgroup_id: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_fullsock: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_lookup_tcp: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_lookup_udp: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_redirect_hash: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_redirect_map: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_release: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_select_reuseport: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_storage_delete: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sk_storage_get: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_adjust_room: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_ancestor_cgroup_id: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_cgroup_classid: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_cgroup_id: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_change_head: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_change_proto: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_change_tail: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_change_type: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_ecn_set_ce: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_get_tunnel_key: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_get_tunnel_opt: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_get_xfrm_state: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_load_bytes: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_load_bytes_relative: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_output: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_pull_data: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_set_tstamp: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_set_tunnel_key: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_set_tunnel_opt: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_store_bytes: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_under_cgroup: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_vlan_pop: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skb_vlan_push: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skc_lookup_tcp: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skc_to_mptcp_sock: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skc_to_tcp6_sock: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skc_to_tcp_request_sock: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skc_to_tcp_sock: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skc_to_tcp_timewait_sock: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skc_to_udp6_sock: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_skc_to_unix_sock: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_snprintf: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_snprintf_btf: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sock_from_file: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sock_hash_update: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sock_map_update: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sock_ops_cb_flags_set: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_spin_lock: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_spin_unlock: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_store_hdr_opt: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_strncmp: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_strtol: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_strtoul: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sys_bpf: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sys_close: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sysctl_get_current_value: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sysctl_get_name: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sysctl_get_new_value: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_sysctl_set_new_value: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_tail_call: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_task_pt_regs: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_task_storage_delete: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_task_storage_get: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_tcp_check_syncookie: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_tcp_gen_syncookie: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_tcp_raw_check_syncookie_ipv4: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_tcp_raw_check_syncookie_ipv6: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_tcp_raw_gen_syncookie_ipv4: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_tcp_raw_gen_syncookie_ipv6: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_tcp_send_ack: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_tcp_sock: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_this_cpu_ptr: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_timer_cancel: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_timer_init: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_timer_set_callback: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_timer_start: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_trace_printk: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_trace_vprintk: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_unspec: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_user_ringbuf_drain: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_xdp_adjust_head: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_xdp_adjust_meta: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_xdp_adjust_tail: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_xdp_get_buff_len: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_xdp_load_bytes: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_xdp_output: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::BPF_FUNC_xdp_store_bytes: aya_ebpf_bindings::bindings::bpf_func_id::Type +pub const aya_ebpf_bindings::bindings::bpf_func_id::__BPF_FUNC_MAX_ID: aya_ebpf_bindings::bindings::bpf_func_id::Type pub type aya_ebpf_bindings::bindings::bpf_func_id::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::bpf_hdr_start_off -pub const aya_ebpf_bindings::bindings::bpf_hdr_start_off::BPF_HDR_START_MAC: aya_ebpf_bindings::bindings::bpf_hdr_start_off::Type = 0u32 -pub const aya_ebpf_bindings::bindings::bpf_hdr_start_off::BPF_HDR_START_NET: aya_ebpf_bindings::bindings::bpf_hdr_start_off::Type = 1u32 +pub const aya_ebpf_bindings::bindings::bpf_hdr_start_off::BPF_HDR_START_MAC: aya_ebpf_bindings::bindings::bpf_hdr_start_off::Type +pub const aya_ebpf_bindings::bindings::bpf_hdr_start_off::BPF_HDR_START_NET: aya_ebpf_bindings::bindings::bpf_hdr_start_off::Type pub type aya_ebpf_bindings::bindings::bpf_hdr_start_off::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::bpf_link_type -pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_CGROUP: aya_ebpf_bindings::bindings::bpf_link_type::Type = 3u32 -pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_ITER: aya_ebpf_bindings::bindings::bpf_link_type::Type = 4u32 -pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_KPROBE_MULTI: aya_ebpf_bindings::bindings::bpf_link_type::Type = 8u32 -pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_NETFILTER: aya_ebpf_bindings::bindings::bpf_link_type::Type = 10u32 -pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_NETKIT: aya_ebpf_bindings::bindings::bpf_link_type::Type = 13u32 -pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_NETNS: aya_ebpf_bindings::bindings::bpf_link_type::Type = 5u32 -pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_PERF_EVENT: aya_ebpf_bindings::bindings::bpf_link_type::Type = 7u32 -pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_RAW_TRACEPOINT: aya_ebpf_bindings::bindings::bpf_link_type::Type = 1u32 -pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_STRUCT_OPS: aya_ebpf_bindings::bindings::bpf_link_type::Type = 9u32 -pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_TCX: aya_ebpf_bindings::bindings::bpf_link_type::Type = 11u32 -pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_TRACING: aya_ebpf_bindings::bindings::bpf_link_type::Type = 2u32 -pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_UNSPEC: aya_ebpf_bindings::bindings::bpf_link_type::Type = 0u32 -pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_UPROBE_MULTI: aya_ebpf_bindings::bindings::bpf_link_type::Type = 12u32 -pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_XDP: aya_ebpf_bindings::bindings::bpf_link_type::Type = 6u32 -pub const aya_ebpf_bindings::bindings::bpf_link_type::__MAX_BPF_LINK_TYPE: aya_ebpf_bindings::bindings::bpf_link_type::Type = 14u32 +pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_CGROUP: aya_ebpf_bindings::bindings::bpf_link_type::Type +pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_ITER: aya_ebpf_bindings::bindings::bpf_link_type::Type +pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_KPROBE_MULTI: aya_ebpf_bindings::bindings::bpf_link_type::Type +pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_NETFILTER: aya_ebpf_bindings::bindings::bpf_link_type::Type +pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_NETKIT: aya_ebpf_bindings::bindings::bpf_link_type::Type +pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_NETNS: aya_ebpf_bindings::bindings::bpf_link_type::Type +pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_PERF_EVENT: aya_ebpf_bindings::bindings::bpf_link_type::Type +pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_RAW_TRACEPOINT: aya_ebpf_bindings::bindings::bpf_link_type::Type +pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_STRUCT_OPS: aya_ebpf_bindings::bindings::bpf_link_type::Type +pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_TCX: aya_ebpf_bindings::bindings::bpf_link_type::Type +pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_TRACING: aya_ebpf_bindings::bindings::bpf_link_type::Type +pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_UNSPEC: aya_ebpf_bindings::bindings::bpf_link_type::Type +pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_UPROBE_MULTI: aya_ebpf_bindings::bindings::bpf_link_type::Type +pub const aya_ebpf_bindings::bindings::bpf_link_type::BPF_LINK_TYPE_XDP: aya_ebpf_bindings::bindings::bpf_link_type::Type +pub const aya_ebpf_bindings::bindings::bpf_link_type::__MAX_BPF_LINK_TYPE: aya_ebpf_bindings::bindings::bpf_link_type::Type pub type aya_ebpf_bindings::bindings::bpf_link_type::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::bpf_lwt_encap_mode -pub const aya_ebpf_bindings::bindings::bpf_lwt_encap_mode::BPF_LWT_ENCAP_IP: aya_ebpf_bindings::bindings::bpf_lwt_encap_mode::Type = 2u32 -pub const aya_ebpf_bindings::bindings::bpf_lwt_encap_mode::BPF_LWT_ENCAP_SEG6: aya_ebpf_bindings::bindings::bpf_lwt_encap_mode::Type = 0u32 -pub const aya_ebpf_bindings::bindings::bpf_lwt_encap_mode::BPF_LWT_ENCAP_SEG6_INLINE: aya_ebpf_bindings::bindings::bpf_lwt_encap_mode::Type = 1u32 +pub const aya_ebpf_bindings::bindings::bpf_lwt_encap_mode::BPF_LWT_ENCAP_IP: aya_ebpf_bindings::bindings::bpf_lwt_encap_mode::Type +pub const aya_ebpf_bindings::bindings::bpf_lwt_encap_mode::BPF_LWT_ENCAP_SEG6: aya_ebpf_bindings::bindings::bpf_lwt_encap_mode::Type +pub const aya_ebpf_bindings::bindings::bpf_lwt_encap_mode::BPF_LWT_ENCAP_SEG6_INLINE: aya_ebpf_bindings::bindings::bpf_lwt_encap_mode::Type pub type aya_ebpf_bindings::bindings::bpf_lwt_encap_mode::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::bpf_map_type -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_ARENA: aya_ebpf_bindings::bindings::bpf_map_type::Type = 33u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_ARRAY: aya_ebpf_bindings::bindings::bpf_map_type::Type = 2u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_ARRAY_OF_MAPS: aya_ebpf_bindings::bindings::bpf_map_type::Type = 12u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_BLOOM_FILTER: aya_ebpf_bindings::bindings::bpf_map_type::Type = 30u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_CGROUP_ARRAY: aya_ebpf_bindings::bindings::bpf_map_type::Type = 8u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_CGROUP_STORAGE: aya_ebpf_bindings::bindings::bpf_map_type::Type = 19u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED: aya_ebpf_bindings::bindings::bpf_map_type::Type = 19u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_CGRP_STORAGE: aya_ebpf_bindings::bindings::bpf_map_type::Type = 32u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_CPUMAP: aya_ebpf_bindings::bindings::bpf_map_type::Type = 16u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_DEVMAP: aya_ebpf_bindings::bindings::bpf_map_type::Type = 14u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_DEVMAP_HASH: aya_ebpf_bindings::bindings::bpf_map_type::Type = 25u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_HASH: aya_ebpf_bindings::bindings::bpf_map_type::Type = 1u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_HASH_OF_MAPS: aya_ebpf_bindings::bindings::bpf_map_type::Type = 13u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_INODE_STORAGE: aya_ebpf_bindings::bindings::bpf_map_type::Type = 28u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_LPM_TRIE: aya_ebpf_bindings::bindings::bpf_map_type::Type = 11u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_LRU_HASH: aya_ebpf_bindings::bindings::bpf_map_type::Type = 9u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_LRU_PERCPU_HASH: aya_ebpf_bindings::bindings::bpf_map_type::Type = 10u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_PERCPU_ARRAY: aya_ebpf_bindings::bindings::bpf_map_type::Type = 6u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE: aya_ebpf_bindings::bindings::bpf_map_type::Type = 21u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED: aya_ebpf_bindings::bindings::bpf_map_type::Type = 21u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_PERCPU_HASH: aya_ebpf_bindings::bindings::bpf_map_type::Type = 5u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_PERF_EVENT_ARRAY: aya_ebpf_bindings::bindings::bpf_map_type::Type = 4u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_PROG_ARRAY: aya_ebpf_bindings::bindings::bpf_map_type::Type = 3u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_QUEUE: aya_ebpf_bindings::bindings::bpf_map_type::Type = 22u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_REUSEPORT_SOCKARRAY: aya_ebpf_bindings::bindings::bpf_map_type::Type = 20u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_RINGBUF: aya_ebpf_bindings::bindings::bpf_map_type::Type = 27u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_SK_STORAGE: aya_ebpf_bindings::bindings::bpf_map_type::Type = 24u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_SOCKHASH: aya_ebpf_bindings::bindings::bpf_map_type::Type = 18u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_SOCKMAP: aya_ebpf_bindings::bindings::bpf_map_type::Type = 15u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_STACK: aya_ebpf_bindings::bindings::bpf_map_type::Type = 23u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_STACK_TRACE: aya_ebpf_bindings::bindings::bpf_map_type::Type = 7u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_STRUCT_OPS: aya_ebpf_bindings::bindings::bpf_map_type::Type = 26u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_TASK_STORAGE: aya_ebpf_bindings::bindings::bpf_map_type::Type = 29u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_UNSPEC: aya_ebpf_bindings::bindings::bpf_map_type::Type = 0u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_USER_RINGBUF: aya_ebpf_bindings::bindings::bpf_map_type::Type = 31u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_XSKMAP: aya_ebpf_bindings::bindings::bpf_map_type::Type = 17u32 -pub const aya_ebpf_bindings::bindings::bpf_map_type::__MAX_BPF_MAP_TYPE: aya_ebpf_bindings::bindings::bpf_map_type::Type = 34u32 +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_ARENA: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_ARRAY: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_ARRAY_OF_MAPS: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_BLOOM_FILTER: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_CGROUP_ARRAY: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_CGROUP_STORAGE: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_CGRP_STORAGE: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_CPUMAP: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_DEVMAP: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_DEVMAP_HASH: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_HASH: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_HASH_OF_MAPS: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_INODE_STORAGE: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_LPM_TRIE: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_LRU_HASH: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_LRU_PERCPU_HASH: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_PERCPU_ARRAY: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_PERCPU_HASH: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_PERF_EVENT_ARRAY: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_PROG_ARRAY: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_QUEUE: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_REUSEPORT_SOCKARRAY: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_RINGBUF: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_SK_STORAGE: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_SOCKHASH: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_SOCKMAP: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_STACK: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_STACK_TRACE: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_STRUCT_OPS: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_TASK_STORAGE: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_UNSPEC: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_USER_RINGBUF: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_XSKMAP: aya_ebpf_bindings::bindings::bpf_map_type::Type +pub const aya_ebpf_bindings::bindings::bpf_map_type::__MAX_BPF_MAP_TYPE: aya_ebpf_bindings::bindings::bpf_map_type::Type pub type aya_ebpf_bindings::bindings::bpf_map_type::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::bpf_perf_event_type -pub const aya_ebpf_bindings::bindings::bpf_perf_event_type::BPF_PERF_EVENT_EVENT: aya_ebpf_bindings::bindings::bpf_perf_event_type::Type = 6u32 -pub const aya_ebpf_bindings::bindings::bpf_perf_event_type::BPF_PERF_EVENT_KPROBE: aya_ebpf_bindings::bindings::bpf_perf_event_type::Type = 3u32 -pub const aya_ebpf_bindings::bindings::bpf_perf_event_type::BPF_PERF_EVENT_KRETPROBE: aya_ebpf_bindings::bindings::bpf_perf_event_type::Type = 4u32 -pub const aya_ebpf_bindings::bindings::bpf_perf_event_type::BPF_PERF_EVENT_TRACEPOINT: aya_ebpf_bindings::bindings::bpf_perf_event_type::Type = 5u32 -pub const aya_ebpf_bindings::bindings::bpf_perf_event_type::BPF_PERF_EVENT_UNSPEC: aya_ebpf_bindings::bindings::bpf_perf_event_type::Type = 0u32 -pub const aya_ebpf_bindings::bindings::bpf_perf_event_type::BPF_PERF_EVENT_UPROBE: aya_ebpf_bindings::bindings::bpf_perf_event_type::Type = 1u32 -pub const aya_ebpf_bindings::bindings::bpf_perf_event_type::BPF_PERF_EVENT_URETPROBE: aya_ebpf_bindings::bindings::bpf_perf_event_type::Type = 2u32 +pub const aya_ebpf_bindings::bindings::bpf_perf_event_type::BPF_PERF_EVENT_EVENT: aya_ebpf_bindings::bindings::bpf_perf_event_type::Type +pub const aya_ebpf_bindings::bindings::bpf_perf_event_type::BPF_PERF_EVENT_KPROBE: aya_ebpf_bindings::bindings::bpf_perf_event_type::Type +pub const aya_ebpf_bindings::bindings::bpf_perf_event_type::BPF_PERF_EVENT_KRETPROBE: aya_ebpf_bindings::bindings::bpf_perf_event_type::Type +pub const aya_ebpf_bindings::bindings::bpf_perf_event_type::BPF_PERF_EVENT_TRACEPOINT: aya_ebpf_bindings::bindings::bpf_perf_event_type::Type +pub const aya_ebpf_bindings::bindings::bpf_perf_event_type::BPF_PERF_EVENT_UNSPEC: aya_ebpf_bindings::bindings::bpf_perf_event_type::Type +pub const aya_ebpf_bindings::bindings::bpf_perf_event_type::BPF_PERF_EVENT_UPROBE: aya_ebpf_bindings::bindings::bpf_perf_event_type::Type +pub const aya_ebpf_bindings::bindings::bpf_perf_event_type::BPF_PERF_EVENT_URETPROBE: aya_ebpf_bindings::bindings::bpf_perf_event_type::Type pub type aya_ebpf_bindings::bindings::bpf_perf_event_type::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::bpf_prog_type -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_CGROUP_DEVICE: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 15u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_CGROUP_SKB: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 8u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_CGROUP_SOCK: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 9u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_CGROUP_SOCKOPT: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 25u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_CGROUP_SOCK_ADDR: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 18u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_CGROUP_SYSCTL: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 23u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_EXT: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 28u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_FLOW_DISSECTOR: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 22u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_KPROBE: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 2u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_LIRC_MODE2: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 20u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_LSM: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 29u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_LWT_IN: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 10u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_LWT_OUT: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 11u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_LWT_SEG6LOCAL: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 19u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_LWT_XMIT: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 12u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_NETFILTER: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 32u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_PERF_EVENT: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 7u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_RAW_TRACEPOINT: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 17u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 24u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_SCHED_ACT: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 4u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_SCHED_CLS: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 3u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_SK_LOOKUP: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 30u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_SK_MSG: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 16u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_SK_REUSEPORT: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 21u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_SK_SKB: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 14u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_SOCKET_FILTER: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 1u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_SOCK_OPS: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 13u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_STRUCT_OPS: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 27u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_SYSCALL: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 31u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_TRACEPOINT: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 5u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_TRACING: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 26u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_UNSPEC: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 0u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_XDP: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 6u32 -pub const aya_ebpf_bindings::bindings::bpf_prog_type::__MAX_BPF_PROG_TYPE: aya_ebpf_bindings::bindings::bpf_prog_type::Type = 33u32 +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_CGROUP_DEVICE: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_CGROUP_SKB: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_CGROUP_SOCK: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_CGROUP_SOCKOPT: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_CGROUP_SOCK_ADDR: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_CGROUP_SYSCTL: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_EXT: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_FLOW_DISSECTOR: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_KPROBE: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_LIRC_MODE2: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_LSM: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_LWT_IN: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_LWT_OUT: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_LWT_SEG6LOCAL: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_LWT_XMIT: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_NETFILTER: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_PERF_EVENT: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_RAW_TRACEPOINT: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_SCHED_ACT: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_SCHED_CLS: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_SK_LOOKUP: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_SK_MSG: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_SK_REUSEPORT: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_SK_SKB: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_SOCKET_FILTER: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_SOCK_OPS: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_STRUCT_OPS: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_SYSCALL: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_TRACEPOINT: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_TRACING: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_UNSPEC: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::BPF_PROG_TYPE_XDP: aya_ebpf_bindings::bindings::bpf_prog_type::Type +pub const aya_ebpf_bindings::bindings::bpf_prog_type::__MAX_BPF_PROG_TYPE: aya_ebpf_bindings::bindings::bpf_prog_type::Type pub type aya_ebpf_bindings::bindings::bpf_prog_type::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::bpf_ret_code -pub const aya_ebpf_bindings::bindings::bpf_ret_code::BPF_DROP: aya_ebpf_bindings::bindings::bpf_ret_code::Type = 2u32 -pub const aya_ebpf_bindings::bindings::bpf_ret_code::BPF_FLOW_DISSECTOR_CONTINUE: aya_ebpf_bindings::bindings::bpf_ret_code::Type = 129u32 -pub const aya_ebpf_bindings::bindings::bpf_ret_code::BPF_LWT_REROUTE: aya_ebpf_bindings::bindings::bpf_ret_code::Type = 128u32 -pub const aya_ebpf_bindings::bindings::bpf_ret_code::BPF_OK: aya_ebpf_bindings::bindings::bpf_ret_code::Type = 0u32 -pub const aya_ebpf_bindings::bindings::bpf_ret_code::BPF_REDIRECT: aya_ebpf_bindings::bindings::bpf_ret_code::Type = 7u32 +pub const aya_ebpf_bindings::bindings::bpf_ret_code::BPF_DROP: aya_ebpf_bindings::bindings::bpf_ret_code::Type +pub const aya_ebpf_bindings::bindings::bpf_ret_code::BPF_FLOW_DISSECTOR_CONTINUE: aya_ebpf_bindings::bindings::bpf_ret_code::Type +pub const aya_ebpf_bindings::bindings::bpf_ret_code::BPF_LWT_REROUTE: aya_ebpf_bindings::bindings::bpf_ret_code::Type +pub const aya_ebpf_bindings::bindings::bpf_ret_code::BPF_OK: aya_ebpf_bindings::bindings::bpf_ret_code::Type +pub const aya_ebpf_bindings::bindings::bpf_ret_code::BPF_REDIRECT: aya_ebpf_bindings::bindings::bpf_ret_code::Type pub type aya_ebpf_bindings::bindings::bpf_ret_code::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::bpf_stack_build_id_status -pub const aya_ebpf_bindings::bindings::bpf_stack_build_id_status::BPF_STACK_BUILD_ID_EMPTY: aya_ebpf_bindings::bindings::bpf_stack_build_id_status::Type = 0u32 -pub const aya_ebpf_bindings::bindings::bpf_stack_build_id_status::BPF_STACK_BUILD_ID_IP: aya_ebpf_bindings::bindings::bpf_stack_build_id_status::Type = 2u32 -pub const aya_ebpf_bindings::bindings::bpf_stack_build_id_status::BPF_STACK_BUILD_ID_VALID: aya_ebpf_bindings::bindings::bpf_stack_build_id_status::Type = 1u32 +pub const aya_ebpf_bindings::bindings::bpf_stack_build_id_status::BPF_STACK_BUILD_ID_EMPTY: aya_ebpf_bindings::bindings::bpf_stack_build_id_status::Type +pub const aya_ebpf_bindings::bindings::bpf_stack_build_id_status::BPF_STACK_BUILD_ID_IP: aya_ebpf_bindings::bindings::bpf_stack_build_id_status::Type +pub const aya_ebpf_bindings::bindings::bpf_stack_build_id_status::BPF_STACK_BUILD_ID_VALID: aya_ebpf_bindings::bindings::bpf_stack_build_id_status::Type pub type aya_ebpf_bindings::bindings::bpf_stack_build_id_status::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::bpf_stats_type -pub const aya_ebpf_bindings::bindings::bpf_stats_type::BPF_STATS_RUN_TIME: aya_ebpf_bindings::bindings::bpf_stats_type::Type = 0u32 +pub const aya_ebpf_bindings::bindings::bpf_stats_type::BPF_STATS_RUN_TIME: aya_ebpf_bindings::bindings::bpf_stats_type::Type pub type aya_ebpf_bindings::bindings::bpf_stats_type::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::bpf_task_fd_type -pub const aya_ebpf_bindings::bindings::bpf_task_fd_type::BPF_FD_TYPE_KPROBE: aya_ebpf_bindings::bindings::bpf_task_fd_type::Type = 2u32 -pub const aya_ebpf_bindings::bindings::bpf_task_fd_type::BPF_FD_TYPE_KRETPROBE: aya_ebpf_bindings::bindings::bpf_task_fd_type::Type = 3u32 -pub const aya_ebpf_bindings::bindings::bpf_task_fd_type::BPF_FD_TYPE_RAW_TRACEPOINT: aya_ebpf_bindings::bindings::bpf_task_fd_type::Type = 0u32 -pub const aya_ebpf_bindings::bindings::bpf_task_fd_type::BPF_FD_TYPE_TRACEPOINT: aya_ebpf_bindings::bindings::bpf_task_fd_type::Type = 1u32 -pub const aya_ebpf_bindings::bindings::bpf_task_fd_type::BPF_FD_TYPE_UPROBE: aya_ebpf_bindings::bindings::bpf_task_fd_type::Type = 4u32 -pub const aya_ebpf_bindings::bindings::bpf_task_fd_type::BPF_FD_TYPE_URETPROBE: aya_ebpf_bindings::bindings::bpf_task_fd_type::Type = 5u32 +pub const aya_ebpf_bindings::bindings::bpf_task_fd_type::BPF_FD_TYPE_KPROBE: aya_ebpf_bindings::bindings::bpf_task_fd_type::Type +pub const aya_ebpf_bindings::bindings::bpf_task_fd_type::BPF_FD_TYPE_KRETPROBE: aya_ebpf_bindings::bindings::bpf_task_fd_type::Type +pub const aya_ebpf_bindings::bindings::bpf_task_fd_type::BPF_FD_TYPE_RAW_TRACEPOINT: aya_ebpf_bindings::bindings::bpf_task_fd_type::Type +pub const aya_ebpf_bindings::bindings::bpf_task_fd_type::BPF_FD_TYPE_TRACEPOINT: aya_ebpf_bindings::bindings::bpf_task_fd_type::Type +pub const aya_ebpf_bindings::bindings::bpf_task_fd_type::BPF_FD_TYPE_UPROBE: aya_ebpf_bindings::bindings::bpf_task_fd_type::Type +pub const aya_ebpf_bindings::bindings::bpf_task_fd_type::BPF_FD_TYPE_URETPROBE: aya_ebpf_bindings::bindings::bpf_task_fd_type::Type pub type aya_ebpf_bindings::bindings::bpf_task_fd_type::Type = aya_ebpf_cty::ad::c_uint pub mod aya_ebpf_bindings::bindings::sk_action -pub const aya_ebpf_bindings::bindings::sk_action::SK_DROP: aya_ebpf_bindings::bindings::sk_action::Type = 0u32 -pub const aya_ebpf_bindings::bindings::sk_action::SK_PASS: aya_ebpf_bindings::bindings::sk_action::Type = 1u32 +pub const aya_ebpf_bindings::bindings::sk_action::SK_DROP: aya_ebpf_bindings::bindings::sk_action::Type +pub const aya_ebpf_bindings::bindings::sk_action::SK_PASS: aya_ebpf_bindings::bindings::sk_action::Type pub type aya_ebpf_bindings::bindings::sk_action::Type = aya_ebpf_cty::ad::c_uint +pub mod aya_ebpf_bindings::bindings::tcx_action_base +pub const aya_ebpf_bindings::bindings::tcx_action_base::TCX_DROP: aya_ebpf_bindings::bindings::tcx_action_base::Type +pub const aya_ebpf_bindings::bindings::tcx_action_base::TCX_NEXT: aya_ebpf_bindings::bindings::tcx_action_base::Type +pub const aya_ebpf_bindings::bindings::tcx_action_base::TCX_PASS: aya_ebpf_bindings::bindings::tcx_action_base::Type +pub const aya_ebpf_bindings::bindings::tcx_action_base::TCX_REDIRECT: aya_ebpf_bindings::bindings::tcx_action_base::Type +pub type aya_ebpf_bindings::bindings::tcx_action_base::Type = aya_ebpf_cty::ad::c_int pub mod aya_ebpf_bindings::bindings::xdp_action -pub const aya_ebpf_bindings::bindings::xdp_action::XDP_ABORTED: aya_ebpf_bindings::bindings::xdp_action::Type = 0u32 -pub const aya_ebpf_bindings::bindings::xdp_action::XDP_DROP: aya_ebpf_bindings::bindings::xdp_action::Type = 1u32 -pub const aya_ebpf_bindings::bindings::xdp_action::XDP_PASS: aya_ebpf_bindings::bindings::xdp_action::Type = 2u32 -pub const aya_ebpf_bindings::bindings::xdp_action::XDP_REDIRECT: aya_ebpf_bindings::bindings::xdp_action::Type = 4u32 -pub const aya_ebpf_bindings::bindings::xdp_action::XDP_TX: aya_ebpf_bindings::bindings::xdp_action::Type = 3u32 +pub const aya_ebpf_bindings::bindings::xdp_action::XDP_ABORTED: aya_ebpf_bindings::bindings::xdp_action::Type +pub const aya_ebpf_bindings::bindings::xdp_action::XDP_DROP: aya_ebpf_bindings::bindings::xdp_action::Type +pub const aya_ebpf_bindings::bindings::xdp_action::XDP_PASS: aya_ebpf_bindings::bindings::xdp_action::Type +pub const aya_ebpf_bindings::bindings::xdp_action::XDP_REDIRECT: aya_ebpf_bindings::bindings::xdp_action::Type +pub const aya_ebpf_bindings::bindings::xdp_action::XDP_TX: aya_ebpf_bindings::bindings::xdp_action::Type pub type aya_ebpf_bindings::bindings::xdp_action::Type = aya_ebpf_cty::ad::c_uint #[repr(C)] pub union aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_1 pub aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_1::_bitfield_1: aya_ebpf_bindings::bindings::__BindgenBitfieldUnit<[u8; 8]> @@ -533,12 +539,14 @@ pub fn aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_1::try_from(value: U) impl core::convert::TryInto for aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_2 @@ -564,12 +572,14 @@ pub fn aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_2::try_from(value: U) impl core::convert::TryInto for aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_2 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_2::Error = >::Error pub fn aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_2::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_2 pub fn aya_ebpf_bindings::bindings::__sk_buff__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_attr @@ -610,12 +620,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr::try_from(value: U) -> core::result impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr pub fn aya_ebpf_bindings::bindings::bpf_attr::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_1 @@ -638,12 +650,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_1::try_f impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_2 @@ -666,12 +680,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_2::try_f impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_2 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_2::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_2::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_2 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_1 @@ -694,12 +710,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_1::try_f impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_2 @@ -722,12 +740,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_2::try_f impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_2 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_2::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_2::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_2 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3 @@ -757,12 +777,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3::try_f impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 @@ -785,12 +807,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindg impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 @@ -813,12 +837,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindg impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_1 @@ -841,12 +867,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_1::try_f impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_2 @@ -869,12 +897,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_2::try_f impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_2 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_2::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_2::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_2 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2__bindgen_ty_1 @@ -897,12 +927,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2__bindgen_ty_1::try_fr impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4__bindgen_ty_1 @@ -925,12 +957,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4__bindgen_ty_1::try_fr impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_1 @@ -953,12 +987,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_1::try_fr impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_2 @@ -981,12 +1017,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_2::try_fr impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_2 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_2::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_2::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_2 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8__bindgen_ty_1 @@ -1012,12 +1050,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8__bindgen_ty_1::try_fr impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_cpumap_val__bindgen_ty_1 @@ -1040,12 +1080,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_cpumap_val__bindgen_ty_1::try_from(value impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_cpumap_val__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_cpumap_val__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_cpumap_val__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_cpumap_val__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_cpumap_val__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_cpumap_val__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_cpumap_val__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_cpumap_val__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_cpumap_val__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_cpumap_val__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_cpumap_val__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_cpumap_val__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_cpumap_val__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_cpumap_val__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_cpumap_val__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_cpumap_val__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_devmap_val__bindgen_ty_1 @@ -1068,12 +1110,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_devmap_val__bindgen_ty_1::try_from(value impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_devmap_val__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_devmap_val__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_devmap_val__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_devmap_val__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_devmap_val__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_devmap_val__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_devmap_val__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_devmap_val__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_devmap_val__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_devmap_val__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_devmap_val__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_devmap_val__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_devmap_val__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_devmap_val__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_devmap_val__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_devmap_val__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_1 @@ -1096,12 +1140,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_1::try_from(value impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_2 @@ -1125,12 +1171,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_2::try_from(value impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_2 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_2::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_2::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_2 pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_3 @@ -1153,12 +1201,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_3::try_from(value impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_3 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_3::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_3::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_3 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_3 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_3::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_3::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_3::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_3 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_3::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_3 pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_3::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_4 @@ -1181,12 +1231,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_4::try_from(value impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_4 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_4::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_4::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_4 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_4 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_4::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_4::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_4::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_4 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_4::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_4 pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_4::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5 @@ -1209,12 +1261,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5::try_from(value impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5 pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1 @@ -1237,12 +1291,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1::try_from(value: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_iter_link_info @@ -1266,12 +1322,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info::try_from(value: U) -> co impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_iter_link_info where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_iter_link_info::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_iter_link_info where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_iter_link_info where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_iter_link_info where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_iter_link_info where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_iter_link_info where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_iter_link_info where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_iter_link_info where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_iter_link_info::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_iter_link_info pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1 @@ -1305,12 +1363,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1::try_from(value: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 @@ -1335,12 +1395,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__ impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 @@ -1362,12 +1424,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__b impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 @@ -1390,12 +1454,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__b impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8__bindgen_ty_1 @@ -1418,12 +1484,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8__bindgen_ty_1::try_from( impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_redir_neigh__bindgen_ty_1 @@ -1446,12 +1514,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_redir_neigh__bindgen_ty_1::try_from(valu impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_redir_neigh__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_redir_neigh__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_redir_neigh__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_redir_neigh__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_redir_neigh__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_redir_neigh__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_redir_neigh__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_redir_neigh__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_redir_neigh__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_redir_neigh__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_redir_neigh__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_redir_neigh__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_redir_neigh__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_redir_neigh__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_redir_neigh__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_redir_neigh__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1 @@ -1474,12 +1544,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1::try_from(value: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 @@ -1505,12 +1577,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1::t impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_sock_addr__bindgen_ty_1 @@ -1536,12 +1610,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_sock_addr__bindgen_ty_1::try_from(value: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_sock_addr__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_sock_addr__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_sock_addr__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock_addr__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock_addr__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_addr__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock_addr__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock_addr__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_addr__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock_addr__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock_addr__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_addr__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_sock_addr__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_sock_addr__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_sock_addr__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_sock_addr__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_1 @@ -1565,12 +1641,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_1::try_from(value: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_2 @@ -1596,12 +1674,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_2::try_from(value: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_2 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_2::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_2::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_2 pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_3 @@ -1627,12 +1707,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_3::try_from(value: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_3 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_3::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_3::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_3 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_3 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_3::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_3::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_3::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_3 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_3::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_3 pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_3::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_4 @@ -1658,12 +1740,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_4::try_from(value: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_4 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_4::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_4::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_4 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_4 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_4::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_4::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_4::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_4 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_4::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_4 pub fn aya_ebpf_bindings::bindings::bpf_sock_ops__bindgen_ty_4::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1 @@ -1686,12 +1770,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1::try_from(value impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_1 @@ -1717,12 +1803,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_1::try_from(value: U impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_2 @@ -1748,12 +1836,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_2::try_from(value: U impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_2 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_2::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_2::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_2 pub fn aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_3 @@ -1779,12 +1869,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_3::try_from(value: U impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_3 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_3::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_3::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_3 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_3 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_3::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_3::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_3::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_3 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_3::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_3 pub fn aya_ebpf_bindings::bindings::bpf_sockopt__bindgen_ty_3::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_stack_build_id__bindgen_ty_1 @@ -1807,12 +1899,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_stack_build_id__bindgen_ty_1::try_from(v impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_stack_build_id__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_stack_build_id__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_stack_build_id__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_stack_build_id__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_stack_build_id__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_stack_build_id__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_stack_build_id__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_stack_build_id__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_stack_build_id__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_stack_build_id__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_stack_build_id__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_stack_build_id__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_stack_build_id__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_stack_build_id__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_stack_build_id__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_stack_build_id__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_1 @@ -1835,12 +1929,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_1::try_from(value impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_2 @@ -1863,12 +1959,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_2::try_from(value impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_2 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_2::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_2::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_2 pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_3 @@ -1891,12 +1989,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_3::try_from(value impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_3 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_3::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_3::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_3 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_3 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_3::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_3::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_3::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_3 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_3::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_3 pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key__bindgen_ty_3::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::bpf_xfrm_state__bindgen_ty_1 @@ -1919,12 +2019,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_xfrm_state__bindgen_ty_1::try_from(value impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_xfrm_state__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_xfrm_state__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_xfrm_state__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_xfrm_state__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_xfrm_state__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_xfrm_state__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_xfrm_state__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_xfrm_state__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_xfrm_state__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_xfrm_state__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_xfrm_state__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_xfrm_state__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_xfrm_state__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_xfrm_state__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_xfrm_state__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_xfrm_state__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_1 @@ -1950,12 +2052,14 @@ pub fn aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_1::try_from(value: U) impl core::convert::TryInto for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_2 @@ -1981,12 +2085,14 @@ pub fn aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_2::try_from(value: U) impl core::convert::TryInto for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_2 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_2::Error = >::Error pub fn aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_2::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_2 pub fn aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_3 @@ -2012,12 +2118,14 @@ pub fn aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_3::try_from(value: U) impl core::convert::TryInto for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_3 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_3::Error = >::Error pub fn aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_3::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_3 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_3 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_3::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_3::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_3::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_3 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_3::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_3 pub fn aya_ebpf_bindings::bindings::sk_msg_md__bindgen_ty_3::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_1 @@ -2043,12 +2151,14 @@ pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_1::try_from(valu impl core::convert::TryInto for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_2 @@ -2074,12 +2184,14 @@ pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_2::try_from(valu impl core::convert::TryInto for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_2 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_2::Error = >::Error pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_2::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_2 pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_3 @@ -2105,12 +2217,14 @@ pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_3::try_from(valu impl core::convert::TryInto for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_3 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_3::Error = >::Error pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_3::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_3 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_3 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_3::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_3::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_3::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_3 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_3::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_3 pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_3::from(t: T) -> T #[repr(C)] pub union aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_4 @@ -2136,18 +2250,24 @@ pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_4::try_from(valu impl core::convert::TryInto for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_4 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_4::Error = >::Error pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_4::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_4 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_4 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_4::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_4::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_4::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_4 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_4::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_4 pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_4::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::__BindgenBitfieldUnit impl aya_ebpf_bindings::bindings::__BindgenBitfieldUnit where Storage: core::convert::AsRef<[u8]> + core::convert::AsMut<[u8]> pub fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::get(&self, bit_offset: usize, bit_width: u8) -> u64 pub fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::get_bit(&self, index: usize) -> bool +pub unsafe fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 +pub unsafe fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::raw_get_bit(this: *const Self, index: usize) -> bool +pub unsafe fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) +pub unsafe fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::raw_set_bit(this: *mut Self, index: usize, val: bool) pub fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::set(&mut self, bit_offset: usize, bit_width: u8, val: u64) pub fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::set_bit(&mut self, index: usize, val: bool) impl aya_ebpf_bindings::bindings::__BindgenBitfieldUnit @@ -2183,12 +2303,14 @@ pub fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::try_from(val impl core::convert::TryInto for aya_ebpf_bindings::bindings::__BindgenBitfieldUnit where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::Error = >::Error pub fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::__BindgenBitfieldUnit where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::__BindgenBitfieldUnit where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::__BindgenBitfieldUnit where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::__BindgenBitfieldUnit where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::__BindgenBitfieldUnit where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::__BindgenBitfieldUnit where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::__BindgenBitfieldUnit where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::__BindgenBitfieldUnit pub fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::__IncompleteArrayField(_, _) @@ -2216,11 +2338,11 @@ pub fn aya_ebpf_bindings::bindings::__IncompleteArrayField::try_from(value: U impl core::convert::TryInto for aya_ebpf_bindings::bindings::__IncompleteArrayField where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::__IncompleteArrayField::Error = >::Error pub fn aya_ebpf_bindings::bindings::__IncompleteArrayField::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::__IncompleteArrayField where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::__IncompleteArrayField where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::__IncompleteArrayField::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::__IncompleteArrayField where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::__IncompleteArrayField where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::__IncompleteArrayField::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::__IncompleteArrayField where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::__IncompleteArrayField where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::__IncompleteArrayField::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf_bindings::bindings::__IncompleteArrayField pub fn aya_ebpf_bindings::bindings::__IncompleteArrayField::from(t: T) -> T @@ -2280,12 +2402,14 @@ pub fn aya_ebpf_bindings::bindings::__sk_buff::try_from(value: U) -> core::resul impl core::convert::TryInto for aya_ebpf_bindings::bindings::__sk_buff where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::__sk_buff::Error = >::Error pub fn aya_ebpf_bindings::bindings::__sk_buff::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::__sk_buff where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::__sk_buff where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::__sk_buff::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::__sk_buff where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::__sk_buff where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::__sk_buff::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::__sk_buff where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::__sk_buff where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::__sk_buff::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::__sk_buff where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::__sk_buff::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::__sk_buff pub fn aya_ebpf_bindings::bindings::__sk_buff::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_1 @@ -2324,12 +2448,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_1::try_from(value: U) - impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10 @@ -2364,12 +2490,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10::try_from(value: U) impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_10::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_11 @@ -2399,12 +2527,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_11::try_from(value: U) impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_11 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_11::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_11::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_11 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_11 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_11::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_11 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_11 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_11::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_11 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_11 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_11::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_11 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_11::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_11 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_11::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_12 @@ -2435,12 +2565,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_12::try_from(value: U) impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_12 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_12::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_12::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_12 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_12 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_12::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_12 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_12 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_12::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_12 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_12 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_12::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_12 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_12::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_12 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_12::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_13 @@ -2472,12 +2604,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_13::try_from(value: U) impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_13 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_13::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_13::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_13 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_13 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_13::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_13 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_13 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_13::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_13 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_13 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_13::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_13 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_13::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_13 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_13::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14 @@ -2503,12 +2637,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14::try_from(value: U) impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 @@ -2533,12 +2669,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindg impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 @@ -2562,12 +2700,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindg impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 @@ -2595,12 +2735,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindg impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 @@ -2625,12 +2767,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindg impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 @@ -2657,12 +2801,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindg impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 @@ -2685,12 +2831,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindg impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 @@ -2720,12 +2868,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindg impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 @@ -2748,12 +2898,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindg impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15 @@ -2778,12 +2930,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15::try_from(value: U) impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_15::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_16 @@ -2807,12 +2961,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_16::try_from(value: U) impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_16 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_16::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_16::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_16 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_16 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_16::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_16 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_16 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_16::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_16 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_16 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_16::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_16 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_16::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_16 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_16::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_17 @@ -2836,12 +2992,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_17::try_from(value: U) impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_17 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_17::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_17::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_17 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_17 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_17::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_17 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_17 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_17::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_17 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_17 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_17::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_17 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_17::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_17 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_17::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_18 @@ -2866,12 +3024,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_18::try_from(value: U) impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_18 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_18::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_18::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_18 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_18 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_18::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_18 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_18 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_18::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_18 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_18 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_18::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_18 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_18::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_18 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_18::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_19 @@ -2897,12 +3057,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_19::try_from(value: U) impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_19 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_19::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_19::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_19 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_19 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_19::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_19 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_19 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_19::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_19 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_19 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_19::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_19 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_19::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_19 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_19::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2 @@ -2927,12 +3089,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2::try_from(value: U) - impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_20 @@ -2957,12 +3121,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_20::try_from(value: U) impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_20 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_20::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_20::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_20 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_20 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_20::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_20 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_20 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_20::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_20 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_20 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_20::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_20 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_20::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_20 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_20::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_3 @@ -2993,12 +3159,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_3::try_from(value: U) - impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_3 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_3::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_3::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_3 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_3 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_3::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_3::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_3::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_3 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_3::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_3 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_3::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4 @@ -3046,12 +3214,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4::try_from(value: U) - impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_4::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_5 @@ -3078,12 +3248,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_5::try_from(value: U) - impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_5 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_5::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_5::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_5 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_5 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_5::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_5 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_5 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_5::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_5 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_5 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_5::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_5 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_5::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_5 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_5::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6 @@ -3111,12 +3283,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6::try_from(value: U) - impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_6::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_7 @@ -3154,12 +3328,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_7::try_from(value: U) - impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_7 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_7::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_7::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_7 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_7 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_7::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_7 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_7 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_7::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_7 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_7 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_7::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_7 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_7::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_7 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_7::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8 @@ -3183,12 +3359,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8::try_from(value: U) - impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_8::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_9 @@ -3214,12 +3392,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_9::try_from(value: U) - impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_9 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_9::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_9::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_9 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_9 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_9::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_9 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_9 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_9::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_9 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_9 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_9::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_9 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_9::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_9 pub fn aya_ebpf_bindings::bindings::bpf_attr__bindgen_ty_9::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_btf_info @@ -3248,12 +3428,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_btf_info::try_from(value: U) -> core::re impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_btf_info where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_btf_info::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_btf_info::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_btf_info where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_btf_info where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_btf_info::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_btf_info where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_btf_info where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_btf_info::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_btf_info where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_btf_info where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_btf_info::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_btf_info where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_btf_info::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_btf_info pub fn aya_ebpf_bindings::bindings::bpf_btf_info::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_cgroup_dev_ctx @@ -3279,12 +3461,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_cgroup_dev_ctx::try_from(value: U) -> co impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_cgroup_dev_ctx where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_cgroup_dev_ctx::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_cgroup_dev_ctx::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_cgroup_dev_ctx where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_cgroup_dev_ctx where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_cgroup_dev_ctx::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_cgroup_dev_ctx where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_cgroup_dev_ctx where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_cgroup_dev_ctx::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_cgroup_dev_ctx where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_cgroup_dev_ctx where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_cgroup_dev_ctx::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_cgroup_dev_ctx where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_cgroup_dev_ctx::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_cgroup_dev_ctx pub fn aya_ebpf_bindings::bindings::bpf_cgroup_dev_ctx::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_cgroup_storage_key @@ -3309,12 +3493,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_cgroup_storage_key::try_from(value: U) - impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_cgroup_storage_key where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_cgroup_storage_key::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_cgroup_storage_key::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_cgroup_storage_key where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_cgroup_storage_key where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_cgroup_storage_key::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_cgroup_storage_key where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_cgroup_storage_key where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_cgroup_storage_key::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_cgroup_storage_key where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_cgroup_storage_key where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_cgroup_storage_key::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_cgroup_storage_key where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_cgroup_storage_key::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_cgroup_storage_key pub fn aya_ebpf_bindings::bindings::bpf_cgroup_storage_key::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_core_relo @@ -3341,12 +3527,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_core_relo::try_from(value: U) -> core::r impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_core_relo where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_core_relo::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_core_relo::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_core_relo where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_core_relo where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_core_relo::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_core_relo where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_core_relo where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_core_relo::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_core_relo where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_core_relo where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_core_relo::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_core_relo where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_core_relo::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_core_relo pub fn aya_ebpf_bindings::bindings::bpf_core_relo::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_cpumap_val @@ -3369,12 +3557,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_cpumap_val::try_from(value: U) -> core:: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_cpumap_val where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_cpumap_val::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_cpumap_val::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_cpumap_val where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_cpumap_val where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_cpumap_val::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_cpumap_val where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_cpumap_val where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_cpumap_val::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_cpumap_val where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_cpumap_val where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_cpumap_val::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_cpumap_val where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_cpumap_val::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_cpumap_val pub fn aya_ebpf_bindings::bindings::bpf_cpumap_val::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_devmap_val @@ -3397,12 +3587,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_devmap_val::try_from(value: U) -> core:: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_devmap_val where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_devmap_val::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_devmap_val::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_devmap_val where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_devmap_val where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_devmap_val::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_devmap_val where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_devmap_val where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_devmap_val::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_devmap_val where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_devmap_val where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_devmap_val::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_devmap_val where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_devmap_val::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_devmap_val pub fn aya_ebpf_bindings::bindings::bpf_devmap_val::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_dynptr @@ -3426,12 +3618,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_dynptr::try_from(value: U) -> core::resu impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_dynptr where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_dynptr::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_dynptr::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_dynptr where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_dynptr where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_dynptr::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_dynptr where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_dynptr where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_dynptr::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_dynptr where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_dynptr where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_dynptr::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_dynptr where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_dynptr::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_dynptr pub fn aya_ebpf_bindings::bindings::bpf_dynptr::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_fib_lookup @@ -3464,12 +3658,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup::try_from(value: U) -> core:: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_fib_lookup where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_fib_lookup::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_fib_lookup where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_fib_lookup where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_fib_lookup where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_fib_lookup where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_fib_lookup where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_fib_lookup where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_fib_lookup where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_fib_lookup::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_fib_lookup pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1 @@ -3494,12 +3690,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1:: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_flow_keys @@ -3533,12 +3731,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_flow_keys::try_from(value: U) -> core::r impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_flow_keys where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_flow_keys::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_flow_keys::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_flow_keys where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_flow_keys where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_flow_keys::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_flow_keys where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_flow_keys where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_flow_keys::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_flow_keys where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_flow_keys where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_flow_keys::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_flow_keys where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_flow_keys::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_flow_keys pub fn aya_ebpf_bindings::bindings::bpf_flow_keys::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 @@ -3563,12 +3763,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_1::t impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 @@ -3593,12 +3795,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_2::t impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_2::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_2::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 pub fn aya_ebpf_bindings::bindings::bpf_flow_keys__bindgen_ty_1__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_func_info @@ -3623,12 +3827,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_func_info::try_from(value: U) -> core::r impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_func_info where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_func_info::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_func_info::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_func_info where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_func_info where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_func_info::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_func_info where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_func_info where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_func_info::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_func_info where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_func_info where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_func_info::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_func_info where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_func_info::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_func_info pub fn aya_ebpf_bindings::bindings::bpf_func_info::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_insn @@ -3639,10 +3845,14 @@ pub aya_ebpf_bindings::bindings::bpf_insn::imm: aya_ebpf_bindings::bindings::__s pub aya_ebpf_bindings::bindings::bpf_insn::off: aya_ebpf_bindings::bindings::__s16 impl aya_ebpf_bindings::bindings::bpf_insn pub fn aya_ebpf_bindings::bindings::bpf_insn::dst_reg(&self) -> aya_ebpf_bindings::bindings::__u8 +pub unsafe fn aya_ebpf_bindings::bindings::bpf_insn::dst_reg_raw(this: *const Self) -> aya_ebpf_bindings::bindings::__u8 pub fn aya_ebpf_bindings::bindings::bpf_insn::new_bitfield_1(dst_reg: aya_ebpf_bindings::bindings::__u8, src_reg: aya_ebpf_bindings::bindings::__u8) -> aya_ebpf_bindings::bindings::__BindgenBitfieldUnit<[u8; 1]> pub fn aya_ebpf_bindings::bindings::bpf_insn::set_dst_reg(&mut self, val: aya_ebpf_bindings::bindings::__u8) +pub unsafe fn aya_ebpf_bindings::bindings::bpf_insn::set_dst_reg_raw(this: *mut Self, val: aya_ebpf_bindings::bindings::__u8) pub fn aya_ebpf_bindings::bindings::bpf_insn::set_src_reg(&mut self, val: aya_ebpf_bindings::bindings::__u8) +pub unsafe fn aya_ebpf_bindings::bindings::bpf_insn::set_src_reg_raw(this: *mut Self, val: aya_ebpf_bindings::bindings::__u8) pub fn aya_ebpf_bindings::bindings::bpf_insn::src_reg(&self) -> aya_ebpf_bindings::bindings::__u8 +pub unsafe fn aya_ebpf_bindings::bindings::bpf_insn::src_reg_raw(this: *const Self) -> aya_ebpf_bindings::bindings::__u8 impl core::clone::Clone for aya_ebpf_bindings::bindings::bpf_insn pub fn aya_ebpf_bindings::bindings::bpf_insn::clone(&self) -> aya_ebpf_bindings::bindings::bpf_insn impl core::fmt::Debug for aya_ebpf_bindings::bindings::bpf_insn @@ -3662,12 +3872,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_insn::try_from(value: U) -> core::result impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_insn where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_insn::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_insn::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_insn where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_insn where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_insn::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_insn where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_insn where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_insn::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_insn where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_insn where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_insn::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_insn where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_insn::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_insn pub fn aya_ebpf_bindings::bindings::bpf_insn::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_1 @@ -3691,12 +3903,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_1::try_from(v impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_2 @@ -3722,12 +3936,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_2::try_from(v impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_2 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_2::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_2::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_2 pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_3 @@ -3753,12 +3969,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_3::try_from(v impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_3 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_3::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_3::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_3 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_3 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_3::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_3::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_3::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_3 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_3::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_3 pub fn aya_ebpf_bindings::bindings::bpf_iter_link_info__bindgen_ty_3::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_iter_num @@ -3782,12 +4000,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_iter_num::try_from(value: U) -> core::re impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_iter_num where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_iter_num::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_iter_num::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_iter_num where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_iter_num where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_iter_num::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_iter_num where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_iter_num where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_iter_num::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_iter_num where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_iter_num where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_iter_num::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_iter_num where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_iter_num::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_iter_num pub fn aya_ebpf_bindings::bindings::bpf_iter_num::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_line_info @@ -3814,12 +4034,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_line_info::try_from(value: U) -> core::r impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_line_info where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_line_info::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_line_info::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_line_info where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_line_info where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_line_info::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_line_info where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_line_info where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_line_info::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_line_info where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_line_info where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_line_info::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_line_info where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_line_info::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_line_info pub fn aya_ebpf_bindings::bindings::bpf_line_info::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_link_info @@ -3844,12 +4066,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info::try_from(value: U) -> core::r impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info pub fn aya_ebpf_bindings::bindings::bpf_link_info::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_1 @@ -3874,12 +4098,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_1::t impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_10 @@ -3910,12 +4136,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_10:: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_10 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_10::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_10::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_10 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_10 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_10::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_10 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_10 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_10::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_10 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_10 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_10::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_10 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_10::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_10 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_10::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11 @@ -3942,12 +4170,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11:: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 @@ -3974,12 +4204,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__ impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 @@ -4008,12 +4240,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__ impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 @@ -4043,12 +4277,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__ impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 @@ -4078,12 +4314,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__ impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_12 @@ -4108,12 +4346,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_12:: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_12 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_12::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_12::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_12 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_12 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_12::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_12 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_12 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_12::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_12 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_12 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_12::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_12 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_12::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_12 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_12::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_13 @@ -4138,12 +4378,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_13:: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_13 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_13::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_13::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_13 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_13 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_13::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_13 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_13 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_13::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_13 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_13 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_13::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_13 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_13::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_13 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_13::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_2 @@ -4169,12 +4411,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_2::t impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_2 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_2::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_2::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_2 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_3 @@ -4199,12 +4443,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_3::t impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_3 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_3::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_3::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_3 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_3 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_3::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_3::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_3::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_3 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_3::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_3 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_3::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4 @@ -4229,12 +4475,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4::t impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 @@ -4258,12 +4506,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__b impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 @@ -4288,12 +4538,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__b impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 @@ -4318,12 +4570,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__b impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_5 @@ -4348,12 +4602,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_5::t impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_5 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_5::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_5::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_5 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_5 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_5::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_5 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_5 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_5::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_5 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_5 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_5::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_5 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_5::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_5 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_5::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_6 @@ -4377,12 +4633,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_6::t impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_6 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_6::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_6::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_6 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_6 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_6::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_6 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_6 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_6::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_6 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_6 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_6::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_6 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_6::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_6 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_6::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_7 @@ -4406,12 +4664,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_7::t impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_7 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_7::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_7::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_7 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_7 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_7::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_7 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_7 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_7::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_7 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_7 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_7::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_7 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_7::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_7 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_7::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_8 @@ -4438,12 +4698,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_8::t impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_8 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_8::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_8::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_8 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_8 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_8::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_8 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_8 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_8::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_8 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_8 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_8::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_8 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_8::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_8 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_8::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_9 @@ -4471,12 +4733,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_9::t impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_9 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_9::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_9::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_9 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_9 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_9::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_9 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_9 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_9::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_9 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_9 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_9::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_9 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_9::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_9 pub fn aya_ebpf_bindings::bindings::bpf_link_info__bindgen_ty_1__bindgen_ty_9::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_list_head @@ -4500,12 +4764,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_list_head::try_from(value: U) -> core::r impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_list_head where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_list_head::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_list_head::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_list_head where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_list_head where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_list_head::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_list_head where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_list_head where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_list_head::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_list_head where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_list_head where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_list_head::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_list_head where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_list_head::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_list_head pub fn aya_ebpf_bindings::bindings::bpf_list_head::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_list_node @@ -4529,12 +4795,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_list_node::try_from(value: U) -> core::r impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_list_node where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_list_node::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_list_node::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_list_node where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_list_node where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_list_node::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_list_node where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_list_node where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_list_node::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_list_node where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_list_node where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_list_node::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_list_node where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_list_node::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_list_node pub fn aya_ebpf_bindings::bindings::bpf_list_node::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_lpm_trie_key @@ -4556,11 +4824,11 @@ pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key::try_from(value: U) -> core impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_lpm_trie_key where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_lpm_trie_key::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_lpm_trie_key where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_lpm_trie_key where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_lpm_trie_key where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_lpm_trie_key where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_lpm_trie_key where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_lpm_trie_key where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf_bindings::bindings::bpf_lpm_trie_key pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key::from(t: T) -> T @@ -4585,12 +4853,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key_hdr::try_from(value: U) -> impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_hdr where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_lpm_trie_key_hdr::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key_hdr::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_hdr where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_hdr where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key_hdr::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_hdr where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_hdr where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key_hdr::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_hdr where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_hdr where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key_hdr::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_hdr where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key_hdr::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_hdr pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key_hdr::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8 @@ -4610,11 +4880,11 @@ pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8::try_from(value: U) -> c impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8 pub fn aya_ebpf_bindings::bindings::bpf_lpm_trie_key_u8::from(t: T) -> T @@ -4645,12 +4915,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_map_def::try_from(value: U) -> core::res impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_map_def where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_map_def::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_map_def::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_map_def where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_map_def where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_map_def::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_map_def where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_map_def where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_map_def::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_map_def where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_map_def where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_map_def::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_map_def where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_map_def::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_map_def pub fn aya_ebpf_bindings::bindings::bpf_map_def::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_map_info @@ -4689,12 +4961,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_map_info::try_from(value: U) -> core::re impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_map_info where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_map_info::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_map_info::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_map_info where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_map_info where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_map_info::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_map_info where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_map_info where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_map_info::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_map_info where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_map_info where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_map_info::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_map_info where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_map_info::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_map_info pub fn aya_ebpf_bindings::bindings::bpf_map_info::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_perf_event_data @@ -4717,12 +4991,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_perf_event_data::try_from(value: U) -> c impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_perf_event_data where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_perf_event_data::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_perf_event_data::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_perf_event_data where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_perf_event_data where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_perf_event_data::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_perf_event_data where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_perf_event_data where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_perf_event_data::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_perf_event_data where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_perf_event_data where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_perf_event_data::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_perf_event_data where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_perf_event_data::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_perf_event_data pub fn aya_ebpf_bindings::bindings::bpf_perf_event_data::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_perf_event_value @@ -4748,12 +5024,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_perf_event_value::try_from(value: U) -> impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_perf_event_value where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_perf_event_value::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_perf_event_value::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_perf_event_value where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_perf_event_value where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_perf_event_value::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_perf_event_value where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_perf_event_value where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_perf_event_value::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_perf_event_value where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_perf_event_value where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_perf_event_value::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_perf_event_value where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_perf_event_value::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_perf_event_value pub fn aya_ebpf_bindings::bindings::bpf_perf_event_value::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_pidns_info @@ -4778,12 +5056,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_pidns_info::try_from(value: U) -> core:: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_pidns_info where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_pidns_info::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_pidns_info::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_pidns_info where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_pidns_info where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_pidns_info::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_pidns_info where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_pidns_info where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_pidns_info::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_pidns_info where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_pidns_info where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_pidns_info::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_pidns_info where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_pidns_info::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_pidns_info pub fn aya_ebpf_bindings::bindings::bpf_pidns_info::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_prog_info @@ -4828,8 +5108,10 @@ pub aya_ebpf_bindings::bindings::bpf_prog_info::xlated_prog_insns: aya_ebpf_bind pub aya_ebpf_bindings::bindings::bpf_prog_info::xlated_prog_len: aya_ebpf_bindings::bindings::__u32 impl aya_ebpf_bindings::bindings::bpf_prog_info pub fn aya_ebpf_bindings::bindings::bpf_prog_info::gpl_compatible(&self) -> aya_ebpf_bindings::bindings::__u32 +pub unsafe fn aya_ebpf_bindings::bindings::bpf_prog_info::gpl_compatible_raw(this: *const Self) -> aya_ebpf_bindings::bindings::__u32 pub fn aya_ebpf_bindings::bindings::bpf_prog_info::new_bitfield_1(gpl_compatible: aya_ebpf_bindings::bindings::__u32) -> aya_ebpf_bindings::bindings::__BindgenBitfieldUnit<[u8; 4]> pub fn aya_ebpf_bindings::bindings::bpf_prog_info::set_gpl_compatible(&mut self, val: aya_ebpf_bindings::bindings::__u32) +pub unsafe fn aya_ebpf_bindings::bindings::bpf_prog_info::set_gpl_compatible_raw(this: *mut Self, val: aya_ebpf_bindings::bindings::__u32) impl core::clone::Clone for aya_ebpf_bindings::bindings::bpf_prog_info pub fn aya_ebpf_bindings::bindings::bpf_prog_info::clone(&self) -> aya_ebpf_bindings::bindings::bpf_prog_info impl core::fmt::Debug for aya_ebpf_bindings::bindings::bpf_prog_info @@ -4849,12 +5131,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_prog_info::try_from(value: U) -> core::r impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_prog_info where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_prog_info::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_prog_info::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_prog_info where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_prog_info where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_prog_info::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_prog_info where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_prog_info where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_prog_info::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_prog_info where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_prog_info where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_prog_info::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_prog_info where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_prog_info::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_prog_info pub fn aya_ebpf_bindings::bindings::bpf_prog_info::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_raw_tracepoint_args @@ -4875,11 +5159,11 @@ pub fn aya_ebpf_bindings::bindings::bpf_raw_tracepoint_args::try_from(value: U) impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_raw_tracepoint_args where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_raw_tracepoint_args::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_raw_tracepoint_args::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_raw_tracepoint_args where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_raw_tracepoint_args where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_raw_tracepoint_args::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_raw_tracepoint_args where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_raw_tracepoint_args where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_raw_tracepoint_args::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_raw_tracepoint_args where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_raw_tracepoint_args where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_raw_tracepoint_args::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf_bindings::bindings::bpf_raw_tracepoint_args pub fn aya_ebpf_bindings::bindings::bpf_raw_tracepoint_args::from(t: T) -> T @@ -4904,12 +5188,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_rb_node::try_from(value: U) -> core::res impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_rb_node where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_rb_node::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_rb_node::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_rb_node where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_rb_node where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_rb_node::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_rb_node where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_rb_node where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_rb_node::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_rb_node where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_rb_node where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_rb_node::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_rb_node where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_rb_node::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_rb_node pub fn aya_ebpf_bindings::bindings::bpf_rb_node::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_rb_root @@ -4933,12 +5219,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_rb_root::try_from(value: U) -> core::res impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_rb_root where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_rb_root::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_rb_root::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_rb_root where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_rb_root where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_rb_root::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_rb_root where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_rb_root where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_rb_root::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_rb_root where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_rb_root where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_rb_root::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_rb_root where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_rb_root::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_rb_root pub fn aya_ebpf_bindings::bindings::bpf_rb_root::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_redir_neigh @@ -4961,12 +5249,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_redir_neigh::try_from(value: U) -> core: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_redir_neigh where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_redir_neigh::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_redir_neigh::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_redir_neigh where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_redir_neigh where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_redir_neigh::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_redir_neigh where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_redir_neigh where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_redir_neigh::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_redir_neigh where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_redir_neigh where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_redir_neigh::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_redir_neigh where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_redir_neigh::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_redir_neigh pub fn aya_ebpf_bindings::bindings::bpf_redir_neigh::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_refcount @@ -4990,12 +5280,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_refcount::try_from(value: U) -> core::re impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_refcount where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_refcount::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_refcount::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_refcount where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_refcount where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_refcount::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_refcount where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_refcount where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_refcount::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_refcount where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_refcount where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_refcount::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_refcount where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_refcount::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_refcount pub fn aya_ebpf_bindings::bindings::bpf_refcount::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_sk_lookup @@ -5030,12 +5322,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_sk_lookup::try_from(value: U) -> core::r impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_sk_lookup where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_sk_lookup::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_sk_lookup::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sk_lookup where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sk_lookup where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sk_lookup::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sk_lookup where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sk_lookup where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sk_lookup::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sk_lookup where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sk_lookup where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sk_lookup::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_sk_lookup where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_sk_lookup::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_sk_lookup pub fn aya_ebpf_bindings::bindings::bpf_sk_lookup::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_sock @@ -5076,12 +5370,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_sock::try_from(value: U) -> core::result impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_sock where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_sock::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_sock::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_sock where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_sock::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_sock pub fn aya_ebpf_bindings::bindings::bpf_sock::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_sock_addr @@ -5112,12 +5408,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_sock_addr::try_from(value: U) -> core::r impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_sock_addr where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_sock_addr::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_sock_addr::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock_addr where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock_addr where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_addr::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock_addr where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock_addr where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_addr::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock_addr where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock_addr where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_addr::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_sock_addr where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_sock_addr::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_sock_addr pub fn aya_ebpf_bindings::bindings::bpf_sock_addr::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_sock_ops @@ -5179,12 +5477,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_sock_ops::try_from(value: U) -> core::re impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_sock_ops where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_sock_ops::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_sock_ops::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock_ops where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock_ops where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_ops::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock_ops where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock_ops where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_ops::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock_ops where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock_ops where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_ops::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_sock_ops where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_sock_ops::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_sock_ops pub fn aya_ebpf_bindings::bindings::bpf_sock_ops::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_sock_tuple @@ -5206,12 +5506,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple::try_from(value: U) -> core:: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_sock_tuple where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_sock_tuple::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock_tuple where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock_tuple where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock_tuple where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock_tuple where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock_tuple where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock_tuple where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_sock_tuple where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_sock_tuple::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_sock_tuple pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 @@ -5238,12 +5540,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1:: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 @@ -5270,12 +5574,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2:: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 pub fn aya_ebpf_bindings::bindings::bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_sockopt @@ -5303,12 +5609,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_sockopt::try_from(value: U) -> core::res impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_sockopt where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_sockopt::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_sockopt::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sockopt where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sockopt where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sockopt::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sockopt where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sockopt where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sockopt::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sockopt where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sockopt where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sockopt::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_sockopt where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_sockopt::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_sockopt pub fn aya_ebpf_bindings::bindings::bpf_sockopt::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_spin_lock @@ -5332,12 +5640,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_spin_lock::try_from(value: U) -> core::r impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_spin_lock where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_spin_lock::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_spin_lock::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_spin_lock where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_spin_lock where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_spin_lock::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_spin_lock where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_spin_lock where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_spin_lock::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_spin_lock where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_spin_lock where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_spin_lock::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_spin_lock where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_spin_lock::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_spin_lock pub fn aya_ebpf_bindings::bindings::bpf_spin_lock::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_stack_build_id @@ -5361,12 +5671,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_stack_build_id::try_from(value: U) -> co impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_stack_build_id where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_stack_build_id::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_stack_build_id::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_stack_build_id where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_stack_build_id where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_stack_build_id::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_stack_build_id where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_stack_build_id where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_stack_build_id::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_stack_build_id where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_stack_build_id where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_stack_build_id::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_stack_build_id where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_stack_build_id::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_stack_build_id pub fn aya_ebpf_bindings::bindings::bpf_stack_build_id::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_sysctl @@ -5391,12 +5703,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_sysctl::try_from(value: U) -> core::resu impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_sysctl where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_sysctl::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_sysctl::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sysctl where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_sysctl where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sysctl::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sysctl where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_sysctl where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sysctl::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sysctl where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_sysctl where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_sysctl::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_sysctl where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_sysctl::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_sysctl pub fn aya_ebpf_bindings::bindings::bpf_sysctl::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_tcp_sock @@ -5445,12 +5759,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_tcp_sock::try_from(value: U) -> core::re impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_tcp_sock where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_tcp_sock::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_tcp_sock::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_tcp_sock where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_tcp_sock where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_tcp_sock::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_tcp_sock where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_tcp_sock where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_tcp_sock::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_tcp_sock where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_tcp_sock where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_tcp_sock::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_tcp_sock where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_tcp_sock::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_tcp_sock pub fn aya_ebpf_bindings::bindings::bpf_tcp_sock::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_timer @@ -5474,12 +5790,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_timer::try_from(value: U) -> core::resul impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_timer where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_timer::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_timer::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_timer where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_timer where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_timer::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_timer where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_timer where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_timer::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_timer where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_timer where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_timer::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_timer where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_timer::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_timer pub fn aya_ebpf_bindings::bindings::bpf_timer::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_tunnel_key @@ -5507,12 +5825,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key::try_from(value: U) -> core:: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_tunnel_key where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_tunnel_key::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_tunnel_key where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_tunnel_key where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_tunnel_key where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_tunnel_key where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_tunnel_key where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_tunnel_key where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_tunnel_key where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_tunnel_key::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_tunnel_key pub fn aya_ebpf_bindings::bindings::bpf_tunnel_key::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_xdp_sock @@ -5536,12 +5856,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_xdp_sock::try_from(value: U) -> core::re impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_xdp_sock where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_xdp_sock::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_xdp_sock::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_xdp_sock where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_xdp_sock where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_xdp_sock::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_xdp_sock where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_xdp_sock where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_xdp_sock::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_xdp_sock where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_xdp_sock where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_xdp_sock::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_xdp_sock where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_xdp_sock::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_xdp_sock pub fn aya_ebpf_bindings::bindings::bpf_xdp_sock::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::bpf_xfrm_state @@ -5567,12 +5889,14 @@ pub fn aya_ebpf_bindings::bindings::bpf_xfrm_state::try_from(value: U) -> core:: impl core::convert::TryInto for aya_ebpf_bindings::bindings::bpf_xfrm_state where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::bpf_xfrm_state::Error = >::Error pub fn aya_ebpf_bindings::bindings::bpf_xfrm_state::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::bpf_xfrm_state where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::bpf_xfrm_state where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_xfrm_state::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_xfrm_state where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::bpf_xfrm_state where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_xfrm_state::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_xfrm_state where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::bpf_xfrm_state where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::bpf_xfrm_state::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::bpf_xfrm_state where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::bpf_xfrm_state::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::bpf_xfrm_state pub fn aya_ebpf_bindings::bindings::bpf_xfrm_state::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::btf_ptr @@ -5598,12 +5922,14 @@ pub fn aya_ebpf_bindings::bindings::btf_ptr::try_from(value: U) -> core::result: impl core::convert::TryInto for aya_ebpf_bindings::bindings::btf_ptr where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::btf_ptr::Error = >::Error pub fn aya_ebpf_bindings::bindings::btf_ptr::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::btf_ptr where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::btf_ptr where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::btf_ptr::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::btf_ptr where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::btf_ptr where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::btf_ptr::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::btf_ptr where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::btf_ptr where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::btf_ptr::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::btf_ptr where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::btf_ptr::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::btf_ptr pub fn aya_ebpf_bindings::bindings::btf_ptr::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::cgroup @@ -5626,12 +5952,14 @@ pub fn aya_ebpf_bindings::bindings::cgroup::try_from(value: U) -> core::result:: impl core::convert::TryInto for aya_ebpf_bindings::bindings::cgroup where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::cgroup::Error = >::Error pub fn aya_ebpf_bindings::bindings::cgroup::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::cgroup where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::cgroup where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::cgroup::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::cgroup where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::cgroup where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::cgroup::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::cgroup where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::cgroup where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::cgroup::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::cgroup where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::cgroup::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::cgroup pub fn aya_ebpf_bindings::bindings::cgroup::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::file @@ -5654,12 +5982,14 @@ pub fn aya_ebpf_bindings::bindings::file::try_from(value: U) -> core::result::Re impl core::convert::TryInto for aya_ebpf_bindings::bindings::file where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::file::Error = >::Error pub fn aya_ebpf_bindings::bindings::file::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::file where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::file where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::file::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::file where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::file where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::file::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::file where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::file where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::file::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::file where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::file::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::file pub fn aya_ebpf_bindings::bindings::file::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::inode @@ -5682,12 +6012,14 @@ pub fn aya_ebpf_bindings::bindings::inode::try_from(value: U) -> core::result::R impl core::convert::TryInto for aya_ebpf_bindings::bindings::inode where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::inode::Error = >::Error pub fn aya_ebpf_bindings::bindings::inode::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::inode where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::inode where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::inode::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::inode where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::inode where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::inode::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::inode where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::inode where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::inode::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::inode where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::inode::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::inode pub fn aya_ebpf_bindings::bindings::inode::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::iphdr @@ -5710,12 +6042,14 @@ pub fn aya_ebpf_bindings::bindings::iphdr::try_from(value: U) -> core::result::R impl core::convert::TryInto for aya_ebpf_bindings::bindings::iphdr where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::iphdr::Error = >::Error pub fn aya_ebpf_bindings::bindings::iphdr::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::iphdr where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::iphdr where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::iphdr::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::iphdr where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::iphdr where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::iphdr::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::iphdr where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::iphdr where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::iphdr::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::iphdr where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::iphdr::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::iphdr pub fn aya_ebpf_bindings::bindings::iphdr::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::ipv6hdr @@ -5738,12 +6072,14 @@ pub fn aya_ebpf_bindings::bindings::ipv6hdr::try_from(value: U) -> core::result: impl core::convert::TryInto for aya_ebpf_bindings::bindings::ipv6hdr where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::ipv6hdr::Error = >::Error pub fn aya_ebpf_bindings::bindings::ipv6hdr::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::ipv6hdr where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::ipv6hdr where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::ipv6hdr::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::ipv6hdr where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::ipv6hdr where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::ipv6hdr::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::ipv6hdr where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::ipv6hdr where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::ipv6hdr::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::ipv6hdr where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::ipv6hdr::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::ipv6hdr pub fn aya_ebpf_bindings::bindings::ipv6hdr::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::linux_binprm @@ -5766,12 +6102,14 @@ pub fn aya_ebpf_bindings::bindings::linux_binprm::try_from(value: U) -> core::re impl core::convert::TryInto for aya_ebpf_bindings::bindings::linux_binprm where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::linux_binprm::Error = >::Error pub fn aya_ebpf_bindings::bindings::linux_binprm::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::linux_binprm where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::linux_binprm where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::linux_binprm::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::linux_binprm where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::linux_binprm where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::linux_binprm::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::linux_binprm where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::linux_binprm where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::linux_binprm::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::linux_binprm where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::linux_binprm::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::linux_binprm pub fn aya_ebpf_bindings::bindings::linux_binprm::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::mptcp_sock @@ -5794,12 +6132,14 @@ pub fn aya_ebpf_bindings::bindings::mptcp_sock::try_from(value: U) -> core::resu impl core::convert::TryInto for aya_ebpf_bindings::bindings::mptcp_sock where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::mptcp_sock::Error = >::Error pub fn aya_ebpf_bindings::bindings::mptcp_sock::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::mptcp_sock where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::mptcp_sock where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::mptcp_sock::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::mptcp_sock where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::mptcp_sock where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::mptcp_sock::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::mptcp_sock where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::mptcp_sock where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::mptcp_sock::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::mptcp_sock where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::mptcp_sock::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::mptcp_sock pub fn aya_ebpf_bindings::bindings::mptcp_sock::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::path @@ -5822,12 +6162,14 @@ pub fn aya_ebpf_bindings::bindings::path::try_from(value: U) -> core::result::Re impl core::convert::TryInto for aya_ebpf_bindings::bindings::path where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::path::Error = >::Error pub fn aya_ebpf_bindings::bindings::path::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::path where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::path where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::path::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::path where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::path where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::path::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::path where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::path where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::path::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::path where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::path::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::path pub fn aya_ebpf_bindings::bindings::path::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::pt_regs @@ -5871,12 +6213,14 @@ pub fn aya_ebpf_bindings::bindings::pt_regs::try_from(value: U) -> core::result: impl core::convert::TryInto for aya_ebpf_bindings::bindings::pt_regs where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::pt_regs::Error = >::Error pub fn aya_ebpf_bindings::bindings::pt_regs::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::pt_regs where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::pt_regs where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::pt_regs::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::pt_regs where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::pt_regs where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::pt_regs::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::pt_regs where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::pt_regs where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::pt_regs::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::pt_regs where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::pt_regs::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::pt_regs pub fn aya_ebpf_bindings::bindings::pt_regs::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::seq_file @@ -5899,12 +6243,14 @@ pub fn aya_ebpf_bindings::bindings::seq_file::try_from(value: U) -> core::result impl core::convert::TryInto for aya_ebpf_bindings::bindings::seq_file where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::seq_file::Error = >::Error pub fn aya_ebpf_bindings::bindings::seq_file::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::seq_file where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::seq_file where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::seq_file::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::seq_file where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::seq_file where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::seq_file::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::seq_file where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::seq_file where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::seq_file::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::seq_file where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::seq_file::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::seq_file pub fn aya_ebpf_bindings::bindings::seq_file::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::sk_msg_md @@ -5936,12 +6282,14 @@ pub fn aya_ebpf_bindings::bindings::sk_msg_md::try_from(value: U) -> core::resul impl core::convert::TryInto for aya_ebpf_bindings::bindings::sk_msg_md where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::sk_msg_md::Error = >::Error pub fn aya_ebpf_bindings::bindings::sk_msg_md::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::sk_msg_md where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::sk_msg_md where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_msg_md::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::sk_msg_md where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::sk_msg_md where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_msg_md::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::sk_msg_md where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::sk_msg_md where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_msg_md::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::sk_msg_md where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::sk_msg_md::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::sk_msg_md pub fn aya_ebpf_bindings::bindings::sk_msg_md::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::sk_reuseport_md @@ -5971,12 +6319,14 @@ pub fn aya_ebpf_bindings::bindings::sk_reuseport_md::try_from(value: U) -> core: impl core::convert::TryInto for aya_ebpf_bindings::bindings::sk_reuseport_md where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::sk_reuseport_md::Error = >::Error pub fn aya_ebpf_bindings::bindings::sk_reuseport_md::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::sk_reuseport_md where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::sk_reuseport_md where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_reuseport_md::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::sk_reuseport_md where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::sk_reuseport_md where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_reuseport_md::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::sk_reuseport_md where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::sk_reuseport_md where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sk_reuseport_md::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::sk_reuseport_md where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::sk_reuseport_md::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::sk_reuseport_md pub fn aya_ebpf_bindings::bindings::sk_reuseport_md::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::sockaddr @@ -6001,12 +6351,14 @@ pub fn aya_ebpf_bindings::bindings::sockaddr::try_from(value: U) -> core::result impl core::convert::TryInto for aya_ebpf_bindings::bindings::sockaddr where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::sockaddr::Error = >::Error pub fn aya_ebpf_bindings::bindings::sockaddr::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::sockaddr where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::sockaddr where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sockaddr::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::sockaddr where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::sockaddr where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sockaddr::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::sockaddr where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::sockaddr where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::sockaddr::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::sockaddr where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::sockaddr::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::sockaddr pub fn aya_ebpf_bindings::bindings::sockaddr::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::socket @@ -6029,12 +6381,14 @@ pub fn aya_ebpf_bindings::bindings::socket::try_from(value: U) -> core::result:: impl core::convert::TryInto for aya_ebpf_bindings::bindings::socket where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::socket::Error = >::Error pub fn aya_ebpf_bindings::bindings::socket::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::socket where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::socket where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::socket::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::socket where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::socket where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::socket::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::socket where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::socket where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::socket::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::socket where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::socket::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::socket pub fn aya_ebpf_bindings::bindings::socket::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::task_struct @@ -6057,12 +6411,14 @@ pub fn aya_ebpf_bindings::bindings::task_struct::try_from(value: U) -> core::res impl core::convert::TryInto for aya_ebpf_bindings::bindings::task_struct where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::task_struct::Error = >::Error pub fn aya_ebpf_bindings::bindings::task_struct::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::task_struct where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::task_struct where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::task_struct::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::task_struct where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::task_struct where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::task_struct::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::task_struct where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::task_struct where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::task_struct::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::task_struct where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::task_struct::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::task_struct pub fn aya_ebpf_bindings::bindings::task_struct::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::tcp6_sock @@ -6085,12 +6441,14 @@ pub fn aya_ebpf_bindings::bindings::tcp6_sock::try_from(value: U) -> core::resul impl core::convert::TryInto for aya_ebpf_bindings::bindings::tcp6_sock where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::tcp6_sock::Error = >::Error pub fn aya_ebpf_bindings::bindings::tcp6_sock::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::tcp6_sock where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::tcp6_sock where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::tcp6_sock::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::tcp6_sock where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::tcp6_sock where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::tcp6_sock::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::tcp6_sock where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::tcp6_sock where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::tcp6_sock::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::tcp6_sock where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::tcp6_sock::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::tcp6_sock pub fn aya_ebpf_bindings::bindings::tcp6_sock::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::tcp_request_sock @@ -6113,12 +6471,14 @@ pub fn aya_ebpf_bindings::bindings::tcp_request_sock::try_from(value: U) -> core impl core::convert::TryInto for aya_ebpf_bindings::bindings::tcp_request_sock where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::tcp_request_sock::Error = >::Error pub fn aya_ebpf_bindings::bindings::tcp_request_sock::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::tcp_request_sock where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::tcp_request_sock where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::tcp_request_sock::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::tcp_request_sock where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::tcp_request_sock where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::tcp_request_sock::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::tcp_request_sock where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::tcp_request_sock where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::tcp_request_sock::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::tcp_request_sock where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::tcp_request_sock::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::tcp_request_sock pub fn aya_ebpf_bindings::bindings::tcp_request_sock::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::tcp_sock @@ -6141,12 +6501,14 @@ pub fn aya_ebpf_bindings::bindings::tcp_sock::try_from(value: U) -> core::result impl core::convert::TryInto for aya_ebpf_bindings::bindings::tcp_sock where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::tcp_sock::Error = >::Error pub fn aya_ebpf_bindings::bindings::tcp_sock::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::tcp_sock where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::tcp_sock where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::tcp_sock::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::tcp_sock where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::tcp_sock where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::tcp_sock::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::tcp_sock where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::tcp_sock where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::tcp_sock::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::tcp_sock where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::tcp_sock::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::tcp_sock pub fn aya_ebpf_bindings::bindings::tcp_sock::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::tcp_timewait_sock @@ -6169,12 +6531,14 @@ pub fn aya_ebpf_bindings::bindings::tcp_timewait_sock::try_from(value: U) -> cor impl core::convert::TryInto for aya_ebpf_bindings::bindings::tcp_timewait_sock where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::tcp_timewait_sock::Error = >::Error pub fn aya_ebpf_bindings::bindings::tcp_timewait_sock::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::tcp_timewait_sock where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::tcp_timewait_sock where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::tcp_timewait_sock::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::tcp_timewait_sock where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::tcp_timewait_sock where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::tcp_timewait_sock::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::tcp_timewait_sock where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::tcp_timewait_sock where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::tcp_timewait_sock::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::tcp_timewait_sock where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::tcp_timewait_sock::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::tcp_timewait_sock pub fn aya_ebpf_bindings::bindings::tcp_timewait_sock::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::tcphdr @@ -6197,12 +6561,14 @@ pub fn aya_ebpf_bindings::bindings::tcphdr::try_from(value: U) -> core::result:: impl core::convert::TryInto for aya_ebpf_bindings::bindings::tcphdr where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::tcphdr::Error = >::Error pub fn aya_ebpf_bindings::bindings::tcphdr::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::tcphdr where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::tcphdr where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::tcphdr::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::tcphdr where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::tcphdr where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::tcphdr::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::tcphdr where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::tcphdr where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::tcphdr::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::tcphdr where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::tcphdr::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::tcphdr pub fn aya_ebpf_bindings::bindings::tcphdr::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::udp6_sock @@ -6225,12 +6591,14 @@ pub fn aya_ebpf_bindings::bindings::udp6_sock::try_from(value: U) -> core::resul impl core::convert::TryInto for aya_ebpf_bindings::bindings::udp6_sock where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::udp6_sock::Error = >::Error pub fn aya_ebpf_bindings::bindings::udp6_sock::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::udp6_sock where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::udp6_sock where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::udp6_sock::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::udp6_sock where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::udp6_sock where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::udp6_sock::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::udp6_sock where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::udp6_sock where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::udp6_sock::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::udp6_sock where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::udp6_sock::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::udp6_sock pub fn aya_ebpf_bindings::bindings::udp6_sock::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::unix_sock @@ -6253,12 +6621,14 @@ pub fn aya_ebpf_bindings::bindings::unix_sock::try_from(value: U) -> core::resul impl core::convert::TryInto for aya_ebpf_bindings::bindings::unix_sock where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::unix_sock::Error = >::Error pub fn aya_ebpf_bindings::bindings::unix_sock::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::unix_sock where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::unix_sock where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::unix_sock::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::unix_sock where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::unix_sock where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::unix_sock::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::unix_sock where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::unix_sock where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::unix_sock::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::unix_sock where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::unix_sock::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::unix_sock pub fn aya_ebpf_bindings::bindings::unix_sock::from(t: T) -> T #[repr(C)] pub struct aya_ebpf_bindings::bindings::xdp_md @@ -6287,350 +6657,360 @@ pub fn aya_ebpf_bindings::bindings::xdp_md::try_from(value: U) -> core::result:: impl core::convert::TryInto for aya_ebpf_bindings::bindings::xdp_md where U: core::convert::TryFrom pub type aya_ebpf_bindings::bindings::xdp_md::Error = >::Error pub fn aya_ebpf_bindings::bindings::xdp_md::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf_bindings::bindings::xdp_md where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf_bindings::bindings::xdp_md where T: 'static + ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::xdp_md::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf_bindings::bindings::xdp_md where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf_bindings::bindings::xdp_md where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::xdp_md::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::xdp_md where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf_bindings::bindings::xdp_md where T: ?core::marker::Sized pub fn aya_ebpf_bindings::bindings::xdp_md::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf_bindings::bindings::xdp_md where T: core::clone::Clone +pub unsafe fn aya_ebpf_bindings::bindings::xdp_md::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf_bindings::bindings::xdp_md pub fn aya_ebpf_bindings::bindings::xdp_md::from(t: T) -> T -pub const aya_ebpf_bindings::bindings::BPF_ABS: u32 = 32u32 -pub const aya_ebpf_bindings::bindings::BPF_ADD: u32 = 0u32 -pub const aya_ebpf_bindings::bindings::BPF_ADJ_ROOM_ENCAP_L2_MASK: aya_ebpf_bindings::bindings::_bindgen_ty_18 = 255u32 -pub const aya_ebpf_bindings::bindings::BPF_ADJ_ROOM_ENCAP_L2_SHIFT: aya_ebpf_bindings::bindings::_bindgen_ty_18 = 56u32 -pub const aya_ebpf_bindings::bindings::BPF_ALU: u32 = 4u32 -pub const aya_ebpf_bindings::bindings::BPF_ALU64: u32 = 7u32 -pub const aya_ebpf_bindings::bindings::BPF_AND: u32 = 80u32 -pub const aya_ebpf_bindings::bindings::BPF_ANY: aya_ebpf_bindings::bindings::_bindgen_ty_4 = 0u32 -pub const aya_ebpf_bindings::bindings::BPF_ARSH: u32 = 192u32 -pub const aya_ebpf_bindings::bindings::BPF_ATOMIC: u32 = 192u32 -pub const aya_ebpf_bindings::bindings::BPF_B: u32 = 16u32 -pub const aya_ebpf_bindings::bindings::BPF_BUILD_ID_SIZE: u32 = 20u32 -pub const aya_ebpf_bindings::bindings::BPF_CALL: u32 = 128u32 -pub const aya_ebpf_bindings::bindings::BPF_CMPXCHG: u32 = 241u32 -pub const aya_ebpf_bindings::bindings::BPF_CSUM_LEVEL_DEC: aya_ebpf_bindings::bindings::_bindgen_ty_16 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_CSUM_LEVEL_INC: aya_ebpf_bindings::bindings::_bindgen_ty_16 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_CSUM_LEVEL_QUERY: aya_ebpf_bindings::bindings::_bindgen_ty_16 = 0u32 -pub const aya_ebpf_bindings::bindings::BPF_CSUM_LEVEL_RESET: aya_ebpf_bindings::bindings::_bindgen_ty_16 = 3u32 -pub const aya_ebpf_bindings::bindings::BPF_DEVCG_ACC_MKNOD: aya_ebpf_bindings::bindings::_bindgen_ty_35 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_DEVCG_ACC_READ: aya_ebpf_bindings::bindings::_bindgen_ty_35 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_DEVCG_ACC_WRITE: aya_ebpf_bindings::bindings::_bindgen_ty_35 = 4u32 -pub const aya_ebpf_bindings::bindings::BPF_DEVCG_DEV_BLOCK: aya_ebpf_bindings::bindings::_bindgen_ty_36 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_DEVCG_DEV_CHAR: aya_ebpf_bindings::bindings::_bindgen_ty_36 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_DIV: u32 = 48u32 -pub const aya_ebpf_bindings::bindings::BPF_DW: u32 = 24u32 -pub const aya_ebpf_bindings::bindings::BPF_END: u32 = 208u32 -pub const aya_ebpf_bindings::bindings::BPF_EXIST: aya_ebpf_bindings::bindings::_bindgen_ty_4 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_EXIT: u32 = 144u32 -pub const aya_ebpf_bindings::bindings::BPF_FETCH: u32 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_FIB_LKUP_RET_BLACKHOLE: aya_ebpf_bindings::bindings::_bindgen_ty_38 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_FIB_LKUP_RET_FRAG_NEEDED: aya_ebpf_bindings::bindings::_bindgen_ty_38 = 8u32 -pub const aya_ebpf_bindings::bindings::BPF_FIB_LKUP_RET_FWD_DISABLED: aya_ebpf_bindings::bindings::_bindgen_ty_38 = 5u32 -pub const aya_ebpf_bindings::bindings::BPF_FIB_LKUP_RET_NOT_FWDED: aya_ebpf_bindings::bindings::_bindgen_ty_38 = 4u32 -pub const aya_ebpf_bindings::bindings::BPF_FIB_LKUP_RET_NO_NEIGH: aya_ebpf_bindings::bindings::_bindgen_ty_38 = 7u32 -pub const aya_ebpf_bindings::bindings::BPF_FIB_LKUP_RET_NO_SRC_ADDR: aya_ebpf_bindings::bindings::_bindgen_ty_38 = 9u32 -pub const aya_ebpf_bindings::bindings::BPF_FIB_LKUP_RET_PROHIBIT: aya_ebpf_bindings::bindings::_bindgen_ty_38 = 3u32 -pub const aya_ebpf_bindings::bindings::BPF_FIB_LKUP_RET_SUCCESS: aya_ebpf_bindings::bindings::_bindgen_ty_38 = 0u32 -pub const aya_ebpf_bindings::bindings::BPF_FIB_LKUP_RET_UNREACHABLE: aya_ebpf_bindings::bindings::_bindgen_ty_38 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_FIB_LKUP_RET_UNSUPP_LWT: aya_ebpf_bindings::bindings::_bindgen_ty_38 = 6u32 -pub const aya_ebpf_bindings::bindings::BPF_FIB_LOOKUP_DIRECT: aya_ebpf_bindings::bindings::_bindgen_ty_37 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_FIB_LOOKUP_OUTPUT: aya_ebpf_bindings::bindings::_bindgen_ty_37 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_FIB_LOOKUP_SKIP_NEIGH: aya_ebpf_bindings::bindings::_bindgen_ty_37 = 4u32 -pub const aya_ebpf_bindings::bindings::BPF_FIB_LOOKUP_SRC: aya_ebpf_bindings::bindings::_bindgen_ty_37 = 16u32 -pub const aya_ebpf_bindings::bindings::BPF_FIB_LOOKUP_TBID: aya_ebpf_bindings::bindings::_bindgen_ty_37 = 8u32 -pub const aya_ebpf_bindings::bindings::BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: aya_ebpf_bindings::bindings::_bindgen_ty_39 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: aya_ebpf_bindings::bindings::_bindgen_ty_39 = 4u32 -pub const aya_ebpf_bindings::bindings::BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: aya_ebpf_bindings::bindings::_bindgen_ty_39 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_FROM_BE: u32 = 8u32 -pub const aya_ebpf_bindings::bindings::BPF_FROM_LE: u32 = 0u32 -pub const aya_ebpf_bindings::bindings::BPF_F_ADJ_ROOM_DECAP_L3_IPV4: aya_ebpf_bindings::bindings::_bindgen_ty_17 = 128u32 -pub const aya_ebpf_bindings::bindings::BPF_F_ADJ_ROOM_DECAP_L3_IPV6: aya_ebpf_bindings::bindings::_bindgen_ty_17 = 256u32 -pub const aya_ebpf_bindings::bindings::BPF_F_ADJ_ROOM_ENCAP_L2_ETH: aya_ebpf_bindings::bindings::_bindgen_ty_17 = 64u32 -pub const aya_ebpf_bindings::bindings::BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: aya_ebpf_bindings::bindings::_bindgen_ty_17 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: aya_ebpf_bindings::bindings::_bindgen_ty_17 = 4u32 -pub const aya_ebpf_bindings::bindings::BPF_F_ADJ_ROOM_ENCAP_L4_GRE: aya_ebpf_bindings::bindings::_bindgen_ty_17 = 8u32 -pub const aya_ebpf_bindings::bindings::BPF_F_ADJ_ROOM_ENCAP_L4_UDP: aya_ebpf_bindings::bindings::_bindgen_ty_17 = 16u32 -pub const aya_ebpf_bindings::bindings::BPF_F_ADJ_ROOM_FIXED_GSO: aya_ebpf_bindings::bindings::_bindgen_ty_17 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_F_ADJ_ROOM_NO_CSUM_RESET: aya_ebpf_bindings::bindings::_bindgen_ty_17 = 32u32 -pub const aya_ebpf_bindings::bindings::BPF_F_AFTER: u32 = 16u32 -pub const aya_ebpf_bindings::bindings::BPF_F_ALLOW_MULTI: u32 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_F_ALLOW_OVERRIDE: u32 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_F_ANY_ALIGNMENT: u32 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_F_BEFORE: u32 = 8u32 -pub const aya_ebpf_bindings::bindings::BPF_F_BPRM_SECUREEXEC: aya_ebpf_bindings::bindings::_bindgen_ty_26 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_F_BROADCAST: aya_ebpf_bindings::bindings::_bindgen_ty_27 = 8u32 -pub const aya_ebpf_bindings::bindings::BPF_F_CLONE: aya_ebpf_bindings::bindings::_bindgen_ty_5 = 512u32 -pub const aya_ebpf_bindings::bindings::BPF_F_CTXLEN_MASK: aya_ebpf_bindings::bindings::_bindgen_ty_14 = 4_503_595_332_403_200u64 -pub const aya_ebpf_bindings::bindings::BPF_F_CURRENT_CPU: aya_ebpf_bindings::bindings::_bindgen_ty_14 = 4_294_967_295u64 -pub const aya_ebpf_bindings::bindings::BPF_F_CURRENT_NETNS: aya_ebpf_bindings::bindings::_bindgen_ty_15 = -1i32 -pub const aya_ebpf_bindings::bindings::BPF_F_DONT_FRAGMENT: aya_ebpf_bindings::bindings::_bindgen_ty_12 = 4u32 -pub const aya_ebpf_bindings::bindings::BPF_F_EXCLUDE_INGRESS: aya_ebpf_bindings::bindings::_bindgen_ty_27 = 16u32 -pub const aya_ebpf_bindings::bindings::BPF_F_FAST_STACK_CMP: aya_ebpf_bindings::bindings::_bindgen_ty_11 = 512u32 -pub const aya_ebpf_bindings::bindings::BPF_F_GET_BRANCH_RECORDS_SIZE: aya_ebpf_bindings::bindings::_bindgen_ty_21 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_F_HDR_FIELD_MASK: aya_ebpf_bindings::bindings::_bindgen_ty_7 = 15u32 -pub const aya_ebpf_bindings::bindings::BPF_F_ID: u32 = 32u32 -pub const aya_ebpf_bindings::bindings::BPF_F_INDEX_MASK: aya_ebpf_bindings::bindings::_bindgen_ty_14 = 4_294_967_295u64 -pub const aya_ebpf_bindings::bindings::BPF_F_INGRESS: aya_ebpf_bindings::bindings::_bindgen_ty_9 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_F_INNER_MAP: aya_ebpf_bindings::bindings::_bindgen_ty_5 = 4_096u32 -pub const aya_ebpf_bindings::bindings::BPF_F_INVALIDATE_HASH: aya_ebpf_bindings::bindings::_bindgen_ty_6 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_F_KPROBE_MULTI_RETURN: aya_ebpf_bindings::bindings::_bindgen_ty_2 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_F_LINK: aya_ebpf_bindings::bindings::_bindgen_ty_5 = 8_192u32 -pub const aya_ebpf_bindings::bindings::BPF_F_LOCK: aya_ebpf_bindings::bindings::_bindgen_ty_4 = 4u32 -pub const aya_ebpf_bindings::bindings::BPF_F_MARK_ENFORCE: aya_ebpf_bindings::bindings::_bindgen_ty_8 = 64u32 -pub const aya_ebpf_bindings::bindings::BPF_F_MARK_MANGLED_0: aya_ebpf_bindings::bindings::_bindgen_ty_8 = 32u32 -pub const aya_ebpf_bindings::bindings::BPF_F_MMAPABLE: aya_ebpf_bindings::bindings::_bindgen_ty_5 = 1_024u32 -pub const aya_ebpf_bindings::bindings::BPF_F_NETFILTER_IP_DEFRAG: u32 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_F_NO_COMMON_LRU: aya_ebpf_bindings::bindings::_bindgen_ty_5 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_F_NO_PREALLOC: aya_ebpf_bindings::bindings::_bindgen_ty_5 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_F_NO_TUNNEL_KEY: aya_ebpf_bindings::bindings::_bindgen_ty_12 = 16u32 -pub const aya_ebpf_bindings::bindings::BPF_F_NO_USER_CONV: aya_ebpf_bindings::bindings::_bindgen_ty_5 = 262_144u32 -pub const aya_ebpf_bindings::bindings::BPF_F_NUMA_NODE: aya_ebpf_bindings::bindings::_bindgen_ty_5 = 4u32 -pub const aya_ebpf_bindings::bindings::BPF_F_PATH_FD: aya_ebpf_bindings::bindings::_bindgen_ty_5 = 16_384u32 -pub const aya_ebpf_bindings::bindings::BPF_F_PRESERVE_ELEMS: aya_ebpf_bindings::bindings::_bindgen_ty_5 = 2_048u32 -pub const aya_ebpf_bindings::bindings::BPF_F_PSEUDO_HDR: aya_ebpf_bindings::bindings::_bindgen_ty_8 = 16u32 -pub const aya_ebpf_bindings::bindings::BPF_F_QUERY_EFFECTIVE: u32 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_F_RDONLY: aya_ebpf_bindings::bindings::_bindgen_ty_5 = 8u32 -pub const aya_ebpf_bindings::bindings::BPF_F_RDONLY_PROG: aya_ebpf_bindings::bindings::_bindgen_ty_5 = 128u32 -pub const aya_ebpf_bindings::bindings::BPF_F_RECOMPUTE_CSUM: aya_ebpf_bindings::bindings::_bindgen_ty_6 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_F_REPLACE: u32 = 4u32 -pub const aya_ebpf_bindings::bindings::BPF_F_REUSE_STACKID: aya_ebpf_bindings::bindings::_bindgen_ty_11 = 1_024u32 -pub const aya_ebpf_bindings::bindings::BPF_F_SEGV_ON_FAULT: aya_ebpf_bindings::bindings::_bindgen_ty_5 = 131_072u32 -pub const aya_ebpf_bindings::bindings::BPF_F_SEQ_NUMBER: aya_ebpf_bindings::bindings::_bindgen_ty_12 = 8u32 -pub const aya_ebpf_bindings::bindings::BPF_F_SKIP_FIELD_MASK: aya_ebpf_bindings::bindings::_bindgen_ty_11 = 255u32 -pub const aya_ebpf_bindings::bindings::BPF_F_SLEEPABLE: u32 = 16u32 -pub const aya_ebpf_bindings::bindings::BPF_F_STACK_BUILD_ID: aya_ebpf_bindings::bindings::_bindgen_ty_5 = 32u32 -pub const aya_ebpf_bindings::bindings::BPF_F_STRICT_ALIGNMENT: u32 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_F_SYSCTL_BASE_NAME: aya_ebpf_bindings::bindings::_bindgen_ty_19 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_F_TEST_REG_INVARIANTS: u32 = 128u32 -pub const aya_ebpf_bindings::bindings::BPF_F_TEST_RND_HI32: u32 = 4u32 -pub const aya_ebpf_bindings::bindings::BPF_F_TEST_RUN_ON_CPU: u32 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_F_TEST_STATE_FREQ: u32 = 8u32 -pub const aya_ebpf_bindings::bindings::BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_F_TIMER_ABS: aya_ebpf_bindings::bindings::_bindgen_ty_41 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_F_TIMER_CPU_PIN: aya_ebpf_bindings::bindings::_bindgen_ty_41 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_F_TOKEN_FD: aya_ebpf_bindings::bindings::_bindgen_ty_5 = 65_536u32 -pub const aya_ebpf_bindings::bindings::BPF_F_TUNINFO_FLAGS: aya_ebpf_bindings::bindings::_bindgen_ty_13 = 16u32 -pub const aya_ebpf_bindings::bindings::BPF_F_TUNINFO_IPV6: aya_ebpf_bindings::bindings::_bindgen_ty_10 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_F_UPROBE_MULTI_RETURN: aya_ebpf_bindings::bindings::_bindgen_ty_3 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_F_USER_BUILD_ID: aya_ebpf_bindings::bindings::_bindgen_ty_11 = 2_048u32 -pub const aya_ebpf_bindings::bindings::BPF_F_USER_STACK: aya_ebpf_bindings::bindings::_bindgen_ty_11 = 256u32 -pub const aya_ebpf_bindings::bindings::BPF_F_VTYPE_BTF_OBJ_FD: aya_ebpf_bindings::bindings::_bindgen_ty_5 = 32_768u32 -pub const aya_ebpf_bindings::bindings::BPF_F_WRONLY: aya_ebpf_bindings::bindings::_bindgen_ty_5 = 16u32 -pub const aya_ebpf_bindings::bindings::BPF_F_WRONLY_PROG: aya_ebpf_bindings::bindings::_bindgen_ty_5 = 256u32 -pub const aya_ebpf_bindings::bindings::BPF_F_XDP_DEV_BOUND_ONLY: u32 = 64u32 -pub const aya_ebpf_bindings::bindings::BPF_F_XDP_HAS_FRAGS: u32 = 32u32 -pub const aya_ebpf_bindings::bindings::BPF_F_ZERO_CSUM_TX: aya_ebpf_bindings::bindings::_bindgen_ty_12 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_F_ZERO_SEED: aya_ebpf_bindings::bindings::_bindgen_ty_5 = 64u32 -pub const aya_ebpf_bindings::bindings::BPF_H: u32 = 8u32 -pub const aya_ebpf_bindings::bindings::BPF_IMM: u32 = 0u32 -pub const aya_ebpf_bindings::bindings::BPF_IND: u32 = 64u32 -pub const aya_ebpf_bindings::bindings::BPF_JA: u32 = 0u32 -pub const aya_ebpf_bindings::bindings::BPF_JCOND: u32 = 224u32 -pub const aya_ebpf_bindings::bindings::BPF_JEQ: u32 = 16u32 -pub const aya_ebpf_bindings::bindings::BPF_JGE: u32 = 48u32 -pub const aya_ebpf_bindings::bindings::BPF_JGT: u32 = 32u32 -pub const aya_ebpf_bindings::bindings::BPF_JLE: u32 = 176u32 -pub const aya_ebpf_bindings::bindings::BPF_JLT: u32 = 160u32 -pub const aya_ebpf_bindings::bindings::BPF_JMP: u32 = 5u32 -pub const aya_ebpf_bindings::bindings::BPF_JMP32: u32 = 6u32 -pub const aya_ebpf_bindings::bindings::BPF_JNE: u32 = 80u32 -pub const aya_ebpf_bindings::bindings::BPF_JSET: u32 = 64u32 -pub const aya_ebpf_bindings::bindings::BPF_JSGE: u32 = 112u32 -pub const aya_ebpf_bindings::bindings::BPF_JSGT: u32 = 96u32 -pub const aya_ebpf_bindings::bindings::BPF_JSLE: u32 = 208u32 -pub const aya_ebpf_bindings::bindings::BPF_JSLT: u32 = 192u32 -pub const aya_ebpf_bindings::bindings::BPF_K: u32 = 0u32 -pub const aya_ebpf_bindings::bindings::BPF_LD: u32 = 0u32 -pub const aya_ebpf_bindings::bindings::BPF_LDX: u32 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_LEN: u32 = 128u32 -pub const aya_ebpf_bindings::bindings::BPF_LOCAL_STORAGE_GET_F_CREATE: aya_ebpf_bindings::bindings::_bindgen_ty_20 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_LSH: u32 = 96u32 -pub const aya_ebpf_bindings::bindings::BPF_MAXINSNS: u32 = 4_096u32 -pub const aya_ebpf_bindings::bindings::BPF_MEM: u32 = 96u32 -pub const aya_ebpf_bindings::bindings::BPF_MEMSX: u32 = 128u32 -pub const aya_ebpf_bindings::bindings::BPF_MISC: u32 = 7u32 -pub const aya_ebpf_bindings::bindings::BPF_MOD: u32 = 144u32 -pub const aya_ebpf_bindings::bindings::BPF_MOV: u32 = 176u32 -pub const aya_ebpf_bindings::bindings::BPF_MSH: u32 = 160u32 -pub const aya_ebpf_bindings::bindings::BPF_MUL: u32 = 32u32 -pub const aya_ebpf_bindings::bindings::BPF_NEG: u32 = 128u32 -pub const aya_ebpf_bindings::bindings::BPF_NOEXIST: aya_ebpf_bindings::bindings::_bindgen_ty_4 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_OBJ_NAME_LEN: u32 = 16u32 -pub const aya_ebpf_bindings::bindings::BPF_OR: u32 = 64u32 -pub const aya_ebpf_bindings::bindings::BPF_PSEUDO_BTF_ID: u32 = 3u32 -pub const aya_ebpf_bindings::bindings::BPF_PSEUDO_CALL: u32 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_PSEUDO_FUNC: u32 = 4u32 -pub const aya_ebpf_bindings::bindings::BPF_PSEUDO_KFUNC_CALL: u32 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_PSEUDO_MAP_FD: u32 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_PSEUDO_MAP_IDX: u32 = 5u32 -pub const aya_ebpf_bindings::bindings::BPF_PSEUDO_MAP_IDX_VALUE: u32 = 6u32 -pub const aya_ebpf_bindings::bindings::BPF_PSEUDO_MAP_VALUE: u32 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_RB_AVAIL_DATA: aya_ebpf_bindings::bindings::_bindgen_ty_23 = 0u32 -pub const aya_ebpf_bindings::bindings::BPF_RB_CONS_POS: aya_ebpf_bindings::bindings::_bindgen_ty_23 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_RB_FORCE_WAKEUP: aya_ebpf_bindings::bindings::_bindgen_ty_22 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_RB_NO_WAKEUP: aya_ebpf_bindings::bindings::_bindgen_ty_22 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_RB_PROD_POS: aya_ebpf_bindings::bindings::_bindgen_ty_23 = 3u32 -pub const aya_ebpf_bindings::bindings::BPF_RB_RING_SIZE: aya_ebpf_bindings::bindings::_bindgen_ty_23 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_REG_0: aya_ebpf_bindings::bindings::_bindgen_ty_1 = 0u32 -pub const aya_ebpf_bindings::bindings::BPF_REG_1: aya_ebpf_bindings::bindings::_bindgen_ty_1 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_REG_10: aya_ebpf_bindings::bindings::_bindgen_ty_1 = 10u32 -pub const aya_ebpf_bindings::bindings::BPF_REG_2: aya_ebpf_bindings::bindings::_bindgen_ty_1 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_REG_3: aya_ebpf_bindings::bindings::_bindgen_ty_1 = 3u32 -pub const aya_ebpf_bindings::bindings::BPF_REG_4: aya_ebpf_bindings::bindings::_bindgen_ty_1 = 4u32 -pub const aya_ebpf_bindings::bindings::BPF_REG_5: aya_ebpf_bindings::bindings::_bindgen_ty_1 = 5u32 -pub const aya_ebpf_bindings::bindings::BPF_REG_6: aya_ebpf_bindings::bindings::_bindgen_ty_1 = 6u32 -pub const aya_ebpf_bindings::bindings::BPF_REG_7: aya_ebpf_bindings::bindings::_bindgen_ty_1 = 7u32 -pub const aya_ebpf_bindings::bindings::BPF_REG_8: aya_ebpf_bindings::bindings::_bindgen_ty_1 = 8u32 -pub const aya_ebpf_bindings::bindings::BPF_REG_9: aya_ebpf_bindings::bindings::_bindgen_ty_1 = 9u32 -pub const aya_ebpf_bindings::bindings::BPF_RET: u32 = 6u32 -pub const aya_ebpf_bindings::bindings::BPF_RINGBUF_BUSY_BIT: aya_ebpf_bindings::bindings::_bindgen_ty_24 = 2_147_483_648u32 -pub const aya_ebpf_bindings::bindings::BPF_RINGBUF_DISCARD_BIT: aya_ebpf_bindings::bindings::_bindgen_ty_24 = 1_073_741_824u32 -pub const aya_ebpf_bindings::bindings::BPF_RINGBUF_HDR_SZ: aya_ebpf_bindings::bindings::_bindgen_ty_24 = 8u32 -pub const aya_ebpf_bindings::bindings::BPF_RSH: u32 = 112u32 -pub const aya_ebpf_bindings::bindings::BPF_SK_LOOKUP_F_NO_REUSEPORT: aya_ebpf_bindings::bindings::_bindgen_ty_25 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_SK_LOOKUP_F_REPLACE: aya_ebpf_bindings::bindings::_bindgen_ty_25 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_SK_STORAGE_GET_F_CREATE: aya_ebpf_bindings::bindings::_bindgen_ty_20 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB: aya_ebpf_bindings::bindings::_bindgen_ty_30 = 4u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_ALL_CB_FLAGS: aya_ebpf_bindings::bindings::_bindgen_ty_29 = 127u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_BASE_RTT: aya_ebpf_bindings::bindings::_bindgen_ty_30 = 7u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_HDR_OPT_LEN_CB: aya_ebpf_bindings::bindings::_bindgen_ty_30 = 14u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_NEEDS_ECN: aya_ebpf_bindings::bindings::_bindgen_ty_30 = 6u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: aya_ebpf_bindings::bindings::_bindgen_ty_29 = 16u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_PARSE_HDR_OPT_CB: aya_ebpf_bindings::bindings::_bindgen_ty_30 = 13u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: aya_ebpf_bindings::bindings::_bindgen_ty_29 = 32u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: aya_ebpf_bindings::bindings::_bindgen_ty_30 = 5u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_RETRANS_CB: aya_ebpf_bindings::bindings::_bindgen_ty_30 = 9u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_RETRANS_CB_FLAG: aya_ebpf_bindings::bindings::_bindgen_ty_29 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_RTO_CB: aya_ebpf_bindings::bindings::_bindgen_ty_30 = 8u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_RTO_CB_FLAG: aya_ebpf_bindings::bindings::_bindgen_ty_29 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_RTT_CB: aya_ebpf_bindings::bindings::_bindgen_ty_30 = 12u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_RTT_CB_FLAG: aya_ebpf_bindings::bindings::_bindgen_ty_29 = 8u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_RWND_INIT: aya_ebpf_bindings::bindings::_bindgen_ty_30 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_STATE_CB: aya_ebpf_bindings::bindings::_bindgen_ty_30 = 10u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_STATE_CB_FLAG: aya_ebpf_bindings::bindings::_bindgen_ty_29 = 4u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_TCP_CONNECT_CB: aya_ebpf_bindings::bindings::_bindgen_ty_30 = 3u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_TCP_LISTEN_CB: aya_ebpf_bindings::bindings::_bindgen_ty_30 = 11u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_TIMEOUT_INIT: aya_ebpf_bindings::bindings::_bindgen_ty_30 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_VOID: aya_ebpf_bindings::bindings::_bindgen_ty_30 = 0u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_WRITE_HDR_OPT_CB: aya_ebpf_bindings::bindings::_bindgen_ty_30 = 15u32 -pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: aya_ebpf_bindings::bindings::_bindgen_ty_29 = 64u32 -pub const aya_ebpf_bindings::bindings::BPF_ST: u32 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_STX: u32 = 3u32 -pub const aya_ebpf_bindings::bindings::BPF_SUB: u32 = 16u32 -pub const aya_ebpf_bindings::bindings::BPF_TAG_SIZE: u32 = 8u32 -pub const aya_ebpf_bindings::bindings::BPF_TCP_BOUND_INACTIVE: aya_ebpf_bindings::bindings::_bindgen_ty_31 = 13u32 -pub const aya_ebpf_bindings::bindings::BPF_TCP_CLOSE: aya_ebpf_bindings::bindings::_bindgen_ty_31 = 7u32 -pub const aya_ebpf_bindings::bindings::BPF_TCP_CLOSE_WAIT: aya_ebpf_bindings::bindings::_bindgen_ty_31 = 8u32 -pub const aya_ebpf_bindings::bindings::BPF_TCP_CLOSING: aya_ebpf_bindings::bindings::_bindgen_ty_31 = 11u32 -pub const aya_ebpf_bindings::bindings::BPF_TCP_ESTABLISHED: aya_ebpf_bindings::bindings::_bindgen_ty_31 = 1u32 -pub const aya_ebpf_bindings::bindings::BPF_TCP_FIN_WAIT1: aya_ebpf_bindings::bindings::_bindgen_ty_31 = 4u32 -pub const aya_ebpf_bindings::bindings::BPF_TCP_FIN_WAIT2: aya_ebpf_bindings::bindings::_bindgen_ty_31 = 5u32 -pub const aya_ebpf_bindings::bindings::BPF_TCP_LAST_ACK: aya_ebpf_bindings::bindings::_bindgen_ty_31 = 9u32 -pub const aya_ebpf_bindings::bindings::BPF_TCP_LISTEN: aya_ebpf_bindings::bindings::_bindgen_ty_31 = 10u32 -pub const aya_ebpf_bindings::bindings::BPF_TCP_MAX_STATES: aya_ebpf_bindings::bindings::_bindgen_ty_31 = 14u32 -pub const aya_ebpf_bindings::bindings::BPF_TCP_NEW_SYN_RECV: aya_ebpf_bindings::bindings::_bindgen_ty_31 = 12u32 -pub const aya_ebpf_bindings::bindings::BPF_TCP_SYN_RECV: aya_ebpf_bindings::bindings::_bindgen_ty_31 = 3u32 -pub const aya_ebpf_bindings::bindings::BPF_TCP_SYN_SENT: aya_ebpf_bindings::bindings::_bindgen_ty_31 = 2u32 -pub const aya_ebpf_bindings::bindings::BPF_TCP_TIME_WAIT: aya_ebpf_bindings::bindings::_bindgen_ty_31 = 6u32 -pub const aya_ebpf_bindings::bindings::BPF_TO_BE: u32 = 8u32 -pub const aya_ebpf_bindings::bindings::BPF_TO_LE: u32 = 0u32 -pub const aya_ebpf_bindings::bindings::BPF_W: u32 = 0u32 -pub const aya_ebpf_bindings::bindings::BPF_X: u32 = 8u32 -pub const aya_ebpf_bindings::bindings::BPF_XADD: u32 = 192u32 -pub const aya_ebpf_bindings::bindings::BPF_XCHG: u32 = 225u32 -pub const aya_ebpf_bindings::bindings::BPF_XOR: u32 = 160u32 -pub const aya_ebpf_bindings::bindings::SOL_SOCKET: u32 = 1u32 -pub const aya_ebpf_bindings::bindings::SO_ACCEPTCONN: u32 = 30u32 -pub const aya_ebpf_bindings::bindings::SO_ATTACH_BPF: u32 = 50u32 -pub const aya_ebpf_bindings::bindings::SO_ATTACH_FILTER: u32 = 26u32 -pub const aya_ebpf_bindings::bindings::SO_ATTACH_REUSEPORT_CBPF: u32 = 51u32 -pub const aya_ebpf_bindings::bindings::SO_ATTACH_REUSEPORT_EBPF: u32 = 52u32 -pub const aya_ebpf_bindings::bindings::SO_BINDTODEVICE: u32 = 25u32 -pub const aya_ebpf_bindings::bindings::SO_BINDTOIFINDEX: u32 = 62u32 -pub const aya_ebpf_bindings::bindings::SO_BPF_EXTENSIONS: u32 = 48u32 -pub const aya_ebpf_bindings::bindings::SO_BROADCAST: u32 = 6u32 -pub const aya_ebpf_bindings::bindings::SO_BSDCOMPAT: u32 = 14u32 -pub const aya_ebpf_bindings::bindings::SO_BUF_LOCK: u32 = 72u32 -pub const aya_ebpf_bindings::bindings::SO_BUSY_POLL: u32 = 46u32 -pub const aya_ebpf_bindings::bindings::SO_BUSY_POLL_BUDGET: u32 = 70u32 -pub const aya_ebpf_bindings::bindings::SO_CNX_ADVICE: u32 = 53u32 -pub const aya_ebpf_bindings::bindings::SO_COOKIE: u32 = 57u32 -pub const aya_ebpf_bindings::bindings::SO_DEBUG: u32 = 1u32 -pub const aya_ebpf_bindings::bindings::SO_DETACH_BPF: u32 = 27u32 -pub const aya_ebpf_bindings::bindings::SO_DETACH_FILTER: u32 = 27u32 -pub const aya_ebpf_bindings::bindings::SO_DETACH_REUSEPORT_BPF: u32 = 68u32 -pub const aya_ebpf_bindings::bindings::SO_DOMAIN: u32 = 39u32 -pub const aya_ebpf_bindings::bindings::SO_DONTROUTE: u32 = 5u32 -pub const aya_ebpf_bindings::bindings::SO_ERROR: u32 = 4u32 -pub const aya_ebpf_bindings::bindings::SO_GET_FILTER: u32 = 26u32 -pub const aya_ebpf_bindings::bindings::SO_INCOMING_CPU: u32 = 49u32 -pub const aya_ebpf_bindings::bindings::SO_INCOMING_NAPI_ID: u32 = 56u32 -pub const aya_ebpf_bindings::bindings::SO_KEEPALIVE: u32 = 9u32 -pub const aya_ebpf_bindings::bindings::SO_LINGER: u32 = 13u32 -pub const aya_ebpf_bindings::bindings::SO_LOCK_FILTER: u32 = 44u32 -pub const aya_ebpf_bindings::bindings::SO_MARK: u32 = 36u32 -pub const aya_ebpf_bindings::bindings::SO_MAX_PACING_RATE: u32 = 47u32 -pub const aya_ebpf_bindings::bindings::SO_MEMINFO: u32 = 55u32 -pub const aya_ebpf_bindings::bindings::SO_NETNS_COOKIE: u32 = 71u32 -pub const aya_ebpf_bindings::bindings::SO_NOFCS: u32 = 43u32 -pub const aya_ebpf_bindings::bindings::SO_NO_CHECK: u32 = 11u32 -pub const aya_ebpf_bindings::bindings::SO_OOBINLINE: u32 = 10u32 -pub const aya_ebpf_bindings::bindings::SO_PASSCRED: u32 = 16u32 -pub const aya_ebpf_bindings::bindings::SO_PASSSEC: u32 = 34u32 -pub const aya_ebpf_bindings::bindings::SO_PEEK_OFF: u32 = 42u32 -pub const aya_ebpf_bindings::bindings::SO_PEERCRED: u32 = 17u32 -pub const aya_ebpf_bindings::bindings::SO_PEERGROUPS: u32 = 59u32 -pub const aya_ebpf_bindings::bindings::SO_PEERNAME: u32 = 28u32 -pub const aya_ebpf_bindings::bindings::SO_PEERSEC: u32 = 31u32 -pub const aya_ebpf_bindings::bindings::SO_PREFER_BUSY_POLL: u32 = 69u32 -pub const aya_ebpf_bindings::bindings::SO_PRIORITY: u32 = 12u32 -pub const aya_ebpf_bindings::bindings::SO_PROTOCOL: u32 = 38u32 -pub const aya_ebpf_bindings::bindings::SO_RCVBUF: u32 = 8u32 -pub const aya_ebpf_bindings::bindings::SO_RCVBUFFORCE: u32 = 33u32 -pub const aya_ebpf_bindings::bindings::SO_RCVLOWAT: u32 = 18u32 -pub const aya_ebpf_bindings::bindings::SO_RCVTIMEO: u32 = 20u32 -pub const aya_ebpf_bindings::bindings::SO_RCVTIMEO_NEW: u32 = 66u32 -pub const aya_ebpf_bindings::bindings::SO_RCVTIMEO_OLD: u32 = 20u32 -pub const aya_ebpf_bindings::bindings::SO_REUSEADDR: u32 = 2u32 -pub const aya_ebpf_bindings::bindings::SO_REUSEPORT: u32 = 15u32 -pub const aya_ebpf_bindings::bindings::SO_RXQ_OVFL: u32 = 40u32 -pub const aya_ebpf_bindings::bindings::SO_SECURITY_AUTHENTICATION: u32 = 22u32 -pub const aya_ebpf_bindings::bindings::SO_SECURITY_ENCRYPTION_NETWORK: u32 = 24u32 -pub const aya_ebpf_bindings::bindings::SO_SECURITY_ENCRYPTION_TRANSPORT: u32 = 23u32 -pub const aya_ebpf_bindings::bindings::SO_SELECT_ERR_QUEUE: u32 = 45u32 -pub const aya_ebpf_bindings::bindings::SO_SNDBUF: u32 = 7u32 -pub const aya_ebpf_bindings::bindings::SO_SNDBUFFORCE: u32 = 32u32 -pub const aya_ebpf_bindings::bindings::SO_SNDLOWAT: u32 = 19u32 -pub const aya_ebpf_bindings::bindings::SO_SNDTIMEO: u32 = 21u32 -pub const aya_ebpf_bindings::bindings::SO_SNDTIMEO_NEW: u32 = 67u32 -pub const aya_ebpf_bindings::bindings::SO_SNDTIMEO_OLD: u32 = 21u32 -pub const aya_ebpf_bindings::bindings::SO_TIMESTAMP: u32 = 29u32 -pub const aya_ebpf_bindings::bindings::SO_TIMESTAMPING: u32 = 37u32 -pub const aya_ebpf_bindings::bindings::SO_TIMESTAMPING_NEW: u32 = 65u32 -pub const aya_ebpf_bindings::bindings::SO_TIMESTAMPING_OLD: u32 = 37u32 -pub const aya_ebpf_bindings::bindings::SO_TIMESTAMPNS: u32 = 35u32 -pub const aya_ebpf_bindings::bindings::SO_TIMESTAMPNS_NEW: u32 = 64u32 -pub const aya_ebpf_bindings::bindings::SO_TIMESTAMPNS_OLD: u32 = 35u32 -pub const aya_ebpf_bindings::bindings::SO_TIMESTAMP_NEW: u32 = 63u32 -pub const aya_ebpf_bindings::bindings::SO_TIMESTAMP_OLD: u32 = 29u32 -pub const aya_ebpf_bindings::bindings::SO_TXTIME: u32 = 61u32 -pub const aya_ebpf_bindings::bindings::SO_TYPE: u32 = 3u32 -pub const aya_ebpf_bindings::bindings::SO_WIFI_STATUS: u32 = 41u32 -pub const aya_ebpf_bindings::bindings::SO_ZEROCOPY: u32 = 60u32 -pub const aya_ebpf_bindings::bindings::TC_ACT_EXT_VAL_MASK: i32 = 268_435_455i32 -pub const aya_ebpf_bindings::bindings::TC_ACT_OK: _ -pub const aya_ebpf_bindings::bindings::TC_ACT_PIPE: _ -pub const aya_ebpf_bindings::bindings::TC_ACT_QUEUED: _ -pub const aya_ebpf_bindings::bindings::TC_ACT_RECLASSIFY: _ -pub const aya_ebpf_bindings::bindings::TC_ACT_REDIRECT: _ -pub const aya_ebpf_bindings::bindings::TC_ACT_REPEAT: _ -pub const aya_ebpf_bindings::bindings::TC_ACT_SHOT: _ -pub const aya_ebpf_bindings::bindings::TC_ACT_STOLEN: _ -pub const aya_ebpf_bindings::bindings::TC_ACT_TRAP: _ -pub const aya_ebpf_bindings::bindings::TC_ACT_UNSPEC: i32 = -1i32 -pub const aya_ebpf_bindings::bindings::TC_ACT_VALUE_MAX: _ -pub const aya_ebpf_bindings::bindings::__MAX_BPF_REG: aya_ebpf_bindings::bindings::_bindgen_ty_1 = 11u32 +pub const aya_ebpf_bindings::bindings::BPF_ABS: u32 +pub const aya_ebpf_bindings::bindings::BPF_ADD: u32 +pub const aya_ebpf_bindings::bindings::BPF_ADJ_ROOM_ENCAP_L2_MASK: aya_ebpf_bindings::bindings::_bindgen_ty_18 +pub const aya_ebpf_bindings::bindings::BPF_ADJ_ROOM_ENCAP_L2_SHIFT: aya_ebpf_bindings::bindings::_bindgen_ty_18 +pub const aya_ebpf_bindings::bindings::BPF_ALU: u32 +pub const aya_ebpf_bindings::bindings::BPF_ALU64: u32 +pub const aya_ebpf_bindings::bindings::BPF_AND: u32 +pub const aya_ebpf_bindings::bindings::BPF_ANY: aya_ebpf_bindings::bindings::_bindgen_ty_4 +pub const aya_ebpf_bindings::bindings::BPF_ARSH: u32 +pub const aya_ebpf_bindings::bindings::BPF_ATOMIC: u32 +pub const aya_ebpf_bindings::bindings::BPF_B: u32 +pub const aya_ebpf_bindings::bindings::BPF_BUILD_ID_SIZE: u32 +pub const aya_ebpf_bindings::bindings::BPF_CALL: u32 +pub const aya_ebpf_bindings::bindings::BPF_CMPXCHG: u32 +pub const aya_ebpf_bindings::bindings::BPF_CSUM_LEVEL_DEC: aya_ebpf_bindings::bindings::_bindgen_ty_16 +pub const aya_ebpf_bindings::bindings::BPF_CSUM_LEVEL_INC: aya_ebpf_bindings::bindings::_bindgen_ty_16 +pub const aya_ebpf_bindings::bindings::BPF_CSUM_LEVEL_QUERY: aya_ebpf_bindings::bindings::_bindgen_ty_16 +pub const aya_ebpf_bindings::bindings::BPF_CSUM_LEVEL_RESET: aya_ebpf_bindings::bindings::_bindgen_ty_16 +pub const aya_ebpf_bindings::bindings::BPF_DEVCG_ACC_MKNOD: aya_ebpf_bindings::bindings::_bindgen_ty_35 +pub const aya_ebpf_bindings::bindings::BPF_DEVCG_ACC_READ: aya_ebpf_bindings::bindings::_bindgen_ty_35 +pub const aya_ebpf_bindings::bindings::BPF_DEVCG_ACC_WRITE: aya_ebpf_bindings::bindings::_bindgen_ty_35 +pub const aya_ebpf_bindings::bindings::BPF_DEVCG_DEV_BLOCK: aya_ebpf_bindings::bindings::_bindgen_ty_36 +pub const aya_ebpf_bindings::bindings::BPF_DEVCG_DEV_CHAR: aya_ebpf_bindings::bindings::_bindgen_ty_36 +pub const aya_ebpf_bindings::bindings::BPF_DIV: u32 +pub const aya_ebpf_bindings::bindings::BPF_DW: u32 +pub const aya_ebpf_bindings::bindings::BPF_END: u32 +pub const aya_ebpf_bindings::bindings::BPF_EXIST: aya_ebpf_bindings::bindings::_bindgen_ty_4 +pub const aya_ebpf_bindings::bindings::BPF_EXIT: u32 +pub const aya_ebpf_bindings::bindings::BPF_FETCH: u32 +pub const aya_ebpf_bindings::bindings::BPF_FIB_LKUP_RET_BLACKHOLE: aya_ebpf_bindings::bindings::_bindgen_ty_38 +pub const aya_ebpf_bindings::bindings::BPF_FIB_LKUP_RET_FRAG_NEEDED: aya_ebpf_bindings::bindings::_bindgen_ty_38 +pub const aya_ebpf_bindings::bindings::BPF_FIB_LKUP_RET_FWD_DISABLED: aya_ebpf_bindings::bindings::_bindgen_ty_38 +pub const aya_ebpf_bindings::bindings::BPF_FIB_LKUP_RET_NOT_FWDED: aya_ebpf_bindings::bindings::_bindgen_ty_38 +pub const aya_ebpf_bindings::bindings::BPF_FIB_LKUP_RET_NO_NEIGH: aya_ebpf_bindings::bindings::_bindgen_ty_38 +pub const aya_ebpf_bindings::bindings::BPF_FIB_LKUP_RET_NO_SRC_ADDR: aya_ebpf_bindings::bindings::_bindgen_ty_38 +pub const aya_ebpf_bindings::bindings::BPF_FIB_LKUP_RET_PROHIBIT: aya_ebpf_bindings::bindings::_bindgen_ty_38 +pub const aya_ebpf_bindings::bindings::BPF_FIB_LKUP_RET_SUCCESS: aya_ebpf_bindings::bindings::_bindgen_ty_38 +pub const aya_ebpf_bindings::bindings::BPF_FIB_LKUP_RET_UNREACHABLE: aya_ebpf_bindings::bindings::_bindgen_ty_38 +pub const aya_ebpf_bindings::bindings::BPF_FIB_LKUP_RET_UNSUPP_LWT: aya_ebpf_bindings::bindings::_bindgen_ty_38 +pub const aya_ebpf_bindings::bindings::BPF_FIB_LOOKUP_DIRECT: aya_ebpf_bindings::bindings::_bindgen_ty_37 +pub const aya_ebpf_bindings::bindings::BPF_FIB_LOOKUP_OUTPUT: aya_ebpf_bindings::bindings::_bindgen_ty_37 +pub const aya_ebpf_bindings::bindings::BPF_FIB_LOOKUP_SKIP_NEIGH: aya_ebpf_bindings::bindings::_bindgen_ty_37 +pub const aya_ebpf_bindings::bindings::BPF_FIB_LOOKUP_SRC: aya_ebpf_bindings::bindings::_bindgen_ty_37 +pub const aya_ebpf_bindings::bindings::BPF_FIB_LOOKUP_TBID: aya_ebpf_bindings::bindings::_bindgen_ty_37 +pub const aya_ebpf_bindings::bindings::BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: aya_ebpf_bindings::bindings::_bindgen_ty_39 +pub const aya_ebpf_bindings::bindings::BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: aya_ebpf_bindings::bindings::_bindgen_ty_39 +pub const aya_ebpf_bindings::bindings::BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: aya_ebpf_bindings::bindings::_bindgen_ty_39 +pub const aya_ebpf_bindings::bindings::BPF_FROM_BE: u32 +pub const aya_ebpf_bindings::bindings::BPF_FROM_LE: u32 +pub const aya_ebpf_bindings::bindings::BPF_F_ADJ_ROOM_DECAP_L3_IPV4: aya_ebpf_bindings::bindings::_bindgen_ty_17 +pub const aya_ebpf_bindings::bindings::BPF_F_ADJ_ROOM_DECAP_L3_IPV6: aya_ebpf_bindings::bindings::_bindgen_ty_17 +pub const aya_ebpf_bindings::bindings::BPF_F_ADJ_ROOM_ENCAP_L2_ETH: aya_ebpf_bindings::bindings::_bindgen_ty_17 +pub const aya_ebpf_bindings::bindings::BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: aya_ebpf_bindings::bindings::_bindgen_ty_17 +pub const aya_ebpf_bindings::bindings::BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: aya_ebpf_bindings::bindings::_bindgen_ty_17 +pub const aya_ebpf_bindings::bindings::BPF_F_ADJ_ROOM_ENCAP_L4_GRE: aya_ebpf_bindings::bindings::_bindgen_ty_17 +pub const aya_ebpf_bindings::bindings::BPF_F_ADJ_ROOM_ENCAP_L4_UDP: aya_ebpf_bindings::bindings::_bindgen_ty_17 +pub const aya_ebpf_bindings::bindings::BPF_F_ADJ_ROOM_FIXED_GSO: aya_ebpf_bindings::bindings::_bindgen_ty_17 +pub const aya_ebpf_bindings::bindings::BPF_F_ADJ_ROOM_NO_CSUM_RESET: aya_ebpf_bindings::bindings::_bindgen_ty_17 +pub const aya_ebpf_bindings::bindings::BPF_F_AFTER: u32 +pub const aya_ebpf_bindings::bindings::BPF_F_ALLOW_MULTI: u32 +pub const aya_ebpf_bindings::bindings::BPF_F_ALLOW_OVERRIDE: u32 +pub const aya_ebpf_bindings::bindings::BPF_F_ANY_ALIGNMENT: u32 +pub const aya_ebpf_bindings::bindings::BPF_F_BEFORE: u32 +pub const aya_ebpf_bindings::bindings::BPF_F_BPRM_SECUREEXEC: aya_ebpf_bindings::bindings::_bindgen_ty_26 +pub const aya_ebpf_bindings::bindings::BPF_F_BROADCAST: aya_ebpf_bindings::bindings::_bindgen_ty_27 +pub const aya_ebpf_bindings::bindings::BPF_F_CLONE: aya_ebpf_bindings::bindings::_bindgen_ty_5 +pub const aya_ebpf_bindings::bindings::BPF_F_CTXLEN_MASK: aya_ebpf_bindings::bindings::_bindgen_ty_14 +pub const aya_ebpf_bindings::bindings::BPF_F_CURRENT_CPU: aya_ebpf_bindings::bindings::_bindgen_ty_14 +pub const aya_ebpf_bindings::bindings::BPF_F_CURRENT_NETNS: aya_ebpf_bindings::bindings::_bindgen_ty_15 +pub const aya_ebpf_bindings::bindings::BPF_F_DONT_FRAGMENT: aya_ebpf_bindings::bindings::_bindgen_ty_12 +pub const aya_ebpf_bindings::bindings::BPF_F_EXCLUDE_INGRESS: aya_ebpf_bindings::bindings::_bindgen_ty_27 +pub const aya_ebpf_bindings::bindings::BPF_F_FAST_STACK_CMP: aya_ebpf_bindings::bindings::_bindgen_ty_11 +pub const aya_ebpf_bindings::bindings::BPF_F_GET_BRANCH_RECORDS_SIZE: aya_ebpf_bindings::bindings::_bindgen_ty_21 +pub const aya_ebpf_bindings::bindings::BPF_F_HDR_FIELD_MASK: aya_ebpf_bindings::bindings::_bindgen_ty_7 +pub const aya_ebpf_bindings::bindings::BPF_F_ID: u32 +pub const aya_ebpf_bindings::bindings::BPF_F_INDEX_MASK: aya_ebpf_bindings::bindings::_bindgen_ty_14 +pub const aya_ebpf_bindings::bindings::BPF_F_INGRESS: aya_ebpf_bindings::bindings::_bindgen_ty_9 +pub const aya_ebpf_bindings::bindings::BPF_F_INNER_MAP: aya_ebpf_bindings::bindings::_bindgen_ty_5 +pub const aya_ebpf_bindings::bindings::BPF_F_INVALIDATE_HASH: aya_ebpf_bindings::bindings::_bindgen_ty_6 +pub const aya_ebpf_bindings::bindings::BPF_F_KPROBE_MULTI_RETURN: aya_ebpf_bindings::bindings::_bindgen_ty_2 +pub const aya_ebpf_bindings::bindings::BPF_F_LINK: aya_ebpf_bindings::bindings::_bindgen_ty_5 +pub const aya_ebpf_bindings::bindings::BPF_F_LOCK: aya_ebpf_bindings::bindings::_bindgen_ty_4 +pub const aya_ebpf_bindings::bindings::BPF_F_MARK_ENFORCE: aya_ebpf_bindings::bindings::_bindgen_ty_8 +pub const aya_ebpf_bindings::bindings::BPF_F_MARK_MANGLED_0: aya_ebpf_bindings::bindings::_bindgen_ty_8 +pub const aya_ebpf_bindings::bindings::BPF_F_MMAPABLE: aya_ebpf_bindings::bindings::_bindgen_ty_5 +pub const aya_ebpf_bindings::bindings::BPF_F_NETFILTER_IP_DEFRAG: u32 +pub const aya_ebpf_bindings::bindings::BPF_F_NO_COMMON_LRU: aya_ebpf_bindings::bindings::_bindgen_ty_5 +pub const aya_ebpf_bindings::bindings::BPF_F_NO_PREALLOC: aya_ebpf_bindings::bindings::_bindgen_ty_5 +pub const aya_ebpf_bindings::bindings::BPF_F_NO_TUNNEL_KEY: aya_ebpf_bindings::bindings::_bindgen_ty_12 +pub const aya_ebpf_bindings::bindings::BPF_F_NO_USER_CONV: aya_ebpf_bindings::bindings::_bindgen_ty_5 +pub const aya_ebpf_bindings::bindings::BPF_F_NUMA_NODE: aya_ebpf_bindings::bindings::_bindgen_ty_5 +pub const aya_ebpf_bindings::bindings::BPF_F_PATH_FD: aya_ebpf_bindings::bindings::_bindgen_ty_5 +pub const aya_ebpf_bindings::bindings::BPF_F_PRESERVE_ELEMS: aya_ebpf_bindings::bindings::_bindgen_ty_5 +pub const aya_ebpf_bindings::bindings::BPF_F_PSEUDO_HDR: aya_ebpf_bindings::bindings::_bindgen_ty_8 +pub const aya_ebpf_bindings::bindings::BPF_F_QUERY_EFFECTIVE: u32 +pub const aya_ebpf_bindings::bindings::BPF_F_RDONLY: aya_ebpf_bindings::bindings::_bindgen_ty_5 +pub const aya_ebpf_bindings::bindings::BPF_F_RDONLY_PROG: aya_ebpf_bindings::bindings::_bindgen_ty_5 +pub const aya_ebpf_bindings::bindings::BPF_F_RECOMPUTE_CSUM: aya_ebpf_bindings::bindings::_bindgen_ty_6 +pub const aya_ebpf_bindings::bindings::BPF_F_REPLACE: u32 +pub const aya_ebpf_bindings::bindings::BPF_F_REUSE_STACKID: aya_ebpf_bindings::bindings::_bindgen_ty_11 +pub const aya_ebpf_bindings::bindings::BPF_F_SEGV_ON_FAULT: aya_ebpf_bindings::bindings::_bindgen_ty_5 +pub const aya_ebpf_bindings::bindings::BPF_F_SEQ_NUMBER: aya_ebpf_bindings::bindings::_bindgen_ty_12 +pub const aya_ebpf_bindings::bindings::BPF_F_SKIP_FIELD_MASK: aya_ebpf_bindings::bindings::_bindgen_ty_11 +pub const aya_ebpf_bindings::bindings::BPF_F_SLEEPABLE: u32 +pub const aya_ebpf_bindings::bindings::BPF_F_STACK_BUILD_ID: aya_ebpf_bindings::bindings::_bindgen_ty_5 +pub const aya_ebpf_bindings::bindings::BPF_F_STRICT_ALIGNMENT: u32 +pub const aya_ebpf_bindings::bindings::BPF_F_SYSCTL_BASE_NAME: aya_ebpf_bindings::bindings::_bindgen_ty_19 +pub const aya_ebpf_bindings::bindings::BPF_F_TEST_REG_INVARIANTS: u32 +pub const aya_ebpf_bindings::bindings::BPF_F_TEST_RND_HI32: u32 +pub const aya_ebpf_bindings::bindings::BPF_F_TEST_RUN_ON_CPU: u32 +pub const aya_ebpf_bindings::bindings::BPF_F_TEST_STATE_FREQ: u32 +pub const aya_ebpf_bindings::bindings::BPF_F_TEST_XDP_LIVE_FRAMES: u32 +pub const aya_ebpf_bindings::bindings::BPF_F_TIMER_ABS: aya_ebpf_bindings::bindings::_bindgen_ty_41 +pub const aya_ebpf_bindings::bindings::BPF_F_TIMER_CPU_PIN: aya_ebpf_bindings::bindings::_bindgen_ty_41 +pub const aya_ebpf_bindings::bindings::BPF_F_TOKEN_FD: aya_ebpf_bindings::bindings::_bindgen_ty_5 +pub const aya_ebpf_bindings::bindings::BPF_F_TUNINFO_FLAGS: aya_ebpf_bindings::bindings::_bindgen_ty_13 +pub const aya_ebpf_bindings::bindings::BPF_F_TUNINFO_IPV6: aya_ebpf_bindings::bindings::_bindgen_ty_10 +pub const aya_ebpf_bindings::bindings::BPF_F_UPROBE_MULTI_RETURN: aya_ebpf_bindings::bindings::_bindgen_ty_3 +pub const aya_ebpf_bindings::bindings::BPF_F_USER_BUILD_ID: aya_ebpf_bindings::bindings::_bindgen_ty_11 +pub const aya_ebpf_bindings::bindings::BPF_F_USER_STACK: aya_ebpf_bindings::bindings::_bindgen_ty_11 +pub const aya_ebpf_bindings::bindings::BPF_F_VTYPE_BTF_OBJ_FD: aya_ebpf_bindings::bindings::_bindgen_ty_5 +pub const aya_ebpf_bindings::bindings::BPF_F_WRONLY: aya_ebpf_bindings::bindings::_bindgen_ty_5 +pub const aya_ebpf_bindings::bindings::BPF_F_WRONLY_PROG: aya_ebpf_bindings::bindings::_bindgen_ty_5 +pub const aya_ebpf_bindings::bindings::BPF_F_XDP_DEV_BOUND_ONLY: u32 +pub const aya_ebpf_bindings::bindings::BPF_F_XDP_HAS_FRAGS: u32 +pub const aya_ebpf_bindings::bindings::BPF_F_ZERO_CSUM_TX: aya_ebpf_bindings::bindings::_bindgen_ty_12 +pub const aya_ebpf_bindings::bindings::BPF_F_ZERO_SEED: aya_ebpf_bindings::bindings::_bindgen_ty_5 +pub const aya_ebpf_bindings::bindings::BPF_H: u32 +pub const aya_ebpf_bindings::bindings::BPF_IMM: u32 +pub const aya_ebpf_bindings::bindings::BPF_IND: u32 +pub const aya_ebpf_bindings::bindings::BPF_JA: u32 +pub const aya_ebpf_bindings::bindings::BPF_JCOND: u32 +pub const aya_ebpf_bindings::bindings::BPF_JEQ: u32 +pub const aya_ebpf_bindings::bindings::BPF_JGE: u32 +pub const aya_ebpf_bindings::bindings::BPF_JGT: u32 +pub const aya_ebpf_bindings::bindings::BPF_JLE: u32 +pub const aya_ebpf_bindings::bindings::BPF_JLT: u32 +pub const aya_ebpf_bindings::bindings::BPF_JMP: u32 +pub const aya_ebpf_bindings::bindings::BPF_JMP32: u32 +pub const aya_ebpf_bindings::bindings::BPF_JNE: u32 +pub const aya_ebpf_bindings::bindings::BPF_JSET: u32 +pub const aya_ebpf_bindings::bindings::BPF_JSGE: u32 +pub const aya_ebpf_bindings::bindings::BPF_JSGT: u32 +pub const aya_ebpf_bindings::bindings::BPF_JSLE: u32 +pub const aya_ebpf_bindings::bindings::BPF_JSLT: u32 +pub const aya_ebpf_bindings::bindings::BPF_K: u32 +pub const aya_ebpf_bindings::bindings::BPF_LD: u32 +pub const aya_ebpf_bindings::bindings::BPF_LDX: u32 +pub const aya_ebpf_bindings::bindings::BPF_LEN: u32 +pub const aya_ebpf_bindings::bindings::BPF_LOCAL_STORAGE_GET_F_CREATE: aya_ebpf_bindings::bindings::_bindgen_ty_20 +pub const aya_ebpf_bindings::bindings::BPF_LSH: u32 +pub const aya_ebpf_bindings::bindings::BPF_MAXINSNS: u32 +pub const aya_ebpf_bindings::bindings::BPF_MEM: u32 +pub const aya_ebpf_bindings::bindings::BPF_MEMSX: u32 +pub const aya_ebpf_bindings::bindings::BPF_MISC: u32 +pub const aya_ebpf_bindings::bindings::BPF_MOD: u32 +pub const aya_ebpf_bindings::bindings::BPF_MOV: u32 +pub const aya_ebpf_bindings::bindings::BPF_MSH: u32 +pub const aya_ebpf_bindings::bindings::BPF_MUL: u32 +pub const aya_ebpf_bindings::bindings::BPF_NEG: u32 +pub const aya_ebpf_bindings::bindings::BPF_NOEXIST: aya_ebpf_bindings::bindings::_bindgen_ty_4 +pub const aya_ebpf_bindings::bindings::BPF_OBJ_NAME_LEN: u32 +pub const aya_ebpf_bindings::bindings::BPF_OR: u32 +pub const aya_ebpf_bindings::bindings::BPF_PSEUDO_BTF_ID: u32 +pub const aya_ebpf_bindings::bindings::BPF_PSEUDO_CALL: u32 +pub const aya_ebpf_bindings::bindings::BPF_PSEUDO_FUNC: u32 +pub const aya_ebpf_bindings::bindings::BPF_PSEUDO_KFUNC_CALL: u32 +pub const aya_ebpf_bindings::bindings::BPF_PSEUDO_MAP_FD: u32 +pub const aya_ebpf_bindings::bindings::BPF_PSEUDO_MAP_IDX: u32 +pub const aya_ebpf_bindings::bindings::BPF_PSEUDO_MAP_IDX_VALUE: u32 +pub const aya_ebpf_bindings::bindings::BPF_PSEUDO_MAP_VALUE: u32 +pub const aya_ebpf_bindings::bindings::BPF_RB_AVAIL_DATA: aya_ebpf_bindings::bindings::_bindgen_ty_23 +pub const aya_ebpf_bindings::bindings::BPF_RB_CONS_POS: aya_ebpf_bindings::bindings::_bindgen_ty_23 +pub const aya_ebpf_bindings::bindings::BPF_RB_FORCE_WAKEUP: aya_ebpf_bindings::bindings::_bindgen_ty_22 +pub const aya_ebpf_bindings::bindings::BPF_RB_NO_WAKEUP: aya_ebpf_bindings::bindings::_bindgen_ty_22 +pub const aya_ebpf_bindings::bindings::BPF_RB_PROD_POS: aya_ebpf_bindings::bindings::_bindgen_ty_23 +pub const aya_ebpf_bindings::bindings::BPF_RB_RING_SIZE: aya_ebpf_bindings::bindings::_bindgen_ty_23 +pub const aya_ebpf_bindings::bindings::BPF_REG_0: aya_ebpf_bindings::bindings::_bindgen_ty_1 +pub const aya_ebpf_bindings::bindings::BPF_REG_1: aya_ebpf_bindings::bindings::_bindgen_ty_1 +pub const aya_ebpf_bindings::bindings::BPF_REG_10: aya_ebpf_bindings::bindings::_bindgen_ty_1 +pub const aya_ebpf_bindings::bindings::BPF_REG_2: aya_ebpf_bindings::bindings::_bindgen_ty_1 +pub const aya_ebpf_bindings::bindings::BPF_REG_3: aya_ebpf_bindings::bindings::_bindgen_ty_1 +pub const aya_ebpf_bindings::bindings::BPF_REG_4: aya_ebpf_bindings::bindings::_bindgen_ty_1 +pub const aya_ebpf_bindings::bindings::BPF_REG_5: aya_ebpf_bindings::bindings::_bindgen_ty_1 +pub const aya_ebpf_bindings::bindings::BPF_REG_6: aya_ebpf_bindings::bindings::_bindgen_ty_1 +pub const aya_ebpf_bindings::bindings::BPF_REG_7: aya_ebpf_bindings::bindings::_bindgen_ty_1 +pub const aya_ebpf_bindings::bindings::BPF_REG_8: aya_ebpf_bindings::bindings::_bindgen_ty_1 +pub const aya_ebpf_bindings::bindings::BPF_REG_9: aya_ebpf_bindings::bindings::_bindgen_ty_1 +pub const aya_ebpf_bindings::bindings::BPF_RET: u32 +pub const aya_ebpf_bindings::bindings::BPF_RINGBUF_BUSY_BIT: aya_ebpf_bindings::bindings::_bindgen_ty_24 +pub const aya_ebpf_bindings::bindings::BPF_RINGBUF_DISCARD_BIT: aya_ebpf_bindings::bindings::_bindgen_ty_24 +pub const aya_ebpf_bindings::bindings::BPF_RINGBUF_HDR_SZ: aya_ebpf_bindings::bindings::_bindgen_ty_24 +pub const aya_ebpf_bindings::bindings::BPF_RSH: u32 +pub const aya_ebpf_bindings::bindings::BPF_SK_LOOKUP_F_NO_REUSEPORT: aya_ebpf_bindings::bindings::_bindgen_ty_25 +pub const aya_ebpf_bindings::bindings::BPF_SK_LOOKUP_F_REPLACE: aya_ebpf_bindings::bindings::_bindgen_ty_25 +pub const aya_ebpf_bindings::bindings::BPF_SK_STORAGE_GET_F_CREATE: aya_ebpf_bindings::bindings::_bindgen_ty_20 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB: aya_ebpf_bindings::bindings::_bindgen_ty_30 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_ALL_CB_FLAGS: aya_ebpf_bindings::bindings::_bindgen_ty_29 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_BASE_RTT: aya_ebpf_bindings::bindings::_bindgen_ty_30 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_HDR_OPT_LEN_CB: aya_ebpf_bindings::bindings::_bindgen_ty_30 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_NEEDS_ECN: aya_ebpf_bindings::bindings::_bindgen_ty_30 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: aya_ebpf_bindings::bindings::_bindgen_ty_29 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_PARSE_HDR_OPT_CB: aya_ebpf_bindings::bindings::_bindgen_ty_30 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: aya_ebpf_bindings::bindings::_bindgen_ty_29 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: aya_ebpf_bindings::bindings::_bindgen_ty_30 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_RETRANS_CB: aya_ebpf_bindings::bindings::_bindgen_ty_30 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_RETRANS_CB_FLAG: aya_ebpf_bindings::bindings::_bindgen_ty_29 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_RTO_CB: aya_ebpf_bindings::bindings::_bindgen_ty_30 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_RTO_CB_FLAG: aya_ebpf_bindings::bindings::_bindgen_ty_29 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_RTT_CB: aya_ebpf_bindings::bindings::_bindgen_ty_30 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_RTT_CB_FLAG: aya_ebpf_bindings::bindings::_bindgen_ty_29 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_RWND_INIT: aya_ebpf_bindings::bindings::_bindgen_ty_30 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_STATE_CB: aya_ebpf_bindings::bindings::_bindgen_ty_30 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_STATE_CB_FLAG: aya_ebpf_bindings::bindings::_bindgen_ty_29 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_TCP_CONNECT_CB: aya_ebpf_bindings::bindings::_bindgen_ty_30 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_TCP_LISTEN_CB: aya_ebpf_bindings::bindings::_bindgen_ty_30 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_TIMEOUT_INIT: aya_ebpf_bindings::bindings::_bindgen_ty_30 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_VOID: aya_ebpf_bindings::bindings::_bindgen_ty_30 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_WRITE_HDR_OPT_CB: aya_ebpf_bindings::bindings::_bindgen_ty_30 +pub const aya_ebpf_bindings::bindings::BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: aya_ebpf_bindings::bindings::_bindgen_ty_29 +pub const aya_ebpf_bindings::bindings::BPF_ST: u32 +pub const aya_ebpf_bindings::bindings::BPF_STX: u32 +pub const aya_ebpf_bindings::bindings::BPF_SUB: u32 +pub const aya_ebpf_bindings::bindings::BPF_TAG_SIZE: u32 +pub const aya_ebpf_bindings::bindings::BPF_TCP_BOUND_INACTIVE: aya_ebpf_bindings::bindings::_bindgen_ty_31 +pub const aya_ebpf_bindings::bindings::BPF_TCP_CLOSE: aya_ebpf_bindings::bindings::_bindgen_ty_31 +pub const aya_ebpf_bindings::bindings::BPF_TCP_CLOSE_WAIT: aya_ebpf_bindings::bindings::_bindgen_ty_31 +pub const aya_ebpf_bindings::bindings::BPF_TCP_CLOSING: aya_ebpf_bindings::bindings::_bindgen_ty_31 +pub const aya_ebpf_bindings::bindings::BPF_TCP_ESTABLISHED: aya_ebpf_bindings::bindings::_bindgen_ty_31 +pub const aya_ebpf_bindings::bindings::BPF_TCP_FIN_WAIT1: aya_ebpf_bindings::bindings::_bindgen_ty_31 +pub const aya_ebpf_bindings::bindings::BPF_TCP_FIN_WAIT2: aya_ebpf_bindings::bindings::_bindgen_ty_31 +pub const aya_ebpf_bindings::bindings::BPF_TCP_LAST_ACK: aya_ebpf_bindings::bindings::_bindgen_ty_31 +pub const aya_ebpf_bindings::bindings::BPF_TCP_LISTEN: aya_ebpf_bindings::bindings::_bindgen_ty_31 +pub const aya_ebpf_bindings::bindings::BPF_TCP_MAX_STATES: aya_ebpf_bindings::bindings::_bindgen_ty_31 +pub const aya_ebpf_bindings::bindings::BPF_TCP_NEW_SYN_RECV: aya_ebpf_bindings::bindings::_bindgen_ty_31 +pub const aya_ebpf_bindings::bindings::BPF_TCP_SYN_RECV: aya_ebpf_bindings::bindings::_bindgen_ty_31 +pub const aya_ebpf_bindings::bindings::BPF_TCP_SYN_SENT: aya_ebpf_bindings::bindings::_bindgen_ty_31 +pub const aya_ebpf_bindings::bindings::BPF_TCP_TIME_WAIT: aya_ebpf_bindings::bindings::_bindgen_ty_31 +pub const aya_ebpf_bindings::bindings::BPF_TO_BE: u32 +pub const aya_ebpf_bindings::bindings::BPF_TO_LE: u32 +pub const aya_ebpf_bindings::bindings::BPF_W: u32 +pub const aya_ebpf_bindings::bindings::BPF_X: u32 +pub const aya_ebpf_bindings::bindings::BPF_XADD: u32 +pub const aya_ebpf_bindings::bindings::BPF_XCHG: u32 +pub const aya_ebpf_bindings::bindings::BPF_XOR: u32 +pub const aya_ebpf_bindings::bindings::SOL_SOCKET: u32 +pub const aya_ebpf_bindings::bindings::SO_ACCEPTCONN: u32 +pub const aya_ebpf_bindings::bindings::SO_ATTACH_BPF: u32 +pub const aya_ebpf_bindings::bindings::SO_ATTACH_FILTER: u32 +pub const aya_ebpf_bindings::bindings::SO_ATTACH_REUSEPORT_CBPF: u32 +pub const aya_ebpf_bindings::bindings::SO_ATTACH_REUSEPORT_EBPF: u32 +pub const aya_ebpf_bindings::bindings::SO_BINDTODEVICE: u32 +pub const aya_ebpf_bindings::bindings::SO_BINDTOIFINDEX: u32 +pub const aya_ebpf_bindings::bindings::SO_BPF_EXTENSIONS: u32 +pub const aya_ebpf_bindings::bindings::SO_BROADCAST: u32 +pub const aya_ebpf_bindings::bindings::SO_BSDCOMPAT: u32 +pub const aya_ebpf_bindings::bindings::SO_BUF_LOCK: u32 +pub const aya_ebpf_bindings::bindings::SO_BUSY_POLL: u32 +pub const aya_ebpf_bindings::bindings::SO_BUSY_POLL_BUDGET: u32 +pub const aya_ebpf_bindings::bindings::SO_CNX_ADVICE: u32 +pub const aya_ebpf_bindings::bindings::SO_COOKIE: u32 +pub const aya_ebpf_bindings::bindings::SO_DEBUG: u32 +pub const aya_ebpf_bindings::bindings::SO_DETACH_BPF: u32 +pub const aya_ebpf_bindings::bindings::SO_DETACH_FILTER: u32 +pub const aya_ebpf_bindings::bindings::SO_DETACH_REUSEPORT_BPF: u32 +pub const aya_ebpf_bindings::bindings::SO_DOMAIN: u32 +pub const aya_ebpf_bindings::bindings::SO_DONTROUTE: u32 +pub const aya_ebpf_bindings::bindings::SO_ERROR: u32 +pub const aya_ebpf_bindings::bindings::SO_GET_FILTER: u32 +pub const aya_ebpf_bindings::bindings::SO_INCOMING_CPU: u32 +pub const aya_ebpf_bindings::bindings::SO_INCOMING_NAPI_ID: u32 +pub const aya_ebpf_bindings::bindings::SO_KEEPALIVE: u32 +pub const aya_ebpf_bindings::bindings::SO_LINGER: u32 +pub const aya_ebpf_bindings::bindings::SO_LOCK_FILTER: u32 +pub const aya_ebpf_bindings::bindings::SO_MARK: u32 +pub const aya_ebpf_bindings::bindings::SO_MAX_PACING_RATE: u32 +pub const aya_ebpf_bindings::bindings::SO_MEMINFO: u32 +pub const aya_ebpf_bindings::bindings::SO_NETNS_COOKIE: u32 +pub const aya_ebpf_bindings::bindings::SO_NOFCS: u32 +pub const aya_ebpf_bindings::bindings::SO_NO_CHECK: u32 +pub const aya_ebpf_bindings::bindings::SO_OOBINLINE: u32 +pub const aya_ebpf_bindings::bindings::SO_PASSCRED: u32 +pub const aya_ebpf_bindings::bindings::SO_PASSPIDFD: u32 +pub const aya_ebpf_bindings::bindings::SO_PASSSEC: u32 +pub const aya_ebpf_bindings::bindings::SO_PEEK_OFF: u32 +pub const aya_ebpf_bindings::bindings::SO_PEERCRED: u32 +pub const aya_ebpf_bindings::bindings::SO_PEERGROUPS: u32 +pub const aya_ebpf_bindings::bindings::SO_PEERNAME: u32 +pub const aya_ebpf_bindings::bindings::SO_PEERPIDFD: u32 +pub const aya_ebpf_bindings::bindings::SO_PEERSEC: u32 +pub const aya_ebpf_bindings::bindings::SO_PREFER_BUSY_POLL: u32 +pub const aya_ebpf_bindings::bindings::SO_PRIORITY: u32 +pub const aya_ebpf_bindings::bindings::SO_PROTOCOL: u32 +pub const aya_ebpf_bindings::bindings::SO_RCVBUF: u32 +pub const aya_ebpf_bindings::bindings::SO_RCVBUFFORCE: u32 +pub const aya_ebpf_bindings::bindings::SO_RCVLOWAT: u32 +pub const aya_ebpf_bindings::bindings::SO_RCVMARK: u32 +pub const aya_ebpf_bindings::bindings::SO_RCVTIMEO: u32 +pub const aya_ebpf_bindings::bindings::SO_RCVTIMEO_NEW: u32 +pub const aya_ebpf_bindings::bindings::SO_RCVTIMEO_OLD: u32 +pub const aya_ebpf_bindings::bindings::SO_RESERVE_MEM: u32 +pub const aya_ebpf_bindings::bindings::SO_REUSEADDR: u32 +pub const aya_ebpf_bindings::bindings::SO_REUSEPORT: u32 +pub const aya_ebpf_bindings::bindings::SO_RXQ_OVFL: u32 +pub const aya_ebpf_bindings::bindings::SO_SECURITY_AUTHENTICATION: u32 +pub const aya_ebpf_bindings::bindings::SO_SECURITY_ENCRYPTION_NETWORK: u32 +pub const aya_ebpf_bindings::bindings::SO_SECURITY_ENCRYPTION_TRANSPORT: u32 +pub const aya_ebpf_bindings::bindings::SO_SELECT_ERR_QUEUE: u32 +pub const aya_ebpf_bindings::bindings::SO_SNDBUF: u32 +pub const aya_ebpf_bindings::bindings::SO_SNDBUFFORCE: u32 +pub const aya_ebpf_bindings::bindings::SO_SNDLOWAT: u32 +pub const aya_ebpf_bindings::bindings::SO_SNDTIMEO: u32 +pub const aya_ebpf_bindings::bindings::SO_SNDTIMEO_NEW: u32 +pub const aya_ebpf_bindings::bindings::SO_SNDTIMEO_OLD: u32 +pub const aya_ebpf_bindings::bindings::SO_TIMESTAMP: u32 +pub const aya_ebpf_bindings::bindings::SO_TIMESTAMPING: u32 +pub const aya_ebpf_bindings::bindings::SO_TIMESTAMPING_NEW: u32 +pub const aya_ebpf_bindings::bindings::SO_TIMESTAMPING_OLD: u32 +pub const aya_ebpf_bindings::bindings::SO_TIMESTAMPNS: u32 +pub const aya_ebpf_bindings::bindings::SO_TIMESTAMPNS_NEW: u32 +pub const aya_ebpf_bindings::bindings::SO_TIMESTAMPNS_OLD: u32 +pub const aya_ebpf_bindings::bindings::SO_TIMESTAMP_NEW: u32 +pub const aya_ebpf_bindings::bindings::SO_TIMESTAMP_OLD: u32 +pub const aya_ebpf_bindings::bindings::SO_TXREHASH: u32 +pub const aya_ebpf_bindings::bindings::SO_TXTIME: u32 +pub const aya_ebpf_bindings::bindings::SO_TYPE: u32 +pub const aya_ebpf_bindings::bindings::SO_WIFI_STATUS: u32 +pub const aya_ebpf_bindings::bindings::SO_ZEROCOPY: u32 +pub const aya_ebpf_bindings::bindings::TC_ACT_EXT_OPCODE_MAX: u32 +pub const aya_ebpf_bindings::bindings::TC_ACT_EXT_VAL_MASK: i32 +pub const aya_ebpf_bindings::bindings::TC_ACT_GOTO_CHAIN: u32 +pub const aya_ebpf_bindings::bindings::TC_ACT_JUMP: u32 +pub const aya_ebpf_bindings::bindings::TC_ACT_OK: i32 +pub const aya_ebpf_bindings::bindings::TC_ACT_PIPE: i32 +pub const aya_ebpf_bindings::bindings::TC_ACT_QUEUED: i32 +pub const aya_ebpf_bindings::bindings::TC_ACT_RECLASSIFY: i32 +pub const aya_ebpf_bindings::bindings::TC_ACT_REDIRECT: i32 +pub const aya_ebpf_bindings::bindings::TC_ACT_REPEAT: i32 +pub const aya_ebpf_bindings::bindings::TC_ACT_SHOT: i32 +pub const aya_ebpf_bindings::bindings::TC_ACT_STOLEN: i32 +pub const aya_ebpf_bindings::bindings::TC_ACT_TRAP: i32 +pub const aya_ebpf_bindings::bindings::TC_ACT_UNSPEC: i32 +pub const aya_ebpf_bindings::bindings::TC_ACT_VALUE_MAX: i32 +pub const aya_ebpf_bindings::bindings::__MAX_BPF_REG: aya_ebpf_bindings::bindings::_bindgen_ty_1 pub type aya_ebpf_bindings::bindings::__be16 = aya_ebpf_bindings::bindings::__u16 pub type aya_ebpf_bindings::bindings::__be32 = aya_ebpf_bindings::bindings::__u32 pub type aya_ebpf_bindings::bindings::__s16 = aya_ebpf_cty::c_short diff --git a/xtask/public-api/aya-ebpf-macros.txt b/xtask/public-api/aya-ebpf-macros.txt index 4ebcc590..c0e00241 100644 --- a/xtask/public-api/aya-ebpf-macros.txt +++ b/xtask/public-api/aya-ebpf-macros.txt @@ -1,4 +1,5 @@ pub mod aya_ebpf_macros +pub proc macro aya_ebpf_macros::#[btf_map] pub proc macro aya_ebpf_macros::#[btf_tracepoint] pub proc macro aya_ebpf_macros::#[cgroup_device] pub proc macro aya_ebpf_macros::#[cgroup_skb] @@ -9,9 +10,11 @@ pub proc macro aya_ebpf_macros::#[cgroup_sysctl] pub proc macro aya_ebpf_macros::#[classifier] pub proc macro aya_ebpf_macros::#[fentry] pub proc macro aya_ebpf_macros::#[fexit] +pub proc macro aya_ebpf_macros::#[flow_dissector] pub proc macro aya_ebpf_macros::#[kprobe] pub proc macro aya_ebpf_macros::#[kretprobe] pub proc macro aya_ebpf_macros::#[lsm] +pub proc macro aya_ebpf_macros::#[lsm_cgroup] pub proc macro aya_ebpf_macros::#[map] pub proc macro aya_ebpf_macros::#[perf_event] pub proc macro aya_ebpf_macros::#[raw_tracepoint] diff --git a/xtask/public-api/aya-ebpf.txt b/xtask/public-api/aya-ebpf.txt index 992c394c..a78b1758 100644 --- a/xtask/public-api/aya-ebpf.txt +++ b/xtask/public-api/aya-ebpf.txt @@ -1,9 +1,178 @@ pub mod aya_ebpf -pub use aya_ebpf::bindings pub use aya_ebpf::cty pub use aya_ebpf::macros +pub mod aya_ebpf::bindings +pub use aya_ebpf::bindings::<> +pub use aya_ebpf::bindings::pt_regs +pub mod aya_ebpf::btf_maps +pub mod aya_ebpf::btf_maps::array +#[repr(transparent)] pub struct aya_ebpf::btf_maps::array::Array(_) +impl aya_ebpf::btf_maps::array::Array +pub fn aya_ebpf::btf_maps::array::Array::get(&self, index: u32) -> core::option::Option<&T> +pub fn aya_ebpf::btf_maps::array::Array::get_ptr(&self, index: u32) -> core::option::Option<*const T> +pub fn aya_ebpf::btf_maps::array::Array::get_ptr_mut(&self, index: u32) -> core::option::Option<*mut T> +pub const fn aya_ebpf::btf_maps::array::Array::new() -> Self +pub fn aya_ebpf::btf_maps::array::Array::set(&self, index: u32, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +impl core::marker::Sync for aya_ebpf::btf_maps::array::Array +impl !core::marker::Freeze for aya_ebpf::btf_maps::array::Array +impl !core::marker::Send for aya_ebpf::btf_maps::array::Array +impl core::marker::Unpin for aya_ebpf::btf_maps::array::Array +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::array::Array +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::array::Array where T: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::array::Array where U: core::convert::From +pub fn aya_ebpf::btf_maps::array::Array::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::array::Array where U: core::convert::Into +pub type aya_ebpf::btf_maps::array::Array::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::array::Array::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::array::Array where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::array::Array::Error = >::Error +pub fn aya_ebpf::btf_maps::array::Array::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::array::Array where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::array::Array::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::array::Array where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::array::Array::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::array::Array where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::array::Array::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::array::Array +pub fn aya_ebpf::btf_maps::array::Array::from(t: T) -> T +pub struct aya_ebpf::btf_maps::array::ArrayDef +impl aya_ebpf::btf_maps::array::ArrayDef +pub const fn aya_ebpf::btf_maps::array::ArrayDef::new() -> aya_ebpf::btf_maps::array::ArrayDef +impl core::marker::Freeze for aya_ebpf::btf_maps::array::ArrayDef +impl !core::marker::Send for aya_ebpf::btf_maps::array::ArrayDef +impl !core::marker::Sync for aya_ebpf::btf_maps::array::ArrayDef +impl core::marker::Unpin for aya_ebpf::btf_maps::array::ArrayDef +impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::array::ArrayDef where K: core::panic::unwind_safe::RefUnwindSafe, V: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::array::ArrayDef where K: core::panic::unwind_safe::RefUnwindSafe, V: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::array::ArrayDef where U: core::convert::From +pub fn aya_ebpf::btf_maps::array::ArrayDef::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::array::ArrayDef where U: core::convert::Into +pub type aya_ebpf::btf_maps::array::ArrayDef::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::array::ArrayDef::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::array::ArrayDef where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::array::ArrayDef::Error = >::Error +pub fn aya_ebpf::btf_maps::array::ArrayDef::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::array::ArrayDef where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::array::ArrayDef::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::array::ArrayDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::array::ArrayDef::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::array::ArrayDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::array::ArrayDef::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::array::ArrayDef +pub fn aya_ebpf::btf_maps::array::ArrayDef::from(t: T) -> T +pub mod aya_ebpf::btf_maps::sk_storage +#[repr(transparent)] pub struct aya_ebpf::btf_maps::sk_storage::SkStorage(_) +impl aya_ebpf::btf_maps::sk_storage::SkStorage +pub unsafe fn aya_ebpf::btf_maps::sk_storage::SkStorage::delete(&self, sk: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sock) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub unsafe fn aya_ebpf::btf_maps::sk_storage::SkStorage::get_or_insert_ptr_mut(&self, ctx: &aya_ebpf::programs::sock_addr::SockAddrContext, value: core::option::Option<&mut T>) -> *mut T +pub unsafe fn aya_ebpf::btf_maps::sk_storage::SkStorage::get_ptr_mut(&self, ctx: &aya_ebpf::programs::sock_addr::SockAddrContext) -> *mut T +pub const fn aya_ebpf::btf_maps::sk_storage::SkStorage::new() -> Self +impl core::marker::Sync for aya_ebpf::btf_maps::sk_storage::SkStorage +impl !core::marker::Freeze for aya_ebpf::btf_maps::sk_storage::SkStorage +impl !core::marker::Send for aya_ebpf::btf_maps::sk_storage::SkStorage +impl core::marker::Unpin for aya_ebpf::btf_maps::sk_storage::SkStorage +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::sk_storage::SkStorage +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::sk_storage::SkStorage where T: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::sk_storage::SkStorage where U: core::convert::From +pub fn aya_ebpf::btf_maps::sk_storage::SkStorage::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::sk_storage::SkStorage where U: core::convert::Into +pub type aya_ebpf::btf_maps::sk_storage::SkStorage::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::sk_storage::SkStorage::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::sk_storage::SkStorage where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::sk_storage::SkStorage::Error = >::Error +pub fn aya_ebpf::btf_maps::sk_storage::SkStorage::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::sk_storage::SkStorage where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sk_storage::SkStorage::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::sk_storage::SkStorage where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sk_storage::SkStorage::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::sk_storage::SkStorage where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sk_storage::SkStorage::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::sk_storage::SkStorage +pub fn aya_ebpf::btf_maps::sk_storage::SkStorage::from(t: T) -> T +pub struct aya_ebpf::btf_maps::sk_storage::SkStorageDef +impl aya_ebpf::btf_maps::sk_storage::SkStorageDef +pub const fn aya_ebpf::btf_maps::sk_storage::SkStorageDef::new() -> aya_ebpf::btf_maps::sk_storage::SkStorageDef +impl core::marker::Freeze for aya_ebpf::btf_maps::sk_storage::SkStorageDef +impl !core::marker::Send for aya_ebpf::btf_maps::sk_storage::SkStorageDef +impl !core::marker::Sync for aya_ebpf::btf_maps::sk_storage::SkStorageDef +impl core::marker::Unpin for aya_ebpf::btf_maps::sk_storage::SkStorageDef +impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::sk_storage::SkStorageDef where K: core::panic::unwind_safe::RefUnwindSafe, V: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::sk_storage::SkStorageDef where K: core::panic::unwind_safe::RefUnwindSafe, V: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::sk_storage::SkStorageDef where U: core::convert::From +pub fn aya_ebpf::btf_maps::sk_storage::SkStorageDef::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::sk_storage::SkStorageDef where U: core::convert::Into +pub type aya_ebpf::btf_maps::sk_storage::SkStorageDef::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::sk_storage::SkStorageDef::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::sk_storage::SkStorageDef where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::sk_storage::SkStorageDef::Error = >::Error +pub fn aya_ebpf::btf_maps::sk_storage::SkStorageDef::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::sk_storage::SkStorageDef where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sk_storage::SkStorageDef::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::sk_storage::SkStorageDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sk_storage::SkStorageDef::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::sk_storage::SkStorageDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sk_storage::SkStorageDef::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::sk_storage::SkStorageDef +pub fn aya_ebpf::btf_maps::sk_storage::SkStorageDef::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::Array(_) +impl aya_ebpf::btf_maps::array::Array +pub fn aya_ebpf::btf_maps::array::Array::get(&self, index: u32) -> core::option::Option<&T> +pub fn aya_ebpf::btf_maps::array::Array::get_ptr(&self, index: u32) -> core::option::Option<*const T> +pub fn aya_ebpf::btf_maps::array::Array::get_ptr_mut(&self, index: u32) -> core::option::Option<*mut T> +pub const fn aya_ebpf::btf_maps::array::Array::new() -> Self +pub fn aya_ebpf::btf_maps::array::Array::set(&self, index: u32, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +impl core::marker::Sync for aya_ebpf::btf_maps::array::Array +impl !core::marker::Freeze for aya_ebpf::btf_maps::array::Array +impl !core::marker::Send for aya_ebpf::btf_maps::array::Array +impl core::marker::Unpin for aya_ebpf::btf_maps::array::Array +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::array::Array +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::array::Array where T: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::array::Array where U: core::convert::From +pub fn aya_ebpf::btf_maps::array::Array::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::array::Array where U: core::convert::Into +pub type aya_ebpf::btf_maps::array::Array::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::array::Array::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::array::Array where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::array::Array::Error = >::Error +pub fn aya_ebpf::btf_maps::array::Array::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::array::Array where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::array::Array::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::array::Array where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::array::Array::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::array::Array where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::array::Array::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::array::Array +pub fn aya_ebpf::btf_maps::array::Array::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::SkStorage(_) +impl aya_ebpf::btf_maps::sk_storage::SkStorage +pub unsafe fn aya_ebpf::btf_maps::sk_storage::SkStorage::delete(&self, sk: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sock) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub unsafe fn aya_ebpf::btf_maps::sk_storage::SkStorage::get_or_insert_ptr_mut(&self, ctx: &aya_ebpf::programs::sock_addr::SockAddrContext, value: core::option::Option<&mut T>) -> *mut T +pub unsafe fn aya_ebpf::btf_maps::sk_storage::SkStorage::get_ptr_mut(&self, ctx: &aya_ebpf::programs::sock_addr::SockAddrContext) -> *mut T +pub const fn aya_ebpf::btf_maps::sk_storage::SkStorage::new() -> Self +impl core::marker::Sync for aya_ebpf::btf_maps::sk_storage::SkStorage +impl !core::marker::Freeze for aya_ebpf::btf_maps::sk_storage::SkStorage +impl !core::marker::Send for aya_ebpf::btf_maps::sk_storage::SkStorage +impl core::marker::Unpin for aya_ebpf::btf_maps::sk_storage::SkStorage +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::sk_storage::SkStorage +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::sk_storage::SkStorage where T: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::sk_storage::SkStorage where U: core::convert::From +pub fn aya_ebpf::btf_maps::sk_storage::SkStorage::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::sk_storage::SkStorage where U: core::convert::Into +pub type aya_ebpf::btf_maps::sk_storage::SkStorage::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::sk_storage::SkStorage::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::sk_storage::SkStorage where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::sk_storage::SkStorage::Error = >::Error +pub fn aya_ebpf::btf_maps::sk_storage::SkStorage::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::sk_storage::SkStorage where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sk_storage::SkStorage::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::sk_storage::SkStorage where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sk_storage::SkStorage::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::sk_storage::SkStorage where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sk_storage::SkStorage::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::sk_storage::SkStorage +pub fn aya_ebpf::btf_maps::sk_storage::SkStorage::from(t: T) -> T pub mod aya_ebpf::helpers -pub use aya_ebpf::helpers::gen +pub use aya_ebpf::helpers::generated pub macro aya_ebpf::helpers::bpf_printk! #[repr(transparent)] pub struct aya_ebpf::helpers::PrintkArg(_) impl aya_ebpf::helpers::PrintkArg @@ -11,27 +180,27 @@ pub fn aya_ebpf::helpers::PrintkArg::from_raw(x: u64) -> Self impl core::clone::Clone for aya_ebpf::helpers::PrintkArg pub fn aya_ebpf::helpers::PrintkArg::clone(&self) -> aya_ebpf::helpers::PrintkArg impl core::convert::From for aya_ebpf::helpers::PrintkArg -pub fn aya_ebpf::helpers::PrintkArg::from(x: char) -> aya_ebpf::helpers::PrintkArg +pub fn aya_ebpf::helpers::PrintkArg::from(x: char) -> Self impl core::convert::From for aya_ebpf::helpers::PrintkArg -pub fn aya_ebpf::helpers::PrintkArg::from(x: i16) -> aya_ebpf::helpers::PrintkArg +pub fn aya_ebpf::helpers::PrintkArg::from(x: i16) -> Self impl core::convert::From for aya_ebpf::helpers::PrintkArg -pub fn aya_ebpf::helpers::PrintkArg::from(x: i32) -> aya_ebpf::helpers::PrintkArg +pub fn aya_ebpf::helpers::PrintkArg::from(x: i32) -> Self impl core::convert::From for aya_ebpf::helpers::PrintkArg -pub fn aya_ebpf::helpers::PrintkArg::from(x: i64) -> aya_ebpf::helpers::PrintkArg +pub fn aya_ebpf::helpers::PrintkArg::from(x: i64) -> Self impl core::convert::From for aya_ebpf::helpers::PrintkArg -pub fn aya_ebpf::helpers::PrintkArg::from(x: i8) -> aya_ebpf::helpers::PrintkArg +pub fn aya_ebpf::helpers::PrintkArg::from(x: i8) -> Self impl core::convert::From for aya_ebpf::helpers::PrintkArg -pub fn aya_ebpf::helpers::PrintkArg::from(x: isize) -> aya_ebpf::helpers::PrintkArg +pub fn aya_ebpf::helpers::PrintkArg::from(x: isize) -> Self impl core::convert::From for aya_ebpf::helpers::PrintkArg -pub fn aya_ebpf::helpers::PrintkArg::from(x: u16) -> aya_ebpf::helpers::PrintkArg +pub fn aya_ebpf::helpers::PrintkArg::from(x: u16) -> Self impl core::convert::From for aya_ebpf::helpers::PrintkArg -pub fn aya_ebpf::helpers::PrintkArg::from(x: u32) -> aya_ebpf::helpers::PrintkArg +pub fn aya_ebpf::helpers::PrintkArg::from(x: u32) -> Self impl core::convert::From for aya_ebpf::helpers::PrintkArg -pub fn aya_ebpf::helpers::PrintkArg::from(x: u64) -> aya_ebpf::helpers::PrintkArg +pub fn aya_ebpf::helpers::PrintkArg::from(x: u64) -> Self impl core::convert::From for aya_ebpf::helpers::PrintkArg -pub fn aya_ebpf::helpers::PrintkArg::from(x: u8) -> aya_ebpf::helpers::PrintkArg +pub fn aya_ebpf::helpers::PrintkArg::from(x: u8) -> Self impl core::convert::From for aya_ebpf::helpers::PrintkArg -pub fn aya_ebpf::helpers::PrintkArg::from(x: usize) -> aya_ebpf::helpers::PrintkArg +pub fn aya_ebpf::helpers::PrintkArg::from(x: usize) -> Self impl core::marker::Copy for aya_ebpf::helpers::PrintkArg impl core::convert::From<*const T> for aya_ebpf::helpers::PrintkArg pub fn aya_ebpf::helpers::PrintkArg::from(x: *const T) -> Self @@ -51,12 +220,14 @@ pub fn aya_ebpf::helpers::PrintkArg::try_from(value: U) -> core::result::Result< impl core::convert::TryInto for aya_ebpf::helpers::PrintkArg where U: core::convert::TryFrom pub type aya_ebpf::helpers::PrintkArg::Error = >::Error pub fn aya_ebpf::helpers::PrintkArg::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::helpers::PrintkArg where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::helpers::PrintkArg where T: 'static + ?core::marker::Sized pub fn aya_ebpf::helpers::PrintkArg::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::helpers::PrintkArg where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::helpers::PrintkArg where T: ?core::marker::Sized pub fn aya_ebpf::helpers::PrintkArg::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::helpers::PrintkArg where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::helpers::PrintkArg where T: ?core::marker::Sized pub fn aya_ebpf::helpers::PrintkArg::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_ebpf::helpers::PrintkArg where T: core::clone::Clone +pub unsafe fn aya_ebpf::helpers::PrintkArg::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_ebpf::helpers::PrintkArg pub fn aya_ebpf::helpers::PrintkArg::from(t: T) -> T pub fn aya_ebpf::helpers::bpf_get_current_comm() -> core::result::Result<[u8; 16], aya_ebpf_cty::od::c_long> @@ -74,6 +245,7 @@ pub unsafe fn aya_ebpf::helpers::bpf_probe_read_user_buf(src: *const u8, dst: &m pub unsafe fn aya_ebpf::helpers::bpf_probe_read_user_str(src: *const u8, dest: &mut [u8]) -> core::result::Result pub unsafe fn aya_ebpf::helpers::bpf_probe_read_user_str_bytes(src: *const u8, dest: &mut [u8]) -> core::result::Result<&[u8], aya_ebpf_cty::od::c_long> pub unsafe fn aya_ebpf::helpers::bpf_probe_write_user(dst: *mut T, src: *const T) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub fn aya_ebpf::helpers::bpf_strncmp(s1: &[u8; N], s2: &core::ffi::c_str::CStr) -> core::cmp::Ordering pub mod aya_ebpf::maps pub mod aya_ebpf::maps::array #[repr(transparent)] pub struct aya_ebpf::maps::array::Array @@ -81,8 +253,9 @@ impl aya_ebpf::maps::array::Array pub fn aya_ebpf::maps::array::Array::get(&self, index: u32) -> core::option::Option<&T> pub fn aya_ebpf::maps::array::Array::get_ptr(&self, index: u32) -> core::option::Option<*const T> pub fn aya_ebpf::maps::array::Array::get_ptr_mut(&self, index: u32) -> core::option::Option<*mut T> -pub const fn aya_ebpf::maps::array::Array::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::array::Array -pub const fn aya_ebpf::maps::array::Array::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::array::Array +pub const fn aya_ebpf::maps::array::Array::pinned(max_entries: u32, flags: u32) -> Self +pub fn aya_ebpf::maps::array::Array::set(&self, index: u32, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::maps::array::Array::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::array::Array impl !core::marker::Freeze for aya_ebpf::maps::array::Array impl core::marker::Send for aya_ebpf::maps::array::Array where T: core::marker::Send @@ -97,21 +270,21 @@ pub fn aya_ebpf::maps::array::Array::try_from(value: U) -> core::result::Resu impl core::convert::TryInto for aya_ebpf::maps::array::Array where U: core::convert::TryFrom pub type aya_ebpf::maps::array::Array::Error = >::Error pub fn aya_ebpf::maps::array::Array::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::array::Array where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::array::Array where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::array::Array::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::array::Array where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::array::Array where T: ?core::marker::Sized pub fn aya_ebpf::maps::array::Array::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::array::Array where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::array::Array where T: ?core::marker::Sized pub fn aya_ebpf::maps::array::Array::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::array::Array pub fn aya_ebpf::maps::array::Array::from(t: T) -> T pub mod aya_ebpf::maps::bloom_filter #[repr(transparent)] pub struct aya_ebpf::maps::bloom_filter::BloomFilter impl aya_ebpf::maps::bloom_filter::BloomFilter -pub fn aya_ebpf::maps::bloom_filter::BloomFilter::contains(&mut self, value: &T) -> core::result::Result<(), i64> -pub fn aya_ebpf::maps::bloom_filter::BloomFilter::insert(&mut self, value: &T, flags: u64) -> core::result::Result<(), i64> -pub const fn aya_ebpf::maps::bloom_filter::BloomFilter::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::bloom_filter::BloomFilter -pub const fn aya_ebpf::maps::bloom_filter::BloomFilter::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::bloom_filter::BloomFilter +pub fn aya_ebpf::maps::bloom_filter::BloomFilter::contains(&mut self, value: impl core::borrow::Borrow) -> core::result::Result<(), i64> +pub fn aya_ebpf::maps::bloom_filter::BloomFilter::insert(&mut self, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), i64> +pub const fn aya_ebpf::maps::bloom_filter::BloomFilter::pinned(max_entries: u32, flags: u32) -> Self +pub const fn aya_ebpf::maps::bloom_filter::BloomFilter::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Freeze for aya_ebpf::maps::bloom_filter::BloomFilter impl core::marker::Send for aya_ebpf::maps::bloom_filter::BloomFilter where T: core::marker::Send impl core::marker::Sync for aya_ebpf::maps::bloom_filter::BloomFilter where T: core::marker::Sync @@ -126,24 +299,24 @@ pub fn aya_ebpf::maps::bloom_filter::BloomFilter::try_from(value: U) -> core: impl core::convert::TryInto for aya_ebpf::maps::bloom_filter::BloomFilter where U: core::convert::TryFrom pub type aya_ebpf::maps::bloom_filter::BloomFilter::Error = >::Error pub fn aya_ebpf::maps::bloom_filter::BloomFilter::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::bloom_filter::BloomFilter where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::bloom_filter::BloomFilter where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::bloom_filter::BloomFilter::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::bloom_filter::BloomFilter where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::bloom_filter::BloomFilter where T: ?core::marker::Sized pub fn aya_ebpf::maps::bloom_filter::BloomFilter::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::bloom_filter::BloomFilter where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::bloom_filter::BloomFilter where T: ?core::marker::Sized pub fn aya_ebpf::maps::bloom_filter::BloomFilter::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::bloom_filter::BloomFilter pub fn aya_ebpf::maps::bloom_filter::BloomFilter::from(t: T) -> T pub mod aya_ebpf::maps::hash_map #[repr(transparent)] pub struct aya_ebpf::maps::hash_map::HashMap impl aya_ebpf::maps::hash_map::HashMap -pub unsafe fn aya_ebpf::maps::hash_map::HashMap::get(&self, key: &K) -> core::option::Option<&V> -pub fn aya_ebpf::maps::hash_map::HashMap::get_ptr(&self, key: &K) -> core::option::Option<*const V> -pub fn aya_ebpf::maps::hash_map::HashMap::get_ptr_mut(&self, key: &K) -> core::option::Option<*mut V> -pub fn aya_ebpf::maps::hash_map::HashMap::insert(&self, key: &K, value: &V, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> -pub const fn aya_ebpf::maps::hash_map::HashMap::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::hash_map::HashMap -pub fn aya_ebpf::maps::hash_map::HashMap::remove(&self, key: &K) -> core::result::Result<(), aya_ebpf_cty::od::c_long> -pub const fn aya_ebpf::maps::hash_map::HashMap::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::hash_map::HashMap +pub unsafe fn aya_ebpf::maps::hash_map::HashMap::get(&self, key: impl core::borrow::Borrow) -> core::option::Option<&V> +pub fn aya_ebpf::maps::hash_map::HashMap::get_ptr(&self, key: impl core::borrow::Borrow) -> core::option::Option<*const V> +pub fn aya_ebpf::maps::hash_map::HashMap::get_ptr_mut(&self, key: impl core::borrow::Borrow) -> core::option::Option<*mut V> +pub fn aya_ebpf::maps::hash_map::HashMap::insert(&self, key: impl core::borrow::Borrow, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::maps::hash_map::HashMap::pinned(max_entries: u32, flags: u32) -> Self +pub fn aya_ebpf::maps::hash_map::HashMap::remove(&self, key: impl core::borrow::Borrow) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::maps::hash_map::HashMap::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::hash_map::HashMap impl !core::marker::Freeze for aya_ebpf::maps::hash_map::HashMap impl core::marker::Send for aya_ebpf::maps::hash_map::HashMap where K: core::marker::Send, V: core::marker::Send @@ -158,23 +331,23 @@ pub fn aya_ebpf::maps::hash_map::HashMap::try_from(value: U) -> core::resu impl core::convert::TryInto for aya_ebpf::maps::hash_map::HashMap where U: core::convert::TryFrom pub type aya_ebpf::maps::hash_map::HashMap::Error = >::Error pub fn aya_ebpf::maps::hash_map::HashMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::hash_map::HashMap where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::hash_map::HashMap where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::HashMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::hash_map::HashMap where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::hash_map::HashMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::HashMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::hash_map::HashMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::hash_map::HashMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::HashMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::hash_map::HashMap pub fn aya_ebpf::maps::hash_map::HashMap::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::hash_map::LruHashMap impl aya_ebpf::maps::hash_map::LruHashMap -pub unsafe fn aya_ebpf::maps::hash_map::LruHashMap::get(&self, key: &K) -> core::option::Option<&V> -pub fn aya_ebpf::maps::hash_map::LruHashMap::get_ptr(&self, key: &K) -> core::option::Option<*const V> -pub fn aya_ebpf::maps::hash_map::LruHashMap::get_ptr_mut(&self, key: &K) -> core::option::Option<*mut V> -pub fn aya_ebpf::maps::hash_map::LruHashMap::insert(&self, key: &K, value: &V, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> -pub const fn aya_ebpf::maps::hash_map::LruHashMap::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::hash_map::LruHashMap -pub fn aya_ebpf::maps::hash_map::LruHashMap::remove(&self, key: &K) -> core::result::Result<(), aya_ebpf_cty::od::c_long> -pub const fn aya_ebpf::maps::hash_map::LruHashMap::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::hash_map::LruHashMap +pub unsafe fn aya_ebpf::maps::hash_map::LruHashMap::get(&self, key: impl core::borrow::Borrow) -> core::option::Option<&V> +pub fn aya_ebpf::maps::hash_map::LruHashMap::get_ptr(&self, key: impl core::borrow::Borrow) -> core::option::Option<*const V> +pub fn aya_ebpf::maps::hash_map::LruHashMap::get_ptr_mut(&self, key: impl core::borrow::Borrow) -> core::option::Option<*mut V> +pub fn aya_ebpf::maps::hash_map::LruHashMap::insert(&self, key: impl core::borrow::Borrow, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::maps::hash_map::LruHashMap::pinned(max_entries: u32, flags: u32) -> Self +pub fn aya_ebpf::maps::hash_map::LruHashMap::remove(&self, key: impl core::borrow::Borrow) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::maps::hash_map::LruHashMap::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::hash_map::LruHashMap impl !core::marker::Freeze for aya_ebpf::maps::hash_map::LruHashMap impl core::marker::Send for aya_ebpf::maps::hash_map::LruHashMap where K: core::marker::Send, V: core::marker::Send @@ -189,23 +362,23 @@ pub fn aya_ebpf::maps::hash_map::LruHashMap::try_from(value: U) -> core::r impl core::convert::TryInto for aya_ebpf::maps::hash_map::LruHashMap where U: core::convert::TryFrom pub type aya_ebpf::maps::hash_map::LruHashMap::Error = >::Error pub fn aya_ebpf::maps::hash_map::LruHashMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::hash_map::LruHashMap where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::hash_map::LruHashMap where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::LruHashMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::hash_map::LruHashMap where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::hash_map::LruHashMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::LruHashMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::hash_map::LruHashMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::hash_map::LruHashMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::LruHashMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::hash_map::LruHashMap pub fn aya_ebpf::maps::hash_map::LruHashMap::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::hash_map::LruPerCpuHashMap impl aya_ebpf::maps::hash_map::LruPerCpuHashMap -pub unsafe fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::get(&self, key: &K) -> core::option::Option<&V> -pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::get_ptr(&self, key: &K) -> core::option::Option<*const V> -pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::get_ptr_mut(&self, key: &K) -> core::option::Option<*mut V> -pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::insert(&self, key: &K, value: &V, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> -pub const fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::hash_map::LruPerCpuHashMap -pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::remove(&self, key: &K) -> core::result::Result<(), aya_ebpf_cty::od::c_long> -pub const fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::hash_map::LruPerCpuHashMap +pub unsafe fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::get(&self, key: impl core::borrow::Borrow) -> core::option::Option<&V> +pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::get_ptr(&self, key: impl core::borrow::Borrow) -> core::option::Option<*const V> +pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::get_ptr_mut(&self, key: impl core::borrow::Borrow) -> core::option::Option<*mut V> +pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::insert(&self, key: impl core::borrow::Borrow, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::pinned(max_entries: u32, flags: u32) -> Self +pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::remove(&self, key: impl core::borrow::Borrow) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::hash_map::LruPerCpuHashMap impl !core::marker::Freeze for aya_ebpf::maps::hash_map::LruPerCpuHashMap impl core::marker::Send for aya_ebpf::maps::hash_map::LruPerCpuHashMap where K: core::marker::Send, V: core::marker::Send @@ -220,23 +393,23 @@ pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::try_from(value: U) -> c impl core::convert::TryInto for aya_ebpf::maps::hash_map::LruPerCpuHashMap where U: core::convert::TryFrom pub type aya_ebpf::maps::hash_map::LruPerCpuHashMap::Error = >::Error pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::hash_map::LruPerCpuHashMap where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::hash_map::LruPerCpuHashMap where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::hash_map::LruPerCpuHashMap where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::hash_map::LruPerCpuHashMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::hash_map::LruPerCpuHashMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::hash_map::LruPerCpuHashMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::hash_map::LruPerCpuHashMap pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::hash_map::PerCpuHashMap impl aya_ebpf::maps::hash_map::PerCpuHashMap -pub unsafe fn aya_ebpf::maps::hash_map::PerCpuHashMap::get(&self, key: &K) -> core::option::Option<&V> -pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::get_ptr(&self, key: &K) -> core::option::Option<*const V> -pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::get_ptr_mut(&self, key: &K) -> core::option::Option<*mut V> -pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::insert(&self, key: &K, value: &V, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> -pub const fn aya_ebpf::maps::hash_map::PerCpuHashMap::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::hash_map::PerCpuHashMap -pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::remove(&self, key: &K) -> core::result::Result<(), aya_ebpf_cty::od::c_long> -pub const fn aya_ebpf::maps::hash_map::PerCpuHashMap::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::hash_map::PerCpuHashMap +pub unsafe fn aya_ebpf::maps::hash_map::PerCpuHashMap::get(&self, key: impl core::borrow::Borrow) -> core::option::Option<&V> +pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::get_ptr(&self, key: impl core::borrow::Borrow) -> core::option::Option<*const V> +pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::get_ptr_mut(&self, key: impl core::borrow::Borrow) -> core::option::Option<*mut V> +pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::insert(&self, key: impl core::borrow::Borrow, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::maps::hash_map::PerCpuHashMap::pinned(max_entries: u32, flags: u32) -> Self +pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::remove(&self, key: impl core::borrow::Borrow) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::maps::hash_map::PerCpuHashMap::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::hash_map::PerCpuHashMap impl !core::marker::Freeze for aya_ebpf::maps::hash_map::PerCpuHashMap impl core::marker::Send for aya_ebpf::maps::hash_map::PerCpuHashMap where K: core::marker::Send, V: core::marker::Send @@ -251,16 +424,16 @@ pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::try_from(value: U) -> core impl core::convert::TryInto for aya_ebpf::maps::hash_map::PerCpuHashMap where U: core::convert::TryFrom pub type aya_ebpf::maps::hash_map::PerCpuHashMap::Error = >::Error pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::hash_map::PerCpuHashMap where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::hash_map::PerCpuHashMap where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::hash_map::PerCpuHashMap where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::hash_map::PerCpuHashMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::hash_map::PerCpuHashMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::hash_map::PerCpuHashMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::hash_map::PerCpuHashMap pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::from(t: T) -> T pub mod aya_ebpf::maps::lpm_trie -#[repr(packed)] pub struct aya_ebpf::maps::lpm_trie::Key +#[repr(C, packed(1))] pub struct aya_ebpf::maps::lpm_trie::Key pub aya_ebpf::maps::lpm_trie::Key::data: K pub aya_ebpf::maps::lpm_trie::Key::prefix_len: u32 impl aya_ebpf::maps::lpm_trie::Key @@ -279,21 +452,21 @@ pub fn aya_ebpf::maps::lpm_trie::Key::try_from(value: U) -> core::result::Res impl core::convert::TryInto for aya_ebpf::maps::lpm_trie::Key where U: core::convert::TryFrom pub type aya_ebpf::maps::lpm_trie::Key::Error = >::Error pub fn aya_ebpf::maps::lpm_trie::Key::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::lpm_trie::Key where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::lpm_trie::Key where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::lpm_trie::Key::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::lpm_trie::Key where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::lpm_trie::Key where T: ?core::marker::Sized pub fn aya_ebpf::maps::lpm_trie::Key::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::lpm_trie::Key where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::lpm_trie::Key where T: ?core::marker::Sized pub fn aya_ebpf::maps::lpm_trie::Key::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::lpm_trie::Key pub fn aya_ebpf::maps::lpm_trie::Key::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::lpm_trie::LpmTrie impl aya_ebpf::maps::lpm_trie::LpmTrie -pub fn aya_ebpf::maps::lpm_trie::LpmTrie::get(&self, key: &aya_ebpf::maps::lpm_trie::Key) -> core::option::Option<&V> -pub fn aya_ebpf::maps::lpm_trie::LpmTrie::insert(&self, key: &aya_ebpf::maps::lpm_trie::Key, value: &V, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> -pub const fn aya_ebpf::maps::lpm_trie::LpmTrie::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::lpm_trie::LpmTrie -pub fn aya_ebpf::maps::lpm_trie::LpmTrie::remove(&self, key: &aya_ebpf::maps::lpm_trie::Key) -> core::result::Result<(), aya_ebpf_cty::od::c_long> -pub const fn aya_ebpf::maps::lpm_trie::LpmTrie::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::lpm_trie::LpmTrie +pub fn aya_ebpf::maps::lpm_trie::LpmTrie::get(&self, key: impl core::borrow::Borrow>) -> core::option::Option<&V> +pub fn aya_ebpf::maps::lpm_trie::LpmTrie::insert(&self, key: impl core::borrow::Borrow>, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::maps::lpm_trie::LpmTrie::pinned(max_entries: u32, flags: u32) -> Self +pub fn aya_ebpf::maps::lpm_trie::LpmTrie::remove(&self, key: impl core::borrow::Borrow>) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::maps::lpm_trie::LpmTrie::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::lpm_trie::LpmTrie impl !core::marker::Freeze for aya_ebpf::maps::lpm_trie::LpmTrie impl core::marker::Send for aya_ebpf::maps::lpm_trie::LpmTrie where K: core::marker::Send, V: core::marker::Send @@ -308,11 +481,11 @@ pub fn aya_ebpf::maps::lpm_trie::LpmTrie::try_from(value: U) -> core::resu impl core::convert::TryInto for aya_ebpf::maps::lpm_trie::LpmTrie where U: core::convert::TryFrom pub type aya_ebpf::maps::lpm_trie::LpmTrie::Error = >::Error pub fn aya_ebpf::maps::lpm_trie::LpmTrie::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::lpm_trie::LpmTrie where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::lpm_trie::LpmTrie where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::lpm_trie::LpmTrie::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::lpm_trie::LpmTrie where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::lpm_trie::LpmTrie where T: ?core::marker::Sized pub fn aya_ebpf::maps::lpm_trie::LpmTrie::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::lpm_trie::LpmTrie where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::lpm_trie::LpmTrie where T: ?core::marker::Sized pub fn aya_ebpf::maps::lpm_trie::LpmTrie::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::lpm_trie::LpmTrie pub fn aya_ebpf::maps::lpm_trie::LpmTrie::from(t: T) -> T @@ -322,8 +495,8 @@ impl aya_ebpf::maps::per_cpu_array::PerCpuArray pub fn aya_ebpf::maps::per_cpu_array::PerCpuArray::get(&self, index: u32) -> core::option::Option<&T> pub fn aya_ebpf::maps::per_cpu_array::PerCpuArray::get_ptr(&self, index: u32) -> core::option::Option<*const T> pub fn aya_ebpf::maps::per_cpu_array::PerCpuArray::get_ptr_mut(&self, index: u32) -> core::option::Option<*mut T> -pub const fn aya_ebpf::maps::per_cpu_array::PerCpuArray::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::per_cpu_array::PerCpuArray -pub const fn aya_ebpf::maps::per_cpu_array::PerCpuArray::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::per_cpu_array::PerCpuArray +pub const fn aya_ebpf::maps::per_cpu_array::PerCpuArray::pinned(max_entries: u32, flags: u32) -> Self +pub const fn aya_ebpf::maps::per_cpu_array::PerCpuArray::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::per_cpu_array::PerCpuArray impl !core::marker::Freeze for aya_ebpf::maps::per_cpu_array::PerCpuArray impl core::marker::Send for aya_ebpf::maps::per_cpu_array::PerCpuArray where T: core::marker::Send @@ -338,22 +511,21 @@ pub fn aya_ebpf::maps::per_cpu_array::PerCpuArray::try_from(value: U) -> core impl core::convert::TryInto for aya_ebpf::maps::per_cpu_array::PerCpuArray where U: core::convert::TryFrom pub type aya_ebpf::maps::per_cpu_array::PerCpuArray::Error = >::Error pub fn aya_ebpf::maps::per_cpu_array::PerCpuArray::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::per_cpu_array::PerCpuArray where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::per_cpu_array::PerCpuArray where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::per_cpu_array::PerCpuArray::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::per_cpu_array::PerCpuArray where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::per_cpu_array::PerCpuArray where T: ?core::marker::Sized pub fn aya_ebpf::maps::per_cpu_array::PerCpuArray::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::per_cpu_array::PerCpuArray where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::per_cpu_array::PerCpuArray where T: ?core::marker::Sized pub fn aya_ebpf::maps::per_cpu_array::PerCpuArray::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::per_cpu_array::PerCpuArray pub fn aya_ebpf::maps::per_cpu_array::PerCpuArray::from(t: T) -> T pub mod aya_ebpf::maps::perf #[repr(transparent)] pub struct aya_ebpf::maps::perf::PerfEventArray impl aya_ebpf::maps::PerfEventArray -pub const fn aya_ebpf::maps::PerfEventArray::new(flags: u32) -> aya_ebpf::maps::PerfEventArray -pub fn aya_ebpf::maps::PerfEventArray::output(&self, ctx: &C, data: &T, flags: u32) -pub fn aya_ebpf::maps::PerfEventArray::output_at_index(&self, ctx: &C, index: u32, data: &T, flags: u32) -pub const fn aya_ebpf::maps::PerfEventArray::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::PerfEventArray -pub const fn aya_ebpf::maps::PerfEventArray::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::PerfEventArray +pub const fn aya_ebpf::maps::PerfEventArray::new(flags: u32) -> Self +pub fn aya_ebpf::maps::PerfEventArray::output(&self, ctx: &C, data: impl core::borrow::Borrow, flags: u32) +pub fn aya_ebpf::maps::PerfEventArray::output_at_index(&self, ctx: &C, index: u32, data: impl core::borrow::Borrow, flags: u32) +pub const fn aya_ebpf::maps::PerfEventArray::pinned(flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::PerfEventArray impl !core::marker::Freeze for aya_ebpf::maps::PerfEventArray impl core::marker::Send for aya_ebpf::maps::PerfEventArray where T: core::marker::Send @@ -368,21 +540,20 @@ pub fn aya_ebpf::maps::PerfEventArray::try_from(value: U) -> core::result::Re impl core::convert::TryInto for aya_ebpf::maps::PerfEventArray where U: core::convert::TryFrom pub type aya_ebpf::maps::PerfEventArray::Error = >::Error pub fn aya_ebpf::maps::PerfEventArray::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::PerfEventArray where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::PerfEventArray where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::PerfEventArray::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::PerfEventArray where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::PerfEventArray where T: ?core::marker::Sized pub fn aya_ebpf::maps::PerfEventArray::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::PerfEventArray where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::PerfEventArray where T: ?core::marker::Sized pub fn aya_ebpf::maps::PerfEventArray::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::PerfEventArray pub fn aya_ebpf::maps::PerfEventArray::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::perf::PerfEventByteArray impl aya_ebpf::maps::PerfEventByteArray -pub const fn aya_ebpf::maps::PerfEventByteArray::new(flags: u32) -> aya_ebpf::maps::PerfEventByteArray +pub const fn aya_ebpf::maps::PerfEventByteArray::new(flags: u32) -> Self pub fn aya_ebpf::maps::PerfEventByteArray::output(&self, ctx: &C, data: &[u8], flags: u32) pub fn aya_ebpf::maps::PerfEventByteArray::output_at_index(&self, ctx: &C, index: u32, data: &[u8], flags: u32) -pub const fn aya_ebpf::maps::PerfEventByteArray::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::PerfEventByteArray -pub const fn aya_ebpf::maps::PerfEventByteArray::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::PerfEventByteArray +pub const fn aya_ebpf::maps::PerfEventByteArray::pinned(flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::PerfEventByteArray impl !core::marker::Freeze for aya_ebpf::maps::PerfEventByteArray impl core::marker::Send for aya_ebpf::maps::PerfEventByteArray @@ -397,20 +568,20 @@ pub fn aya_ebpf::maps::PerfEventByteArray::try_from(value: U) -> core::result::R impl core::convert::TryInto for aya_ebpf::maps::PerfEventByteArray where U: core::convert::TryFrom pub type aya_ebpf::maps::PerfEventByteArray::Error = >::Error pub fn aya_ebpf::maps::PerfEventByteArray::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::PerfEventByteArray where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::PerfEventByteArray where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::PerfEventByteArray::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::PerfEventByteArray where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::PerfEventByteArray where T: ?core::marker::Sized pub fn aya_ebpf::maps::PerfEventByteArray::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::PerfEventByteArray where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::PerfEventByteArray where T: ?core::marker::Sized pub fn aya_ebpf::maps::PerfEventByteArray::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::PerfEventByteArray pub fn aya_ebpf::maps::PerfEventByteArray::from(t: T) -> T pub mod aya_ebpf::maps::program_array #[repr(transparent)] pub struct aya_ebpf::maps::program_array::ProgramArray impl aya_ebpf::maps::program_array::ProgramArray -pub const fn aya_ebpf::maps::program_array::ProgramArray::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::program_array::ProgramArray -pub unsafe fn aya_ebpf::maps::program_array::ProgramArray::tail_call(&self, ctx: &C, index: u32) -> core::result::Result -pub const fn aya_ebpf::maps::program_array::ProgramArray::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::program_array::ProgramArray +pub const fn aya_ebpf::maps::program_array::ProgramArray::pinned(max_entries: u32, flags: u32) -> Self +pub unsafe fn aya_ebpf::maps::program_array::ProgramArray::tail_call(&self, ctx: &C, index: u32) -> core::result::Result +pub const fn aya_ebpf::maps::program_array::ProgramArray::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::program_array::ProgramArray impl !core::marker::Freeze for aya_ebpf::maps::program_array::ProgramArray impl core::marker::Send for aya_ebpf::maps::program_array::ProgramArray @@ -425,21 +596,22 @@ pub fn aya_ebpf::maps::program_array::ProgramArray::try_from(value: U) -> core:: impl core::convert::TryInto for aya_ebpf::maps::program_array::ProgramArray where U: core::convert::TryFrom pub type aya_ebpf::maps::program_array::ProgramArray::Error = >::Error pub fn aya_ebpf::maps::program_array::ProgramArray::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::program_array::ProgramArray where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::program_array::ProgramArray where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::program_array::ProgramArray::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::program_array::ProgramArray where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::program_array::ProgramArray where T: ?core::marker::Sized pub fn aya_ebpf::maps::program_array::ProgramArray::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::program_array::ProgramArray where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::program_array::ProgramArray where T: ?core::marker::Sized pub fn aya_ebpf::maps::program_array::ProgramArray::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::program_array::ProgramArray pub fn aya_ebpf::maps::program_array::ProgramArray::from(t: T) -> T pub mod aya_ebpf::maps::queue #[repr(transparent)] pub struct aya_ebpf::maps::queue::Queue impl aya_ebpf::maps::queue::Queue -pub const fn aya_ebpf::maps::queue::Queue::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::queue::Queue +pub fn aya_ebpf::maps::queue::Queue::peek(&self) -> core::option::Option +pub const fn aya_ebpf::maps::queue::Queue::pinned(max_entries: u32, flags: u32) -> Self pub fn aya_ebpf::maps::queue::Queue::pop(&self) -> core::option::Option -pub fn aya_ebpf::maps::queue::Queue::push(&self, value: &T, flags: u64) -> core::result::Result<(), i64> -pub const fn aya_ebpf::maps::queue::Queue::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::queue::Queue +pub fn aya_ebpf::maps::queue::Queue::push(&self, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), i64> +pub const fn aya_ebpf::maps::queue::Queue::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::queue::Queue impl !core::marker::Freeze for aya_ebpf::maps::queue::Queue impl core::marker::Send for aya_ebpf::maps::queue::Queue where T: core::marker::Send @@ -454,21 +626,22 @@ pub fn aya_ebpf::maps::queue::Queue::try_from(value: U) -> core::result::Resu impl core::convert::TryInto for aya_ebpf::maps::queue::Queue where U: core::convert::TryFrom pub type aya_ebpf::maps::queue::Queue::Error = >::Error pub fn aya_ebpf::maps::queue::Queue::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::queue::Queue where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::queue::Queue where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::queue::Queue::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::queue::Queue where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::queue::Queue where T: ?core::marker::Sized pub fn aya_ebpf::maps::queue::Queue::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::queue::Queue where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::queue::Queue where T: ?core::marker::Sized pub fn aya_ebpf::maps::queue::Queue::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::queue::Queue pub fn aya_ebpf::maps::queue::Queue::from(t: T) -> T pub mod aya_ebpf::maps::ring_buf #[repr(transparent)] pub struct aya_ebpf::maps::ring_buf::RingBuf impl aya_ebpf::maps::ring_buf::RingBuf -pub fn aya_ebpf::maps::ring_buf::RingBuf::output(&self, data: &T, flags: u64) -> core::result::Result<(), i64> +pub fn aya_ebpf::maps::ring_buf::RingBuf::output(&self, data: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), i64> pub const fn aya_ebpf::maps::ring_buf::RingBuf::pinned(byte_size: u32, flags: u32) -> Self pub fn aya_ebpf::maps::ring_buf::RingBuf::query(&self, flags: u64) -> u64 -pub fn aya_ebpf::maps::ring_buf::RingBuf::reserve(&self, flags: u64) -> core::option::Option> where const_assert::Assert<{ _ }>: const_assert::IsTrue +pub fn aya_ebpf::maps::ring_buf::RingBuf::reserve(&self, flags: u64) -> core::option::Option> +pub fn aya_ebpf::maps::ring_buf::RingBuf::reserve_bytes(&self, size: usize, flags: u64) -> core::option::Option> pub const fn aya_ebpf::maps::ring_buf::RingBuf::with_byte_size(byte_size: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::ring_buf::RingBuf impl !core::marker::Freeze for aya_ebpf::maps::ring_buf::RingBuf @@ -484,14 +657,47 @@ pub fn aya_ebpf::maps::ring_buf::RingBuf::try_from(value: U) -> core::result::Re impl core::convert::TryInto for aya_ebpf::maps::ring_buf::RingBuf where U: core::convert::TryFrom pub type aya_ebpf::maps::ring_buf::RingBuf::Error = >::Error pub fn aya_ebpf::maps::ring_buf::RingBuf::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::ring_buf::RingBuf where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::ring_buf::RingBuf where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::ring_buf::RingBuf::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::ring_buf::RingBuf where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::ring_buf::RingBuf where T: ?core::marker::Sized pub fn aya_ebpf::maps::ring_buf::RingBuf::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::ring_buf::RingBuf where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::ring_buf::RingBuf where T: ?core::marker::Sized pub fn aya_ebpf::maps::ring_buf::RingBuf::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::ring_buf::RingBuf pub fn aya_ebpf::maps::ring_buf::RingBuf::from(t: T) -> T +pub struct aya_ebpf::maps::ring_buf::RingBufBytes<'a>(_) +impl aya_ebpf::maps::ring_buf::RingBufBytes<'_> +pub fn aya_ebpf::maps::ring_buf::RingBufBytes<'_>::discard(self, flags: u64) +pub fn aya_ebpf::maps::ring_buf::RingBufBytes<'_>::submit(self, flags: u64) +impl core::ops::deref::Deref for aya_ebpf::maps::ring_buf::RingBufBytes<'_> +pub type aya_ebpf::maps::ring_buf::RingBufBytes<'_>::Target = [u8] +pub fn aya_ebpf::maps::ring_buf::RingBufBytes<'_>::deref(&self) -> &Self::Target +impl core::ops::deref::DerefMut for aya_ebpf::maps::ring_buf::RingBufBytes<'_> +pub fn aya_ebpf::maps::ring_buf::RingBufBytes<'_>::deref_mut(&mut self) -> &mut Self::Target +impl<'a> core::marker::Freeze for aya_ebpf::maps::ring_buf::RingBufBytes<'a> +impl<'a> core::marker::Send for aya_ebpf::maps::ring_buf::RingBufBytes<'a> +impl<'a> core::marker::Sync for aya_ebpf::maps::ring_buf::RingBufBytes<'a> +impl<'a> core::marker::Unpin for aya_ebpf::maps::ring_buf::RingBufBytes<'a> +impl<'a> core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::maps::ring_buf::RingBufBytes<'a> +impl<'a> !core::panic::unwind_safe::UnwindSafe for aya_ebpf::maps::ring_buf::RingBufBytes<'a> +impl core::ops::deref::Receiver for aya_ebpf::maps::ring_buf::RingBufBytes<'a> where P: core::ops::deref::Deref + ?core::marker::Sized, T: ?core::marker::Sized +pub type aya_ebpf::maps::ring_buf::RingBufBytes<'a>::Target = T +impl core::convert::Into for aya_ebpf::maps::ring_buf::RingBufBytes<'a> where U: core::convert::From +pub fn aya_ebpf::maps::ring_buf::RingBufBytes<'a>::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::maps::ring_buf::RingBufBytes<'a> where U: core::convert::Into +pub type aya_ebpf::maps::ring_buf::RingBufBytes<'a>::Error = core::convert::Infallible +pub fn aya_ebpf::maps::ring_buf::RingBufBytes<'a>::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::maps::ring_buf::RingBufBytes<'a> where U: core::convert::TryFrom +pub type aya_ebpf::maps::ring_buf::RingBufBytes<'a>::Error = >::Error +pub fn aya_ebpf::maps::ring_buf::RingBufBytes<'a>::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::maps::ring_buf::RingBufBytes<'a> where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::maps::ring_buf::RingBufBytes<'a>::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::maps::ring_buf::RingBufBytes<'a> where T: ?core::marker::Sized +pub fn aya_ebpf::maps::ring_buf::RingBufBytes<'a>::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::maps::ring_buf::RingBufBytes<'a> where T: ?core::marker::Sized +pub fn aya_ebpf::maps::ring_buf::RingBufBytes<'a>::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::maps::ring_buf::RingBufBytes<'a> +pub fn aya_ebpf::maps::ring_buf::RingBufBytes<'a>::from(t: T) -> T pub struct aya_ebpf::maps::ring_buf::RingBufEntry(_) impl aya_ebpf::maps::ring_buf::RingBufEntry pub fn aya_ebpf::maps::ring_buf::RingBufEntry::discard(self, flags: u64) @@ -507,6 +713,8 @@ impl core::marker::Sync for aya_ebpf::maps::ring_buf::RingBufEntry where T impl core::marker::Unpin for aya_ebpf::maps::ring_buf::RingBufEntry impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::maps::ring_buf::RingBufEntry where T: core::panic::unwind_safe::RefUnwindSafe impl !core::panic::unwind_safe::UnwindSafe for aya_ebpf::maps::ring_buf::RingBufEntry +impl core::ops::deref::Receiver for aya_ebpf::maps::ring_buf::RingBufEntry where P: core::ops::deref::Deref + ?core::marker::Sized, T: ?core::marker::Sized +pub type aya_ebpf::maps::ring_buf::RingBufEntry::Target = T impl core::convert::Into for aya_ebpf::maps::ring_buf::RingBufEntry where U: core::convert::From pub fn aya_ebpf::maps::ring_buf::RingBufEntry::into(self) -> U impl core::convert::TryFrom for aya_ebpf::maps::ring_buf::RingBufEntry where U: core::convert::Into @@ -515,23 +723,23 @@ pub fn aya_ebpf::maps::ring_buf::RingBufEntry::try_from(value: U) -> core::re impl core::convert::TryInto for aya_ebpf::maps::ring_buf::RingBufEntry where U: core::convert::TryFrom pub type aya_ebpf::maps::ring_buf::RingBufEntry::Error = >::Error pub fn aya_ebpf::maps::ring_buf::RingBufEntry::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::ring_buf::RingBufEntry where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::ring_buf::RingBufEntry where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::ring_buf::RingBufEntry::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::ring_buf::RingBufEntry where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::ring_buf::RingBufEntry where T: ?core::marker::Sized pub fn aya_ebpf::maps::ring_buf::RingBufEntry::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::ring_buf::RingBufEntry where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::ring_buf::RingBufEntry where T: ?core::marker::Sized pub fn aya_ebpf::maps::ring_buf::RingBufEntry::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::ring_buf::RingBufEntry pub fn aya_ebpf::maps::ring_buf::RingBufEntry::from(t: T) -> T pub mod aya_ebpf::maps::sock_hash #[repr(transparent)] pub struct aya_ebpf::maps::sock_hash::SockHash impl aya_ebpf::maps::sock_hash::SockHash -pub const fn aya_ebpf::maps::sock_hash::SockHash::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::sock_hash::SockHash -pub fn aya_ebpf::maps::sock_hash::SockHash::redirect_msg(&self, ctx: &aya_ebpf::programs::sk_msg::SkMsgContext, key: &mut K, flags: u64) -> i64 -pub fn aya_ebpf::maps::sock_hash::SockHash::redirect_sk_lookup(&mut self, ctx: &aya_ebpf::programs::sk_lookup::SkLookupContext, key: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), u32> -pub fn aya_ebpf::maps::sock_hash::SockHash::redirect_skb(&self, ctx: &aya_ebpf::programs::sk_buff::SkBuffContext, key: &mut K, flags: u64) -> i64 -pub fn aya_ebpf::maps::sock_hash::SockHash::update(&self, key: &mut K, sk_ops: &mut aya_ebpf_bindings::x86_64::bindings::bpf_sock_ops, flags: u64) -> core::result::Result<(), i64> -pub const fn aya_ebpf::maps::sock_hash::SockHash::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::sock_hash::SockHash +pub const fn aya_ebpf::maps::sock_hash::SockHash::pinned(max_entries: u32, flags: u32) -> Self +pub fn aya_ebpf::maps::sock_hash::SockHash::redirect_msg(&self, ctx: impl core::borrow::Borrow, key: impl core::borrow::BorrowMut, flags: u64) -> i64 +pub fn aya_ebpf::maps::sock_hash::SockHash::redirect_sk_lookup(&mut self, ctx: impl core::borrow::Borrow, key: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), u32> +pub fn aya_ebpf::maps::sock_hash::SockHash::redirect_skb(&self, ctx: impl core::borrow::Borrow, key: impl core::borrow::BorrowMut, flags: u64) -> i64 +pub fn aya_ebpf::maps::sock_hash::SockHash::update(&self, key: impl core::borrow::BorrowMut, sk_ops: impl core::borrow::BorrowMut, flags: u64) -> core::result::Result<(), i64> +pub const fn aya_ebpf::maps::sock_hash::SockHash::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::sock_hash::SockHash impl !core::marker::Freeze for aya_ebpf::maps::sock_hash::SockHash impl core::marker::Send for aya_ebpf::maps::sock_hash::SockHash where K: core::marker::Send @@ -546,23 +754,23 @@ pub fn aya_ebpf::maps::sock_hash::SockHash::try_from(value: U) -> core::resul impl core::convert::TryInto for aya_ebpf::maps::sock_hash::SockHash where U: core::convert::TryFrom pub type aya_ebpf::maps::sock_hash::SockHash::Error = >::Error pub fn aya_ebpf::maps::sock_hash::SockHash::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::sock_hash::SockHash where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::sock_hash::SockHash where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::sock_hash::SockHash::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::sock_hash::SockHash where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::sock_hash::SockHash where T: ?core::marker::Sized pub fn aya_ebpf::maps::sock_hash::SockHash::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::sock_hash::SockHash where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::sock_hash::SockHash where T: ?core::marker::Sized pub fn aya_ebpf::maps::sock_hash::SockHash::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::sock_hash::SockHash pub fn aya_ebpf::maps::sock_hash::SockHash::from(t: T) -> T pub mod aya_ebpf::maps::sock_map #[repr(transparent)] pub struct aya_ebpf::maps::sock_map::SockMap impl aya_ebpf::maps::sock_map::SockMap -pub const fn aya_ebpf::maps::sock_map::SockMap::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::sock_map::SockMap +pub const fn aya_ebpf::maps::sock_map::SockMap::pinned(max_entries: u32, flags: u32) -> Self pub unsafe fn aya_ebpf::maps::sock_map::SockMap::redirect_msg(&self, ctx: &aya_ebpf::programs::sk_msg::SkMsgContext, index: u32, flags: u64) -> i64 pub fn aya_ebpf::maps::sock_map::SockMap::redirect_sk_lookup(&mut self, ctx: &aya_ebpf::programs::sk_lookup::SkLookupContext, index: u32, flags: u64) -> core::result::Result<(), u32> pub unsafe fn aya_ebpf::maps::sock_map::SockMap::redirect_skb(&self, ctx: &aya_ebpf::programs::sk_buff::SkBuffContext, index: u32, flags: u64) -> i64 pub unsafe fn aya_ebpf::maps::sock_map::SockMap::update(&self, index: u32, sk_ops: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sock_ops, flags: u64) -> core::result::Result<(), i64> -pub const fn aya_ebpf::maps::sock_map::SockMap::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::sock_map::SockMap +pub const fn aya_ebpf::maps::sock_map::SockMap::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::sock_map::SockMap impl !core::marker::Freeze for aya_ebpf::maps::sock_map::SockMap impl core::marker::Send for aya_ebpf::maps::sock_map::SockMap @@ -577,21 +785,22 @@ pub fn aya_ebpf::maps::sock_map::SockMap::try_from(value: U) -> core::result::Re impl core::convert::TryInto for aya_ebpf::maps::sock_map::SockMap where U: core::convert::TryFrom pub type aya_ebpf::maps::sock_map::SockMap::Error = >::Error pub fn aya_ebpf::maps::sock_map::SockMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::sock_map::SockMap where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::sock_map::SockMap where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::sock_map::SockMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::sock_map::SockMap where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::sock_map::SockMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::sock_map::SockMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::sock_map::SockMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::sock_map::SockMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::sock_map::SockMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::sock_map::SockMap pub fn aya_ebpf::maps::sock_map::SockMap::from(t: T) -> T pub mod aya_ebpf::maps::stack #[repr(transparent)] pub struct aya_ebpf::maps::stack::Stack impl aya_ebpf::maps::stack::Stack -pub const fn aya_ebpf::maps::stack::Stack::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::stack::Stack -pub fn aya_ebpf::maps::stack::Stack::pop(&mut self) -> core::option::Option -pub fn aya_ebpf::maps::stack::Stack::push(&mut self, value: &T, flags: u64) -> core::result::Result<(), i64> -pub const fn aya_ebpf::maps::stack::Stack::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::stack::Stack +pub fn aya_ebpf::maps::stack::Stack::peek(&self) -> core::option::Option +pub const fn aya_ebpf::maps::stack::Stack::pinned(max_entries: u32, flags: u32) -> Self +pub fn aya_ebpf::maps::stack::Stack::pop(&self) -> core::option::Option +pub fn aya_ebpf::maps::stack::Stack::push(&self, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), i64> +pub const fn aya_ebpf::maps::stack::Stack::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Freeze for aya_ebpf::maps::stack::Stack impl core::marker::Send for aya_ebpf::maps::stack::Stack where T: core::marker::Send impl core::marker::Sync for aya_ebpf::maps::stack::Stack where T: core::marker::Sync @@ -606,20 +815,20 @@ pub fn aya_ebpf::maps::stack::Stack::try_from(value: U) -> core::result::Resu impl core::convert::TryInto for aya_ebpf::maps::stack::Stack where U: core::convert::TryFrom pub type aya_ebpf::maps::stack::Stack::Error = >::Error pub fn aya_ebpf::maps::stack::Stack::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::stack::Stack where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::stack::Stack where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::stack::Stack::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::stack::Stack where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::stack::Stack where T: ?core::marker::Sized pub fn aya_ebpf::maps::stack::Stack::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::stack::Stack where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::stack::Stack where T: ?core::marker::Sized pub fn aya_ebpf::maps::stack::Stack::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::stack::Stack pub fn aya_ebpf::maps::stack::Stack::from(t: T) -> T pub mod aya_ebpf::maps::stack_trace #[repr(transparent)] pub struct aya_ebpf::maps::stack_trace::StackTrace impl aya_ebpf::maps::stack_trace::StackTrace -pub unsafe fn aya_ebpf::maps::stack_trace::StackTrace::get_stackid(&self, ctx: &C, flags: u64) -> core::result::Result -pub const fn aya_ebpf::maps::stack_trace::StackTrace::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::stack_trace::StackTrace -pub const fn aya_ebpf::maps::stack_trace::StackTrace::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::stack_trace::StackTrace +pub unsafe fn aya_ebpf::maps::stack_trace::StackTrace::get_stackid(&self, ctx: impl core::borrow::Borrow, flags: u64) -> core::result::Result +pub const fn aya_ebpf::maps::stack_trace::StackTrace::pinned(max_entries: u32, flags: u32) -> Self +pub const fn aya_ebpf::maps::stack_trace::StackTrace::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::stack_trace::StackTrace impl !core::marker::Freeze for aya_ebpf::maps::stack_trace::StackTrace impl core::marker::Send for aya_ebpf::maps::stack_trace::StackTrace @@ -634,20 +843,20 @@ pub fn aya_ebpf::maps::stack_trace::StackTrace::try_from(value: U) -> core::resu impl core::convert::TryInto for aya_ebpf::maps::stack_trace::StackTrace where U: core::convert::TryFrom pub type aya_ebpf::maps::stack_trace::StackTrace::Error = >::Error pub fn aya_ebpf::maps::stack_trace::StackTrace::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::stack_trace::StackTrace where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::stack_trace::StackTrace where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::stack_trace::StackTrace::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::stack_trace::StackTrace where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::stack_trace::StackTrace where T: ?core::marker::Sized pub fn aya_ebpf::maps::stack_trace::StackTrace::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::stack_trace::StackTrace where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::stack_trace::StackTrace where T: ?core::marker::Sized pub fn aya_ebpf::maps::stack_trace::StackTrace::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::stack_trace::StackTrace pub fn aya_ebpf::maps::stack_trace::StackTrace::from(t: T) -> T pub mod aya_ebpf::maps::xdp #[repr(transparent)] pub struct aya_ebpf::maps::xdp::CpuMap impl aya_ebpf::maps::CpuMap -pub const fn aya_ebpf::maps::CpuMap::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::CpuMap +pub const fn aya_ebpf::maps::CpuMap::pinned(max_entries: u32, flags: u32) -> Self pub fn aya_ebpf::maps::CpuMap::redirect(&self, index: u32, flags: u64) -> core::result::Result -pub const fn aya_ebpf::maps::CpuMap::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::CpuMap +pub const fn aya_ebpf::maps::CpuMap::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::CpuMap impl !core::marker::Freeze for aya_ebpf::maps::CpuMap impl core::marker::Send for aya_ebpf::maps::CpuMap @@ -662,20 +871,20 @@ pub fn aya_ebpf::maps::CpuMap::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_ebpf::maps::CpuMap where U: core::convert::TryFrom pub type aya_ebpf::maps::CpuMap::Error = >::Error pub fn aya_ebpf::maps::CpuMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::CpuMap where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::CpuMap where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::CpuMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::CpuMap where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::CpuMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::CpuMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::CpuMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::CpuMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::CpuMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::CpuMap pub fn aya_ebpf::maps::CpuMap::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::xdp::DevMap impl aya_ebpf::maps::DevMap -pub fn aya_ebpf::maps::DevMap::get(&self, index: u32) -> core::option::Option -pub const fn aya_ebpf::maps::DevMap::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::DevMap +pub fn aya_ebpf::maps::DevMap::get(&self, index: u32) -> core::option::Option +pub const fn aya_ebpf::maps::DevMap::pinned(max_entries: u32, flags: u32) -> Self pub fn aya_ebpf::maps::DevMap::redirect(&self, index: u32, flags: u64) -> core::result::Result -pub const fn aya_ebpf::maps::DevMap::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::DevMap +pub const fn aya_ebpf::maps::DevMap::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::DevMap impl !core::marker::Freeze for aya_ebpf::maps::DevMap impl core::marker::Send for aya_ebpf::maps::DevMap @@ -690,20 +899,20 @@ pub fn aya_ebpf::maps::DevMap::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_ebpf::maps::DevMap where U: core::convert::TryFrom pub type aya_ebpf::maps::DevMap::Error = >::Error pub fn aya_ebpf::maps::DevMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::DevMap where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::DevMap where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::DevMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::DevMap where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::DevMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::DevMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::DevMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::DevMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::DevMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::DevMap pub fn aya_ebpf::maps::DevMap::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::xdp::DevMapHash impl aya_ebpf::maps::DevMapHash -pub fn aya_ebpf::maps::DevMapHash::get(&self, key: u32) -> core::option::Option -pub const fn aya_ebpf::maps::DevMapHash::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::DevMapHash +pub fn aya_ebpf::maps::DevMapHash::get(&self, key: u32) -> core::option::Option +pub const fn aya_ebpf::maps::DevMapHash::pinned(max_entries: u32, flags: u32) -> Self pub fn aya_ebpf::maps::DevMapHash::redirect(&self, key: u32, flags: u64) -> core::result::Result -pub const fn aya_ebpf::maps::DevMapHash::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::DevMapHash +pub const fn aya_ebpf::maps::DevMapHash::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::DevMapHash impl !core::marker::Freeze for aya_ebpf::maps::DevMapHash impl core::marker::Send for aya_ebpf::maps::DevMapHash @@ -718,20 +927,20 @@ pub fn aya_ebpf::maps::DevMapHash::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_ebpf::maps::DevMapHash where U: core::convert::TryFrom pub type aya_ebpf::maps::DevMapHash::Error = >::Error pub fn aya_ebpf::maps::DevMapHash::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::DevMapHash where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::DevMapHash where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::DevMapHash::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::DevMapHash where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::DevMapHash where T: ?core::marker::Sized pub fn aya_ebpf::maps::DevMapHash::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::DevMapHash where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::DevMapHash where T: ?core::marker::Sized pub fn aya_ebpf::maps::DevMapHash::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::DevMapHash pub fn aya_ebpf::maps::DevMapHash::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::xdp::XskMap impl aya_ebpf::maps::XskMap pub fn aya_ebpf::maps::XskMap::get(&self, index: u32) -> core::option::Option -pub const fn aya_ebpf::maps::XskMap::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::XskMap +pub const fn aya_ebpf::maps::XskMap::pinned(max_entries: u32, flags: u32) -> Self pub fn aya_ebpf::maps::XskMap::redirect(&self, index: u32, flags: u64) -> core::result::Result -pub const fn aya_ebpf::maps::XskMap::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::XskMap +pub const fn aya_ebpf::maps::XskMap::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::XskMap impl !core::marker::Freeze for aya_ebpf::maps::XskMap impl core::marker::Send for aya_ebpf::maps::XskMap @@ -746,11 +955,11 @@ pub fn aya_ebpf::maps::XskMap::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_ebpf::maps::XskMap where U: core::convert::TryFrom pub type aya_ebpf::maps::XskMap::Error = >::Error pub fn aya_ebpf::maps::XskMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::XskMap where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::XskMap where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::XskMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::XskMap where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::XskMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::XskMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::XskMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::XskMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::XskMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::XskMap pub fn aya_ebpf::maps::XskMap::from(t: T) -> T @@ -759,8 +968,9 @@ impl aya_ebpf::maps::array::Array pub fn aya_ebpf::maps::array::Array::get(&self, index: u32) -> core::option::Option<&T> pub fn aya_ebpf::maps::array::Array::get_ptr(&self, index: u32) -> core::option::Option<*const T> pub fn aya_ebpf::maps::array::Array::get_ptr_mut(&self, index: u32) -> core::option::Option<*mut T> -pub const fn aya_ebpf::maps::array::Array::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::array::Array -pub const fn aya_ebpf::maps::array::Array::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::array::Array +pub const fn aya_ebpf::maps::array::Array::pinned(max_entries: u32, flags: u32) -> Self +pub fn aya_ebpf::maps::array::Array::set(&self, index: u32, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::maps::array::Array::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::array::Array impl !core::marker::Freeze for aya_ebpf::maps::array::Array impl core::marker::Send for aya_ebpf::maps::array::Array where T: core::marker::Send @@ -775,20 +985,20 @@ pub fn aya_ebpf::maps::array::Array::try_from(value: U) -> core::result::Resu impl core::convert::TryInto for aya_ebpf::maps::array::Array where U: core::convert::TryFrom pub type aya_ebpf::maps::array::Array::Error = >::Error pub fn aya_ebpf::maps::array::Array::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::array::Array where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::array::Array where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::array::Array::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::array::Array where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::array::Array where T: ?core::marker::Sized pub fn aya_ebpf::maps::array::Array::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::array::Array where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::array::Array where T: ?core::marker::Sized pub fn aya_ebpf::maps::array::Array::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::array::Array pub fn aya_ebpf::maps::array::Array::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::BloomFilter impl aya_ebpf::maps::bloom_filter::BloomFilter -pub fn aya_ebpf::maps::bloom_filter::BloomFilter::contains(&mut self, value: &T) -> core::result::Result<(), i64> -pub fn aya_ebpf::maps::bloom_filter::BloomFilter::insert(&mut self, value: &T, flags: u64) -> core::result::Result<(), i64> -pub const fn aya_ebpf::maps::bloom_filter::BloomFilter::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::bloom_filter::BloomFilter -pub const fn aya_ebpf::maps::bloom_filter::BloomFilter::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::bloom_filter::BloomFilter +pub fn aya_ebpf::maps::bloom_filter::BloomFilter::contains(&mut self, value: impl core::borrow::Borrow) -> core::result::Result<(), i64> +pub fn aya_ebpf::maps::bloom_filter::BloomFilter::insert(&mut self, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), i64> +pub const fn aya_ebpf::maps::bloom_filter::BloomFilter::pinned(max_entries: u32, flags: u32) -> Self +pub const fn aya_ebpf::maps::bloom_filter::BloomFilter::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Freeze for aya_ebpf::maps::bloom_filter::BloomFilter impl core::marker::Send for aya_ebpf::maps::bloom_filter::BloomFilter where T: core::marker::Send impl core::marker::Sync for aya_ebpf::maps::bloom_filter::BloomFilter where T: core::marker::Sync @@ -803,19 +1013,19 @@ pub fn aya_ebpf::maps::bloom_filter::BloomFilter::try_from(value: U) -> core: impl core::convert::TryInto for aya_ebpf::maps::bloom_filter::BloomFilter where U: core::convert::TryFrom pub type aya_ebpf::maps::bloom_filter::BloomFilter::Error = >::Error pub fn aya_ebpf::maps::bloom_filter::BloomFilter::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::bloom_filter::BloomFilter where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::bloom_filter::BloomFilter where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::bloom_filter::BloomFilter::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::bloom_filter::BloomFilter where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::bloom_filter::BloomFilter where T: ?core::marker::Sized pub fn aya_ebpf::maps::bloom_filter::BloomFilter::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::bloom_filter::BloomFilter where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::bloom_filter::BloomFilter where T: ?core::marker::Sized pub fn aya_ebpf::maps::bloom_filter::BloomFilter::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::bloom_filter::BloomFilter pub fn aya_ebpf::maps::bloom_filter::BloomFilter::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::CpuMap impl aya_ebpf::maps::CpuMap -pub const fn aya_ebpf::maps::CpuMap::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::CpuMap +pub const fn aya_ebpf::maps::CpuMap::pinned(max_entries: u32, flags: u32) -> Self pub fn aya_ebpf::maps::CpuMap::redirect(&self, index: u32, flags: u64) -> core::result::Result -pub const fn aya_ebpf::maps::CpuMap::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::CpuMap +pub const fn aya_ebpf::maps::CpuMap::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::CpuMap impl !core::marker::Freeze for aya_ebpf::maps::CpuMap impl core::marker::Send for aya_ebpf::maps::CpuMap @@ -830,20 +1040,20 @@ pub fn aya_ebpf::maps::CpuMap::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_ebpf::maps::CpuMap where U: core::convert::TryFrom pub type aya_ebpf::maps::CpuMap::Error = >::Error pub fn aya_ebpf::maps::CpuMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::CpuMap where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::CpuMap where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::CpuMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::CpuMap where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::CpuMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::CpuMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::CpuMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::CpuMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::CpuMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::CpuMap pub fn aya_ebpf::maps::CpuMap::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::DevMap impl aya_ebpf::maps::DevMap -pub fn aya_ebpf::maps::DevMap::get(&self, index: u32) -> core::option::Option -pub const fn aya_ebpf::maps::DevMap::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::DevMap +pub fn aya_ebpf::maps::DevMap::get(&self, index: u32) -> core::option::Option +pub const fn aya_ebpf::maps::DevMap::pinned(max_entries: u32, flags: u32) -> Self pub fn aya_ebpf::maps::DevMap::redirect(&self, index: u32, flags: u64) -> core::result::Result -pub const fn aya_ebpf::maps::DevMap::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::DevMap +pub const fn aya_ebpf::maps::DevMap::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::DevMap impl !core::marker::Freeze for aya_ebpf::maps::DevMap impl core::marker::Send for aya_ebpf::maps::DevMap @@ -858,20 +1068,20 @@ pub fn aya_ebpf::maps::DevMap::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_ebpf::maps::DevMap where U: core::convert::TryFrom pub type aya_ebpf::maps::DevMap::Error = >::Error pub fn aya_ebpf::maps::DevMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::DevMap where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::DevMap where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::DevMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::DevMap where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::DevMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::DevMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::DevMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::DevMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::DevMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::DevMap pub fn aya_ebpf::maps::DevMap::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::DevMapHash impl aya_ebpf::maps::DevMapHash -pub fn aya_ebpf::maps::DevMapHash::get(&self, key: u32) -> core::option::Option -pub const fn aya_ebpf::maps::DevMapHash::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::DevMapHash +pub fn aya_ebpf::maps::DevMapHash::get(&self, key: u32) -> core::option::Option +pub const fn aya_ebpf::maps::DevMapHash::pinned(max_entries: u32, flags: u32) -> Self pub fn aya_ebpf::maps::DevMapHash::redirect(&self, key: u32, flags: u64) -> core::result::Result -pub const fn aya_ebpf::maps::DevMapHash::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::DevMapHash +pub const fn aya_ebpf::maps::DevMapHash::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::DevMapHash impl !core::marker::Freeze for aya_ebpf::maps::DevMapHash impl core::marker::Send for aya_ebpf::maps::DevMapHash @@ -886,23 +1096,23 @@ pub fn aya_ebpf::maps::DevMapHash::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_ebpf::maps::DevMapHash where U: core::convert::TryFrom pub type aya_ebpf::maps::DevMapHash::Error = >::Error pub fn aya_ebpf::maps::DevMapHash::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::DevMapHash where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::DevMapHash where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::DevMapHash::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::DevMapHash where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::DevMapHash where T: ?core::marker::Sized pub fn aya_ebpf::maps::DevMapHash::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::DevMapHash where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::DevMapHash where T: ?core::marker::Sized pub fn aya_ebpf::maps::DevMapHash::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::DevMapHash pub fn aya_ebpf::maps::DevMapHash::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::HashMap impl aya_ebpf::maps::hash_map::HashMap -pub unsafe fn aya_ebpf::maps::hash_map::HashMap::get(&self, key: &K) -> core::option::Option<&V> -pub fn aya_ebpf::maps::hash_map::HashMap::get_ptr(&self, key: &K) -> core::option::Option<*const V> -pub fn aya_ebpf::maps::hash_map::HashMap::get_ptr_mut(&self, key: &K) -> core::option::Option<*mut V> -pub fn aya_ebpf::maps::hash_map::HashMap::insert(&self, key: &K, value: &V, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> -pub const fn aya_ebpf::maps::hash_map::HashMap::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::hash_map::HashMap -pub fn aya_ebpf::maps::hash_map::HashMap::remove(&self, key: &K) -> core::result::Result<(), aya_ebpf_cty::od::c_long> -pub const fn aya_ebpf::maps::hash_map::HashMap::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::hash_map::HashMap +pub unsafe fn aya_ebpf::maps::hash_map::HashMap::get(&self, key: impl core::borrow::Borrow) -> core::option::Option<&V> +pub fn aya_ebpf::maps::hash_map::HashMap::get_ptr(&self, key: impl core::borrow::Borrow) -> core::option::Option<*const V> +pub fn aya_ebpf::maps::hash_map::HashMap::get_ptr_mut(&self, key: impl core::borrow::Borrow) -> core::option::Option<*mut V> +pub fn aya_ebpf::maps::hash_map::HashMap::insert(&self, key: impl core::borrow::Borrow, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::maps::hash_map::HashMap::pinned(max_entries: u32, flags: u32) -> Self +pub fn aya_ebpf::maps::hash_map::HashMap::remove(&self, key: impl core::borrow::Borrow) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::maps::hash_map::HashMap::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::hash_map::HashMap impl !core::marker::Freeze for aya_ebpf::maps::hash_map::HashMap impl core::marker::Send for aya_ebpf::maps::hash_map::HashMap where K: core::marker::Send, V: core::marker::Send @@ -917,21 +1127,21 @@ pub fn aya_ebpf::maps::hash_map::HashMap::try_from(value: U) -> core::resu impl core::convert::TryInto for aya_ebpf::maps::hash_map::HashMap where U: core::convert::TryFrom pub type aya_ebpf::maps::hash_map::HashMap::Error = >::Error pub fn aya_ebpf::maps::hash_map::HashMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::hash_map::HashMap where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::hash_map::HashMap where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::HashMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::hash_map::HashMap where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::hash_map::HashMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::HashMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::hash_map::HashMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::hash_map::HashMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::HashMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::hash_map::HashMap pub fn aya_ebpf::maps::hash_map::HashMap::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::LpmTrie impl aya_ebpf::maps::lpm_trie::LpmTrie -pub fn aya_ebpf::maps::lpm_trie::LpmTrie::get(&self, key: &aya_ebpf::maps::lpm_trie::Key) -> core::option::Option<&V> -pub fn aya_ebpf::maps::lpm_trie::LpmTrie::insert(&self, key: &aya_ebpf::maps::lpm_trie::Key, value: &V, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> -pub const fn aya_ebpf::maps::lpm_trie::LpmTrie::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::lpm_trie::LpmTrie -pub fn aya_ebpf::maps::lpm_trie::LpmTrie::remove(&self, key: &aya_ebpf::maps::lpm_trie::Key) -> core::result::Result<(), aya_ebpf_cty::od::c_long> -pub const fn aya_ebpf::maps::lpm_trie::LpmTrie::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::lpm_trie::LpmTrie +pub fn aya_ebpf::maps::lpm_trie::LpmTrie::get(&self, key: impl core::borrow::Borrow>) -> core::option::Option<&V> +pub fn aya_ebpf::maps::lpm_trie::LpmTrie::insert(&self, key: impl core::borrow::Borrow>, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::maps::lpm_trie::LpmTrie::pinned(max_entries: u32, flags: u32) -> Self +pub fn aya_ebpf::maps::lpm_trie::LpmTrie::remove(&self, key: impl core::borrow::Borrow>) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::maps::lpm_trie::LpmTrie::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::lpm_trie::LpmTrie impl !core::marker::Freeze for aya_ebpf::maps::lpm_trie::LpmTrie impl core::marker::Send for aya_ebpf::maps::lpm_trie::LpmTrie where K: core::marker::Send, V: core::marker::Send @@ -946,23 +1156,23 @@ pub fn aya_ebpf::maps::lpm_trie::LpmTrie::try_from(value: U) -> core::resu impl core::convert::TryInto for aya_ebpf::maps::lpm_trie::LpmTrie where U: core::convert::TryFrom pub type aya_ebpf::maps::lpm_trie::LpmTrie::Error = >::Error pub fn aya_ebpf::maps::lpm_trie::LpmTrie::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::lpm_trie::LpmTrie where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::lpm_trie::LpmTrie where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::lpm_trie::LpmTrie::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::lpm_trie::LpmTrie where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::lpm_trie::LpmTrie where T: ?core::marker::Sized pub fn aya_ebpf::maps::lpm_trie::LpmTrie::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::lpm_trie::LpmTrie where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::lpm_trie::LpmTrie where T: ?core::marker::Sized pub fn aya_ebpf::maps::lpm_trie::LpmTrie::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::lpm_trie::LpmTrie pub fn aya_ebpf::maps::lpm_trie::LpmTrie::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::LruHashMap impl aya_ebpf::maps::hash_map::LruHashMap -pub unsafe fn aya_ebpf::maps::hash_map::LruHashMap::get(&self, key: &K) -> core::option::Option<&V> -pub fn aya_ebpf::maps::hash_map::LruHashMap::get_ptr(&self, key: &K) -> core::option::Option<*const V> -pub fn aya_ebpf::maps::hash_map::LruHashMap::get_ptr_mut(&self, key: &K) -> core::option::Option<*mut V> -pub fn aya_ebpf::maps::hash_map::LruHashMap::insert(&self, key: &K, value: &V, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> -pub const fn aya_ebpf::maps::hash_map::LruHashMap::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::hash_map::LruHashMap -pub fn aya_ebpf::maps::hash_map::LruHashMap::remove(&self, key: &K) -> core::result::Result<(), aya_ebpf_cty::od::c_long> -pub const fn aya_ebpf::maps::hash_map::LruHashMap::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::hash_map::LruHashMap +pub unsafe fn aya_ebpf::maps::hash_map::LruHashMap::get(&self, key: impl core::borrow::Borrow) -> core::option::Option<&V> +pub fn aya_ebpf::maps::hash_map::LruHashMap::get_ptr(&self, key: impl core::borrow::Borrow) -> core::option::Option<*const V> +pub fn aya_ebpf::maps::hash_map::LruHashMap::get_ptr_mut(&self, key: impl core::borrow::Borrow) -> core::option::Option<*mut V> +pub fn aya_ebpf::maps::hash_map::LruHashMap::insert(&self, key: impl core::borrow::Borrow, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::maps::hash_map::LruHashMap::pinned(max_entries: u32, flags: u32) -> Self +pub fn aya_ebpf::maps::hash_map::LruHashMap::remove(&self, key: impl core::borrow::Borrow) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::maps::hash_map::LruHashMap::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::hash_map::LruHashMap impl !core::marker::Freeze for aya_ebpf::maps::hash_map::LruHashMap impl core::marker::Send for aya_ebpf::maps::hash_map::LruHashMap where K: core::marker::Send, V: core::marker::Send @@ -977,23 +1187,23 @@ pub fn aya_ebpf::maps::hash_map::LruHashMap::try_from(value: U) -> core::r impl core::convert::TryInto for aya_ebpf::maps::hash_map::LruHashMap where U: core::convert::TryFrom pub type aya_ebpf::maps::hash_map::LruHashMap::Error = >::Error pub fn aya_ebpf::maps::hash_map::LruHashMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::hash_map::LruHashMap where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::hash_map::LruHashMap where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::LruHashMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::hash_map::LruHashMap where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::hash_map::LruHashMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::LruHashMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::hash_map::LruHashMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::hash_map::LruHashMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::LruHashMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::hash_map::LruHashMap pub fn aya_ebpf::maps::hash_map::LruHashMap::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::LruPerCpuHashMap impl aya_ebpf::maps::hash_map::LruPerCpuHashMap -pub unsafe fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::get(&self, key: &K) -> core::option::Option<&V> -pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::get_ptr(&self, key: &K) -> core::option::Option<*const V> -pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::get_ptr_mut(&self, key: &K) -> core::option::Option<*mut V> -pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::insert(&self, key: &K, value: &V, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> -pub const fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::hash_map::LruPerCpuHashMap -pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::remove(&self, key: &K) -> core::result::Result<(), aya_ebpf_cty::od::c_long> -pub const fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::hash_map::LruPerCpuHashMap +pub unsafe fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::get(&self, key: impl core::borrow::Borrow) -> core::option::Option<&V> +pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::get_ptr(&self, key: impl core::borrow::Borrow) -> core::option::Option<*const V> +pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::get_ptr_mut(&self, key: impl core::borrow::Borrow) -> core::option::Option<*mut V> +pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::insert(&self, key: impl core::borrow::Borrow, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::pinned(max_entries: u32, flags: u32) -> Self +pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::remove(&self, key: impl core::borrow::Borrow) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::hash_map::LruPerCpuHashMap impl !core::marker::Freeze for aya_ebpf::maps::hash_map::LruPerCpuHashMap impl core::marker::Send for aya_ebpf::maps::hash_map::LruPerCpuHashMap where K: core::marker::Send, V: core::marker::Send @@ -1008,11 +1218,11 @@ pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::try_from(value: U) -> c impl core::convert::TryInto for aya_ebpf::maps::hash_map::LruPerCpuHashMap where U: core::convert::TryFrom pub type aya_ebpf::maps::hash_map::LruPerCpuHashMap::Error = >::Error pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::hash_map::LruPerCpuHashMap where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::hash_map::LruPerCpuHashMap where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::hash_map::LruPerCpuHashMap where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::hash_map::LruPerCpuHashMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::hash_map::LruPerCpuHashMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::hash_map::LruPerCpuHashMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::hash_map::LruPerCpuHashMap pub fn aya_ebpf::maps::hash_map::LruPerCpuHashMap::from(t: T) -> T @@ -1021,8 +1231,8 @@ impl aya_ebpf::maps::per_cpu_array::PerCpuArray pub fn aya_ebpf::maps::per_cpu_array::PerCpuArray::get(&self, index: u32) -> core::option::Option<&T> pub fn aya_ebpf::maps::per_cpu_array::PerCpuArray::get_ptr(&self, index: u32) -> core::option::Option<*const T> pub fn aya_ebpf::maps::per_cpu_array::PerCpuArray::get_ptr_mut(&self, index: u32) -> core::option::Option<*mut T> -pub const fn aya_ebpf::maps::per_cpu_array::PerCpuArray::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::per_cpu_array::PerCpuArray -pub const fn aya_ebpf::maps::per_cpu_array::PerCpuArray::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::per_cpu_array::PerCpuArray +pub const fn aya_ebpf::maps::per_cpu_array::PerCpuArray::pinned(max_entries: u32, flags: u32) -> Self +pub const fn aya_ebpf::maps::per_cpu_array::PerCpuArray::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::per_cpu_array::PerCpuArray impl !core::marker::Freeze for aya_ebpf::maps::per_cpu_array::PerCpuArray impl core::marker::Send for aya_ebpf::maps::per_cpu_array::PerCpuArray where T: core::marker::Send @@ -1037,23 +1247,23 @@ pub fn aya_ebpf::maps::per_cpu_array::PerCpuArray::try_from(value: U) -> core impl core::convert::TryInto for aya_ebpf::maps::per_cpu_array::PerCpuArray where U: core::convert::TryFrom pub type aya_ebpf::maps::per_cpu_array::PerCpuArray::Error = >::Error pub fn aya_ebpf::maps::per_cpu_array::PerCpuArray::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::per_cpu_array::PerCpuArray where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::per_cpu_array::PerCpuArray where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::per_cpu_array::PerCpuArray::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::per_cpu_array::PerCpuArray where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::per_cpu_array::PerCpuArray where T: ?core::marker::Sized pub fn aya_ebpf::maps::per_cpu_array::PerCpuArray::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::per_cpu_array::PerCpuArray where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::per_cpu_array::PerCpuArray where T: ?core::marker::Sized pub fn aya_ebpf::maps::per_cpu_array::PerCpuArray::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::per_cpu_array::PerCpuArray pub fn aya_ebpf::maps::per_cpu_array::PerCpuArray::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::PerCpuHashMap impl aya_ebpf::maps::hash_map::PerCpuHashMap -pub unsafe fn aya_ebpf::maps::hash_map::PerCpuHashMap::get(&self, key: &K) -> core::option::Option<&V> -pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::get_ptr(&self, key: &K) -> core::option::Option<*const V> -pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::get_ptr_mut(&self, key: &K) -> core::option::Option<*mut V> -pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::insert(&self, key: &K, value: &V, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> -pub const fn aya_ebpf::maps::hash_map::PerCpuHashMap::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::hash_map::PerCpuHashMap -pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::remove(&self, key: &K) -> core::result::Result<(), aya_ebpf_cty::od::c_long> -pub const fn aya_ebpf::maps::hash_map::PerCpuHashMap::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::hash_map::PerCpuHashMap +pub unsafe fn aya_ebpf::maps::hash_map::PerCpuHashMap::get(&self, key: impl core::borrow::Borrow) -> core::option::Option<&V> +pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::get_ptr(&self, key: impl core::borrow::Borrow) -> core::option::Option<*const V> +pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::get_ptr_mut(&self, key: impl core::borrow::Borrow) -> core::option::Option<*mut V> +pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::insert(&self, key: impl core::borrow::Borrow, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::maps::hash_map::PerCpuHashMap::pinned(max_entries: u32, flags: u32) -> Self +pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::remove(&self, key: impl core::borrow::Borrow) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::maps::hash_map::PerCpuHashMap::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::hash_map::PerCpuHashMap impl !core::marker::Freeze for aya_ebpf::maps::hash_map::PerCpuHashMap impl core::marker::Send for aya_ebpf::maps::hash_map::PerCpuHashMap where K: core::marker::Send, V: core::marker::Send @@ -1068,21 +1278,20 @@ pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::try_from(value: U) -> core impl core::convert::TryInto for aya_ebpf::maps::hash_map::PerCpuHashMap where U: core::convert::TryFrom pub type aya_ebpf::maps::hash_map::PerCpuHashMap::Error = >::Error pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::hash_map::PerCpuHashMap where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::hash_map::PerCpuHashMap where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::hash_map::PerCpuHashMap where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::hash_map::PerCpuHashMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::hash_map::PerCpuHashMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::hash_map::PerCpuHashMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::hash_map::PerCpuHashMap pub fn aya_ebpf::maps::hash_map::PerCpuHashMap::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::PerfEventArray impl aya_ebpf::maps::PerfEventArray -pub const fn aya_ebpf::maps::PerfEventArray::new(flags: u32) -> aya_ebpf::maps::PerfEventArray -pub fn aya_ebpf::maps::PerfEventArray::output(&self, ctx: &C, data: &T, flags: u32) -pub fn aya_ebpf::maps::PerfEventArray::output_at_index(&self, ctx: &C, index: u32, data: &T, flags: u32) -pub const fn aya_ebpf::maps::PerfEventArray::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::PerfEventArray -pub const fn aya_ebpf::maps::PerfEventArray::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::PerfEventArray +pub const fn aya_ebpf::maps::PerfEventArray::new(flags: u32) -> Self +pub fn aya_ebpf::maps::PerfEventArray::output(&self, ctx: &C, data: impl core::borrow::Borrow, flags: u32) +pub fn aya_ebpf::maps::PerfEventArray::output_at_index(&self, ctx: &C, index: u32, data: impl core::borrow::Borrow, flags: u32) +pub const fn aya_ebpf::maps::PerfEventArray::pinned(flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::PerfEventArray impl !core::marker::Freeze for aya_ebpf::maps::PerfEventArray impl core::marker::Send for aya_ebpf::maps::PerfEventArray where T: core::marker::Send @@ -1097,21 +1306,20 @@ pub fn aya_ebpf::maps::PerfEventArray::try_from(value: U) -> core::result::Re impl core::convert::TryInto for aya_ebpf::maps::PerfEventArray where U: core::convert::TryFrom pub type aya_ebpf::maps::PerfEventArray::Error = >::Error pub fn aya_ebpf::maps::PerfEventArray::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::PerfEventArray where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::PerfEventArray where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::PerfEventArray::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::PerfEventArray where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::PerfEventArray where T: ?core::marker::Sized pub fn aya_ebpf::maps::PerfEventArray::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::PerfEventArray where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::PerfEventArray where T: ?core::marker::Sized pub fn aya_ebpf::maps::PerfEventArray::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::PerfEventArray pub fn aya_ebpf::maps::PerfEventArray::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::PerfEventByteArray impl aya_ebpf::maps::PerfEventByteArray -pub const fn aya_ebpf::maps::PerfEventByteArray::new(flags: u32) -> aya_ebpf::maps::PerfEventByteArray +pub const fn aya_ebpf::maps::PerfEventByteArray::new(flags: u32) -> Self pub fn aya_ebpf::maps::PerfEventByteArray::output(&self, ctx: &C, data: &[u8], flags: u32) pub fn aya_ebpf::maps::PerfEventByteArray::output_at_index(&self, ctx: &C, index: u32, data: &[u8], flags: u32) -pub const fn aya_ebpf::maps::PerfEventByteArray::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::PerfEventByteArray -pub const fn aya_ebpf::maps::PerfEventByteArray::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::PerfEventByteArray +pub const fn aya_ebpf::maps::PerfEventByteArray::pinned(flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::PerfEventByteArray impl !core::marker::Freeze for aya_ebpf::maps::PerfEventByteArray impl core::marker::Send for aya_ebpf::maps::PerfEventByteArray @@ -1126,19 +1334,19 @@ pub fn aya_ebpf::maps::PerfEventByteArray::try_from(value: U) -> core::result::R impl core::convert::TryInto for aya_ebpf::maps::PerfEventByteArray where U: core::convert::TryFrom pub type aya_ebpf::maps::PerfEventByteArray::Error = >::Error pub fn aya_ebpf::maps::PerfEventByteArray::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::PerfEventByteArray where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::PerfEventByteArray where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::PerfEventByteArray::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::PerfEventByteArray where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::PerfEventByteArray where T: ?core::marker::Sized pub fn aya_ebpf::maps::PerfEventByteArray::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::PerfEventByteArray where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::PerfEventByteArray where T: ?core::marker::Sized pub fn aya_ebpf::maps::PerfEventByteArray::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::PerfEventByteArray pub fn aya_ebpf::maps::PerfEventByteArray::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::ProgramArray impl aya_ebpf::maps::program_array::ProgramArray -pub const fn aya_ebpf::maps::program_array::ProgramArray::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::program_array::ProgramArray -pub unsafe fn aya_ebpf::maps::program_array::ProgramArray::tail_call(&self, ctx: &C, index: u32) -> core::result::Result -pub const fn aya_ebpf::maps::program_array::ProgramArray::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::program_array::ProgramArray +pub const fn aya_ebpf::maps::program_array::ProgramArray::pinned(max_entries: u32, flags: u32) -> Self +pub unsafe fn aya_ebpf::maps::program_array::ProgramArray::tail_call(&self, ctx: &C, index: u32) -> core::result::Result +pub const fn aya_ebpf::maps::program_array::ProgramArray::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::program_array::ProgramArray impl !core::marker::Freeze for aya_ebpf::maps::program_array::ProgramArray impl core::marker::Send for aya_ebpf::maps::program_array::ProgramArray @@ -1153,20 +1361,21 @@ pub fn aya_ebpf::maps::program_array::ProgramArray::try_from(value: U) -> core:: impl core::convert::TryInto for aya_ebpf::maps::program_array::ProgramArray where U: core::convert::TryFrom pub type aya_ebpf::maps::program_array::ProgramArray::Error = >::Error pub fn aya_ebpf::maps::program_array::ProgramArray::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::program_array::ProgramArray where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::program_array::ProgramArray where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::program_array::ProgramArray::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::program_array::ProgramArray where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::program_array::ProgramArray where T: ?core::marker::Sized pub fn aya_ebpf::maps::program_array::ProgramArray::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::program_array::ProgramArray where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::program_array::ProgramArray where T: ?core::marker::Sized pub fn aya_ebpf::maps::program_array::ProgramArray::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::program_array::ProgramArray pub fn aya_ebpf::maps::program_array::ProgramArray::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::Queue impl aya_ebpf::maps::queue::Queue -pub const fn aya_ebpf::maps::queue::Queue::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::queue::Queue +pub fn aya_ebpf::maps::queue::Queue::peek(&self) -> core::option::Option +pub const fn aya_ebpf::maps::queue::Queue::pinned(max_entries: u32, flags: u32) -> Self pub fn aya_ebpf::maps::queue::Queue::pop(&self) -> core::option::Option -pub fn aya_ebpf::maps::queue::Queue::push(&self, value: &T, flags: u64) -> core::result::Result<(), i64> -pub const fn aya_ebpf::maps::queue::Queue::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::queue::Queue +pub fn aya_ebpf::maps::queue::Queue::push(&self, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), i64> +pub const fn aya_ebpf::maps::queue::Queue::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::queue::Queue impl !core::marker::Freeze for aya_ebpf::maps::queue::Queue impl core::marker::Send for aya_ebpf::maps::queue::Queue where T: core::marker::Send @@ -1181,20 +1390,21 @@ pub fn aya_ebpf::maps::queue::Queue::try_from(value: U) -> core::result::Resu impl core::convert::TryInto for aya_ebpf::maps::queue::Queue where U: core::convert::TryFrom pub type aya_ebpf::maps::queue::Queue::Error = >::Error pub fn aya_ebpf::maps::queue::Queue::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::queue::Queue where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::queue::Queue where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::queue::Queue::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::queue::Queue where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::queue::Queue where T: ?core::marker::Sized pub fn aya_ebpf::maps::queue::Queue::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::queue::Queue where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::queue::Queue where T: ?core::marker::Sized pub fn aya_ebpf::maps::queue::Queue::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::queue::Queue pub fn aya_ebpf::maps::queue::Queue::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::RingBuf impl aya_ebpf::maps::ring_buf::RingBuf -pub fn aya_ebpf::maps::ring_buf::RingBuf::output(&self, data: &T, flags: u64) -> core::result::Result<(), i64> +pub fn aya_ebpf::maps::ring_buf::RingBuf::output(&self, data: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), i64> pub const fn aya_ebpf::maps::ring_buf::RingBuf::pinned(byte_size: u32, flags: u32) -> Self pub fn aya_ebpf::maps::ring_buf::RingBuf::query(&self, flags: u64) -> u64 -pub fn aya_ebpf::maps::ring_buf::RingBuf::reserve(&self, flags: u64) -> core::option::Option> where const_assert::Assert<{ _ }>: const_assert::IsTrue +pub fn aya_ebpf::maps::ring_buf::RingBuf::reserve(&self, flags: u64) -> core::option::Option> +pub fn aya_ebpf::maps::ring_buf::RingBuf::reserve_bytes(&self, size: usize, flags: u64) -> core::option::Option> pub const fn aya_ebpf::maps::ring_buf::RingBuf::with_byte_size(byte_size: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::ring_buf::RingBuf impl !core::marker::Freeze for aya_ebpf::maps::ring_buf::RingBuf @@ -1210,22 +1420,22 @@ pub fn aya_ebpf::maps::ring_buf::RingBuf::try_from(value: U) -> core::result::Re impl core::convert::TryInto for aya_ebpf::maps::ring_buf::RingBuf where U: core::convert::TryFrom pub type aya_ebpf::maps::ring_buf::RingBuf::Error = >::Error pub fn aya_ebpf::maps::ring_buf::RingBuf::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::ring_buf::RingBuf where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::ring_buf::RingBuf where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::ring_buf::RingBuf::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::ring_buf::RingBuf where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::ring_buf::RingBuf where T: ?core::marker::Sized pub fn aya_ebpf::maps::ring_buf::RingBuf::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::ring_buf::RingBuf where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::ring_buf::RingBuf where T: ?core::marker::Sized pub fn aya_ebpf::maps::ring_buf::RingBuf::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::ring_buf::RingBuf pub fn aya_ebpf::maps::ring_buf::RingBuf::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::SockHash impl aya_ebpf::maps::sock_hash::SockHash -pub const fn aya_ebpf::maps::sock_hash::SockHash::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::sock_hash::SockHash -pub fn aya_ebpf::maps::sock_hash::SockHash::redirect_msg(&self, ctx: &aya_ebpf::programs::sk_msg::SkMsgContext, key: &mut K, flags: u64) -> i64 -pub fn aya_ebpf::maps::sock_hash::SockHash::redirect_sk_lookup(&mut self, ctx: &aya_ebpf::programs::sk_lookup::SkLookupContext, key: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), u32> -pub fn aya_ebpf::maps::sock_hash::SockHash::redirect_skb(&self, ctx: &aya_ebpf::programs::sk_buff::SkBuffContext, key: &mut K, flags: u64) -> i64 -pub fn aya_ebpf::maps::sock_hash::SockHash::update(&self, key: &mut K, sk_ops: &mut aya_ebpf_bindings::x86_64::bindings::bpf_sock_ops, flags: u64) -> core::result::Result<(), i64> -pub const fn aya_ebpf::maps::sock_hash::SockHash::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::sock_hash::SockHash +pub const fn aya_ebpf::maps::sock_hash::SockHash::pinned(max_entries: u32, flags: u32) -> Self +pub fn aya_ebpf::maps::sock_hash::SockHash::redirect_msg(&self, ctx: impl core::borrow::Borrow, key: impl core::borrow::BorrowMut, flags: u64) -> i64 +pub fn aya_ebpf::maps::sock_hash::SockHash::redirect_sk_lookup(&mut self, ctx: impl core::borrow::Borrow, key: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), u32> +pub fn aya_ebpf::maps::sock_hash::SockHash::redirect_skb(&self, ctx: impl core::borrow::Borrow, key: impl core::borrow::BorrowMut, flags: u64) -> i64 +pub fn aya_ebpf::maps::sock_hash::SockHash::update(&self, key: impl core::borrow::BorrowMut, sk_ops: impl core::borrow::BorrowMut, flags: u64) -> core::result::Result<(), i64> +pub const fn aya_ebpf::maps::sock_hash::SockHash::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::sock_hash::SockHash impl !core::marker::Freeze for aya_ebpf::maps::sock_hash::SockHash impl core::marker::Send for aya_ebpf::maps::sock_hash::SockHash where K: core::marker::Send @@ -1240,22 +1450,22 @@ pub fn aya_ebpf::maps::sock_hash::SockHash::try_from(value: U) -> core::resul impl core::convert::TryInto for aya_ebpf::maps::sock_hash::SockHash where U: core::convert::TryFrom pub type aya_ebpf::maps::sock_hash::SockHash::Error = >::Error pub fn aya_ebpf::maps::sock_hash::SockHash::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::sock_hash::SockHash where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::sock_hash::SockHash where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::sock_hash::SockHash::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::sock_hash::SockHash where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::sock_hash::SockHash where T: ?core::marker::Sized pub fn aya_ebpf::maps::sock_hash::SockHash::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::sock_hash::SockHash where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::sock_hash::SockHash where T: ?core::marker::Sized pub fn aya_ebpf::maps::sock_hash::SockHash::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::sock_hash::SockHash pub fn aya_ebpf::maps::sock_hash::SockHash::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::SockMap impl aya_ebpf::maps::sock_map::SockMap -pub const fn aya_ebpf::maps::sock_map::SockMap::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::sock_map::SockMap +pub const fn aya_ebpf::maps::sock_map::SockMap::pinned(max_entries: u32, flags: u32) -> Self pub unsafe fn aya_ebpf::maps::sock_map::SockMap::redirect_msg(&self, ctx: &aya_ebpf::programs::sk_msg::SkMsgContext, index: u32, flags: u64) -> i64 pub fn aya_ebpf::maps::sock_map::SockMap::redirect_sk_lookup(&mut self, ctx: &aya_ebpf::programs::sk_lookup::SkLookupContext, index: u32, flags: u64) -> core::result::Result<(), u32> pub unsafe fn aya_ebpf::maps::sock_map::SockMap::redirect_skb(&self, ctx: &aya_ebpf::programs::sk_buff::SkBuffContext, index: u32, flags: u64) -> i64 pub unsafe fn aya_ebpf::maps::sock_map::SockMap::update(&self, index: u32, sk_ops: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sock_ops, flags: u64) -> core::result::Result<(), i64> -pub const fn aya_ebpf::maps::sock_map::SockMap::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::sock_map::SockMap +pub const fn aya_ebpf::maps::sock_map::SockMap::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::sock_map::SockMap impl !core::marker::Freeze for aya_ebpf::maps::sock_map::SockMap impl core::marker::Send for aya_ebpf::maps::sock_map::SockMap @@ -1270,20 +1480,21 @@ pub fn aya_ebpf::maps::sock_map::SockMap::try_from(value: U) -> core::result::Re impl core::convert::TryInto for aya_ebpf::maps::sock_map::SockMap where U: core::convert::TryFrom pub type aya_ebpf::maps::sock_map::SockMap::Error = >::Error pub fn aya_ebpf::maps::sock_map::SockMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::sock_map::SockMap where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::sock_map::SockMap where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::sock_map::SockMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::sock_map::SockMap where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::sock_map::SockMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::sock_map::SockMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::sock_map::SockMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::sock_map::SockMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::sock_map::SockMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::sock_map::SockMap pub fn aya_ebpf::maps::sock_map::SockMap::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::Stack impl aya_ebpf::maps::stack::Stack -pub const fn aya_ebpf::maps::stack::Stack::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::stack::Stack -pub fn aya_ebpf::maps::stack::Stack::pop(&mut self) -> core::option::Option -pub fn aya_ebpf::maps::stack::Stack::push(&mut self, value: &T, flags: u64) -> core::result::Result<(), i64> -pub const fn aya_ebpf::maps::stack::Stack::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::stack::Stack +pub fn aya_ebpf::maps::stack::Stack::peek(&self) -> core::option::Option +pub const fn aya_ebpf::maps::stack::Stack::pinned(max_entries: u32, flags: u32) -> Self +pub fn aya_ebpf::maps::stack::Stack::pop(&self) -> core::option::Option +pub fn aya_ebpf::maps::stack::Stack::push(&self, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), i64> +pub const fn aya_ebpf::maps::stack::Stack::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Freeze for aya_ebpf::maps::stack::Stack impl core::marker::Send for aya_ebpf::maps::stack::Stack where T: core::marker::Send impl core::marker::Sync for aya_ebpf::maps::stack::Stack where T: core::marker::Sync @@ -1298,19 +1509,19 @@ pub fn aya_ebpf::maps::stack::Stack::try_from(value: U) -> core::result::Resu impl core::convert::TryInto for aya_ebpf::maps::stack::Stack where U: core::convert::TryFrom pub type aya_ebpf::maps::stack::Stack::Error = >::Error pub fn aya_ebpf::maps::stack::Stack::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::stack::Stack where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::stack::Stack where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::stack::Stack::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::stack::Stack where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::stack::Stack where T: ?core::marker::Sized pub fn aya_ebpf::maps::stack::Stack::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::stack::Stack where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::stack::Stack where T: ?core::marker::Sized pub fn aya_ebpf::maps::stack::Stack::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::stack::Stack pub fn aya_ebpf::maps::stack::Stack::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::StackTrace impl aya_ebpf::maps::stack_trace::StackTrace -pub unsafe fn aya_ebpf::maps::stack_trace::StackTrace::get_stackid(&self, ctx: &C, flags: u64) -> core::result::Result -pub const fn aya_ebpf::maps::stack_trace::StackTrace::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::stack_trace::StackTrace -pub const fn aya_ebpf::maps::stack_trace::StackTrace::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::stack_trace::StackTrace +pub unsafe fn aya_ebpf::maps::stack_trace::StackTrace::get_stackid(&self, ctx: impl core::borrow::Borrow, flags: u64) -> core::result::Result +pub const fn aya_ebpf::maps::stack_trace::StackTrace::pinned(max_entries: u32, flags: u32) -> Self +pub const fn aya_ebpf::maps::stack_trace::StackTrace::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::stack_trace::StackTrace impl !core::marker::Freeze for aya_ebpf::maps::stack_trace::StackTrace impl core::marker::Send for aya_ebpf::maps::stack_trace::StackTrace @@ -1325,20 +1536,20 @@ pub fn aya_ebpf::maps::stack_trace::StackTrace::try_from(value: U) -> core::resu impl core::convert::TryInto for aya_ebpf::maps::stack_trace::StackTrace where U: core::convert::TryFrom pub type aya_ebpf::maps::stack_trace::StackTrace::Error = >::Error pub fn aya_ebpf::maps::stack_trace::StackTrace::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::stack_trace::StackTrace where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::stack_trace::StackTrace where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::stack_trace::StackTrace::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::stack_trace::StackTrace where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::stack_trace::StackTrace where T: ?core::marker::Sized pub fn aya_ebpf::maps::stack_trace::StackTrace::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::stack_trace::StackTrace where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::stack_trace::StackTrace where T: ?core::marker::Sized pub fn aya_ebpf::maps::stack_trace::StackTrace::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::stack_trace::StackTrace pub fn aya_ebpf::maps::stack_trace::StackTrace::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::XskMap impl aya_ebpf::maps::XskMap pub fn aya_ebpf::maps::XskMap::get(&self, index: u32) -> core::option::Option -pub const fn aya_ebpf::maps::XskMap::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::XskMap +pub const fn aya_ebpf::maps::XskMap::pinned(max_entries: u32, flags: u32) -> Self pub fn aya_ebpf::maps::XskMap::redirect(&self, index: u32, flags: u64) -> core::result::Result -pub const fn aya_ebpf::maps::XskMap::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::XskMap +pub const fn aya_ebpf::maps::XskMap::with_max_entries(max_entries: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::XskMap impl !core::marker::Freeze for aya_ebpf::maps::XskMap impl core::marker::Send for aya_ebpf::maps::XskMap @@ -1353,11 +1564,11 @@ pub fn aya_ebpf::maps::XskMap::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_ebpf::maps::XskMap where U: core::convert::TryFrom pub type aya_ebpf::maps::XskMap::Error = >::Error pub fn aya_ebpf::maps::XskMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::maps::XskMap where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::maps::XskMap where T: 'static + ?core::marker::Sized pub fn aya_ebpf::maps::XskMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::maps::XskMap where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::maps::XskMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::XskMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::maps::XskMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::maps::XskMap where T: ?core::marker::Sized pub fn aya_ebpf::maps::XskMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::maps::XskMap pub fn aya_ebpf::maps::XskMap::from(t: T) -> T @@ -1366,7 +1577,7 @@ pub mod aya_ebpf::programs::device pub struct aya_ebpf::programs::device::DeviceContext pub aya_ebpf::programs::device::DeviceContext::device: *mut aya_ebpf_bindings::x86_64::bindings::bpf_cgroup_dev_ctx impl aya_ebpf::programs::device::DeviceContext -pub fn aya_ebpf::programs::device::DeviceContext::new(device: *mut aya_ebpf_bindings::x86_64::bindings::bpf_cgroup_dev_ctx) -> aya_ebpf::programs::device::DeviceContext +pub fn aya_ebpf::programs::device::DeviceContext::new(device: *mut aya_ebpf_bindings::x86_64::bindings::bpf_cgroup_dev_ctx) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::device::DeviceContext pub fn aya_ebpf::programs::device::DeviceContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::device::DeviceContext @@ -1383,19 +1594,19 @@ pub fn aya_ebpf::programs::device::DeviceContext::try_from(value: U) -> core::re impl core::convert::TryInto for aya_ebpf::programs::device::DeviceContext where U: core::convert::TryFrom pub type aya_ebpf::programs::device::DeviceContext::Error = >::Error pub fn aya_ebpf::programs::device::DeviceContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::device::DeviceContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::device::DeviceContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::device::DeviceContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::device::DeviceContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::device::DeviceContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::device::DeviceContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::device::DeviceContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::device::DeviceContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::device::DeviceContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::device::DeviceContext pub fn aya_ebpf::programs::device::DeviceContext::from(t: T) -> T pub mod aya_ebpf::programs::fentry pub struct aya_ebpf::programs::fentry::FEntryContext impl aya_ebpf::programs::fentry::FEntryContext -pub unsafe fn aya_ebpf::programs::fentry::FEntryContext::arg(&self, n: usize) -> T -pub fn aya_ebpf::programs::fentry::FEntryContext::new(ctx: *mut core::ffi::c_void) -> aya_ebpf::programs::fentry::FEntryContext +pub fn aya_ebpf::programs::fentry::FEntryContext::arg(&self, n: usize) -> T +pub fn aya_ebpf::programs::fentry::FEntryContext::new(ctx: *mut core::ffi::c_void) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::fentry::FEntryContext pub fn aya_ebpf::programs::fentry::FEntryContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::fentry::FEntryContext @@ -1412,19 +1623,19 @@ pub fn aya_ebpf::programs::fentry::FEntryContext::try_from(value: U) -> core::re impl core::convert::TryInto for aya_ebpf::programs::fentry::FEntryContext where U: core::convert::TryFrom pub type aya_ebpf::programs::fentry::FEntryContext::Error = >::Error pub fn aya_ebpf::programs::fentry::FEntryContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::fentry::FEntryContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::fentry::FEntryContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::fentry::FEntryContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::fentry::FEntryContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::fentry::FEntryContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::fentry::FEntryContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::fentry::FEntryContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::fentry::FEntryContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::fentry::FEntryContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::fentry::FEntryContext pub fn aya_ebpf::programs::fentry::FEntryContext::from(t: T) -> T pub mod aya_ebpf::programs::fexit pub struct aya_ebpf::programs::fexit::FExitContext impl aya_ebpf::programs::fexit::FExitContext -pub unsafe fn aya_ebpf::programs::fexit::FExitContext::arg(&self, n: usize) -> T -pub fn aya_ebpf::programs::fexit::FExitContext::new(ctx: *mut core::ffi::c_void) -> aya_ebpf::programs::fexit::FExitContext +pub fn aya_ebpf::programs::fexit::FExitContext::arg(&self, n: usize) -> T +pub fn aya_ebpf::programs::fexit::FExitContext::new(ctx: *mut core::ffi::c_void) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::fexit::FExitContext pub fn aya_ebpf::programs::fexit::FExitContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::fexit::FExitContext @@ -1441,19 +1652,51 @@ pub fn aya_ebpf::programs::fexit::FExitContext::try_from(value: U) -> core::resu impl core::convert::TryInto for aya_ebpf::programs::fexit::FExitContext where U: core::convert::TryFrom pub type aya_ebpf::programs::fexit::FExitContext::Error = >::Error pub fn aya_ebpf::programs::fexit::FExitContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::fexit::FExitContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::fexit::FExitContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::fexit::FExitContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::fexit::FExitContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::fexit::FExitContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::fexit::FExitContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::fexit::FExitContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::fexit::FExitContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::fexit::FExitContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::fexit::FExitContext pub fn aya_ebpf::programs::fexit::FExitContext::from(t: T) -> T +pub mod aya_ebpf::programs::flow_dissector +pub struct aya_ebpf::programs::flow_dissector::FlowDissectorContext +impl aya_ebpf::programs::flow_dissector::FlowDissectorContext +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::data(&self) -> usize +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::data_end(&self) -> usize +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::flow_keys(&mut self) -> &mut aya_ebpf_bindings::x86_64::bindings::bpf_flow_keys +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::load_bytes(&self, offset: usize, dst: &mut [u8]) -> core::result::Result +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::new(skb: *mut aya_ebpf_bindings::x86_64::bindings::__sk_buff) -> Self +impl aya_ebpf::EbpfContext for aya_ebpf::programs::flow_dissector::FlowDissectorContext +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::as_ptr(&self) -> *mut aya_ebpf_cty::c_void +impl core::marker::Freeze for aya_ebpf::programs::flow_dissector::FlowDissectorContext +impl !core::marker::Send for aya_ebpf::programs::flow_dissector::FlowDissectorContext +impl !core::marker::Sync for aya_ebpf::programs::flow_dissector::FlowDissectorContext +impl core::marker::Unpin for aya_ebpf::programs::flow_dissector::FlowDissectorContext +impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::programs::flow_dissector::FlowDissectorContext +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::programs::flow_dissector::FlowDissectorContext +impl core::convert::Into for aya_ebpf::programs::flow_dissector::FlowDissectorContext where U: core::convert::From +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::programs::flow_dissector::FlowDissectorContext where U: core::convert::Into +pub type aya_ebpf::programs::flow_dissector::FlowDissectorContext::Error = core::convert::Infallible +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::programs::flow_dissector::FlowDissectorContext where U: core::convert::TryFrom +pub type aya_ebpf::programs::flow_dissector::FlowDissectorContext::Error = >::Error +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::programs::flow_dissector::FlowDissectorContext where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::programs::flow_dissector::FlowDissectorContext where T: ?core::marker::Sized +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::programs::flow_dissector::FlowDissectorContext where T: ?core::marker::Sized +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::programs::flow_dissector::FlowDissectorContext +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::from(t: T) -> T pub mod aya_ebpf::programs::lsm pub struct aya_ebpf::programs::lsm::LsmContext impl aya_ebpf::programs::lsm::LsmContext -pub unsafe fn aya_ebpf::programs::lsm::LsmContext::arg(&self, n: usize) -> T -pub fn aya_ebpf::programs::lsm::LsmContext::new(ctx: *mut core::ffi::c_void) -> aya_ebpf::programs::lsm::LsmContext +pub fn aya_ebpf::programs::lsm::LsmContext::arg(&self, n: usize) -> T +pub fn aya_ebpf::programs::lsm::LsmContext::new(ctx: *mut core::ffi::c_void) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::lsm::LsmContext pub fn aya_ebpf::programs::lsm::LsmContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::lsm::LsmContext @@ -1470,18 +1713,18 @@ pub fn aya_ebpf::programs::lsm::LsmContext::try_from(value: U) -> core::result:: impl core::convert::TryInto for aya_ebpf::programs::lsm::LsmContext where U: core::convert::TryFrom pub type aya_ebpf::programs::lsm::LsmContext::Error = >::Error pub fn aya_ebpf::programs::lsm::LsmContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::lsm::LsmContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::lsm::LsmContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::lsm::LsmContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::lsm::LsmContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::lsm::LsmContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::lsm::LsmContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::lsm::LsmContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::lsm::LsmContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::lsm::LsmContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::lsm::LsmContext pub fn aya_ebpf::programs::lsm::LsmContext::from(t: T) -> T pub mod aya_ebpf::programs::perf_event pub struct aya_ebpf::programs::perf_event::PerfEventContext impl aya_ebpf::programs::perf_event::PerfEventContext -pub fn aya_ebpf::programs::perf_event::PerfEventContext::new(ctx: *mut core::ffi::c_void) -> aya_ebpf::programs::perf_event::PerfEventContext +pub fn aya_ebpf::programs::perf_event::PerfEventContext::new(ctx: *mut core::ffi::c_void) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::perf_event::PerfEventContext pub fn aya_ebpf::programs::perf_event::PerfEventContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::perf_event::PerfEventContext @@ -1498,11 +1741,11 @@ pub fn aya_ebpf::programs::perf_event::PerfEventContext::try_from(value: U) -> c impl core::convert::TryInto for aya_ebpf::programs::perf_event::PerfEventContext where U: core::convert::TryFrom pub type aya_ebpf::programs::perf_event::PerfEventContext::Error = >::Error pub fn aya_ebpf::programs::perf_event::PerfEventContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::perf_event::PerfEventContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::perf_event::PerfEventContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::perf_event::PerfEventContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::perf_event::PerfEventContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::perf_event::PerfEventContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::perf_event::PerfEventContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::perf_event::PerfEventContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::perf_event::PerfEventContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::perf_event::PerfEventContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::perf_event::PerfEventContext pub fn aya_ebpf::programs::perf_event::PerfEventContext::from(t: T) -> T @@ -1510,8 +1753,8 @@ pub mod aya_ebpf::programs::probe pub struct aya_ebpf::programs::probe::ProbeContext pub aya_ebpf::programs::probe::ProbeContext::regs: *mut aya_ebpf_bindings::x86_64::bindings::pt_regs impl aya_ebpf::programs::probe::ProbeContext -pub fn aya_ebpf::programs::probe::ProbeContext::arg(&self, n: usize) -> core::option::Option -pub fn aya_ebpf::programs::probe::ProbeContext::new(ctx: *mut core::ffi::c_void) -> aya_ebpf::programs::probe::ProbeContext +pub fn aya_ebpf::programs::probe::ProbeContext::arg(&self, n: usize) -> core::option::Option +pub fn aya_ebpf::programs::probe::ProbeContext::new(ctx: *mut core::ffi::c_void) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::probe::ProbeContext pub fn aya_ebpf::programs::probe::ProbeContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::probe::ProbeContext @@ -1528,18 +1771,19 @@ pub fn aya_ebpf::programs::probe::ProbeContext::try_from(value: U) -> core::resu impl core::convert::TryInto for aya_ebpf::programs::probe::ProbeContext where U: core::convert::TryFrom pub type aya_ebpf::programs::probe::ProbeContext::Error = >::Error pub fn aya_ebpf::programs::probe::ProbeContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::probe::ProbeContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::probe::ProbeContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::probe::ProbeContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::probe::ProbeContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::probe::ProbeContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::probe::ProbeContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::probe::ProbeContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::probe::ProbeContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::probe::ProbeContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::probe::ProbeContext pub fn aya_ebpf::programs::probe::ProbeContext::from(t: T) -> T pub mod aya_ebpf::programs::raw_tracepoint pub struct aya_ebpf::programs::raw_tracepoint::RawTracePointContext impl aya_ebpf::programs::raw_tracepoint::RawTracePointContext -pub fn aya_ebpf::programs::raw_tracepoint::RawTracePointContext::new(ctx: *mut core::ffi::c_void) -> aya_ebpf::programs::raw_tracepoint::RawTracePointContext +pub fn aya_ebpf::programs::raw_tracepoint::RawTracePointContext::arg(&self, n: usize) -> T +pub fn aya_ebpf::programs::raw_tracepoint::RawTracePointContext::new(ctx: *mut core::ffi::c_void) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::raw_tracepoint::RawTracePointContext pub fn aya_ebpf::programs::raw_tracepoint::RawTracePointContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::raw_tracepoint::RawTracePointContext @@ -1556,11 +1800,11 @@ pub fn aya_ebpf::programs::raw_tracepoint::RawTracePointContext::try_from(value: impl core::convert::TryInto for aya_ebpf::programs::raw_tracepoint::RawTracePointContext where U: core::convert::TryFrom pub type aya_ebpf::programs::raw_tracepoint::RawTracePointContext::Error = >::Error pub fn aya_ebpf::programs::raw_tracepoint::RawTracePointContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::raw_tracepoint::RawTracePointContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::raw_tracepoint::RawTracePointContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::raw_tracepoint::RawTracePointContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::raw_tracepoint::RawTracePointContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::raw_tracepoint::RawTracePointContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::raw_tracepoint::RawTracePointContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::raw_tracepoint::RawTracePointContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::raw_tracepoint::RawTracePointContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::raw_tracepoint::RawTracePointContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::raw_tracepoint::RawTracePointContext pub fn aya_ebpf::programs::raw_tracepoint::RawTracePointContext::from(t: T) -> T @@ -1568,8 +1812,8 @@ pub mod aya_ebpf::programs::retprobe pub struct aya_ebpf::programs::retprobe::RetProbeContext pub aya_ebpf::programs::retprobe::RetProbeContext::regs: *mut aya_ebpf_bindings::x86_64::bindings::pt_regs impl aya_ebpf::programs::retprobe::RetProbeContext -pub fn aya_ebpf::programs::retprobe::RetProbeContext::new(ctx: *mut core::ffi::c_void) -> aya_ebpf::programs::retprobe::RetProbeContext -pub fn aya_ebpf::programs::retprobe::RetProbeContext::ret(&self) -> core::option::Option +pub fn aya_ebpf::programs::retprobe::RetProbeContext::new(ctx: *mut core::ffi::c_void) -> Self +pub fn aya_ebpf::programs::retprobe::RetProbeContext::ret(&self) -> T impl aya_ebpf::EbpfContext for aya_ebpf::programs::retprobe::RetProbeContext pub fn aya_ebpf::programs::retprobe::RetProbeContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::retprobe::RetProbeContext @@ -1586,11 +1830,11 @@ pub fn aya_ebpf::programs::retprobe::RetProbeContext::try_from(value: U) -> core impl core::convert::TryInto for aya_ebpf::programs::retprobe::RetProbeContext where U: core::convert::TryFrom pub type aya_ebpf::programs::retprobe::RetProbeContext::Error = >::Error pub fn aya_ebpf::programs::retprobe::RetProbeContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::retprobe::RetProbeContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::retprobe::RetProbeContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::retprobe::RetProbeContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::retprobe::RetProbeContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::retprobe::RetProbeContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::retprobe::RetProbeContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::retprobe::RetProbeContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::retprobe::RetProbeContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::retprobe::RetProbeContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::retprobe::RetProbeContext pub fn aya_ebpf::programs::retprobe::RetProbeContext::from(t: T) -> T @@ -1614,7 +1858,7 @@ pub fn aya_ebpf::programs::sk_buff::SkBuff::load_bytes(&self, offset: usize, dst pub fn aya_ebpf::programs::sk_buff::SkBuff::local_ipv4(&self) -> u32 pub fn aya_ebpf::programs::sk_buff::SkBuff::local_ipv6(&self) -> &[u32; 4] pub fn aya_ebpf::programs::sk_buff::SkBuff::local_port(&self) -> u32 -pub fn aya_ebpf::programs::sk_buff::SkBuff::new(skb: *mut aya_ebpf_bindings::x86_64::bindings::__sk_buff) -> aya_ebpf::programs::sk_buff::SkBuff +pub fn aya_ebpf::programs::sk_buff::SkBuff::new(skb: *mut aya_ebpf_bindings::x86_64::bindings::__sk_buff) -> Self pub fn aya_ebpf::programs::sk_buff::SkBuff::protocol(&self) -> u32 pub fn aya_ebpf::programs::sk_buff::SkBuff::pull_data(&self, len: u32) -> core::result::Result<(), aya_ebpf_cty::od::c_long> pub fn aya_ebpf::programs::sk_buff::SkBuff::remote_ipv4(&self) -> u32 @@ -1636,11 +1880,11 @@ pub fn aya_ebpf::programs::sk_buff::SkBuff::try_from(value: U) -> core::result:: impl core::convert::TryInto for aya_ebpf::programs::sk_buff::SkBuff where U: core::convert::TryFrom pub type aya_ebpf::programs::sk_buff::SkBuff::Error = >::Error pub fn aya_ebpf::programs::sk_buff::SkBuff::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::sk_buff::SkBuff where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::sk_buff::SkBuff where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::sk_buff::SkBuff::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::sk_buff::SkBuff where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::sk_buff::SkBuff where T: ?core::marker::Sized pub fn aya_ebpf::programs::sk_buff::SkBuff::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::sk_buff::SkBuff where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::sk_buff::SkBuff where T: ?core::marker::Sized pub fn aya_ebpf::programs::sk_buff::SkBuff::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::sk_buff::SkBuff pub fn aya_ebpf::programs::sk_buff::SkBuff::from(t: T) -> T @@ -1658,7 +1902,7 @@ pub fn aya_ebpf::programs::sk_buff::SkBuffContext::l4_csum_replace(&self, offset pub fn aya_ebpf::programs::sk_buff::SkBuffContext::len(&self) -> u32 pub fn aya_ebpf::programs::sk_buff::SkBuffContext::load(&self, offset: usize) -> core::result::Result pub fn aya_ebpf::programs::sk_buff::SkBuffContext::load_bytes(&self, offset: usize, dst: &mut [u8]) -> core::result::Result -pub fn aya_ebpf::programs::sk_buff::SkBuffContext::new(skb: *mut aya_ebpf_bindings::x86_64::bindings::__sk_buff) -> aya_ebpf::programs::sk_buff::SkBuffContext +pub fn aya_ebpf::programs::sk_buff::SkBuffContext::new(skb: *mut aya_ebpf_bindings::x86_64::bindings::__sk_buff) -> Self pub fn aya_ebpf::programs::sk_buff::SkBuffContext::pull_data(&self, len: u32) -> core::result::Result<(), aya_ebpf_cty::od::c_long> pub fn aya_ebpf::programs::sk_buff::SkBuffContext::set_mark(&mut self, mark: u32) pub fn aya_ebpf::programs::sk_buff::SkBuffContext::store(&mut self, offset: usize, v: &T, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> @@ -1678,11 +1922,11 @@ pub fn aya_ebpf::programs::sk_buff::SkBuffContext::try_from(value: U) -> core::r impl core::convert::TryInto for aya_ebpf::programs::sk_buff::SkBuffContext where U: core::convert::TryFrom pub type aya_ebpf::programs::sk_buff::SkBuffContext::Error = >::Error pub fn aya_ebpf::programs::sk_buff::SkBuffContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::sk_buff::SkBuffContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::sk_buff::SkBuffContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::sk_buff::SkBuffContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::sk_buff::SkBuffContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::sk_buff::SkBuffContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sk_buff::SkBuffContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::sk_buff::SkBuffContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::sk_buff::SkBuffContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sk_buff::SkBuffContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::sk_buff::SkBuffContext pub fn aya_ebpf::programs::sk_buff::SkBuffContext::from(t: T) -> T @@ -1690,7 +1934,7 @@ pub mod aya_ebpf::programs::sk_lookup pub struct aya_ebpf::programs::sk_lookup::SkLookupContext pub aya_ebpf::programs::sk_lookup::SkLookupContext::lookup: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sk_lookup impl aya_ebpf::programs::sk_lookup::SkLookupContext -pub fn aya_ebpf::programs::sk_lookup::SkLookupContext::new(lookup: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sk_lookup) -> aya_ebpf::programs::sk_lookup::SkLookupContext +pub fn aya_ebpf::programs::sk_lookup::SkLookupContext::new(lookup: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sk_lookup) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::sk_lookup::SkLookupContext pub fn aya_ebpf::programs::sk_lookup::SkLookupContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::sk_lookup::SkLookupContext @@ -1707,11 +1951,11 @@ pub fn aya_ebpf::programs::sk_lookup::SkLookupContext::try_from(value: U) -> cor impl core::convert::TryInto for aya_ebpf::programs::sk_lookup::SkLookupContext where U: core::convert::TryFrom pub type aya_ebpf::programs::sk_lookup::SkLookupContext::Error = >::Error pub fn aya_ebpf::programs::sk_lookup::SkLookupContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::sk_lookup::SkLookupContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::sk_lookup::SkLookupContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::sk_lookup::SkLookupContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::sk_lookup::SkLookupContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::sk_lookup::SkLookupContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sk_lookup::SkLookupContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::sk_lookup::SkLookupContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::sk_lookup::SkLookupContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sk_lookup::SkLookupContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::sk_lookup::SkLookupContext pub fn aya_ebpf::programs::sk_lookup::SkLookupContext::from(t: T) -> T @@ -1721,7 +1965,7 @@ pub aya_ebpf::programs::sk_msg::SkMsgContext::msg: *mut aya_ebpf_bindings::x86_6 impl aya_ebpf::programs::sk_msg::SkMsgContext pub fn aya_ebpf::programs::sk_msg::SkMsgContext::data(&self) -> usize pub fn aya_ebpf::programs::sk_msg::SkMsgContext::data_end(&self) -> usize -pub fn aya_ebpf::programs::sk_msg::SkMsgContext::new(msg: *mut aya_ebpf_bindings::x86_64::bindings::sk_msg_md) -> aya_ebpf::programs::sk_msg::SkMsgContext +pub fn aya_ebpf::programs::sk_msg::SkMsgContext::new(msg: *mut aya_ebpf_bindings::x86_64::bindings::sk_msg_md) -> Self pub fn aya_ebpf::programs::sk_msg::SkMsgContext::pop_data(&self, start: u32, len: u32, flags: u64) -> core::result::Result<(), i64> pub fn aya_ebpf::programs::sk_msg::SkMsgContext::push_data(&self, start: u32, len: u32, flags: u64) -> core::result::Result<(), i64> pub fn aya_ebpf::programs::sk_msg::SkMsgContext::size(&self) -> u32 @@ -1741,11 +1985,11 @@ pub fn aya_ebpf::programs::sk_msg::SkMsgContext::try_from(value: U) -> core::res impl core::convert::TryInto for aya_ebpf::programs::sk_msg::SkMsgContext where U: core::convert::TryFrom pub type aya_ebpf::programs::sk_msg::SkMsgContext::Error = >::Error pub fn aya_ebpf::programs::sk_msg::SkMsgContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::sk_msg::SkMsgContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::sk_msg::SkMsgContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::sk_msg::SkMsgContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::sk_msg::SkMsgContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::sk_msg::SkMsgContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sk_msg::SkMsgContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::sk_msg::SkMsgContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::sk_msg::SkMsgContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sk_msg::SkMsgContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::sk_msg::SkMsgContext pub fn aya_ebpf::programs::sk_msg::SkMsgContext::from(t: T) -> T @@ -1753,7 +1997,7 @@ pub mod aya_ebpf::programs::sock pub struct aya_ebpf::programs::sock::SockContext pub aya_ebpf::programs::sock::SockContext::sock: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sock impl aya_ebpf::programs::sock::SockContext -pub fn aya_ebpf::programs::sock::SockContext::new(sock: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sock) -> aya_ebpf::programs::sock::SockContext +pub fn aya_ebpf::programs::sock::SockContext::new(sock: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sock) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::sock::SockContext pub fn aya_ebpf::programs::sock::SockContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::sock::SockContext @@ -1770,11 +2014,11 @@ pub fn aya_ebpf::programs::sock::SockContext::try_from(value: U) -> core::result impl core::convert::TryInto for aya_ebpf::programs::sock::SockContext where U: core::convert::TryFrom pub type aya_ebpf::programs::sock::SockContext::Error = >::Error pub fn aya_ebpf::programs::sock::SockContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::sock::SockContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::sock::SockContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::sock::SockContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::sock::SockContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::sock::SockContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sock::SockContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::sock::SockContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::sock::SockContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sock::SockContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::sock::SockContext pub fn aya_ebpf::programs::sock::SockContext::from(t: T) -> T @@ -1782,7 +2026,7 @@ pub mod aya_ebpf::programs::sock_addr pub struct aya_ebpf::programs::sock_addr::SockAddrContext pub aya_ebpf::programs::sock_addr::SockAddrContext::sock_addr: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sock_addr impl aya_ebpf::programs::sock_addr::SockAddrContext -pub fn aya_ebpf::programs::sock_addr::SockAddrContext::new(sock_addr: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sock_addr) -> aya_ebpf::programs::sock_addr::SockAddrContext +pub fn aya_ebpf::programs::sock_addr::SockAddrContext::new(sock_addr: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sock_addr) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::sock_addr::SockAddrContext pub fn aya_ebpf::programs::sock_addr::SockAddrContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::sock_addr::SockAddrContext @@ -1799,11 +2043,11 @@ pub fn aya_ebpf::programs::sock_addr::SockAddrContext::try_from(value: U) -> cor impl core::convert::TryInto for aya_ebpf::programs::sock_addr::SockAddrContext where U: core::convert::TryFrom pub type aya_ebpf::programs::sock_addr::SockAddrContext::Error = >::Error pub fn aya_ebpf::programs::sock_addr::SockAddrContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::sock_addr::SockAddrContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::sock_addr::SockAddrContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::sock_addr::SockAddrContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::sock_addr::SockAddrContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::sock_addr::SockAddrContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sock_addr::SockAddrContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::sock_addr::SockAddrContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::sock_addr::SockAddrContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sock_addr::SockAddrContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::sock_addr::SockAddrContext pub fn aya_ebpf::programs::sock_addr::SockAddrContext::from(t: T) -> T @@ -1817,12 +2061,13 @@ pub fn aya_ebpf::programs::sock_ops::SockOpsContext::family(&self) -> u32 pub fn aya_ebpf::programs::sock_ops::SockOpsContext::local_ip4(&self) -> u32 pub fn aya_ebpf::programs::sock_ops::SockOpsContext::local_ip6(&self) -> [u32; 4] pub fn aya_ebpf::programs::sock_ops::SockOpsContext::local_port(&self) -> u32 -pub fn aya_ebpf::programs::sock_ops::SockOpsContext::new(ops: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sock_ops) -> aya_ebpf::programs::sock_ops::SockOpsContext +pub fn aya_ebpf::programs::sock_ops::SockOpsContext::new(ops: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sock_ops) -> Self pub fn aya_ebpf::programs::sock_ops::SockOpsContext::op(&self) -> u32 pub fn aya_ebpf::programs::sock_ops::SockOpsContext::remote_ip4(&self) -> u32 pub fn aya_ebpf::programs::sock_ops::SockOpsContext::remote_ip6(&self) -> [u32; 4] pub fn aya_ebpf::programs::sock_ops::SockOpsContext::remote_port(&self) -> u32 pub fn aya_ebpf::programs::sock_ops::SockOpsContext::set_cb_flags(&self, flags: i32) -> core::result::Result<(), i64> +pub fn aya_ebpf::programs::sock_ops::SockOpsContext::set_reply(&mut self, reply: u32) impl aya_ebpf::EbpfContext for aya_ebpf::programs::sock_ops::SockOpsContext pub fn aya_ebpf::programs::sock_ops::SockOpsContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::sock_ops::SockOpsContext @@ -1839,11 +2084,11 @@ pub fn aya_ebpf::programs::sock_ops::SockOpsContext::try_from(value: U) -> core: impl core::convert::TryInto for aya_ebpf::programs::sock_ops::SockOpsContext where U: core::convert::TryFrom pub type aya_ebpf::programs::sock_ops::SockOpsContext::Error = >::Error pub fn aya_ebpf::programs::sock_ops::SockOpsContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::sock_ops::SockOpsContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::sock_ops::SockOpsContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::sock_ops::SockOpsContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::sock_ops::SockOpsContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::sock_ops::SockOpsContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sock_ops::SockOpsContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::sock_ops::SockOpsContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::sock_ops::SockOpsContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sock_ops::SockOpsContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::sock_ops::SockOpsContext pub fn aya_ebpf::programs::sock_ops::SockOpsContext::from(t: T) -> T @@ -1851,7 +2096,7 @@ pub mod aya_ebpf::programs::sockopt pub struct aya_ebpf::programs::sockopt::SockoptContext pub aya_ebpf::programs::sockopt::SockoptContext::sockopt: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sockopt impl aya_ebpf::programs::sockopt::SockoptContext -pub fn aya_ebpf::programs::sockopt::SockoptContext::new(sockopt: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sockopt) -> aya_ebpf::programs::sockopt::SockoptContext +pub fn aya_ebpf::programs::sockopt::SockoptContext::new(sockopt: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sockopt) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::sockopt::SockoptContext pub fn aya_ebpf::programs::sockopt::SockoptContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::sockopt::SockoptContext @@ -1868,11 +2113,11 @@ pub fn aya_ebpf::programs::sockopt::SockoptContext::try_from(value: U) -> core:: impl core::convert::TryInto for aya_ebpf::programs::sockopt::SockoptContext where U: core::convert::TryFrom pub type aya_ebpf::programs::sockopt::SockoptContext::Error = >::Error pub fn aya_ebpf::programs::sockopt::SockoptContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::sockopt::SockoptContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::sockopt::SockoptContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::sockopt::SockoptContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::sockopt::SockoptContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::sockopt::SockoptContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sockopt::SockoptContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::sockopt::SockoptContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::sockopt::SockoptContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sockopt::SockoptContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::sockopt::SockoptContext pub fn aya_ebpf::programs::sockopt::SockoptContext::from(t: T) -> T @@ -1880,7 +2125,7 @@ pub mod aya_ebpf::programs::sysctl pub struct aya_ebpf::programs::sysctl::SysctlContext pub aya_ebpf::programs::sysctl::SysctlContext::sysctl: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sysctl impl aya_ebpf::programs::sysctl::SysctlContext -pub fn aya_ebpf::programs::sysctl::SysctlContext::new(sysctl: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sysctl) -> aya_ebpf::programs::sysctl::SysctlContext +pub fn aya_ebpf::programs::sysctl::SysctlContext::new(sysctl: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sysctl) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::sysctl::SysctlContext pub fn aya_ebpf::programs::sysctl::SysctlContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::sysctl::SysctlContext @@ -1897,11 +2142,11 @@ pub fn aya_ebpf::programs::sysctl::SysctlContext::try_from(value: U) -> core::re impl core::convert::TryInto for aya_ebpf::programs::sysctl::SysctlContext where U: core::convert::TryFrom pub type aya_ebpf::programs::sysctl::SysctlContext::Error = >::Error pub fn aya_ebpf::programs::sysctl::SysctlContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::sysctl::SysctlContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::sysctl::SysctlContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::sysctl::SysctlContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::sysctl::SysctlContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::sysctl::SysctlContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sysctl::SysctlContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::sysctl::SysctlContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::sysctl::SysctlContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sysctl::SysctlContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::sysctl::SysctlContext pub fn aya_ebpf::programs::sysctl::SysctlContext::from(t: T) -> T @@ -1923,7 +2168,7 @@ pub fn aya_ebpf::programs::tc::TcContext::l4_csum_replace(&self, offset: usize, pub fn aya_ebpf::programs::tc::TcContext::len(&self) -> u32 pub fn aya_ebpf::programs::tc::TcContext::load(&self, offset: usize) -> core::result::Result pub fn aya_ebpf::programs::tc::TcContext::load_bytes(&self, offset: usize, dst: &mut [u8]) -> core::result::Result -pub fn aya_ebpf::programs::tc::TcContext::new(skb: *mut aya_ebpf_bindings::x86_64::bindings::__sk_buff) -> aya_ebpf::programs::tc::TcContext +pub fn aya_ebpf::programs::tc::TcContext::new(skb: *mut aya_ebpf_bindings::x86_64::bindings::__sk_buff) -> Self pub fn aya_ebpf::programs::tc::TcContext::pull_data(&self, len: u32) -> core::result::Result<(), aya_ebpf_cty::od::c_long> pub fn aya_ebpf::programs::tc::TcContext::set_mark(&mut self, mark: u32) pub fn aya_ebpf::programs::tc::TcContext::store(&mut self, offset: usize, v: &T, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> @@ -1943,19 +2188,19 @@ pub fn aya_ebpf::programs::tc::TcContext::try_from(value: U) -> core::result::Re impl core::convert::TryInto for aya_ebpf::programs::tc::TcContext where U: core::convert::TryFrom pub type aya_ebpf::programs::tc::TcContext::Error = >::Error pub fn aya_ebpf::programs::tc::TcContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::tc::TcContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::tc::TcContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::tc::TcContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::tc::TcContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::tc::TcContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::tc::TcContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::tc::TcContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::tc::TcContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::tc::TcContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::tc::TcContext pub fn aya_ebpf::programs::tc::TcContext::from(t: T) -> T pub mod aya_ebpf::programs::tp_btf pub struct aya_ebpf::programs::tp_btf::BtfTracePointContext impl aya_ebpf::programs::tp_btf::BtfTracePointContext -pub unsafe fn aya_ebpf::programs::tp_btf::BtfTracePointContext::arg(&self, n: usize) -> T -pub fn aya_ebpf::programs::tp_btf::BtfTracePointContext::new(ctx: *mut core::ffi::c_void) -> aya_ebpf::programs::tp_btf::BtfTracePointContext +pub fn aya_ebpf::programs::tp_btf::BtfTracePointContext::arg(&self, n: usize) -> T +pub fn aya_ebpf::programs::tp_btf::BtfTracePointContext::new(ctx: *mut core::ffi::c_void) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::tp_btf::BtfTracePointContext pub fn aya_ebpf::programs::tp_btf::BtfTracePointContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::tp_btf::BtfTracePointContext @@ -1972,18 +2217,18 @@ pub fn aya_ebpf::programs::tp_btf::BtfTracePointContext::try_from(value: U) -> c impl core::convert::TryInto for aya_ebpf::programs::tp_btf::BtfTracePointContext where U: core::convert::TryFrom pub type aya_ebpf::programs::tp_btf::BtfTracePointContext::Error = >::Error pub fn aya_ebpf::programs::tp_btf::BtfTracePointContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::tp_btf::BtfTracePointContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::tp_btf::BtfTracePointContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::tp_btf::BtfTracePointContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::tp_btf::BtfTracePointContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::tp_btf::BtfTracePointContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::tp_btf::BtfTracePointContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::tp_btf::BtfTracePointContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::tp_btf::BtfTracePointContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::tp_btf::BtfTracePointContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::tp_btf::BtfTracePointContext pub fn aya_ebpf::programs::tp_btf::BtfTracePointContext::from(t: T) -> T pub mod aya_ebpf::programs::tracepoint pub struct aya_ebpf::programs::tracepoint::TracePointContext impl aya_ebpf::programs::tracepoint::TracePointContext -pub fn aya_ebpf::programs::tracepoint::TracePointContext::new(ctx: *mut core::ffi::c_void) -> aya_ebpf::programs::tracepoint::TracePointContext +pub fn aya_ebpf::programs::tracepoint::TracePointContext::new(ctx: *mut core::ffi::c_void) -> Self pub unsafe fn aya_ebpf::programs::tracepoint::TracePointContext::read_at(&self, offset: usize) -> core::result::Result impl aya_ebpf::EbpfContext for aya_ebpf::programs::tracepoint::TracePointContext pub fn aya_ebpf::programs::tracepoint::TracePointContext::as_ptr(&self) -> *mut core::ffi::c_void @@ -2001,11 +2246,11 @@ pub fn aya_ebpf::programs::tracepoint::TracePointContext::try_from(value: U) -> impl core::convert::TryInto for aya_ebpf::programs::tracepoint::TracePointContext where U: core::convert::TryFrom pub type aya_ebpf::programs::tracepoint::TracePointContext::Error = >::Error pub fn aya_ebpf::programs::tracepoint::TracePointContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::tracepoint::TracePointContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::tracepoint::TracePointContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::tracepoint::TracePointContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::tracepoint::TracePointContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::tracepoint::TracePointContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::tracepoint::TracePointContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::tracepoint::TracePointContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::tracepoint::TracePointContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::tracepoint::TracePointContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::tracepoint::TracePointContext pub fn aya_ebpf::programs::tracepoint::TracePointContext::from(t: T) -> T @@ -2015,9 +2260,11 @@ pub aya_ebpf::programs::xdp::XdpContext::ctx: *mut aya_ebpf_bindings::x86_64::bi impl aya_ebpf::programs::xdp::XdpContext pub fn aya_ebpf::programs::xdp::XdpContext::data(&self) -> usize pub fn aya_ebpf::programs::xdp::XdpContext::data_end(&self) -> usize +pub fn aya_ebpf::programs::xdp::XdpContext::ingress_ifindex(&self) -> usize pub fn aya_ebpf::programs::xdp::XdpContext::metadata(&self) -> usize pub fn aya_ebpf::programs::xdp::XdpContext::metadata_end(&self) -> usize -pub fn aya_ebpf::programs::xdp::XdpContext::new(ctx: *mut aya_ebpf_bindings::x86_64::bindings::xdp_md) -> aya_ebpf::programs::xdp::XdpContext +pub fn aya_ebpf::programs::xdp::XdpContext::new(ctx: *mut aya_ebpf_bindings::x86_64::bindings::xdp_md) -> Self +pub fn aya_ebpf::programs::xdp::XdpContext::rx_queue_index(&self) -> u32 impl aya_ebpf::EbpfContext for aya_ebpf::programs::xdp::XdpContext pub fn aya_ebpf::programs::xdp::XdpContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::xdp::XdpContext @@ -2034,18 +2281,18 @@ pub fn aya_ebpf::programs::xdp::XdpContext::try_from(value: U) -> core::result:: impl core::convert::TryInto for aya_ebpf::programs::xdp::XdpContext where U: core::convert::TryFrom pub type aya_ebpf::programs::xdp::XdpContext::Error = >::Error pub fn aya_ebpf::programs::xdp::XdpContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::xdp::XdpContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::xdp::XdpContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::xdp::XdpContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::xdp::XdpContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::xdp::XdpContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::xdp::XdpContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::xdp::XdpContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::xdp::XdpContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::xdp::XdpContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::xdp::XdpContext pub fn aya_ebpf::programs::xdp::XdpContext::from(t: T) -> T pub struct aya_ebpf::programs::BtfTracePointContext impl aya_ebpf::programs::tp_btf::BtfTracePointContext -pub unsafe fn aya_ebpf::programs::tp_btf::BtfTracePointContext::arg(&self, n: usize) -> T -pub fn aya_ebpf::programs::tp_btf::BtfTracePointContext::new(ctx: *mut core::ffi::c_void) -> aya_ebpf::programs::tp_btf::BtfTracePointContext +pub fn aya_ebpf::programs::tp_btf::BtfTracePointContext::arg(&self, n: usize) -> T +pub fn aya_ebpf::programs::tp_btf::BtfTracePointContext::new(ctx: *mut core::ffi::c_void) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::tp_btf::BtfTracePointContext pub fn aya_ebpf::programs::tp_btf::BtfTracePointContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::tp_btf::BtfTracePointContext @@ -2062,18 +2309,18 @@ pub fn aya_ebpf::programs::tp_btf::BtfTracePointContext::try_from(value: U) -> c impl core::convert::TryInto for aya_ebpf::programs::tp_btf::BtfTracePointContext where U: core::convert::TryFrom pub type aya_ebpf::programs::tp_btf::BtfTracePointContext::Error = >::Error pub fn aya_ebpf::programs::tp_btf::BtfTracePointContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::tp_btf::BtfTracePointContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::tp_btf::BtfTracePointContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::tp_btf::BtfTracePointContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::tp_btf::BtfTracePointContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::tp_btf::BtfTracePointContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::tp_btf::BtfTracePointContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::tp_btf::BtfTracePointContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::tp_btf::BtfTracePointContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::tp_btf::BtfTracePointContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::tp_btf::BtfTracePointContext pub fn aya_ebpf::programs::tp_btf::BtfTracePointContext::from(t: T) -> T pub struct aya_ebpf::programs::DeviceContext pub aya_ebpf::programs::DeviceContext::device: *mut aya_ebpf_bindings::x86_64::bindings::bpf_cgroup_dev_ctx impl aya_ebpf::programs::device::DeviceContext -pub fn aya_ebpf::programs::device::DeviceContext::new(device: *mut aya_ebpf_bindings::x86_64::bindings::bpf_cgroup_dev_ctx) -> aya_ebpf::programs::device::DeviceContext +pub fn aya_ebpf::programs::device::DeviceContext::new(device: *mut aya_ebpf_bindings::x86_64::bindings::bpf_cgroup_dev_ctx) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::device::DeviceContext pub fn aya_ebpf::programs::device::DeviceContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::device::DeviceContext @@ -2090,18 +2337,18 @@ pub fn aya_ebpf::programs::device::DeviceContext::try_from(value: U) -> core::re impl core::convert::TryInto for aya_ebpf::programs::device::DeviceContext where U: core::convert::TryFrom pub type aya_ebpf::programs::device::DeviceContext::Error = >::Error pub fn aya_ebpf::programs::device::DeviceContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::device::DeviceContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::device::DeviceContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::device::DeviceContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::device::DeviceContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::device::DeviceContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::device::DeviceContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::device::DeviceContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::device::DeviceContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::device::DeviceContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::device::DeviceContext pub fn aya_ebpf::programs::device::DeviceContext::from(t: T) -> T pub struct aya_ebpf::programs::FEntryContext impl aya_ebpf::programs::fentry::FEntryContext -pub unsafe fn aya_ebpf::programs::fentry::FEntryContext::arg(&self, n: usize) -> T -pub fn aya_ebpf::programs::fentry::FEntryContext::new(ctx: *mut core::ffi::c_void) -> aya_ebpf::programs::fentry::FEntryContext +pub fn aya_ebpf::programs::fentry::FEntryContext::arg(&self, n: usize) -> T +pub fn aya_ebpf::programs::fentry::FEntryContext::new(ctx: *mut core::ffi::c_void) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::fentry::FEntryContext pub fn aya_ebpf::programs::fentry::FEntryContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::fentry::FEntryContext @@ -2118,18 +2365,18 @@ pub fn aya_ebpf::programs::fentry::FEntryContext::try_from(value: U) -> core::re impl core::convert::TryInto for aya_ebpf::programs::fentry::FEntryContext where U: core::convert::TryFrom pub type aya_ebpf::programs::fentry::FEntryContext::Error = >::Error pub fn aya_ebpf::programs::fentry::FEntryContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::fentry::FEntryContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::fentry::FEntryContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::fentry::FEntryContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::fentry::FEntryContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::fentry::FEntryContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::fentry::FEntryContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::fentry::FEntryContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::fentry::FEntryContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::fentry::FEntryContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::fentry::FEntryContext pub fn aya_ebpf::programs::fentry::FEntryContext::from(t: T) -> T pub struct aya_ebpf::programs::FExitContext impl aya_ebpf::programs::fexit::FExitContext -pub unsafe fn aya_ebpf::programs::fexit::FExitContext::arg(&self, n: usize) -> T -pub fn aya_ebpf::programs::fexit::FExitContext::new(ctx: *mut core::ffi::c_void) -> aya_ebpf::programs::fexit::FExitContext +pub fn aya_ebpf::programs::fexit::FExitContext::arg(&self, n: usize) -> T +pub fn aya_ebpf::programs::fexit::FExitContext::new(ctx: *mut core::ffi::c_void) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::fexit::FExitContext pub fn aya_ebpf::programs::fexit::FExitContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::fexit::FExitContext @@ -2146,18 +2393,49 @@ pub fn aya_ebpf::programs::fexit::FExitContext::try_from(value: U) -> core::resu impl core::convert::TryInto for aya_ebpf::programs::fexit::FExitContext where U: core::convert::TryFrom pub type aya_ebpf::programs::fexit::FExitContext::Error = >::Error pub fn aya_ebpf::programs::fexit::FExitContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::fexit::FExitContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::fexit::FExitContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::fexit::FExitContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::fexit::FExitContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::fexit::FExitContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::fexit::FExitContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::fexit::FExitContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::fexit::FExitContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::fexit::FExitContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::fexit::FExitContext pub fn aya_ebpf::programs::fexit::FExitContext::from(t: T) -> T +pub struct aya_ebpf::programs::FlowDissectorContext +impl aya_ebpf::programs::flow_dissector::FlowDissectorContext +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::data(&self) -> usize +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::data_end(&self) -> usize +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::flow_keys(&mut self) -> &mut aya_ebpf_bindings::x86_64::bindings::bpf_flow_keys +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::load_bytes(&self, offset: usize, dst: &mut [u8]) -> core::result::Result +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::new(skb: *mut aya_ebpf_bindings::x86_64::bindings::__sk_buff) -> Self +impl aya_ebpf::EbpfContext for aya_ebpf::programs::flow_dissector::FlowDissectorContext +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::as_ptr(&self) -> *mut aya_ebpf_cty::c_void +impl core::marker::Freeze for aya_ebpf::programs::flow_dissector::FlowDissectorContext +impl !core::marker::Send for aya_ebpf::programs::flow_dissector::FlowDissectorContext +impl !core::marker::Sync for aya_ebpf::programs::flow_dissector::FlowDissectorContext +impl core::marker::Unpin for aya_ebpf::programs::flow_dissector::FlowDissectorContext +impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::programs::flow_dissector::FlowDissectorContext +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::programs::flow_dissector::FlowDissectorContext +impl core::convert::Into for aya_ebpf::programs::flow_dissector::FlowDissectorContext where U: core::convert::From +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::programs::flow_dissector::FlowDissectorContext where U: core::convert::Into +pub type aya_ebpf::programs::flow_dissector::FlowDissectorContext::Error = core::convert::Infallible +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::programs::flow_dissector::FlowDissectorContext where U: core::convert::TryFrom +pub type aya_ebpf::programs::flow_dissector::FlowDissectorContext::Error = >::Error +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::programs::flow_dissector::FlowDissectorContext where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::programs::flow_dissector::FlowDissectorContext where T: ?core::marker::Sized +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::programs::flow_dissector::FlowDissectorContext where T: ?core::marker::Sized +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::programs::flow_dissector::FlowDissectorContext +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::from(t: T) -> T pub struct aya_ebpf::programs::LsmContext impl aya_ebpf::programs::lsm::LsmContext -pub unsafe fn aya_ebpf::programs::lsm::LsmContext::arg(&self, n: usize) -> T -pub fn aya_ebpf::programs::lsm::LsmContext::new(ctx: *mut core::ffi::c_void) -> aya_ebpf::programs::lsm::LsmContext +pub fn aya_ebpf::programs::lsm::LsmContext::arg(&self, n: usize) -> T +pub fn aya_ebpf::programs::lsm::LsmContext::new(ctx: *mut core::ffi::c_void) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::lsm::LsmContext pub fn aya_ebpf::programs::lsm::LsmContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::lsm::LsmContext @@ -2174,17 +2452,17 @@ pub fn aya_ebpf::programs::lsm::LsmContext::try_from(value: U) -> core::result:: impl core::convert::TryInto for aya_ebpf::programs::lsm::LsmContext where U: core::convert::TryFrom pub type aya_ebpf::programs::lsm::LsmContext::Error = >::Error pub fn aya_ebpf::programs::lsm::LsmContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::lsm::LsmContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::lsm::LsmContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::lsm::LsmContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::lsm::LsmContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::lsm::LsmContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::lsm::LsmContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::lsm::LsmContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::lsm::LsmContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::lsm::LsmContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::lsm::LsmContext pub fn aya_ebpf::programs::lsm::LsmContext::from(t: T) -> T pub struct aya_ebpf::programs::PerfEventContext impl aya_ebpf::programs::perf_event::PerfEventContext -pub fn aya_ebpf::programs::perf_event::PerfEventContext::new(ctx: *mut core::ffi::c_void) -> aya_ebpf::programs::perf_event::PerfEventContext +pub fn aya_ebpf::programs::perf_event::PerfEventContext::new(ctx: *mut core::ffi::c_void) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::perf_event::PerfEventContext pub fn aya_ebpf::programs::perf_event::PerfEventContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::perf_event::PerfEventContext @@ -2201,19 +2479,19 @@ pub fn aya_ebpf::programs::perf_event::PerfEventContext::try_from(value: U) -> c impl core::convert::TryInto for aya_ebpf::programs::perf_event::PerfEventContext where U: core::convert::TryFrom pub type aya_ebpf::programs::perf_event::PerfEventContext::Error = >::Error pub fn aya_ebpf::programs::perf_event::PerfEventContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::perf_event::PerfEventContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::perf_event::PerfEventContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::perf_event::PerfEventContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::perf_event::PerfEventContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::perf_event::PerfEventContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::perf_event::PerfEventContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::perf_event::PerfEventContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::perf_event::PerfEventContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::perf_event::PerfEventContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::perf_event::PerfEventContext pub fn aya_ebpf::programs::perf_event::PerfEventContext::from(t: T) -> T pub struct aya_ebpf::programs::ProbeContext pub aya_ebpf::programs::ProbeContext::regs: *mut aya_ebpf_bindings::x86_64::bindings::pt_regs impl aya_ebpf::programs::probe::ProbeContext -pub fn aya_ebpf::programs::probe::ProbeContext::arg(&self, n: usize) -> core::option::Option -pub fn aya_ebpf::programs::probe::ProbeContext::new(ctx: *mut core::ffi::c_void) -> aya_ebpf::programs::probe::ProbeContext +pub fn aya_ebpf::programs::probe::ProbeContext::arg(&self, n: usize) -> core::option::Option +pub fn aya_ebpf::programs::probe::ProbeContext::new(ctx: *mut core::ffi::c_void) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::probe::ProbeContext pub fn aya_ebpf::programs::probe::ProbeContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::probe::ProbeContext @@ -2230,17 +2508,18 @@ pub fn aya_ebpf::programs::probe::ProbeContext::try_from(value: U) -> core::resu impl core::convert::TryInto for aya_ebpf::programs::probe::ProbeContext where U: core::convert::TryFrom pub type aya_ebpf::programs::probe::ProbeContext::Error = >::Error pub fn aya_ebpf::programs::probe::ProbeContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::probe::ProbeContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::probe::ProbeContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::probe::ProbeContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::probe::ProbeContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::probe::ProbeContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::probe::ProbeContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::probe::ProbeContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::probe::ProbeContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::probe::ProbeContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::probe::ProbeContext pub fn aya_ebpf::programs::probe::ProbeContext::from(t: T) -> T pub struct aya_ebpf::programs::RawTracePointContext impl aya_ebpf::programs::raw_tracepoint::RawTracePointContext -pub fn aya_ebpf::programs::raw_tracepoint::RawTracePointContext::new(ctx: *mut core::ffi::c_void) -> aya_ebpf::programs::raw_tracepoint::RawTracePointContext +pub fn aya_ebpf::programs::raw_tracepoint::RawTracePointContext::arg(&self, n: usize) -> T +pub fn aya_ebpf::programs::raw_tracepoint::RawTracePointContext::new(ctx: *mut core::ffi::c_void) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::raw_tracepoint::RawTracePointContext pub fn aya_ebpf::programs::raw_tracepoint::RawTracePointContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::raw_tracepoint::RawTracePointContext @@ -2257,19 +2536,19 @@ pub fn aya_ebpf::programs::raw_tracepoint::RawTracePointContext::try_from(value: impl core::convert::TryInto for aya_ebpf::programs::raw_tracepoint::RawTracePointContext where U: core::convert::TryFrom pub type aya_ebpf::programs::raw_tracepoint::RawTracePointContext::Error = >::Error pub fn aya_ebpf::programs::raw_tracepoint::RawTracePointContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::raw_tracepoint::RawTracePointContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::raw_tracepoint::RawTracePointContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::raw_tracepoint::RawTracePointContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::raw_tracepoint::RawTracePointContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::raw_tracepoint::RawTracePointContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::raw_tracepoint::RawTracePointContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::raw_tracepoint::RawTracePointContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::raw_tracepoint::RawTracePointContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::raw_tracepoint::RawTracePointContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::raw_tracepoint::RawTracePointContext pub fn aya_ebpf::programs::raw_tracepoint::RawTracePointContext::from(t: T) -> T pub struct aya_ebpf::programs::RetProbeContext pub aya_ebpf::programs::RetProbeContext::regs: *mut aya_ebpf_bindings::x86_64::bindings::pt_regs impl aya_ebpf::programs::retprobe::RetProbeContext -pub fn aya_ebpf::programs::retprobe::RetProbeContext::new(ctx: *mut core::ffi::c_void) -> aya_ebpf::programs::retprobe::RetProbeContext -pub fn aya_ebpf::programs::retprobe::RetProbeContext::ret(&self) -> core::option::Option +pub fn aya_ebpf::programs::retprobe::RetProbeContext::new(ctx: *mut core::ffi::c_void) -> Self +pub fn aya_ebpf::programs::retprobe::RetProbeContext::ret(&self) -> T impl aya_ebpf::EbpfContext for aya_ebpf::programs::retprobe::RetProbeContext pub fn aya_ebpf::programs::retprobe::RetProbeContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::retprobe::RetProbeContext @@ -2286,11 +2565,11 @@ pub fn aya_ebpf::programs::retprobe::RetProbeContext::try_from(value: U) -> core impl core::convert::TryInto for aya_ebpf::programs::retprobe::RetProbeContext where U: core::convert::TryFrom pub type aya_ebpf::programs::retprobe::RetProbeContext::Error = >::Error pub fn aya_ebpf::programs::retprobe::RetProbeContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::retprobe::RetProbeContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::retprobe::RetProbeContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::retprobe::RetProbeContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::retprobe::RetProbeContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::retprobe::RetProbeContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::retprobe::RetProbeContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::retprobe::RetProbeContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::retprobe::RetProbeContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::retprobe::RetProbeContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::retprobe::RetProbeContext pub fn aya_ebpf::programs::retprobe::RetProbeContext::from(t: T) -> T @@ -2308,7 +2587,7 @@ pub fn aya_ebpf::programs::sk_buff::SkBuffContext::l4_csum_replace(&self, offset pub fn aya_ebpf::programs::sk_buff::SkBuffContext::len(&self) -> u32 pub fn aya_ebpf::programs::sk_buff::SkBuffContext::load(&self, offset: usize) -> core::result::Result pub fn aya_ebpf::programs::sk_buff::SkBuffContext::load_bytes(&self, offset: usize, dst: &mut [u8]) -> core::result::Result -pub fn aya_ebpf::programs::sk_buff::SkBuffContext::new(skb: *mut aya_ebpf_bindings::x86_64::bindings::__sk_buff) -> aya_ebpf::programs::sk_buff::SkBuffContext +pub fn aya_ebpf::programs::sk_buff::SkBuffContext::new(skb: *mut aya_ebpf_bindings::x86_64::bindings::__sk_buff) -> Self pub fn aya_ebpf::programs::sk_buff::SkBuffContext::pull_data(&self, len: u32) -> core::result::Result<(), aya_ebpf_cty::od::c_long> pub fn aya_ebpf::programs::sk_buff::SkBuffContext::set_mark(&mut self, mark: u32) pub fn aya_ebpf::programs::sk_buff::SkBuffContext::store(&mut self, offset: usize, v: &T, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> @@ -2328,18 +2607,18 @@ pub fn aya_ebpf::programs::sk_buff::SkBuffContext::try_from(value: U) -> core::r impl core::convert::TryInto for aya_ebpf::programs::sk_buff::SkBuffContext where U: core::convert::TryFrom pub type aya_ebpf::programs::sk_buff::SkBuffContext::Error = >::Error pub fn aya_ebpf::programs::sk_buff::SkBuffContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::sk_buff::SkBuffContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::sk_buff::SkBuffContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::sk_buff::SkBuffContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::sk_buff::SkBuffContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::sk_buff::SkBuffContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sk_buff::SkBuffContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::sk_buff::SkBuffContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::sk_buff::SkBuffContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sk_buff::SkBuffContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::sk_buff::SkBuffContext pub fn aya_ebpf::programs::sk_buff::SkBuffContext::from(t: T) -> T pub struct aya_ebpf::programs::SkLookupContext pub aya_ebpf::programs::SkLookupContext::lookup: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sk_lookup impl aya_ebpf::programs::sk_lookup::SkLookupContext -pub fn aya_ebpf::programs::sk_lookup::SkLookupContext::new(lookup: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sk_lookup) -> aya_ebpf::programs::sk_lookup::SkLookupContext +pub fn aya_ebpf::programs::sk_lookup::SkLookupContext::new(lookup: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sk_lookup) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::sk_lookup::SkLookupContext pub fn aya_ebpf::programs::sk_lookup::SkLookupContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::sk_lookup::SkLookupContext @@ -2356,11 +2635,11 @@ pub fn aya_ebpf::programs::sk_lookup::SkLookupContext::try_from(value: U) -> cor impl core::convert::TryInto for aya_ebpf::programs::sk_lookup::SkLookupContext where U: core::convert::TryFrom pub type aya_ebpf::programs::sk_lookup::SkLookupContext::Error = >::Error pub fn aya_ebpf::programs::sk_lookup::SkLookupContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::sk_lookup::SkLookupContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::sk_lookup::SkLookupContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::sk_lookup::SkLookupContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::sk_lookup::SkLookupContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::sk_lookup::SkLookupContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sk_lookup::SkLookupContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::sk_lookup::SkLookupContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::sk_lookup::SkLookupContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sk_lookup::SkLookupContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::sk_lookup::SkLookupContext pub fn aya_ebpf::programs::sk_lookup::SkLookupContext::from(t: T) -> T @@ -2369,7 +2648,7 @@ pub aya_ebpf::programs::SkMsgContext::msg: *mut aya_ebpf_bindings::x86_64::bindi impl aya_ebpf::programs::sk_msg::SkMsgContext pub fn aya_ebpf::programs::sk_msg::SkMsgContext::data(&self) -> usize pub fn aya_ebpf::programs::sk_msg::SkMsgContext::data_end(&self) -> usize -pub fn aya_ebpf::programs::sk_msg::SkMsgContext::new(msg: *mut aya_ebpf_bindings::x86_64::bindings::sk_msg_md) -> aya_ebpf::programs::sk_msg::SkMsgContext +pub fn aya_ebpf::programs::sk_msg::SkMsgContext::new(msg: *mut aya_ebpf_bindings::x86_64::bindings::sk_msg_md) -> Self pub fn aya_ebpf::programs::sk_msg::SkMsgContext::pop_data(&self, start: u32, len: u32, flags: u64) -> core::result::Result<(), i64> pub fn aya_ebpf::programs::sk_msg::SkMsgContext::push_data(&self, start: u32, len: u32, flags: u64) -> core::result::Result<(), i64> pub fn aya_ebpf::programs::sk_msg::SkMsgContext::size(&self) -> u32 @@ -2389,18 +2668,18 @@ pub fn aya_ebpf::programs::sk_msg::SkMsgContext::try_from(value: U) -> core::res impl core::convert::TryInto for aya_ebpf::programs::sk_msg::SkMsgContext where U: core::convert::TryFrom pub type aya_ebpf::programs::sk_msg::SkMsgContext::Error = >::Error pub fn aya_ebpf::programs::sk_msg::SkMsgContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::sk_msg::SkMsgContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::sk_msg::SkMsgContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::sk_msg::SkMsgContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::sk_msg::SkMsgContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::sk_msg::SkMsgContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sk_msg::SkMsgContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::sk_msg::SkMsgContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::sk_msg::SkMsgContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sk_msg::SkMsgContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::sk_msg::SkMsgContext pub fn aya_ebpf::programs::sk_msg::SkMsgContext::from(t: T) -> T pub struct aya_ebpf::programs::SockAddrContext pub aya_ebpf::programs::SockAddrContext::sock_addr: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sock_addr impl aya_ebpf::programs::sock_addr::SockAddrContext -pub fn aya_ebpf::programs::sock_addr::SockAddrContext::new(sock_addr: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sock_addr) -> aya_ebpf::programs::sock_addr::SockAddrContext +pub fn aya_ebpf::programs::sock_addr::SockAddrContext::new(sock_addr: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sock_addr) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::sock_addr::SockAddrContext pub fn aya_ebpf::programs::sock_addr::SockAddrContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::sock_addr::SockAddrContext @@ -2417,18 +2696,18 @@ pub fn aya_ebpf::programs::sock_addr::SockAddrContext::try_from(value: U) -> cor impl core::convert::TryInto for aya_ebpf::programs::sock_addr::SockAddrContext where U: core::convert::TryFrom pub type aya_ebpf::programs::sock_addr::SockAddrContext::Error = >::Error pub fn aya_ebpf::programs::sock_addr::SockAddrContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::sock_addr::SockAddrContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::sock_addr::SockAddrContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::sock_addr::SockAddrContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::sock_addr::SockAddrContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::sock_addr::SockAddrContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sock_addr::SockAddrContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::sock_addr::SockAddrContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::sock_addr::SockAddrContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sock_addr::SockAddrContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::sock_addr::SockAddrContext pub fn aya_ebpf::programs::sock_addr::SockAddrContext::from(t: T) -> T pub struct aya_ebpf::programs::SockContext pub aya_ebpf::programs::SockContext::sock: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sock impl aya_ebpf::programs::sock::SockContext -pub fn aya_ebpf::programs::sock::SockContext::new(sock: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sock) -> aya_ebpf::programs::sock::SockContext +pub fn aya_ebpf::programs::sock::SockContext::new(sock: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sock) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::sock::SockContext pub fn aya_ebpf::programs::sock::SockContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::sock::SockContext @@ -2445,11 +2724,11 @@ pub fn aya_ebpf::programs::sock::SockContext::try_from(value: U) -> core::result impl core::convert::TryInto for aya_ebpf::programs::sock::SockContext where U: core::convert::TryFrom pub type aya_ebpf::programs::sock::SockContext::Error = >::Error pub fn aya_ebpf::programs::sock::SockContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::sock::SockContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::sock::SockContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::sock::SockContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::sock::SockContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::sock::SockContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sock::SockContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::sock::SockContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::sock::SockContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sock::SockContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::sock::SockContext pub fn aya_ebpf::programs::sock::SockContext::from(t: T) -> T @@ -2462,12 +2741,13 @@ pub fn aya_ebpf::programs::sock_ops::SockOpsContext::family(&self) -> u32 pub fn aya_ebpf::programs::sock_ops::SockOpsContext::local_ip4(&self) -> u32 pub fn aya_ebpf::programs::sock_ops::SockOpsContext::local_ip6(&self) -> [u32; 4] pub fn aya_ebpf::programs::sock_ops::SockOpsContext::local_port(&self) -> u32 -pub fn aya_ebpf::programs::sock_ops::SockOpsContext::new(ops: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sock_ops) -> aya_ebpf::programs::sock_ops::SockOpsContext +pub fn aya_ebpf::programs::sock_ops::SockOpsContext::new(ops: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sock_ops) -> Self pub fn aya_ebpf::programs::sock_ops::SockOpsContext::op(&self) -> u32 pub fn aya_ebpf::programs::sock_ops::SockOpsContext::remote_ip4(&self) -> u32 pub fn aya_ebpf::programs::sock_ops::SockOpsContext::remote_ip6(&self) -> [u32; 4] pub fn aya_ebpf::programs::sock_ops::SockOpsContext::remote_port(&self) -> u32 pub fn aya_ebpf::programs::sock_ops::SockOpsContext::set_cb_flags(&self, flags: i32) -> core::result::Result<(), i64> +pub fn aya_ebpf::programs::sock_ops::SockOpsContext::set_reply(&mut self, reply: u32) impl aya_ebpf::EbpfContext for aya_ebpf::programs::sock_ops::SockOpsContext pub fn aya_ebpf::programs::sock_ops::SockOpsContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::sock_ops::SockOpsContext @@ -2484,18 +2764,18 @@ pub fn aya_ebpf::programs::sock_ops::SockOpsContext::try_from(value: U) -> core: impl core::convert::TryInto for aya_ebpf::programs::sock_ops::SockOpsContext where U: core::convert::TryFrom pub type aya_ebpf::programs::sock_ops::SockOpsContext::Error = >::Error pub fn aya_ebpf::programs::sock_ops::SockOpsContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::sock_ops::SockOpsContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::sock_ops::SockOpsContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::sock_ops::SockOpsContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::sock_ops::SockOpsContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::sock_ops::SockOpsContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sock_ops::SockOpsContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::sock_ops::SockOpsContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::sock_ops::SockOpsContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sock_ops::SockOpsContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::sock_ops::SockOpsContext pub fn aya_ebpf::programs::sock_ops::SockOpsContext::from(t: T) -> T pub struct aya_ebpf::programs::SockoptContext pub aya_ebpf::programs::SockoptContext::sockopt: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sockopt impl aya_ebpf::programs::sockopt::SockoptContext -pub fn aya_ebpf::programs::sockopt::SockoptContext::new(sockopt: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sockopt) -> aya_ebpf::programs::sockopt::SockoptContext +pub fn aya_ebpf::programs::sockopt::SockoptContext::new(sockopt: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sockopt) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::sockopt::SockoptContext pub fn aya_ebpf::programs::sockopt::SockoptContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::sockopt::SockoptContext @@ -2512,18 +2792,18 @@ pub fn aya_ebpf::programs::sockopt::SockoptContext::try_from(value: U) -> core:: impl core::convert::TryInto for aya_ebpf::programs::sockopt::SockoptContext where U: core::convert::TryFrom pub type aya_ebpf::programs::sockopt::SockoptContext::Error = >::Error pub fn aya_ebpf::programs::sockopt::SockoptContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::sockopt::SockoptContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::sockopt::SockoptContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::sockopt::SockoptContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::sockopt::SockoptContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::sockopt::SockoptContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sockopt::SockoptContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::sockopt::SockoptContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::sockopt::SockoptContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sockopt::SockoptContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::sockopt::SockoptContext pub fn aya_ebpf::programs::sockopt::SockoptContext::from(t: T) -> T pub struct aya_ebpf::programs::SysctlContext pub aya_ebpf::programs::SysctlContext::sysctl: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sysctl impl aya_ebpf::programs::sysctl::SysctlContext -pub fn aya_ebpf::programs::sysctl::SysctlContext::new(sysctl: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sysctl) -> aya_ebpf::programs::sysctl::SysctlContext +pub fn aya_ebpf::programs::sysctl::SysctlContext::new(sysctl: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sysctl) -> Self impl aya_ebpf::EbpfContext for aya_ebpf::programs::sysctl::SysctlContext pub fn aya_ebpf::programs::sysctl::SysctlContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::sysctl::SysctlContext @@ -2540,11 +2820,11 @@ pub fn aya_ebpf::programs::sysctl::SysctlContext::try_from(value: U) -> core::re impl core::convert::TryInto for aya_ebpf::programs::sysctl::SysctlContext where U: core::convert::TryFrom pub type aya_ebpf::programs::sysctl::SysctlContext::Error = >::Error pub fn aya_ebpf::programs::sysctl::SysctlContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::sysctl::SysctlContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::sysctl::SysctlContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::sysctl::SysctlContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::sysctl::SysctlContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::sysctl::SysctlContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sysctl::SysctlContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::sysctl::SysctlContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::sysctl::SysctlContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::sysctl::SysctlContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::sysctl::SysctlContext pub fn aya_ebpf::programs::sysctl::SysctlContext::from(t: T) -> T @@ -2565,7 +2845,7 @@ pub fn aya_ebpf::programs::tc::TcContext::l4_csum_replace(&self, offset: usize, pub fn aya_ebpf::programs::tc::TcContext::len(&self) -> u32 pub fn aya_ebpf::programs::tc::TcContext::load(&self, offset: usize) -> core::result::Result pub fn aya_ebpf::programs::tc::TcContext::load_bytes(&self, offset: usize, dst: &mut [u8]) -> core::result::Result -pub fn aya_ebpf::programs::tc::TcContext::new(skb: *mut aya_ebpf_bindings::x86_64::bindings::__sk_buff) -> aya_ebpf::programs::tc::TcContext +pub fn aya_ebpf::programs::tc::TcContext::new(skb: *mut aya_ebpf_bindings::x86_64::bindings::__sk_buff) -> Self pub fn aya_ebpf::programs::tc::TcContext::pull_data(&self, len: u32) -> core::result::Result<(), aya_ebpf_cty::od::c_long> pub fn aya_ebpf::programs::tc::TcContext::set_mark(&mut self, mark: u32) pub fn aya_ebpf::programs::tc::TcContext::store(&mut self, offset: usize, v: &T, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> @@ -2585,17 +2865,17 @@ pub fn aya_ebpf::programs::tc::TcContext::try_from(value: U) -> core::result::Re impl core::convert::TryInto for aya_ebpf::programs::tc::TcContext where U: core::convert::TryFrom pub type aya_ebpf::programs::tc::TcContext::Error = >::Error pub fn aya_ebpf::programs::tc::TcContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::tc::TcContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::tc::TcContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::tc::TcContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::tc::TcContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::tc::TcContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::tc::TcContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::tc::TcContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::tc::TcContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::tc::TcContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::tc::TcContext pub fn aya_ebpf::programs::tc::TcContext::from(t: T) -> T pub struct aya_ebpf::programs::TracePointContext impl aya_ebpf::programs::tracepoint::TracePointContext -pub fn aya_ebpf::programs::tracepoint::TracePointContext::new(ctx: *mut core::ffi::c_void) -> aya_ebpf::programs::tracepoint::TracePointContext +pub fn aya_ebpf::programs::tracepoint::TracePointContext::new(ctx: *mut core::ffi::c_void) -> Self pub unsafe fn aya_ebpf::programs::tracepoint::TracePointContext::read_at(&self, offset: usize) -> core::result::Result impl aya_ebpf::EbpfContext for aya_ebpf::programs::tracepoint::TracePointContext pub fn aya_ebpf::programs::tracepoint::TracePointContext::as_ptr(&self) -> *mut core::ffi::c_void @@ -2613,11 +2893,11 @@ pub fn aya_ebpf::programs::tracepoint::TracePointContext::try_from(value: U) -> impl core::convert::TryInto for aya_ebpf::programs::tracepoint::TracePointContext where U: core::convert::TryFrom pub type aya_ebpf::programs::tracepoint::TracePointContext::Error = >::Error pub fn aya_ebpf::programs::tracepoint::TracePointContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::tracepoint::TracePointContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::tracepoint::TracePointContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::tracepoint::TracePointContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::tracepoint::TracePointContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::tracepoint::TracePointContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::tracepoint::TracePointContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::tracepoint::TracePointContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::tracepoint::TracePointContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::tracepoint::TracePointContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::tracepoint::TracePointContext pub fn aya_ebpf::programs::tracepoint::TracePointContext::from(t: T) -> T @@ -2626,9 +2906,11 @@ pub aya_ebpf::programs::XdpContext::ctx: *mut aya_ebpf_bindings::x86_64::binding impl aya_ebpf::programs::xdp::XdpContext pub fn aya_ebpf::programs::xdp::XdpContext::data(&self) -> usize pub fn aya_ebpf::programs::xdp::XdpContext::data_end(&self) -> usize +pub fn aya_ebpf::programs::xdp::XdpContext::ingress_ifindex(&self) -> usize pub fn aya_ebpf::programs::xdp::XdpContext::metadata(&self) -> usize pub fn aya_ebpf::programs::xdp::XdpContext::metadata_end(&self) -> usize -pub fn aya_ebpf::programs::xdp::XdpContext::new(ctx: *mut aya_ebpf_bindings::x86_64::bindings::xdp_md) -> aya_ebpf::programs::xdp::XdpContext +pub fn aya_ebpf::programs::xdp::XdpContext::new(ctx: *mut aya_ebpf_bindings::x86_64::bindings::xdp_md) -> Self +pub fn aya_ebpf::programs::xdp::XdpContext::rx_queue_index(&self) -> u32 impl aya_ebpf::EbpfContext for aya_ebpf::programs::xdp::XdpContext pub fn aya_ebpf::programs::xdp::XdpContext::as_ptr(&self) -> *mut core::ffi::c_void impl core::marker::Freeze for aya_ebpf::programs::xdp::XdpContext @@ -2645,46 +2927,21 @@ pub fn aya_ebpf::programs::xdp::XdpContext::try_from(value: U) -> core::result:: impl core::convert::TryInto for aya_ebpf::programs::xdp::XdpContext where U: core::convert::TryFrom pub type aya_ebpf::programs::xdp::XdpContext::Error = >::Error pub fn aya_ebpf::programs::xdp::XdpContext::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::programs::xdp::XdpContext where T: 'static + core::marker::Sized +impl core::any::Any for aya_ebpf::programs::xdp::XdpContext where T: 'static + ?core::marker::Sized pub fn aya_ebpf::programs::xdp::XdpContext::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::programs::xdp::XdpContext where T: core::marker::Sized +impl core::borrow::Borrow for aya_ebpf::programs::xdp::XdpContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::xdp::XdpContext::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::programs::xdp::XdpContext where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_ebpf::programs::xdp::XdpContext where T: ?core::marker::Sized pub fn aya_ebpf::programs::xdp::XdpContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::xdp::XdpContext pub fn aya_ebpf::programs::xdp::XdpContext::from(t: T) -> T pub macro aya_ebpf::bpf_printk! -pub struct aya_ebpf::PtRegs -impl aya_ebpf::PtRegs -pub fn aya_ebpf::PtRegs::arg(&self, n: usize) -> core::option::Option -pub fn aya_ebpf::PtRegs::as_ptr(&self) -> *mut aya_ebpf_bindings::x86_64::bindings::pt_regs -pub fn aya_ebpf::PtRegs::new(regs: *mut aya_ebpf_bindings::x86_64::bindings::pt_regs) -> Self -pub fn aya_ebpf::PtRegs::ret(&self) -> core::option::Option -impl core::marker::Freeze for aya_ebpf::PtRegs -impl !core::marker::Send for aya_ebpf::PtRegs -impl !core::marker::Sync for aya_ebpf::PtRegs -impl core::marker::Unpin for aya_ebpf::PtRegs -impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::PtRegs -impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::PtRegs -impl core::convert::Into for aya_ebpf::PtRegs where U: core::convert::From -pub fn aya_ebpf::PtRegs::into(self) -> U -impl core::convert::TryFrom for aya_ebpf::PtRegs where U: core::convert::Into -pub type aya_ebpf::PtRegs::Error = core::convert::Infallible -pub fn aya_ebpf::PtRegs::try_from(value: U) -> core::result::Result>::Error> -impl core::convert::TryInto for aya_ebpf::PtRegs where U: core::convert::TryFrom -pub type aya_ebpf::PtRegs::Error = >::Error -pub fn aya_ebpf::PtRegs::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_ebpf::PtRegs where T: 'static + core::marker::Sized -pub fn aya_ebpf::PtRegs::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_ebpf::PtRegs where T: core::marker::Sized -pub fn aya_ebpf::PtRegs::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_ebpf::PtRegs where T: core::marker::Sized -pub fn aya_ebpf::PtRegs::borrow_mut(&mut self) -> &mut T -impl core::convert::From for aya_ebpf::PtRegs -pub fn aya_ebpf::PtRegs::from(t: T) -> T -pub const aya_ebpf::TASK_COMM_LEN: usize = 16usize +pub macro aya_ebpf::btf_map_def! +pub const aya_ebpf::TASK_COMM_LEN: usize +pub trait aya_ebpf::Argument: aya_ebpf::args::sealed::Argument +impl aya_ebpf::Argument for T pub trait aya_ebpf::EbpfContext -pub fn aya_ebpf::EbpfContext::as_ptr(&self) -> *mut core::ffi::c_void +pub fn aya_ebpf::EbpfContext::as_ptr(&self) -> *mut aya_ebpf_cty::c_void pub fn aya_ebpf::EbpfContext::command(&self) -> core::result::Result<[u8; 16], aya_ebpf_cty::od::c_long> pub fn aya_ebpf::EbpfContext::gid(&self) -> u32 pub fn aya_ebpf::EbpfContext::pid(&self) -> u32 @@ -2696,6 +2953,8 @@ impl aya_ebpf::EbpfContext for aya_ebpf::programs::fentry::FEntryContext pub fn aya_ebpf::programs::fentry::FEntryContext::as_ptr(&self) -> *mut core::ffi::c_void impl aya_ebpf::EbpfContext for aya_ebpf::programs::fexit::FExitContext pub fn aya_ebpf::programs::fexit::FExitContext::as_ptr(&self) -> *mut core::ffi::c_void +impl aya_ebpf::EbpfContext for aya_ebpf::programs::flow_dissector::FlowDissectorContext +pub fn aya_ebpf::programs::flow_dissector::FlowDissectorContext::as_ptr(&self) -> *mut aya_ebpf_cty::c_void impl aya_ebpf::EbpfContext for aya_ebpf::programs::lsm::LsmContext pub fn aya_ebpf::programs::lsm::LsmContext::as_ptr(&self) -> *mut core::ffi::c_void impl aya_ebpf::EbpfContext for aya_ebpf::programs::perf_event::PerfEventContext @@ -2731,5 +2990,3 @@ pub fn aya_ebpf::programs::tracepoint::TracePointContext::as_ptr(&self) -> *mut impl aya_ebpf::EbpfContext for aya_ebpf::programs::xdp::XdpContext pub fn aya_ebpf::programs::xdp::XdpContext::as_ptr(&self) -> *mut core::ffi::c_void pub fn aya_ebpf::check_bounds_signed(value: i64, lower: i64, upper: i64) -> bool -#[no_mangle] pub unsafe c fn aya_ebpf::memcpy(dest: *mut u8, src: *mut u8, n: usize) -#[no_mangle] pub unsafe c fn aya_ebpf::memset(s: *mut u8, c: aya_ebpf_cty::ad::c_int, n: usize) diff --git a/xtask/public-api/aya-log-common.txt b/xtask/public-api/aya-log-common.txt index 160f9400..7187da8e 100644 --- a/xtask/public-api/aya-log-common.txt +++ b/xtask/public-api/aya-log-common.txt @@ -1,61 +1,68 @@ pub mod aya_log_common -#[repr(u8)] pub enum aya_log_common::Argument -pub aya_log_common::Argument::ArrU16Len8 -pub aya_log_common::Argument::ArrU8Len16 -pub aya_log_common::Argument::ArrU8Len6 -pub aya_log_common::Argument::Bytes -pub aya_log_common::Argument::DisplayHint -pub aya_log_common::Argument::F32 -pub aya_log_common::Argument::F64 -pub aya_log_common::Argument::I16 -pub aya_log_common::Argument::I32 -pub aya_log_common::Argument::I64 -pub aya_log_common::Argument::I8 -pub aya_log_common::Argument::Isize -pub aya_log_common::Argument::Str -pub aya_log_common::Argument::U16 -pub aya_log_common::Argument::U32 -pub aya_log_common::Argument::U64 -pub aya_log_common::Argument::U8 -pub aya_log_common::Argument::Usize -impl core::clone::Clone for aya_log_common::Argument -pub fn aya_log_common::Argument::clone(&self) -> aya_log_common::Argument -impl core::convert::From for u8 -pub fn u8::from(enum_value: aya_log_common::Argument) -> Self -impl core::fmt::Debug for aya_log_common::Argument -pub fn aya_log_common::Argument::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl core::marker::Copy for aya_log_common::Argument -impl core::marker::Freeze for aya_log_common::Argument -impl core::marker::Send for aya_log_common::Argument -impl core::marker::Sync for aya_log_common::Argument -impl core::marker::Unpin for aya_log_common::Argument -impl core::panic::unwind_safe::RefUnwindSafe for aya_log_common::Argument -impl core::panic::unwind_safe::UnwindSafe for aya_log_common::Argument -impl core::convert::Into for aya_log_common::Argument where U: core::convert::From -pub fn aya_log_common::Argument::into(self) -> U -impl core::convert::TryFrom for aya_log_common::Argument where U: core::convert::Into -pub type aya_log_common::Argument::Error = core::convert::Infallible -pub fn aya_log_common::Argument::try_from(value: U) -> core::result::Result>::Error> -impl core::convert::TryInto for aya_log_common::Argument where U: core::convert::TryFrom -pub type aya_log_common::Argument::Error = >::Error -pub fn aya_log_common::Argument::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_log_common::Argument where T: 'static + core::marker::Sized -pub fn aya_log_common::Argument::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_log_common::Argument where T: core::marker::Sized -pub fn aya_log_common::Argument::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_log_common::Argument where T: core::marker::Sized -pub fn aya_log_common::Argument::borrow_mut(&mut self) -> &mut T -impl core::convert::From for aya_log_common::Argument -pub fn aya_log_common::Argument::from(t: T) -> T +#[repr(u8)] pub enum aya_log_common::ArgumentKind +pub aya_log_common::ArgumentKind::ArrU16Len8 +pub aya_log_common::ArgumentKind::ArrU8Len16 +pub aya_log_common::ArgumentKind::ArrU8Len4 +pub aya_log_common::ArgumentKind::ArrU8Len6 +pub aya_log_common::ArgumentKind::Bytes +pub aya_log_common::ArgumentKind::DisplayHint +pub aya_log_common::ArgumentKind::F32 +pub aya_log_common::ArgumentKind::F64 +pub aya_log_common::ArgumentKind::I16 +pub aya_log_common::ArgumentKind::I32 +pub aya_log_common::ArgumentKind::I64 +pub aya_log_common::ArgumentKind::I8 +pub aya_log_common::ArgumentKind::Ipv4Addr +pub aya_log_common::ArgumentKind::Ipv6Addr +pub aya_log_common::ArgumentKind::Isize +pub aya_log_common::ArgumentKind::Pointer +pub aya_log_common::ArgumentKind::Str +pub aya_log_common::ArgumentKind::U16 +pub aya_log_common::ArgumentKind::U32 +pub aya_log_common::ArgumentKind::U64 +pub aya_log_common::ArgumentKind::U8 +pub aya_log_common::ArgumentKind::Usize +impl core::clone::Clone for aya_log_common::ArgumentKind +pub fn aya_log_common::ArgumentKind::clone(&self) -> aya_log_common::ArgumentKind +impl core::convert::From for u8 +pub fn u8::from(enum_value: aya_log_common::ArgumentKind) -> Self +impl core::fmt::Debug for aya_log_common::ArgumentKind +pub fn aya_log_common::ArgumentKind::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Copy for aya_log_common::ArgumentKind +impl core::marker::Freeze for aya_log_common::ArgumentKind +impl core::marker::Send for aya_log_common::ArgumentKind +impl core::marker::Sync for aya_log_common::ArgumentKind +impl core::marker::Unpin for aya_log_common::ArgumentKind +impl core::panic::unwind_safe::RefUnwindSafe for aya_log_common::ArgumentKind +impl core::panic::unwind_safe::UnwindSafe for aya_log_common::ArgumentKind +impl core::convert::Into for aya_log_common::ArgumentKind where U: core::convert::From +pub fn aya_log_common::ArgumentKind::into(self) -> U +impl core::convert::TryFrom for aya_log_common::ArgumentKind where U: core::convert::Into +pub type aya_log_common::ArgumentKind::Error = core::convert::Infallible +pub fn aya_log_common::ArgumentKind::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_log_common::ArgumentKind where U: core::convert::TryFrom +pub type aya_log_common::ArgumentKind::Error = >::Error +pub fn aya_log_common::ArgumentKind::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_log_common::ArgumentKind where T: 'static + ?core::marker::Sized +pub fn aya_log_common::ArgumentKind::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_log_common::ArgumentKind where T: ?core::marker::Sized +pub fn aya_log_common::ArgumentKind::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_log_common::ArgumentKind where T: ?core::marker::Sized +pub fn aya_log_common::ArgumentKind::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_log_common::ArgumentKind where T: core::clone::Clone +pub unsafe fn aya_log_common::ArgumentKind::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_log_common::ArgumentKind +pub fn aya_log_common::ArgumentKind::from(t: T) -> T #[repr(u8)] pub enum aya_log_common::DisplayHint pub aya_log_common::DisplayHint::Default = 1 pub aya_log_common::DisplayHint::Ip pub aya_log_common::DisplayHint::LowerHex pub aya_log_common::DisplayHint::LowerMac +pub aya_log_common::DisplayHint::Pointer pub aya_log_common::DisplayHint::UpperHex pub aya_log_common::DisplayHint::UpperMac -impl aya_log_common::WriteToBuf for aya_log_common::DisplayHint -pub fn aya_log_common::DisplayHint::write(self, buf: &mut [u8]) -> core::option::Option +impl aya_log_common::Argument for aya_log_common::DisplayHint +pub fn aya_log_common::DisplayHint::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) impl core::clone::Clone for aya_log_common::DisplayHint pub fn aya_log_common::DisplayHint::clone(&self) -> aya_log_common::DisplayHint impl core::cmp::Eq for aya_log_common::DisplayHint @@ -81,12 +88,14 @@ pub fn aya_log_common::DisplayHint::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_log_common::DisplayHint where U: core::convert::TryFrom pub type aya_log_common::DisplayHint::Error = >::Error pub fn aya_log_common::DisplayHint::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_log_common::DisplayHint where T: 'static + core::marker::Sized +impl core::any::Any for aya_log_common::DisplayHint where T: 'static + ?core::marker::Sized pub fn aya_log_common::DisplayHint::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_log_common::DisplayHint where T: core::marker::Sized +impl core::borrow::Borrow for aya_log_common::DisplayHint where T: ?core::marker::Sized pub fn aya_log_common::DisplayHint::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_log_common::DisplayHint where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_log_common::DisplayHint where T: ?core::marker::Sized pub fn aya_log_common::DisplayHint::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_log_common::DisplayHint where T: core::clone::Clone +pub unsafe fn aya_log_common::DisplayHint::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_log_common::DisplayHint pub fn aya_log_common::DisplayHint::from(t: T) -> T #[repr(u8)] pub enum aya_log_common::Level @@ -122,56 +131,105 @@ pub fn aya_log_common::Level::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_log_common::Level where U: core::convert::TryFrom pub type aya_log_common::Level::Error = >::Error pub fn aya_log_common::Level::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_log_common::Level where T: 'static + core::marker::Sized +impl core::any::Any for aya_log_common::Level where T: 'static + ?core::marker::Sized pub fn aya_log_common::Level::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_log_common::Level where T: core::marker::Sized +impl core::borrow::Borrow for aya_log_common::Level where T: ?core::marker::Sized pub fn aya_log_common::Level::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_log_common::Level where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_log_common::Level where T: ?core::marker::Sized pub fn aya_log_common::Level::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_log_common::Level where T: core::clone::Clone +pub unsafe fn aya_log_common::Level::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_log_common::Level pub fn aya_log_common::Level::from(t: T) -> T -#[repr(u8)] pub enum aya_log_common::RecordField -pub aya_log_common::RecordField::File -pub aya_log_common::RecordField::Level -pub aya_log_common::RecordField::Line -pub aya_log_common::RecordField::Module -pub aya_log_common::RecordField::NumArgs -pub aya_log_common::RecordField::Target = 1 -impl core::clone::Clone for aya_log_common::RecordField -pub fn aya_log_common::RecordField::clone(&self) -> aya_log_common::RecordField -impl core::convert::From for u8 -pub fn u8::from(enum_value: aya_log_common::RecordField) -> Self -impl core::fmt::Debug for aya_log_common::RecordField -pub fn aya_log_common::RecordField::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl core::marker::Copy for aya_log_common::RecordField -impl core::marker::Freeze for aya_log_common::RecordField -impl core::marker::Send for aya_log_common::RecordField -impl core::marker::Sync for aya_log_common::RecordField -impl core::marker::Unpin for aya_log_common::RecordField -impl core::panic::unwind_safe::RefUnwindSafe for aya_log_common::RecordField -impl core::panic::unwind_safe::UnwindSafe for aya_log_common::RecordField -impl core::convert::Into for aya_log_common::RecordField where U: core::convert::From -pub fn aya_log_common::RecordField::into(self) -> U -impl core::convert::TryFrom for aya_log_common::RecordField where U: core::convert::Into -pub type aya_log_common::RecordField::Error = core::convert::Infallible -pub fn aya_log_common::RecordField::try_from(value: U) -> core::result::Result>::Error> -impl core::convert::TryInto for aya_log_common::RecordField where U: core::convert::TryFrom -pub type aya_log_common::RecordField::Error = >::Error -pub fn aya_log_common::RecordField::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_log_common::RecordField where T: 'static + core::marker::Sized -pub fn aya_log_common::RecordField::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_log_common::RecordField where T: core::marker::Sized -pub fn aya_log_common::RecordField::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_log_common::RecordField where T: core::marker::Sized -pub fn aya_log_common::RecordField::borrow_mut(&mut self) -> &mut T -impl core::convert::From for aya_log_common::RecordField -pub fn aya_log_common::RecordField::from(t: T) -> T -pub const aya_log_common::LOG_BUF_CAPACITY: usize = 8_192usize -pub const aya_log_common::LOG_FIELDS: usize = 6usize +#[repr(u8)] pub enum aya_log_common::RecordFieldKind +pub aya_log_common::RecordFieldKind::File +pub aya_log_common::RecordFieldKind::Level +pub aya_log_common::RecordFieldKind::Line +pub aya_log_common::RecordFieldKind::Module +pub aya_log_common::RecordFieldKind::NumArgs +pub aya_log_common::RecordFieldKind::Target +impl core::clone::Clone for aya_log_common::RecordFieldKind +pub fn aya_log_common::RecordFieldKind::clone(&self) -> aya_log_common::RecordFieldKind +impl core::convert::From for u8 +pub fn u8::from(enum_value: aya_log_common::RecordFieldKind) -> Self +impl core::fmt::Debug for aya_log_common::RecordFieldKind +pub fn aya_log_common::RecordFieldKind::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Copy for aya_log_common::RecordFieldKind +impl core::marker::Freeze for aya_log_common::RecordFieldKind +impl core::marker::Send for aya_log_common::RecordFieldKind +impl core::marker::Sync for aya_log_common::RecordFieldKind +impl core::marker::Unpin for aya_log_common::RecordFieldKind +impl core::panic::unwind_safe::RefUnwindSafe for aya_log_common::RecordFieldKind +impl core::panic::unwind_safe::UnwindSafe for aya_log_common::RecordFieldKind +impl core::convert::Into for aya_log_common::RecordFieldKind where U: core::convert::From +pub fn aya_log_common::RecordFieldKind::into(self) -> U +impl core::convert::TryFrom for aya_log_common::RecordFieldKind where U: core::convert::Into +pub type aya_log_common::RecordFieldKind::Error = core::convert::Infallible +pub fn aya_log_common::RecordFieldKind::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_log_common::RecordFieldKind where U: core::convert::TryFrom +pub type aya_log_common::RecordFieldKind::Error = >::Error +pub fn aya_log_common::RecordFieldKind::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_log_common::RecordFieldKind where T: 'static + ?core::marker::Sized +pub fn aya_log_common::RecordFieldKind::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_log_common::RecordFieldKind where T: ?core::marker::Sized +pub fn aya_log_common::RecordFieldKind::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_log_common::RecordFieldKind where T: ?core::marker::Sized +pub fn aya_log_common::RecordFieldKind::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_log_common::RecordFieldKind where T: core::clone::Clone +pub unsafe fn aya_log_common::RecordFieldKind::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_log_common::RecordFieldKind +pub fn aya_log_common::RecordFieldKind::from(t: T) -> T +pub trait aya_log_common::Argument: aya_log_common::sealed::Sealed +pub fn aya_log_common::Argument::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) +impl aya_log_common::Argument for &[u8] +pub fn &[u8]::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) +impl aya_log_common::Argument for &str +pub fn &str::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) +impl aya_log_common::Argument for aya_log_common::DisplayHint +pub fn aya_log_common::DisplayHint::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) +impl aya_log_common::Argument for core::net::ip_addr::IpAddr +pub fn core::net::ip_addr::IpAddr::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) +impl aya_log_common::Argument for core::net::ip_addr::Ipv4Addr +pub fn core::net::ip_addr::Ipv4Addr::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) +impl aya_log_common::Argument for core::net::ip_addr::Ipv6Addr +pub fn core::net::ip_addr::Ipv6Addr::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) +impl aya_log_common::Argument for f32 +pub fn f32::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) +impl aya_log_common::Argument for f64 +pub fn f64::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) +impl aya_log_common::Argument for i16 +pub fn i16::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) +impl aya_log_common::Argument for i32 +pub fn i32::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) +impl aya_log_common::Argument for i64 +pub fn i64::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) +impl aya_log_common::Argument for i8 +pub fn i8::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) +impl aya_log_common::Argument for isize +pub fn isize::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) +impl aya_log_common::Argument for u16 +pub fn u16::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) +impl aya_log_common::Argument for u32 +pub fn u32::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) +impl aya_log_common::Argument for u64 +pub fn u64::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) +impl aya_log_common::Argument for u8 +pub fn u8::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) +impl aya_log_common::Argument for usize +pub fn usize::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) +impl aya_log_common::Argument for *const T +pub fn *const T::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) +impl aya_log_common::Argument for *mut T +pub fn *mut T::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) +impl aya_log_common::Argument for [u8; N] +pub fn [u8; N]::as_argument(&self) -> (aya_log_common::ArgumentKind, impl core::convert::AsRef<[u8]>) pub trait aya_log_common::DefaultFormatter impl aya_log_common::DefaultFormatter for &str impl aya_log_common::DefaultFormatter for bool impl aya_log_common::DefaultFormatter for char +impl aya_log_common::DefaultFormatter for core::net::ip_addr::IpAddr +impl aya_log_common::DefaultFormatter for core::net::ip_addr::Ipv4Addr +impl aya_log_common::DefaultFormatter for core::net::ip_addr::Ipv6Addr impl aya_log_common::DefaultFormatter for f32 impl aya_log_common::DefaultFormatter for f64 impl aya_log_common::DefaultFormatter for i16 @@ -188,6 +246,10 @@ impl aya_log_common::DefaultFormatter for usize pub trait aya_log_common::IpFormatter impl aya_log_common::IpFormatter for [u16; 8] impl aya_log_common::IpFormatter for [u8; 16] +impl aya_log_common::IpFormatter for [u8; 4] +impl aya_log_common::IpFormatter for core::net::ip_addr::IpAddr +impl aya_log_common::IpFormatter for core::net::ip_addr::Ipv4Addr +impl aya_log_common::IpFormatter for core::net::ip_addr::Ipv6Addr impl aya_log_common::IpFormatter for u32 pub trait aya_log_common::LowerHexFormatter impl aya_log_common::LowerHexFormatter for &[u8] @@ -201,8 +263,12 @@ impl aya_log_common::LowerHexFormatter for u32 impl aya_log_common::LowerHexFormatter for u64 impl aya_log_common::LowerHexFormatter for u8 impl aya_log_common::LowerHexFormatter for usize +impl aya_log_common::LowerHexFormatter for &[u8; N] pub trait aya_log_common::LowerMacFormatter impl aya_log_common::LowerMacFormatter for [u8; 6] +pub trait aya_log_common::PointerFormatter +impl aya_log_common::PointerFormatter for *const T +impl aya_log_common::PointerFormatter for *mut T pub trait aya_log_common::UpperHexFormatter impl aya_log_common::UpperHexFormatter for &[u8] impl aya_log_common::UpperHexFormatter for i16 @@ -215,44 +281,7 @@ impl aya_log_common::UpperHexFormatter for u32 impl aya_log_common::UpperHexFormatter for u64 impl aya_log_common::UpperHexFormatter for u8 impl aya_log_common::UpperHexFormatter for usize +impl aya_log_common::UpperHexFormatter for &[u8; N] pub trait aya_log_common::UpperMacFormatter impl aya_log_common::UpperMacFormatter for [u8; 6] -pub trait aya_log_common::WriteToBuf -pub fn aya_log_common::WriteToBuf::write(self, buf: &mut [u8]) -> core::option::Option -impl aya_log_common::WriteToBuf for &[u8] -pub fn &[u8]::write(self, buf: &mut [u8]) -> core::option::Option -impl aya_log_common::WriteToBuf for &str -pub fn &str::write(self, buf: &mut [u8]) -> core::option::Option -impl aya_log_common::WriteToBuf for [u16; 8] -pub fn [u16; 8]::write(self, buf: &mut [u8]) -> core::option::Option -impl aya_log_common::WriteToBuf for [u8; 16] -pub fn [u8; 16]::write(self, buf: &mut [u8]) -> core::option::Option -impl aya_log_common::WriteToBuf for [u8; 6] -pub fn [u8; 6]::write(self, buf: &mut [u8]) -> core::option::Option -impl aya_log_common::WriteToBuf for aya_log_common::DisplayHint -pub fn aya_log_common::DisplayHint::write(self, buf: &mut [u8]) -> core::option::Option -impl aya_log_common::WriteToBuf for f32 -pub fn f32::write(self, buf: &mut [u8]) -> core::option::Option -impl aya_log_common::WriteToBuf for f64 -pub fn f64::write(self, buf: &mut [u8]) -> core::option::Option -impl aya_log_common::WriteToBuf for i16 -pub fn i16::write(self, buf: &mut [u8]) -> core::option::Option -impl aya_log_common::WriteToBuf for i32 -pub fn i32::write(self, buf: &mut [u8]) -> core::option::Option -impl aya_log_common::WriteToBuf for i64 -pub fn i64::write(self, buf: &mut [u8]) -> core::option::Option -impl aya_log_common::WriteToBuf for i8 -pub fn i8::write(self, buf: &mut [u8]) -> core::option::Option -impl aya_log_common::WriteToBuf for isize -pub fn isize::write(self, buf: &mut [u8]) -> core::option::Option -impl aya_log_common::WriteToBuf for u16 -pub fn u16::write(self, buf: &mut [u8]) -> core::option::Option -impl aya_log_common::WriteToBuf for u32 -pub fn u32::write(self, buf: &mut [u8]) -> core::option::Option -impl aya_log_common::WriteToBuf for u64 -pub fn u64::write(self, buf: &mut [u8]) -> core::option::Option -impl aya_log_common::WriteToBuf for u8 -pub fn u8::write(self, buf: &mut [u8]) -> core::option::Option -impl aya_log_common::WriteToBuf for usize -pub fn usize::write(self, buf: &mut [u8]) -> core::option::Option pub type aya_log_common::LogValueLength = u16 diff --git a/xtask/public-api/aya-log-ebpf.txt b/xtask/public-api/aya-log-ebpf.txt index a395e7f5..f28801c0 100644 --- a/xtask/public-api/aya-log-ebpf.txt +++ b/xtask/public-api/aya-log-ebpf.txt @@ -1,7 +1,4 @@ pub mod aya_log_ebpf -pub use aya_log_ebpf::LOG_BUF_CAPACITY -pub use aya_log_ebpf::Level -pub use aya_log_ebpf::WriteToBuf pub use aya_log_ebpf::debug pub use aya_log_ebpf::error pub use aya_log_ebpf::info diff --git a/xtask/public-api/aya-log-parser.txt b/xtask/public-api/aya-log-parser.txt index 61ea46f1..a5bae86d 100644 --- a/xtask/public-api/aya-log-parser.txt +++ b/xtask/public-api/aya-log-parser.txt @@ -28,12 +28,14 @@ impl alloc::borrow::ToOwned for aya_log_parser::Fragment where T: core::clone pub type aya_log_parser::Fragment::Owned = T pub fn aya_log_parser::Fragment::clone_into(&self, target: &mut T) pub fn aya_log_parser::Fragment::to_owned(&self) -> T -impl core::any::Any for aya_log_parser::Fragment where T: 'static + core::marker::Sized +impl core::any::Any for aya_log_parser::Fragment where T: 'static + ?core::marker::Sized pub fn aya_log_parser::Fragment::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_log_parser::Fragment where T: core::marker::Sized +impl core::borrow::Borrow for aya_log_parser::Fragment where T: ?core::marker::Sized pub fn aya_log_parser::Fragment::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_log_parser::Fragment where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_log_parser::Fragment where T: ?core::marker::Sized pub fn aya_log_parser::Fragment::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_log_parser::Fragment where T: core::clone::Clone +pub unsafe fn aya_log_parser::Fragment::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_log_parser::Fragment pub fn aya_log_parser::Fragment::from(t: T) -> T pub struct aya_log_parser::Parameter @@ -64,12 +66,14 @@ impl alloc::borrow::ToOwned for aya_log_parser::Parameter where T: core::clon pub type aya_log_parser::Parameter::Owned = T pub fn aya_log_parser::Parameter::clone_into(&self, target: &mut T) pub fn aya_log_parser::Parameter::to_owned(&self) -> T -impl core::any::Any for aya_log_parser::Parameter where T: 'static + core::marker::Sized +impl core::any::Any for aya_log_parser::Parameter where T: 'static + ?core::marker::Sized pub fn aya_log_parser::Parameter::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_log_parser::Parameter where T: core::marker::Sized +impl core::borrow::Borrow for aya_log_parser::Parameter where T: ?core::marker::Sized pub fn aya_log_parser::Parameter::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_log_parser::Parameter where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_log_parser::Parameter where T: ?core::marker::Sized pub fn aya_log_parser::Parameter::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_log_parser::Parameter where T: core::clone::Clone +pub unsafe fn aya_log_parser::Parameter::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_log_parser::Parameter pub fn aya_log_parser::Parameter::from(t: T) -> T pub fn aya_log_parser::parse(format_string: &str) -> core::result::Result, alloc::string::String> diff --git a/xtask/public-api/aya-log.txt b/xtask/public-api/aya-log.txt index 8c04980e..a469879c 100644 --- a/xtask/public-api/aya-log.txt +++ b/xtask/public-api/aya-log.txt @@ -1,15 +1,12 @@ pub mod aya_log +pub use aya_log::Level pub enum aya_log::Error -pub aya_log::Error::InvalidOnlineCpu(std::io::error::Error) pub aya_log::Error::MapError(aya::maps::MapError) pub aya_log::Error::MapNotFound -pub aya_log::Error::PerfBufferError(aya::maps::perf::perf_buffer::PerfBufferError) pub aya_log::Error::ProgramError(aya::programs::ProgramError) pub aya_log::Error::ProgramNotFound impl core::convert::From for aya_log::Error pub fn aya_log::Error::from(source: aya::maps::MapError) -> Self -impl core::convert::From for aya_log::Error -pub fn aya_log::Error::from(source: aya::maps::perf::perf_buffer::PerfBufferError) -> Self impl core::convert::From for aya_log::Error pub fn aya_log::Error::from(source: aya::programs::ProgramError) -> Self impl core::error::Error for aya_log::Error @@ -32,13 +29,13 @@ pub fn aya_log::Error::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_log::Error where U: core::convert::TryFrom pub type aya_log::Error::Error = >::Error pub fn aya_log::Error::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya_log::Error where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya_log::Error where T: core::fmt::Display + ?core::marker::Sized pub fn aya_log::Error::to_string(&self) -> alloc::string::String -impl core::any::Any for aya_log::Error where T: 'static + core::marker::Sized +impl core::any::Any for aya_log::Error where T: 'static + ?core::marker::Sized pub fn aya_log::Error::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_log::Error where T: core::marker::Sized +impl core::borrow::Borrow for aya_log::Error where T: ?core::marker::Sized pub fn aya_log::Error::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_log::Error where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_log::Error where T: ?core::marker::Sized pub fn aya_log::Error::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_log::Error pub fn aya_log::Error::from(t: T) -> T @@ -59,42 +56,48 @@ pub fn aya_log::DefaultFormatter::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_log::DefaultFormatter where U: core::convert::TryFrom pub type aya_log::DefaultFormatter::Error = >::Error pub fn aya_log::DefaultFormatter::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_log::DefaultFormatter where T: 'static + core::marker::Sized +impl core::any::Any for aya_log::DefaultFormatter where T: 'static + ?core::marker::Sized pub fn aya_log::DefaultFormatter::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_log::DefaultFormatter where T: core::marker::Sized +impl core::borrow::Borrow for aya_log::DefaultFormatter where T: ?core::marker::Sized pub fn aya_log::DefaultFormatter::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_log::DefaultFormatter where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_log::DefaultFormatter where T: ?core::marker::Sized pub fn aya_log::DefaultFormatter::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_log::DefaultFormatter pub fn aya_log::DefaultFormatter::from(t: T) -> T -pub struct aya_log::EbpfLogger -impl aya_log::EbpfLogger -pub fn aya_log::EbpfLogger::init(bpf: &mut aya::bpf::Ebpf) -> core::result::Result -pub fn aya_log::EbpfLogger::init_from_id(program_id: u32) -> core::result::Result -pub fn aya_log::EbpfLogger::init_from_id_with_logger(program_id: u32, logger: T) -> core::result::Result -pub fn aya_log::EbpfLogger::init_with_logger(bpf: &mut aya::bpf::Ebpf, logger: T) -> core::result::Result -impl core::marker::Freeze for aya_log::EbpfLogger -impl core::marker::Send for aya_log::EbpfLogger -impl core::marker::Sync for aya_log::EbpfLogger -impl core::marker::Unpin for aya_log::EbpfLogger -impl core::panic::unwind_safe::RefUnwindSafe for aya_log::EbpfLogger -impl core::panic::unwind_safe::UnwindSafe for aya_log::EbpfLogger -impl core::convert::Into for aya_log::EbpfLogger where U: core::convert::From -pub fn aya_log::EbpfLogger::into(self) -> U -impl core::convert::TryFrom for aya_log::EbpfLogger where U: core::convert::Into -pub type aya_log::EbpfLogger::Error = core::convert::Infallible -pub fn aya_log::EbpfLogger::try_from(value: U) -> core::result::Result>::Error> -impl core::convert::TryInto for aya_log::EbpfLogger where U: core::convert::TryFrom -pub type aya_log::EbpfLogger::Error = >::Error -pub fn aya_log::EbpfLogger::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_log::EbpfLogger where T: 'static + core::marker::Sized -pub fn aya_log::EbpfLogger::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_log::EbpfLogger where T: core::marker::Sized -pub fn aya_log::EbpfLogger::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_log::EbpfLogger where T: core::marker::Sized -pub fn aya_log::EbpfLogger::borrow_mut(&mut self) -> &mut T -impl core::convert::From for aya_log::EbpfLogger -pub fn aya_log::EbpfLogger::from(t: T) -> T +pub struct aya_log::EbpfLogger +impl aya_log::EbpfLogger<&'static dyn log::Log> +pub fn aya_log::EbpfLogger<&'static dyn log::Log>::init(bpf: &mut aya::bpf::Ebpf) -> core::result::Result +pub fn aya_log::EbpfLogger<&'static dyn log::Log>::init_from_id(program_id: u32) -> core::result::Result +impl aya_log::EbpfLogger +pub fn aya_log::EbpfLogger::flush(&mut self) +pub fn aya_log::EbpfLogger::init_from_id_with_logger(program_id: u32, logger: T) -> core::result::Result +pub fn aya_log::EbpfLogger::init_with_logger(bpf: &mut aya::bpf::Ebpf, logger: T) -> core::result::Result +impl std::os::fd::owned::AsFd for aya_log::EbpfLogger +pub fn aya_log::EbpfLogger::as_fd(&self) -> std::os::fd::owned::BorrowedFd<'_> +impl std::os::fd::raw::AsRawFd for aya_log::EbpfLogger +pub fn aya_log::EbpfLogger::as_raw_fd(&self) -> std::os::fd::raw::RawFd +impl core::marker::Freeze for aya_log::EbpfLogger where T: core::marker::Freeze +impl core::marker::Send for aya_log::EbpfLogger where T: core::marker::Send +impl core::marker::Sync for aya_log::EbpfLogger where T: core::marker::Sync +impl core::marker::Unpin for aya_log::EbpfLogger where T: core::marker::Unpin +impl core::panic::unwind_safe::RefUnwindSafe for aya_log::EbpfLogger where T: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::UnwindSafe for aya_log::EbpfLogger where T: core::panic::unwind_safe::UnwindSafe +impl core::convert::Into for aya_log::EbpfLogger where U: core::convert::From +pub fn aya_log::EbpfLogger::into(self) -> U +impl core::convert::TryFrom for aya_log::EbpfLogger where U: core::convert::Into +pub type aya_log::EbpfLogger::Error = core::convert::Infallible +pub fn aya_log::EbpfLogger::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_log::EbpfLogger where U: core::convert::TryFrom +pub type aya_log::EbpfLogger::Error = >::Error +pub fn aya_log::EbpfLogger::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_log::EbpfLogger where T: 'static + ?core::marker::Sized +pub fn aya_log::EbpfLogger::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_log::EbpfLogger where T: ?core::marker::Sized +pub fn aya_log::EbpfLogger::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_log::EbpfLogger where T: ?core::marker::Sized +pub fn aya_log::EbpfLogger::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_log::EbpfLogger +pub fn aya_log::EbpfLogger::from(t: T) -> T pub struct aya_log::Ipv4Formatter impl aya_log::Formatter for aya_log::Ipv4Formatter where T: core::convert::Into pub fn aya_log::Ipv4Formatter::format(v: T) -> alloc::string::String @@ -112,11 +115,11 @@ pub fn aya_log::Ipv4Formatter::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_log::Ipv4Formatter where U: core::convert::TryFrom pub type aya_log::Ipv4Formatter::Error = >::Error pub fn aya_log::Ipv4Formatter::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_log::Ipv4Formatter where T: 'static + core::marker::Sized +impl core::any::Any for aya_log::Ipv4Formatter where T: 'static + ?core::marker::Sized pub fn aya_log::Ipv4Formatter::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_log::Ipv4Formatter where T: core::marker::Sized +impl core::borrow::Borrow for aya_log::Ipv4Formatter where T: ?core::marker::Sized pub fn aya_log::Ipv4Formatter::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_log::Ipv4Formatter where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_log::Ipv4Formatter where T: ?core::marker::Sized pub fn aya_log::Ipv4Formatter::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_log::Ipv4Formatter pub fn aya_log::Ipv4Formatter::from(t: T) -> T @@ -137,39 +140,39 @@ pub fn aya_log::Ipv6Formatter::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_log::Ipv6Formatter where U: core::convert::TryFrom pub type aya_log::Ipv6Formatter::Error = >::Error pub fn aya_log::Ipv6Formatter::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_log::Ipv6Formatter where T: 'static + core::marker::Sized +impl core::any::Any for aya_log::Ipv6Formatter where T: 'static + ?core::marker::Sized pub fn aya_log::Ipv6Formatter::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_log::Ipv6Formatter where T: core::marker::Sized +impl core::borrow::Borrow for aya_log::Ipv6Formatter where T: ?core::marker::Sized pub fn aya_log::Ipv6Formatter::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_log::Ipv6Formatter where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_log::Ipv6Formatter where T: ?core::marker::Sized pub fn aya_log::Ipv6Formatter::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_log::Ipv6Formatter pub fn aya_log::Ipv6Formatter::from(t: T) -> T -pub struct aya_log::LowerHexDebugFormatter -impl aya_log::Formatter<&[T]> for aya_log::LowerHexDebugFormatter where T: core::fmt::LowerHex -pub fn aya_log::LowerHexDebugFormatter::format(v: &[T]) -> alloc::string::String -impl core::marker::Freeze for aya_log::LowerHexDebugFormatter -impl core::marker::Send for aya_log::LowerHexDebugFormatter -impl core::marker::Sync for aya_log::LowerHexDebugFormatter -impl core::marker::Unpin for aya_log::LowerHexDebugFormatter -impl core::panic::unwind_safe::RefUnwindSafe for aya_log::LowerHexDebugFormatter -impl core::panic::unwind_safe::UnwindSafe for aya_log::LowerHexDebugFormatter -impl core::convert::Into for aya_log::LowerHexDebugFormatter where U: core::convert::From -pub fn aya_log::LowerHexDebugFormatter::into(self) -> U -impl core::convert::TryFrom for aya_log::LowerHexDebugFormatter where U: core::convert::Into -pub type aya_log::LowerHexDebugFormatter::Error = core::convert::Infallible -pub fn aya_log::LowerHexDebugFormatter::try_from(value: U) -> core::result::Result>::Error> -impl core::convert::TryInto for aya_log::LowerHexDebugFormatter where U: core::convert::TryFrom -pub type aya_log::LowerHexDebugFormatter::Error = >::Error -pub fn aya_log::LowerHexDebugFormatter::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_log::LowerHexDebugFormatter where T: 'static + core::marker::Sized -pub fn aya_log::LowerHexDebugFormatter::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_log::LowerHexDebugFormatter where T: core::marker::Sized -pub fn aya_log::LowerHexDebugFormatter::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_log::LowerHexDebugFormatter where T: core::marker::Sized -pub fn aya_log::LowerHexDebugFormatter::borrow_mut(&mut self) -> &mut T -impl core::convert::From for aya_log::LowerHexDebugFormatter -pub fn aya_log::LowerHexDebugFormatter::from(t: T) -> T +pub struct aya_log::LowerHexBytesFormatter +impl aya_log::Formatter<&[u8]> for aya_log::LowerHexBytesFormatter +pub fn aya_log::LowerHexBytesFormatter::format(v: &[u8]) -> alloc::string::String +impl core::marker::Freeze for aya_log::LowerHexBytesFormatter +impl core::marker::Send for aya_log::LowerHexBytesFormatter +impl core::marker::Sync for aya_log::LowerHexBytesFormatter +impl core::marker::Unpin for aya_log::LowerHexBytesFormatter +impl core::panic::unwind_safe::RefUnwindSafe for aya_log::LowerHexBytesFormatter +impl core::panic::unwind_safe::UnwindSafe for aya_log::LowerHexBytesFormatter +impl core::convert::Into for aya_log::LowerHexBytesFormatter where U: core::convert::From +pub fn aya_log::LowerHexBytesFormatter::into(self) -> U +impl core::convert::TryFrom for aya_log::LowerHexBytesFormatter where U: core::convert::Into +pub type aya_log::LowerHexBytesFormatter::Error = core::convert::Infallible +pub fn aya_log::LowerHexBytesFormatter::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_log::LowerHexBytesFormatter where U: core::convert::TryFrom +pub type aya_log::LowerHexBytesFormatter::Error = >::Error +pub fn aya_log::LowerHexBytesFormatter::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_log::LowerHexBytesFormatter where T: 'static + ?core::marker::Sized +pub fn aya_log::LowerHexBytesFormatter::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_log::LowerHexBytesFormatter where T: ?core::marker::Sized +pub fn aya_log::LowerHexBytesFormatter::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_log::LowerHexBytesFormatter where T: ?core::marker::Sized +pub fn aya_log::LowerHexBytesFormatter::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_log::LowerHexBytesFormatter +pub fn aya_log::LowerHexBytesFormatter::from(t: T) -> T pub struct aya_log::LowerHexFormatter impl aya_log::Formatter for aya_log::LowerHexFormatter where T: core::fmt::LowerHex pub fn aya_log::LowerHexFormatter::format(v: T) -> alloc::string::String @@ -187,11 +190,11 @@ pub fn aya_log::LowerHexFormatter::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_log::LowerHexFormatter where U: core::convert::TryFrom pub type aya_log::LowerHexFormatter::Error = >::Error pub fn aya_log::LowerHexFormatter::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_log::LowerHexFormatter where T: 'static + core::marker::Sized +impl core::any::Any for aya_log::LowerHexFormatter where T: 'static + ?core::marker::Sized pub fn aya_log::LowerHexFormatter::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_log::LowerHexFormatter where T: core::marker::Sized +impl core::borrow::Borrow for aya_log::LowerHexFormatter where T: ?core::marker::Sized pub fn aya_log::LowerHexFormatter::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_log::LowerHexFormatter where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_log::LowerHexFormatter where T: ?core::marker::Sized pub fn aya_log::LowerHexFormatter::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_log::LowerHexFormatter pub fn aya_log::LowerHexFormatter::from(t: T) -> T @@ -212,39 +215,66 @@ pub fn aya_log::LowerMacFormatter::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_log::LowerMacFormatter where U: core::convert::TryFrom pub type aya_log::LowerMacFormatter::Error = >::Error pub fn aya_log::LowerMacFormatter::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_log::LowerMacFormatter where T: 'static + core::marker::Sized +impl core::any::Any for aya_log::LowerMacFormatter where T: 'static + ?core::marker::Sized pub fn aya_log::LowerMacFormatter::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_log::LowerMacFormatter where T: core::marker::Sized +impl core::borrow::Borrow for aya_log::LowerMacFormatter where T: ?core::marker::Sized pub fn aya_log::LowerMacFormatter::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_log::LowerMacFormatter where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_log::LowerMacFormatter where T: ?core::marker::Sized pub fn aya_log::LowerMacFormatter::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_log::LowerMacFormatter pub fn aya_log::LowerMacFormatter::from(t: T) -> T -pub struct aya_log::UpperHexDebugFormatter -impl aya_log::Formatter<&[T]> for aya_log::UpperHexDebugFormatter where T: core::fmt::UpperHex -pub fn aya_log::UpperHexDebugFormatter::format(v: &[T]) -> alloc::string::String -impl core::marker::Freeze for aya_log::UpperHexDebugFormatter -impl core::marker::Send for aya_log::UpperHexDebugFormatter -impl core::marker::Sync for aya_log::UpperHexDebugFormatter -impl core::marker::Unpin for aya_log::UpperHexDebugFormatter -impl core::panic::unwind_safe::RefUnwindSafe for aya_log::UpperHexDebugFormatter -impl core::panic::unwind_safe::UnwindSafe for aya_log::UpperHexDebugFormatter -impl core::convert::Into for aya_log::UpperHexDebugFormatter where U: core::convert::From -pub fn aya_log::UpperHexDebugFormatter::into(self) -> U -impl core::convert::TryFrom for aya_log::UpperHexDebugFormatter where U: core::convert::Into -pub type aya_log::UpperHexDebugFormatter::Error = core::convert::Infallible -pub fn aya_log::UpperHexDebugFormatter::try_from(value: U) -> core::result::Result>::Error> -impl core::convert::TryInto for aya_log::UpperHexDebugFormatter where U: core::convert::TryFrom -pub type aya_log::UpperHexDebugFormatter::Error = >::Error -pub fn aya_log::UpperHexDebugFormatter::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_log::UpperHexDebugFormatter where T: 'static + core::marker::Sized -pub fn aya_log::UpperHexDebugFormatter::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_log::UpperHexDebugFormatter where T: core::marker::Sized -pub fn aya_log::UpperHexDebugFormatter::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_log::UpperHexDebugFormatter where T: core::marker::Sized -pub fn aya_log::UpperHexDebugFormatter::borrow_mut(&mut self) -> &mut T -impl core::convert::From for aya_log::UpperHexDebugFormatter -pub fn aya_log::UpperHexDebugFormatter::from(t: T) -> T +pub struct aya_log::PointerFormatter +impl aya_log::Formatter<*const T> for aya_log::PointerFormatter +pub fn aya_log::PointerFormatter::format(v: *const T) -> alloc::string::String +impl aya_log::Formatter<*mut T> for aya_log::PointerFormatter +pub fn aya_log::PointerFormatter::format(v: *mut T) -> alloc::string::String +impl core::marker::Freeze for aya_log::PointerFormatter +impl core::marker::Send for aya_log::PointerFormatter +impl core::marker::Sync for aya_log::PointerFormatter +impl core::marker::Unpin for aya_log::PointerFormatter +impl core::panic::unwind_safe::RefUnwindSafe for aya_log::PointerFormatter +impl core::panic::unwind_safe::UnwindSafe for aya_log::PointerFormatter +impl core::convert::Into for aya_log::PointerFormatter where U: core::convert::From +pub fn aya_log::PointerFormatter::into(self) -> U +impl core::convert::TryFrom for aya_log::PointerFormatter where U: core::convert::Into +pub type aya_log::PointerFormatter::Error = core::convert::Infallible +pub fn aya_log::PointerFormatter::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_log::PointerFormatter where U: core::convert::TryFrom +pub type aya_log::PointerFormatter::Error = >::Error +pub fn aya_log::PointerFormatter::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_log::PointerFormatter where T: 'static + ?core::marker::Sized +pub fn aya_log::PointerFormatter::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_log::PointerFormatter where T: ?core::marker::Sized +pub fn aya_log::PointerFormatter::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_log::PointerFormatter where T: ?core::marker::Sized +pub fn aya_log::PointerFormatter::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_log::PointerFormatter +pub fn aya_log::PointerFormatter::from(t: T) -> T +pub struct aya_log::UpperHexBytesFormatter +impl aya_log::Formatter<&[u8]> for aya_log::UpperHexBytesFormatter +pub fn aya_log::UpperHexBytesFormatter::format(v: &[u8]) -> alloc::string::String +impl core::marker::Freeze for aya_log::UpperHexBytesFormatter +impl core::marker::Send for aya_log::UpperHexBytesFormatter +impl core::marker::Sync for aya_log::UpperHexBytesFormatter +impl core::marker::Unpin for aya_log::UpperHexBytesFormatter +impl core::panic::unwind_safe::RefUnwindSafe for aya_log::UpperHexBytesFormatter +impl core::panic::unwind_safe::UnwindSafe for aya_log::UpperHexBytesFormatter +impl core::convert::Into for aya_log::UpperHexBytesFormatter where U: core::convert::From +pub fn aya_log::UpperHexBytesFormatter::into(self) -> U +impl core::convert::TryFrom for aya_log::UpperHexBytesFormatter where U: core::convert::Into +pub type aya_log::UpperHexBytesFormatter::Error = core::convert::Infallible +pub fn aya_log::UpperHexBytesFormatter::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_log::UpperHexBytesFormatter where U: core::convert::TryFrom +pub type aya_log::UpperHexBytesFormatter::Error = >::Error +pub fn aya_log::UpperHexBytesFormatter::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_log::UpperHexBytesFormatter where T: 'static + ?core::marker::Sized +pub fn aya_log::UpperHexBytesFormatter::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_log::UpperHexBytesFormatter where T: ?core::marker::Sized +pub fn aya_log::UpperHexBytesFormatter::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_log::UpperHexBytesFormatter where T: ?core::marker::Sized +pub fn aya_log::UpperHexBytesFormatter::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_log::UpperHexBytesFormatter +pub fn aya_log::UpperHexBytesFormatter::from(t: T) -> T pub struct aya_log::UpperHexFormatter impl aya_log::Formatter for aya_log::UpperHexFormatter where T: core::fmt::UpperHex pub fn aya_log::UpperHexFormatter::format(v: T) -> alloc::string::String @@ -262,11 +292,11 @@ pub fn aya_log::UpperHexFormatter::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_log::UpperHexFormatter where U: core::convert::TryFrom pub type aya_log::UpperHexFormatter::Error = >::Error pub fn aya_log::UpperHexFormatter::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_log::UpperHexFormatter where T: 'static + core::marker::Sized +impl core::any::Any for aya_log::UpperHexFormatter where T: 'static + ?core::marker::Sized pub fn aya_log::UpperHexFormatter::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_log::UpperHexFormatter where T: core::marker::Sized +impl core::borrow::Borrow for aya_log::UpperHexFormatter where T: ?core::marker::Sized pub fn aya_log::UpperHexFormatter::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_log::UpperHexFormatter where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_log::UpperHexFormatter where T: ?core::marker::Sized pub fn aya_log::UpperHexFormatter::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_log::UpperHexFormatter pub fn aya_log::UpperHexFormatter::from(t: T) -> T @@ -287,24 +317,29 @@ pub fn aya_log::UpperMacFormatter::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_log::UpperMacFormatter where U: core::convert::TryFrom pub type aya_log::UpperMacFormatter::Error = >::Error pub fn aya_log::UpperMacFormatter::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_log::UpperMacFormatter where T: 'static + core::marker::Sized +impl core::any::Any for aya_log::UpperMacFormatter where T: 'static + ?core::marker::Sized pub fn aya_log::UpperMacFormatter::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_log::UpperMacFormatter where T: core::marker::Sized +impl core::borrow::Borrow for aya_log::UpperMacFormatter where T: ?core::marker::Sized pub fn aya_log::UpperMacFormatter::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_log::UpperMacFormatter where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_log::UpperMacFormatter where T: ?core::marker::Sized pub fn aya_log::UpperMacFormatter::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_log::UpperMacFormatter pub fn aya_log::UpperMacFormatter::from(t: T) -> T +pub const aya_log::LEVEL: &str pub trait aya_log::Formatter pub fn aya_log::Formatter::format(v: T) -> alloc::string::String +impl aya_log::Formatter<&[u8]> for aya_log::LowerHexBytesFormatter +pub fn aya_log::LowerHexBytesFormatter::format(v: &[u8]) -> alloc::string::String +impl aya_log::Formatter<&[u8]> for aya_log::UpperHexBytesFormatter +pub fn aya_log::UpperHexBytesFormatter::format(v: &[u8]) -> alloc::string::String impl aya_log::Formatter<[u8; 6]> for aya_log::LowerMacFormatter pub fn aya_log::LowerMacFormatter::format(v: [u8; 6]) -> alloc::string::String impl aya_log::Formatter<[u8; 6]> for aya_log::UpperMacFormatter pub fn aya_log::UpperMacFormatter::format(v: [u8; 6]) -> alloc::string::String -impl aya_log::Formatter<&[T]> for aya_log::LowerHexDebugFormatter where T: core::fmt::LowerHex -pub fn aya_log::LowerHexDebugFormatter::format(v: &[T]) -> alloc::string::String -impl aya_log::Formatter<&[T]> for aya_log::UpperHexDebugFormatter where T: core::fmt::UpperHex -pub fn aya_log::UpperHexDebugFormatter::format(v: &[T]) -> alloc::string::String +impl aya_log::Formatter<*const T> for aya_log::PointerFormatter +pub fn aya_log::PointerFormatter::format(v: *const T) -> alloc::string::String +impl aya_log::Formatter<*mut T> for aya_log::PointerFormatter +pub fn aya_log::PointerFormatter::format(v: *mut T) -> alloc::string::String impl aya_log::Formatter for aya_log::DefaultFormatter where T: alloc::string::ToString pub fn aya_log::DefaultFormatter::format(v: T) -> alloc::string::String impl aya_log::Formatter for aya_log::Ipv4Formatter where T: core::convert::Into @@ -315,4 +350,4 @@ impl aya_log::Formatter for aya_log::LowerHexFormatter where T: core::fmt: pub fn aya_log::LowerHexFormatter::format(v: T) -> alloc::string::String impl aya_log::Formatter for aya_log::UpperHexFormatter where T: core::fmt::UpperHex pub fn aya_log::UpperHexFormatter::format(v: T) -> alloc::string::String -pub type aya_log::BpfLogger = aya_log::EbpfLogger +pub type aya_log::BpfLogger = aya_log::EbpfLogger diff --git a/xtask/public-api/aya-obj.txt b/xtask/public-api/aya-obj.txt index e09efd3a..8406f83a 100644 --- a/xtask/public-api/aya-obj.txt +++ b/xtask/public-api/aya-obj.txt @@ -30,6 +30,7 @@ pub aya_obj::btf::BtfError::MaximumTypeDepthReached pub aya_obj::btf::BtfError::MaximumTypeDepthReached::type_id: u32 pub aya_obj::btf::BtfError::SymbolOffsetNotFound pub aya_obj::btf::BtfError::SymbolOffsetNotFound::symbol_name: alloc::string::String +pub aya_obj::btf::BtfError::UnexpectedBtfMapWrapperLayout(aya_obj::btf::Struct) pub aya_obj::btf::BtfError::UnexpectedBtfType pub aya_obj::btf::BtfError::UnexpectedBtfType::type_id: u32 pub aya_obj::btf::BtfError::UnknownBtfType @@ -60,13 +61,13 @@ pub fn aya_obj::btf::BtfError::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_obj::btf::BtfError where U: core::convert::TryFrom pub type aya_obj::btf::BtfError::Error = >::Error pub fn aya_obj::btf::BtfError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya_obj::btf::BtfError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya_obj::btf::BtfError where T: core::fmt::Display + ?core::marker::Sized pub fn aya_obj::btf::BtfError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya_obj::btf::BtfError where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::BtfError where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::BtfError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::BtfError where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::BtfError where T: ?core::marker::Sized pub fn aya_obj::btf::BtfError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::BtfError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::BtfError where T: ?core::marker::Sized pub fn aya_obj::btf::BtfError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_obj::btf::BtfError pub fn aya_obj::btf::BtfError::from(t: T) -> T @@ -125,14 +126,16 @@ impl alloc::borrow::ToOwned for aya_obj::btf::BtfKind where T: core::clone::C pub type aya_obj::btf::BtfKind::Owned = T pub fn aya_obj::btf::BtfKind::clone_into(&self, target: &mut T) pub fn aya_obj::btf::BtfKind::to_owned(&self) -> T -impl alloc::string::ToString for aya_obj::btf::BtfKind where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya_obj::btf::BtfKind where T: core::fmt::Display + ?core::marker::Sized pub fn aya_obj::btf::BtfKind::to_string(&self) -> alloc::string::String -impl core::any::Any for aya_obj::btf::BtfKind where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::BtfKind where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::BtfKind::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::BtfKind where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::BtfKind where T: ?core::marker::Sized pub fn aya_obj::btf::BtfKind::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::BtfKind where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::BtfKind where T: ?core::marker::Sized pub fn aya_obj::btf::BtfKind::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::BtfKind where T: core::clone::Clone +pub unsafe fn aya_obj::btf::BtfKind::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::BtfKind pub fn aya_obj::btf::BtfKind::from(t: T) -> T pub enum aya_obj::btf::BtfType @@ -178,12 +181,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::BtfType where T: core::clone::C pub type aya_obj::btf::BtfType::Owned = T pub fn aya_obj::btf::BtfType::clone_into(&self, target: &mut T) pub fn aya_obj::btf::BtfType::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::BtfType where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::BtfType where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::BtfType::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::BtfType where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::BtfType where T: ?core::marker::Sized pub fn aya_obj::btf::BtfType::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::BtfType where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::BtfType where T: ?core::marker::Sized pub fn aya_obj::btf::BtfType::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::BtfType where T: core::clone::Clone +pub unsafe fn aya_obj::btf::BtfType::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::BtfType pub fn aya_obj::btf::BtfType::from(t: T) -> T #[repr(u32)] pub enum aya_obj::btf::FuncLinkage @@ -219,12 +224,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::FuncLinkage where T: core::clon pub type aya_obj::btf::FuncLinkage::Owned = T pub fn aya_obj::btf::FuncLinkage::clone_into(&self, target: &mut T) pub fn aya_obj::btf::FuncLinkage::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::FuncLinkage where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::FuncLinkage where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::FuncLinkage::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::FuncLinkage where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::FuncLinkage where T: ?core::marker::Sized pub fn aya_obj::btf::FuncLinkage::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::FuncLinkage where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::FuncLinkage where T: ?core::marker::Sized pub fn aya_obj::btf::FuncLinkage::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::FuncLinkage where T: core::clone::Clone +pub unsafe fn aya_obj::btf::FuncLinkage::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::FuncLinkage pub fn aya_obj::btf::FuncLinkage::from(t: T) -> T #[repr(u32)] pub enum aya_obj::btf::IntEncoding @@ -261,12 +268,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::IntEncoding where T: core::clon pub type aya_obj::btf::IntEncoding::Owned = T pub fn aya_obj::btf::IntEncoding::clone_into(&self, target: &mut T) pub fn aya_obj::btf::IntEncoding::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::IntEncoding where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::IntEncoding where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::IntEncoding::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::IntEncoding where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::IntEncoding where T: ?core::marker::Sized pub fn aya_obj::btf::IntEncoding::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::IntEncoding where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::IntEncoding where T: ?core::marker::Sized pub fn aya_obj::btf::IntEncoding::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::IntEncoding where T: core::clone::Clone +pub unsafe fn aya_obj::btf::IntEncoding::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::IntEncoding pub fn aya_obj::btf::IntEncoding::from(t: T) -> T #[repr(u32)] pub enum aya_obj::btf::VarLinkage @@ -302,12 +311,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::VarLinkage where T: core::clone pub type aya_obj::btf::VarLinkage::Owned = T pub fn aya_obj::btf::VarLinkage::clone_into(&self, target: &mut T) pub fn aya_obj::btf::VarLinkage::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::VarLinkage where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::VarLinkage where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::VarLinkage::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::VarLinkage where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::VarLinkage where T: ?core::marker::Sized pub fn aya_obj::btf::VarLinkage::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::VarLinkage where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::VarLinkage where T: ?core::marker::Sized pub fn aya_obj::btf::VarLinkage::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::VarLinkage where T: core::clone::Clone +pub unsafe fn aya_obj::btf::VarLinkage::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::VarLinkage pub fn aya_obj::btf::VarLinkage::from(t: T) -> T #[repr(C)] pub struct aya_obj::btf::Array @@ -333,23 +344,25 @@ impl alloc::borrow::ToOwned for aya_obj::btf::Array where T: core::clone::Clo pub type aya_obj::btf::Array::Owned = T pub fn aya_obj::btf::Array::clone_into(&self, target: &mut T) pub fn aya_obj::btf::Array::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::Array where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::Array where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::Array::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::Array where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::Array where T: ?core::marker::Sized pub fn aya_obj::btf::Array::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::Array where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::Array where T: ?core::marker::Sized pub fn aya_obj::btf::Array::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::Array where T: core::clone::Clone +pub unsafe fn aya_obj::btf::Array::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::Array pub fn aya_obj::btf::Array::from(t: T) -> T pub struct aya_obj::btf::Btf impl aya_obj::btf::Btf pub fn aya_obj::btf::Btf::add_string(&mut self, name: &str) -> u32 pub fn aya_obj::btf::Btf::add_type(&mut self, btf_type: aya_obj::btf::BtfType) -> u32 -pub fn aya_obj::btf::Btf::from_sys_fs() -> core::result::Result +pub fn aya_obj::btf::Btf::from_sys_fs() -> core::result::Result pub fn aya_obj::btf::Btf::id_by_type_name_kind(&self, name: &str, kind: aya_obj::btf::BtfKind) -> core::result::Result -pub fn aya_obj::btf::Btf::new() -> aya_obj::btf::Btf -pub fn aya_obj::btf::Btf::parse(data: &[u8], endianness: object::endian::Endianness) -> core::result::Result -pub fn aya_obj::btf::Btf::parse_file>(path: P, endianness: object::endian::Endianness) -> core::result::Result +pub fn aya_obj::btf::Btf::new() -> Self +pub fn aya_obj::btf::Btf::parse(data: &[u8], endianness: object::endian::Endianness) -> core::result::Result +pub fn aya_obj::btf::Btf::parse_file>(path: P, endianness: object::endian::Endianness) -> core::result::Result pub fn aya_obj::btf::Btf::to_bytes(&self) -> alloc::vec::Vec impl core::clone::Clone for aya_obj::btf::Btf pub fn aya_obj::btf::Btf::clone(&self) -> aya_obj::btf::Btf @@ -375,12 +388,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::Btf where T: core::clone::Clone pub type aya_obj::btf::Btf::Owned = T pub fn aya_obj::btf::Btf::clone_into(&self, target: &mut T) pub fn aya_obj::btf::Btf::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::Btf where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::Btf where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::Btf::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::Btf where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::Btf where T: ?core::marker::Sized pub fn aya_obj::btf::Btf::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::Btf where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::Btf where T: ?core::marker::Sized pub fn aya_obj::btf::Btf::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::Btf where T: core::clone::Clone +pub unsafe fn aya_obj::btf::Btf::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::Btf pub fn aya_obj::btf::Btf::from(t: T) -> T #[repr(C)] pub struct aya_obj::btf::BtfEnum @@ -410,12 +425,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::BtfEnum where T: core::clone::C pub type aya_obj::btf::BtfEnum::Owned = T pub fn aya_obj::btf::BtfEnum::clone_into(&self, target: &mut T) pub fn aya_obj::btf::BtfEnum::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::BtfEnum where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::BtfEnum where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::BtfEnum::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::BtfEnum where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::BtfEnum where T: ?core::marker::Sized pub fn aya_obj::btf::BtfEnum::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::BtfEnum where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::BtfEnum where T: ?core::marker::Sized pub fn aya_obj::btf::BtfEnum::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::BtfEnum where T: core::clone::Clone +pub unsafe fn aya_obj::btf::BtfEnum::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::BtfEnum pub fn aya_obj::btf::BtfEnum::from(t: T) -> T #[repr(C)] pub struct aya_obj::btf::BtfEnum64 @@ -425,6 +442,7 @@ impl core::clone::Clone for aya_obj::btf::BtfEnum64 pub fn aya_obj::btf::BtfEnum64::clone(&self) -> aya_obj::btf::BtfEnum64 impl core::fmt::Debug for aya_obj::btf::BtfEnum64 pub fn aya_obj::btf::BtfEnum64::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Copy for aya_obj::btf::BtfEnum64 impl core::marker::Freeze for aya_obj::btf::BtfEnum64 impl core::marker::Send for aya_obj::btf::BtfEnum64 impl core::marker::Sync for aya_obj::btf::BtfEnum64 @@ -443,12 +461,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::BtfEnum64 where T: core::clone: pub type aya_obj::btf::BtfEnum64::Owned = T pub fn aya_obj::btf::BtfEnum64::clone_into(&self, target: &mut T) pub fn aya_obj::btf::BtfEnum64::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::BtfEnum64 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::BtfEnum64 where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::BtfEnum64::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::BtfEnum64 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::BtfEnum64 where T: ?core::marker::Sized pub fn aya_obj::btf::BtfEnum64::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::BtfEnum64 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::BtfEnum64 where T: ?core::marker::Sized pub fn aya_obj::btf::BtfEnum64::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::BtfEnum64 where T: core::clone::Clone +pub unsafe fn aya_obj::btf::BtfEnum64::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::BtfEnum64 pub fn aya_obj::btf::BtfEnum64::from(t: T) -> T pub struct aya_obj::btf::BtfExt @@ -474,17 +494,20 @@ impl alloc::borrow::ToOwned for aya_obj::btf::BtfExt where T: core::clone::Cl pub type aya_obj::btf::BtfExt::Owned = T pub fn aya_obj::btf::BtfExt::clone_into(&self, target: &mut T) pub fn aya_obj::btf::BtfExt::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::BtfExt where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::BtfExt where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::BtfExt::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::BtfExt where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::BtfExt where T: ?core::marker::Sized pub fn aya_obj::btf::BtfExt::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::BtfExt where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::BtfExt where T: ?core::marker::Sized pub fn aya_obj::btf::BtfExt::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::BtfExt where T: core::clone::Clone +pub unsafe fn aya_obj::btf::BtfExt::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::BtfExt pub fn aya_obj::btf::BtfExt::from(t: T) -> T pub struct aya_obj::btf::BtfFeatures impl aya_obj::btf::BtfFeatures pub fn aya_obj::btf::BtfFeatures::btf_datasec(&self) -> bool +pub fn aya_obj::btf::BtfFeatures::btf_datasec_zero(&self) -> bool pub fn aya_obj::btf::BtfFeatures::btf_decl_tag(&self) -> bool pub fn aya_obj::btf::BtfFeatures::btf_enum64(&self) -> bool pub fn aya_obj::btf::BtfFeatures::btf_float(&self) -> bool @@ -510,11 +533,11 @@ pub fn aya_obj::btf::BtfFeatures::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_obj::btf::BtfFeatures where U: core::convert::TryFrom pub type aya_obj::btf::BtfFeatures::Error = >::Error pub fn aya_obj::btf::BtfFeatures::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_obj::btf::BtfFeatures where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::BtfFeatures where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::BtfFeatures::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::BtfFeatures where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::BtfFeatures where T: ?core::marker::Sized pub fn aya_obj::btf::BtfFeatures::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::BtfFeatures where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::BtfFeatures where T: ?core::marker::Sized pub fn aya_obj::btf::BtfFeatures::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_obj::btf::BtfFeatures pub fn aya_obj::btf::BtfFeatures::from(t: T) -> T @@ -543,12 +566,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::BtfParam where T: core::clone:: pub type aya_obj::btf::BtfParam::Owned = T pub fn aya_obj::btf::BtfParam::clone_into(&self, target: &mut T) pub fn aya_obj::btf::BtfParam::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::BtfParam where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::BtfParam where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::BtfParam::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::BtfParam where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::BtfParam where T: ?core::marker::Sized pub fn aya_obj::btf::BtfParam::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::BtfParam where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::BtfParam where T: ?core::marker::Sized pub fn aya_obj::btf::BtfParam::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::BtfParam where T: core::clone::Clone +pub unsafe fn aya_obj::btf::BtfParam::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::BtfParam pub fn aya_obj::btf::BtfParam::from(t: T) -> T pub struct aya_obj::btf::BtfRelocationError @@ -573,13 +598,13 @@ pub fn aya_obj::btf::BtfRelocationError::try_from(value: U) -> core::result::Res impl core::convert::TryInto for aya_obj::btf::BtfRelocationError where U: core::convert::TryFrom pub type aya_obj::btf::BtfRelocationError::Error = >::Error pub fn aya_obj::btf::BtfRelocationError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya_obj::btf::BtfRelocationError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya_obj::btf::BtfRelocationError where T: core::fmt::Display + ?core::marker::Sized pub fn aya_obj::btf::BtfRelocationError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya_obj::btf::BtfRelocationError where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::BtfRelocationError where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::BtfRelocationError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::BtfRelocationError where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::BtfRelocationError where T: ?core::marker::Sized pub fn aya_obj::btf::BtfRelocationError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::BtfRelocationError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::BtfRelocationError where T: ?core::marker::Sized pub fn aya_obj::btf::BtfRelocationError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_obj::btf::BtfRelocationError pub fn aya_obj::btf::BtfRelocationError::from(t: T) -> T @@ -606,12 +631,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::Const where T: core::clone::Clo pub type aya_obj::btf::Const::Owned = T pub fn aya_obj::btf::Const::clone_into(&self, target: &mut T) pub fn aya_obj::btf::Const::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::Const where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::Const where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::Const::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::Const where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::Const where T: ?core::marker::Sized pub fn aya_obj::btf::Const::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::Const where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::Const where T: ?core::marker::Sized pub fn aya_obj::btf::Const::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::Const where T: core::clone::Clone +pub unsafe fn aya_obj::btf::Const::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::Const pub fn aya_obj::btf::Const::from(t: T) -> T #[repr(C)] pub struct aya_obj::btf::DataSec @@ -639,12 +666,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::DataSec where T: core::clone::C pub type aya_obj::btf::DataSec::Owned = T pub fn aya_obj::btf::DataSec::clone_into(&self, target: &mut T) pub fn aya_obj::btf::DataSec::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::DataSec where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::DataSec where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::DataSec::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::DataSec where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::DataSec where T: ?core::marker::Sized pub fn aya_obj::btf::DataSec::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::DataSec where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::DataSec where T: ?core::marker::Sized pub fn aya_obj::btf::DataSec::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::DataSec where T: core::clone::Clone +pub unsafe fn aya_obj::btf::DataSec::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::DataSec pub fn aya_obj::btf::DataSec::from(t: T) -> T #[repr(C)] pub struct aya_obj::btf::DataSecEntry @@ -673,12 +702,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::DataSecEntry where T: core::clo pub type aya_obj::btf::DataSecEntry::Owned = T pub fn aya_obj::btf::DataSecEntry::clone_into(&self, target: &mut T) pub fn aya_obj::btf::DataSecEntry::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::DataSecEntry where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::DataSecEntry where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::DataSecEntry::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::DataSecEntry where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::DataSecEntry where T: ?core::marker::Sized pub fn aya_obj::btf::DataSecEntry::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::DataSecEntry where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::DataSecEntry where T: ?core::marker::Sized pub fn aya_obj::btf::DataSecEntry::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::DataSecEntry where T: core::clone::Clone +pub unsafe fn aya_obj::btf::DataSecEntry::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::DataSecEntry pub fn aya_obj::btf::DataSecEntry::from(t: T) -> T #[repr(C)] pub struct aya_obj::btf::DeclTag @@ -706,12 +737,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::DeclTag where T: core::clone::C pub type aya_obj::btf::DeclTag::Owned = T pub fn aya_obj::btf::DeclTag::clone_into(&self, target: &mut T) pub fn aya_obj::btf::DeclTag::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::DeclTag where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::DeclTag where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::DeclTag::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::DeclTag where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::DeclTag where T: ?core::marker::Sized pub fn aya_obj::btf::DeclTag::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::DeclTag where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::DeclTag where T: ?core::marker::Sized pub fn aya_obj::btf::DeclTag::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::DeclTag where T: core::clone::Clone +pub unsafe fn aya_obj::btf::DeclTag::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::DeclTag pub fn aya_obj::btf::DeclTag::from(t: T) -> T #[repr(C)] pub struct aya_obj::btf::Enum @@ -739,12 +772,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::Enum where T: core::clone::Clon pub type aya_obj::btf::Enum::Owned = T pub fn aya_obj::btf::Enum::clone_into(&self, target: &mut T) pub fn aya_obj::btf::Enum::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::Enum where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::Enum where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::Enum::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::Enum where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::Enum where T: ?core::marker::Sized pub fn aya_obj::btf::Enum::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::Enum where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::Enum where T: ?core::marker::Sized pub fn aya_obj::btf::Enum::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::Enum where T: core::clone::Clone +pub unsafe fn aya_obj::btf::Enum::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::Enum pub fn aya_obj::btf::Enum::from(t: T) -> T #[repr(C)] pub struct aya_obj::btf::Enum64 @@ -772,12 +807,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::Enum64 where T: core::clone::Cl pub type aya_obj::btf::Enum64::Owned = T pub fn aya_obj::btf::Enum64::clone_into(&self, target: &mut T) pub fn aya_obj::btf::Enum64::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::Enum64 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::Enum64 where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::Enum64::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::Enum64 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::Enum64 where T: ?core::marker::Sized pub fn aya_obj::btf::Enum64::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::Enum64 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::Enum64 where T: ?core::marker::Sized pub fn aya_obj::btf::Enum64::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::Enum64 where T: core::clone::Clone +pub unsafe fn aya_obj::btf::Enum64::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::Enum64 pub fn aya_obj::btf::Enum64::from(t: T) -> T #[repr(C)] pub struct aya_obj::btf::Float @@ -805,12 +842,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::Float where T: core::clone::Clo pub type aya_obj::btf::Float::Owned = T pub fn aya_obj::btf::Float::clone_into(&self, target: &mut T) pub fn aya_obj::btf::Float::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::Float where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::Float where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::Float::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::Float where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::Float where T: ?core::marker::Sized pub fn aya_obj::btf::Float::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::Float where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::Float where T: ?core::marker::Sized pub fn aya_obj::btf::Float::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::Float where T: core::clone::Clone +pub unsafe fn aya_obj::btf::Float::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::Float pub fn aya_obj::btf::Float::from(t: T) -> T #[repr(C)] pub struct aya_obj::btf::Func @@ -838,12 +877,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::Func where T: core::clone::Clon pub type aya_obj::btf::Func::Owned = T pub fn aya_obj::btf::Func::clone_into(&self, target: &mut T) pub fn aya_obj::btf::Func::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::Func where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::Func where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::Func::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::Func where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::Func where T: ?core::marker::Sized pub fn aya_obj::btf::Func::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::Func where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::Func where T: ?core::marker::Sized pub fn aya_obj::btf::Func::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::Func where T: core::clone::Clone +pub unsafe fn aya_obj::btf::Func::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::Func pub fn aya_obj::btf::Func::from(t: T) -> T pub struct aya_obj::btf::FuncInfo @@ -870,12 +911,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::FuncInfo where T: core::clone:: pub type aya_obj::btf::FuncInfo::Owned = T pub fn aya_obj::btf::FuncInfo::clone_into(&self, target: &mut T) pub fn aya_obj::btf::FuncInfo::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::FuncInfo where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::FuncInfo where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::FuncInfo::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::FuncInfo where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::FuncInfo where T: ?core::marker::Sized pub fn aya_obj::btf::FuncInfo::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::FuncInfo where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::FuncInfo where T: ?core::marker::Sized pub fn aya_obj::btf::FuncInfo::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::FuncInfo where T: core::clone::Clone +pub unsafe fn aya_obj::btf::FuncInfo::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::FuncInfo pub fn aya_obj::btf::FuncInfo::from(t: T) -> T #[repr(C)] pub struct aya_obj::btf::FuncProto @@ -903,12 +946,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::FuncProto where T: core::clone: pub type aya_obj::btf::FuncProto::Owned = T pub fn aya_obj::btf::FuncProto::clone_into(&self, target: &mut T) pub fn aya_obj::btf::FuncProto::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::FuncProto where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::FuncProto where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::FuncProto::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::FuncProto where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::FuncProto where T: ?core::marker::Sized pub fn aya_obj::btf::FuncProto::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::FuncProto where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::FuncProto where T: ?core::marker::Sized pub fn aya_obj::btf::FuncProto::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::FuncProto where T: core::clone::Clone +pub unsafe fn aya_obj::btf::FuncProto::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::FuncProto pub fn aya_obj::btf::FuncProto::from(t: T) -> T pub struct aya_obj::btf::FuncSecInfo @@ -941,12 +986,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::FuncSecInfo where T: core::clon pub type aya_obj::btf::FuncSecInfo::Owned = T pub fn aya_obj::btf::FuncSecInfo::clone_into(&self, target: &mut T) pub fn aya_obj::btf::FuncSecInfo::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::FuncSecInfo where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::FuncSecInfo where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::FuncSecInfo::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::FuncSecInfo where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::FuncSecInfo where T: ?core::marker::Sized pub fn aya_obj::btf::FuncSecInfo::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::FuncSecInfo where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::FuncSecInfo where T: ?core::marker::Sized pub fn aya_obj::btf::FuncSecInfo::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::FuncSecInfo where T: core::clone::Clone +pub unsafe fn aya_obj::btf::FuncSecInfo::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::FuncSecInfo pub fn aya_obj::btf::FuncSecInfo::from(t: T) -> T #[repr(C)] pub struct aya_obj::btf::Fwd @@ -972,12 +1019,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::Fwd where T: core::clone::Clone pub type aya_obj::btf::Fwd::Owned = T pub fn aya_obj::btf::Fwd::clone_into(&self, target: &mut T) pub fn aya_obj::btf::Fwd::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::Fwd where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::Fwd where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::Fwd::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::Fwd where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::Fwd where T: ?core::marker::Sized pub fn aya_obj::btf::Fwd::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::Fwd where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::Fwd where T: ?core::marker::Sized pub fn aya_obj::btf::Fwd::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::Fwd where T: core::clone::Clone +pub unsafe fn aya_obj::btf::Fwd::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::Fwd pub fn aya_obj::btf::Fwd::from(t: T) -> T #[repr(C)] pub struct aya_obj::btf::Int @@ -1005,12 +1054,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::Int where T: core::clone::Clone pub type aya_obj::btf::Int::Owned = T pub fn aya_obj::btf::Int::clone_into(&self, target: &mut T) pub fn aya_obj::btf::Int::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::Int where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::Int where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::Int::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::Int where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::Int where T: ?core::marker::Sized pub fn aya_obj::btf::Int::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::Int where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::Int where T: ?core::marker::Sized pub fn aya_obj::btf::Int::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::Int where T: core::clone::Clone +pub unsafe fn aya_obj::btf::Int::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::Int pub fn aya_obj::btf::Int::from(t: T) -> T pub struct aya_obj::btf::LineSecInfo @@ -1043,12 +1094,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::LineSecInfo where T: core::clon pub type aya_obj::btf::LineSecInfo::Owned = T pub fn aya_obj::btf::LineSecInfo::clone_into(&self, target: &mut T) pub fn aya_obj::btf::LineSecInfo::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::LineSecInfo where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::LineSecInfo where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::LineSecInfo::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::LineSecInfo where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::LineSecInfo where T: ?core::marker::Sized pub fn aya_obj::btf::LineSecInfo::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::LineSecInfo where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::LineSecInfo where T: ?core::marker::Sized pub fn aya_obj::btf::LineSecInfo::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::LineSecInfo where T: core::clone::Clone +pub unsafe fn aya_obj::btf::LineSecInfo::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::LineSecInfo pub fn aya_obj::btf::LineSecInfo::from(t: T) -> T #[repr(C)] pub struct aya_obj::btf::Ptr @@ -1076,12 +1129,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::Ptr where T: core::clone::Clone pub type aya_obj::btf::Ptr::Owned = T pub fn aya_obj::btf::Ptr::clone_into(&self, target: &mut T) pub fn aya_obj::btf::Ptr::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::Ptr where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::Ptr where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::Ptr::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::Ptr where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::Ptr where T: ?core::marker::Sized pub fn aya_obj::btf::Ptr::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::Ptr where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::Ptr where T: ?core::marker::Sized pub fn aya_obj::btf::Ptr::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::Ptr where T: core::clone::Clone +pub unsafe fn aya_obj::btf::Ptr::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::Ptr pub fn aya_obj::btf::Ptr::from(t: T) -> T pub struct aya_obj::btf::Restrict @@ -1107,12 +1162,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::Restrict where T: core::clone:: pub type aya_obj::btf::Restrict::Owned = T pub fn aya_obj::btf::Restrict::clone_into(&self, target: &mut T) pub fn aya_obj::btf::Restrict::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::Restrict where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::Restrict where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::Restrict::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::Restrict where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::Restrict where T: ?core::marker::Sized pub fn aya_obj::btf::Restrict::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::Restrict where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::Restrict where T: ?core::marker::Sized pub fn aya_obj::btf::Restrict::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::Restrict where T: core::clone::Clone +pub unsafe fn aya_obj::btf::Restrict::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::Restrict pub fn aya_obj::btf::Restrict::from(t: T) -> T #[repr(C)] pub struct aya_obj::btf::Struct @@ -1138,12 +1195,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::Struct where T: core::clone::Cl pub type aya_obj::btf::Struct::Owned = T pub fn aya_obj::btf::Struct::clone_into(&self, target: &mut T) pub fn aya_obj::btf::Struct::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::Struct where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::Struct where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::Struct::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::Struct where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::Struct where T: ?core::marker::Sized pub fn aya_obj::btf::Struct::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::Struct where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::Struct where T: ?core::marker::Sized pub fn aya_obj::btf::Struct::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::Struct where T: core::clone::Clone +pub unsafe fn aya_obj::btf::Struct::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::Struct pub fn aya_obj::btf::Struct::from(t: T) -> T #[repr(C)] pub struct aya_obj::btf::TypeTag @@ -1171,12 +1230,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::TypeTag where T: core::clone::C pub type aya_obj::btf::TypeTag::Owned = T pub fn aya_obj::btf::TypeTag::clone_into(&self, target: &mut T) pub fn aya_obj::btf::TypeTag::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::TypeTag where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::TypeTag where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::TypeTag::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::TypeTag where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::TypeTag where T: ?core::marker::Sized pub fn aya_obj::btf::TypeTag::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::TypeTag where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::TypeTag where T: ?core::marker::Sized pub fn aya_obj::btf::TypeTag::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::TypeTag where T: core::clone::Clone +pub unsafe fn aya_obj::btf::TypeTag::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::TypeTag pub fn aya_obj::btf::TypeTag::from(t: T) -> T #[repr(C)] pub struct aya_obj::btf::Typedef @@ -1202,12 +1263,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::Typedef where T: core::clone::C pub type aya_obj::btf::Typedef::Owned = T pub fn aya_obj::btf::Typedef::clone_into(&self, target: &mut T) pub fn aya_obj::btf::Typedef::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::Typedef where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::Typedef where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::Typedef::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::Typedef where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::Typedef where T: ?core::marker::Sized pub fn aya_obj::btf::Typedef::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::Typedef where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::Typedef where T: ?core::marker::Sized pub fn aya_obj::btf::Typedef::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::Typedef where T: core::clone::Clone +pub unsafe fn aya_obj::btf::Typedef::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::Typedef pub fn aya_obj::btf::Typedef::from(t: T) -> T #[repr(C)] pub struct aya_obj::btf::Union @@ -1233,12 +1296,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::Union where T: core::clone::Clo pub type aya_obj::btf::Union::Owned = T pub fn aya_obj::btf::Union::clone_into(&self, target: &mut T) pub fn aya_obj::btf::Union::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::Union where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::Union where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::Union::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::Union where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::Union where T: ?core::marker::Sized pub fn aya_obj::btf::Union::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::Union where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::Union where T: ?core::marker::Sized pub fn aya_obj::btf::Union::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::Union where T: core::clone::Clone +pub unsafe fn aya_obj::btf::Union::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::Union pub fn aya_obj::btf::Union::from(t: T) -> T #[repr(C)] pub struct aya_obj::btf::Var @@ -1266,12 +1331,14 @@ impl alloc::borrow::ToOwned for aya_obj::btf::Var where T: core::clone::Clone pub type aya_obj::btf::Var::Owned = T pub fn aya_obj::btf::Var::clone_into(&self, target: &mut T) pub fn aya_obj::btf::Var::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::Var where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::Var where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::Var::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::Var where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::Var where T: ?core::marker::Sized pub fn aya_obj::btf::Var::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::Var where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::Var where T: ?core::marker::Sized pub fn aya_obj::btf::Var::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::Var where T: core::clone::Clone +pub unsafe fn aya_obj::btf::Var::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::Var pub fn aya_obj::btf::Var::from(t: T) -> T #[repr(C)] pub struct aya_obj::btf::Volatile @@ -1297,30 +1364,845 @@ impl alloc::borrow::ToOwned for aya_obj::btf::Volatile where T: core::clone:: pub type aya_obj::btf::Volatile::Owned = T pub fn aya_obj::btf::Volatile::clone_into(&self, target: &mut T) pub fn aya_obj::btf::Volatile::to_owned(&self) -> T -impl core::any::Any for aya_obj::btf::Volatile where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::btf::Volatile where T: 'static + ?core::marker::Sized pub fn aya_obj::btf::Volatile::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::btf::Volatile where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::btf::Volatile where T: ?core::marker::Sized pub fn aya_obj::btf::Volatile::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::btf::Volatile where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::btf::Volatile where T: ?core::marker::Sized pub fn aya_obj::btf::Volatile::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::btf::Volatile where T: core::clone::Clone +pub unsafe fn aya_obj::btf::Volatile::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::btf::Volatile pub fn aya_obj::btf::Volatile::from(t: T) -> T pub mod aya_obj::generated pub mod aya_obj::generated::bpf_core_relo_kind -pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_ENUMVAL_EXISTS: aya_obj::generated::bpf_core_relo_kind::Type = 10u32 -pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_ENUMVAL_VALUE: aya_obj::generated::bpf_core_relo_kind::Type = 11u32 -pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_FIELD_BYTE_OFFSET: aya_obj::generated::bpf_core_relo_kind::Type = 0u32 -pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_FIELD_BYTE_SIZE: aya_obj::generated::bpf_core_relo_kind::Type = 1u32 -pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_FIELD_EXISTS: aya_obj::generated::bpf_core_relo_kind::Type = 2u32 -pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_FIELD_LSHIFT_U64: aya_obj::generated::bpf_core_relo_kind::Type = 4u32 -pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_FIELD_RSHIFT_U64: aya_obj::generated::bpf_core_relo_kind::Type = 5u32 -pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_FIELD_SIGNED: aya_obj::generated::bpf_core_relo_kind::Type = 3u32 -pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_TYPE_EXISTS: aya_obj::generated::bpf_core_relo_kind::Type = 8u32 -pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_TYPE_ID_LOCAL: aya_obj::generated::bpf_core_relo_kind::Type = 6u32 -pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_TYPE_ID_TARGET: aya_obj::generated::bpf_core_relo_kind::Type = 7u32 -pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_TYPE_MATCHES: aya_obj::generated::bpf_core_relo_kind::Type = 12u32 -pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_TYPE_SIZE: aya_obj::generated::bpf_core_relo_kind::Type = 9u32 -pub type aya_obj::generated::bpf_core_relo_kind::Type = core::ffi::c_uint +pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_ENUMVAL_EXISTS: aya_obj::generated::bpf_core_relo_kind::Type +pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_ENUMVAL_VALUE: aya_obj::generated::bpf_core_relo_kind::Type +pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_FIELD_BYTE_OFFSET: aya_obj::generated::bpf_core_relo_kind::Type +pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_FIELD_BYTE_SIZE: aya_obj::generated::bpf_core_relo_kind::Type +pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_FIELD_EXISTS: aya_obj::generated::bpf_core_relo_kind::Type +pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_FIELD_LSHIFT_U64: aya_obj::generated::bpf_core_relo_kind::Type +pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_FIELD_RSHIFT_U64: aya_obj::generated::bpf_core_relo_kind::Type +pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_FIELD_SIGNED: aya_obj::generated::bpf_core_relo_kind::Type +pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_TYPE_EXISTS: aya_obj::generated::bpf_core_relo_kind::Type +pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_TYPE_ID_LOCAL: aya_obj::generated::bpf_core_relo_kind::Type +pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_TYPE_ID_TARGET: aya_obj::generated::bpf_core_relo_kind::Type +pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_TYPE_MATCHES: aya_obj::generated::bpf_core_relo_kind::Type +pub const aya_obj::generated::bpf_core_relo_kind::BPF_CORE_TYPE_SIZE: aya_obj::generated::bpf_core_relo_kind::Type +pub type aya_obj::generated::bpf_core_relo_kind::Type = core::ffi::primitives::c_uint +#[repr(u32)] pub enum aya_obj::generated::_bindgen_ty_1 +pub aya_obj::generated::_bindgen_ty_1::BPF_REG_0 = 0 +pub aya_obj::generated::_bindgen_ty_1::BPF_REG_1 = 1 +pub aya_obj::generated::_bindgen_ty_1::BPF_REG_10 = 10 +pub aya_obj::generated::_bindgen_ty_1::BPF_REG_2 = 2 +pub aya_obj::generated::_bindgen_ty_1::BPF_REG_3 = 3 +pub aya_obj::generated::_bindgen_ty_1::BPF_REG_4 = 4 +pub aya_obj::generated::_bindgen_ty_1::BPF_REG_5 = 5 +pub aya_obj::generated::_bindgen_ty_1::BPF_REG_6 = 6 +pub aya_obj::generated::_bindgen_ty_1::BPF_REG_7 = 7 +pub aya_obj::generated::_bindgen_ty_1::BPF_REG_8 = 8 +pub aya_obj::generated::_bindgen_ty_1::BPF_REG_9 = 9 +pub aya_obj::generated::_bindgen_ty_1::__MAX_BPF_REG = 11 +impl core::clone::Clone for aya_obj::generated::_bindgen_ty_1 +pub fn aya_obj::generated::_bindgen_ty_1::clone(&self) -> aya_obj::generated::_bindgen_ty_1 +impl core::cmp::Eq for aya_obj::generated::_bindgen_ty_1 +impl core::cmp::PartialEq for aya_obj::generated::_bindgen_ty_1 +pub fn aya_obj::generated::_bindgen_ty_1::eq(&self, other: &aya_obj::generated::_bindgen_ty_1) -> bool +impl core::fmt::Debug for aya_obj::generated::_bindgen_ty_1 +pub fn aya_obj::generated::_bindgen_ty_1::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::_bindgen_ty_1 +pub fn aya_obj::generated::_bindgen_ty_1::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::_bindgen_ty_1 +impl core::marker::StructuralPartialEq for aya_obj::generated::_bindgen_ty_1 +impl core::marker::Freeze for aya_obj::generated::_bindgen_ty_1 +impl core::marker::Send for aya_obj::generated::_bindgen_ty_1 +impl core::marker::Sync for aya_obj::generated::_bindgen_ty_1 +impl core::marker::Unpin for aya_obj::generated::_bindgen_ty_1 +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::_bindgen_ty_1 +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::_bindgen_ty_1 +impl core::convert::Into for aya_obj::generated::_bindgen_ty_1 where U: core::convert::From +pub fn aya_obj::generated::_bindgen_ty_1::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::_bindgen_ty_1 where U: core::convert::Into +pub type aya_obj::generated::_bindgen_ty_1::Error = core::convert::Infallible +pub fn aya_obj::generated::_bindgen_ty_1::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::_bindgen_ty_1 where U: core::convert::TryFrom +pub type aya_obj::generated::_bindgen_ty_1::Error = >::Error +pub fn aya_obj::generated::_bindgen_ty_1::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::_bindgen_ty_1 where T: core::clone::Clone +pub type aya_obj::generated::_bindgen_ty_1::Owned = T +pub fn aya_obj::generated::_bindgen_ty_1::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::_bindgen_ty_1::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::_bindgen_ty_1 where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_1::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::_bindgen_ty_1 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_1::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::_bindgen_ty_1 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::_bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::_bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::_bindgen_ty_1 +pub fn aya_obj::generated::_bindgen_ty_1::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::_bindgen_ty_16 +pub aya_obj::generated::_bindgen_ty_16::BPF_CSUM_LEVEL_DEC = 2 +pub aya_obj::generated::_bindgen_ty_16::BPF_CSUM_LEVEL_INC = 1 +pub aya_obj::generated::_bindgen_ty_16::BPF_CSUM_LEVEL_QUERY = 0 +pub aya_obj::generated::_bindgen_ty_16::BPF_CSUM_LEVEL_RESET = 3 +impl core::clone::Clone for aya_obj::generated::_bindgen_ty_16 +pub fn aya_obj::generated::_bindgen_ty_16::clone(&self) -> aya_obj::generated::_bindgen_ty_16 +impl core::cmp::Eq for aya_obj::generated::_bindgen_ty_16 +impl core::cmp::PartialEq for aya_obj::generated::_bindgen_ty_16 +pub fn aya_obj::generated::_bindgen_ty_16::eq(&self, other: &aya_obj::generated::_bindgen_ty_16) -> bool +impl core::fmt::Debug for aya_obj::generated::_bindgen_ty_16 +pub fn aya_obj::generated::_bindgen_ty_16::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::_bindgen_ty_16 +pub fn aya_obj::generated::_bindgen_ty_16::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::_bindgen_ty_16 +impl core::marker::StructuralPartialEq for aya_obj::generated::_bindgen_ty_16 +impl core::marker::Freeze for aya_obj::generated::_bindgen_ty_16 +impl core::marker::Send for aya_obj::generated::_bindgen_ty_16 +impl core::marker::Sync for aya_obj::generated::_bindgen_ty_16 +impl core::marker::Unpin for aya_obj::generated::_bindgen_ty_16 +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::_bindgen_ty_16 +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::_bindgen_ty_16 +impl core::convert::Into for aya_obj::generated::_bindgen_ty_16 where U: core::convert::From +pub fn aya_obj::generated::_bindgen_ty_16::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::_bindgen_ty_16 where U: core::convert::Into +pub type aya_obj::generated::_bindgen_ty_16::Error = core::convert::Infallible +pub fn aya_obj::generated::_bindgen_ty_16::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::_bindgen_ty_16 where U: core::convert::TryFrom +pub type aya_obj::generated::_bindgen_ty_16::Error = >::Error +pub fn aya_obj::generated::_bindgen_ty_16::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::_bindgen_ty_16 where T: core::clone::Clone +pub type aya_obj::generated::_bindgen_ty_16::Owned = T +pub fn aya_obj::generated::_bindgen_ty_16::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::_bindgen_ty_16::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::_bindgen_ty_16 where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_16::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::_bindgen_ty_16 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_16::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::_bindgen_ty_16 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_16::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::_bindgen_ty_16 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::_bindgen_ty_16::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::_bindgen_ty_16 +pub fn aya_obj::generated::_bindgen_ty_16::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::_bindgen_ty_18 +pub aya_obj::generated::_bindgen_ty_18::BPF_ADJ_ROOM_ENCAP_L2_MASK = 255 +pub aya_obj::generated::_bindgen_ty_18::BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 56 +impl core::clone::Clone for aya_obj::generated::_bindgen_ty_18 +pub fn aya_obj::generated::_bindgen_ty_18::clone(&self) -> aya_obj::generated::_bindgen_ty_18 +impl core::cmp::Eq for aya_obj::generated::_bindgen_ty_18 +impl core::cmp::PartialEq for aya_obj::generated::_bindgen_ty_18 +pub fn aya_obj::generated::_bindgen_ty_18::eq(&self, other: &aya_obj::generated::_bindgen_ty_18) -> bool +impl core::fmt::Debug for aya_obj::generated::_bindgen_ty_18 +pub fn aya_obj::generated::_bindgen_ty_18::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::_bindgen_ty_18 +pub fn aya_obj::generated::_bindgen_ty_18::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::_bindgen_ty_18 +impl core::marker::StructuralPartialEq for aya_obj::generated::_bindgen_ty_18 +impl core::marker::Freeze for aya_obj::generated::_bindgen_ty_18 +impl core::marker::Send for aya_obj::generated::_bindgen_ty_18 +impl core::marker::Sync for aya_obj::generated::_bindgen_ty_18 +impl core::marker::Unpin for aya_obj::generated::_bindgen_ty_18 +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::_bindgen_ty_18 +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::_bindgen_ty_18 +impl core::convert::Into for aya_obj::generated::_bindgen_ty_18 where U: core::convert::From +pub fn aya_obj::generated::_bindgen_ty_18::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::_bindgen_ty_18 where U: core::convert::Into +pub type aya_obj::generated::_bindgen_ty_18::Error = core::convert::Infallible +pub fn aya_obj::generated::_bindgen_ty_18::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::_bindgen_ty_18 where U: core::convert::TryFrom +pub type aya_obj::generated::_bindgen_ty_18::Error = >::Error +pub fn aya_obj::generated::_bindgen_ty_18::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::_bindgen_ty_18 where T: core::clone::Clone +pub type aya_obj::generated::_bindgen_ty_18::Owned = T +pub fn aya_obj::generated::_bindgen_ty_18::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::_bindgen_ty_18::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::_bindgen_ty_18 where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_18::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::_bindgen_ty_18 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_18::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::_bindgen_ty_18 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_18::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::_bindgen_ty_18 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::_bindgen_ty_18::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::_bindgen_ty_18 +pub fn aya_obj::generated::_bindgen_ty_18::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::_bindgen_ty_20 +pub aya_obj::generated::_bindgen_ty_20::BPF_LOCAL_STORAGE_GET_F_CREATE = 1 +impl core::clone::Clone for aya_obj::generated::_bindgen_ty_20 +pub fn aya_obj::generated::_bindgen_ty_20::clone(&self) -> aya_obj::generated::_bindgen_ty_20 +impl core::cmp::Eq for aya_obj::generated::_bindgen_ty_20 +impl core::cmp::PartialEq for aya_obj::generated::_bindgen_ty_20 +pub fn aya_obj::generated::_bindgen_ty_20::eq(&self, other: &aya_obj::generated::_bindgen_ty_20) -> bool +impl core::fmt::Debug for aya_obj::generated::_bindgen_ty_20 +pub fn aya_obj::generated::_bindgen_ty_20::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::_bindgen_ty_20 +pub fn aya_obj::generated::_bindgen_ty_20::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::_bindgen_ty_20 +impl core::marker::StructuralPartialEq for aya_obj::generated::_bindgen_ty_20 +impl core::marker::Freeze for aya_obj::generated::_bindgen_ty_20 +impl core::marker::Send for aya_obj::generated::_bindgen_ty_20 +impl core::marker::Sync for aya_obj::generated::_bindgen_ty_20 +impl core::marker::Unpin for aya_obj::generated::_bindgen_ty_20 +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::_bindgen_ty_20 +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::_bindgen_ty_20 +impl core::convert::Into for aya_obj::generated::_bindgen_ty_20 where U: core::convert::From +pub fn aya_obj::generated::_bindgen_ty_20::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::_bindgen_ty_20 where U: core::convert::Into +pub type aya_obj::generated::_bindgen_ty_20::Error = core::convert::Infallible +pub fn aya_obj::generated::_bindgen_ty_20::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::_bindgen_ty_20 where U: core::convert::TryFrom +pub type aya_obj::generated::_bindgen_ty_20::Error = >::Error +pub fn aya_obj::generated::_bindgen_ty_20::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::_bindgen_ty_20 where T: core::clone::Clone +pub type aya_obj::generated::_bindgen_ty_20::Owned = T +pub fn aya_obj::generated::_bindgen_ty_20::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::_bindgen_ty_20::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::_bindgen_ty_20 where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_20::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::_bindgen_ty_20 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_20::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::_bindgen_ty_20 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_20::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::_bindgen_ty_20 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::_bindgen_ty_20::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::_bindgen_ty_20 +pub fn aya_obj::generated::_bindgen_ty_20::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::_bindgen_ty_22 +pub aya_obj::generated::_bindgen_ty_22::BPF_RB_FORCE_WAKEUP = 2 +pub aya_obj::generated::_bindgen_ty_22::BPF_RB_NO_WAKEUP = 1 +impl core::clone::Clone for aya_obj::generated::_bindgen_ty_22 +pub fn aya_obj::generated::_bindgen_ty_22::clone(&self) -> aya_obj::generated::_bindgen_ty_22 +impl core::cmp::Eq for aya_obj::generated::_bindgen_ty_22 +impl core::cmp::PartialEq for aya_obj::generated::_bindgen_ty_22 +pub fn aya_obj::generated::_bindgen_ty_22::eq(&self, other: &aya_obj::generated::_bindgen_ty_22) -> bool +impl core::fmt::Debug for aya_obj::generated::_bindgen_ty_22 +pub fn aya_obj::generated::_bindgen_ty_22::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::_bindgen_ty_22 +pub fn aya_obj::generated::_bindgen_ty_22::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::_bindgen_ty_22 +impl core::marker::StructuralPartialEq for aya_obj::generated::_bindgen_ty_22 +impl core::marker::Freeze for aya_obj::generated::_bindgen_ty_22 +impl core::marker::Send for aya_obj::generated::_bindgen_ty_22 +impl core::marker::Sync for aya_obj::generated::_bindgen_ty_22 +impl core::marker::Unpin for aya_obj::generated::_bindgen_ty_22 +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::_bindgen_ty_22 +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::_bindgen_ty_22 +impl core::convert::Into for aya_obj::generated::_bindgen_ty_22 where U: core::convert::From +pub fn aya_obj::generated::_bindgen_ty_22::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::_bindgen_ty_22 where U: core::convert::Into +pub type aya_obj::generated::_bindgen_ty_22::Error = core::convert::Infallible +pub fn aya_obj::generated::_bindgen_ty_22::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::_bindgen_ty_22 where U: core::convert::TryFrom +pub type aya_obj::generated::_bindgen_ty_22::Error = >::Error +pub fn aya_obj::generated::_bindgen_ty_22::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::_bindgen_ty_22 where T: core::clone::Clone +pub type aya_obj::generated::_bindgen_ty_22::Owned = T +pub fn aya_obj::generated::_bindgen_ty_22::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::_bindgen_ty_22::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::_bindgen_ty_22 where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_22::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::_bindgen_ty_22 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_22::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::_bindgen_ty_22 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_22::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::_bindgen_ty_22 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::_bindgen_ty_22::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::_bindgen_ty_22 +pub fn aya_obj::generated::_bindgen_ty_22::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::_bindgen_ty_23 +pub aya_obj::generated::_bindgen_ty_23::BPF_RB_AVAIL_DATA = 0 +pub aya_obj::generated::_bindgen_ty_23::BPF_RB_CONS_POS = 2 +pub aya_obj::generated::_bindgen_ty_23::BPF_RB_PROD_POS = 3 +pub aya_obj::generated::_bindgen_ty_23::BPF_RB_RING_SIZE = 1 +impl core::clone::Clone for aya_obj::generated::_bindgen_ty_23 +pub fn aya_obj::generated::_bindgen_ty_23::clone(&self) -> aya_obj::generated::_bindgen_ty_23 +impl core::cmp::Eq for aya_obj::generated::_bindgen_ty_23 +impl core::cmp::PartialEq for aya_obj::generated::_bindgen_ty_23 +pub fn aya_obj::generated::_bindgen_ty_23::eq(&self, other: &aya_obj::generated::_bindgen_ty_23) -> bool +impl core::fmt::Debug for aya_obj::generated::_bindgen_ty_23 +pub fn aya_obj::generated::_bindgen_ty_23::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::_bindgen_ty_23 +pub fn aya_obj::generated::_bindgen_ty_23::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::_bindgen_ty_23 +impl core::marker::StructuralPartialEq for aya_obj::generated::_bindgen_ty_23 +impl core::marker::Freeze for aya_obj::generated::_bindgen_ty_23 +impl core::marker::Send for aya_obj::generated::_bindgen_ty_23 +impl core::marker::Sync for aya_obj::generated::_bindgen_ty_23 +impl core::marker::Unpin for aya_obj::generated::_bindgen_ty_23 +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::_bindgen_ty_23 +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::_bindgen_ty_23 +impl core::convert::Into for aya_obj::generated::_bindgen_ty_23 where U: core::convert::From +pub fn aya_obj::generated::_bindgen_ty_23::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::_bindgen_ty_23 where U: core::convert::Into +pub type aya_obj::generated::_bindgen_ty_23::Error = core::convert::Infallible +pub fn aya_obj::generated::_bindgen_ty_23::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::_bindgen_ty_23 where U: core::convert::TryFrom +pub type aya_obj::generated::_bindgen_ty_23::Error = >::Error +pub fn aya_obj::generated::_bindgen_ty_23::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::_bindgen_ty_23 where T: core::clone::Clone +pub type aya_obj::generated::_bindgen_ty_23::Owned = T +pub fn aya_obj::generated::_bindgen_ty_23::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::_bindgen_ty_23::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::_bindgen_ty_23 where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_23::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::_bindgen_ty_23 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_23::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::_bindgen_ty_23 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_23::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::_bindgen_ty_23 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::_bindgen_ty_23::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::_bindgen_ty_23 +pub fn aya_obj::generated::_bindgen_ty_23::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::_bindgen_ty_25 +pub aya_obj::generated::_bindgen_ty_25::BPF_SK_LOOKUP_F_NO_REUSEPORT = 2 +pub aya_obj::generated::_bindgen_ty_25::BPF_SK_LOOKUP_F_REPLACE = 1 +impl core::clone::Clone for aya_obj::generated::_bindgen_ty_25 +pub fn aya_obj::generated::_bindgen_ty_25::clone(&self) -> aya_obj::generated::_bindgen_ty_25 +impl core::cmp::Eq for aya_obj::generated::_bindgen_ty_25 +impl core::cmp::PartialEq for aya_obj::generated::_bindgen_ty_25 +pub fn aya_obj::generated::_bindgen_ty_25::eq(&self, other: &aya_obj::generated::_bindgen_ty_25) -> bool +impl core::fmt::Debug for aya_obj::generated::_bindgen_ty_25 +pub fn aya_obj::generated::_bindgen_ty_25::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::_bindgen_ty_25 +pub fn aya_obj::generated::_bindgen_ty_25::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::_bindgen_ty_25 +impl core::marker::StructuralPartialEq for aya_obj::generated::_bindgen_ty_25 +impl core::marker::Freeze for aya_obj::generated::_bindgen_ty_25 +impl core::marker::Send for aya_obj::generated::_bindgen_ty_25 +impl core::marker::Sync for aya_obj::generated::_bindgen_ty_25 +impl core::marker::Unpin for aya_obj::generated::_bindgen_ty_25 +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::_bindgen_ty_25 +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::_bindgen_ty_25 +impl core::convert::Into for aya_obj::generated::_bindgen_ty_25 where U: core::convert::From +pub fn aya_obj::generated::_bindgen_ty_25::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::_bindgen_ty_25 where U: core::convert::Into +pub type aya_obj::generated::_bindgen_ty_25::Error = core::convert::Infallible +pub fn aya_obj::generated::_bindgen_ty_25::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::_bindgen_ty_25 where U: core::convert::TryFrom +pub type aya_obj::generated::_bindgen_ty_25::Error = >::Error +pub fn aya_obj::generated::_bindgen_ty_25::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::_bindgen_ty_25 where T: core::clone::Clone +pub type aya_obj::generated::_bindgen_ty_25::Owned = T +pub fn aya_obj::generated::_bindgen_ty_25::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::_bindgen_ty_25::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::_bindgen_ty_25 where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_25::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::_bindgen_ty_25 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_25::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::_bindgen_ty_25 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_25::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::_bindgen_ty_25 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::_bindgen_ty_25::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::_bindgen_ty_25 +pub fn aya_obj::generated::_bindgen_ty_25::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::_bindgen_ty_28 +pub aya_obj::generated::_bindgen_ty_28::BPF_SKB_TSTAMP_DELIVERY_MONO = 1 +pub aya_obj::generated::_bindgen_ty_28::BPF_SKB_TSTAMP_UNSPEC = 0 +impl core::clone::Clone for aya_obj::generated::_bindgen_ty_28 +pub fn aya_obj::generated::_bindgen_ty_28::clone(&self) -> aya_obj::generated::_bindgen_ty_28 +impl core::cmp::Eq for aya_obj::generated::_bindgen_ty_28 +impl core::cmp::PartialEq for aya_obj::generated::_bindgen_ty_28 +pub fn aya_obj::generated::_bindgen_ty_28::eq(&self, other: &aya_obj::generated::_bindgen_ty_28) -> bool +impl core::fmt::Debug for aya_obj::generated::_bindgen_ty_28 +pub fn aya_obj::generated::_bindgen_ty_28::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::_bindgen_ty_28 +pub fn aya_obj::generated::_bindgen_ty_28::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::_bindgen_ty_28 +impl core::marker::StructuralPartialEq for aya_obj::generated::_bindgen_ty_28 +impl core::marker::Freeze for aya_obj::generated::_bindgen_ty_28 +impl core::marker::Send for aya_obj::generated::_bindgen_ty_28 +impl core::marker::Sync for aya_obj::generated::_bindgen_ty_28 +impl core::marker::Unpin for aya_obj::generated::_bindgen_ty_28 +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::_bindgen_ty_28 +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::_bindgen_ty_28 +impl core::convert::Into for aya_obj::generated::_bindgen_ty_28 where U: core::convert::From +pub fn aya_obj::generated::_bindgen_ty_28::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::_bindgen_ty_28 where U: core::convert::Into +pub type aya_obj::generated::_bindgen_ty_28::Error = core::convert::Infallible +pub fn aya_obj::generated::_bindgen_ty_28::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::_bindgen_ty_28 where U: core::convert::TryFrom +pub type aya_obj::generated::_bindgen_ty_28::Error = >::Error +pub fn aya_obj::generated::_bindgen_ty_28::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::_bindgen_ty_28 where T: core::clone::Clone +pub type aya_obj::generated::_bindgen_ty_28::Owned = T +pub fn aya_obj::generated::_bindgen_ty_28::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::_bindgen_ty_28::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::_bindgen_ty_28 where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_28::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::_bindgen_ty_28 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_28::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::_bindgen_ty_28 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_28::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::_bindgen_ty_28 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::_bindgen_ty_28::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::_bindgen_ty_28 +pub fn aya_obj::generated::_bindgen_ty_28::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::_bindgen_ty_29 +pub aya_obj::generated::_bindgen_ty_29::BPF_SOCK_OPS_ALL_CB_FLAGS = 127 +pub aya_obj::generated::_bindgen_ty_29::BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG = 16 +pub aya_obj::generated::_bindgen_ty_29::BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG = 32 +pub aya_obj::generated::_bindgen_ty_29::BPF_SOCK_OPS_RETRANS_CB_FLAG = 2 +pub aya_obj::generated::_bindgen_ty_29::BPF_SOCK_OPS_RTO_CB_FLAG = 1 +pub aya_obj::generated::_bindgen_ty_29::BPF_SOCK_OPS_RTT_CB_FLAG = 8 +pub aya_obj::generated::_bindgen_ty_29::BPF_SOCK_OPS_STATE_CB_FLAG = 4 +pub aya_obj::generated::_bindgen_ty_29::BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG = 64 +impl core::clone::Clone for aya_obj::generated::_bindgen_ty_29 +pub fn aya_obj::generated::_bindgen_ty_29::clone(&self) -> aya_obj::generated::_bindgen_ty_29 +impl core::cmp::Eq for aya_obj::generated::_bindgen_ty_29 +impl core::cmp::PartialEq for aya_obj::generated::_bindgen_ty_29 +pub fn aya_obj::generated::_bindgen_ty_29::eq(&self, other: &aya_obj::generated::_bindgen_ty_29) -> bool +impl core::fmt::Debug for aya_obj::generated::_bindgen_ty_29 +pub fn aya_obj::generated::_bindgen_ty_29::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::_bindgen_ty_29 +pub fn aya_obj::generated::_bindgen_ty_29::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::_bindgen_ty_29 +impl core::marker::StructuralPartialEq for aya_obj::generated::_bindgen_ty_29 +impl core::marker::Freeze for aya_obj::generated::_bindgen_ty_29 +impl core::marker::Send for aya_obj::generated::_bindgen_ty_29 +impl core::marker::Sync for aya_obj::generated::_bindgen_ty_29 +impl core::marker::Unpin for aya_obj::generated::_bindgen_ty_29 +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::_bindgen_ty_29 +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::_bindgen_ty_29 +impl core::convert::Into for aya_obj::generated::_bindgen_ty_29 where U: core::convert::From +pub fn aya_obj::generated::_bindgen_ty_29::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::_bindgen_ty_29 where U: core::convert::Into +pub type aya_obj::generated::_bindgen_ty_29::Error = core::convert::Infallible +pub fn aya_obj::generated::_bindgen_ty_29::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::_bindgen_ty_29 where U: core::convert::TryFrom +pub type aya_obj::generated::_bindgen_ty_29::Error = >::Error +pub fn aya_obj::generated::_bindgen_ty_29::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::_bindgen_ty_29 where T: core::clone::Clone +pub type aya_obj::generated::_bindgen_ty_29::Owned = T +pub fn aya_obj::generated::_bindgen_ty_29::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::_bindgen_ty_29::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::_bindgen_ty_29 where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_29::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::_bindgen_ty_29 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_29::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::_bindgen_ty_29 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_29::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::_bindgen_ty_29 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::_bindgen_ty_29::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::_bindgen_ty_29 +pub fn aya_obj::generated::_bindgen_ty_29::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::_bindgen_ty_30 +pub aya_obj::generated::_bindgen_ty_30::BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 4 +pub aya_obj::generated::_bindgen_ty_30::BPF_SOCK_OPS_BASE_RTT = 7 +pub aya_obj::generated::_bindgen_ty_30::BPF_SOCK_OPS_HDR_OPT_LEN_CB = 14 +pub aya_obj::generated::_bindgen_ty_30::BPF_SOCK_OPS_NEEDS_ECN = 6 +pub aya_obj::generated::_bindgen_ty_30::BPF_SOCK_OPS_PARSE_HDR_OPT_CB = 13 +pub aya_obj::generated::_bindgen_ty_30::BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 5 +pub aya_obj::generated::_bindgen_ty_30::BPF_SOCK_OPS_RETRANS_CB = 9 +pub aya_obj::generated::_bindgen_ty_30::BPF_SOCK_OPS_RTO_CB = 8 +pub aya_obj::generated::_bindgen_ty_30::BPF_SOCK_OPS_RTT_CB = 12 +pub aya_obj::generated::_bindgen_ty_30::BPF_SOCK_OPS_RWND_INIT = 2 +pub aya_obj::generated::_bindgen_ty_30::BPF_SOCK_OPS_STATE_CB = 10 +pub aya_obj::generated::_bindgen_ty_30::BPF_SOCK_OPS_TCP_CONNECT_CB = 3 +pub aya_obj::generated::_bindgen_ty_30::BPF_SOCK_OPS_TCP_LISTEN_CB = 11 +pub aya_obj::generated::_bindgen_ty_30::BPF_SOCK_OPS_TIMEOUT_INIT = 1 +pub aya_obj::generated::_bindgen_ty_30::BPF_SOCK_OPS_VOID = 0 +pub aya_obj::generated::_bindgen_ty_30::BPF_SOCK_OPS_WRITE_HDR_OPT_CB = 15 +impl core::clone::Clone for aya_obj::generated::_bindgen_ty_30 +pub fn aya_obj::generated::_bindgen_ty_30::clone(&self) -> aya_obj::generated::_bindgen_ty_30 +impl core::cmp::Eq for aya_obj::generated::_bindgen_ty_30 +impl core::cmp::PartialEq for aya_obj::generated::_bindgen_ty_30 +pub fn aya_obj::generated::_bindgen_ty_30::eq(&self, other: &aya_obj::generated::_bindgen_ty_30) -> bool +impl core::fmt::Debug for aya_obj::generated::_bindgen_ty_30 +pub fn aya_obj::generated::_bindgen_ty_30::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::_bindgen_ty_30 +pub fn aya_obj::generated::_bindgen_ty_30::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::_bindgen_ty_30 +impl core::marker::StructuralPartialEq for aya_obj::generated::_bindgen_ty_30 +impl core::marker::Freeze for aya_obj::generated::_bindgen_ty_30 +impl core::marker::Send for aya_obj::generated::_bindgen_ty_30 +impl core::marker::Sync for aya_obj::generated::_bindgen_ty_30 +impl core::marker::Unpin for aya_obj::generated::_bindgen_ty_30 +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::_bindgen_ty_30 +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::_bindgen_ty_30 +impl core::convert::Into for aya_obj::generated::_bindgen_ty_30 where U: core::convert::From +pub fn aya_obj::generated::_bindgen_ty_30::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::_bindgen_ty_30 where U: core::convert::Into +pub type aya_obj::generated::_bindgen_ty_30::Error = core::convert::Infallible +pub fn aya_obj::generated::_bindgen_ty_30::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::_bindgen_ty_30 where U: core::convert::TryFrom +pub type aya_obj::generated::_bindgen_ty_30::Error = >::Error +pub fn aya_obj::generated::_bindgen_ty_30::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::_bindgen_ty_30 where T: core::clone::Clone +pub type aya_obj::generated::_bindgen_ty_30::Owned = T +pub fn aya_obj::generated::_bindgen_ty_30::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::_bindgen_ty_30::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::_bindgen_ty_30 where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_30::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::_bindgen_ty_30 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_30::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::_bindgen_ty_30 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_30::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::_bindgen_ty_30 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::_bindgen_ty_30::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::_bindgen_ty_30 +pub fn aya_obj::generated::_bindgen_ty_30::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::_bindgen_ty_31 +pub aya_obj::generated::_bindgen_ty_31::BPF_TCP_BOUND_INACTIVE = 13 +pub aya_obj::generated::_bindgen_ty_31::BPF_TCP_CLOSE = 7 +pub aya_obj::generated::_bindgen_ty_31::BPF_TCP_CLOSE_WAIT = 8 +pub aya_obj::generated::_bindgen_ty_31::BPF_TCP_CLOSING = 11 +pub aya_obj::generated::_bindgen_ty_31::BPF_TCP_ESTABLISHED = 1 +pub aya_obj::generated::_bindgen_ty_31::BPF_TCP_FIN_WAIT1 = 4 +pub aya_obj::generated::_bindgen_ty_31::BPF_TCP_FIN_WAIT2 = 5 +pub aya_obj::generated::_bindgen_ty_31::BPF_TCP_LAST_ACK = 9 +pub aya_obj::generated::_bindgen_ty_31::BPF_TCP_LISTEN = 10 +pub aya_obj::generated::_bindgen_ty_31::BPF_TCP_MAX_STATES = 14 +pub aya_obj::generated::_bindgen_ty_31::BPF_TCP_NEW_SYN_RECV = 12 +pub aya_obj::generated::_bindgen_ty_31::BPF_TCP_SYN_RECV = 3 +pub aya_obj::generated::_bindgen_ty_31::BPF_TCP_SYN_SENT = 2 +pub aya_obj::generated::_bindgen_ty_31::BPF_TCP_TIME_WAIT = 6 +impl core::clone::Clone for aya_obj::generated::_bindgen_ty_31 +pub fn aya_obj::generated::_bindgen_ty_31::clone(&self) -> aya_obj::generated::_bindgen_ty_31 +impl core::cmp::Eq for aya_obj::generated::_bindgen_ty_31 +impl core::cmp::PartialEq for aya_obj::generated::_bindgen_ty_31 +pub fn aya_obj::generated::_bindgen_ty_31::eq(&self, other: &aya_obj::generated::_bindgen_ty_31) -> bool +impl core::fmt::Debug for aya_obj::generated::_bindgen_ty_31 +pub fn aya_obj::generated::_bindgen_ty_31::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::_bindgen_ty_31 +pub fn aya_obj::generated::_bindgen_ty_31::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::_bindgen_ty_31 +impl core::marker::StructuralPartialEq for aya_obj::generated::_bindgen_ty_31 +impl core::marker::Freeze for aya_obj::generated::_bindgen_ty_31 +impl core::marker::Send for aya_obj::generated::_bindgen_ty_31 +impl core::marker::Sync for aya_obj::generated::_bindgen_ty_31 +impl core::marker::Unpin for aya_obj::generated::_bindgen_ty_31 +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::_bindgen_ty_31 +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::_bindgen_ty_31 +impl core::convert::Into for aya_obj::generated::_bindgen_ty_31 where U: core::convert::From +pub fn aya_obj::generated::_bindgen_ty_31::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::_bindgen_ty_31 where U: core::convert::Into +pub type aya_obj::generated::_bindgen_ty_31::Error = core::convert::Infallible +pub fn aya_obj::generated::_bindgen_ty_31::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::_bindgen_ty_31 where U: core::convert::TryFrom +pub type aya_obj::generated::_bindgen_ty_31::Error = >::Error +pub fn aya_obj::generated::_bindgen_ty_31::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::_bindgen_ty_31 where T: core::clone::Clone +pub type aya_obj::generated::_bindgen_ty_31::Owned = T +pub fn aya_obj::generated::_bindgen_ty_31::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::_bindgen_ty_31::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::_bindgen_ty_31 where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_31::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::_bindgen_ty_31 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_31::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::_bindgen_ty_31 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_31::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::_bindgen_ty_31 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::_bindgen_ty_31::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::_bindgen_ty_31 +pub fn aya_obj::generated::_bindgen_ty_31::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::_bindgen_ty_33 +pub aya_obj::generated::_bindgen_ty_33::BPF_LOAD_HDR_OPT_TCP_SYN = 1 +impl core::clone::Clone for aya_obj::generated::_bindgen_ty_33 +pub fn aya_obj::generated::_bindgen_ty_33::clone(&self) -> aya_obj::generated::_bindgen_ty_33 +impl core::cmp::Eq for aya_obj::generated::_bindgen_ty_33 +impl core::cmp::PartialEq for aya_obj::generated::_bindgen_ty_33 +pub fn aya_obj::generated::_bindgen_ty_33::eq(&self, other: &aya_obj::generated::_bindgen_ty_33) -> bool +impl core::fmt::Debug for aya_obj::generated::_bindgen_ty_33 +pub fn aya_obj::generated::_bindgen_ty_33::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::_bindgen_ty_33 +pub fn aya_obj::generated::_bindgen_ty_33::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::_bindgen_ty_33 +impl core::marker::StructuralPartialEq for aya_obj::generated::_bindgen_ty_33 +impl core::marker::Freeze for aya_obj::generated::_bindgen_ty_33 +impl core::marker::Send for aya_obj::generated::_bindgen_ty_33 +impl core::marker::Sync for aya_obj::generated::_bindgen_ty_33 +impl core::marker::Unpin for aya_obj::generated::_bindgen_ty_33 +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::_bindgen_ty_33 +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::_bindgen_ty_33 +impl core::convert::Into for aya_obj::generated::_bindgen_ty_33 where U: core::convert::From +pub fn aya_obj::generated::_bindgen_ty_33::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::_bindgen_ty_33 where U: core::convert::Into +pub type aya_obj::generated::_bindgen_ty_33::Error = core::convert::Infallible +pub fn aya_obj::generated::_bindgen_ty_33::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::_bindgen_ty_33 where U: core::convert::TryFrom +pub type aya_obj::generated::_bindgen_ty_33::Error = >::Error +pub fn aya_obj::generated::_bindgen_ty_33::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::_bindgen_ty_33 where T: core::clone::Clone +pub type aya_obj::generated::_bindgen_ty_33::Owned = T +pub fn aya_obj::generated::_bindgen_ty_33::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::_bindgen_ty_33::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::_bindgen_ty_33 where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_33::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::_bindgen_ty_33 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_33::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::_bindgen_ty_33 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_33::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::_bindgen_ty_33 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::_bindgen_ty_33::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::_bindgen_ty_33 +pub fn aya_obj::generated::_bindgen_ty_33::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::_bindgen_ty_34 +pub aya_obj::generated::_bindgen_ty_34::BPF_WRITE_HDR_TCP_CURRENT_MSS = 1 +pub aya_obj::generated::_bindgen_ty_34::BPF_WRITE_HDR_TCP_SYNACK_COOKIE = 2 +impl core::clone::Clone for aya_obj::generated::_bindgen_ty_34 +pub fn aya_obj::generated::_bindgen_ty_34::clone(&self) -> aya_obj::generated::_bindgen_ty_34 +impl core::cmp::Eq for aya_obj::generated::_bindgen_ty_34 +impl core::cmp::PartialEq for aya_obj::generated::_bindgen_ty_34 +pub fn aya_obj::generated::_bindgen_ty_34::eq(&self, other: &aya_obj::generated::_bindgen_ty_34) -> bool +impl core::fmt::Debug for aya_obj::generated::_bindgen_ty_34 +pub fn aya_obj::generated::_bindgen_ty_34::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::_bindgen_ty_34 +pub fn aya_obj::generated::_bindgen_ty_34::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::_bindgen_ty_34 +impl core::marker::StructuralPartialEq for aya_obj::generated::_bindgen_ty_34 +impl core::marker::Freeze for aya_obj::generated::_bindgen_ty_34 +impl core::marker::Send for aya_obj::generated::_bindgen_ty_34 +impl core::marker::Sync for aya_obj::generated::_bindgen_ty_34 +impl core::marker::Unpin for aya_obj::generated::_bindgen_ty_34 +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::_bindgen_ty_34 +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::_bindgen_ty_34 +impl core::convert::Into for aya_obj::generated::_bindgen_ty_34 where U: core::convert::From +pub fn aya_obj::generated::_bindgen_ty_34::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::_bindgen_ty_34 where U: core::convert::Into +pub type aya_obj::generated::_bindgen_ty_34::Error = core::convert::Infallible +pub fn aya_obj::generated::_bindgen_ty_34::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::_bindgen_ty_34 where U: core::convert::TryFrom +pub type aya_obj::generated::_bindgen_ty_34::Error = >::Error +pub fn aya_obj::generated::_bindgen_ty_34::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::_bindgen_ty_34 where T: core::clone::Clone +pub type aya_obj::generated::_bindgen_ty_34::Owned = T +pub fn aya_obj::generated::_bindgen_ty_34::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::_bindgen_ty_34::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::_bindgen_ty_34 where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_34::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::_bindgen_ty_34 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_34::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::_bindgen_ty_34 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_34::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::_bindgen_ty_34 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::_bindgen_ty_34::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::_bindgen_ty_34 +pub fn aya_obj::generated::_bindgen_ty_34::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::_bindgen_ty_35 +pub aya_obj::generated::_bindgen_ty_35::BPF_DEVCG_ACC_MKNOD = 1 +pub aya_obj::generated::_bindgen_ty_35::BPF_DEVCG_ACC_READ = 2 +pub aya_obj::generated::_bindgen_ty_35::BPF_DEVCG_ACC_WRITE = 4 +impl core::clone::Clone for aya_obj::generated::_bindgen_ty_35 +pub fn aya_obj::generated::_bindgen_ty_35::clone(&self) -> aya_obj::generated::_bindgen_ty_35 +impl core::cmp::Eq for aya_obj::generated::_bindgen_ty_35 +impl core::cmp::PartialEq for aya_obj::generated::_bindgen_ty_35 +pub fn aya_obj::generated::_bindgen_ty_35::eq(&self, other: &aya_obj::generated::_bindgen_ty_35) -> bool +impl core::fmt::Debug for aya_obj::generated::_bindgen_ty_35 +pub fn aya_obj::generated::_bindgen_ty_35::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::_bindgen_ty_35 +pub fn aya_obj::generated::_bindgen_ty_35::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::_bindgen_ty_35 +impl core::marker::StructuralPartialEq for aya_obj::generated::_bindgen_ty_35 +impl core::marker::Freeze for aya_obj::generated::_bindgen_ty_35 +impl core::marker::Send for aya_obj::generated::_bindgen_ty_35 +impl core::marker::Sync for aya_obj::generated::_bindgen_ty_35 +impl core::marker::Unpin for aya_obj::generated::_bindgen_ty_35 +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::_bindgen_ty_35 +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::_bindgen_ty_35 +impl core::convert::Into for aya_obj::generated::_bindgen_ty_35 where U: core::convert::From +pub fn aya_obj::generated::_bindgen_ty_35::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::_bindgen_ty_35 where U: core::convert::Into +pub type aya_obj::generated::_bindgen_ty_35::Error = core::convert::Infallible +pub fn aya_obj::generated::_bindgen_ty_35::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::_bindgen_ty_35 where U: core::convert::TryFrom +pub type aya_obj::generated::_bindgen_ty_35::Error = >::Error +pub fn aya_obj::generated::_bindgen_ty_35::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::_bindgen_ty_35 where T: core::clone::Clone +pub type aya_obj::generated::_bindgen_ty_35::Owned = T +pub fn aya_obj::generated::_bindgen_ty_35::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::_bindgen_ty_35::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::_bindgen_ty_35 where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_35::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::_bindgen_ty_35 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_35::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::_bindgen_ty_35 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_35::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::_bindgen_ty_35 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::_bindgen_ty_35::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::_bindgen_ty_35 +pub fn aya_obj::generated::_bindgen_ty_35::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::_bindgen_ty_36 +pub aya_obj::generated::_bindgen_ty_36::BPF_DEVCG_DEV_BLOCK = 1 +pub aya_obj::generated::_bindgen_ty_36::BPF_DEVCG_DEV_CHAR = 2 +impl core::clone::Clone for aya_obj::generated::_bindgen_ty_36 +pub fn aya_obj::generated::_bindgen_ty_36::clone(&self) -> aya_obj::generated::_bindgen_ty_36 +impl core::cmp::Eq for aya_obj::generated::_bindgen_ty_36 +impl core::cmp::PartialEq for aya_obj::generated::_bindgen_ty_36 +pub fn aya_obj::generated::_bindgen_ty_36::eq(&self, other: &aya_obj::generated::_bindgen_ty_36) -> bool +impl core::fmt::Debug for aya_obj::generated::_bindgen_ty_36 +pub fn aya_obj::generated::_bindgen_ty_36::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::_bindgen_ty_36 +pub fn aya_obj::generated::_bindgen_ty_36::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::_bindgen_ty_36 +impl core::marker::StructuralPartialEq for aya_obj::generated::_bindgen_ty_36 +impl core::marker::Freeze for aya_obj::generated::_bindgen_ty_36 +impl core::marker::Send for aya_obj::generated::_bindgen_ty_36 +impl core::marker::Sync for aya_obj::generated::_bindgen_ty_36 +impl core::marker::Unpin for aya_obj::generated::_bindgen_ty_36 +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::_bindgen_ty_36 +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::_bindgen_ty_36 +impl core::convert::Into for aya_obj::generated::_bindgen_ty_36 where U: core::convert::From +pub fn aya_obj::generated::_bindgen_ty_36::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::_bindgen_ty_36 where U: core::convert::Into +pub type aya_obj::generated::_bindgen_ty_36::Error = core::convert::Infallible +pub fn aya_obj::generated::_bindgen_ty_36::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::_bindgen_ty_36 where U: core::convert::TryFrom +pub type aya_obj::generated::_bindgen_ty_36::Error = >::Error +pub fn aya_obj::generated::_bindgen_ty_36::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::_bindgen_ty_36 where T: core::clone::Clone +pub type aya_obj::generated::_bindgen_ty_36::Owned = T +pub fn aya_obj::generated::_bindgen_ty_36::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::_bindgen_ty_36::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::_bindgen_ty_36 where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_36::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::_bindgen_ty_36 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_36::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::_bindgen_ty_36 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_36::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::_bindgen_ty_36 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::_bindgen_ty_36::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::_bindgen_ty_36 +pub fn aya_obj::generated::_bindgen_ty_36::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::_bindgen_ty_37 +pub aya_obj::generated::_bindgen_ty_37::BPF_FIB_LOOKUP_DIRECT = 1 +pub aya_obj::generated::_bindgen_ty_37::BPF_FIB_LOOKUP_OUTPUT = 2 +pub aya_obj::generated::_bindgen_ty_37::BPF_FIB_LOOKUP_SKIP_NEIGH = 4 +pub aya_obj::generated::_bindgen_ty_37::BPF_FIB_LOOKUP_SRC = 16 +pub aya_obj::generated::_bindgen_ty_37::BPF_FIB_LOOKUP_TBID = 8 +impl core::clone::Clone for aya_obj::generated::_bindgen_ty_37 +pub fn aya_obj::generated::_bindgen_ty_37::clone(&self) -> aya_obj::generated::_bindgen_ty_37 +impl core::cmp::Eq for aya_obj::generated::_bindgen_ty_37 +impl core::cmp::PartialEq for aya_obj::generated::_bindgen_ty_37 +pub fn aya_obj::generated::_bindgen_ty_37::eq(&self, other: &aya_obj::generated::_bindgen_ty_37) -> bool +impl core::fmt::Debug for aya_obj::generated::_bindgen_ty_37 +pub fn aya_obj::generated::_bindgen_ty_37::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::_bindgen_ty_37 +pub fn aya_obj::generated::_bindgen_ty_37::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::_bindgen_ty_37 +impl core::marker::StructuralPartialEq for aya_obj::generated::_bindgen_ty_37 +impl core::marker::Freeze for aya_obj::generated::_bindgen_ty_37 +impl core::marker::Send for aya_obj::generated::_bindgen_ty_37 +impl core::marker::Sync for aya_obj::generated::_bindgen_ty_37 +impl core::marker::Unpin for aya_obj::generated::_bindgen_ty_37 +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::_bindgen_ty_37 +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::_bindgen_ty_37 +impl core::convert::Into for aya_obj::generated::_bindgen_ty_37 where U: core::convert::From +pub fn aya_obj::generated::_bindgen_ty_37::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::_bindgen_ty_37 where U: core::convert::Into +pub type aya_obj::generated::_bindgen_ty_37::Error = core::convert::Infallible +pub fn aya_obj::generated::_bindgen_ty_37::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::_bindgen_ty_37 where U: core::convert::TryFrom +pub type aya_obj::generated::_bindgen_ty_37::Error = >::Error +pub fn aya_obj::generated::_bindgen_ty_37::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::_bindgen_ty_37 where T: core::clone::Clone +pub type aya_obj::generated::_bindgen_ty_37::Owned = T +pub fn aya_obj::generated::_bindgen_ty_37::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::_bindgen_ty_37::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::_bindgen_ty_37 where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_37::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::_bindgen_ty_37 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_37::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::_bindgen_ty_37 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_37::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::_bindgen_ty_37 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::_bindgen_ty_37::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::_bindgen_ty_37 +pub fn aya_obj::generated::_bindgen_ty_37::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::_bindgen_ty_38 +pub aya_obj::generated::_bindgen_ty_38::BPF_FIB_LKUP_RET_BLACKHOLE = 1 +pub aya_obj::generated::_bindgen_ty_38::BPF_FIB_LKUP_RET_FRAG_NEEDED = 8 +pub aya_obj::generated::_bindgen_ty_38::BPF_FIB_LKUP_RET_FWD_DISABLED = 5 +pub aya_obj::generated::_bindgen_ty_38::BPF_FIB_LKUP_RET_NOT_FWDED = 4 +pub aya_obj::generated::_bindgen_ty_38::BPF_FIB_LKUP_RET_NO_NEIGH = 7 +pub aya_obj::generated::_bindgen_ty_38::BPF_FIB_LKUP_RET_NO_SRC_ADDR = 9 +pub aya_obj::generated::_bindgen_ty_38::BPF_FIB_LKUP_RET_PROHIBIT = 3 +pub aya_obj::generated::_bindgen_ty_38::BPF_FIB_LKUP_RET_SUCCESS = 0 +pub aya_obj::generated::_bindgen_ty_38::BPF_FIB_LKUP_RET_UNREACHABLE = 2 +pub aya_obj::generated::_bindgen_ty_38::BPF_FIB_LKUP_RET_UNSUPP_LWT = 6 +impl core::clone::Clone for aya_obj::generated::_bindgen_ty_38 +pub fn aya_obj::generated::_bindgen_ty_38::clone(&self) -> aya_obj::generated::_bindgen_ty_38 +impl core::cmp::Eq for aya_obj::generated::_bindgen_ty_38 +impl core::cmp::PartialEq for aya_obj::generated::_bindgen_ty_38 +pub fn aya_obj::generated::_bindgen_ty_38::eq(&self, other: &aya_obj::generated::_bindgen_ty_38) -> bool +impl core::fmt::Debug for aya_obj::generated::_bindgen_ty_38 +pub fn aya_obj::generated::_bindgen_ty_38::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::_bindgen_ty_38 +pub fn aya_obj::generated::_bindgen_ty_38::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::_bindgen_ty_38 +impl core::marker::StructuralPartialEq for aya_obj::generated::_bindgen_ty_38 +impl core::marker::Freeze for aya_obj::generated::_bindgen_ty_38 +impl core::marker::Send for aya_obj::generated::_bindgen_ty_38 +impl core::marker::Sync for aya_obj::generated::_bindgen_ty_38 +impl core::marker::Unpin for aya_obj::generated::_bindgen_ty_38 +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::_bindgen_ty_38 +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::_bindgen_ty_38 +impl core::convert::Into for aya_obj::generated::_bindgen_ty_38 where U: core::convert::From +pub fn aya_obj::generated::_bindgen_ty_38::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::_bindgen_ty_38 where U: core::convert::Into +pub type aya_obj::generated::_bindgen_ty_38::Error = core::convert::Infallible +pub fn aya_obj::generated::_bindgen_ty_38::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::_bindgen_ty_38 where U: core::convert::TryFrom +pub type aya_obj::generated::_bindgen_ty_38::Error = >::Error +pub fn aya_obj::generated::_bindgen_ty_38::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::_bindgen_ty_38 where T: core::clone::Clone +pub type aya_obj::generated::_bindgen_ty_38::Owned = T +pub fn aya_obj::generated::_bindgen_ty_38::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::_bindgen_ty_38::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::_bindgen_ty_38 where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_38::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::_bindgen_ty_38 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_38::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::_bindgen_ty_38 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_38::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::_bindgen_ty_38 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::_bindgen_ty_38::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::_bindgen_ty_38 +pub fn aya_obj::generated::_bindgen_ty_38::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::_bindgen_ty_39 +pub aya_obj::generated::_bindgen_ty_39::BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 1 +pub aya_obj::generated::_bindgen_ty_39::BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 4 +pub aya_obj::generated::_bindgen_ty_39::BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 2 +impl core::clone::Clone for aya_obj::generated::_bindgen_ty_39 +pub fn aya_obj::generated::_bindgen_ty_39::clone(&self) -> aya_obj::generated::_bindgen_ty_39 +impl core::cmp::Eq for aya_obj::generated::_bindgen_ty_39 +impl core::cmp::PartialEq for aya_obj::generated::_bindgen_ty_39 +pub fn aya_obj::generated::_bindgen_ty_39::eq(&self, other: &aya_obj::generated::_bindgen_ty_39) -> bool +impl core::fmt::Debug for aya_obj::generated::_bindgen_ty_39 +pub fn aya_obj::generated::_bindgen_ty_39::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::_bindgen_ty_39 +pub fn aya_obj::generated::_bindgen_ty_39::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::_bindgen_ty_39 +impl core::marker::StructuralPartialEq for aya_obj::generated::_bindgen_ty_39 +impl core::marker::Freeze for aya_obj::generated::_bindgen_ty_39 +impl core::marker::Send for aya_obj::generated::_bindgen_ty_39 +impl core::marker::Sync for aya_obj::generated::_bindgen_ty_39 +impl core::marker::Unpin for aya_obj::generated::_bindgen_ty_39 +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::_bindgen_ty_39 +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::_bindgen_ty_39 +impl core::convert::Into for aya_obj::generated::_bindgen_ty_39 where U: core::convert::From +pub fn aya_obj::generated::_bindgen_ty_39::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::_bindgen_ty_39 where U: core::convert::Into +pub type aya_obj::generated::_bindgen_ty_39::Error = core::convert::Infallible +pub fn aya_obj::generated::_bindgen_ty_39::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::_bindgen_ty_39 where U: core::convert::TryFrom +pub type aya_obj::generated::_bindgen_ty_39::Error = >::Error +pub fn aya_obj::generated::_bindgen_ty_39::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::_bindgen_ty_39 where T: core::clone::Clone +pub type aya_obj::generated::_bindgen_ty_39::Owned = T +pub fn aya_obj::generated::_bindgen_ty_39::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::_bindgen_ty_39::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::_bindgen_ty_39 where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_39::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::_bindgen_ty_39 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_39::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::_bindgen_ty_39 where T: ?core::marker::Sized +pub fn aya_obj::generated::_bindgen_ty_39::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::_bindgen_ty_39 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::_bindgen_ty_39::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::_bindgen_ty_39 +pub fn aya_obj::generated::_bindgen_ty_39::from(t: T) -> T #[repr(u32)] pub enum aya_obj::generated::bpf_attach_type pub aya_obj::generated::bpf_attach_type::BPF_CGROUP_DEVICE = 6 pub aya_obj::generated::bpf_attach_type::BPF_CGROUP_GETSOCKOPT = 21 @@ -1385,13 +2267,16 @@ impl core::cmp::Eq for aya_obj::generated::bpf_attach_type impl core::cmp::PartialEq for aya_obj::generated::bpf_attach_type pub fn aya_obj::generated::bpf_attach_type::eq(&self, other: &aya_obj::generated::bpf_attach_type) -> bool impl core::convert::From for aya_obj::generated::bpf_attach_type -pub fn aya_obj::generated::bpf_attach_type::from(s: aya_obj::programs::cgroup_sock::CgroupSockAttachType) -> aya_obj::generated::bpf_attach_type +pub fn aya_obj::generated::bpf_attach_type::from(s: aya_obj::programs::cgroup_sock::CgroupSockAttachType) -> Self impl core::convert::From for aya_obj::generated::bpf_attach_type -pub fn aya_obj::generated::bpf_attach_type::from(s: aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType) -> aya_obj::generated::bpf_attach_type +pub fn aya_obj::generated::bpf_attach_type::from(s: aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType) -> Self impl core::convert::From for aya_obj::generated::bpf_attach_type -pub fn aya_obj::generated::bpf_attach_type::from(s: aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType) -> aya_obj::generated::bpf_attach_type +pub fn aya_obj::generated::bpf_attach_type::from(s: aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType) -> Self impl core::convert::From for aya_obj::generated::bpf_attach_type pub fn aya_obj::generated::bpf_attach_type::from(value: aya_obj::programs::xdp::XdpAttachType) -> Self +impl core::convert::TryFrom for aya_obj::generated::bpf_attach_type +pub type aya_obj::generated::bpf_attach_type::Error = aya_obj::InvalidTypeBinding +pub fn aya_obj::generated::bpf_attach_type::try_from(attach_type: u32) -> core::result::Result impl core::fmt::Debug for aya_obj::generated::bpf_attach_type pub fn aya_obj::generated::bpf_attach_type::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result impl core::hash::Hash for aya_obj::generated::bpf_attach_type @@ -1416,14 +2301,61 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attach_type where T: pub type aya_obj::generated::bpf_attach_type::Owned = T pub fn aya_obj::generated::bpf_attach_type::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attach_type::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attach_type where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attach_type where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attach_type::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attach_type where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attach_type where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attach_type::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attach_type where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attach_type where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attach_type::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attach_type where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attach_type::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attach_type pub fn aya_obj::generated::bpf_attach_type::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::bpf_cgroup_iter_order +pub aya_obj::generated::bpf_cgroup_iter_order::BPF_CGROUP_ITER_ANCESTORS_UP = 4 +pub aya_obj::generated::bpf_cgroup_iter_order::BPF_CGROUP_ITER_DESCENDANTS_POST = 3 +pub aya_obj::generated::bpf_cgroup_iter_order::BPF_CGROUP_ITER_DESCENDANTS_PRE = 2 +pub aya_obj::generated::bpf_cgroup_iter_order::BPF_CGROUP_ITER_ORDER_UNSPEC = 0 +pub aya_obj::generated::bpf_cgroup_iter_order::BPF_CGROUP_ITER_SELF_ONLY = 1 +impl core::clone::Clone for aya_obj::generated::bpf_cgroup_iter_order +pub fn aya_obj::generated::bpf_cgroup_iter_order::clone(&self) -> aya_obj::generated::bpf_cgroup_iter_order +impl core::cmp::Eq for aya_obj::generated::bpf_cgroup_iter_order +impl core::cmp::PartialEq for aya_obj::generated::bpf_cgroup_iter_order +pub fn aya_obj::generated::bpf_cgroup_iter_order::eq(&self, other: &aya_obj::generated::bpf_cgroup_iter_order) -> bool +impl core::fmt::Debug for aya_obj::generated::bpf_cgroup_iter_order +pub fn aya_obj::generated::bpf_cgroup_iter_order::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::bpf_cgroup_iter_order +pub fn aya_obj::generated::bpf_cgroup_iter_order::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::bpf_cgroup_iter_order +impl core::marker::StructuralPartialEq for aya_obj::generated::bpf_cgroup_iter_order +impl core::marker::Freeze for aya_obj::generated::bpf_cgroup_iter_order +impl core::marker::Send for aya_obj::generated::bpf_cgroup_iter_order +impl core::marker::Sync for aya_obj::generated::bpf_cgroup_iter_order +impl core::marker::Unpin for aya_obj::generated::bpf_cgroup_iter_order +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::bpf_cgroup_iter_order +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::bpf_cgroup_iter_order +impl core::convert::Into for aya_obj::generated::bpf_cgroup_iter_order where U: core::convert::From +pub fn aya_obj::generated::bpf_cgroup_iter_order::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::bpf_cgroup_iter_order where U: core::convert::Into +pub type aya_obj::generated::bpf_cgroup_iter_order::Error = core::convert::Infallible +pub fn aya_obj::generated::bpf_cgroup_iter_order::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::bpf_cgroup_iter_order where U: core::convert::TryFrom +pub type aya_obj::generated::bpf_cgroup_iter_order::Error = >::Error +pub fn aya_obj::generated::bpf_cgroup_iter_order::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::bpf_cgroup_iter_order where T: core::clone::Clone +pub type aya_obj::generated::bpf_cgroup_iter_order::Owned = T +pub fn aya_obj::generated::bpf_cgroup_iter_order::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::bpf_cgroup_iter_order::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::bpf_cgroup_iter_order where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::bpf_cgroup_iter_order::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::bpf_cgroup_iter_order where T: ?core::marker::Sized +pub fn aya_obj::generated::bpf_cgroup_iter_order::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::bpf_cgroup_iter_order where T: ?core::marker::Sized +pub fn aya_obj::generated::bpf_cgroup_iter_order::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_cgroup_iter_order where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_cgroup_iter_order::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::bpf_cgroup_iter_order +pub fn aya_obj::generated::bpf_cgroup_iter_order::from(t: T) -> T #[repr(u32)] pub enum aya_obj::generated::bpf_cmd pub aya_obj::generated::bpf_cmd::BPF_BTF_GET_FD_BY_ID = 19 pub aya_obj::generated::bpf_cmd::BPF_BTF_GET_NEXT_ID = 23 @@ -1494,14 +2426,269 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_cmd where T: core::cl pub type aya_obj::generated::bpf_cmd::Owned = T pub fn aya_obj::generated::bpf_cmd::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_cmd::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_cmd where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_cmd where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_cmd::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_cmd where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_cmd where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_cmd::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_cmd where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_cmd where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_cmd::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_cmd where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_cmd::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_cmd pub fn aya_obj::generated::bpf_cmd::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::bpf_func_id +pub aya_obj::generated::bpf_func_id::BPF_FUNC_bind = 64 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_bprm_opts_set = 159 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_btf_find_by_name_kind = 167 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_cgrp_storage_delete = 211 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_cgrp_storage_get = 210 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_check_mtu = 163 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_clone_redirect = 13 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_copy_from_user = 148 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_copy_from_user_task = 191 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_csum_diff = 28 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_csum_level = 135 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_csum_update = 40 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_current_task_under_cgroup = 37 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_d_path = 147 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_dynptr_data = 203 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_dynptr_from_mem = 197 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_dynptr_read = 201 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_dynptr_write = 202 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_fib_lookup = 69 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_find_vma = 180 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_for_each_map_elem = 164 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_attach_cookie = 174 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_branch_snapshot = 176 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_cgroup_classid = 17 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_current_ancestor_cgroup_id = 123 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_current_cgroup_id = 80 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_current_comm = 16 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_current_pid_tgid = 14 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_current_task = 35 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_current_task_btf = 158 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_current_uid_gid = 15 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_func_arg = 183 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_func_arg_cnt = 185 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_func_ip = 173 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_func_ret = 184 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_hash_recalc = 34 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_listener_sock = 98 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_local_storage = 81 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_netns_cookie = 122 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_ns_current_pid_tgid = 120 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_numa_node_id = 42 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_prandom_u32 = 7 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_retval = 186 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_route_realm = 24 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_smp_processor_id = 8 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_socket_cookie = 46 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_socket_uid = 47 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_stack = 67 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_stackid = 27 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_get_task_stack = 141 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_getsockopt = 57 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_ima_file_hash = 193 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_ima_inode_hash = 161 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_inode_storage_delete = 146 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_inode_storage_get = 145 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_jiffies64 = 118 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_kallsyms_lookup_name = 179 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_kptr_xchg = 194 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_ktime_get_boot_ns = 125 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_ktime_get_coarse_ns = 160 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_ktime_get_ns = 5 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_ktime_get_tai_ns = 208 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_l3_csum_replace = 10 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_l4_csum_replace = 11 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_load_hdr_opt = 142 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_loop = 181 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_lwt_push_encap = 73 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_lwt_seg6_action = 76 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_lwt_seg6_adjust_srh = 75 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_lwt_seg6_store_bytes = 74 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_map_delete_elem = 3 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_map_lookup_elem = 1 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_map_lookup_percpu_elem = 195 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_map_peek_elem = 89 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_map_pop_elem = 88 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_map_push_elem = 87 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_map_update_elem = 2 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_msg_apply_bytes = 61 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_msg_cork_bytes = 62 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_msg_pop_data = 91 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_msg_pull_data = 63 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_msg_push_data = 90 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_msg_redirect_hash = 71 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_msg_redirect_map = 60 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_override_return = 58 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_per_cpu_ptr = 153 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_perf_event_output = 25 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_perf_event_read = 22 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_perf_event_read_value = 55 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_perf_prog_read_value = 56 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_probe_read = 4 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_probe_read_kernel = 113 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_probe_read_kernel_str = 115 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_probe_read_str = 45 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_probe_read_user = 112 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_probe_read_user_str = 114 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_probe_write_user = 36 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_rc_keydown = 78 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_rc_pointer_rel = 92 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_rc_repeat = 77 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_read_branch_records = 119 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_redirect = 23 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_redirect_map = 51 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_redirect_neigh = 152 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_redirect_peer = 155 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_reserve_hdr_opt = 144 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_ringbuf_discard = 133 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_ringbuf_discard_dynptr = 200 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_ringbuf_output = 130 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_ringbuf_query = 134 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_ringbuf_reserve = 131 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_ringbuf_reserve_dynptr = 198 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_ringbuf_submit = 132 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_ringbuf_submit_dynptr = 199 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_send_signal = 109 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_send_signal_thread = 117 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_seq_printf = 126 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_seq_printf_btf = 150 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_seq_write = 127 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_set_hash = 48 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_set_hash_invalid = 41 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_set_retval = 187 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_setsockopt = 49 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_sk_ancestor_cgroup_id = 129 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_sk_assign = 124 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_sk_cgroup_id = 128 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_sk_fullsock = 95 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_sk_lookup_tcp = 84 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_sk_lookup_udp = 85 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_sk_redirect_hash = 72 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_sk_redirect_map = 52 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_sk_release = 86 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_sk_select_reuseport = 82 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_sk_storage_delete = 108 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_sk_storage_get = 107 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_adjust_room = 50 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_ancestor_cgroup_id = 83 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_cgroup_classid = 151 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_cgroup_id = 79 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_change_head = 43 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_change_proto = 31 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_change_tail = 38 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_change_type = 32 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_ecn_set_ce = 97 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_get_tunnel_key = 20 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_get_tunnel_opt = 29 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_get_xfrm_state = 66 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_load_bytes = 26 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_load_bytes_relative = 68 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_output = 111 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_pull_data = 39 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_set_tstamp = 192 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_set_tunnel_key = 21 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_set_tunnel_opt = 30 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_store_bytes = 9 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_under_cgroup = 33 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_vlan_pop = 19 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skb_vlan_push = 18 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skc_lookup_tcp = 99 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skc_to_mptcp_sock = 196 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skc_to_tcp6_sock = 136 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skc_to_tcp_request_sock = 139 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skc_to_tcp_sock = 137 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skc_to_tcp_timewait_sock = 138 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skc_to_udp6_sock = 140 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_skc_to_unix_sock = 178 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_snprintf = 165 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_snprintf_btf = 149 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_sock_from_file = 162 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_sock_hash_update = 70 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_sock_map_update = 53 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_sock_ops_cb_flags_set = 59 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_spin_lock = 93 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_spin_unlock = 94 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_store_hdr_opt = 143 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_strncmp = 182 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_strtol = 105 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_strtoul = 106 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_sys_bpf = 166 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_sys_close = 168 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_sysctl_get_current_value = 102 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_sysctl_get_name = 101 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_sysctl_get_new_value = 103 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_sysctl_set_new_value = 104 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_tail_call = 12 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_task_pt_regs = 175 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_task_storage_delete = 157 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_task_storage_get = 156 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_tcp_check_syncookie = 100 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_tcp_gen_syncookie = 110 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_tcp_raw_check_syncookie_ipv4 = 206 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_tcp_raw_check_syncookie_ipv6 = 207 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_tcp_raw_gen_syncookie_ipv4 = 204 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_tcp_raw_gen_syncookie_ipv6 = 205 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_tcp_send_ack = 116 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_tcp_sock = 96 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_this_cpu_ptr = 154 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_timer_cancel = 172 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_timer_init = 169 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_timer_set_callback = 170 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_timer_start = 171 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_trace_printk = 6 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_trace_vprintk = 177 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_unspec = 0 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_user_ringbuf_drain = 209 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_xdp_adjust_head = 44 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_xdp_adjust_meta = 54 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_xdp_adjust_tail = 65 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_xdp_get_buff_len = 188 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_xdp_load_bytes = 189 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_xdp_output = 121 +pub aya_obj::generated::bpf_func_id::BPF_FUNC_xdp_store_bytes = 190 +pub aya_obj::generated::bpf_func_id::__BPF_FUNC_MAX_ID = 212 +impl core::clone::Clone for aya_obj::generated::bpf_func_id +pub fn aya_obj::generated::bpf_func_id::clone(&self) -> aya_obj::generated::bpf_func_id +impl core::cmp::Eq for aya_obj::generated::bpf_func_id +impl core::cmp::PartialEq for aya_obj::generated::bpf_func_id +pub fn aya_obj::generated::bpf_func_id::eq(&self, other: &aya_obj::generated::bpf_func_id) -> bool +impl core::fmt::Debug for aya_obj::generated::bpf_func_id +pub fn aya_obj::generated::bpf_func_id::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::bpf_func_id +pub fn aya_obj::generated::bpf_func_id::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::bpf_func_id +impl core::marker::StructuralPartialEq for aya_obj::generated::bpf_func_id +impl core::marker::Freeze for aya_obj::generated::bpf_func_id +impl core::marker::Send for aya_obj::generated::bpf_func_id +impl core::marker::Sync for aya_obj::generated::bpf_func_id +impl core::marker::Unpin for aya_obj::generated::bpf_func_id +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::bpf_func_id +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::bpf_func_id +impl core::convert::Into for aya_obj::generated::bpf_func_id where U: core::convert::From +pub fn aya_obj::generated::bpf_func_id::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::bpf_func_id where U: core::convert::Into +pub type aya_obj::generated::bpf_func_id::Error = core::convert::Infallible +pub fn aya_obj::generated::bpf_func_id::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::bpf_func_id where U: core::convert::TryFrom +pub type aya_obj::generated::bpf_func_id::Error = >::Error +pub fn aya_obj::generated::bpf_func_id::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::bpf_func_id where T: core::clone::Clone +pub type aya_obj::generated::bpf_func_id::Owned = T +pub fn aya_obj::generated::bpf_func_id::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::bpf_func_id::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::bpf_func_id where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::bpf_func_id::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::bpf_func_id where T: ?core::marker::Sized +pub fn aya_obj::generated::bpf_func_id::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::bpf_func_id where T: ?core::marker::Sized +pub fn aya_obj::generated::bpf_func_id::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_func_id where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_func_id::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::bpf_func_id +pub fn aya_obj::generated::bpf_func_id::from(t: T) -> T #[repr(u32)] pub enum aya_obj::generated::bpf_link_type pub aya_obj::generated::bpf_link_type::BPF_LINK_TYPE_CGROUP = 3 pub aya_obj::generated::bpf_link_type::BPF_LINK_TYPE_ITER = 4 @@ -1523,6 +2710,9 @@ pub fn aya_obj::generated::bpf_link_type::clone(&self) -> aya_obj::generated::bp impl core::cmp::Eq for aya_obj::generated::bpf_link_type impl core::cmp::PartialEq for aya_obj::generated::bpf_link_type pub fn aya_obj::generated::bpf_link_type::eq(&self, other: &aya_obj::generated::bpf_link_type) -> bool +impl core::convert::TryFrom for aya_obj::generated::bpf_link_type +pub type aya_obj::generated::bpf_link_type::Error = aya_obj::InvalidTypeBinding +pub fn aya_obj::generated::bpf_link_type::try_from(link_type: u32) -> core::result::Result impl core::fmt::Debug for aya_obj::generated::bpf_link_type pub fn aya_obj::generated::bpf_link_type::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result impl core::hash::Hash for aya_obj::generated::bpf_link_type @@ -1547,12 +2737,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_type where T: co pub type aya_obj::generated::bpf_link_type::Owned = T pub fn aya_obj::generated::bpf_link_type::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_type::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_type where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_type where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_type::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_type where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_type where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_type::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_type where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_type where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_type::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_type where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_type::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_type pub fn aya_obj::generated::bpf_link_type::from(t: T) -> T #[repr(u32)] pub enum aya_obj::generated::bpf_map_type @@ -1601,7 +2793,7 @@ impl core::cmp::Eq for aya_obj::generated::bpf_map_type impl core::cmp::PartialEq for aya_obj::generated::bpf_map_type pub fn aya_obj::generated::bpf_map_type::eq(&self, other: &aya_obj::generated::bpf_map_type) -> bool impl core::convert::TryFrom for aya_obj::generated::bpf_map_type -pub type aya_obj::generated::bpf_map_type::Error = aya_obj::maps::InvalidMapTypeError +pub type aya_obj::generated::bpf_map_type::Error = aya_obj::InvalidTypeBinding pub fn aya_obj::generated::bpf_map_type::try_from(map_type: u32) -> core::result::Result impl core::fmt::Debug for aya_obj::generated::bpf_map_type pub fn aya_obj::generated::bpf_map_type::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result @@ -1627,14 +2819,63 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_map_type where T: cor pub type aya_obj::generated::bpf_map_type::Owned = T pub fn aya_obj::generated::bpf_map_type::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_map_type::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_map_type where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_map_type where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_map_type::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_map_type where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_map_type where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_map_type::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_map_type where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_map_type where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_map_type::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_map_type where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_map_type::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_map_type pub fn aya_obj::generated::bpf_map_type::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::bpf_perf_event_type +pub aya_obj::generated::bpf_perf_event_type::BPF_PERF_EVENT_EVENT = 6 +pub aya_obj::generated::bpf_perf_event_type::BPF_PERF_EVENT_KPROBE = 3 +pub aya_obj::generated::bpf_perf_event_type::BPF_PERF_EVENT_KRETPROBE = 4 +pub aya_obj::generated::bpf_perf_event_type::BPF_PERF_EVENT_TRACEPOINT = 5 +pub aya_obj::generated::bpf_perf_event_type::BPF_PERF_EVENT_UNSPEC = 0 +pub aya_obj::generated::bpf_perf_event_type::BPF_PERF_EVENT_UPROBE = 1 +pub aya_obj::generated::bpf_perf_event_type::BPF_PERF_EVENT_URETPROBE = 2 +impl core::clone::Clone for aya_obj::generated::bpf_perf_event_type +pub fn aya_obj::generated::bpf_perf_event_type::clone(&self) -> aya_obj::generated::bpf_perf_event_type +impl core::cmp::Eq for aya_obj::generated::bpf_perf_event_type +impl core::cmp::PartialEq for aya_obj::generated::bpf_perf_event_type +pub fn aya_obj::generated::bpf_perf_event_type::eq(&self, other: &aya_obj::generated::bpf_perf_event_type) -> bool +impl core::fmt::Debug for aya_obj::generated::bpf_perf_event_type +pub fn aya_obj::generated::bpf_perf_event_type::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::bpf_perf_event_type +pub fn aya_obj::generated::bpf_perf_event_type::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::bpf_perf_event_type +impl core::marker::StructuralPartialEq for aya_obj::generated::bpf_perf_event_type +impl core::marker::Freeze for aya_obj::generated::bpf_perf_event_type +impl core::marker::Send for aya_obj::generated::bpf_perf_event_type +impl core::marker::Sync for aya_obj::generated::bpf_perf_event_type +impl core::marker::Unpin for aya_obj::generated::bpf_perf_event_type +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::bpf_perf_event_type +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::bpf_perf_event_type +impl core::convert::Into for aya_obj::generated::bpf_perf_event_type where U: core::convert::From +pub fn aya_obj::generated::bpf_perf_event_type::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::bpf_perf_event_type where U: core::convert::Into +pub type aya_obj::generated::bpf_perf_event_type::Error = core::convert::Infallible +pub fn aya_obj::generated::bpf_perf_event_type::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::bpf_perf_event_type where U: core::convert::TryFrom +pub type aya_obj::generated::bpf_perf_event_type::Error = >::Error +pub fn aya_obj::generated::bpf_perf_event_type::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::bpf_perf_event_type where T: core::clone::Clone +pub type aya_obj::generated::bpf_perf_event_type::Owned = T +pub fn aya_obj::generated::bpf_perf_event_type::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::bpf_perf_event_type::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::bpf_perf_event_type where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::bpf_perf_event_type::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::bpf_perf_event_type where T: ?core::marker::Sized +pub fn aya_obj::generated::bpf_perf_event_type::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::bpf_perf_event_type where T: ?core::marker::Sized +pub fn aya_obj::generated::bpf_perf_event_type::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_perf_event_type where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_perf_event_type::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::bpf_perf_event_type +pub fn aya_obj::generated::bpf_perf_event_type::from(t: T) -> T #[repr(u32)] pub enum aya_obj::generated::bpf_prog_type pub aya_obj::generated::bpf_prog_type::BPF_PROG_TYPE_CGROUP_DEVICE = 15 pub aya_obj::generated::bpf_prog_type::BPF_PROG_TYPE_CGROUP_SKB = 8 @@ -1675,6 +2916,9 @@ pub fn aya_obj::generated::bpf_prog_type::clone(&self) -> aya_obj::generated::bp impl core::cmp::Eq for aya_obj::generated::bpf_prog_type impl core::cmp::PartialEq for aya_obj::generated::bpf_prog_type pub fn aya_obj::generated::bpf_prog_type::eq(&self, other: &aya_obj::generated::bpf_prog_type) -> bool +impl core::convert::TryFrom for aya_obj::generated::bpf_prog_type +pub type aya_obj::generated::bpf_prog_type::Error = aya_obj::InvalidTypeBinding +pub fn aya_obj::generated::bpf_prog_type::try_from(prog_type: u32) -> core::result::Result impl core::fmt::Debug for aya_obj::generated::bpf_prog_type pub fn aya_obj::generated::bpf_prog_type::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result impl core::hash::Hash for aya_obj::generated::bpf_prog_type @@ -1699,14 +2943,103 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_prog_type where T: co pub type aya_obj::generated::bpf_prog_type::Owned = T pub fn aya_obj::generated::bpf_prog_type::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_prog_type::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_prog_type where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_prog_type where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_prog_type::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_prog_type where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_prog_type where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_prog_type::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_prog_type where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_prog_type where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_prog_type::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_prog_type where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_prog_type::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_prog_type pub fn aya_obj::generated::bpf_prog_type::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::bpf_stats_type +pub aya_obj::generated::bpf_stats_type::BPF_STATS_RUN_TIME = 0 +impl core::clone::Clone for aya_obj::generated::bpf_stats_type +pub fn aya_obj::generated::bpf_stats_type::clone(&self) -> aya_obj::generated::bpf_stats_type +impl core::cmp::Eq for aya_obj::generated::bpf_stats_type +impl core::cmp::PartialEq for aya_obj::generated::bpf_stats_type +pub fn aya_obj::generated::bpf_stats_type::eq(&self, other: &aya_obj::generated::bpf_stats_type) -> bool +impl core::fmt::Debug for aya_obj::generated::bpf_stats_type +pub fn aya_obj::generated::bpf_stats_type::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::bpf_stats_type +pub fn aya_obj::generated::bpf_stats_type::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::bpf_stats_type +impl core::marker::StructuralPartialEq for aya_obj::generated::bpf_stats_type +impl core::marker::Freeze for aya_obj::generated::bpf_stats_type +impl core::marker::Send for aya_obj::generated::bpf_stats_type +impl core::marker::Sync for aya_obj::generated::bpf_stats_type +impl core::marker::Unpin for aya_obj::generated::bpf_stats_type +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::bpf_stats_type +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::bpf_stats_type +impl core::convert::Into for aya_obj::generated::bpf_stats_type where U: core::convert::From +pub fn aya_obj::generated::bpf_stats_type::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::bpf_stats_type where U: core::convert::Into +pub type aya_obj::generated::bpf_stats_type::Error = core::convert::Infallible +pub fn aya_obj::generated::bpf_stats_type::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::bpf_stats_type where U: core::convert::TryFrom +pub type aya_obj::generated::bpf_stats_type::Error = >::Error +pub fn aya_obj::generated::bpf_stats_type::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::bpf_stats_type where T: core::clone::Clone +pub type aya_obj::generated::bpf_stats_type::Owned = T +pub fn aya_obj::generated::bpf_stats_type::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::bpf_stats_type::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::bpf_stats_type where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::bpf_stats_type::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::bpf_stats_type where T: ?core::marker::Sized +pub fn aya_obj::generated::bpf_stats_type::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::bpf_stats_type where T: ?core::marker::Sized +pub fn aya_obj::generated::bpf_stats_type::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_stats_type where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_stats_type::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::bpf_stats_type +pub fn aya_obj::generated::bpf_stats_type::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::bpf_task_fd_type +pub aya_obj::generated::bpf_task_fd_type::BPF_FD_TYPE_KPROBE = 2 +pub aya_obj::generated::bpf_task_fd_type::BPF_FD_TYPE_KRETPROBE = 3 +pub aya_obj::generated::bpf_task_fd_type::BPF_FD_TYPE_RAW_TRACEPOINT = 0 +pub aya_obj::generated::bpf_task_fd_type::BPF_FD_TYPE_TRACEPOINT = 1 +pub aya_obj::generated::bpf_task_fd_type::BPF_FD_TYPE_UPROBE = 4 +pub aya_obj::generated::bpf_task_fd_type::BPF_FD_TYPE_URETPROBE = 5 +impl core::clone::Clone for aya_obj::generated::bpf_task_fd_type +pub fn aya_obj::generated::bpf_task_fd_type::clone(&self) -> aya_obj::generated::bpf_task_fd_type +impl core::cmp::Eq for aya_obj::generated::bpf_task_fd_type +impl core::cmp::PartialEq for aya_obj::generated::bpf_task_fd_type +pub fn aya_obj::generated::bpf_task_fd_type::eq(&self, other: &aya_obj::generated::bpf_task_fd_type) -> bool +impl core::fmt::Debug for aya_obj::generated::bpf_task_fd_type +pub fn aya_obj::generated::bpf_task_fd_type::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::bpf_task_fd_type +pub fn aya_obj::generated::bpf_task_fd_type::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::bpf_task_fd_type +impl core::marker::StructuralPartialEq for aya_obj::generated::bpf_task_fd_type +impl core::marker::Freeze for aya_obj::generated::bpf_task_fd_type +impl core::marker::Send for aya_obj::generated::bpf_task_fd_type +impl core::marker::Sync for aya_obj::generated::bpf_task_fd_type +impl core::marker::Unpin for aya_obj::generated::bpf_task_fd_type +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::bpf_task_fd_type +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::bpf_task_fd_type +impl core::convert::Into for aya_obj::generated::bpf_task_fd_type where U: core::convert::From +pub fn aya_obj::generated::bpf_task_fd_type::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::bpf_task_fd_type where U: core::convert::Into +pub type aya_obj::generated::bpf_task_fd_type::Error = core::convert::Infallible +pub fn aya_obj::generated::bpf_task_fd_type::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::bpf_task_fd_type where U: core::convert::TryFrom +pub type aya_obj::generated::bpf_task_fd_type::Error = >::Error +pub fn aya_obj::generated::bpf_task_fd_type::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::bpf_task_fd_type where T: core::clone::Clone +pub type aya_obj::generated::bpf_task_fd_type::Owned = T +pub fn aya_obj::generated::bpf_task_fd_type::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::bpf_task_fd_type::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::bpf_task_fd_type where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::bpf_task_fd_type::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::bpf_task_fd_type where T: ?core::marker::Sized +pub fn aya_obj::generated::bpf_task_fd_type::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::bpf_task_fd_type where T: ?core::marker::Sized +pub fn aya_obj::generated::bpf_task_fd_type::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_task_fd_type where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_task_fd_type::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::bpf_task_fd_type +pub fn aya_obj::generated::bpf_task_fd_type::from(t: T) -> T #[repr(u32)] pub enum aya_obj::generated::btf_func_linkage pub aya_obj::generated::btf_func_linkage::BTF_FUNC_EXTERN = 2 pub aya_obj::generated::btf_func_linkage::BTF_FUNC_GLOBAL = 1 @@ -1740,14 +3073,111 @@ impl alloc::borrow::ToOwned for aya_obj::generated::btf_func_linkage where T: pub type aya_obj::generated::btf_func_linkage::Owned = T pub fn aya_obj::generated::btf_func_linkage::clone_into(&self, target: &mut T) pub fn aya_obj::generated::btf_func_linkage::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::btf_func_linkage where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::btf_func_linkage where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::btf_func_linkage::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::btf_func_linkage where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::btf_func_linkage where T: ?core::marker::Sized pub fn aya_obj::generated::btf_func_linkage::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::btf_func_linkage where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::btf_func_linkage where T: ?core::marker::Sized pub fn aya_obj::generated::btf_func_linkage::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::btf_func_linkage where T: core::clone::Clone +pub unsafe fn aya_obj::generated::btf_func_linkage::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::btf_func_linkage pub fn aya_obj::generated::btf_func_linkage::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::nf_inet_hooks +pub aya_obj::generated::nf_inet_hooks::NF_INET_FORWARD = 2 +pub aya_obj::generated::nf_inet_hooks::NF_INET_LOCAL_IN = 1 +pub aya_obj::generated::nf_inet_hooks::NF_INET_LOCAL_OUT = 3 +pub aya_obj::generated::nf_inet_hooks::NF_INET_NUMHOOKS = 5 +pub aya_obj::generated::nf_inet_hooks::NF_INET_POST_ROUTING = 4 +pub aya_obj::generated::nf_inet_hooks::NF_INET_PRE_ROUTING = 0 +impl aya_obj::generated::nf_inet_hooks +pub const aya_obj::generated::nf_inet_hooks::NF_INET_INGRESS: aya_obj::generated::nf_inet_hooks +impl core::clone::Clone for aya_obj::generated::nf_inet_hooks +pub fn aya_obj::generated::nf_inet_hooks::clone(&self) -> aya_obj::generated::nf_inet_hooks +impl core::cmp::Eq for aya_obj::generated::nf_inet_hooks +impl core::cmp::PartialEq for aya_obj::generated::nf_inet_hooks +pub fn aya_obj::generated::nf_inet_hooks::eq(&self, other: &aya_obj::generated::nf_inet_hooks) -> bool +impl core::fmt::Debug for aya_obj::generated::nf_inet_hooks +pub fn aya_obj::generated::nf_inet_hooks::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::nf_inet_hooks +pub fn aya_obj::generated::nf_inet_hooks::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::nf_inet_hooks +impl core::marker::StructuralPartialEq for aya_obj::generated::nf_inet_hooks +impl core::marker::Freeze for aya_obj::generated::nf_inet_hooks +impl core::marker::Send for aya_obj::generated::nf_inet_hooks +impl core::marker::Sync for aya_obj::generated::nf_inet_hooks +impl core::marker::Unpin for aya_obj::generated::nf_inet_hooks +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::nf_inet_hooks +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::nf_inet_hooks +impl core::convert::Into for aya_obj::generated::nf_inet_hooks where U: core::convert::From +pub fn aya_obj::generated::nf_inet_hooks::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::nf_inet_hooks where U: core::convert::Into +pub type aya_obj::generated::nf_inet_hooks::Error = core::convert::Infallible +pub fn aya_obj::generated::nf_inet_hooks::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::nf_inet_hooks where U: core::convert::TryFrom +pub type aya_obj::generated::nf_inet_hooks::Error = >::Error +pub fn aya_obj::generated::nf_inet_hooks::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::nf_inet_hooks where T: core::clone::Clone +pub type aya_obj::generated::nf_inet_hooks::Owned = T +pub fn aya_obj::generated::nf_inet_hooks::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::nf_inet_hooks::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::nf_inet_hooks where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::nf_inet_hooks::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::nf_inet_hooks where T: ?core::marker::Sized +pub fn aya_obj::generated::nf_inet_hooks::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::nf_inet_hooks where T: ?core::marker::Sized +pub fn aya_obj::generated::nf_inet_hooks::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::nf_inet_hooks where T: core::clone::Clone +pub unsafe fn aya_obj::generated::nf_inet_hooks::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::nf_inet_hooks +pub fn aya_obj::generated::nf_inet_hooks::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::nlmsgerr_attrs +pub aya_obj::generated::nlmsgerr_attrs::NLMSGERR_ATTR_COOKIE = 3 +pub aya_obj::generated::nlmsgerr_attrs::NLMSGERR_ATTR_MSG = 1 +pub aya_obj::generated::nlmsgerr_attrs::NLMSGERR_ATTR_OFFS = 2 +pub aya_obj::generated::nlmsgerr_attrs::NLMSGERR_ATTR_UNUSED = 0 +pub aya_obj::generated::nlmsgerr_attrs::__NLMSGERR_ATTR_MAX = 4 +impl aya_obj::generated::nlmsgerr_attrs +pub const aya_obj::generated::nlmsgerr_attrs::NLMSGERR_ATTR_MAX: aya_obj::generated::nlmsgerr_attrs +impl core::clone::Clone for aya_obj::generated::nlmsgerr_attrs +pub fn aya_obj::generated::nlmsgerr_attrs::clone(&self) -> aya_obj::generated::nlmsgerr_attrs +impl core::cmp::Eq for aya_obj::generated::nlmsgerr_attrs +impl core::cmp::PartialEq for aya_obj::generated::nlmsgerr_attrs +pub fn aya_obj::generated::nlmsgerr_attrs::eq(&self, other: &aya_obj::generated::nlmsgerr_attrs) -> bool +impl core::fmt::Debug for aya_obj::generated::nlmsgerr_attrs +pub fn aya_obj::generated::nlmsgerr_attrs::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::nlmsgerr_attrs +pub fn aya_obj::generated::nlmsgerr_attrs::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::nlmsgerr_attrs +impl core::marker::StructuralPartialEq for aya_obj::generated::nlmsgerr_attrs +impl core::marker::Freeze for aya_obj::generated::nlmsgerr_attrs +impl core::marker::Send for aya_obj::generated::nlmsgerr_attrs +impl core::marker::Sync for aya_obj::generated::nlmsgerr_attrs +impl core::marker::Unpin for aya_obj::generated::nlmsgerr_attrs +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::nlmsgerr_attrs +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::nlmsgerr_attrs +impl core::convert::Into for aya_obj::generated::nlmsgerr_attrs where U: core::convert::From +pub fn aya_obj::generated::nlmsgerr_attrs::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::nlmsgerr_attrs where U: core::convert::Into +pub type aya_obj::generated::nlmsgerr_attrs::Error = core::convert::Infallible +pub fn aya_obj::generated::nlmsgerr_attrs::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::nlmsgerr_attrs where U: core::convert::TryFrom +pub type aya_obj::generated::nlmsgerr_attrs::Error = >::Error +pub fn aya_obj::generated::nlmsgerr_attrs::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::nlmsgerr_attrs where T: core::clone::Clone +pub type aya_obj::generated::nlmsgerr_attrs::Owned = T +pub fn aya_obj::generated::nlmsgerr_attrs::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::nlmsgerr_attrs::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::nlmsgerr_attrs where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::nlmsgerr_attrs::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::nlmsgerr_attrs where T: ?core::marker::Sized +pub fn aya_obj::generated::nlmsgerr_attrs::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::nlmsgerr_attrs where T: ?core::marker::Sized +pub fn aya_obj::generated::nlmsgerr_attrs::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::nlmsgerr_attrs where T: core::clone::Clone +pub unsafe fn aya_obj::generated::nlmsgerr_attrs::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya_obj::generated::nlmsgerr_attrs +pub fn aya_obj::generated::nlmsgerr_attrs::from(t: T) -> T #[repr(u32)] pub enum aya_obj::generated::perf_event_sample_format pub aya_obj::generated::perf_event_sample_format::PERF_SAMPLE_ADDR = 8 pub aya_obj::generated::perf_event_sample_format::PERF_SAMPLE_AUX = 1048576 @@ -1804,12 +3234,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::perf_event_sample_format pub type aya_obj::generated::perf_event_sample_format::Owned = T pub fn aya_obj::generated::perf_event_sample_format::clone_into(&self, target: &mut T) pub fn aya_obj::generated::perf_event_sample_format::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::perf_event_sample_format where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::perf_event_sample_format where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::perf_event_sample_format::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::perf_event_sample_format where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::perf_event_sample_format where T: ?core::marker::Sized pub fn aya_obj::generated::perf_event_sample_format::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::perf_event_sample_format where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::perf_event_sample_format where T: ?core::marker::Sized pub fn aya_obj::generated::perf_event_sample_format::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::perf_event_sample_format where T: core::clone::Clone +pub unsafe fn aya_obj::generated::perf_event_sample_format::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::perf_event_sample_format pub fn aya_obj::generated::perf_event_sample_format::from(t: T) -> T #[repr(u32)] pub enum aya_obj::generated::perf_event_type @@ -1864,12 +3296,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::perf_event_type where T: pub type aya_obj::generated::perf_event_type::Owned = T pub fn aya_obj::generated::perf_event_type::clone_into(&self, target: &mut T) pub fn aya_obj::generated::perf_event_type::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::perf_event_type where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::perf_event_type where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::perf_event_type::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::perf_event_type where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::perf_event_type where T: ?core::marker::Sized pub fn aya_obj::generated::perf_event_type::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::perf_event_type where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::perf_event_type where T: ?core::marker::Sized pub fn aya_obj::generated::perf_event_type::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::perf_event_type where T: core::clone::Clone +pub unsafe fn aya_obj::generated::perf_event_type::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::perf_event_type pub fn aya_obj::generated::perf_event_type::from(t: T) -> T #[repr(u32)] pub enum aya_obj::generated::perf_hw_cache_id @@ -1910,12 +3344,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::perf_hw_cache_id where T: pub type aya_obj::generated::perf_hw_cache_id::Owned = T pub fn aya_obj::generated::perf_hw_cache_id::clone_into(&self, target: &mut T) pub fn aya_obj::generated::perf_hw_cache_id::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::perf_hw_cache_id where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::perf_hw_cache_id where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::perf_hw_cache_id::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::perf_hw_cache_id where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::perf_hw_cache_id where T: ?core::marker::Sized pub fn aya_obj::generated::perf_hw_cache_id::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::perf_hw_cache_id where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::perf_hw_cache_id where T: ?core::marker::Sized pub fn aya_obj::generated::perf_hw_cache_id::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::perf_hw_cache_id where T: core::clone::Clone +pub unsafe fn aya_obj::generated::perf_hw_cache_id::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::perf_hw_cache_id pub fn aya_obj::generated::perf_hw_cache_id::from(t: T) -> T #[repr(u32)] pub enum aya_obj::generated::perf_hw_cache_op_id @@ -1952,12 +3388,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::perf_hw_cache_op_id where pub type aya_obj::generated::perf_hw_cache_op_id::Owned = T pub fn aya_obj::generated::perf_hw_cache_op_id::clone_into(&self, target: &mut T) pub fn aya_obj::generated::perf_hw_cache_op_id::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::perf_hw_cache_op_id where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::perf_hw_cache_op_id where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::perf_hw_cache_op_id::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::perf_hw_cache_op_id where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::perf_hw_cache_op_id where T: ?core::marker::Sized pub fn aya_obj::generated::perf_hw_cache_op_id::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::perf_hw_cache_op_id where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::perf_hw_cache_op_id where T: ?core::marker::Sized pub fn aya_obj::generated::perf_hw_cache_op_id::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::perf_hw_cache_op_id where T: core::clone::Clone +pub unsafe fn aya_obj::generated::perf_hw_cache_op_id::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::perf_hw_cache_op_id pub fn aya_obj::generated::perf_hw_cache_op_id::from(t: T) -> T #[repr(u32)] pub enum aya_obj::generated::perf_hw_cache_op_result_id @@ -1993,12 +3431,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::perf_hw_cache_op_result_i pub type aya_obj::generated::perf_hw_cache_op_result_id::Owned = T pub fn aya_obj::generated::perf_hw_cache_op_result_id::clone_into(&self, target: &mut T) pub fn aya_obj::generated::perf_hw_cache_op_result_id::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::perf_hw_cache_op_result_id where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::perf_hw_cache_op_result_id where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::perf_hw_cache_op_result_id::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::perf_hw_cache_op_result_id where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::perf_hw_cache_op_result_id where T: ?core::marker::Sized pub fn aya_obj::generated::perf_hw_cache_op_result_id::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::perf_hw_cache_op_result_id where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::perf_hw_cache_op_result_id where T: ?core::marker::Sized pub fn aya_obj::generated::perf_hw_cache_op_result_id::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::perf_hw_cache_op_result_id where T: core::clone::Clone +pub unsafe fn aya_obj::generated::perf_hw_cache_op_result_id::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::perf_hw_cache_op_result_id pub fn aya_obj::generated::perf_hw_cache_op_result_id::from(t: T) -> T #[repr(u32)] pub enum aya_obj::generated::perf_hw_id @@ -2042,12 +3482,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::perf_hw_id where T: core: pub type aya_obj::generated::perf_hw_id::Owned = T pub fn aya_obj::generated::perf_hw_id::clone_into(&self, target: &mut T) pub fn aya_obj::generated::perf_hw_id::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::perf_hw_id where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::perf_hw_id where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::perf_hw_id::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::perf_hw_id where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::perf_hw_id where T: ?core::marker::Sized pub fn aya_obj::generated::perf_hw_id::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::perf_hw_id where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::perf_hw_id where T: ?core::marker::Sized pub fn aya_obj::generated::perf_hw_id::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::perf_hw_id where T: core::clone::Clone +pub unsafe fn aya_obj::generated::perf_hw_id::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::perf_hw_id pub fn aya_obj::generated::perf_hw_id::from(t: T) -> T #[repr(u32)] pub enum aya_obj::generated::perf_sw_ids @@ -2093,12 +3535,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::perf_sw_ids where T: core pub type aya_obj::generated::perf_sw_ids::Owned = T pub fn aya_obj::generated::perf_sw_ids::clone_into(&self, target: &mut T) pub fn aya_obj::generated::perf_sw_ids::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::perf_sw_ids where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::perf_sw_ids where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::perf_sw_ids::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::perf_sw_ids where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::perf_sw_ids where T: ?core::marker::Sized pub fn aya_obj::generated::perf_sw_ids::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::perf_sw_ids where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::perf_sw_ids where T: ?core::marker::Sized pub fn aya_obj::generated::perf_sw_ids::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::perf_sw_ids where T: core::clone::Clone +pub unsafe fn aya_obj::generated::perf_sw_ids::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::perf_sw_ids pub fn aya_obj::generated::perf_sw_ids::from(t: T) -> T #[repr(u32)] pub enum aya_obj::generated::perf_type_id @@ -2138,12 +3582,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::perf_type_id where T: cor pub type aya_obj::generated::perf_type_id::Owned = T pub fn aya_obj::generated::perf_type_id::clone_into(&self, target: &mut T) pub fn aya_obj::generated::perf_type_id::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::perf_type_id where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::perf_type_id where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::perf_type_id::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::perf_type_id where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::perf_type_id where T: ?core::marker::Sized pub fn aya_obj::generated::perf_type_id::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::perf_type_id where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::perf_type_id where T: ?core::marker::Sized pub fn aya_obj::generated::perf_type_id::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::perf_type_id where T: core::clone::Clone +pub unsafe fn aya_obj::generated::perf_type_id::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::perf_type_id pub fn aya_obj::generated::perf_type_id::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::bpf_attr @@ -2188,12 +3634,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr where T: core::c pub type aya_obj::generated::bpf_attr::Owned = T pub fn aya_obj::generated::bpf_attr::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr pub fn aya_obj::generated::bpf_attr::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_1 @@ -2220,12 +3668,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_10__ pub type aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_1::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_1 pub fn aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_2 @@ -2252,12 +3702,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_10__ pub type aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_2::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_2::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_2::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_2 pub fn aya_obj::generated::bpf_attr__bindgen_ty_10__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_1 @@ -2284,12 +3736,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_14__ pub type aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_1::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_1 pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_2 @@ -2316,12 +3770,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_14__ pub type aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_2::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_2::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_2::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_2 pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3 @@ -2355,12 +3811,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_14__ pub type aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3 pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 @@ -2387,12 +3845,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_14__ pub type aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 @@ -2419,12 +3879,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_14__ pub type aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_1 @@ -2451,12 +3913,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_15__ pub type aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_1::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_1 pub fn aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_2 @@ -2483,12 +3947,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_15__ pub type aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_2::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_2::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_2::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_2 pub fn aya_obj::generated::bpf_attr__bindgen_ty_15__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::bpf_attr__bindgen_ty_2__bindgen_ty_1 @@ -2515,12 +3981,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_2__b pub type aya_obj::generated::bpf_attr__bindgen_ty_2__bindgen_ty_1::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_2__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_2__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_2__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_2__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_2__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_2__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_2__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_2__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_2__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_2__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_2__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_2__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_2__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_2__bindgen_ty_1 pub fn aya_obj::generated::bpf_attr__bindgen_ty_2__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::bpf_attr__bindgen_ty_4__bindgen_ty_1 @@ -2547,12 +4015,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_4__b pub type aya_obj::generated::bpf_attr__bindgen_ty_4__bindgen_ty_1::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_4__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_4__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_4__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_4__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_4__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_4__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_4__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_4__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_4__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_4__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_4__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_4__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_4__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_4__bindgen_ty_1 pub fn aya_obj::generated::bpf_attr__bindgen_ty_4__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_1 @@ -2579,12 +4049,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_6__b pub type aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_1::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_1 pub fn aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_2 @@ -2611,12 +4083,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_6__b pub type aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_2::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_2::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_2::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_2 pub fn aya_obj::generated::bpf_attr__bindgen_ty_6__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::bpf_attr__bindgen_ty_8__bindgen_ty_1 @@ -2646,16 +4120,18 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_8__b pub type aya_obj::generated::bpf_attr__bindgen_ty_8__bindgen_ty_1::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_8__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_8__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_8__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_8__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_8__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_8__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_8__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_8__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_8__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_8__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_8__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_8__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_8__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_8__bindgen_ty_1 pub fn aya_obj::generated::bpf_attr__bindgen_ty_8__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::bpf_cpumap_val__bindgen_ty_1 -pub aya_obj::generated::bpf_cpumap_val__bindgen_ty_1::fd: core::ffi::c_int +pub aya_obj::generated::bpf_cpumap_val__bindgen_ty_1::fd: core::ffi::primitives::c_int pub aya_obj::generated::bpf_cpumap_val__bindgen_ty_1::id: aya_obj::generated::__u32 impl core::clone::Clone for aya_obj::generated::bpf_cpumap_val__bindgen_ty_1 pub fn aya_obj::generated::bpf_cpumap_val__bindgen_ty_1::clone(&self) -> aya_obj::generated::bpf_cpumap_val__bindgen_ty_1 @@ -2678,16 +4154,18 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_cpumap_val__bindgen_t pub type aya_obj::generated::bpf_cpumap_val__bindgen_ty_1::Owned = T pub fn aya_obj::generated::bpf_cpumap_val__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_cpumap_val__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_cpumap_val__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_cpumap_val__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_cpumap_val__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_cpumap_val__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_cpumap_val__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_cpumap_val__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_cpumap_val__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_cpumap_val__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_cpumap_val__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_cpumap_val__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_cpumap_val__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_cpumap_val__bindgen_ty_1 pub fn aya_obj::generated::bpf_cpumap_val__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::bpf_devmap_val__bindgen_ty_1 -pub aya_obj::generated::bpf_devmap_val__bindgen_ty_1::fd: core::ffi::c_int +pub aya_obj::generated::bpf_devmap_val__bindgen_ty_1::fd: core::ffi::primitives::c_int pub aya_obj::generated::bpf_devmap_val__bindgen_ty_1::id: aya_obj::generated::__u32 impl core::clone::Clone for aya_obj::generated::bpf_devmap_val__bindgen_ty_1 pub fn aya_obj::generated::bpf_devmap_val__bindgen_ty_1::clone(&self) -> aya_obj::generated::bpf_devmap_val__bindgen_ty_1 @@ -2710,12 +4188,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_devmap_val__bindgen_t pub type aya_obj::generated::bpf_devmap_val__bindgen_ty_1::Owned = T pub fn aya_obj::generated::bpf_devmap_val__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_devmap_val__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_devmap_val__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_devmap_val__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_devmap_val__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_devmap_val__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_devmap_val__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_devmap_val__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_devmap_val__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_devmap_val__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_devmap_val__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_devmap_val__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_devmap_val__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_devmap_val__bindgen_ty_1 pub fn aya_obj::generated::bpf_devmap_val__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::bpf_link_info__bindgen_ty_1 @@ -2753,12 +4233,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 @@ -2787,12 +4269,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 @@ -2818,12 +4302,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 @@ -2850,12 +4336,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::btf_type__bindgen_ty_1 @@ -2882,12 +4370,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::btf_type__bindgen_ty_1 wh pub type aya_obj::generated::btf_type__bindgen_ty_1::Owned = T pub fn aya_obj::generated::btf_type__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::btf_type__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::btf_type__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::btf_type__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::btf_type__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::btf_type__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::btf_type__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::btf_type__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::btf_type__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::btf_type__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::btf_type__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::btf_type__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::btf_type__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::btf_type__bindgen_ty_1 pub fn aya_obj::generated::btf_type__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::perf_event_attr__bindgen_ty_1 @@ -2914,12 +4404,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::perf_event_attr__bindgen_ pub type aya_obj::generated::perf_event_attr__bindgen_ty_1::Owned = T pub fn aya_obj::generated::perf_event_attr__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::perf_event_attr__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::perf_event_attr__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::perf_event_attr__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::perf_event_attr__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::perf_event_attr__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::perf_event_attr__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::perf_event_attr__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::perf_event_attr__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::perf_event_attr__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::perf_event_attr__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::perf_event_attr__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::perf_event_attr__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::perf_event_attr__bindgen_ty_1 pub fn aya_obj::generated::perf_event_attr__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::perf_event_attr__bindgen_ty_2 @@ -2946,12 +4438,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::perf_event_attr__bindgen_ pub type aya_obj::generated::perf_event_attr__bindgen_ty_2::Owned = T pub fn aya_obj::generated::perf_event_attr__bindgen_ty_2::clone_into(&self, target: &mut T) pub fn aya_obj::generated::perf_event_attr__bindgen_ty_2::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::perf_event_attr__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::perf_event_attr__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::perf_event_attr__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::perf_event_attr__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::perf_event_attr__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_obj::generated::perf_event_attr__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::perf_event_attr__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::perf_event_attr__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_obj::generated::perf_event_attr__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::perf_event_attr__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::perf_event_attr__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::perf_event_attr__bindgen_ty_2 pub fn aya_obj::generated::perf_event_attr__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::perf_event_attr__bindgen_ty_3 @@ -2980,12 +4474,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::perf_event_attr__bindgen_ pub type aya_obj::generated::perf_event_attr__bindgen_ty_3::Owned = T pub fn aya_obj::generated::perf_event_attr__bindgen_ty_3::clone_into(&self, target: &mut T) pub fn aya_obj::generated::perf_event_attr__bindgen_ty_3::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::perf_event_attr__bindgen_ty_3 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::perf_event_attr__bindgen_ty_3 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::perf_event_attr__bindgen_ty_3::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::perf_event_attr__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::perf_event_attr__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_obj::generated::perf_event_attr__bindgen_ty_3::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::perf_event_attr__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::perf_event_attr__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_obj::generated::perf_event_attr__bindgen_ty_3::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::perf_event_attr__bindgen_ty_3 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::perf_event_attr__bindgen_ty_3::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::perf_event_attr__bindgen_ty_3 pub fn aya_obj::generated::perf_event_attr__bindgen_ty_3::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::perf_event_attr__bindgen_ty_4 @@ -3014,12 +4510,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::perf_event_attr__bindgen_ pub type aya_obj::generated::perf_event_attr__bindgen_ty_4::Owned = T pub fn aya_obj::generated::perf_event_attr__bindgen_ty_4::clone_into(&self, target: &mut T) pub fn aya_obj::generated::perf_event_attr__bindgen_ty_4::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::perf_event_attr__bindgen_ty_4 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::perf_event_attr__bindgen_ty_4 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::perf_event_attr__bindgen_ty_4::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::perf_event_attr__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::perf_event_attr__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_obj::generated::perf_event_attr__bindgen_ty_4::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::perf_event_attr__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::perf_event_attr__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_obj::generated::perf_event_attr__bindgen_ty_4::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::perf_event_attr__bindgen_ty_4 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::perf_event_attr__bindgen_ty_4::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::perf_event_attr__bindgen_ty_4 pub fn aya_obj::generated::perf_event_attr__bindgen_ty_4::from(t: T) -> T #[repr(C)] pub union aya_obj::generated::perf_event_mmap_page__bindgen_ty_1 @@ -3046,18 +4544,24 @@ impl alloc::borrow::ToOwned for aya_obj::generated::perf_event_mmap_page__bin pub type aya_obj::generated::perf_event_mmap_page__bindgen_ty_1::Owned = T pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::perf_event_mmap_page__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::perf_event_mmap_page__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::perf_event_mmap_page__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::perf_event_mmap_page__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::perf_event_mmap_page__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::perf_event_mmap_page__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::perf_event_mmap_page__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::perf_event_mmap_page__bindgen_ty_1 pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::__BindgenBitfieldUnit impl aya_obj::generated::__BindgenBitfieldUnit where Storage: core::convert::AsRef<[u8]> + core::convert::AsMut<[u8]> pub fn aya_obj::generated::__BindgenBitfieldUnit::get(&self, bit_offset: usize, bit_width: u8) -> u64 pub fn aya_obj::generated::__BindgenBitfieldUnit::get_bit(&self, index: usize) -> bool +pub unsafe fn aya_obj::generated::__BindgenBitfieldUnit::raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 +pub unsafe fn aya_obj::generated::__BindgenBitfieldUnit::raw_get_bit(this: *const Self, index: usize) -> bool +pub unsafe fn aya_obj::generated::__BindgenBitfieldUnit::raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) +pub unsafe fn aya_obj::generated::__BindgenBitfieldUnit::raw_set_bit(this: *mut Self, index: usize, val: bool) pub fn aya_obj::generated::__BindgenBitfieldUnit::set(&mut self, bit_offset: usize, bit_width: u8, val: u64) pub fn aya_obj::generated::__BindgenBitfieldUnit::set_bit(&mut self, index: usize, val: bool) impl aya_obj::generated::__BindgenBitfieldUnit @@ -3097,12 +4601,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::__BindgenBitfieldUnit::Owned = T pub fn aya_obj::generated::__BindgenBitfieldUnit::clone_into(&self, target: &mut T) pub fn aya_obj::generated::__BindgenBitfieldUnit::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::__BindgenBitfieldUnit where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::__BindgenBitfieldUnit where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::__BindgenBitfieldUnit::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::__BindgenBitfieldUnit where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::__BindgenBitfieldUnit where T: ?core::marker::Sized pub fn aya_obj::generated::__BindgenBitfieldUnit::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::__BindgenBitfieldUnit where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::__BindgenBitfieldUnit where T: ?core::marker::Sized pub fn aya_obj::generated::__BindgenBitfieldUnit::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::__BindgenBitfieldUnit where T: core::clone::Clone +pub unsafe fn aya_obj::generated::__BindgenBitfieldUnit::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::__BindgenBitfieldUnit pub fn aya_obj::generated::__BindgenBitfieldUnit::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::__IncompleteArrayField(_, _) @@ -3130,11 +4636,11 @@ pub fn aya_obj::generated::__IncompleteArrayField::try_from(value: U) -> core impl core::convert::TryInto for aya_obj::generated::__IncompleteArrayField where U: core::convert::TryFrom pub type aya_obj::generated::__IncompleteArrayField::Error = >::Error pub fn aya_obj::generated::__IncompleteArrayField::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_obj::generated::__IncompleteArrayField where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::__IncompleteArrayField where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::__IncompleteArrayField::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::__IncompleteArrayField where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::__IncompleteArrayField where T: ?core::marker::Sized pub fn aya_obj::generated::__IncompleteArrayField::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::__IncompleteArrayField where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::__IncompleteArrayField where T: ?core::marker::Sized pub fn aya_obj::generated::__IncompleteArrayField::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_obj::generated::__IncompleteArrayField pub fn aya_obj::generated::__IncompleteArrayField::from(t: T) -> T @@ -3148,7 +4654,7 @@ pub aya_obj::generated::bpf_attr__bindgen_ty_1::key_size: aya_obj::generated::__ pub aya_obj::generated::bpf_attr__bindgen_ty_1::map_extra: aya_obj::generated::__u64 pub aya_obj::generated::bpf_attr__bindgen_ty_1::map_flags: aya_obj::generated::__u32 pub aya_obj::generated::bpf_attr__bindgen_ty_1::map_ifindex: aya_obj::generated::__u32 -pub aya_obj::generated::bpf_attr__bindgen_ty_1::map_name: [core::ffi::c_char; 16] +pub aya_obj::generated::bpf_attr__bindgen_ty_1::map_name: [core::ffi::primitives::c_char; 16] pub aya_obj::generated::bpf_attr__bindgen_ty_1::map_token_fd: aya_obj::generated::__s32 pub aya_obj::generated::bpf_attr__bindgen_ty_1::map_type: aya_obj::generated::__u32 pub aya_obj::generated::bpf_attr__bindgen_ty_1::max_entries: aya_obj::generated::__u32 @@ -3178,12 +4684,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_1 wh pub type aya_obj::generated::bpf_attr__bindgen_ty_1::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_1 pub fn aya_obj::generated::bpf_attr__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_10 @@ -3222,12 +4730,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_10 w pub type aya_obj::generated::bpf_attr__bindgen_ty_10::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_10::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_10::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_10 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_10 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_10::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_10 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_10 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_10::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_10 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_10 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_10::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_10 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_10::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_10 pub fn aya_obj::generated::bpf_attr__bindgen_ty_10::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_11 @@ -3261,12 +4771,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_11 w pub type aya_obj::generated::bpf_attr__bindgen_ty_11::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_11::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_11::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_11 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_11 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_11::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_11 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_11 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_11::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_11 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_11 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_11::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_11 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_11::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_11 pub fn aya_obj::generated::bpf_attr__bindgen_ty_11::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_12 @@ -3301,12 +4813,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_12 w pub type aya_obj::generated::bpf_attr__bindgen_ty_12::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_12::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_12::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_12 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_12 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_12::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_12 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_12 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_12::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_12 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_12 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_12::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_12 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_12::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_12 pub fn aya_obj::generated::bpf_attr__bindgen_ty_12::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_13 @@ -3342,12 +4856,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_13 w pub type aya_obj::generated::bpf_attr__bindgen_ty_13::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_13::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_13::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_13 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_13 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_13::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_13 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_13 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_13::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_13 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_13 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_13::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_13 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_13::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_13 pub fn aya_obj::generated::bpf_attr__bindgen_ty_13::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_14 @@ -3377,12 +4893,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_14 w pub type aya_obj::generated::bpf_attr__bindgen_ty_14::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_14::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_14::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_14 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_14::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_14 pub fn aya_obj::generated::bpf_attr__bindgen_ty_14::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 @@ -3411,12 +4929,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_14__ pub type aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 @@ -3444,12 +4964,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_14__ pub type aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 @@ -3481,12 +5003,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_14__ pub type aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 @@ -3515,12 +5039,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_14__ pub type aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 @@ -3551,12 +5077,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_14__ pub type aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 @@ -3583,12 +5111,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_14__ pub type aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 @@ -3622,12 +5152,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_14__ pub type aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 @@ -3654,12 +5186,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_14__ pub type aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 pub fn aya_obj::generated::bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_15 @@ -3688,12 +5222,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_15 w pub type aya_obj::generated::bpf_attr__bindgen_ty_15::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_15::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_15::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_15 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_15 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_15::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_15 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_15 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_15::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_15 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_15 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_15::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_15 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_15::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_15 pub fn aya_obj::generated::bpf_attr__bindgen_ty_15::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_16 @@ -3721,12 +5257,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_16 w pub type aya_obj::generated::bpf_attr__bindgen_ty_16::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_16::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_16::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_16 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_16 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_16::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_16 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_16 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_16::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_16 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_16 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_16::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_16 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_16::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_16 pub fn aya_obj::generated::bpf_attr__bindgen_ty_16::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_17 @@ -3754,12 +5292,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_17 w pub type aya_obj::generated::bpf_attr__bindgen_ty_17::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_17::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_17::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_17 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_17 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_17::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_17 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_17 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_17::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_17 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_17 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_17::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_17 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_17::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_17 pub fn aya_obj::generated::bpf_attr__bindgen_ty_17::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_18 @@ -3788,12 +5328,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_18 w pub type aya_obj::generated::bpf_attr__bindgen_ty_18::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_18::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_18::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_18 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_18 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_18::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_18 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_18 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_18::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_18 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_18 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_18::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_18 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_18::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_18 pub fn aya_obj::generated::bpf_attr__bindgen_ty_18::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_19 @@ -3823,12 +5365,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_19 w pub type aya_obj::generated::bpf_attr__bindgen_ty_19::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_19::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_19::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_19 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_19 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_19::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_19 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_19 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_19::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_19 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_19 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_19::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_19 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_19::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_19 pub fn aya_obj::generated::bpf_attr__bindgen_ty_19::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_2 @@ -3857,12 +5401,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_2 wh pub type aya_obj::generated::bpf_attr__bindgen_ty_2::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_2::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_2::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_2 pub fn aya_obj::generated::bpf_attr__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_20 @@ -3891,12 +5437,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_20 w pub type aya_obj::generated::bpf_attr__bindgen_ty_20::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_20::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_20::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_20 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_20 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_20::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_20 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_20 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_20::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_20 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_20 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_20::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_20 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_20::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_20 pub fn aya_obj::generated::bpf_attr__bindgen_ty_20::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_3 @@ -3931,12 +5479,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_3 wh pub type aya_obj::generated::bpf_attr__bindgen_ty_3::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_3::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_3::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_3 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_3 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_3::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_3::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_3::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_3 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_3::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_3 pub fn aya_obj::generated::bpf_attr__bindgen_ty_3::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_4 @@ -3964,7 +5514,7 @@ pub aya_obj::generated::bpf_attr__bindgen_ty_4::log_true_size: aya_obj::generate pub aya_obj::generated::bpf_attr__bindgen_ty_4::prog_btf_fd: aya_obj::generated::__u32 pub aya_obj::generated::bpf_attr__bindgen_ty_4::prog_flags: aya_obj::generated::__u32 pub aya_obj::generated::bpf_attr__bindgen_ty_4::prog_ifindex: aya_obj::generated::__u32 -pub aya_obj::generated::bpf_attr__bindgen_ty_4::prog_name: [core::ffi::c_char; 16] +pub aya_obj::generated::bpf_attr__bindgen_ty_4::prog_name: [core::ffi::primitives::c_char; 16] pub aya_obj::generated::bpf_attr__bindgen_ty_4::prog_token_fd: aya_obj::generated::__s32 pub aya_obj::generated::bpf_attr__bindgen_ty_4::prog_type: aya_obj::generated::__u32 impl core::clone::Clone for aya_obj::generated::bpf_attr__bindgen_ty_4 @@ -3988,12 +5538,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_4 wh pub type aya_obj::generated::bpf_attr__bindgen_ty_4::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_4::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_4::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_4 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_4 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_4::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_4::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_4::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_4 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_4::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_4 pub fn aya_obj::generated::bpf_attr__bindgen_ty_4::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_5 @@ -4024,12 +5576,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_5 wh pub type aya_obj::generated::bpf_attr__bindgen_ty_5::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_5::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_5::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_5 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_5 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_5::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_5 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_5 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_5::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_5 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_5 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_5::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_5 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_5::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_5 pub fn aya_obj::generated::bpf_attr__bindgen_ty_5::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_6 @@ -4061,12 +5615,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_6 wh pub type aya_obj::generated::bpf_attr__bindgen_ty_6::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_6::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_6::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_6 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_6 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_6::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_6 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_6 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_6::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_6 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_6 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_6::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_6 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_6::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_6 pub fn aya_obj::generated::bpf_attr__bindgen_ty_6::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_7 @@ -4108,12 +5664,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_7 wh pub type aya_obj::generated::bpf_attr__bindgen_ty_7::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_7::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_7::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_7 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_7 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_7::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_7 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_7 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_7::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_7 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_7 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_7::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_7 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_7::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_7 pub fn aya_obj::generated::bpf_attr__bindgen_ty_7::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_8 @@ -4141,12 +5699,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_8 wh pub type aya_obj::generated::bpf_attr__bindgen_ty_8::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_8::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_8::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_8 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_8 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_8::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_8 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_8 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_8::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_8 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_8 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_8::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_8 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_8::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_8 pub fn aya_obj::generated::bpf_attr__bindgen_ty_8::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_attr__bindgen_ty_9 @@ -4176,12 +5736,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_attr__bindgen_ty_9 wh pub type aya_obj::generated::bpf_attr__bindgen_ty_9::Owned = T pub fn aya_obj::generated::bpf_attr__bindgen_ty_9::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_attr__bindgen_ty_9::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_9 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_attr__bindgen_ty_9 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_9::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_9 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_attr__bindgen_ty_9 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_9::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_9 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_attr__bindgen_ty_9 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_attr__bindgen_ty_9::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_attr__bindgen_ty_9 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_attr__bindgen_ty_9::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_attr__bindgen_ty_9 pub fn aya_obj::generated::bpf_attr__bindgen_ty_9::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_btf_info @@ -4214,19 +5776,21 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_btf_info where T: cor pub type aya_obj::generated::bpf_btf_info::Owned = T pub fn aya_obj::generated::bpf_btf_info::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_btf_info::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_btf_info where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_btf_info where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_btf_info::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_btf_info where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_btf_info where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_btf_info::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_btf_info where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_btf_info where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_btf_info::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_btf_info where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_btf_info::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_btf_info pub fn aya_obj::generated::bpf_btf_info::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_core_relo -pub aya_obj::generated::bpf_core_relo::access_str_off: core::ffi::c_uint -pub aya_obj::generated::bpf_core_relo::insn_off: core::ffi::c_uint +pub aya_obj::generated::bpf_core_relo::access_str_off: core::ffi::primitives::c_uint +pub aya_obj::generated::bpf_core_relo::insn_off: core::ffi::primitives::c_uint pub aya_obj::generated::bpf_core_relo::kind: aya_obj::generated::bpf_core_relo_kind::Type -pub aya_obj::generated::bpf_core_relo::type_id: core::ffi::c_uint +pub aya_obj::generated::bpf_core_relo::type_id: core::ffi::primitives::c_uint impl core::clone::Clone for aya_obj::generated::bpf_core_relo pub fn aya_obj::generated::bpf_core_relo::clone(&self) -> aya_obj::generated::bpf_core_relo impl core::fmt::Debug for aya_obj::generated::bpf_core_relo @@ -4250,12 +5814,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_core_relo where T: co pub type aya_obj::generated::bpf_core_relo::Owned = T pub fn aya_obj::generated::bpf_core_relo::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_core_relo::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_core_relo where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_core_relo where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_core_relo::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_core_relo where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_core_relo where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_core_relo::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_core_relo where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_core_relo where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_core_relo::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_core_relo where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_core_relo::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_core_relo pub fn aya_obj::generated::bpf_core_relo::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_cpumap_val @@ -4282,12 +5848,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_cpumap_val where T: c pub type aya_obj::generated::bpf_cpumap_val::Owned = T pub fn aya_obj::generated::bpf_cpumap_val::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_cpumap_val::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_cpumap_val where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_cpumap_val where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_cpumap_val::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_cpumap_val where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_cpumap_val where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_cpumap_val::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_cpumap_val where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_cpumap_val where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_cpumap_val::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_cpumap_val where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_cpumap_val::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_cpumap_val pub fn aya_obj::generated::bpf_cpumap_val::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_devmap_val @@ -4314,12 +5882,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_devmap_val where T: c pub type aya_obj::generated::bpf_devmap_val::Owned = T pub fn aya_obj::generated::bpf_devmap_val::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_devmap_val::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_devmap_val where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_devmap_val where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_devmap_val::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_devmap_val where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_devmap_val where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_devmap_val::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_devmap_val where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_devmap_val where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_devmap_val::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_devmap_val where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_devmap_val::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_devmap_val pub fn aya_obj::generated::bpf_devmap_val::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_func_info @@ -4348,12 +5918,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_func_info where T: co pub type aya_obj::generated::bpf_func_info::Owned = T pub fn aya_obj::generated::bpf_func_info::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_func_info::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_func_info where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_func_info where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_func_info::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_func_info where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_func_info where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_func_info::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_func_info where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_func_info where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_func_info::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_func_info where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_func_info::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_func_info pub fn aya_obj::generated::bpf_func_info::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_insn @@ -4364,10 +5936,14 @@ pub aya_obj::generated::bpf_insn::imm: aya_obj::generated::__s32 pub aya_obj::generated::bpf_insn::off: aya_obj::generated::__s16 impl aya_obj::generated::bpf_insn pub fn aya_obj::generated::bpf_insn::dst_reg(&self) -> aya_obj::generated::__u8 +pub unsafe fn aya_obj::generated::bpf_insn::dst_reg_raw(this: *const Self) -> aya_obj::generated::__u8 pub fn aya_obj::generated::bpf_insn::new_bitfield_1(dst_reg: aya_obj::generated::__u8, src_reg: aya_obj::generated::__u8) -> aya_obj::generated::__BindgenBitfieldUnit<[u8; 1]> pub fn aya_obj::generated::bpf_insn::set_dst_reg(&mut self, val: aya_obj::generated::__u8) +pub unsafe fn aya_obj::generated::bpf_insn::set_dst_reg_raw(this: *mut Self, val: aya_obj::generated::__u8) pub fn aya_obj::generated::bpf_insn::set_src_reg(&mut self, val: aya_obj::generated::__u8) +pub unsafe fn aya_obj::generated::bpf_insn::set_src_reg_raw(this: *mut Self, val: aya_obj::generated::__u8) pub fn aya_obj::generated::bpf_insn::src_reg(&self) -> aya_obj::generated::__u8 +pub unsafe fn aya_obj::generated::bpf_insn::src_reg_raw(this: *const Self) -> aya_obj::generated::__u8 impl core::clone::Clone for aya_obj::generated::bpf_insn pub fn aya_obj::generated::bpf_insn::clone(&self) -> aya_obj::generated::bpf_insn impl core::fmt::Debug for aya_obj::generated::bpf_insn @@ -4391,12 +5967,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_insn where T: core::c pub type aya_obj::generated::bpf_insn::Owned = T pub fn aya_obj::generated::bpf_insn::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_insn::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_insn where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_insn where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_insn::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_insn where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_insn where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_insn::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_insn where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_insn where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_insn::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_insn where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_insn::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_insn pub fn aya_obj::generated::bpf_insn::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_line_info @@ -4427,12 +6005,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_line_info where T: co pub type aya_obj::generated::bpf_line_info::Owned = T pub fn aya_obj::generated::bpf_line_info::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_line_info::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_line_info where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_line_info where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_line_info::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_line_info where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_line_info where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_line_info::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_line_info where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_line_info where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_line_info::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_line_info where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_line_info::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_line_info pub fn aya_obj::generated::bpf_line_info::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_link_info @@ -4461,12 +6041,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info where T: co pub type aya_obj::generated::bpf_link_info::Owned = T pub fn aya_obj::generated::bpf_link_info::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info pub fn aya_obj::generated::bpf_link_info::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_1 @@ -4495,12 +6077,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_1::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_1 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_10 @@ -4535,12 +6119,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_10::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_10::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_10::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_10 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_10 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_10::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_10 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_10 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_10::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_10 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_10 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_10::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_10 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_10::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_10 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_10::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11 @@ -4571,12 +6157,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 @@ -4607,12 +6195,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 @@ -4645,12 +6235,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 @@ -4684,12 +6276,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 @@ -4723,12 +6317,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_12 @@ -4757,12 +6353,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_12::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_12::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_12::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_12 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_12 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_12::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_12 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_12 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_12::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_12 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_12 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_12::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_12 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_12::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_12 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_12::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_13 @@ -4791,12 +6389,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_13::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_13::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_13::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_13 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_13 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_13::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_13 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_13 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_13::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_13 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_13 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_13::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_13 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_13::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_13 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_13::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_2 @@ -4826,12 +6426,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_2::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_2::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_2::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_2 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_3 @@ -4860,12 +6462,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_3::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_3::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_3::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_3 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_3 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_3::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_3::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_3 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_3 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_3::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_3 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_3::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_3 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_3::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4 @@ -4894,12 +6498,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 @@ -4927,12 +6533,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 @@ -4961,12 +6569,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 @@ -4995,12 +6605,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_5 @@ -5029,12 +6641,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_5::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_5::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_5::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_5 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_5 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_5::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_5 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_5 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_5::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_5 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_5 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_5::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_5 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_5::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_5 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_5::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_6 @@ -5062,12 +6676,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_6::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_6::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_6::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_6 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_6 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_6::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_6 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_6 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_6::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_6 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_6 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_6::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_6 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_6::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_6 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_6::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_7 @@ -5095,12 +6711,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_7::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_7::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_7::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_7 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_7 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_7::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_7 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_7 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_7::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_7 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_7 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_7::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_7 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_7::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_7 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_7::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_8 @@ -5131,12 +6749,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_8::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_8::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_8::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_8 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_8 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_8::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_8 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_8 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_8::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_8 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_8 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_8::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_8 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_8::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_8 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_8::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_9 @@ -5168,12 +6788,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_link_info__bindgen_ty pub type aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_9::Owned = T pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_9::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_9::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_9 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_9 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_9::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_9 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_9 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_9::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_9 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_9 where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_9::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_9 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_9::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_9 pub fn aya_obj::generated::bpf_link_info__bindgen_ty_1__bindgen_ty_9::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_lpm_trie_key @@ -5195,11 +6817,11 @@ pub fn aya_obj::generated::bpf_lpm_trie_key::try_from(value: U) -> core::result: impl core::convert::TryInto for aya_obj::generated::bpf_lpm_trie_key where U: core::convert::TryFrom pub type aya_obj::generated::bpf_lpm_trie_key::Error = >::Error pub fn aya_obj::generated::bpf_lpm_trie_key::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_obj::generated::bpf_lpm_trie_key where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_lpm_trie_key where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_lpm_trie_key::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_lpm_trie_key where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_lpm_trie_key where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_lpm_trie_key::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_lpm_trie_key where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_lpm_trie_key where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_lpm_trie_key::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_obj::generated::bpf_lpm_trie_key pub fn aya_obj::generated::bpf_lpm_trie_key::from(t: T) -> T @@ -5215,7 +6837,7 @@ pub aya_obj::generated::bpf_map_info::key_size: aya_obj::generated::__u32 pub aya_obj::generated::bpf_map_info::map_extra: aya_obj::generated::__u64 pub aya_obj::generated::bpf_map_info::map_flags: aya_obj::generated::__u32 pub aya_obj::generated::bpf_map_info::max_entries: aya_obj::generated::__u32 -pub aya_obj::generated::bpf_map_info::name: [core::ffi::c_char; 16] +pub aya_obj::generated::bpf_map_info::name: [core::ffi::primitives::c_char; 16] pub aya_obj::generated::bpf_map_info::netns_dev: aya_obj::generated::__u64 pub aya_obj::generated::bpf_map_info::netns_ino: aya_obj::generated::__u64 pub aya_obj::generated::bpf_map_info::type_: aya_obj::generated::__u32 @@ -5243,12 +6865,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_map_info where T: cor pub type aya_obj::generated::bpf_map_info::Owned = T pub fn aya_obj::generated::bpf_map_info::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_map_info::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_map_info where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_map_info where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_map_info::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_map_info where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_map_info where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_map_info::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_map_info where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_map_info where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_map_info::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_map_info where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_map_info::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_map_info pub fn aya_obj::generated::bpf_map_info::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::bpf_prog_info @@ -5272,7 +6896,7 @@ pub aya_obj::generated::bpf_prog_info::line_info: aya_obj::generated::__u64 pub aya_obj::generated::bpf_prog_info::line_info_rec_size: aya_obj::generated::__u32 pub aya_obj::generated::bpf_prog_info::load_time: aya_obj::generated::__u64 pub aya_obj::generated::bpf_prog_info::map_ids: aya_obj::generated::__u64 -pub aya_obj::generated::bpf_prog_info::name: [core::ffi::c_char; 16] +pub aya_obj::generated::bpf_prog_info::name: [core::ffi::primitives::c_char; 16] pub aya_obj::generated::bpf_prog_info::netns_dev: aya_obj::generated::__u64 pub aya_obj::generated::bpf_prog_info::netns_ino: aya_obj::generated::__u64 pub aya_obj::generated::bpf_prog_info::nr_func_info: aya_obj::generated::__u32 @@ -5293,8 +6917,10 @@ pub aya_obj::generated::bpf_prog_info::xlated_prog_insns: aya_obj::generated::__ pub aya_obj::generated::bpf_prog_info::xlated_prog_len: aya_obj::generated::__u32 impl aya_obj::generated::bpf_prog_info pub fn aya_obj::generated::bpf_prog_info::gpl_compatible(&self) -> aya_obj::generated::__u32 +pub unsafe fn aya_obj::generated::bpf_prog_info::gpl_compatible_raw(this: *const Self) -> aya_obj::generated::__u32 pub fn aya_obj::generated::bpf_prog_info::new_bitfield_1(gpl_compatible: aya_obj::generated::__u32) -> aya_obj::generated::__BindgenBitfieldUnit<[u8; 4]> pub fn aya_obj::generated::bpf_prog_info::set_gpl_compatible(&mut self, val: aya_obj::generated::__u32) +pub unsafe fn aya_obj::generated::bpf_prog_info::set_gpl_compatible_raw(this: *mut Self, val: aya_obj::generated::__u32) impl core::clone::Clone for aya_obj::generated::bpf_prog_info pub fn aya_obj::generated::bpf_prog_info::clone(&self) -> aya_obj::generated::bpf_prog_info impl core::fmt::Debug for aya_obj::generated::bpf_prog_info @@ -5318,12 +6944,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::bpf_prog_info where T: co pub type aya_obj::generated::bpf_prog_info::Owned = T pub fn aya_obj::generated::bpf_prog_info::clone_into(&self, target: &mut T) pub fn aya_obj::generated::bpf_prog_info::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::bpf_prog_info where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::bpf_prog_info where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::bpf_prog_info::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::bpf_prog_info where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::bpf_prog_info where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_prog_info::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::bpf_prog_info where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::bpf_prog_info where T: ?core::marker::Sized pub fn aya_obj::generated::bpf_prog_info::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_prog_info where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_prog_info::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::bpf_prog_info pub fn aya_obj::generated::bpf_prog_info::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::btf_array @@ -5353,12 +6981,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::btf_array where T: core:: pub type aya_obj::generated::btf_array::Owned = T pub fn aya_obj::generated::btf_array::clone_into(&self, target: &mut T) pub fn aya_obj::generated::btf_array::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::btf_array where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::btf_array where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::btf_array::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::btf_array where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::btf_array where T: ?core::marker::Sized pub fn aya_obj::generated::btf_array::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::btf_array where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::btf_array where T: ?core::marker::Sized pub fn aya_obj::generated::btf_array::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::btf_array where T: core::clone::Clone +pub unsafe fn aya_obj::generated::btf_array::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::btf_array pub fn aya_obj::generated::btf_array::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::btf_decl_tag @@ -5386,12 +7016,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::btf_decl_tag where T: cor pub type aya_obj::generated::btf_decl_tag::Owned = T pub fn aya_obj::generated::btf_decl_tag::clone_into(&self, target: &mut T) pub fn aya_obj::generated::btf_decl_tag::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::btf_decl_tag where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::btf_decl_tag where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::btf_decl_tag::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::btf_decl_tag where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::btf_decl_tag where T: ?core::marker::Sized pub fn aya_obj::generated::btf_decl_tag::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::btf_decl_tag where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::btf_decl_tag where T: ?core::marker::Sized pub fn aya_obj::generated::btf_decl_tag::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::btf_decl_tag where T: core::clone::Clone +pub unsafe fn aya_obj::generated::btf_decl_tag::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::btf_decl_tag pub fn aya_obj::generated::btf_decl_tag::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::btf_enum @@ -5420,25 +7052,27 @@ impl alloc::borrow::ToOwned for aya_obj::generated::btf_enum where T: core::c pub type aya_obj::generated::btf_enum::Owned = T pub fn aya_obj::generated::btf_enum::clone_into(&self, target: &mut T) pub fn aya_obj::generated::btf_enum::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::btf_enum where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::btf_enum where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::btf_enum::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::btf_enum where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::btf_enum where T: ?core::marker::Sized pub fn aya_obj::generated::btf_enum::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::btf_enum where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::btf_enum where T: ?core::marker::Sized pub fn aya_obj::generated::btf_enum::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::btf_enum where T: core::clone::Clone +pub unsafe fn aya_obj::generated::btf_enum::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::btf_enum pub fn aya_obj::generated::btf_enum::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::btf_ext_header -pub aya_obj::generated::btf_ext_header::core_relo_len: core::ffi::c_uint -pub aya_obj::generated::btf_ext_header::core_relo_off: core::ffi::c_uint -pub aya_obj::generated::btf_ext_header::flags: core::ffi::c_uchar -pub aya_obj::generated::btf_ext_header::func_info_len: core::ffi::c_uint -pub aya_obj::generated::btf_ext_header::func_info_off: core::ffi::c_uint -pub aya_obj::generated::btf_ext_header::hdr_len: core::ffi::c_uint -pub aya_obj::generated::btf_ext_header::line_info_len: core::ffi::c_uint -pub aya_obj::generated::btf_ext_header::line_info_off: core::ffi::c_uint -pub aya_obj::generated::btf_ext_header::magic: core::ffi::c_ushort -pub aya_obj::generated::btf_ext_header::version: core::ffi::c_uchar +pub aya_obj::generated::btf_ext_header::core_relo_len: core::ffi::primitives::c_uint +pub aya_obj::generated::btf_ext_header::core_relo_off: core::ffi::primitives::c_uint +pub aya_obj::generated::btf_ext_header::flags: core::ffi::primitives::c_uchar +pub aya_obj::generated::btf_ext_header::func_info_len: core::ffi::primitives::c_uint +pub aya_obj::generated::btf_ext_header::func_info_off: core::ffi::primitives::c_uint +pub aya_obj::generated::btf_ext_header::hdr_len: core::ffi::primitives::c_uint +pub aya_obj::generated::btf_ext_header::line_info_len: core::ffi::primitives::c_uint +pub aya_obj::generated::btf_ext_header::line_info_off: core::ffi::primitives::c_uint +pub aya_obj::generated::btf_ext_header::magic: core::ffi::primitives::c_ushort +pub aya_obj::generated::btf_ext_header::version: core::ffi::primitives::c_uchar impl core::clone::Clone for aya_obj::generated::btf_ext_header pub fn aya_obj::generated::btf_ext_header::clone(&self) -> aya_obj::generated::btf_ext_header impl core::fmt::Debug for aya_obj::generated::btf_ext_header @@ -5462,12 +7096,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::btf_ext_header where T: c pub type aya_obj::generated::btf_ext_header::Owned = T pub fn aya_obj::generated::btf_ext_header::clone_into(&self, target: &mut T) pub fn aya_obj::generated::btf_ext_header::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::btf_ext_header where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::btf_ext_header where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::btf_ext_header::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::btf_ext_header where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::btf_ext_header where T: ?core::marker::Sized pub fn aya_obj::generated::btf_ext_header::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::btf_ext_header where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::btf_ext_header where T: ?core::marker::Sized pub fn aya_obj::generated::btf_ext_header::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::btf_ext_header where T: core::clone::Clone +pub unsafe fn aya_obj::generated::btf_ext_header::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::btf_ext_header pub fn aya_obj::generated::btf_ext_header::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::btf_header @@ -5502,12 +7138,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::btf_header where T: core: pub type aya_obj::generated::btf_header::Owned = T pub fn aya_obj::generated::btf_header::clone_into(&self, target: &mut T) pub fn aya_obj::generated::btf_header::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::btf_header where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::btf_header where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::btf_header::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::btf_header where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::btf_header where T: ?core::marker::Sized pub fn aya_obj::generated::btf_header::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::btf_header where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::btf_header where T: ?core::marker::Sized pub fn aya_obj::generated::btf_header::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::btf_header where T: core::clone::Clone +pub unsafe fn aya_obj::generated::btf_header::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::btf_header pub fn aya_obj::generated::btf_header::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::btf_member @@ -5537,12 +7175,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::btf_member where T: core: pub type aya_obj::generated::btf_member::Owned = T pub fn aya_obj::generated::btf_member::clone_into(&self, target: &mut T) pub fn aya_obj::generated::btf_member::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::btf_member where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::btf_member where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::btf_member::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::btf_member where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::btf_member where T: ?core::marker::Sized pub fn aya_obj::generated::btf_member::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::btf_member where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::btf_member where T: ?core::marker::Sized pub fn aya_obj::generated::btf_member::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::btf_member where T: core::clone::Clone +pub unsafe fn aya_obj::generated::btf_member::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::btf_member pub fn aya_obj::generated::btf_member::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::btf_param @@ -5571,12 +7211,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::btf_param where T: core:: pub type aya_obj::generated::btf_param::Owned = T pub fn aya_obj::generated::btf_param::clone_into(&self, target: &mut T) pub fn aya_obj::generated::btf_param::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::btf_param where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::btf_param where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::btf_param::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::btf_param where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::btf_param where T: ?core::marker::Sized pub fn aya_obj::generated::btf_param::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::btf_param where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::btf_param where T: ?core::marker::Sized pub fn aya_obj::generated::btf_param::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::btf_param where T: core::clone::Clone +pub unsafe fn aya_obj::generated::btf_param::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::btf_param pub fn aya_obj::generated::btf_param::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::btf_type @@ -5604,12 +7246,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::btf_type where T: core::c pub type aya_obj::generated::btf_type::Owned = T pub fn aya_obj::generated::btf_type::clone_into(&self, target: &mut T) pub fn aya_obj::generated::btf_type::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::btf_type where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::btf_type where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::btf_type::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::btf_type where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::btf_type where T: ?core::marker::Sized pub fn aya_obj::generated::btf_type::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::btf_type where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::btf_type where T: ?core::marker::Sized pub fn aya_obj::generated::btf_type::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::btf_type where T: core::clone::Clone +pub unsafe fn aya_obj::generated::btf_type::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::btf_type pub fn aya_obj::generated::btf_type::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::btf_var @@ -5637,12 +7281,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::btf_var where T: core::cl pub type aya_obj::generated::btf_var::Owned = T pub fn aya_obj::generated::btf_var::clone_into(&self, target: &mut T) pub fn aya_obj::generated::btf_var::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::btf_var where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::btf_var where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::btf_var::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::btf_var where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::btf_var where T: ?core::marker::Sized pub fn aya_obj::generated::btf_var::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::btf_var where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::btf_var where T: ?core::marker::Sized pub fn aya_obj::generated::btf_var::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::btf_var where T: core::clone::Clone +pub unsafe fn aya_obj::generated::btf_var::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::btf_var pub fn aya_obj::generated::btf_var::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::btf_var_secinfo @@ -5672,21 +7318,23 @@ impl alloc::borrow::ToOwned for aya_obj::generated::btf_var_secinfo where T: pub type aya_obj::generated::btf_var_secinfo::Owned = T pub fn aya_obj::generated::btf_var_secinfo::clone_into(&self, target: &mut T) pub fn aya_obj::generated::btf_var_secinfo::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::btf_var_secinfo where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::btf_var_secinfo where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::btf_var_secinfo::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::btf_var_secinfo where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::btf_var_secinfo where T: ?core::marker::Sized pub fn aya_obj::generated::btf_var_secinfo::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::btf_var_secinfo where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::btf_var_secinfo where T: ?core::marker::Sized pub fn aya_obj::generated::btf_var_secinfo::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::btf_var_secinfo where T: core::clone::Clone +pub unsafe fn aya_obj::generated::btf_var_secinfo::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::btf_var_secinfo pub fn aya_obj::generated::btf_var_secinfo::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::ifinfomsg -pub aya_obj::generated::ifinfomsg::__ifi_pad: core::ffi::c_uchar -pub aya_obj::generated::ifinfomsg::ifi_change: core::ffi::c_uint -pub aya_obj::generated::ifinfomsg::ifi_family: core::ffi::c_uchar -pub aya_obj::generated::ifinfomsg::ifi_flags: core::ffi::c_uint -pub aya_obj::generated::ifinfomsg::ifi_index: core::ffi::c_int -pub aya_obj::generated::ifinfomsg::ifi_type: core::ffi::c_ushort +pub aya_obj::generated::ifinfomsg::__ifi_pad: core::ffi::primitives::c_uchar +pub aya_obj::generated::ifinfomsg::ifi_change: core::ffi::primitives::c_uint +pub aya_obj::generated::ifinfomsg::ifi_family: core::ffi::primitives::c_uchar +pub aya_obj::generated::ifinfomsg::ifi_flags: core::ffi::primitives::c_uint +pub aya_obj::generated::ifinfomsg::ifi_index: core::ffi::primitives::c_int +pub aya_obj::generated::ifinfomsg::ifi_type: core::ffi::primitives::c_ushort impl core::clone::Clone for aya_obj::generated::ifinfomsg pub fn aya_obj::generated::ifinfomsg::clone(&self) -> aya_obj::generated::ifinfomsg impl core::fmt::Debug for aya_obj::generated::ifinfomsg @@ -5710,12 +7358,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::ifinfomsg where T: core:: pub type aya_obj::generated::ifinfomsg::Owned = T pub fn aya_obj::generated::ifinfomsg::clone_into(&self, target: &mut T) pub fn aya_obj::generated::ifinfomsg::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::ifinfomsg where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::ifinfomsg where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::ifinfomsg::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::ifinfomsg where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::ifinfomsg where T: ?core::marker::Sized pub fn aya_obj::generated::ifinfomsg::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::ifinfomsg where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::ifinfomsg where T: ?core::marker::Sized pub fn aya_obj::generated::ifinfomsg::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::ifinfomsg where T: core::clone::Clone +pub unsafe fn aya_obj::generated::ifinfomsg::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::ifinfomsg pub fn aya_obj::generated::ifinfomsg::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::perf_event_attr @@ -5745,82 +7395,158 @@ pub aya_obj::generated::perf_event_attr::size: aya_obj::generated::__u32 pub aya_obj::generated::perf_event_attr::type_: aya_obj::generated::__u32 impl aya_obj::generated::perf_event_attr pub fn aya_obj::generated::perf_event_attr::__reserved_1(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::__reserved_1_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::aux_output(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::aux_output_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::bpf_event(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::bpf_event_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::build_id(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::build_id_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::cgroup(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::cgroup_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::comm(&self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::comm_exec(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::comm_exec_raw(this: *const Self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::comm_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::context_switch(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::context_switch_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::disabled(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::disabled_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::enable_on_exec(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::enable_on_exec_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::exclude_callchain_kernel(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::exclude_callchain_kernel_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::exclude_callchain_user(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::exclude_callchain_user_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::exclude_guest(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::exclude_guest_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::exclude_host(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::exclude_host_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::exclude_hv(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::exclude_hv_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::exclude_idle(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::exclude_idle_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::exclude_kernel(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::exclude_kernel_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::exclude_user(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::exclude_user_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::exclusive(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::exclusive_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::freq(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::freq_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::inherit(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::inherit_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::inherit_stat(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::inherit_stat_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::inherit_thread(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::inherit_thread_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::ksymbol(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::ksymbol_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::mmap(&self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::mmap2(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::mmap2_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::mmap_data(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::mmap_data_raw(this: *const Self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::mmap_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::namespaces(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::namespaces_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::new_bitfield_1(disabled: aya_obj::generated::__u64, inherit: aya_obj::generated::__u64, pinned: aya_obj::generated::__u64, exclusive: aya_obj::generated::__u64, exclude_user: aya_obj::generated::__u64, exclude_kernel: aya_obj::generated::__u64, exclude_hv: aya_obj::generated::__u64, exclude_idle: aya_obj::generated::__u64, mmap: aya_obj::generated::__u64, comm: aya_obj::generated::__u64, freq: aya_obj::generated::__u64, inherit_stat: aya_obj::generated::__u64, enable_on_exec: aya_obj::generated::__u64, task: aya_obj::generated::__u64, watermark: aya_obj::generated::__u64, precise_ip: aya_obj::generated::__u64, mmap_data: aya_obj::generated::__u64, sample_id_all: aya_obj::generated::__u64, exclude_host: aya_obj::generated::__u64, exclude_guest: aya_obj::generated::__u64, exclude_callchain_kernel: aya_obj::generated::__u64, exclude_callchain_user: aya_obj::generated::__u64, mmap2: aya_obj::generated::__u64, comm_exec: aya_obj::generated::__u64, use_clockid: aya_obj::generated::__u64, context_switch: aya_obj::generated::__u64, write_backward: aya_obj::generated::__u64, namespaces: aya_obj::generated::__u64, ksymbol: aya_obj::generated::__u64, bpf_event: aya_obj::generated::__u64, aux_output: aya_obj::generated::__u64, cgroup: aya_obj::generated::__u64, text_poke: aya_obj::generated::__u64, build_id: aya_obj::generated::__u64, inherit_thread: aya_obj::generated::__u64, remove_on_exec: aya_obj::generated::__u64, sigtrap: aya_obj::generated::__u64, __reserved_1: aya_obj::generated::__u64) -> aya_obj::generated::__BindgenBitfieldUnit<[u8; 8]> pub fn aya_obj::generated::perf_event_attr::pinned(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::pinned_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::precise_ip(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::precise_ip_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::remove_on_exec(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::remove_on_exec_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::sample_id_all(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::sample_id_all_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::set___reserved_1(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set___reserved_1_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_aux_output(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_aux_output_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_bpf_event(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_bpf_event_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_build_id(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_build_id_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_cgroup(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_cgroup_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_comm(&mut self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_comm_exec(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_comm_exec_raw(this: *mut Self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_comm_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_context_switch(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_context_switch_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_disabled(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_disabled_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_enable_on_exec(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_enable_on_exec_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_exclude_callchain_kernel(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_exclude_callchain_kernel_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_exclude_callchain_user(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_exclude_callchain_user_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_exclude_guest(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_exclude_guest_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_exclude_host(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_exclude_host_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_exclude_hv(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_exclude_hv_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_exclude_idle(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_exclude_idle_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_exclude_kernel(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_exclude_kernel_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_exclude_user(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_exclude_user_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_exclusive(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_exclusive_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_freq(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_freq_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_inherit(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_inherit_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_inherit_stat(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_inherit_stat_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_inherit_thread(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_inherit_thread_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_ksymbol(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_ksymbol_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_mmap(&mut self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_mmap2(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_mmap2_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_mmap_data(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_mmap_data_raw(this: *mut Self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_mmap_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_namespaces(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_namespaces_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_pinned(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_pinned_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_precise_ip(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_precise_ip_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_remove_on_exec(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_remove_on_exec_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_sample_id_all(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_sample_id_all_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_sigtrap(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_sigtrap_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_task(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_task_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_text_poke(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_text_poke_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_use_clockid(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_use_clockid_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_watermark(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_watermark_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_write_backward(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_write_backward_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::sigtrap(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::sigtrap_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::task(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::task_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::text_poke(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::text_poke_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::use_clockid(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::use_clockid_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::watermark(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::watermark_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::write_backward(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::write_backward_raw(this: *const Self) -> aya_obj::generated::__u64 impl core::clone::Clone for aya_obj::generated::perf_event_attr pub fn aya_obj::generated::perf_event_attr::clone(&self) -> aya_obj::generated::perf_event_attr impl core::marker::Copy for aya_obj::generated::perf_event_attr @@ -5842,12 +7568,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::perf_event_attr where T: pub type aya_obj::generated::perf_event_attr::Owned = T pub fn aya_obj::generated::perf_event_attr::clone_into(&self, target: &mut T) pub fn aya_obj::generated::perf_event_attr::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::perf_event_attr where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::perf_event_attr where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::perf_event_attr::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::perf_event_attr where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::perf_event_attr where T: ?core::marker::Sized pub fn aya_obj::generated::perf_event_attr::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::perf_event_attr where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::perf_event_attr where T: ?core::marker::Sized pub fn aya_obj::generated::perf_event_attr::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::perf_event_attr where T: core::clone::Clone +pub unsafe fn aya_obj::generated::perf_event_attr::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::perf_event_attr pub fn aya_obj::generated::perf_event_attr::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::perf_event_header @@ -5877,12 +7605,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::perf_event_header where T pub type aya_obj::generated::perf_event_header::Owned = T pub fn aya_obj::generated::perf_event_header::clone_into(&self, target: &mut T) pub fn aya_obj::generated::perf_event_header::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::perf_event_header where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::perf_event_header where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::perf_event_header::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::perf_event_header where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::perf_event_header where T: ?core::marker::Sized pub fn aya_obj::generated::perf_event_header::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::perf_event_header where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::perf_event_header where T: ?core::marker::Sized pub fn aya_obj::generated::perf_event_header::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::perf_event_header where T: core::clone::Clone +pub unsafe fn aya_obj::generated::perf_event_header::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::perf_event_header pub fn aya_obj::generated::perf_event_header::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::perf_event_mmap_page @@ -5933,12 +7663,14 @@ impl alloc::borrow::ToOwned for aya_obj::generated::perf_event_mmap_page wher pub type aya_obj::generated::perf_event_mmap_page::Owned = T pub fn aya_obj::generated::perf_event_mmap_page::clone_into(&self, target: &mut T) pub fn aya_obj::generated::perf_event_mmap_page::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::perf_event_mmap_page where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::perf_event_mmap_page where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::perf_event_mmap_page::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::perf_event_mmap_page where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::perf_event_mmap_page where T: ?core::marker::Sized pub fn aya_obj::generated::perf_event_mmap_page::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::perf_event_mmap_page where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::perf_event_mmap_page where T: ?core::marker::Sized pub fn aya_obj::generated::perf_event_mmap_page::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::perf_event_mmap_page where T: core::clone::Clone +pub unsafe fn aya_obj::generated::perf_event_mmap_page::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::perf_event_mmap_page pub fn aya_obj::generated::perf_event_mmap_page::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 @@ -5946,20 +7678,34 @@ pub aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::_bitfi pub aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::_bitfield_align_1: [u64; 0] impl aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_____res(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_____res_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_bit0(&self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_bit0_is_deprecated(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_bit0_is_deprecated_raw(this: *const Self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_bit0_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_user_rdpmc(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_user_rdpmc_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_user_time(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_user_time_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_user_time_short(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_user_time_short_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_user_time_zero(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_user_time_zero_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::new_bitfield_1(cap_bit0: aya_obj::generated::__u64, cap_bit0_is_deprecated: aya_obj::generated::__u64, cap_user_rdpmc: aya_obj::generated::__u64, cap_user_time: aya_obj::generated::__u64, cap_user_time_zero: aya_obj::generated::__u64, cap_user_time_short: aya_obj::generated::__u64, cap_____res: aya_obj::generated::__u64) -> aya_obj::generated::__BindgenBitfieldUnit<[u8; 8]> pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_____res(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_____res_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_bit0(&mut self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_bit0_is_deprecated(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_bit0_is_deprecated_raw(this: *mut Self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_bit0_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_user_rdpmc(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_user_rdpmc_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_user_time(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_user_time_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_user_time_short(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_user_time_short_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_user_time_zero(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_user_time_zero_raw(this: *mut Self, val: aya_obj::generated::__u64) impl core::clone::Clone for aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::clone(&self) -> aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 impl core::fmt::Debug for aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 @@ -5983,20 +7729,22 @@ impl alloc::borrow::ToOwned for aya_obj::generated::perf_event_mmap_page__bin pub type aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::Owned = T pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::clone_into(&self, target: &mut T) pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 where T: ?core::marker::Sized pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 where T: core::clone::Clone +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::from(t: T) -> T #[repr(C)] pub struct aya_obj::generated::tcmsg -pub aya_obj::generated::tcmsg::tcm__pad1: core::ffi::c_uchar -pub aya_obj::generated::tcmsg::tcm__pad2: core::ffi::c_ushort -pub aya_obj::generated::tcmsg::tcm_family: core::ffi::c_uchar +pub aya_obj::generated::tcmsg::tcm__pad1: core::ffi::primitives::c_uchar +pub aya_obj::generated::tcmsg::tcm__pad2: core::ffi::primitives::c_ushort +pub aya_obj::generated::tcmsg::tcm_family: core::ffi::primitives::c_uchar pub aya_obj::generated::tcmsg::tcm_handle: aya_obj::generated::__u32 -pub aya_obj::generated::tcmsg::tcm_ifindex: core::ffi::c_int +pub aya_obj::generated::tcmsg::tcm_ifindex: core::ffi::primitives::c_int pub aya_obj::generated::tcmsg::tcm_info: aya_obj::generated::__u32 pub aya_obj::generated::tcmsg::tcm_parent: aya_obj::generated::__u32 impl core::clone::Clone for aya_obj::generated::tcmsg @@ -6022,249 +7770,418 @@ impl alloc::borrow::ToOwned for aya_obj::generated::tcmsg where T: core::clon pub type aya_obj::generated::tcmsg::Owned = T pub fn aya_obj::generated::tcmsg::clone_into(&self, target: &mut T) pub fn aya_obj::generated::tcmsg::to_owned(&self) -> T -impl core::any::Any for aya_obj::generated::tcmsg where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::generated::tcmsg where T: 'static + ?core::marker::Sized pub fn aya_obj::generated::tcmsg::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::generated::tcmsg where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::generated::tcmsg where T: ?core::marker::Sized pub fn aya_obj::generated::tcmsg::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::generated::tcmsg where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::generated::tcmsg where T: ?core::marker::Sized pub fn aya_obj::generated::tcmsg::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::tcmsg where T: core::clone::Clone +pub unsafe fn aya_obj::generated::tcmsg::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::generated::tcmsg pub fn aya_obj::generated::tcmsg::from(t: T) -> T -pub const aya_obj::generated::AYA_PERF_EVENT_IOC_DISABLE: core::ffi::c_int = 9_217i32 -pub const aya_obj::generated::AYA_PERF_EVENT_IOC_ENABLE: core::ffi::c_int = 9_216i32 -pub const aya_obj::generated::AYA_PERF_EVENT_IOC_SET_BPF: core::ffi::c_int = 1_074_013_192i32 -pub const aya_obj::generated::BPF_ALU: u32 = 4u32 -pub const aya_obj::generated::BPF_ALU64: u32 = 7u32 -pub const aya_obj::generated::BPF_ANY: aya_obj::generated::_bindgen_ty_4 = 0u32 -pub const aya_obj::generated::BPF_B: u32 = 16u32 -pub const aya_obj::generated::BPF_CALL: u32 = 128u32 -pub const aya_obj::generated::BPF_DW: u32 = 24u32 -pub const aya_obj::generated::BPF_EXIST: aya_obj::generated::_bindgen_ty_4 = 2u32 -pub const aya_obj::generated::BPF_F_ADJ_ROOM_DECAP_L3_IPV4: aya_obj::generated::_bindgen_ty_17 = 128u32 -pub const aya_obj::generated::BPF_F_ADJ_ROOM_DECAP_L3_IPV6: aya_obj::generated::_bindgen_ty_17 = 256u32 -pub const aya_obj::generated::BPF_F_ADJ_ROOM_ENCAP_L2_ETH: aya_obj::generated::_bindgen_ty_17 = 64u32 -pub const aya_obj::generated::BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: aya_obj::generated::_bindgen_ty_17 = 2u32 -pub const aya_obj::generated::BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: aya_obj::generated::_bindgen_ty_17 = 4u32 -pub const aya_obj::generated::BPF_F_ADJ_ROOM_ENCAP_L4_GRE: aya_obj::generated::_bindgen_ty_17 = 8u32 -pub const aya_obj::generated::BPF_F_ADJ_ROOM_ENCAP_L4_UDP: aya_obj::generated::_bindgen_ty_17 = 16u32 -pub const aya_obj::generated::BPF_F_ADJ_ROOM_FIXED_GSO: aya_obj::generated::_bindgen_ty_17 = 1u32 -pub const aya_obj::generated::BPF_F_ADJ_ROOM_NO_CSUM_RESET: aya_obj::generated::_bindgen_ty_17 = 32u32 -pub const aya_obj::generated::BPF_F_AFTER: u32 = 16u32 -pub const aya_obj::generated::BPF_F_ALLOW_MULTI: u32 = 2u32 -pub const aya_obj::generated::BPF_F_ALLOW_OVERRIDE: u32 = 1u32 -pub const aya_obj::generated::BPF_F_ANY_ALIGNMENT: u32 = 2u32 -pub const aya_obj::generated::BPF_F_BEFORE: u32 = 8u32 -pub const aya_obj::generated::BPF_F_BPRM_SECUREEXEC: aya_obj::generated::_bindgen_ty_26 = 1u32 -pub const aya_obj::generated::BPF_F_BROADCAST: aya_obj::generated::_bindgen_ty_27 = 8u32 -pub const aya_obj::generated::BPF_F_CLONE: aya_obj::generated::_bindgen_ty_5 = 512u32 -pub const aya_obj::generated::BPF_F_CTXLEN_MASK: aya_obj::generated::_bindgen_ty_14 = 4_503_595_332_403_200u64 -pub const aya_obj::generated::BPF_F_CURRENT_CPU: aya_obj::generated::_bindgen_ty_14 = 4_294_967_295u64 -pub const aya_obj::generated::BPF_F_CURRENT_NETNS: aya_obj::generated::_bindgen_ty_15 = -1i32 -pub const aya_obj::generated::BPF_F_DONT_FRAGMENT: aya_obj::generated::_bindgen_ty_12 = 4u32 -pub const aya_obj::generated::BPF_F_EXCLUDE_INGRESS: aya_obj::generated::_bindgen_ty_27 = 16u32 -pub const aya_obj::generated::BPF_F_FAST_STACK_CMP: aya_obj::generated::_bindgen_ty_11 = 512u32 -pub const aya_obj::generated::BPF_F_GET_BRANCH_RECORDS_SIZE: aya_obj::generated::_bindgen_ty_21 = 1u32 -pub const aya_obj::generated::BPF_F_HDR_FIELD_MASK: aya_obj::generated::_bindgen_ty_7 = 15u32 -pub const aya_obj::generated::BPF_F_ID: u32 = 32u32 -pub const aya_obj::generated::BPF_F_INDEX_MASK: aya_obj::generated::_bindgen_ty_14 = 4_294_967_295u64 -pub const aya_obj::generated::BPF_F_INGRESS: aya_obj::generated::_bindgen_ty_9 = 1u32 -pub const aya_obj::generated::BPF_F_INNER_MAP: aya_obj::generated::_bindgen_ty_5 = 4_096u32 -pub const aya_obj::generated::BPF_F_INVALIDATE_HASH: aya_obj::generated::_bindgen_ty_6 = 2u32 -pub const aya_obj::generated::BPF_F_KPROBE_MULTI_RETURN: aya_obj::generated::_bindgen_ty_2 = 1u32 -pub const aya_obj::generated::BPF_F_LINK: aya_obj::generated::_bindgen_ty_5 = 8_192u32 -pub const aya_obj::generated::BPF_F_LOCK: aya_obj::generated::_bindgen_ty_4 = 4u32 -pub const aya_obj::generated::BPF_F_MARK_ENFORCE: aya_obj::generated::_bindgen_ty_8 = 64u32 -pub const aya_obj::generated::BPF_F_MARK_MANGLED_0: aya_obj::generated::_bindgen_ty_8 = 32u32 -pub const aya_obj::generated::BPF_F_MMAPABLE: aya_obj::generated::_bindgen_ty_5 = 1_024u32 -pub const aya_obj::generated::BPF_F_NETFILTER_IP_DEFRAG: u32 = 1u32 -pub const aya_obj::generated::BPF_F_NO_COMMON_LRU: aya_obj::generated::_bindgen_ty_5 = 2u32 -pub const aya_obj::generated::BPF_F_NO_PREALLOC: aya_obj::generated::_bindgen_ty_5 = 1u32 -pub const aya_obj::generated::BPF_F_NO_TUNNEL_KEY: aya_obj::generated::_bindgen_ty_12 = 16u32 -pub const aya_obj::generated::BPF_F_NO_USER_CONV: aya_obj::generated::_bindgen_ty_5 = 262_144u32 -pub const aya_obj::generated::BPF_F_NUMA_NODE: aya_obj::generated::_bindgen_ty_5 = 4u32 -pub const aya_obj::generated::BPF_F_PATH_FD: aya_obj::generated::_bindgen_ty_5 = 16_384u32 -pub const aya_obj::generated::BPF_F_PRESERVE_ELEMS: aya_obj::generated::_bindgen_ty_5 = 2_048u32 -pub const aya_obj::generated::BPF_F_PSEUDO_HDR: aya_obj::generated::_bindgen_ty_8 = 16u32 -pub const aya_obj::generated::BPF_F_QUERY_EFFECTIVE: u32 = 1u32 -pub const aya_obj::generated::BPF_F_RDONLY: aya_obj::generated::_bindgen_ty_5 = 8u32 -pub const aya_obj::generated::BPF_F_RDONLY_PROG: aya_obj::generated::_bindgen_ty_5 = 128u32 -pub const aya_obj::generated::BPF_F_RECOMPUTE_CSUM: aya_obj::generated::_bindgen_ty_6 = 1u32 -pub const aya_obj::generated::BPF_F_REPLACE: u32 = 4u32 -pub const aya_obj::generated::BPF_F_REUSE_STACKID: aya_obj::generated::_bindgen_ty_11 = 1_024u32 -pub const aya_obj::generated::BPF_F_SEGV_ON_FAULT: aya_obj::generated::_bindgen_ty_5 = 131_072u32 -pub const aya_obj::generated::BPF_F_SEQ_NUMBER: aya_obj::generated::_bindgen_ty_12 = 8u32 -pub const aya_obj::generated::BPF_F_SKIP_FIELD_MASK: aya_obj::generated::_bindgen_ty_11 = 255u32 -pub const aya_obj::generated::BPF_F_SLEEPABLE: u32 = 16u32 -pub const aya_obj::generated::BPF_F_STACK_BUILD_ID: aya_obj::generated::_bindgen_ty_5 = 32u32 -pub const aya_obj::generated::BPF_F_STRICT_ALIGNMENT: u32 = 1u32 -pub const aya_obj::generated::BPF_F_SYSCTL_BASE_NAME: aya_obj::generated::_bindgen_ty_19 = 1u32 -pub const aya_obj::generated::BPF_F_TEST_REG_INVARIANTS: u32 = 128u32 -pub const aya_obj::generated::BPF_F_TEST_RND_HI32: u32 = 4u32 -pub const aya_obj::generated::BPF_F_TEST_RUN_ON_CPU: u32 = 1u32 -pub const aya_obj::generated::BPF_F_TEST_STATE_FREQ: u32 = 8u32 -pub const aya_obj::generated::BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2u32 -pub const aya_obj::generated::BPF_F_TIMER_ABS: aya_obj::generated::_bindgen_ty_41 = 1u32 -pub const aya_obj::generated::BPF_F_TIMER_CPU_PIN: aya_obj::generated::_bindgen_ty_41 = 2u32 -pub const aya_obj::generated::BPF_F_TOKEN_FD: aya_obj::generated::_bindgen_ty_5 = 65_536u32 -pub const aya_obj::generated::BPF_F_TUNINFO_FLAGS: aya_obj::generated::_bindgen_ty_13 = 16u32 -pub const aya_obj::generated::BPF_F_TUNINFO_IPV6: aya_obj::generated::_bindgen_ty_10 = 1u32 -pub const aya_obj::generated::BPF_F_UPROBE_MULTI_RETURN: aya_obj::generated::_bindgen_ty_3 = 1u32 -pub const aya_obj::generated::BPF_F_USER_BUILD_ID: aya_obj::generated::_bindgen_ty_11 = 2_048u32 -pub const aya_obj::generated::BPF_F_USER_STACK: aya_obj::generated::_bindgen_ty_11 = 256u32 -pub const aya_obj::generated::BPF_F_VTYPE_BTF_OBJ_FD: aya_obj::generated::_bindgen_ty_5 = 32_768u32 -pub const aya_obj::generated::BPF_F_WRONLY: aya_obj::generated::_bindgen_ty_5 = 16u32 -pub const aya_obj::generated::BPF_F_WRONLY_PROG: aya_obj::generated::_bindgen_ty_5 = 256u32 -pub const aya_obj::generated::BPF_F_XDP_DEV_BOUND_ONLY: u32 = 64u32 -pub const aya_obj::generated::BPF_F_XDP_HAS_FRAGS: u32 = 32u32 -pub const aya_obj::generated::BPF_F_ZERO_CSUM_TX: aya_obj::generated::_bindgen_ty_12 = 2u32 -pub const aya_obj::generated::BPF_F_ZERO_SEED: aya_obj::generated::_bindgen_ty_5 = 64u32 -pub const aya_obj::generated::BPF_H: u32 = 8u32 -pub const aya_obj::generated::BPF_JMP: u32 = 5u32 -pub const aya_obj::generated::BPF_K: u32 = 0u32 -pub const aya_obj::generated::BPF_LD: u32 = 0u32 -pub const aya_obj::generated::BPF_LDX: u32 = 1u32 -pub const aya_obj::generated::BPF_NOEXIST: aya_obj::generated::_bindgen_ty_4 = 1u32 -pub const aya_obj::generated::BPF_PSEUDO_BTF_ID: u32 = 3u32 -pub const aya_obj::generated::BPF_PSEUDO_CALL: u32 = 1u32 -pub const aya_obj::generated::BPF_PSEUDO_FUNC: u32 = 4u32 -pub const aya_obj::generated::BPF_PSEUDO_KFUNC_CALL: u32 = 2u32 -pub const aya_obj::generated::BPF_PSEUDO_MAP_FD: u32 = 1u32 -pub const aya_obj::generated::BPF_PSEUDO_MAP_IDX: u32 = 5u32 -pub const aya_obj::generated::BPF_PSEUDO_MAP_IDX_VALUE: u32 = 6u32 -pub const aya_obj::generated::BPF_PSEUDO_MAP_VALUE: u32 = 2u32 -pub const aya_obj::generated::BPF_RINGBUF_BUSY_BIT: aya_obj::generated::_bindgen_ty_24 = 2_147_483_648u32 -pub const aya_obj::generated::BPF_RINGBUF_DISCARD_BIT: aya_obj::generated::_bindgen_ty_24 = 1_073_741_824u32 -pub const aya_obj::generated::BPF_RINGBUF_HDR_SZ: aya_obj::generated::_bindgen_ty_24 = 8u32 -pub const aya_obj::generated::BPF_ST: u32 = 2u32 -pub const aya_obj::generated::BPF_STX: u32 = 3u32 -pub const aya_obj::generated::BPF_W: u32 = 0u32 -pub const aya_obj::generated::BTF_INT_BOOL: u32 = 4u32 -pub const aya_obj::generated::BTF_INT_CHAR: u32 = 2u32 -pub const aya_obj::generated::BTF_INT_SIGNED: u32 = 1u32 -pub const aya_obj::generated::BTF_KIND_ARRAY: aya_obj::generated::_bindgen_ty_42 = 3u32 -pub const aya_obj::generated::BTF_KIND_CONST: aya_obj::generated::_bindgen_ty_42 = 10u32 -pub const aya_obj::generated::BTF_KIND_DATASEC: aya_obj::generated::_bindgen_ty_42 = 15u32 -pub const aya_obj::generated::BTF_KIND_DECL_TAG: aya_obj::generated::_bindgen_ty_42 = 17u32 -pub const aya_obj::generated::BTF_KIND_ENUM: aya_obj::generated::_bindgen_ty_42 = 6u32 -pub const aya_obj::generated::BTF_KIND_ENUM64: aya_obj::generated::_bindgen_ty_42 = 19u32 -pub const aya_obj::generated::BTF_KIND_FLOAT: aya_obj::generated::_bindgen_ty_42 = 16u32 -pub const aya_obj::generated::BTF_KIND_FUNC: aya_obj::generated::_bindgen_ty_42 = 12u32 -pub const aya_obj::generated::BTF_KIND_FUNC_PROTO: aya_obj::generated::_bindgen_ty_42 = 13u32 -pub const aya_obj::generated::BTF_KIND_FWD: aya_obj::generated::_bindgen_ty_42 = 7u32 -pub const aya_obj::generated::BTF_KIND_INT: aya_obj::generated::_bindgen_ty_42 = 1u32 -pub const aya_obj::generated::BTF_KIND_MAX: aya_obj::generated::_bindgen_ty_42 = 19u32 -pub const aya_obj::generated::BTF_KIND_PTR: aya_obj::generated::_bindgen_ty_42 = 2u32 -pub const aya_obj::generated::BTF_KIND_RESTRICT: aya_obj::generated::_bindgen_ty_42 = 11u32 -pub const aya_obj::generated::BTF_KIND_STRUCT: aya_obj::generated::_bindgen_ty_42 = 4u32 -pub const aya_obj::generated::BTF_KIND_TYPEDEF: aya_obj::generated::_bindgen_ty_42 = 8u32 -pub const aya_obj::generated::BTF_KIND_TYPE_TAG: aya_obj::generated::_bindgen_ty_42 = 18u32 -pub const aya_obj::generated::BTF_KIND_UNION: aya_obj::generated::_bindgen_ty_42 = 5u32 -pub const aya_obj::generated::BTF_KIND_UNKN: aya_obj::generated::_bindgen_ty_42 = 0u32 -pub const aya_obj::generated::BTF_KIND_VAR: aya_obj::generated::_bindgen_ty_42 = 14u32 -pub const aya_obj::generated::BTF_KIND_VOLATILE: aya_obj::generated::_bindgen_ty_42 = 9u32 -pub const aya_obj::generated::BTF_VAR_GLOBAL_ALLOCATED: aya_obj::generated::_bindgen_ty_43 = 1u32 -pub const aya_obj::generated::BTF_VAR_GLOBAL_EXTERN: aya_obj::generated::_bindgen_ty_43 = 2u32 -pub const aya_obj::generated::BTF_VAR_STATIC: aya_obj::generated::_bindgen_ty_43 = 0u32 -pub const aya_obj::generated::IFLA_XDP_ATTACHED: aya_obj::generated::_bindgen_ty_92 = 2u32 -pub const aya_obj::generated::IFLA_XDP_DRV_PROG_ID: aya_obj::generated::_bindgen_ty_92 = 5u32 -pub const aya_obj::generated::IFLA_XDP_EXPECTED_FD: aya_obj::generated::_bindgen_ty_92 = 8u32 -pub const aya_obj::generated::IFLA_XDP_FD: aya_obj::generated::_bindgen_ty_92 = 1u32 -pub const aya_obj::generated::IFLA_XDP_FLAGS: aya_obj::generated::_bindgen_ty_92 = 3u32 -pub const aya_obj::generated::IFLA_XDP_HW_PROG_ID: aya_obj::generated::_bindgen_ty_92 = 7u32 -pub const aya_obj::generated::IFLA_XDP_PROG_ID: aya_obj::generated::_bindgen_ty_92 = 4u32 -pub const aya_obj::generated::IFLA_XDP_SKB_PROG_ID: aya_obj::generated::_bindgen_ty_92 = 6u32 -pub const aya_obj::generated::IFLA_XDP_UNSPEC: aya_obj::generated::_bindgen_ty_92 = 0u32 -pub const aya_obj::generated::NLMSG_ALIGNTO: u32 = 4u32 -pub const aya_obj::generated::NR_BTF_KINDS: aya_obj::generated::_bindgen_ty_42 = 20u32 -pub const aya_obj::generated::PERF_FLAG_FD_CLOEXEC: u32 = 8u32 -pub const aya_obj::generated::PERF_FLAG_FD_NO_GROUP: u32 = 1u32 -pub const aya_obj::generated::PERF_FLAG_FD_OUTPUT: u32 = 2u32 -pub const aya_obj::generated::PERF_FLAG_PID_CGROUP: u32 = 4u32 -pub const aya_obj::generated::PERF_MAX_CONTEXTS_PER_STACK: u32 = 8u32 -pub const aya_obj::generated::PERF_MAX_STACK_DEPTH: u32 = 127u32 -pub const aya_obj::generated::SO_ATTACH_BPF: u32 = 50u32 -pub const aya_obj::generated::SO_DETACH_BPF: u32 = 27u32 -pub const aya_obj::generated::TCA_BPF_ACT: aya_obj::generated::_bindgen_ty_152 = 1u32 -pub const aya_obj::generated::TCA_BPF_CLASSID: aya_obj::generated::_bindgen_ty_152 = 3u32 -pub const aya_obj::generated::TCA_BPF_FD: aya_obj::generated::_bindgen_ty_152 = 6u32 -pub const aya_obj::generated::TCA_BPF_FLAGS: aya_obj::generated::_bindgen_ty_152 = 8u32 -pub const aya_obj::generated::TCA_BPF_FLAGS_GEN: aya_obj::generated::_bindgen_ty_152 = 9u32 -pub const aya_obj::generated::TCA_BPF_FLAG_ACT_DIRECT: u32 = 1u32 -pub const aya_obj::generated::TCA_BPF_ID: aya_obj::generated::_bindgen_ty_152 = 11u32 -pub const aya_obj::generated::TCA_BPF_NAME: aya_obj::generated::_bindgen_ty_152 = 7u32 -pub const aya_obj::generated::TCA_BPF_OPS: aya_obj::generated::_bindgen_ty_152 = 5u32 -pub const aya_obj::generated::TCA_BPF_OPS_LEN: aya_obj::generated::_bindgen_ty_152 = 4u32 -pub const aya_obj::generated::TCA_BPF_POLICE: aya_obj::generated::_bindgen_ty_152 = 2u32 -pub const aya_obj::generated::TCA_BPF_TAG: aya_obj::generated::_bindgen_ty_152 = 10u32 -pub const aya_obj::generated::TCA_BPF_UNSPEC: aya_obj::generated::_bindgen_ty_152 = 0u32 -pub const aya_obj::generated::TCA_CHAIN: aya_obj::generated::_bindgen_ty_172 = 11u32 -pub const aya_obj::generated::TCA_DUMP_FLAGS: aya_obj::generated::_bindgen_ty_172 = 15u32 -pub const aya_obj::generated::TCA_DUMP_INVISIBLE: aya_obj::generated::_bindgen_ty_172 = 10u32 -pub const aya_obj::generated::TCA_EGRESS_BLOCK: aya_obj::generated::_bindgen_ty_172 = 14u32 -pub const aya_obj::generated::TCA_FCNT: aya_obj::generated::_bindgen_ty_172 = 6u32 -pub const aya_obj::generated::TCA_HW_OFFLOAD: aya_obj::generated::_bindgen_ty_172 = 12u32 -pub const aya_obj::generated::TCA_INGRESS_BLOCK: aya_obj::generated::_bindgen_ty_172 = 13u32 -pub const aya_obj::generated::TCA_KIND: aya_obj::generated::_bindgen_ty_172 = 1u32 -pub const aya_obj::generated::TCA_OPTIONS: aya_obj::generated::_bindgen_ty_172 = 2u32 -pub const aya_obj::generated::TCA_PAD: aya_obj::generated::_bindgen_ty_172 = 9u32 -pub const aya_obj::generated::TCA_RATE: aya_obj::generated::_bindgen_ty_172 = 5u32 -pub const aya_obj::generated::TCA_STAB: aya_obj::generated::_bindgen_ty_172 = 8u32 -pub const aya_obj::generated::TCA_STATS: aya_obj::generated::_bindgen_ty_172 = 3u32 -pub const aya_obj::generated::TCA_STATS2: aya_obj::generated::_bindgen_ty_172 = 7u32 -pub const aya_obj::generated::TCA_UNSPEC: aya_obj::generated::_bindgen_ty_172 = 0u32 -pub const aya_obj::generated::TCA_XSTATS: aya_obj::generated::_bindgen_ty_172 = 4u32 -pub const aya_obj::generated::TC_H_CLSACT: u32 = 4_294_967_281u32 -pub const aya_obj::generated::TC_H_INGRESS: u32 = 4_294_967_281u32 -pub const aya_obj::generated::TC_H_MAJ_MASK: u32 = 4_294_901_760u32 -pub const aya_obj::generated::TC_H_MIN_EGRESS: u32 = 65_523u32 -pub const aya_obj::generated::TC_H_MIN_INGRESS: u32 = 65_522u32 -pub const aya_obj::generated::TC_H_MIN_MASK: u32 = 65_535u32 -pub const aya_obj::generated::TC_H_MIN_PRIORITY: u32 = 65_504u32 -pub const aya_obj::generated::TC_H_ROOT: u32 = 4_294_967_295u32 -pub const aya_obj::generated::TC_H_UNSPEC: u32 = 0u32 -pub const aya_obj::generated::XDP_FLAGS_DRV_MODE: u32 = 4u32 -pub const aya_obj::generated::XDP_FLAGS_HW_MODE: u32 = 8u32 -pub const aya_obj::generated::XDP_FLAGS_MASK: u32 = 31u32 -pub const aya_obj::generated::XDP_FLAGS_MODES: u32 = 14u32 -pub const aya_obj::generated::XDP_FLAGS_REPLACE: u32 = 16u32 -pub const aya_obj::generated::XDP_FLAGS_SKB_MODE: u32 = 2u32 -pub const aya_obj::generated::XDP_FLAGS_UPDATE_IF_NOEXIST: u32 = 1u32 -pub const aya_obj::generated::__IFLA_XDP_MAX: aya_obj::generated::_bindgen_ty_92 = 9u32 -pub const aya_obj::generated::__TCA_BPF_MAX: aya_obj::generated::_bindgen_ty_152 = 12u32 -pub const aya_obj::generated::__TCA_MAX: aya_obj::generated::_bindgen_ty_172 = 16u32 -pub type aya_obj::generated::__s16 = core::ffi::c_short -pub type aya_obj::generated::__s32 = core::ffi::c_int -pub type aya_obj::generated::__s64 = core::ffi::c_longlong -pub type aya_obj::generated::__u16 = core::ffi::c_ushort -pub type aya_obj::generated::__u32 = core::ffi::c_uint -pub type aya_obj::generated::__u64 = core::ffi::c_ulonglong -pub type aya_obj::generated::__u8 = core::ffi::c_uchar -pub type aya_obj::generated::_bindgen_ty_10 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_11 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_12 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_13 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_14 = core::ffi::c_ulong -pub type aya_obj::generated::_bindgen_ty_15 = core::ffi::c_int -pub type aya_obj::generated::_bindgen_ty_152 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_17 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_172 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_19 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_2 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_21 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_24 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_26 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_27 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_3 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_4 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_41 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_42 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_43 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_5 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_6 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_7 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_8 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_9 = core::ffi::c_uint -pub type aya_obj::generated::_bindgen_ty_92 = core::ffi::c_uint +pub const aya_obj::generated::BPF_ABS: u32 +pub const aya_obj::generated::BPF_ADD: u32 +pub const aya_obj::generated::BPF_ADJ_ROOM_ENCAP_L2_MASK: aya_obj::generated::_bindgen_ty_18 +pub const aya_obj::generated::BPF_ADJ_ROOM_ENCAP_L2_SHIFT: aya_obj::generated::_bindgen_ty_18 +pub const aya_obj::generated::BPF_ALU: u32 +pub const aya_obj::generated::BPF_ALU64: u32 +pub const aya_obj::generated::BPF_AND: u32 +pub const aya_obj::generated::BPF_ANY: aya_obj::generated::_bindgen_ty_4 +pub const aya_obj::generated::BPF_ARSH: u32 +pub const aya_obj::generated::BPF_ATOMIC: u32 +pub const aya_obj::generated::BPF_B: u32 +pub const aya_obj::generated::BPF_BUILD_ID_SIZE: u32 +pub const aya_obj::generated::BPF_CALL: u32 +pub const aya_obj::generated::BPF_CMPXCHG: u32 +pub const aya_obj::generated::BPF_CSUM_LEVEL_DEC: aya_obj::generated::_bindgen_ty_16 +pub const aya_obj::generated::BPF_CSUM_LEVEL_INC: aya_obj::generated::_bindgen_ty_16 +pub const aya_obj::generated::BPF_CSUM_LEVEL_QUERY: aya_obj::generated::_bindgen_ty_16 +pub const aya_obj::generated::BPF_CSUM_LEVEL_RESET: aya_obj::generated::_bindgen_ty_16 +pub const aya_obj::generated::BPF_DEVCG_ACC_MKNOD: aya_obj::generated::_bindgen_ty_35 +pub const aya_obj::generated::BPF_DEVCG_ACC_READ: aya_obj::generated::_bindgen_ty_35 +pub const aya_obj::generated::BPF_DEVCG_ACC_WRITE: aya_obj::generated::_bindgen_ty_35 +pub const aya_obj::generated::BPF_DEVCG_DEV_BLOCK: aya_obj::generated::_bindgen_ty_36 +pub const aya_obj::generated::BPF_DEVCG_DEV_CHAR: aya_obj::generated::_bindgen_ty_36 +pub const aya_obj::generated::BPF_DIV: u32 +pub const aya_obj::generated::BPF_DW: u32 +pub const aya_obj::generated::BPF_END: u32 +pub const aya_obj::generated::BPF_EXIST: aya_obj::generated::_bindgen_ty_4 +pub const aya_obj::generated::BPF_EXIT: u32 +pub const aya_obj::generated::BPF_FETCH: u32 +pub const aya_obj::generated::BPF_FIB_LKUP_RET_BLACKHOLE: aya_obj::generated::_bindgen_ty_38 +pub const aya_obj::generated::BPF_FIB_LKUP_RET_FRAG_NEEDED: aya_obj::generated::_bindgen_ty_38 +pub const aya_obj::generated::BPF_FIB_LKUP_RET_FWD_DISABLED: aya_obj::generated::_bindgen_ty_38 +pub const aya_obj::generated::BPF_FIB_LKUP_RET_NOT_FWDED: aya_obj::generated::_bindgen_ty_38 +pub const aya_obj::generated::BPF_FIB_LKUP_RET_NO_NEIGH: aya_obj::generated::_bindgen_ty_38 +pub const aya_obj::generated::BPF_FIB_LKUP_RET_NO_SRC_ADDR: aya_obj::generated::_bindgen_ty_38 +pub const aya_obj::generated::BPF_FIB_LKUP_RET_PROHIBIT: aya_obj::generated::_bindgen_ty_38 +pub const aya_obj::generated::BPF_FIB_LKUP_RET_SUCCESS: aya_obj::generated::_bindgen_ty_38 +pub const aya_obj::generated::BPF_FIB_LKUP_RET_UNREACHABLE: aya_obj::generated::_bindgen_ty_38 +pub const aya_obj::generated::BPF_FIB_LKUP_RET_UNSUPP_LWT: aya_obj::generated::_bindgen_ty_38 +pub const aya_obj::generated::BPF_FIB_LOOKUP_DIRECT: aya_obj::generated::_bindgen_ty_37 +pub const aya_obj::generated::BPF_FIB_LOOKUP_OUTPUT: aya_obj::generated::_bindgen_ty_37 +pub const aya_obj::generated::BPF_FIB_LOOKUP_SKIP_NEIGH: aya_obj::generated::_bindgen_ty_37 +pub const aya_obj::generated::BPF_FIB_LOOKUP_SRC: aya_obj::generated::_bindgen_ty_37 +pub const aya_obj::generated::BPF_FIB_LOOKUP_TBID: aya_obj::generated::_bindgen_ty_37 +pub const aya_obj::generated::BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: aya_obj::generated::_bindgen_ty_39 +pub const aya_obj::generated::BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: aya_obj::generated::_bindgen_ty_39 +pub const aya_obj::generated::BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: aya_obj::generated::_bindgen_ty_39 +pub const aya_obj::generated::BPF_FROM_BE: u32 +pub const aya_obj::generated::BPF_FROM_LE: u32 +pub const aya_obj::generated::BPF_F_ADJ_ROOM_DECAP_L3_IPV4: aya_obj::generated::_bindgen_ty_17 +pub const aya_obj::generated::BPF_F_ADJ_ROOM_DECAP_L3_IPV6: aya_obj::generated::_bindgen_ty_17 +pub const aya_obj::generated::BPF_F_ADJ_ROOM_ENCAP_L2_ETH: aya_obj::generated::_bindgen_ty_17 +pub const aya_obj::generated::BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: aya_obj::generated::_bindgen_ty_17 +pub const aya_obj::generated::BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: aya_obj::generated::_bindgen_ty_17 +pub const aya_obj::generated::BPF_F_ADJ_ROOM_ENCAP_L4_GRE: aya_obj::generated::_bindgen_ty_17 +pub const aya_obj::generated::BPF_F_ADJ_ROOM_ENCAP_L4_UDP: aya_obj::generated::_bindgen_ty_17 +pub const aya_obj::generated::BPF_F_ADJ_ROOM_FIXED_GSO: aya_obj::generated::_bindgen_ty_17 +pub const aya_obj::generated::BPF_F_ADJ_ROOM_NO_CSUM_RESET: aya_obj::generated::_bindgen_ty_17 +pub const aya_obj::generated::BPF_F_AFTER: u32 +pub const aya_obj::generated::BPF_F_ALLOW_MULTI: u32 +pub const aya_obj::generated::BPF_F_ALLOW_OVERRIDE: u32 +pub const aya_obj::generated::BPF_F_ANY_ALIGNMENT: u32 +pub const aya_obj::generated::BPF_F_BEFORE: u32 +pub const aya_obj::generated::BPF_F_BPRM_SECUREEXEC: aya_obj::generated::_bindgen_ty_26 +pub const aya_obj::generated::BPF_F_BROADCAST: aya_obj::generated::_bindgen_ty_27 +pub const aya_obj::generated::BPF_F_CLONE: aya_obj::generated::_bindgen_ty_5 +pub const aya_obj::generated::BPF_F_CTXLEN_MASK: aya_obj::generated::_bindgen_ty_14 +pub const aya_obj::generated::BPF_F_CURRENT_CPU: aya_obj::generated::_bindgen_ty_14 +pub const aya_obj::generated::BPF_F_CURRENT_NETNS: aya_obj::generated::_bindgen_ty_15 +pub const aya_obj::generated::BPF_F_DONT_FRAGMENT: aya_obj::generated::_bindgen_ty_12 +pub const aya_obj::generated::BPF_F_EXCLUDE_INGRESS: aya_obj::generated::_bindgen_ty_27 +pub const aya_obj::generated::BPF_F_FAST_STACK_CMP: aya_obj::generated::_bindgen_ty_11 +pub const aya_obj::generated::BPF_F_GET_BRANCH_RECORDS_SIZE: aya_obj::generated::_bindgen_ty_21 +pub const aya_obj::generated::BPF_F_HDR_FIELD_MASK: aya_obj::generated::_bindgen_ty_7 +pub const aya_obj::generated::BPF_F_ID: u32 +pub const aya_obj::generated::BPF_F_INDEX_MASK: aya_obj::generated::_bindgen_ty_14 +pub const aya_obj::generated::BPF_F_INGRESS: aya_obj::generated::_bindgen_ty_9 +pub const aya_obj::generated::BPF_F_INNER_MAP: aya_obj::generated::_bindgen_ty_5 +pub const aya_obj::generated::BPF_F_INVALIDATE_HASH: aya_obj::generated::_bindgen_ty_6 +pub const aya_obj::generated::BPF_F_KPROBE_MULTI_RETURN: aya_obj::generated::_bindgen_ty_2 +pub const aya_obj::generated::BPF_F_LINK: aya_obj::generated::_bindgen_ty_5 +pub const aya_obj::generated::BPF_F_LOCK: aya_obj::generated::_bindgen_ty_4 +pub const aya_obj::generated::BPF_F_MARK_ENFORCE: aya_obj::generated::_bindgen_ty_8 +pub const aya_obj::generated::BPF_F_MARK_MANGLED_0: aya_obj::generated::_bindgen_ty_8 +pub const aya_obj::generated::BPF_F_MMAPABLE: aya_obj::generated::_bindgen_ty_5 +pub const aya_obj::generated::BPF_F_NETFILTER_IP_DEFRAG: u32 +pub const aya_obj::generated::BPF_F_NO_COMMON_LRU: aya_obj::generated::_bindgen_ty_5 +pub const aya_obj::generated::BPF_F_NO_PREALLOC: aya_obj::generated::_bindgen_ty_5 +pub const aya_obj::generated::BPF_F_NO_TUNNEL_KEY: aya_obj::generated::_bindgen_ty_12 +pub const aya_obj::generated::BPF_F_NO_USER_CONV: aya_obj::generated::_bindgen_ty_5 +pub const aya_obj::generated::BPF_F_NUMA_NODE: aya_obj::generated::_bindgen_ty_5 +pub const aya_obj::generated::BPF_F_PATH_FD: aya_obj::generated::_bindgen_ty_5 +pub const aya_obj::generated::BPF_F_PRESERVE_ELEMS: aya_obj::generated::_bindgen_ty_5 +pub const aya_obj::generated::BPF_F_PSEUDO_HDR: aya_obj::generated::_bindgen_ty_8 +pub const aya_obj::generated::BPF_F_QUERY_EFFECTIVE: u32 +pub const aya_obj::generated::BPF_F_RDONLY: aya_obj::generated::_bindgen_ty_5 +pub const aya_obj::generated::BPF_F_RDONLY_PROG: aya_obj::generated::_bindgen_ty_5 +pub const aya_obj::generated::BPF_F_RECOMPUTE_CSUM: aya_obj::generated::_bindgen_ty_6 +pub const aya_obj::generated::BPF_F_REPLACE: u32 +pub const aya_obj::generated::BPF_F_REUSE_STACKID: aya_obj::generated::_bindgen_ty_11 +pub const aya_obj::generated::BPF_F_SEGV_ON_FAULT: aya_obj::generated::_bindgen_ty_5 +pub const aya_obj::generated::BPF_F_SEQ_NUMBER: aya_obj::generated::_bindgen_ty_12 +pub const aya_obj::generated::BPF_F_SKIP_FIELD_MASK: aya_obj::generated::_bindgen_ty_11 +pub const aya_obj::generated::BPF_F_SLEEPABLE: u32 +pub const aya_obj::generated::BPF_F_STACK_BUILD_ID: aya_obj::generated::_bindgen_ty_5 +pub const aya_obj::generated::BPF_F_STRICT_ALIGNMENT: u32 +pub const aya_obj::generated::BPF_F_SYSCTL_BASE_NAME: aya_obj::generated::_bindgen_ty_19 +pub const aya_obj::generated::BPF_F_TEST_REG_INVARIANTS: u32 +pub const aya_obj::generated::BPF_F_TEST_RND_HI32: u32 +pub const aya_obj::generated::BPF_F_TEST_RUN_ON_CPU: u32 +pub const aya_obj::generated::BPF_F_TEST_STATE_FREQ: u32 +pub const aya_obj::generated::BPF_F_TEST_XDP_LIVE_FRAMES: u32 +pub const aya_obj::generated::BPF_F_TIMER_ABS: aya_obj::generated::_bindgen_ty_41 +pub const aya_obj::generated::BPF_F_TIMER_CPU_PIN: aya_obj::generated::_bindgen_ty_41 +pub const aya_obj::generated::BPF_F_TOKEN_FD: aya_obj::generated::_bindgen_ty_5 +pub const aya_obj::generated::BPF_F_TUNINFO_FLAGS: aya_obj::generated::_bindgen_ty_13 +pub const aya_obj::generated::BPF_F_TUNINFO_IPV6: aya_obj::generated::_bindgen_ty_10 +pub const aya_obj::generated::BPF_F_UPROBE_MULTI_RETURN: aya_obj::generated::_bindgen_ty_3 +pub const aya_obj::generated::BPF_F_USER_BUILD_ID: aya_obj::generated::_bindgen_ty_11 +pub const aya_obj::generated::BPF_F_USER_STACK: aya_obj::generated::_bindgen_ty_11 +pub const aya_obj::generated::BPF_F_VTYPE_BTF_OBJ_FD: aya_obj::generated::_bindgen_ty_5 +pub const aya_obj::generated::BPF_F_WRONLY: aya_obj::generated::_bindgen_ty_5 +pub const aya_obj::generated::BPF_F_WRONLY_PROG: aya_obj::generated::_bindgen_ty_5 +pub const aya_obj::generated::BPF_F_XDP_DEV_BOUND_ONLY: u32 +pub const aya_obj::generated::BPF_F_XDP_HAS_FRAGS: u32 +pub const aya_obj::generated::BPF_F_ZERO_CSUM_TX: aya_obj::generated::_bindgen_ty_12 +pub const aya_obj::generated::BPF_F_ZERO_SEED: aya_obj::generated::_bindgen_ty_5 +pub const aya_obj::generated::BPF_H: u32 +pub const aya_obj::generated::BPF_IMM: u32 +pub const aya_obj::generated::BPF_IND: u32 +pub const aya_obj::generated::BPF_JA: u32 +pub const aya_obj::generated::BPF_JCOND: u32 +pub const aya_obj::generated::BPF_JEQ: u32 +pub const aya_obj::generated::BPF_JGE: u32 +pub const aya_obj::generated::BPF_JGT: u32 +pub const aya_obj::generated::BPF_JLE: u32 +pub const aya_obj::generated::BPF_JLT: u32 +pub const aya_obj::generated::BPF_JMP: u32 +pub const aya_obj::generated::BPF_JMP32: u32 +pub const aya_obj::generated::BPF_JNE: u32 +pub const aya_obj::generated::BPF_JSET: u32 +pub const aya_obj::generated::BPF_JSGE: u32 +pub const aya_obj::generated::BPF_JSGT: u32 +pub const aya_obj::generated::BPF_JSLE: u32 +pub const aya_obj::generated::BPF_JSLT: u32 +pub const aya_obj::generated::BPF_K: u32 +pub const aya_obj::generated::BPF_LD: u32 +pub const aya_obj::generated::BPF_LDX: u32 +pub const aya_obj::generated::BPF_LEN: u32 +pub const aya_obj::generated::BPF_LOAD_HDR_OPT_TCP_SYN: aya_obj::generated::_bindgen_ty_33 +pub const aya_obj::generated::BPF_LOCAL_STORAGE_GET_F_CREATE: aya_obj::generated::_bindgen_ty_20 +pub const aya_obj::generated::BPF_LSH: u32 +pub const aya_obj::generated::BPF_MAXINSNS: u32 +pub const aya_obj::generated::BPF_MEM: u32 +pub const aya_obj::generated::BPF_MEMSX: u32 +pub const aya_obj::generated::BPF_MISC: u32 +pub const aya_obj::generated::BPF_MOD: u32 +pub const aya_obj::generated::BPF_MOV: u32 +pub const aya_obj::generated::BPF_MSH: u32 +pub const aya_obj::generated::BPF_MUL: u32 +pub const aya_obj::generated::BPF_NEG: u32 +pub const aya_obj::generated::BPF_NOEXIST: aya_obj::generated::_bindgen_ty_4 +pub const aya_obj::generated::BPF_OBJ_NAME_LEN: u32 +pub const aya_obj::generated::BPF_OR: u32 +pub const aya_obj::generated::BPF_PSEUDO_BTF_ID: u32 +pub const aya_obj::generated::BPF_PSEUDO_CALL: u32 +pub const aya_obj::generated::BPF_PSEUDO_FUNC: u32 +pub const aya_obj::generated::BPF_PSEUDO_KFUNC_CALL: u32 +pub const aya_obj::generated::BPF_PSEUDO_MAP_FD: u32 +pub const aya_obj::generated::BPF_PSEUDO_MAP_IDX: u32 +pub const aya_obj::generated::BPF_PSEUDO_MAP_IDX_VALUE: u32 +pub const aya_obj::generated::BPF_PSEUDO_MAP_VALUE: u32 +pub const aya_obj::generated::BPF_RB_AVAIL_DATA: aya_obj::generated::_bindgen_ty_23 +pub const aya_obj::generated::BPF_RB_CONS_POS: aya_obj::generated::_bindgen_ty_23 +pub const aya_obj::generated::BPF_RB_FORCE_WAKEUP: aya_obj::generated::_bindgen_ty_22 +pub const aya_obj::generated::BPF_RB_NO_WAKEUP: aya_obj::generated::_bindgen_ty_22 +pub const aya_obj::generated::BPF_RB_PROD_POS: aya_obj::generated::_bindgen_ty_23 +pub const aya_obj::generated::BPF_RB_RING_SIZE: aya_obj::generated::_bindgen_ty_23 +pub const aya_obj::generated::BPF_REG_0: aya_obj::generated::_bindgen_ty_1 +pub const aya_obj::generated::BPF_REG_1: aya_obj::generated::_bindgen_ty_1 +pub const aya_obj::generated::BPF_REG_10: aya_obj::generated::_bindgen_ty_1 +pub const aya_obj::generated::BPF_REG_2: aya_obj::generated::_bindgen_ty_1 +pub const aya_obj::generated::BPF_REG_3: aya_obj::generated::_bindgen_ty_1 +pub const aya_obj::generated::BPF_REG_4: aya_obj::generated::_bindgen_ty_1 +pub const aya_obj::generated::BPF_REG_5: aya_obj::generated::_bindgen_ty_1 +pub const aya_obj::generated::BPF_REG_6: aya_obj::generated::_bindgen_ty_1 +pub const aya_obj::generated::BPF_REG_7: aya_obj::generated::_bindgen_ty_1 +pub const aya_obj::generated::BPF_REG_8: aya_obj::generated::_bindgen_ty_1 +pub const aya_obj::generated::BPF_REG_9: aya_obj::generated::_bindgen_ty_1 +pub const aya_obj::generated::BPF_RET: u32 +pub const aya_obj::generated::BPF_RINGBUF_BUSY_BIT: aya_obj::generated::_bindgen_ty_24 +pub const aya_obj::generated::BPF_RINGBUF_DISCARD_BIT: aya_obj::generated::_bindgen_ty_24 +pub const aya_obj::generated::BPF_RINGBUF_HDR_SZ: aya_obj::generated::_bindgen_ty_24 +pub const aya_obj::generated::BPF_RSH: u32 +pub const aya_obj::generated::BPF_SKB_TSTAMP_DELIVERY_MONO: aya_obj::generated::_bindgen_ty_28 +pub const aya_obj::generated::BPF_SKB_TSTAMP_UNSPEC: aya_obj::generated::_bindgen_ty_28 +pub const aya_obj::generated::BPF_SK_LOOKUP_F_NO_REUSEPORT: aya_obj::generated::_bindgen_ty_25 +pub const aya_obj::generated::BPF_SK_LOOKUP_F_REPLACE: aya_obj::generated::_bindgen_ty_25 +pub const aya_obj::generated::BPF_SK_STORAGE_GET_F_CREATE: aya_obj::generated::_bindgen_ty_20 +pub const aya_obj::generated::BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB: aya_obj::generated::_bindgen_ty_30 +pub const aya_obj::generated::BPF_SOCK_OPS_ALL_CB_FLAGS: aya_obj::generated::_bindgen_ty_29 +pub const aya_obj::generated::BPF_SOCK_OPS_BASE_RTT: aya_obj::generated::_bindgen_ty_30 +pub const aya_obj::generated::BPF_SOCK_OPS_HDR_OPT_LEN_CB: aya_obj::generated::_bindgen_ty_30 +pub const aya_obj::generated::BPF_SOCK_OPS_NEEDS_ECN: aya_obj::generated::_bindgen_ty_30 +pub const aya_obj::generated::BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: aya_obj::generated::_bindgen_ty_29 +pub const aya_obj::generated::BPF_SOCK_OPS_PARSE_HDR_OPT_CB: aya_obj::generated::_bindgen_ty_30 +pub const aya_obj::generated::BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: aya_obj::generated::_bindgen_ty_29 +pub const aya_obj::generated::BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: aya_obj::generated::_bindgen_ty_30 +pub const aya_obj::generated::BPF_SOCK_OPS_RETRANS_CB: aya_obj::generated::_bindgen_ty_30 +pub const aya_obj::generated::BPF_SOCK_OPS_RETRANS_CB_FLAG: aya_obj::generated::_bindgen_ty_29 +pub const aya_obj::generated::BPF_SOCK_OPS_RTO_CB: aya_obj::generated::_bindgen_ty_30 +pub const aya_obj::generated::BPF_SOCK_OPS_RTO_CB_FLAG: aya_obj::generated::_bindgen_ty_29 +pub const aya_obj::generated::BPF_SOCK_OPS_RTT_CB: aya_obj::generated::_bindgen_ty_30 +pub const aya_obj::generated::BPF_SOCK_OPS_RTT_CB_FLAG: aya_obj::generated::_bindgen_ty_29 +pub const aya_obj::generated::BPF_SOCK_OPS_RWND_INIT: aya_obj::generated::_bindgen_ty_30 +pub const aya_obj::generated::BPF_SOCK_OPS_STATE_CB: aya_obj::generated::_bindgen_ty_30 +pub const aya_obj::generated::BPF_SOCK_OPS_STATE_CB_FLAG: aya_obj::generated::_bindgen_ty_29 +pub const aya_obj::generated::BPF_SOCK_OPS_TCP_CONNECT_CB: aya_obj::generated::_bindgen_ty_30 +pub const aya_obj::generated::BPF_SOCK_OPS_TCP_LISTEN_CB: aya_obj::generated::_bindgen_ty_30 +pub const aya_obj::generated::BPF_SOCK_OPS_TIMEOUT_INIT: aya_obj::generated::_bindgen_ty_30 +pub const aya_obj::generated::BPF_SOCK_OPS_VOID: aya_obj::generated::_bindgen_ty_30 +pub const aya_obj::generated::BPF_SOCK_OPS_WRITE_HDR_OPT_CB: aya_obj::generated::_bindgen_ty_30 +pub const aya_obj::generated::BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: aya_obj::generated::_bindgen_ty_29 +pub const aya_obj::generated::BPF_ST: u32 +pub const aya_obj::generated::BPF_STX: u32 +pub const aya_obj::generated::BPF_SUB: u32 +pub const aya_obj::generated::BPF_TAG_SIZE: u32 +pub const aya_obj::generated::BPF_TCP_BOUND_INACTIVE: aya_obj::generated::_bindgen_ty_31 +pub const aya_obj::generated::BPF_TCP_CLOSE: aya_obj::generated::_bindgen_ty_31 +pub const aya_obj::generated::BPF_TCP_CLOSE_WAIT: aya_obj::generated::_bindgen_ty_31 +pub const aya_obj::generated::BPF_TCP_CLOSING: aya_obj::generated::_bindgen_ty_31 +pub const aya_obj::generated::BPF_TCP_ESTABLISHED: aya_obj::generated::_bindgen_ty_31 +pub const aya_obj::generated::BPF_TCP_FIN_WAIT1: aya_obj::generated::_bindgen_ty_31 +pub const aya_obj::generated::BPF_TCP_FIN_WAIT2: aya_obj::generated::_bindgen_ty_31 +pub const aya_obj::generated::BPF_TCP_LAST_ACK: aya_obj::generated::_bindgen_ty_31 +pub const aya_obj::generated::BPF_TCP_LISTEN: aya_obj::generated::_bindgen_ty_31 +pub const aya_obj::generated::BPF_TCP_MAX_STATES: aya_obj::generated::_bindgen_ty_31 +pub const aya_obj::generated::BPF_TCP_NEW_SYN_RECV: aya_obj::generated::_bindgen_ty_31 +pub const aya_obj::generated::BPF_TCP_SYN_RECV: aya_obj::generated::_bindgen_ty_31 +pub const aya_obj::generated::BPF_TCP_SYN_SENT: aya_obj::generated::_bindgen_ty_31 +pub const aya_obj::generated::BPF_TCP_TIME_WAIT: aya_obj::generated::_bindgen_ty_31 +pub const aya_obj::generated::BPF_TO_BE: u32 +pub const aya_obj::generated::BPF_TO_LE: u32 +pub const aya_obj::generated::BPF_W: u32 +pub const aya_obj::generated::BPF_WRITE_HDR_TCP_CURRENT_MSS: aya_obj::generated::_bindgen_ty_34 +pub const aya_obj::generated::BPF_WRITE_HDR_TCP_SYNACK_COOKIE: aya_obj::generated::_bindgen_ty_34 +pub const aya_obj::generated::BPF_X: u32 +pub const aya_obj::generated::BPF_XADD: u32 +pub const aya_obj::generated::BPF_XCHG: u32 +pub const aya_obj::generated::BPF_XOR: u32 +pub const aya_obj::generated::BTF_INT_BOOL: u32 +pub const aya_obj::generated::BTF_INT_CHAR: u32 +pub const aya_obj::generated::BTF_INT_SIGNED: u32 +pub const aya_obj::generated::BTF_KIND_ARRAY: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::BTF_KIND_CONST: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::BTF_KIND_DATASEC: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::BTF_KIND_DECL_TAG: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::BTF_KIND_ENUM: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::BTF_KIND_ENUM64: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::BTF_KIND_FLOAT: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::BTF_KIND_FUNC: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::BTF_KIND_FUNC_PROTO: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::BTF_KIND_FWD: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::BTF_KIND_INT: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::BTF_KIND_MAX: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::BTF_KIND_PTR: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::BTF_KIND_RESTRICT: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::BTF_KIND_STRUCT: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::BTF_KIND_TYPEDEF: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::BTF_KIND_TYPE_TAG: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::BTF_KIND_UNION: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::BTF_KIND_UNKN: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::BTF_KIND_VAR: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::BTF_KIND_VOLATILE: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::BTF_VAR_GLOBAL_ALLOCATED: aya_obj::generated::_bindgen_ty_43 +pub const aya_obj::generated::BTF_VAR_GLOBAL_EXTERN: aya_obj::generated::_bindgen_ty_43 +pub const aya_obj::generated::BTF_VAR_STATIC: aya_obj::generated::_bindgen_ty_43 +pub const aya_obj::generated::IFLA_XDP_ATTACHED: aya_obj::generated::_bindgen_ty_92 +pub const aya_obj::generated::IFLA_XDP_DRV_PROG_ID: aya_obj::generated::_bindgen_ty_92 +pub const aya_obj::generated::IFLA_XDP_EXPECTED_FD: aya_obj::generated::_bindgen_ty_92 +pub const aya_obj::generated::IFLA_XDP_FD: aya_obj::generated::_bindgen_ty_92 +pub const aya_obj::generated::IFLA_XDP_FLAGS: aya_obj::generated::_bindgen_ty_92 +pub const aya_obj::generated::IFLA_XDP_HW_PROG_ID: aya_obj::generated::_bindgen_ty_92 +pub const aya_obj::generated::IFLA_XDP_PROG_ID: aya_obj::generated::_bindgen_ty_92 +pub const aya_obj::generated::IFLA_XDP_SKB_PROG_ID: aya_obj::generated::_bindgen_ty_92 +pub const aya_obj::generated::IFLA_XDP_UNSPEC: aya_obj::generated::_bindgen_ty_92 +pub const aya_obj::generated::NFPROTO_ARP: aya_obj::generated::_bindgen_ty_99 +pub const aya_obj::generated::NFPROTO_BRIDGE: aya_obj::generated::_bindgen_ty_99 +pub const aya_obj::generated::NFPROTO_DECNET: aya_obj::generated::_bindgen_ty_99 +pub const aya_obj::generated::NFPROTO_INET: aya_obj::generated::_bindgen_ty_99 +pub const aya_obj::generated::NFPROTO_IPV4: aya_obj::generated::_bindgen_ty_99 +pub const aya_obj::generated::NFPROTO_IPV6: aya_obj::generated::_bindgen_ty_99 +pub const aya_obj::generated::NFPROTO_NETDEV: aya_obj::generated::_bindgen_ty_99 +pub const aya_obj::generated::NFPROTO_NUMPROTO: aya_obj::generated::_bindgen_ty_99 +pub const aya_obj::generated::NFPROTO_UNSPEC: aya_obj::generated::_bindgen_ty_99 +pub const aya_obj::generated::NLMSG_ALIGNTO: u32 +pub const aya_obj::generated::NR_BTF_KINDS: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::PERF_EVENT_IOC_DISABLE: u32 +pub const aya_obj::generated::PERF_EVENT_IOC_ENABLE: u32 +pub const aya_obj::generated::PERF_EVENT_IOC_ID: u32 +pub const aya_obj::generated::PERF_EVENT_IOC_MODIFY_ATTRIBUTES: u32 +pub const aya_obj::generated::PERF_EVENT_IOC_PAUSE_OUTPUT: u32 +pub const aya_obj::generated::PERF_EVENT_IOC_PERIOD: u32 +pub const aya_obj::generated::PERF_EVENT_IOC_QUERY_BPF: u32 +pub const aya_obj::generated::PERF_EVENT_IOC_REFRESH: u32 +pub const aya_obj::generated::PERF_EVENT_IOC_RESET: u32 +pub const aya_obj::generated::PERF_EVENT_IOC_SET_BPF: u32 +pub const aya_obj::generated::PERF_EVENT_IOC_SET_FILTER: u32 +pub const aya_obj::generated::PERF_EVENT_IOC_SET_OUTPUT: u32 +pub const aya_obj::generated::PERF_FLAG_FD_CLOEXEC: u32 +pub const aya_obj::generated::PERF_FLAG_FD_NO_GROUP: u32 +pub const aya_obj::generated::PERF_FLAG_FD_OUTPUT: u32 +pub const aya_obj::generated::PERF_FLAG_PID_CGROUP: u32 +pub const aya_obj::generated::PERF_MAX_CONTEXTS_PER_STACK: u32 +pub const aya_obj::generated::PERF_MAX_STACK_DEPTH: u32 +pub const aya_obj::generated::SO_ATTACH_BPF: u32 +pub const aya_obj::generated::SO_DETACH_BPF: u32 +pub const aya_obj::generated::TCA_BPF_ACT: aya_obj::generated::_bindgen_ty_154 +pub const aya_obj::generated::TCA_BPF_CLASSID: aya_obj::generated::_bindgen_ty_154 +pub const aya_obj::generated::TCA_BPF_FD: aya_obj::generated::_bindgen_ty_154 +pub const aya_obj::generated::TCA_BPF_FLAGS: aya_obj::generated::_bindgen_ty_154 +pub const aya_obj::generated::TCA_BPF_FLAGS_GEN: aya_obj::generated::_bindgen_ty_154 +pub const aya_obj::generated::TCA_BPF_FLAG_ACT_DIRECT: u32 +pub const aya_obj::generated::TCA_BPF_ID: aya_obj::generated::_bindgen_ty_154 +pub const aya_obj::generated::TCA_BPF_NAME: aya_obj::generated::_bindgen_ty_154 +pub const aya_obj::generated::TCA_BPF_OPS: aya_obj::generated::_bindgen_ty_154 +pub const aya_obj::generated::TCA_BPF_OPS_LEN: aya_obj::generated::_bindgen_ty_154 +pub const aya_obj::generated::TCA_BPF_POLICE: aya_obj::generated::_bindgen_ty_154 +pub const aya_obj::generated::TCA_BPF_TAG: aya_obj::generated::_bindgen_ty_154 +pub const aya_obj::generated::TCA_BPF_UNSPEC: aya_obj::generated::_bindgen_ty_154 +pub const aya_obj::generated::TCA_CHAIN: aya_obj::generated::_bindgen_ty_174 +pub const aya_obj::generated::TCA_DUMP_FLAGS: aya_obj::generated::_bindgen_ty_174 +pub const aya_obj::generated::TCA_DUMP_INVISIBLE: aya_obj::generated::_bindgen_ty_174 +pub const aya_obj::generated::TCA_EGRESS_BLOCK: aya_obj::generated::_bindgen_ty_174 +pub const aya_obj::generated::TCA_EXT_WARN_MSG: aya_obj::generated::_bindgen_ty_174 +pub const aya_obj::generated::TCA_FCNT: aya_obj::generated::_bindgen_ty_174 +pub const aya_obj::generated::TCA_HW_OFFLOAD: aya_obj::generated::_bindgen_ty_174 +pub const aya_obj::generated::TCA_INGRESS_BLOCK: aya_obj::generated::_bindgen_ty_174 +pub const aya_obj::generated::TCA_KIND: aya_obj::generated::_bindgen_ty_174 +pub const aya_obj::generated::TCA_OPTIONS: aya_obj::generated::_bindgen_ty_174 +pub const aya_obj::generated::TCA_PAD: aya_obj::generated::_bindgen_ty_174 +pub const aya_obj::generated::TCA_RATE: aya_obj::generated::_bindgen_ty_174 +pub const aya_obj::generated::TCA_STAB: aya_obj::generated::_bindgen_ty_174 +pub const aya_obj::generated::TCA_STATS: aya_obj::generated::_bindgen_ty_174 +pub const aya_obj::generated::TCA_STATS2: aya_obj::generated::_bindgen_ty_174 +pub const aya_obj::generated::TCA_UNSPEC: aya_obj::generated::_bindgen_ty_174 +pub const aya_obj::generated::TCA_XSTATS: aya_obj::generated::_bindgen_ty_174 +pub const aya_obj::generated::TC_H_CLSACT: u32 +pub const aya_obj::generated::TC_H_INGRESS: u32 +pub const aya_obj::generated::TC_H_MAJ_MASK: u32 +pub const aya_obj::generated::TC_H_MIN_EGRESS: u32 +pub const aya_obj::generated::TC_H_MIN_INGRESS: u32 +pub const aya_obj::generated::TC_H_MIN_MASK: u32 +pub const aya_obj::generated::TC_H_MIN_PRIORITY: u32 +pub const aya_obj::generated::TC_H_ROOT: u32 +pub const aya_obj::generated::TC_H_UNSPEC: u32 +pub const aya_obj::generated::XDP_FLAGS_DRV_MODE: u32 +pub const aya_obj::generated::XDP_FLAGS_HW_MODE: u32 +pub const aya_obj::generated::XDP_FLAGS_MASK: u32 +pub const aya_obj::generated::XDP_FLAGS_MODES: u32 +pub const aya_obj::generated::XDP_FLAGS_REPLACE: u32 +pub const aya_obj::generated::XDP_FLAGS_SKB_MODE: u32 +pub const aya_obj::generated::XDP_FLAGS_UPDATE_IF_NOEXIST: u32 +pub const aya_obj::generated::__IFLA_XDP_MAX: aya_obj::generated::_bindgen_ty_92 +pub const aya_obj::generated::__MAX_BPF_REG: aya_obj::generated::_bindgen_ty_1 +pub const aya_obj::generated::__TCA_BPF_MAX: aya_obj::generated::_bindgen_ty_154 +pub const aya_obj::generated::__TCA_MAX: aya_obj::generated::_bindgen_ty_174 +pub type aya_obj::generated::__s16 = core::ffi::primitives::c_short +pub type aya_obj::generated::__s32 = core::ffi::primitives::c_int +pub type aya_obj::generated::__s64 = core::ffi::primitives::c_longlong +pub type aya_obj::generated::__u16 = core::ffi::primitives::c_ushort +pub type aya_obj::generated::__u32 = core::ffi::primitives::c_uint +pub type aya_obj::generated::__u64 = core::ffi::primitives::c_ulonglong +pub type aya_obj::generated::__u8 = core::ffi::primitives::c_uchar +pub type aya_obj::generated::_bindgen_ty_10 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_11 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_12 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_13 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_14 = core::ffi::primitives::c_ulong +pub type aya_obj::generated::_bindgen_ty_15 = core::ffi::primitives::c_int +pub type aya_obj::generated::_bindgen_ty_154 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_17 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_174 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_19 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_2 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_21 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_24 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_26 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_27 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_3 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_4 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_41 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_42 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_43 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_5 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_6 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_7 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_8 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_9 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_92 = core::ffi::primitives::c_uint +pub type aya_obj::generated::_bindgen_ty_99 = core::ffi::primitives::c_uint +pub mod aya_obj::links pub mod aya_obj::maps pub enum aya_obj::maps::Map pub aya_obj::maps::Map::Btf(aya_obj::maps::BtfMap) @@ -6305,12 +8222,14 @@ impl alloc::borrow::ToOwned for aya_obj::maps::Map where T: core::clone::Clon pub type aya_obj::maps::Map::Owned = T pub fn aya_obj::maps::Map::clone_into(&self, target: &mut T) pub fn aya_obj::maps::Map::to_owned(&self) -> T -impl core::any::Any for aya_obj::maps::Map where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::maps::Map where T: 'static + ?core::marker::Sized pub fn aya_obj::maps::Map::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::maps::Map where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::maps::Map where T: ?core::marker::Sized pub fn aya_obj::maps::Map::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::maps::Map where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::maps::Map where T: ?core::marker::Sized pub fn aya_obj::maps::Map::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::maps::Map where T: core::clone::Clone +pub unsafe fn aya_obj::maps::Map::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::maps::Map pub fn aya_obj::maps::Map::from(t: T) -> T pub enum aya_obj::maps::PinningError @@ -6335,13 +8254,13 @@ pub fn aya_obj::maps::PinningError::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_obj::maps::PinningError where U: core::convert::TryFrom pub type aya_obj::maps::PinningError::Error = >::Error pub fn aya_obj::maps::PinningError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya_obj::maps::PinningError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya_obj::maps::PinningError where T: core::fmt::Display + ?core::marker::Sized pub fn aya_obj::maps::PinningError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya_obj::maps::PinningError where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::maps::PinningError where T: 'static + ?core::marker::Sized pub fn aya_obj::maps::PinningError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::maps::PinningError where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::maps::PinningError where T: ?core::marker::Sized pub fn aya_obj::maps::PinningError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::maps::PinningError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::maps::PinningError where T: ?core::marker::Sized pub fn aya_obj::maps::PinningError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_obj::maps::PinningError pub fn aya_obj::maps::PinningError::from(t: T) -> T @@ -6380,12 +8299,14 @@ impl alloc::borrow::ToOwned for aya_obj::maps::PinningType where T: core::clo pub type aya_obj::maps::PinningType::Owned = T pub fn aya_obj::maps::PinningType::clone_into(&self, target: &mut T) pub fn aya_obj::maps::PinningType::to_owned(&self) -> T -impl core::any::Any for aya_obj::maps::PinningType where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::maps::PinningType where T: 'static + ?core::marker::Sized pub fn aya_obj::maps::PinningType::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::maps::PinningType where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::maps::PinningType where T: ?core::marker::Sized pub fn aya_obj::maps::PinningType::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::maps::PinningType where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::maps::PinningType where T: ?core::marker::Sized pub fn aya_obj::maps::PinningType::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::maps::PinningType where T: core::clone::Clone +pub unsafe fn aya_obj::maps::PinningType::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::maps::PinningType pub fn aya_obj::maps::PinningType::from(t: T) -> T pub struct aya_obj::maps::BtfMap @@ -6412,12 +8333,14 @@ impl alloc::borrow::ToOwned for aya_obj::maps::BtfMap where T: core::clone::C pub type aya_obj::maps::BtfMap::Owned = T pub fn aya_obj::maps::BtfMap::clone_into(&self, target: &mut T) pub fn aya_obj::maps::BtfMap::to_owned(&self) -> T -impl core::any::Any for aya_obj::maps::BtfMap where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::maps::BtfMap where T: 'static + ?core::marker::Sized pub fn aya_obj::maps::BtfMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::maps::BtfMap where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::maps::BtfMap where T: ?core::marker::Sized pub fn aya_obj::maps::BtfMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::maps::BtfMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::maps::BtfMap where T: ?core::marker::Sized pub fn aya_obj::maps::BtfMap::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::maps::BtfMap where T: core::clone::Clone +pub unsafe fn aya_obj::maps::BtfMap::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::maps::BtfMap pub fn aya_obj::maps::BtfMap::from(t: T) -> T pub struct aya_obj::maps::BtfMapDef @@ -6452,38 +8375,16 @@ impl alloc::borrow::ToOwned for aya_obj::maps::BtfMapDef where T: core::clone pub type aya_obj::maps::BtfMapDef::Owned = T pub fn aya_obj::maps::BtfMapDef::clone_into(&self, target: &mut T) pub fn aya_obj::maps::BtfMapDef::to_owned(&self) -> T -impl core::any::Any for aya_obj::maps::BtfMapDef where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::maps::BtfMapDef where T: 'static + ?core::marker::Sized pub fn aya_obj::maps::BtfMapDef::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::maps::BtfMapDef where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::maps::BtfMapDef where T: ?core::marker::Sized pub fn aya_obj::maps::BtfMapDef::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::maps::BtfMapDef where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::maps::BtfMapDef where T: ?core::marker::Sized pub fn aya_obj::maps::BtfMapDef::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::maps::BtfMapDef where T: core::clone::Clone +pub unsafe fn aya_obj::maps::BtfMapDef::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::maps::BtfMapDef pub fn aya_obj::maps::BtfMapDef::from(t: T) -> T -pub struct aya_obj::maps::InvalidMapTypeError -pub aya_obj::maps::InvalidMapTypeError::map_type: u32 -impl core::marker::Freeze for aya_obj::maps::InvalidMapTypeError -impl core::marker::Send for aya_obj::maps::InvalidMapTypeError -impl core::marker::Sync for aya_obj::maps::InvalidMapTypeError -impl core::marker::Unpin for aya_obj::maps::InvalidMapTypeError -impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::maps::InvalidMapTypeError -impl core::panic::unwind_safe::UnwindSafe for aya_obj::maps::InvalidMapTypeError -impl core::convert::Into for aya_obj::maps::InvalidMapTypeError where U: core::convert::From -pub fn aya_obj::maps::InvalidMapTypeError::into(self) -> U -impl core::convert::TryFrom for aya_obj::maps::InvalidMapTypeError where U: core::convert::Into -pub type aya_obj::maps::InvalidMapTypeError::Error = core::convert::Infallible -pub fn aya_obj::maps::InvalidMapTypeError::try_from(value: U) -> core::result::Result>::Error> -impl core::convert::TryInto for aya_obj::maps::InvalidMapTypeError where U: core::convert::TryFrom -pub type aya_obj::maps::InvalidMapTypeError::Error = >::Error -pub fn aya_obj::maps::InvalidMapTypeError::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_obj::maps::InvalidMapTypeError where T: 'static + core::marker::Sized -pub fn aya_obj::maps::InvalidMapTypeError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::maps::InvalidMapTypeError where T: core::marker::Sized -pub fn aya_obj::maps::InvalidMapTypeError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::maps::InvalidMapTypeError where T: core::marker::Sized -pub fn aya_obj::maps::InvalidMapTypeError::borrow_mut(&mut self) -> &mut T -impl core::convert::From for aya_obj::maps::InvalidMapTypeError -pub fn aya_obj::maps::InvalidMapTypeError::from(t: T) -> T pub struct aya_obj::maps::LegacyMap pub aya_obj::maps::LegacyMap::data: alloc::vec::Vec pub aya_obj::maps::LegacyMap::def: aya_obj::maps::bpf_map_def @@ -6512,12 +8413,14 @@ impl alloc::borrow::ToOwned for aya_obj::maps::LegacyMap where T: core::clone pub type aya_obj::maps::LegacyMap::Owned = T pub fn aya_obj::maps::LegacyMap::clone_into(&self, target: &mut T) pub fn aya_obj::maps::LegacyMap::to_owned(&self) -> T -impl core::any::Any for aya_obj::maps::LegacyMap where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::maps::LegacyMap where T: 'static + ?core::marker::Sized pub fn aya_obj::maps::LegacyMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::maps::LegacyMap where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::maps::LegacyMap where T: ?core::marker::Sized pub fn aya_obj::maps::LegacyMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::maps::LegacyMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::maps::LegacyMap where T: ?core::marker::Sized pub fn aya_obj::maps::LegacyMap::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::maps::LegacyMap where T: core::clone::Clone +pub unsafe fn aya_obj::maps::LegacyMap::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::maps::LegacyMap pub fn aya_obj::maps::LegacyMap::from(t: T) -> T #[repr(C)] pub struct aya_obj::maps::bpf_map_def @@ -6557,12 +8460,14 @@ impl alloc::borrow::ToOwned for aya_obj::maps::bpf_map_def where T: core::clo pub type aya_obj::maps::bpf_map_def::Owned = T pub fn aya_obj::maps::bpf_map_def::clone_into(&self, target: &mut T) pub fn aya_obj::maps::bpf_map_def::to_owned(&self) -> T -impl core::any::Any for aya_obj::maps::bpf_map_def where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::maps::bpf_map_def where T: 'static + ?core::marker::Sized pub fn aya_obj::maps::bpf_map_def::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::maps::bpf_map_def where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::maps::bpf_map_def where T: ?core::marker::Sized pub fn aya_obj::maps::bpf_map_def::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::maps::bpf_map_def where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::maps::bpf_map_def where T: ?core::marker::Sized pub fn aya_obj::maps::bpf_map_def::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::maps::bpf_map_def where T: core::clone::Clone +pub unsafe fn aya_obj::maps::bpf_map_def::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::maps::bpf_map_def pub fn aya_obj::maps::bpf_map_def::from(t: T) -> T pub mod aya_obj::obj @@ -6606,12 +8511,14 @@ impl alloc::borrow::ToOwned for aya_obj::EbpfSectionKind where T: core::clone pub type aya_obj::EbpfSectionKind::Owned = T pub fn aya_obj::EbpfSectionKind::clone_into(&self, target: &mut T) pub fn aya_obj::EbpfSectionKind::to_owned(&self) -> T -impl core::any::Any for aya_obj::EbpfSectionKind where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::EbpfSectionKind where T: 'static + ?core::marker::Sized pub fn aya_obj::EbpfSectionKind::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::EbpfSectionKind where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::EbpfSectionKind where T: ?core::marker::Sized pub fn aya_obj::EbpfSectionKind::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::EbpfSectionKind where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::EbpfSectionKind where T: ?core::marker::Sized pub fn aya_obj::EbpfSectionKind::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::EbpfSectionKind where T: core::clone::Clone +pub unsafe fn aya_obj::EbpfSectionKind::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::EbpfSectionKind pub fn aya_obj::EbpfSectionKind::from(t: T) -> T pub enum aya_obj::obj::ParseError @@ -6676,13 +8583,13 @@ pub fn aya_obj::ParseError::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_obj::ParseError where U: core::convert::TryFrom pub type aya_obj::ParseError::Error = >::Error pub fn aya_obj::ParseError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya_obj::ParseError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya_obj::ParseError where T: core::fmt::Display + ?core::marker::Sized pub fn aya_obj::ParseError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya_obj::ParseError where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::ParseError where T: 'static + ?core::marker::Sized pub fn aya_obj::ParseError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::ParseError where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::ParseError where T: ?core::marker::Sized pub fn aya_obj::ParseError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::ParseError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::ParseError where T: ?core::marker::Sized pub fn aya_obj::ParseError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_obj::ParseError pub fn aya_obj::ParseError::from(t: T) -> T @@ -6704,11 +8611,15 @@ pub aya_obj::obj::ProgramSection::FEntry pub aya_obj::obj::ProgramSection::FEntry::sleepable: bool pub aya_obj::obj::ProgramSection::FExit pub aya_obj::obj::ProgramSection::FExit::sleepable: bool +pub aya_obj::obj::ProgramSection::FlowDissector +pub aya_obj::obj::ProgramSection::Iter +pub aya_obj::obj::ProgramSection::Iter::sleepable: bool pub aya_obj::obj::ProgramSection::KProbe pub aya_obj::obj::ProgramSection::KRetProbe pub aya_obj::obj::ProgramSection::LircMode2 pub aya_obj::obj::ProgramSection::Lsm pub aya_obj::obj::ProgramSection::Lsm::sleepable: bool +pub aya_obj::obj::ProgramSection::LsmCgroup pub aya_obj::obj::ProgramSection::PerfEvent pub aya_obj::obj::ProgramSection::RawTracePoint pub aya_obj::obj::ProgramSection::SchedClassifier @@ -6732,7 +8643,7 @@ impl core::fmt::Debug for aya_obj::ProgramSection pub fn aya_obj::ProgramSection::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result impl core::str::traits::FromStr for aya_obj::ProgramSection pub type aya_obj::ProgramSection::Err = aya_obj::ParseError -pub fn aya_obj::ProgramSection::from_str(section: &str) -> core::result::Result +pub fn aya_obj::ProgramSection::from_str(section: &str) -> core::result::Result impl core::marker::Freeze for aya_obj::ProgramSection impl core::marker::Send for aya_obj::ProgramSection impl core::marker::Sync for aya_obj::ProgramSection @@ -6751,12 +8662,14 @@ impl alloc::borrow::ToOwned for aya_obj::ProgramSection where T: core::clone: pub type aya_obj::ProgramSection::Owned = T pub fn aya_obj::ProgramSection::clone_into(&self, target: &mut T) pub fn aya_obj::ProgramSection::to_owned(&self) -> T -impl core::any::Any for aya_obj::ProgramSection where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::ProgramSection where T: 'static + ?core::marker::Sized pub fn aya_obj::ProgramSection::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::ProgramSection where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::ProgramSection where T: ?core::marker::Sized pub fn aya_obj::ProgramSection::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::ProgramSection where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::ProgramSection where T: ?core::marker::Sized pub fn aya_obj::ProgramSection::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::ProgramSection where T: core::clone::Clone +pub unsafe fn aya_obj::ProgramSection::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::ProgramSection pub fn aya_obj::ProgramSection::from(t: T) -> T pub struct aya_obj::obj::Features @@ -6787,11 +8700,11 @@ pub fn aya_obj::Features::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_obj::Features where U: core::convert::TryFrom pub type aya_obj::Features::Error = >::Error pub fn aya_obj::Features::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_obj::Features where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::Features where T: 'static + ?core::marker::Sized pub fn aya_obj::Features::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::Features where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::Features where T: ?core::marker::Sized pub fn aya_obj::Features::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::Features where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::Features where T: ?core::marker::Sized pub fn aya_obj::Features::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_obj::Features pub fn aya_obj::Features::from(t: T) -> T @@ -6827,14 +8740,40 @@ impl alloc::borrow::ToOwned for aya_obj::Function where T: core::clone::Clone pub type aya_obj::Function::Owned = T pub fn aya_obj::Function::clone_into(&self, target: &mut T) pub fn aya_obj::Function::to_owned(&self) -> T -impl core::any::Any for aya_obj::Function where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::Function where T: 'static + ?core::marker::Sized pub fn aya_obj::Function::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::Function where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::Function where T: ?core::marker::Sized pub fn aya_obj::Function::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::Function where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::Function where T: ?core::marker::Sized pub fn aya_obj::Function::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::Function where T: core::clone::Clone +pub unsafe fn aya_obj::Function::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::Function pub fn aya_obj::Function::from(t: T) -> T +pub struct aya_obj::obj::InvalidTypeBinding +pub aya_obj::obj::InvalidTypeBinding::value: T +impl core::marker::Freeze for aya_obj::InvalidTypeBinding where T: core::marker::Freeze +impl core::marker::Send for aya_obj::InvalidTypeBinding where T: core::marker::Send +impl core::marker::Sync for aya_obj::InvalidTypeBinding where T: core::marker::Sync +impl core::marker::Unpin for aya_obj::InvalidTypeBinding where T: core::marker::Unpin +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::InvalidTypeBinding where T: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::UnwindSafe for aya_obj::InvalidTypeBinding where T: core::panic::unwind_safe::UnwindSafe +impl core::convert::Into for aya_obj::InvalidTypeBinding where U: core::convert::From +pub fn aya_obj::InvalidTypeBinding::into(self) -> U +impl core::convert::TryFrom for aya_obj::InvalidTypeBinding where U: core::convert::Into +pub type aya_obj::InvalidTypeBinding::Error = core::convert::Infallible +pub fn aya_obj::InvalidTypeBinding::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::InvalidTypeBinding where U: core::convert::TryFrom +pub type aya_obj::InvalidTypeBinding::Error = >::Error +pub fn aya_obj::InvalidTypeBinding::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_obj::InvalidTypeBinding where T: 'static + ?core::marker::Sized +pub fn aya_obj::InvalidTypeBinding::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::InvalidTypeBinding where T: ?core::marker::Sized +pub fn aya_obj::InvalidTypeBinding::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::InvalidTypeBinding where T: ?core::marker::Sized +pub fn aya_obj::InvalidTypeBinding::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_obj::InvalidTypeBinding +pub fn aya_obj::InvalidTypeBinding::from(t: T) -> T pub struct aya_obj::obj::Object pub aya_obj::obj::Object::btf: core::option::Option pub aya_obj::obj::Object::btf_ext: core::option::Option @@ -6847,7 +8786,8 @@ pub aya_obj::obj::Object::programs: std::collections::hash::map::HashMap core::result::Result, aya_obj::btf::BtfError> impl aya_obj::Object -pub fn aya_obj::Object::parse(data: &[u8]) -> core::result::Result +pub fn aya_obj::Object::has_btf_relocations(&self) -> bool +pub fn aya_obj::Object::parse(data: &[u8]) -> core::result::Result pub fn aya_obj::Object::patch_map_data(&mut self, globals: std::collections::hash::map::HashMap<&str, (&[u8], bool)>) -> core::result::Result<(), aya_obj::ParseError> pub fn aya_obj::Object::sanitize_functions(&mut self, features: &aya_obj::Features) impl aya_obj::Object @@ -6877,12 +8817,14 @@ impl alloc::borrow::ToOwned for aya_obj::Object where T: core::clone::Clone pub type aya_obj::Object::Owned = T pub fn aya_obj::Object::clone_into(&self, target: &mut T) pub fn aya_obj::Object::to_owned(&self) -> T -impl core::any::Any for aya_obj::Object where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::Object where T: 'static + ?core::marker::Sized pub fn aya_obj::Object::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::Object where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::Object where T: ?core::marker::Sized pub fn aya_obj::Object::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::Object where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::Object where T: ?core::marker::Sized pub fn aya_obj::Object::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::Object where T: core::clone::Clone +pub unsafe fn aya_obj::Object::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::Object pub fn aya_obj::Object::from(t: T) -> T pub struct aya_obj::obj::Program @@ -6915,12 +8857,14 @@ impl alloc::borrow::ToOwned for aya_obj::Program where T: core::clone::Clone pub type aya_obj::Program::Owned = T pub fn aya_obj::Program::clone_into(&self, target: &mut T) pub fn aya_obj::Program::to_owned(&self) -> T -impl core::any::Any for aya_obj::Program where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::Program where T: 'static + ?core::marker::Sized pub fn aya_obj::Program::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::Program where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::Program where T: ?core::marker::Sized pub fn aya_obj::Program::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::Program where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::Program where T: ?core::marker::Sized pub fn aya_obj::Program::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::Program where T: core::clone::Clone +pub unsafe fn aya_obj::Program::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::Program pub fn aya_obj::Program::from(t: T) -> T pub fn aya_obj::obj::copy_instructions(data: &[u8]) -> core::result::Result, aya_obj::ParseError> @@ -6935,7 +8879,7 @@ pub aya_obj::programs::cgroup_sock::CgroupSockAttachType::SockRelease impl core::clone::Clone for aya_obj::programs::cgroup_sock::CgroupSockAttachType pub fn aya_obj::programs::cgroup_sock::CgroupSockAttachType::clone(&self) -> aya_obj::programs::cgroup_sock::CgroupSockAttachType impl core::convert::From for aya_obj::generated::bpf_attach_type -pub fn aya_obj::generated::bpf_attach_type::from(s: aya_obj::programs::cgroup_sock::CgroupSockAttachType) -> aya_obj::generated::bpf_attach_type +pub fn aya_obj::generated::bpf_attach_type::from(s: aya_obj::programs::cgroup_sock::CgroupSockAttachType) -> Self impl core::default::Default for aya_obj::programs::cgroup_sock::CgroupSockAttachType pub fn aya_obj::programs::cgroup_sock::CgroupSockAttachType::default() -> aya_obj::programs::cgroup_sock::CgroupSockAttachType impl core::fmt::Debug for aya_obj::programs::cgroup_sock::CgroupSockAttachType @@ -6959,12 +8903,14 @@ impl alloc::borrow::ToOwned for aya_obj::programs::cgroup_sock::CgroupSockAtt pub type aya_obj::programs::cgroup_sock::CgroupSockAttachType::Owned = T pub fn aya_obj::programs::cgroup_sock::CgroupSockAttachType::clone_into(&self, target: &mut T) pub fn aya_obj::programs::cgroup_sock::CgroupSockAttachType::to_owned(&self) -> T -impl core::any::Any for aya_obj::programs::cgroup_sock::CgroupSockAttachType where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::programs::cgroup_sock::CgroupSockAttachType where T: 'static + ?core::marker::Sized pub fn aya_obj::programs::cgroup_sock::CgroupSockAttachType::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::programs::cgroup_sock::CgroupSockAttachType where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::programs::cgroup_sock::CgroupSockAttachType where T: ?core::marker::Sized pub fn aya_obj::programs::cgroup_sock::CgroupSockAttachType::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::programs::cgroup_sock::CgroupSockAttachType where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::programs::cgroup_sock::CgroupSockAttachType where T: ?core::marker::Sized pub fn aya_obj::programs::cgroup_sock::CgroupSockAttachType::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::programs::cgroup_sock::CgroupSockAttachType where T: core::clone::Clone +pub unsafe fn aya_obj::programs::cgroup_sock::CgroupSockAttachType::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::programs::cgroup_sock::CgroupSockAttachType pub fn aya_obj::programs::cgroup_sock::CgroupSockAttachType::from(t: T) -> T pub mod aya_obj::programs::cgroup_sock_addr @@ -6984,7 +8930,7 @@ pub aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType::UDPSendMsg6 impl core::clone::Clone for aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType pub fn aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType::clone(&self) -> aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType impl core::convert::From for aya_obj::generated::bpf_attach_type -pub fn aya_obj::generated::bpf_attach_type::from(s: aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType) -> aya_obj::generated::bpf_attach_type +pub fn aya_obj::generated::bpf_attach_type::from(s: aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType) -> Self impl core::fmt::Debug for aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType pub fn aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result impl core::marker::Copy for aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType @@ -7006,12 +8952,14 @@ impl alloc::borrow::ToOwned for aya_obj::programs::cgroup_sock_addr::CgroupSo pub type aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType::Owned = T pub fn aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType::clone_into(&self, target: &mut T) pub fn aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType::to_owned(&self) -> T -impl core::any::Any for aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType where T: 'static + ?core::marker::Sized pub fn aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType where T: ?core::marker::Sized pub fn aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType where T: ?core::marker::Sized pub fn aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType where T: core::clone::Clone +pub unsafe fn aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType pub fn aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType::from(t: T) -> T pub mod aya_obj::programs::cgroup_sockopt @@ -7021,7 +8969,7 @@ pub aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType::Set impl core::clone::Clone for aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType pub fn aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType::clone(&self) -> aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType impl core::convert::From for aya_obj::generated::bpf_attach_type -pub fn aya_obj::generated::bpf_attach_type::from(s: aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType) -> aya_obj::generated::bpf_attach_type +pub fn aya_obj::generated::bpf_attach_type::from(s: aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType) -> Self impl core::fmt::Debug for aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType pub fn aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result impl core::marker::Copy for aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType @@ -7043,12 +8991,14 @@ impl alloc::borrow::ToOwned for aya_obj::programs::cgroup_sockopt::CgroupSock pub type aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType::Owned = T pub fn aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType::clone_into(&self, target: &mut T) pub fn aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType::to_owned(&self) -> T -impl core::any::Any for aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType where T: 'static + ?core::marker::Sized pub fn aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType where T: ?core::marker::Sized pub fn aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType where T: ?core::marker::Sized pub fn aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType where T: core::clone::Clone +pub unsafe fn aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType pub fn aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType::from(t: T) -> T pub mod aya_obj::programs::xdp @@ -7081,12 +9031,14 @@ impl alloc::borrow::ToOwned for aya_obj::programs::xdp::XdpAttachType where T pub type aya_obj::programs::xdp::XdpAttachType::Owned = T pub fn aya_obj::programs::xdp::XdpAttachType::clone_into(&self, target: &mut T) pub fn aya_obj::programs::xdp::XdpAttachType::to_owned(&self) -> T -impl core::any::Any for aya_obj::programs::xdp::XdpAttachType where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::programs::xdp::XdpAttachType where T: 'static + ?core::marker::Sized pub fn aya_obj::programs::xdp::XdpAttachType::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::programs::xdp::XdpAttachType where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::programs::xdp::XdpAttachType where T: ?core::marker::Sized pub fn aya_obj::programs::xdp::XdpAttachType::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::programs::xdp::XdpAttachType where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::programs::xdp::XdpAttachType where T: ?core::marker::Sized pub fn aya_obj::programs::xdp::XdpAttachType::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::programs::xdp::XdpAttachType where T: core::clone::Clone +pub unsafe fn aya_obj::programs::xdp::XdpAttachType::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::programs::xdp::XdpAttachType pub fn aya_obj::programs::xdp::XdpAttachType::from(t: T) -> T pub enum aya_obj::programs::CgroupSockAddrAttachType @@ -7105,7 +9057,7 @@ pub aya_obj::programs::CgroupSockAddrAttachType::UDPSendMsg6 impl core::clone::Clone for aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType pub fn aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType::clone(&self) -> aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType impl core::convert::From for aya_obj::generated::bpf_attach_type -pub fn aya_obj::generated::bpf_attach_type::from(s: aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType) -> aya_obj::generated::bpf_attach_type +pub fn aya_obj::generated::bpf_attach_type::from(s: aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType) -> Self impl core::fmt::Debug for aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType pub fn aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result impl core::marker::Copy for aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType @@ -7127,12 +9079,14 @@ impl alloc::borrow::ToOwned for aya_obj::programs::cgroup_sock_addr::CgroupSo pub type aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType::Owned = T pub fn aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType::clone_into(&self, target: &mut T) pub fn aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType::to_owned(&self) -> T -impl core::any::Any for aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType where T: 'static + ?core::marker::Sized pub fn aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType where T: ?core::marker::Sized pub fn aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType where T: ?core::marker::Sized pub fn aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType where T: core::clone::Clone +pub unsafe fn aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType pub fn aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType::from(t: T) -> T pub enum aya_obj::programs::CgroupSockAttachType @@ -7143,7 +9097,7 @@ pub aya_obj::programs::CgroupSockAttachType::SockRelease impl core::clone::Clone for aya_obj::programs::cgroup_sock::CgroupSockAttachType pub fn aya_obj::programs::cgroup_sock::CgroupSockAttachType::clone(&self) -> aya_obj::programs::cgroup_sock::CgroupSockAttachType impl core::convert::From for aya_obj::generated::bpf_attach_type -pub fn aya_obj::generated::bpf_attach_type::from(s: aya_obj::programs::cgroup_sock::CgroupSockAttachType) -> aya_obj::generated::bpf_attach_type +pub fn aya_obj::generated::bpf_attach_type::from(s: aya_obj::programs::cgroup_sock::CgroupSockAttachType) -> Self impl core::default::Default for aya_obj::programs::cgroup_sock::CgroupSockAttachType pub fn aya_obj::programs::cgroup_sock::CgroupSockAttachType::default() -> aya_obj::programs::cgroup_sock::CgroupSockAttachType impl core::fmt::Debug for aya_obj::programs::cgroup_sock::CgroupSockAttachType @@ -7167,12 +9121,14 @@ impl alloc::borrow::ToOwned for aya_obj::programs::cgroup_sock::CgroupSockAtt pub type aya_obj::programs::cgroup_sock::CgroupSockAttachType::Owned = T pub fn aya_obj::programs::cgroup_sock::CgroupSockAttachType::clone_into(&self, target: &mut T) pub fn aya_obj::programs::cgroup_sock::CgroupSockAttachType::to_owned(&self) -> T -impl core::any::Any for aya_obj::programs::cgroup_sock::CgroupSockAttachType where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::programs::cgroup_sock::CgroupSockAttachType where T: 'static + ?core::marker::Sized pub fn aya_obj::programs::cgroup_sock::CgroupSockAttachType::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::programs::cgroup_sock::CgroupSockAttachType where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::programs::cgroup_sock::CgroupSockAttachType where T: ?core::marker::Sized pub fn aya_obj::programs::cgroup_sock::CgroupSockAttachType::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::programs::cgroup_sock::CgroupSockAttachType where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::programs::cgroup_sock::CgroupSockAttachType where T: ?core::marker::Sized pub fn aya_obj::programs::cgroup_sock::CgroupSockAttachType::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::programs::cgroup_sock::CgroupSockAttachType where T: core::clone::Clone +pub unsafe fn aya_obj::programs::cgroup_sock::CgroupSockAttachType::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::programs::cgroup_sock::CgroupSockAttachType pub fn aya_obj::programs::cgroup_sock::CgroupSockAttachType::from(t: T) -> T pub enum aya_obj::programs::CgroupSockoptAttachType @@ -7181,7 +9137,7 @@ pub aya_obj::programs::CgroupSockoptAttachType::Set impl core::clone::Clone for aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType pub fn aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType::clone(&self) -> aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType impl core::convert::From for aya_obj::generated::bpf_attach_type -pub fn aya_obj::generated::bpf_attach_type::from(s: aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType) -> aya_obj::generated::bpf_attach_type +pub fn aya_obj::generated::bpf_attach_type::from(s: aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType) -> Self impl core::fmt::Debug for aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType pub fn aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result impl core::marker::Copy for aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType @@ -7203,12 +9159,14 @@ impl alloc::borrow::ToOwned for aya_obj::programs::cgroup_sockopt::CgroupSock pub type aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType::Owned = T pub fn aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType::clone_into(&self, target: &mut T) pub fn aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType::to_owned(&self) -> T -impl core::any::Any for aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType where T: 'static + ?core::marker::Sized pub fn aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType where T: ?core::marker::Sized pub fn aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType where T: ?core::marker::Sized pub fn aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType where T: core::clone::Clone +pub unsafe fn aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType pub fn aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType::from(t: T) -> T pub enum aya_obj::programs::XdpAttachType @@ -7240,12 +9198,14 @@ impl alloc::borrow::ToOwned for aya_obj::programs::xdp::XdpAttachType where T pub type aya_obj::programs::xdp::XdpAttachType::Owned = T pub fn aya_obj::programs::xdp::XdpAttachType::clone_into(&self, target: &mut T) pub fn aya_obj::programs::xdp::XdpAttachType::to_owned(&self) -> T -impl core::any::Any for aya_obj::programs::xdp::XdpAttachType where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::programs::xdp::XdpAttachType where T: 'static + ?core::marker::Sized pub fn aya_obj::programs::xdp::XdpAttachType::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::programs::xdp::XdpAttachType where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::programs::xdp::XdpAttachType where T: ?core::marker::Sized pub fn aya_obj::programs::xdp::XdpAttachType::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::programs::xdp::XdpAttachType where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::programs::xdp::XdpAttachType where T: ?core::marker::Sized pub fn aya_obj::programs::xdp::XdpAttachType::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::programs::xdp::XdpAttachType where T: core::clone::Clone +pub unsafe fn aya_obj::programs::xdp::XdpAttachType::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::programs::xdp::XdpAttachType pub fn aya_obj::programs::xdp::XdpAttachType::from(t: T) -> T pub mod aya_obj::relocation @@ -7284,13 +9244,13 @@ pub fn aya_obj::relocation::RelocationError::try_from(value: U) -> core::result: impl core::convert::TryInto for aya_obj::relocation::RelocationError where U: core::convert::TryFrom pub type aya_obj::relocation::RelocationError::Error = >::Error pub fn aya_obj::relocation::RelocationError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya_obj::relocation::RelocationError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya_obj::relocation::RelocationError where T: core::fmt::Display + ?core::marker::Sized pub fn aya_obj::relocation::RelocationError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya_obj::relocation::RelocationError where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::relocation::RelocationError where T: 'static + ?core::marker::Sized pub fn aya_obj::relocation::RelocationError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::relocation::RelocationError where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::relocation::RelocationError where T: ?core::marker::Sized pub fn aya_obj::relocation::RelocationError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::relocation::RelocationError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::relocation::RelocationError where T: ?core::marker::Sized pub fn aya_obj::relocation::RelocationError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_obj::relocation::RelocationError pub fn aya_obj::relocation::RelocationError::from(t: T) -> T @@ -7315,13 +9275,13 @@ pub fn aya_obj::relocation::EbpfRelocationError::try_from(value: U) -> core::res impl core::convert::TryInto for aya_obj::relocation::EbpfRelocationError where U: core::convert::TryFrom pub type aya_obj::relocation::EbpfRelocationError::Error = >::Error pub fn aya_obj::relocation::EbpfRelocationError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya_obj::relocation::EbpfRelocationError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya_obj::relocation::EbpfRelocationError where T: core::fmt::Display + ?core::marker::Sized pub fn aya_obj::relocation::EbpfRelocationError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya_obj::relocation::EbpfRelocationError where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::relocation::EbpfRelocationError where T: 'static + ?core::marker::Sized pub fn aya_obj::relocation::EbpfRelocationError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::relocation::EbpfRelocationError where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::relocation::EbpfRelocationError where T: ?core::marker::Sized pub fn aya_obj::relocation::EbpfRelocationError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::relocation::EbpfRelocationError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::relocation::EbpfRelocationError where T: ?core::marker::Sized pub fn aya_obj::relocation::EbpfRelocationError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_obj::relocation::EbpfRelocationError pub fn aya_obj::relocation::EbpfRelocationError::from(t: T) -> T @@ -7365,12 +9325,14 @@ impl alloc::borrow::ToOwned for aya_obj::EbpfSectionKind where T: core::clone pub type aya_obj::EbpfSectionKind::Owned = T pub fn aya_obj::EbpfSectionKind::clone_into(&self, target: &mut T) pub fn aya_obj::EbpfSectionKind::to_owned(&self) -> T -impl core::any::Any for aya_obj::EbpfSectionKind where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::EbpfSectionKind where T: 'static + ?core::marker::Sized pub fn aya_obj::EbpfSectionKind::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::EbpfSectionKind where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::EbpfSectionKind where T: ?core::marker::Sized pub fn aya_obj::EbpfSectionKind::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::EbpfSectionKind where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::EbpfSectionKind where T: ?core::marker::Sized pub fn aya_obj::EbpfSectionKind::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::EbpfSectionKind where T: core::clone::Clone +pub unsafe fn aya_obj::EbpfSectionKind::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::EbpfSectionKind pub fn aya_obj::EbpfSectionKind::from(t: T) -> T pub enum aya_obj::Map @@ -7412,12 +9374,14 @@ impl alloc::borrow::ToOwned for aya_obj::maps::Map where T: core::clone::Clon pub type aya_obj::maps::Map::Owned = T pub fn aya_obj::maps::Map::clone_into(&self, target: &mut T) pub fn aya_obj::maps::Map::to_owned(&self) -> T -impl core::any::Any for aya_obj::maps::Map where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::maps::Map where T: 'static + ?core::marker::Sized pub fn aya_obj::maps::Map::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::maps::Map where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::maps::Map where T: ?core::marker::Sized pub fn aya_obj::maps::Map::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::maps::Map where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::maps::Map where T: ?core::marker::Sized pub fn aya_obj::maps::Map::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::maps::Map where T: core::clone::Clone +pub unsafe fn aya_obj::maps::Map::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::maps::Map pub fn aya_obj::maps::Map::from(t: T) -> T pub enum aya_obj::ParseError @@ -7482,13 +9446,13 @@ pub fn aya_obj::ParseError::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_obj::ParseError where U: core::convert::TryFrom pub type aya_obj::ParseError::Error = >::Error pub fn aya_obj::ParseError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya_obj::ParseError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya_obj::ParseError where T: core::fmt::Display + ?core::marker::Sized pub fn aya_obj::ParseError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya_obj::ParseError where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::ParseError where T: 'static + ?core::marker::Sized pub fn aya_obj::ParseError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::ParseError where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::ParseError where T: ?core::marker::Sized pub fn aya_obj::ParseError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::ParseError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::ParseError where T: ?core::marker::Sized pub fn aya_obj::ParseError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_obj::ParseError pub fn aya_obj::ParseError::from(t: T) -> T @@ -7510,11 +9474,15 @@ pub aya_obj::ProgramSection::FEntry pub aya_obj::ProgramSection::FEntry::sleepable: bool pub aya_obj::ProgramSection::FExit pub aya_obj::ProgramSection::FExit::sleepable: bool +pub aya_obj::ProgramSection::FlowDissector +pub aya_obj::ProgramSection::Iter +pub aya_obj::ProgramSection::Iter::sleepable: bool pub aya_obj::ProgramSection::KProbe pub aya_obj::ProgramSection::KRetProbe pub aya_obj::ProgramSection::LircMode2 pub aya_obj::ProgramSection::Lsm pub aya_obj::ProgramSection::Lsm::sleepable: bool +pub aya_obj::ProgramSection::LsmCgroup pub aya_obj::ProgramSection::PerfEvent pub aya_obj::ProgramSection::RawTracePoint pub aya_obj::ProgramSection::SchedClassifier @@ -7538,7 +9506,7 @@ impl core::fmt::Debug for aya_obj::ProgramSection pub fn aya_obj::ProgramSection::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result impl core::str::traits::FromStr for aya_obj::ProgramSection pub type aya_obj::ProgramSection::Err = aya_obj::ParseError -pub fn aya_obj::ProgramSection::from_str(section: &str) -> core::result::Result +pub fn aya_obj::ProgramSection::from_str(section: &str) -> core::result::Result impl core::marker::Freeze for aya_obj::ProgramSection impl core::marker::Send for aya_obj::ProgramSection impl core::marker::Sync for aya_obj::ProgramSection @@ -7557,12 +9525,14 @@ impl alloc::borrow::ToOwned for aya_obj::ProgramSection where T: core::clone: pub type aya_obj::ProgramSection::Owned = T pub fn aya_obj::ProgramSection::clone_into(&self, target: &mut T) pub fn aya_obj::ProgramSection::to_owned(&self) -> T -impl core::any::Any for aya_obj::ProgramSection where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::ProgramSection where T: 'static + ?core::marker::Sized pub fn aya_obj::ProgramSection::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::ProgramSection where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::ProgramSection where T: ?core::marker::Sized pub fn aya_obj::ProgramSection::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::ProgramSection where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::ProgramSection where T: ?core::marker::Sized pub fn aya_obj::ProgramSection::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::ProgramSection where T: core::clone::Clone +pub unsafe fn aya_obj::ProgramSection::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::ProgramSection pub fn aya_obj::ProgramSection::from(t: T) -> T pub struct aya_obj::Features @@ -7593,11 +9563,11 @@ pub fn aya_obj::Features::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_obj::Features where U: core::convert::TryFrom pub type aya_obj::Features::Error = >::Error pub fn aya_obj::Features::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya_obj::Features where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::Features where T: 'static + ?core::marker::Sized pub fn aya_obj::Features::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::Features where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::Features where T: ?core::marker::Sized pub fn aya_obj::Features::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::Features where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::Features where T: ?core::marker::Sized pub fn aya_obj::Features::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_obj::Features pub fn aya_obj::Features::from(t: T) -> T @@ -7633,14 +9603,40 @@ impl alloc::borrow::ToOwned for aya_obj::Function where T: core::clone::Clone pub type aya_obj::Function::Owned = T pub fn aya_obj::Function::clone_into(&self, target: &mut T) pub fn aya_obj::Function::to_owned(&self) -> T -impl core::any::Any for aya_obj::Function where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::Function where T: 'static + ?core::marker::Sized pub fn aya_obj::Function::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::Function where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::Function where T: ?core::marker::Sized pub fn aya_obj::Function::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::Function where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::Function where T: ?core::marker::Sized pub fn aya_obj::Function::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::Function where T: core::clone::Clone +pub unsafe fn aya_obj::Function::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::Function pub fn aya_obj::Function::from(t: T) -> T +pub struct aya_obj::InvalidTypeBinding +pub aya_obj::InvalidTypeBinding::value: T +impl core::marker::Freeze for aya_obj::InvalidTypeBinding where T: core::marker::Freeze +impl core::marker::Send for aya_obj::InvalidTypeBinding where T: core::marker::Send +impl core::marker::Sync for aya_obj::InvalidTypeBinding where T: core::marker::Sync +impl core::marker::Unpin for aya_obj::InvalidTypeBinding where T: core::marker::Unpin +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::InvalidTypeBinding where T: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::UnwindSafe for aya_obj::InvalidTypeBinding where T: core::panic::unwind_safe::UnwindSafe +impl core::convert::Into for aya_obj::InvalidTypeBinding where U: core::convert::From +pub fn aya_obj::InvalidTypeBinding::into(self) -> U +impl core::convert::TryFrom for aya_obj::InvalidTypeBinding where U: core::convert::Into +pub type aya_obj::InvalidTypeBinding::Error = core::convert::Infallible +pub fn aya_obj::InvalidTypeBinding::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::InvalidTypeBinding where U: core::convert::TryFrom +pub type aya_obj::InvalidTypeBinding::Error = >::Error +pub fn aya_obj::InvalidTypeBinding::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_obj::InvalidTypeBinding where T: 'static + ?core::marker::Sized +pub fn aya_obj::InvalidTypeBinding::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::InvalidTypeBinding where T: ?core::marker::Sized +pub fn aya_obj::InvalidTypeBinding::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::InvalidTypeBinding where T: ?core::marker::Sized +pub fn aya_obj::InvalidTypeBinding::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_obj::InvalidTypeBinding +pub fn aya_obj::InvalidTypeBinding::from(t: T) -> T pub struct aya_obj::Object pub aya_obj::Object::btf: core::option::Option pub aya_obj::Object::btf_ext: core::option::Option @@ -7653,7 +9649,8 @@ pub aya_obj::Object::programs: std::collections::hash::map::HashMap core::result::Result, aya_obj::btf::BtfError> impl aya_obj::Object -pub fn aya_obj::Object::parse(data: &[u8]) -> core::result::Result +pub fn aya_obj::Object::has_btf_relocations(&self) -> bool +pub fn aya_obj::Object::parse(data: &[u8]) -> core::result::Result pub fn aya_obj::Object::patch_map_data(&mut self, globals: std::collections::hash::map::HashMap<&str, (&[u8], bool)>) -> core::result::Result<(), aya_obj::ParseError> pub fn aya_obj::Object::sanitize_functions(&mut self, features: &aya_obj::Features) impl aya_obj::Object @@ -7683,12 +9680,14 @@ impl alloc::borrow::ToOwned for aya_obj::Object where T: core::clone::Clone pub type aya_obj::Object::Owned = T pub fn aya_obj::Object::clone_into(&self, target: &mut T) pub fn aya_obj::Object::to_owned(&self) -> T -impl core::any::Any for aya_obj::Object where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::Object where T: 'static + ?core::marker::Sized pub fn aya_obj::Object::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::Object where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::Object where T: ?core::marker::Sized pub fn aya_obj::Object::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::Object where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::Object where T: ?core::marker::Sized pub fn aya_obj::Object::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::Object where T: core::clone::Clone +pub unsafe fn aya_obj::Object::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::Object pub fn aya_obj::Object::from(t: T) -> T pub struct aya_obj::Program @@ -7721,12 +9720,14 @@ impl alloc::borrow::ToOwned for aya_obj::Program where T: core::clone::Clone pub type aya_obj::Program::Owned = T pub fn aya_obj::Program::clone_into(&self, target: &mut T) pub fn aya_obj::Program::to_owned(&self) -> T -impl core::any::Any for aya_obj::Program where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::Program where T: 'static + ?core::marker::Sized pub fn aya_obj::Program::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::Program where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::Program where T: ?core::marker::Sized pub fn aya_obj::Program::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::Program where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::Program where T: ?core::marker::Sized pub fn aya_obj::Program::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::Program where T: core::clone::Clone +pub unsafe fn aya_obj::Program::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya_obj::Program pub fn aya_obj::Program::from(t: T) -> T pub struct aya_obj::VerifierLog(_) @@ -7750,13 +9751,13 @@ pub fn aya_obj::VerifierLog::try_from(value: U) -> core::result::Result core::convert::TryInto for aya_obj::VerifierLog where U: core::convert::TryFrom pub type aya_obj::VerifierLog::Error = >::Error pub fn aya_obj::VerifierLog::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya_obj::VerifierLog where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya_obj::VerifierLog where T: core::fmt::Display + ?core::marker::Sized pub fn aya_obj::VerifierLog::to_string(&self) -> alloc::string::String -impl core::any::Any for aya_obj::VerifierLog where T: 'static + core::marker::Sized +impl core::any::Any for aya_obj::VerifierLog where T: 'static + ?core::marker::Sized pub fn aya_obj::VerifierLog::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya_obj::VerifierLog where T: core::marker::Sized +impl core::borrow::Borrow for aya_obj::VerifierLog where T: ?core::marker::Sized pub fn aya_obj::VerifierLog::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya_obj::VerifierLog where T: core::marker::Sized +impl core::borrow::BorrowMut for aya_obj::VerifierLog where T: ?core::marker::Sized pub fn aya_obj::VerifierLog::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_obj::VerifierLog pub fn aya_obj::VerifierLog::from(t: T) -> T diff --git a/xtask/public-api/aya.txt b/xtask/public-api/aya.txt index dfb86b0a..27a51ec5 100644 --- a/xtask/public-api/aya.txt +++ b/xtask/public-api/aya.txt @@ -41,11 +41,11 @@ pub fn aya::maps::array::Array::try_from(value: U) -> core::result::Result impl core::convert::TryInto for aya::maps::array::Array where U: core::convert::TryFrom pub type aya::maps::array::Array::Error = >::Error pub fn aya::maps::array::Array::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::array::Array where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::array::Array where T: 'static + ?core::marker::Sized pub fn aya::maps::array::Array::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::array::Array where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::array::Array where T: ?core::marker::Sized pub fn aya::maps::array::Array::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::array::Array where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::array::Array where T: ?core::marker::Sized pub fn aya::maps::array::Array::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::array::Array pub fn aya::maps::array::Array::from(t: T) -> T @@ -84,11 +84,11 @@ pub fn aya::maps::PerCpuArray::try_from(value: U) -> core::result::Result< impl core::convert::TryInto for aya::maps::PerCpuArray where U: core::convert::TryFrom pub type aya::maps::PerCpuArray::Error = >::Error pub fn aya::maps::PerCpuArray::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::PerCpuArray where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::PerCpuArray where T: 'static + ?core::marker::Sized pub fn aya::maps::PerCpuArray::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::PerCpuArray where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::PerCpuArray where T: ?core::marker::Sized pub fn aya::maps::PerCpuArray::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::PerCpuArray where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::PerCpuArray where T: ?core::marker::Sized pub fn aya::maps::PerCpuArray::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::PerCpuArray pub fn aya::maps::PerCpuArray::from(t: T) -> T @@ -123,11 +123,11 @@ pub fn aya::maps::ProgramArray::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::ProgramArray where U: core::convert::TryFrom pub type aya::maps::ProgramArray::Error = >::Error pub fn aya::maps::ProgramArray::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::ProgramArray where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::ProgramArray where T: 'static + ?core::marker::Sized pub fn aya::maps::ProgramArray::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::ProgramArray where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::ProgramArray where T: ?core::marker::Sized pub fn aya::maps::ProgramArray::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::ProgramArray where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::ProgramArray where T: ?core::marker::Sized pub fn aya::maps::ProgramArray::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::ProgramArray pub fn aya::maps::ProgramArray::from(t: T) -> T @@ -164,11 +164,11 @@ pub fn aya::maps::bloom_filter::BloomFilter::try_from(value: U) -> core::r impl core::convert::TryInto for aya::maps::bloom_filter::BloomFilter where U: core::convert::TryFrom pub type aya::maps::bloom_filter::BloomFilter::Error = >::Error pub fn aya::maps::bloom_filter::BloomFilter::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::bloom_filter::BloomFilter where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::bloom_filter::BloomFilter where T: 'static + ?core::marker::Sized pub fn aya::maps::bloom_filter::BloomFilter::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::bloom_filter::BloomFilter where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::bloom_filter::BloomFilter where T: ?core::marker::Sized pub fn aya::maps::bloom_filter::BloomFilter::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::bloom_filter::BloomFilter where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::bloom_filter::BloomFilter where T: ?core::marker::Sized pub fn aya::maps::bloom_filter::BloomFilter::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::bloom_filter::BloomFilter pub fn aya::maps::bloom_filter::BloomFilter::from(t: T) -> T @@ -211,11 +211,11 @@ pub fn aya::maps::hash_map::HashMap::try_from(value: U) -> core::result impl core::convert::TryInto for aya::maps::hash_map::HashMap where U: core::convert::TryFrom pub type aya::maps::hash_map::HashMap::Error = >::Error pub fn aya::maps::hash_map::HashMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::hash_map::HashMap where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::hash_map::HashMap where T: 'static + ?core::marker::Sized pub fn aya::maps::hash_map::HashMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::hash_map::HashMap where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::hash_map::HashMap where T: ?core::marker::Sized pub fn aya::maps::hash_map::HashMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::hash_map::HashMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::hash_map::HashMap where T: ?core::marker::Sized pub fn aya::maps::hash_map::HashMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::hash_map::HashMap pub fn aya::maps::hash_map::HashMap::from(t: T) -> T @@ -255,24 +255,24 @@ pub fn aya::maps::hash_map::PerCpuHashMap::try_from(value: U) -> core:: impl core::convert::TryInto for aya::maps::hash_map::PerCpuHashMap where U: core::convert::TryFrom pub type aya::maps::hash_map::PerCpuHashMap::Error = >::Error pub fn aya::maps::hash_map::PerCpuHashMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::hash_map::PerCpuHashMap where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::hash_map::PerCpuHashMap where T: 'static + ?core::marker::Sized pub fn aya::maps::hash_map::PerCpuHashMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::hash_map::PerCpuHashMap where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::hash_map::PerCpuHashMap where T: ?core::marker::Sized pub fn aya::maps::hash_map::PerCpuHashMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::hash_map::PerCpuHashMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::hash_map::PerCpuHashMap where T: ?core::marker::Sized pub fn aya::maps::hash_map::PerCpuHashMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::hash_map::PerCpuHashMap pub fn aya::maps::hash_map::PerCpuHashMap::from(t: T) -> T pub mod aya::maps::lpm_trie -#[repr(packed)] pub struct aya::maps::lpm_trie::Key +#[repr(C, packed(1))] pub struct aya::maps::lpm_trie::Key impl aya::maps::lpm_trie::Key pub fn aya::maps::lpm_trie::Key::data(&self) -> K pub fn aya::maps::lpm_trie::Key::new(prefix_len: u32, data: K) -> Self pub fn aya::maps::lpm_trie::Key::prefix_len(&self) -> u32 impl aya::Pod for aya::maps::lpm_trie::Key -impl core::clone::Clone for aya::maps::lpm_trie::Key -pub fn aya::maps::lpm_trie::Key::clone(&self) -> Self -impl core::marker::Copy for aya::maps::lpm_trie::Key +impl core::clone::Clone for aya::maps::lpm_trie::Key +pub fn aya::maps::lpm_trie::Key::clone(&self) -> aya::maps::lpm_trie::Key +impl core::marker::Copy for aya::maps::lpm_trie::Key impl, K: aya::Pod, V: aya::Pod> aya::maps::IterableMap, V> for aya::maps::lpm_trie::LpmTrie pub fn aya::maps::lpm_trie::LpmTrie::get(&self, key: &aya::maps::lpm_trie::Key) -> core::result::Result pub fn aya::maps::lpm_trie::LpmTrie::map(&self) -> &aya::maps::MapData @@ -294,12 +294,14 @@ impl alloc::borrow::ToOwned for aya::maps::lpm_trie::Key where T: core::cl pub type aya::maps::lpm_trie::Key::Owned = T pub fn aya::maps::lpm_trie::Key::clone_into(&self, target: &mut T) pub fn aya::maps::lpm_trie::Key::to_owned(&self) -> T -impl core::any::Any for aya::maps::lpm_trie::Key where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::lpm_trie::Key where T: 'static + ?core::marker::Sized pub fn aya::maps::lpm_trie::Key::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::lpm_trie::Key where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::lpm_trie::Key where T: ?core::marker::Sized pub fn aya::maps::lpm_trie::Key::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::lpm_trie::Key where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::lpm_trie::Key where T: ?core::marker::Sized pub fn aya::maps::lpm_trie::Key::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::maps::lpm_trie::Key where T: core::clone::Clone +pub unsafe fn aya::maps::lpm_trie::Key::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya::maps::lpm_trie::Key pub fn aya::maps::lpm_trie::Key::from(t: T) -> T pub struct aya::maps::lpm_trie::LpmTrie @@ -340,11 +342,11 @@ pub fn aya::maps::lpm_trie::LpmTrie::try_from(value: U) -> core::result impl core::convert::TryInto for aya::maps::lpm_trie::LpmTrie where U: core::convert::TryFrom pub type aya::maps::lpm_trie::LpmTrie::Error = >::Error pub fn aya::maps::lpm_trie::LpmTrie::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::lpm_trie::LpmTrie where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::lpm_trie::LpmTrie where T: 'static + ?core::marker::Sized pub fn aya::maps::lpm_trie::LpmTrie::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::lpm_trie::LpmTrie where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::lpm_trie::LpmTrie where T: ?core::marker::Sized pub fn aya::maps::lpm_trie::LpmTrie::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::lpm_trie::LpmTrie where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::lpm_trie::LpmTrie where T: ?core::marker::Sized pub fn aya::maps::lpm_trie::LpmTrie::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::lpm_trie::LpmTrie pub fn aya::maps::lpm_trie::LpmTrie::from(t: T) -> T @@ -384,76 +386,16 @@ pub fn aya::maps::perf::PerfBufferError::try_from(value: U) -> core::result::Res impl core::convert::TryInto for aya::maps::perf::PerfBufferError where U: core::convert::TryFrom pub type aya::maps::perf::PerfBufferError::Error = >::Error pub fn aya::maps::perf::PerfBufferError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya::maps::perf::PerfBufferError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya::maps::perf::PerfBufferError where T: core::fmt::Display + ?core::marker::Sized pub fn aya::maps::perf::PerfBufferError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya::maps::perf::PerfBufferError where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::perf::PerfBufferError where T: 'static + ?core::marker::Sized pub fn aya::maps::perf::PerfBufferError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::perf::PerfBufferError where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::perf::PerfBufferError where T: ?core::marker::Sized pub fn aya::maps::perf::PerfBufferError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::perf::PerfBufferError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::perf::PerfBufferError where T: ?core::marker::Sized pub fn aya::maps::perf::PerfBufferError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::perf::PerfBufferError pub fn aya::maps::perf::PerfBufferError::from(t: T) -> T -pub struct aya::maps::perf::AsyncPerfEventArray -impl> aya::maps::perf::AsyncPerfEventArray -pub fn aya::maps::perf::AsyncPerfEventArray::open(&mut self, index: u32, page_count: core::option::Option) -> core::result::Result, aya::maps::perf::PerfBufferError> -pub fn aya::maps::perf::AsyncPerfEventArray::pin>(&self, path: P) -> core::result::Result<(), aya::pin::PinError> -impl core::convert::TryFrom for aya::maps::perf::AsyncPerfEventArray -pub type aya::maps::perf::AsyncPerfEventArray::Error = aya::maps::MapError -pub fn aya::maps::perf::AsyncPerfEventArray::try_from(map: aya::maps::Map) -> core::result::Result -impl<'a> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::perf::AsyncPerfEventArray<&'a aya::maps::MapData> -pub type aya::maps::perf::AsyncPerfEventArray<&'a aya::maps::MapData>::Error = aya::maps::MapError -pub fn aya::maps::perf::AsyncPerfEventArray<&'a aya::maps::MapData>::try_from(map: &'a aya::maps::Map) -> core::result::Result -impl<'a> core::convert::TryFrom<&'a mut aya::maps::Map> for aya::maps::perf::AsyncPerfEventArray<&'a mut aya::maps::MapData> -pub type aya::maps::perf::AsyncPerfEventArray<&'a mut aya::maps::MapData>::Error = aya::maps::MapError -pub fn aya::maps::perf::AsyncPerfEventArray<&'a mut aya::maps::MapData>::try_from(map: &'a mut aya::maps::Map) -> core::result::Result -impl core::marker::Freeze for aya::maps::perf::AsyncPerfEventArray -impl core::marker::Send for aya::maps::perf::AsyncPerfEventArray where T: core::marker::Sync + core::marker::Send -impl core::marker::Sync for aya::maps::perf::AsyncPerfEventArray where T: core::marker::Sync + core::marker::Send -impl core::marker::Unpin for aya::maps::perf::AsyncPerfEventArray -impl core::panic::unwind_safe::RefUnwindSafe for aya::maps::perf::AsyncPerfEventArray where T: core::panic::unwind_safe::RefUnwindSafe -impl core::panic::unwind_safe::UnwindSafe for aya::maps::perf::AsyncPerfEventArray where T: core::panic::unwind_safe::RefUnwindSafe -impl core::convert::Into for aya::maps::perf::AsyncPerfEventArray where U: core::convert::From -pub fn aya::maps::perf::AsyncPerfEventArray::into(self) -> U -impl core::convert::TryFrom for aya::maps::perf::AsyncPerfEventArray where U: core::convert::Into -pub type aya::maps::perf::AsyncPerfEventArray::Error = core::convert::Infallible -pub fn aya::maps::perf::AsyncPerfEventArray::try_from(value: U) -> core::result::Result>::Error> -impl core::convert::TryInto for aya::maps::perf::AsyncPerfEventArray where U: core::convert::TryFrom -pub type aya::maps::perf::AsyncPerfEventArray::Error = >::Error -pub fn aya::maps::perf::AsyncPerfEventArray::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::perf::AsyncPerfEventArray where T: 'static + core::marker::Sized -pub fn aya::maps::perf::AsyncPerfEventArray::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::perf::AsyncPerfEventArray where T: core::marker::Sized -pub fn aya::maps::perf::AsyncPerfEventArray::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::perf::AsyncPerfEventArray where T: core::marker::Sized -pub fn aya::maps::perf::AsyncPerfEventArray::borrow_mut(&mut self) -> &mut T -impl core::convert::From for aya::maps::perf::AsyncPerfEventArray -pub fn aya::maps::perf::AsyncPerfEventArray::from(t: T) -> T -pub struct aya::maps::perf::AsyncPerfEventArrayBuffer> -impl> aya::maps::perf::AsyncPerfEventArrayBuffer -pub async fn aya::maps::perf::AsyncPerfEventArrayBuffer::read_events(&mut self, buffers: &mut [bytes::bytes_mut::BytesMut]) -> core::result::Result -impl !core::marker::Freeze for aya::maps::perf::AsyncPerfEventArrayBuffer -impl core::marker::Send for aya::maps::perf::AsyncPerfEventArrayBuffer where T: core::marker::Sync + core::marker::Send -impl core::marker::Sync for aya::maps::perf::AsyncPerfEventArrayBuffer where T: core::marker::Sync + core::marker::Send -impl core::marker::Unpin for aya::maps::perf::AsyncPerfEventArrayBuffer -impl !core::panic::unwind_safe::RefUnwindSafe for aya::maps::perf::AsyncPerfEventArrayBuffer -impl !core::panic::unwind_safe::UnwindSafe for aya::maps::perf::AsyncPerfEventArrayBuffer -impl core::convert::Into for aya::maps::perf::AsyncPerfEventArrayBuffer where U: core::convert::From -pub fn aya::maps::perf::AsyncPerfEventArrayBuffer::into(self) -> U -impl core::convert::TryFrom for aya::maps::perf::AsyncPerfEventArrayBuffer where U: core::convert::Into -pub type aya::maps::perf::AsyncPerfEventArrayBuffer::Error = core::convert::Infallible -pub fn aya::maps::perf::AsyncPerfEventArrayBuffer::try_from(value: U) -> core::result::Result>::Error> -impl core::convert::TryInto for aya::maps::perf::AsyncPerfEventArrayBuffer where U: core::convert::TryFrom -pub type aya::maps::perf::AsyncPerfEventArrayBuffer::Error = >::Error -pub fn aya::maps::perf::AsyncPerfEventArrayBuffer::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::perf::AsyncPerfEventArrayBuffer where T: 'static + core::marker::Sized -pub fn aya::maps::perf::AsyncPerfEventArrayBuffer::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::perf::AsyncPerfEventArrayBuffer where T: core::marker::Sized -pub fn aya::maps::perf::AsyncPerfEventArrayBuffer::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::perf::AsyncPerfEventArrayBuffer where T: core::marker::Sized -pub fn aya::maps::perf::AsyncPerfEventArrayBuffer::borrow_mut(&mut self) -> &mut T -impl core::convert::From for aya::maps::perf::AsyncPerfEventArrayBuffer -pub fn aya::maps::perf::AsyncPerfEventArrayBuffer::from(t: T) -> T pub struct aya::maps::perf::Events pub aya::maps::perf::Events::lost: usize pub aya::maps::perf::Events::read: usize @@ -469,9 +411,7 @@ impl core::marker::Sync for aya::maps::perf::Events impl core::marker::Unpin for aya::maps::perf::Events impl core::panic::unwind_safe::RefUnwindSafe for aya::maps::perf::Events impl core::panic::unwind_safe::UnwindSafe for aya::maps::perf::Events -impl equivalent::Equivalent for aya::maps::perf::Events where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::maps::perf::Events::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::maps::perf::Events where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::maps::perf::Events where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::maps::perf::Events::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::maps::perf::Events where U: core::convert::From pub fn aya::maps::perf::Events::into(self) -> U @@ -481,11 +421,11 @@ pub fn aya::maps::perf::Events::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::perf::Events where U: core::convert::TryFrom pub type aya::maps::perf::Events::Error = >::Error pub fn aya::maps::perf::Events::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::perf::Events where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::perf::Events where T: 'static + ?core::marker::Sized pub fn aya::maps::perf::Events::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::perf::Events where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::perf::Events where T: ?core::marker::Sized pub fn aya::maps::perf::Events::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::perf::Events where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::perf::Events where T: ?core::marker::Sized pub fn aya::maps::perf::Events::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::perf::Events pub fn aya::maps::perf::Events::from(t: T) -> T @@ -517,11 +457,11 @@ pub fn aya::maps::perf::PerfEventArray::try_from(value: U) -> core::result::R impl core::convert::TryInto for aya::maps::perf::PerfEventArray where U: core::convert::TryFrom pub type aya::maps::perf::PerfEventArray::Error = >::Error pub fn aya::maps::perf::PerfEventArray::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::perf::PerfEventArray where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::perf::PerfEventArray where T: 'static + ?core::marker::Sized pub fn aya::maps::perf::PerfEventArray::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::perf::PerfEventArray where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::perf::PerfEventArray where T: ?core::marker::Sized pub fn aya::maps::perf::PerfEventArray::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::perf::PerfEventArray where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::perf::PerfEventArray where T: ?core::marker::Sized pub fn aya::maps::perf::PerfEventArray::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::perf::PerfEventArray pub fn aya::maps::perf::PerfEventArray::from(t: T) -> T @@ -533,7 +473,7 @@ impl> std::os::fd::owned::AsFd fo pub fn aya::maps::perf::PerfEventArrayBuffer::as_fd(&self) -> std::os::fd::owned::BorrowedFd<'_> impl> std::os::fd::raw::AsRawFd for aya::maps::perf::PerfEventArrayBuffer pub fn aya::maps::perf::PerfEventArrayBuffer::as_raw_fd(&self) -> std::os::fd::raw::RawFd -impl !core::marker::Freeze for aya::maps::perf::PerfEventArrayBuffer +impl core::marker::Freeze for aya::maps::perf::PerfEventArrayBuffer impl core::marker::Send for aya::maps::perf::PerfEventArrayBuffer where T: core::marker::Sync + core::marker::Send impl core::marker::Sync for aya::maps::perf::PerfEventArrayBuffer where T: core::marker::Sync + core::marker::Send impl core::marker::Unpin for aya::maps::perf::PerfEventArrayBuffer @@ -547,11 +487,11 @@ pub fn aya::maps::perf::PerfEventArrayBuffer::try_from(value: U) -> core::res impl core::convert::TryInto for aya::maps::perf::PerfEventArrayBuffer where U: core::convert::TryFrom pub type aya::maps::perf::PerfEventArrayBuffer::Error = >::Error pub fn aya::maps::perf::PerfEventArrayBuffer::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::perf::PerfEventArrayBuffer where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::perf::PerfEventArrayBuffer where T: 'static + ?core::marker::Sized pub fn aya::maps::perf::PerfEventArrayBuffer::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::perf::PerfEventArrayBuffer where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::perf::PerfEventArrayBuffer where T: ?core::marker::Sized pub fn aya::maps::perf::PerfEventArrayBuffer::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::perf::PerfEventArrayBuffer where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::perf::PerfEventArrayBuffer where T: ?core::marker::Sized pub fn aya::maps::perf::PerfEventArrayBuffer::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::perf::PerfEventArrayBuffer pub fn aya::maps::perf::PerfEventArrayBuffer::from(t: T) -> T @@ -587,11 +527,11 @@ pub fn aya::maps::queue::Queue::try_from(value: U) -> core::result::Result impl core::convert::TryInto for aya::maps::queue::Queue where U: core::convert::TryFrom pub type aya::maps::queue::Queue::Error = >::Error pub fn aya::maps::queue::Queue::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::queue::Queue where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::queue::Queue where T: 'static + ?core::marker::Sized pub fn aya::maps::queue::Queue::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::queue::Queue where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::queue::Queue where T: ?core::marker::Sized pub fn aya::maps::queue::Queue::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::queue::Queue where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::queue::Queue where T: ?core::marker::Sized pub fn aya::maps::queue::Queue::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::queue::Queue pub fn aya::maps::queue::Queue::from(t: T) -> T @@ -608,6 +548,8 @@ pub fn aya::maps::ring_buf::RingBuf<&'a aya::maps::MapData>::try_from(map: &'a a impl<'a> core::convert::TryFrom<&'a mut aya::maps::Map> for aya::maps::ring_buf::RingBuf<&'a mut aya::maps::MapData> pub type aya::maps::ring_buf::RingBuf<&'a mut aya::maps::MapData>::Error = aya::maps::MapError pub fn aya::maps::ring_buf::RingBuf<&'a mut aya::maps::MapData>::try_from(map: &'a mut aya::maps::Map) -> core::result::Result +impl> std::os::fd::owned::AsFd for aya::maps::ring_buf::RingBuf +pub fn aya::maps::ring_buf::RingBuf::as_fd(&self) -> std::os::fd::owned::BorrowedFd<'_> impl> std::os::fd::raw::AsRawFd for aya::maps::ring_buf::RingBuf pub fn aya::maps::ring_buf::RingBuf::as_raw_fd(&self) -> std::os::fd::raw::RawFd impl core::marker::Freeze for aya::maps::ring_buf::RingBuf where T: core::marker::Freeze @@ -624,11 +566,11 @@ pub fn aya::maps::ring_buf::RingBuf::try_from(value: U) -> core::result::Resu impl core::convert::TryInto for aya::maps::ring_buf::RingBuf where U: core::convert::TryFrom pub type aya::maps::ring_buf::RingBuf::Error = >::Error pub fn aya::maps::ring_buf::RingBuf::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::ring_buf::RingBuf where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::ring_buf::RingBuf where T: 'static + ?core::marker::Sized pub fn aya::maps::ring_buf::RingBuf::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::ring_buf::RingBuf where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::ring_buf::RingBuf where T: ?core::marker::Sized pub fn aya::maps::ring_buf::RingBuf::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::ring_buf::RingBuf where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::ring_buf::RingBuf where T: ?core::marker::Sized pub fn aya::maps::ring_buf::RingBuf::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::ring_buf::RingBuf pub fn aya::maps::ring_buf::RingBuf::from(t: T) -> T @@ -646,6 +588,8 @@ impl<'a> core::marker::Sync for aya::maps::ring_buf::RingBufItem<'a> impl<'a> core::marker::Unpin for aya::maps::ring_buf::RingBufItem<'a> impl<'a> core::panic::unwind_safe::RefUnwindSafe for aya::maps::ring_buf::RingBufItem<'a> impl<'a> !core::panic::unwind_safe::UnwindSafe for aya::maps::ring_buf::RingBufItem<'a> +impl core::ops::deref::Receiver for aya::maps::ring_buf::RingBufItem<'a> where P: core::ops::deref::Deref + ?core::marker::Sized, T: ?core::marker::Sized +pub type aya::maps::ring_buf::RingBufItem<'a>::Target = T impl core::convert::Into for aya::maps::ring_buf::RingBufItem<'a> where U: core::convert::From pub fn aya::maps::ring_buf::RingBufItem<'a>::into(self) -> U impl core::convert::TryFrom for aya::maps::ring_buf::RingBufItem<'a> where U: core::convert::Into @@ -654,14 +598,56 @@ pub fn aya::maps::ring_buf::RingBufItem<'a>::try_from(value: U) -> core::result: impl core::convert::TryInto for aya::maps::ring_buf::RingBufItem<'a> where U: core::convert::TryFrom pub type aya::maps::ring_buf::RingBufItem<'a>::Error = >::Error pub fn aya::maps::ring_buf::RingBufItem<'a>::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::ring_buf::RingBufItem<'a> where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::ring_buf::RingBufItem<'a> where T: 'static + ?core::marker::Sized pub fn aya::maps::ring_buf::RingBufItem<'a>::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::ring_buf::RingBufItem<'a> where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::ring_buf::RingBufItem<'a> where T: ?core::marker::Sized pub fn aya::maps::ring_buf::RingBufItem<'a>::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::ring_buf::RingBufItem<'a> where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::ring_buf::RingBufItem<'a> where T: ?core::marker::Sized pub fn aya::maps::ring_buf::RingBufItem<'a>::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::ring_buf::RingBufItem<'a> pub fn aya::maps::ring_buf::RingBufItem<'a>::from(t: T) -> T +pub mod aya::maps::sk_storage +pub struct aya::maps::sk_storage::SkStorage +impl, V: aya::Pod> aya::maps::sk_storage::SkStorage +pub fn aya::maps::sk_storage::SkStorage::get(&self, socket: &impl std::os::fd::raw::AsRawFd, flags: u64) -> core::result::Result +impl, V: aya::Pod> aya::maps::sk_storage::SkStorage +pub fn aya::maps::sk_storage::SkStorage::pin>(self, path: P) -> core::result::Result<(), aya::pin::PinError> +impl, V: aya::Pod> aya::maps::sk_storage::SkStorage +pub fn aya::maps::sk_storage::SkStorage::insert(&mut self, socket: &impl std::os::fd::raw::AsRawFd, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> +pub fn aya::maps::sk_storage::SkStorage::remove(&mut self, socket: &impl std::os::fd::raw::AsRawFd) -> core::result::Result<(), aya::maps::MapError> +impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::sk_storage::SkStorage<&'a aya::maps::MapData, V> +pub type aya::maps::sk_storage::SkStorage<&'a aya::maps::MapData, V>::Error = aya::maps::MapError +pub fn aya::maps::sk_storage::SkStorage<&'a aya::maps::MapData, V>::try_from(map: &'a aya::maps::Map) -> core::result::Result +impl<'a, V: aya::Pod> core::convert::TryFrom<&'a mut aya::maps::Map> for aya::maps::sk_storage::SkStorage<&'a mut aya::maps::MapData, V> +pub type aya::maps::sk_storage::SkStorage<&'a mut aya::maps::MapData, V>::Error = aya::maps::MapError +pub fn aya::maps::sk_storage::SkStorage<&'a mut aya::maps::MapData, V>::try_from(map: &'a mut aya::maps::Map) -> core::result::Result +impl core::fmt::Debug for aya::maps::sk_storage::SkStorage +pub fn aya::maps::sk_storage::SkStorage::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::convert::TryFrom for aya::maps::sk_storage::SkStorage +pub type aya::maps::sk_storage::SkStorage::Error = aya::maps::MapError +pub fn aya::maps::sk_storage::SkStorage::try_from(map: aya::maps::Map) -> core::result::Result +impl core::marker::Freeze for aya::maps::sk_storage::SkStorage where T: core::marker::Freeze +impl core::marker::Send for aya::maps::sk_storage::SkStorage where T: core::marker::Send, V: core::marker::Send +impl core::marker::Sync for aya::maps::sk_storage::SkStorage where T: core::marker::Sync, V: core::marker::Sync +impl core::marker::Unpin for aya::maps::sk_storage::SkStorage where T: core::marker::Unpin, V: core::marker::Unpin +impl core::panic::unwind_safe::RefUnwindSafe for aya::maps::sk_storage::SkStorage where T: core::panic::unwind_safe::RefUnwindSafe, V: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::UnwindSafe for aya::maps::sk_storage::SkStorage where T: core::panic::unwind_safe::UnwindSafe, V: core::panic::unwind_safe::UnwindSafe +impl core::convert::Into for aya::maps::sk_storage::SkStorage where U: core::convert::From +pub fn aya::maps::sk_storage::SkStorage::into(self) -> U +impl core::convert::TryFrom for aya::maps::sk_storage::SkStorage where U: core::convert::Into +pub type aya::maps::sk_storage::SkStorage::Error = core::convert::Infallible +pub fn aya::maps::sk_storage::SkStorage::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::maps::sk_storage::SkStorage where U: core::convert::TryFrom +pub type aya::maps::sk_storage::SkStorage::Error = >::Error +pub fn aya::maps::sk_storage::SkStorage::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya::maps::sk_storage::SkStorage where T: 'static + ?core::marker::Sized +pub fn aya::maps::sk_storage::SkStorage::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::maps::sk_storage::SkStorage where T: ?core::marker::Sized +pub fn aya::maps::sk_storage::SkStorage::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::maps::sk_storage::SkStorage where T: ?core::marker::Sized +pub fn aya::maps::sk_storage::SkStorage::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::maps::sk_storage::SkStorage +pub fn aya::maps::sk_storage::SkStorage::from(t: T) -> T pub mod aya::maps::sock pub struct aya::maps::sock::SockHash impl, K: aya::Pod> aya::maps::SockHash @@ -700,11 +686,11 @@ pub fn aya::maps::SockHash::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::SockHash where U: core::convert::TryFrom pub type aya::maps::SockHash::Error = >::Error pub fn aya::maps::SockHash::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::SockHash where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::SockHash where T: 'static + ?core::marker::Sized pub fn aya::maps::SockHash::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::SockHash where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::SockHash where T: ?core::marker::Sized pub fn aya::maps::SockHash::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::SockHash where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::SockHash where T: ?core::marker::Sized pub fn aya::maps::SockHash::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::SockHash pub fn aya::maps::SockHash::from(t: T) -> T @@ -740,11 +726,11 @@ pub fn aya::maps::SockMap::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::SockMap where U: core::convert::TryFrom pub type aya::maps::SockMap::Error = >::Error pub fn aya::maps::SockMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::SockMap where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::SockMap where T: 'static + ?core::marker::Sized pub fn aya::maps::SockMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::SockMap where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::SockMap where T: ?core::marker::Sized pub fn aya::maps::SockMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::SockMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::SockMap where T: ?core::marker::Sized pub fn aya::maps::SockMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::SockMap pub fn aya::maps::SockMap::from(t: T) -> T @@ -767,11 +753,11 @@ pub fn aya::maps::sock::SockMapFd::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::sock::SockMapFd where U: core::convert::TryFrom pub type aya::maps::sock::SockMapFd::Error = >::Error pub fn aya::maps::sock::SockMapFd::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::sock::SockMapFd where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::sock::SockMapFd where T: 'static + ?core::marker::Sized pub fn aya::maps::sock::SockMapFd::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::sock::SockMapFd where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::sock::SockMapFd where T: ?core::marker::Sized pub fn aya::maps::sock::SockMapFd::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::sock::SockMapFd where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::sock::SockMapFd where T: ?core::marker::Sized pub fn aya::maps::sock::SockMapFd::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::sock::SockMapFd pub fn aya::maps::sock::SockMapFd::from(t: T) -> T @@ -807,11 +793,11 @@ pub fn aya::maps::stack::Stack::try_from(value: U) -> core::result::Result impl core::convert::TryInto for aya::maps::stack::Stack where U: core::convert::TryFrom pub type aya::maps::stack::Stack::Error = >::Error pub fn aya::maps::stack::Stack::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::stack::Stack where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::stack::Stack where T: 'static + ?core::marker::Sized pub fn aya::maps::stack::Stack::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::stack::Stack where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::stack::Stack where T: ?core::marker::Sized pub fn aya::maps::stack::Stack::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::stack::Stack where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::stack::Stack where T: ?core::marker::Sized pub fn aya::maps::stack::Stack::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::stack::Stack pub fn aya::maps::stack::Stack::from(t: T) -> T @@ -832,11 +818,11 @@ pub fn aya::maps::stack_trace::StackFrame::try_from(value: U) -> core::result::R impl core::convert::TryInto for aya::maps::stack_trace::StackFrame where U: core::convert::TryFrom pub type aya::maps::stack_trace::StackFrame::Error = >::Error pub fn aya::maps::stack_trace::StackFrame::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::stack_trace::StackFrame where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::stack_trace::StackFrame where T: 'static + ?core::marker::Sized pub fn aya::maps::stack_trace::StackFrame::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::stack_trace::StackFrame where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::stack_trace::StackFrame where T: ?core::marker::Sized pub fn aya::maps::stack_trace::StackFrame::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::stack_trace::StackFrame where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::stack_trace::StackFrame where T: ?core::marker::Sized pub fn aya::maps::stack_trace::StackFrame::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::stack_trace::StackFrame pub fn aya::maps::stack_trace::StackFrame::from(t: T) -> T @@ -861,11 +847,11 @@ pub fn aya::maps::stack_trace::StackTrace::try_from(value: U) -> core::result::R impl core::convert::TryInto for aya::maps::stack_trace::StackTrace where U: core::convert::TryFrom pub type aya::maps::stack_trace::StackTrace::Error = >::Error pub fn aya::maps::stack_trace::StackTrace::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::stack_trace::StackTrace where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::stack_trace::StackTrace where T: 'static + ?core::marker::Sized pub fn aya::maps::stack_trace::StackTrace::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::stack_trace::StackTrace where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::stack_trace::StackTrace where T: ?core::marker::Sized pub fn aya::maps::stack_trace::StackTrace::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::stack_trace::StackTrace where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::stack_trace::StackTrace where T: ?core::marker::Sized pub fn aya::maps::stack_trace::StackTrace::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::stack_trace::StackTrace pub fn aya::maps::stack_trace::StackTrace::from(t: T) -> T @@ -910,11 +896,11 @@ pub fn aya::maps::stack_trace::StackTraceMap::try_from(value: U) -> core::res impl core::convert::TryInto for aya::maps::stack_trace::StackTraceMap where U: core::convert::TryFrom pub type aya::maps::stack_trace::StackTraceMap::Error = >::Error pub fn aya::maps::stack_trace::StackTraceMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::stack_trace::StackTraceMap where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::stack_trace::StackTraceMap where T: 'static + ?core::marker::Sized pub fn aya::maps::stack_trace::StackTraceMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::stack_trace::StackTraceMap where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::stack_trace::StackTraceMap where T: ?core::marker::Sized pub fn aya::maps::stack_trace::StackTraceMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::stack_trace::StackTraceMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::stack_trace::StackTraceMap where T: ?core::marker::Sized pub fn aya::maps::stack_trace::StackTraceMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::stack_trace::StackTraceMap pub fn aya::maps::stack_trace::StackTraceMap::from(t: T) -> T @@ -944,20 +930,20 @@ pub fn aya::maps::xdp::XdpMapError::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::xdp::XdpMapError where U: core::convert::TryFrom pub type aya::maps::xdp::XdpMapError::Error = >::Error pub fn aya::maps::xdp::XdpMapError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya::maps::xdp::XdpMapError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya::maps::xdp::XdpMapError where T: core::fmt::Display + ?core::marker::Sized pub fn aya::maps::xdp::XdpMapError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya::maps::xdp::XdpMapError where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::xdp::XdpMapError where T: 'static + ?core::marker::Sized pub fn aya::maps::xdp::XdpMapError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::xdp::XdpMapError where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::xdp::XdpMapError where T: ?core::marker::Sized pub fn aya::maps::xdp::XdpMapError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::xdp::XdpMapError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::xdp::XdpMapError where T: ?core::marker::Sized pub fn aya::maps::xdp::XdpMapError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::xdp::XdpMapError pub fn aya::maps::xdp::XdpMapError::from(t: T) -> T pub struct aya::maps::xdp::CpuMap impl> aya::maps::CpuMap -pub fn aya::maps::CpuMap::get(&self, cpu_index: u32, flags: u64) -> core::result::Result -pub fn aya::maps::CpuMap::iter(&self) -> impl core::iter::traits::iterator::Iterator> + '_ +pub fn aya::maps::CpuMap::get(&self, cpu_index: u32, flags: u64) -> core::result::Result +pub fn aya::maps::CpuMap::iter(&self) -> impl core::iter::traits::iterator::Iterator> + '_ pub fn aya::maps::CpuMap::len(&self) -> u32 impl> aya::maps::CpuMap pub fn aya::maps::CpuMap::pin>(self, path: P) -> core::result::Result<(), aya::pin::PinError> @@ -986,18 +972,18 @@ pub fn aya::maps::CpuMap::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::CpuMap where U: core::convert::TryFrom pub type aya::maps::CpuMap::Error = >::Error pub fn aya::maps::CpuMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::CpuMap where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::CpuMap where T: 'static + ?core::marker::Sized pub fn aya::maps::CpuMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::CpuMap where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::CpuMap where T: ?core::marker::Sized pub fn aya::maps::CpuMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::CpuMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::CpuMap where T: ?core::marker::Sized pub fn aya::maps::CpuMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::CpuMap pub fn aya::maps::CpuMap::from(t: T) -> T pub struct aya::maps::xdp::DevMap impl> aya::maps::DevMap -pub fn aya::maps::DevMap::get(&self, index: u32, flags: u64) -> core::result::Result -pub fn aya::maps::DevMap::iter(&self) -> impl core::iter::traits::iterator::Iterator> + '_ +pub fn aya::maps::DevMap::get(&self, index: u32, flags: u64) -> core::result::Result +pub fn aya::maps::DevMap::iter(&self) -> impl core::iter::traits::iterator::Iterator> + '_ pub fn aya::maps::DevMap::len(&self) -> u32 impl> aya::maps::DevMap pub fn aya::maps::DevMap::pin>(self, path: P) -> core::result::Result<(), aya::pin::PinError> @@ -1026,18 +1012,18 @@ pub fn aya::maps::DevMap::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::DevMap where U: core::convert::TryFrom pub type aya::maps::DevMap::Error = >::Error pub fn aya::maps::DevMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::DevMap where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::DevMap where T: 'static + ?core::marker::Sized pub fn aya::maps::DevMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::DevMap where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::DevMap where T: ?core::marker::Sized pub fn aya::maps::DevMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::DevMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::DevMap where T: ?core::marker::Sized pub fn aya::maps::DevMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::DevMap pub fn aya::maps::DevMap::from(t: T) -> T pub struct aya::maps::xdp::DevMapHash impl> aya::maps::DevMapHash -pub fn aya::maps::DevMapHash::get(&self, key: u32, flags: u64) -> core::result::Result -pub fn aya::maps::DevMapHash::iter(&self) -> aya::maps::MapIter<'_, u32, DevMapValue, Self> +pub fn aya::maps::DevMapHash::get(&self, key: u32, flags: u64) -> core::result::Result +pub fn aya::maps::DevMapHash::iter(&self) -> aya::maps::MapIter<'_, u32, aya::maps::xdp::dev_map::DevMapValue, Self> pub fn aya::maps::DevMapHash::keys(&self) -> aya::maps::MapKeys<'_, u32> impl> aya::maps::DevMapHash pub fn aya::maps::DevMapHash::pin>(self, path: P) -> core::result::Result<(), aya::pin::PinError> @@ -1067,11 +1053,11 @@ pub fn aya::maps::DevMapHash::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::DevMapHash where U: core::convert::TryFrom pub type aya::maps::DevMapHash::Error = >::Error pub fn aya::maps::DevMapHash::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::DevMapHash where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::DevMapHash where T: 'static + ?core::marker::Sized pub fn aya::maps::DevMapHash::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::DevMapHash where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::DevMapHash where T: ?core::marker::Sized pub fn aya::maps::DevMapHash::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::DevMapHash where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::DevMapHash where T: ?core::marker::Sized pub fn aya::maps::DevMapHash::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::DevMapHash pub fn aya::maps::DevMapHash::from(t: T) -> T @@ -1082,6 +1068,7 @@ impl> aya::maps::XskMap pub fn aya::maps::XskMap::pin>(self, path: P) -> core::result::Result<(), aya::pin::PinError> impl> aya::maps::XskMap pub fn aya::maps::XskMap::set(&mut self, index: u32, socket_fd: impl std::os::fd::raw::AsRawFd, flags: u64) -> core::result::Result<(), aya::maps::MapError> +pub fn aya::maps::XskMap::unset(&mut self, index: u32) -> core::result::Result<(), aya::maps::MapError> impl core::convert::TryFrom for aya::maps::XskMap pub type aya::maps::XskMap::Error = aya::maps::MapError pub fn aya::maps::XskMap::try_from(map: aya::maps::Map) -> core::result::Result @@ -1105,11 +1092,11 @@ pub fn aya::maps::XskMap::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::XskMap where U: core::convert::TryFrom pub type aya::maps::XskMap::Error = >::Error pub fn aya::maps::XskMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::XskMap where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::XskMap where T: 'static + ?core::marker::Sized pub fn aya::maps::XskMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::XskMap where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::XskMap where T: ?core::marker::Sized pub fn aya::maps::XskMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::XskMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::XskMap where T: ?core::marker::Sized pub fn aya::maps::XskMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::XskMap pub fn aya::maps::XskMap::from(t: T) -> T @@ -1129,6 +1116,7 @@ pub aya::maps::Map::PerfEventArray(aya::maps::MapData) pub aya::maps::Map::ProgramArray(aya::maps::MapData) pub aya::maps::Map::Queue(aya::maps::MapData) pub aya::maps::Map::RingBuf(aya::maps::MapData) +pub aya::maps::Map::SkStorage(aya::maps::MapData) pub aya::maps::Map::SockHash(aya::maps::MapData) pub aya::maps::Map::SockMap(aya::maps::MapData) pub aya::maps::Map::Stack(aya::maps::MapData) @@ -1136,6 +1124,7 @@ pub aya::maps::Map::StackTraceMap(aya::maps::MapData) pub aya::maps::Map::Unsupported(aya::maps::MapData) pub aya::maps::Map::XskMap(aya::maps::MapData) impl aya::maps::Map +pub fn aya::maps::Map::from_map_data(map_data: aya::maps::MapData) -> core::result::Result pub fn aya::maps::Map::pin>(&self, path: P) -> core::result::Result<(), aya::pin::PinError> impl core::convert::TryFrom for aya::maps::CpuMap pub type aya::maps::CpuMap::Error = aya::maps::MapError @@ -1155,9 +1144,6 @@ pub fn aya::maps::SockMap::try_from(map: aya::maps::Map) -> impl core::convert::TryFrom for aya::maps::XskMap pub type aya::maps::XskMap::Error = aya::maps::MapError pub fn aya::maps::XskMap::try_from(map: aya::maps::Map) -> core::result::Result -impl core::convert::TryFrom for aya::maps::perf::AsyncPerfEventArray -pub type aya::maps::perf::AsyncPerfEventArray::Error = aya::maps::MapError -pub fn aya::maps::perf::AsyncPerfEventArray::try_from(map: aya::maps::Map) -> core::result::Result impl core::convert::TryFrom for aya::maps::perf::PerfEventArray pub type aya::maps::perf::PerfEventArray::Error = aya::maps::MapError pub fn aya::maps::perf::PerfEventArray::try_from(map: aya::maps::Map) -> core::result::Result @@ -1202,6 +1188,9 @@ pub fn aya::maps::bloom_filter::BloomFilter<&'a aya::maps::MapData, V>::try_from impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::queue::Queue<&'a aya::maps::MapData, V> pub type aya::maps::queue::Queue<&'a aya::maps::MapData, V>::Error = aya::maps::MapError pub fn aya::maps::queue::Queue<&'a aya::maps::MapData, V>::try_from(map: &'a aya::maps::Map) -> core::result::Result +impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::sk_storage::SkStorage<&'a aya::maps::MapData, V> +pub type aya::maps::sk_storage::SkStorage<&'a aya::maps::MapData, V>::Error = aya::maps::MapError +pub fn aya::maps::sk_storage::SkStorage<&'a aya::maps::MapData, V>::try_from(map: &'a aya::maps::Map) -> core::result::Result impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::stack::Stack<&'a aya::maps::MapData, V> pub type aya::maps::stack::Stack<&'a aya::maps::MapData, V>::Error = aya::maps::MapError pub fn aya::maps::stack::Stack<&'a aya::maps::MapData, V>::try_from(map: &'a aya::maps::Map) -> core::result::Result @@ -1220,6 +1209,9 @@ pub fn aya::maps::bloom_filter::BloomFilter<&'a mut aya::maps::MapData, V>::try_ impl<'a, V: aya::Pod> core::convert::TryFrom<&'a mut aya::maps::Map> for aya::maps::queue::Queue<&'a mut aya::maps::MapData, V> pub type aya::maps::queue::Queue<&'a mut aya::maps::MapData, V>::Error = aya::maps::MapError pub fn aya::maps::queue::Queue<&'a mut aya::maps::MapData, V>::try_from(map: &'a mut aya::maps::Map) -> core::result::Result +impl<'a, V: aya::Pod> core::convert::TryFrom<&'a mut aya::maps::Map> for aya::maps::sk_storage::SkStorage<&'a mut aya::maps::MapData, V> +pub type aya::maps::sk_storage::SkStorage<&'a mut aya::maps::MapData, V>::Error = aya::maps::MapError +pub fn aya::maps::sk_storage::SkStorage<&'a mut aya::maps::MapData, V>::try_from(map: &'a mut aya::maps::Map) -> core::result::Result impl<'a, V: aya::Pod> core::convert::TryFrom<&'a mut aya::maps::Map> for aya::maps::stack::Stack<&'a mut aya::maps::MapData, V> pub type aya::maps::stack::Stack<&'a mut aya::maps::MapData, V>::Error = aya::maps::MapError pub fn aya::maps::stack::Stack<&'a mut aya::maps::MapData, V>::try_from(map: &'a mut aya::maps::Map) -> core::result::Result @@ -1241,9 +1233,6 @@ pub fn aya::maps::SockMap<&'a aya::maps::MapData>::try_from(map: &'a aya::maps:: impl<'a> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::XskMap<&'a aya::maps::MapData> pub type aya::maps::XskMap<&'a aya::maps::MapData>::Error = aya::maps::MapError pub fn aya::maps::XskMap<&'a aya::maps::MapData>::try_from(map: &'a aya::maps::Map) -> core::result::Result -impl<'a> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::perf::AsyncPerfEventArray<&'a aya::maps::MapData> -pub type aya::maps::perf::AsyncPerfEventArray<&'a aya::maps::MapData>::Error = aya::maps::MapError -pub fn aya::maps::perf::AsyncPerfEventArray<&'a aya::maps::MapData>::try_from(map: &'a aya::maps::Map) -> core::result::Result impl<'a> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::perf::PerfEventArray<&'a aya::maps::MapData> pub type aya::maps::perf::PerfEventArray<&'a aya::maps::MapData>::Error = aya::maps::MapError pub fn aya::maps::perf::PerfEventArray<&'a aya::maps::MapData>::try_from(map: &'a aya::maps::Map) -> core::result::Result @@ -1271,9 +1260,6 @@ pub fn aya::maps::SockMap<&'a mut aya::maps::MapData>::try_from(map: &'a mut aya impl<'a> core::convert::TryFrom<&'a mut aya::maps::Map> for aya::maps::XskMap<&'a mut aya::maps::MapData> pub type aya::maps::XskMap<&'a mut aya::maps::MapData>::Error = aya::maps::MapError pub fn aya::maps::XskMap<&'a mut aya::maps::MapData>::try_from(map: &'a mut aya::maps::Map) -> core::result::Result -impl<'a> core::convert::TryFrom<&'a mut aya::maps::Map> for aya::maps::perf::AsyncPerfEventArray<&'a mut aya::maps::MapData> -pub type aya::maps::perf::AsyncPerfEventArray<&'a mut aya::maps::MapData>::Error = aya::maps::MapError -pub fn aya::maps::perf::AsyncPerfEventArray<&'a mut aya::maps::MapData>::try_from(map: &'a mut aya::maps::Map) -> core::result::Result impl<'a> core::convert::TryFrom<&'a mut aya::maps::Map> for aya::maps::perf::PerfEventArray<&'a mut aya::maps::MapData> pub type aya::maps::perf::PerfEventArray<&'a mut aya::maps::MapData>::Error = aya::maps::MapError pub fn aya::maps::perf::PerfEventArray<&'a mut aya::maps::MapData>::try_from(map: &'a mut aya::maps::Map) -> core::result::Result @@ -1307,6 +1293,9 @@ pub fn aya::maps::bloom_filter::BloomFilter::try_from(map impl core::convert::TryFrom for aya::maps::queue::Queue pub type aya::maps::queue::Queue::Error = aya::maps::MapError pub fn aya::maps::queue::Queue::try_from(map: aya::maps::Map) -> core::result::Result +impl core::convert::TryFrom for aya::maps::sk_storage::SkStorage +pub type aya::maps::sk_storage::SkStorage::Error = aya::maps::MapError +pub fn aya::maps::sk_storage::SkStorage::try_from(map: aya::maps::Map) -> core::result::Result impl core::convert::TryFrom for aya::maps::stack::Stack pub type aya::maps::stack::Stack::Error = aya::maps::MapError pub fn aya::maps::stack::Stack::try_from(map: aya::maps::Map) -> core::result::Result @@ -1324,17 +1313,16 @@ pub fn aya::maps::Map::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::Map where U: core::convert::TryFrom pub type aya::maps::Map::Error = >::Error pub fn aya::maps::Map::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::Map where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::Map where T: 'static + ?core::marker::Sized pub fn aya::maps::Map::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::Map where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::Map where T: ?core::marker::Sized pub fn aya::maps::Map::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::Map where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::Map where T: ?core::marker::Sized pub fn aya::maps::Map::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::Map pub fn aya::maps::Map::from(t: T) -> T pub enum aya::maps::MapError pub aya::maps::MapError::CreateError -pub aya::maps::MapError::CreateError::code: i64 pub aya::maps::MapError::CreateError::io_error: std::io::error::Error pub aya::maps::MapError::CreateError::name: alloc::string::String pub aya::maps::MapError::ElementNotFound @@ -1348,6 +1336,7 @@ pub aya::maps::MapError::InvalidName::name: alloc::string::String pub aya::maps::MapError::InvalidValueSize pub aya::maps::MapError::InvalidValueSize::expected: usize pub aya::maps::MapError::InvalidValueSize::size: usize +pub aya::maps::MapError::IoError(std::io::error::Error) pub aya::maps::MapError::KeyNotFound pub aya::maps::MapError::OutOfBounds pub aya::maps::MapError::OutOfBounds::index: u32 @@ -1357,17 +1346,22 @@ pub aya::maps::MapError::PinError::error: aya::pin::PinError pub aya::maps::MapError::PinError::name: core::option::Option pub aya::maps::MapError::ProgIdNotSupported pub aya::maps::MapError::ProgramNotLoaded -pub aya::maps::MapError::SyscallError(crate::sys::SyscallError) +pub aya::maps::MapError::SyscallError(aya::sys::SyscallError) pub aya::maps::MapError::Unsupported -pub aya::maps::MapError::Unsupported::map_type: u32 +pub aya::maps::MapError::Unsupported::map_type: aya_obj::generated::linux_bindings_x86_64::bpf_map_type +pub aya::maps::MapError::Unsupported::name: alloc::string::String impl core::convert::From for aya::EbpfError pub fn aya::EbpfError::from(source: aya::maps::MapError) -> Self impl core::convert::From for aya::maps::xdp::XdpMapError pub fn aya::maps::xdp::XdpMapError::from(source: aya::maps::MapError) -> Self impl core::convert::From for aya::programs::ProgramError pub fn aya::programs::ProgramError::from(source: aya::maps::MapError) -> Self -impl core::convert::From for aya::maps::MapError -pub fn aya::maps::MapError::from(e: aya_obj::maps::InvalidMapTypeError) -> Self +impl core::convert::From for aya::maps::MapError +pub fn aya::maps::MapError::from(source: aya::sys::SyscallError) -> Self +impl core::convert::From> for aya::maps::MapError +pub fn aya::maps::MapError::from(e: aya_obj::obj::InvalidTypeBinding) -> Self +impl core::convert::From for aya::maps::MapError +pub fn aya::maps::MapError::from(source: std::io::error::Error) -> Self impl core::error::Error for aya::maps::MapError pub fn aya::maps::MapError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)> impl core::fmt::Debug for aya::maps::MapError @@ -1388,16 +1382,90 @@ pub fn aya::maps::MapError::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::MapError where U: core::convert::TryFrom pub type aya::maps::MapError::Error = >::Error pub fn aya::maps::MapError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya::maps::MapError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya::maps::MapError where T: core::fmt::Display + ?core::marker::Sized pub fn aya::maps::MapError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya::maps::MapError where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::MapError where T: 'static + ?core::marker::Sized pub fn aya::maps::MapError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::MapError where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::MapError where T: ?core::marker::Sized pub fn aya::maps::MapError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::MapError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::MapError where T: ?core::marker::Sized pub fn aya::maps::MapError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::MapError pub fn aya::maps::MapError::from(t: T) -> T +#[non_exhaustive] pub enum aya::maps::MapType +pub aya::maps::MapType::Arena = 33 +pub aya::maps::MapType::Array = 2 +pub aya::maps::MapType::ArrayOfMaps = 12 +pub aya::maps::MapType::BloomFilter = 30 +pub aya::maps::MapType::CgroupArray = 8 +pub aya::maps::MapType::CgroupStorage = 19 +pub aya::maps::MapType::CgrpStorage = 32 +pub aya::maps::MapType::CpuMap = 16 +pub aya::maps::MapType::DevMap = 14 +pub aya::maps::MapType::DevMapHash = 25 +pub aya::maps::MapType::Hash = 1 +pub aya::maps::MapType::HashOfMaps = 13 +pub aya::maps::MapType::InodeStorage = 28 +pub aya::maps::MapType::LpmTrie = 11 +pub aya::maps::MapType::LruHash = 9 +pub aya::maps::MapType::LruPerCpuHash = 10 +pub aya::maps::MapType::PerCpuArray = 6 +pub aya::maps::MapType::PerCpuCgroupStorage = 21 +pub aya::maps::MapType::PerCpuHash = 5 +pub aya::maps::MapType::PerfEventArray = 4 +pub aya::maps::MapType::ProgramArray = 3 +pub aya::maps::MapType::Queue = 22 +pub aya::maps::MapType::ReuseportSockArray = 20 +pub aya::maps::MapType::RingBuf = 27 +pub aya::maps::MapType::SkStorage = 24 +pub aya::maps::MapType::SockHash = 18 +pub aya::maps::MapType::SockMap = 15 +pub aya::maps::MapType::Stack = 23 +pub aya::maps::MapType::StackTrace = 7 +pub aya::maps::MapType::StructOps = 26 +pub aya::maps::MapType::TaskStorage = 29 +pub aya::maps::MapType::Unspecified = 0 +pub aya::maps::MapType::UserRingBuf = 31 +pub aya::maps::MapType::XskMap = 17 +impl core::clone::Clone for aya::maps::MapType +pub fn aya::maps::MapType::clone(&self) -> aya::maps::MapType +impl core::cmp::PartialEq for aya::maps::MapType +pub fn aya::maps::MapType::eq(&self, other: &aya::maps::MapType) -> bool +impl core::convert::TryFrom for aya::maps::MapType +pub type aya::maps::MapType::Error = aya::maps::MapError +pub fn aya::maps::MapType::try_from(map_type: aya_obj::generated::linux_bindings_x86_64::bpf_map_type) -> core::result::Result +impl core::fmt::Debug for aya::maps::MapType +pub fn aya::maps::MapType::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Copy for aya::maps::MapType +impl core::marker::StructuralPartialEq for aya::maps::MapType +impl core::marker::Freeze for aya::maps::MapType +impl core::marker::Send for aya::maps::MapType +impl core::marker::Sync for aya::maps::MapType +impl core::marker::Unpin for aya::maps::MapType +impl core::panic::unwind_safe::RefUnwindSafe for aya::maps::MapType +impl core::panic::unwind_safe::UnwindSafe for aya::maps::MapType +impl core::convert::Into for aya::maps::MapType where U: core::convert::From +pub fn aya::maps::MapType::into(self) -> U +impl core::convert::TryFrom for aya::maps::MapType where U: core::convert::Into +pub type aya::maps::MapType::Error = core::convert::Infallible +pub fn aya::maps::MapType::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::maps::MapType where U: core::convert::TryFrom +pub type aya::maps::MapType::Error = >::Error +pub fn aya::maps::MapType::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya::maps::MapType where T: core::clone::Clone +pub type aya::maps::MapType::Owned = T +pub fn aya::maps::MapType::clone_into(&self, target: &mut T) +pub fn aya::maps::MapType::to_owned(&self) -> T +impl core::any::Any for aya::maps::MapType where T: 'static + ?core::marker::Sized +pub fn aya::maps::MapType::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::maps::MapType where T: ?core::marker::Sized +pub fn aya::maps::MapType::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::maps::MapType where T: ?core::marker::Sized +pub fn aya::maps::MapType::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::maps::MapType where T: core::clone::Clone +pub unsafe fn aya::maps::MapType::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya::maps::MapType +pub fn aya::maps::MapType::from(t: T) -> T pub struct aya::maps::Array impl, V: aya::Pod> aya::maps::array::Array pub fn aya::maps::array::Array::get(&self, index: &u32, flags: u64) -> core::result::Result @@ -1433,49 +1501,14 @@ pub fn aya::maps::array::Array::try_from(value: U) -> core::result::Result impl core::convert::TryInto for aya::maps::array::Array where U: core::convert::TryFrom pub type aya::maps::array::Array::Error = >::Error pub fn aya::maps::array::Array::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::array::Array where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::array::Array where T: 'static + ?core::marker::Sized pub fn aya::maps::array::Array::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::array::Array where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::array::Array where T: ?core::marker::Sized pub fn aya::maps::array::Array::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::array::Array where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::array::Array where T: ?core::marker::Sized pub fn aya::maps::array::Array::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::array::Array pub fn aya::maps::array::Array::from(t: T) -> T -pub struct aya::maps::AsyncPerfEventArray -impl> aya::maps::perf::AsyncPerfEventArray -pub fn aya::maps::perf::AsyncPerfEventArray::open(&mut self, index: u32, page_count: core::option::Option) -> core::result::Result, aya::maps::perf::PerfBufferError> -pub fn aya::maps::perf::AsyncPerfEventArray::pin>(&self, path: P) -> core::result::Result<(), aya::pin::PinError> -impl core::convert::TryFrom for aya::maps::perf::AsyncPerfEventArray -pub type aya::maps::perf::AsyncPerfEventArray::Error = aya::maps::MapError -pub fn aya::maps::perf::AsyncPerfEventArray::try_from(map: aya::maps::Map) -> core::result::Result -impl<'a> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::perf::AsyncPerfEventArray<&'a aya::maps::MapData> -pub type aya::maps::perf::AsyncPerfEventArray<&'a aya::maps::MapData>::Error = aya::maps::MapError -pub fn aya::maps::perf::AsyncPerfEventArray<&'a aya::maps::MapData>::try_from(map: &'a aya::maps::Map) -> core::result::Result -impl<'a> core::convert::TryFrom<&'a mut aya::maps::Map> for aya::maps::perf::AsyncPerfEventArray<&'a mut aya::maps::MapData> -pub type aya::maps::perf::AsyncPerfEventArray<&'a mut aya::maps::MapData>::Error = aya::maps::MapError -pub fn aya::maps::perf::AsyncPerfEventArray<&'a mut aya::maps::MapData>::try_from(map: &'a mut aya::maps::Map) -> core::result::Result -impl core::marker::Freeze for aya::maps::perf::AsyncPerfEventArray -impl core::marker::Send for aya::maps::perf::AsyncPerfEventArray where T: core::marker::Sync + core::marker::Send -impl core::marker::Sync for aya::maps::perf::AsyncPerfEventArray where T: core::marker::Sync + core::marker::Send -impl core::marker::Unpin for aya::maps::perf::AsyncPerfEventArray -impl core::panic::unwind_safe::RefUnwindSafe for aya::maps::perf::AsyncPerfEventArray where T: core::panic::unwind_safe::RefUnwindSafe -impl core::panic::unwind_safe::UnwindSafe for aya::maps::perf::AsyncPerfEventArray where T: core::panic::unwind_safe::RefUnwindSafe -impl core::convert::Into for aya::maps::perf::AsyncPerfEventArray where U: core::convert::From -pub fn aya::maps::perf::AsyncPerfEventArray::into(self) -> U -impl core::convert::TryFrom for aya::maps::perf::AsyncPerfEventArray where U: core::convert::Into -pub type aya::maps::perf::AsyncPerfEventArray::Error = core::convert::Infallible -pub fn aya::maps::perf::AsyncPerfEventArray::try_from(value: U) -> core::result::Result>::Error> -impl core::convert::TryInto for aya::maps::perf::AsyncPerfEventArray where U: core::convert::TryFrom -pub type aya::maps::perf::AsyncPerfEventArray::Error = >::Error -pub fn aya::maps::perf::AsyncPerfEventArray::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::perf::AsyncPerfEventArray where T: 'static + core::marker::Sized -pub fn aya::maps::perf::AsyncPerfEventArray::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::perf::AsyncPerfEventArray where T: core::marker::Sized -pub fn aya::maps::perf::AsyncPerfEventArray::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::perf::AsyncPerfEventArray where T: core::marker::Sized -pub fn aya::maps::perf::AsyncPerfEventArray::borrow_mut(&mut self) -> &mut T -impl core::convert::From for aya::maps::perf::AsyncPerfEventArray -pub fn aya::maps::perf::AsyncPerfEventArray::from(t: T) -> T pub struct aya::maps::BloomFilter impl, V: aya::Pod> aya::maps::bloom_filter::BloomFilter pub fn aya::maps::bloom_filter::BloomFilter::contains(&self, value: &V, flags: u64) -> core::result::Result<(), aya::maps::MapError> @@ -1508,18 +1541,18 @@ pub fn aya::maps::bloom_filter::BloomFilter::try_from(value: U) -> core::r impl core::convert::TryInto for aya::maps::bloom_filter::BloomFilter where U: core::convert::TryFrom pub type aya::maps::bloom_filter::BloomFilter::Error = >::Error pub fn aya::maps::bloom_filter::BloomFilter::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::bloom_filter::BloomFilter where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::bloom_filter::BloomFilter where T: 'static + ?core::marker::Sized pub fn aya::maps::bloom_filter::BloomFilter::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::bloom_filter::BloomFilter where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::bloom_filter::BloomFilter where T: ?core::marker::Sized pub fn aya::maps::bloom_filter::BloomFilter::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::bloom_filter::BloomFilter where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::bloom_filter::BloomFilter where T: ?core::marker::Sized pub fn aya::maps::bloom_filter::BloomFilter::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::bloom_filter::BloomFilter pub fn aya::maps::bloom_filter::BloomFilter::from(t: T) -> T pub struct aya::maps::CpuMap impl> aya::maps::CpuMap -pub fn aya::maps::CpuMap::get(&self, cpu_index: u32, flags: u64) -> core::result::Result -pub fn aya::maps::CpuMap::iter(&self) -> impl core::iter::traits::iterator::Iterator> + '_ +pub fn aya::maps::CpuMap::get(&self, cpu_index: u32, flags: u64) -> core::result::Result +pub fn aya::maps::CpuMap::iter(&self) -> impl core::iter::traits::iterator::Iterator> + '_ pub fn aya::maps::CpuMap::len(&self) -> u32 impl> aya::maps::CpuMap pub fn aya::maps::CpuMap::pin>(self, path: P) -> core::result::Result<(), aya::pin::PinError> @@ -1548,18 +1581,18 @@ pub fn aya::maps::CpuMap::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::CpuMap where U: core::convert::TryFrom pub type aya::maps::CpuMap::Error = >::Error pub fn aya::maps::CpuMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::CpuMap where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::CpuMap where T: 'static + ?core::marker::Sized pub fn aya::maps::CpuMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::CpuMap where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::CpuMap where T: ?core::marker::Sized pub fn aya::maps::CpuMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::CpuMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::CpuMap where T: ?core::marker::Sized pub fn aya::maps::CpuMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::CpuMap pub fn aya::maps::CpuMap::from(t: T) -> T pub struct aya::maps::DevMap impl> aya::maps::DevMap -pub fn aya::maps::DevMap::get(&self, index: u32, flags: u64) -> core::result::Result -pub fn aya::maps::DevMap::iter(&self) -> impl core::iter::traits::iterator::Iterator> + '_ +pub fn aya::maps::DevMap::get(&self, index: u32, flags: u64) -> core::result::Result +pub fn aya::maps::DevMap::iter(&self) -> impl core::iter::traits::iterator::Iterator> + '_ pub fn aya::maps::DevMap::len(&self) -> u32 impl> aya::maps::DevMap pub fn aya::maps::DevMap::pin>(self, path: P) -> core::result::Result<(), aya::pin::PinError> @@ -1588,18 +1621,18 @@ pub fn aya::maps::DevMap::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::DevMap where U: core::convert::TryFrom pub type aya::maps::DevMap::Error = >::Error pub fn aya::maps::DevMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::DevMap where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::DevMap where T: 'static + ?core::marker::Sized pub fn aya::maps::DevMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::DevMap where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::DevMap where T: ?core::marker::Sized pub fn aya::maps::DevMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::DevMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::DevMap where T: ?core::marker::Sized pub fn aya::maps::DevMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::DevMap pub fn aya::maps::DevMap::from(t: T) -> T pub struct aya::maps::DevMapHash impl> aya::maps::DevMapHash -pub fn aya::maps::DevMapHash::get(&self, key: u32, flags: u64) -> core::result::Result -pub fn aya::maps::DevMapHash::iter(&self) -> aya::maps::MapIter<'_, u32, DevMapValue, Self> +pub fn aya::maps::DevMapHash::get(&self, key: u32, flags: u64) -> core::result::Result +pub fn aya::maps::DevMapHash::iter(&self) -> aya::maps::MapIter<'_, u32, aya::maps::xdp::dev_map::DevMapValue, Self> pub fn aya::maps::DevMapHash::keys(&self) -> aya::maps::MapKeys<'_, u32> impl> aya::maps::DevMapHash pub fn aya::maps::DevMapHash::pin>(self, path: P) -> core::result::Result<(), aya::pin::PinError> @@ -1629,11 +1662,11 @@ pub fn aya::maps::DevMapHash::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::DevMapHash where U: core::convert::TryFrom pub type aya::maps::DevMapHash::Error = >::Error pub fn aya::maps::DevMapHash::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::DevMapHash where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::DevMapHash where T: 'static + ?core::marker::Sized pub fn aya::maps::DevMapHash::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::DevMapHash where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::DevMapHash where T: ?core::marker::Sized pub fn aya::maps::DevMapHash::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::DevMapHash where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::DevMapHash where T: ?core::marker::Sized pub fn aya::maps::DevMapHash::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::DevMapHash pub fn aya::maps::DevMapHash::from(t: T) -> T @@ -1675,11 +1708,11 @@ pub fn aya::maps::hash_map::HashMap::try_from(value: U) -> core::result impl core::convert::TryInto for aya::maps::hash_map::HashMap where U: core::convert::TryFrom pub type aya::maps::hash_map::HashMap::Error = >::Error pub fn aya::maps::hash_map::HashMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::hash_map::HashMap where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::hash_map::HashMap where T: 'static + ?core::marker::Sized pub fn aya::maps::hash_map::HashMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::hash_map::HashMap where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::hash_map::HashMap where T: ?core::marker::Sized pub fn aya::maps::hash_map::HashMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::hash_map::HashMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::hash_map::HashMap where T: ?core::marker::Sized pub fn aya::maps::hash_map::HashMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::hash_map::HashMap pub fn aya::maps::hash_map::HashMap::from(t: T) -> T @@ -1721,11 +1754,11 @@ pub fn aya::maps::lpm_trie::LpmTrie::try_from(value: U) -> core::result impl core::convert::TryInto for aya::maps::lpm_trie::LpmTrie where U: core::convert::TryFrom pub type aya::maps::lpm_trie::LpmTrie::Error = >::Error pub fn aya::maps::lpm_trie::LpmTrie::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::lpm_trie::LpmTrie where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::lpm_trie::LpmTrie where T: 'static + ?core::marker::Sized pub fn aya::maps::lpm_trie::LpmTrie::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::lpm_trie::LpmTrie where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::lpm_trie::LpmTrie where T: ?core::marker::Sized pub fn aya::maps::lpm_trie::LpmTrie::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::lpm_trie::LpmTrie where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::lpm_trie::LpmTrie where T: ?core::marker::Sized pub fn aya::maps::lpm_trie::LpmTrie::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::lpm_trie::LpmTrie pub fn aya::maps::lpm_trie::LpmTrie::from(t: T) -> T @@ -1754,11 +1787,11 @@ pub fn aya::maps::MapData::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::MapData where U: core::convert::TryFrom pub type aya::maps::MapData::Error = >::Error pub fn aya::maps::MapData::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::MapData where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::MapData where T: 'static + ?core::marker::Sized pub fn aya::maps::MapData::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::MapData where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::MapData where T: ?core::marker::Sized pub fn aya::maps::MapData::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::MapData where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::MapData where T: ?core::marker::Sized pub fn aya::maps::MapData::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::MapData pub fn aya::maps::MapData::from(t: T) -> T @@ -1781,11 +1814,11 @@ pub fn aya::maps::MapFd::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::MapFd where U: core::convert::TryFrom pub type aya::maps::MapFd::Error = >::Error pub fn aya::maps::MapFd::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::MapFd where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::MapFd where T: 'static + ?core::marker::Sized pub fn aya::maps::MapFd::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::MapFd where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::MapFd where T: ?core::marker::Sized pub fn aya::maps::MapFd::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::MapFd where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::MapFd where T: ?core::marker::Sized pub fn aya::maps::MapFd::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::MapFd pub fn aya::maps::MapFd::from(t: T) -> T @@ -1797,7 +1830,7 @@ pub fn aya::maps::MapInfo::from_pin>(pa pub fn aya::maps::MapInfo::id(&self) -> u32 pub fn aya::maps::MapInfo::key_size(&self) -> u32 pub fn aya::maps::MapInfo::map_flags(&self) -> u32 -pub fn aya::maps::MapInfo::map_type(&self) -> u32 +pub fn aya::maps::MapInfo::map_type(&self) -> core::result::Result pub fn aya::maps::MapInfo::max_entries(&self) -> u32 pub fn aya::maps::MapInfo::name(&self) -> &[u8] pub fn aya::maps::MapInfo::name_as_str(&self) -> core::option::Option<&str> @@ -1818,11 +1851,11 @@ pub fn aya::maps::MapInfo::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::MapInfo where U: core::convert::TryFrom pub type aya::maps::MapInfo::Error = >::Error pub fn aya::maps::MapInfo::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::MapInfo where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::MapInfo where T: 'static + ?core::marker::Sized pub fn aya::maps::MapInfo::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::MapInfo where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::MapInfo where T: ?core::marker::Sized pub fn aya::maps::MapInfo::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::MapInfo where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::MapInfo where T: ?core::marker::Sized pub fn aya::maps::MapInfo::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::MapInfo pub fn aya::maps::MapInfo::from(t: T) -> T @@ -1848,11 +1881,11 @@ pub fn aya::maps::MapIter<'coll, K, V, I>::try_from(value: U) -> core::result::R impl core::convert::TryInto for aya::maps::MapIter<'coll, K, V, I> where U: core::convert::TryFrom pub type aya::maps::MapIter<'coll, K, V, I>::Error = >::Error pub fn aya::maps::MapIter<'coll, K, V, I>::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::MapIter<'coll, K, V, I> where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::MapIter<'coll, K, V, I> where T: 'static + ?core::marker::Sized pub fn aya::maps::MapIter<'coll, K, V, I>::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::MapIter<'coll, K, V, I> where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::MapIter<'coll, K, V, I> where T: ?core::marker::Sized pub fn aya::maps::MapIter<'coll, K, V, I>::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::MapIter<'coll, K, V, I> where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::MapIter<'coll, K, V, I> where T: ?core::marker::Sized pub fn aya::maps::MapIter<'coll, K, V, I>::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::MapIter<'coll, K, V, I> pub fn aya::maps::MapIter<'coll, K, V, I>::from(t: T) -> T @@ -1878,11 +1911,11 @@ pub fn aya::maps::MapKeys<'coll, K>::try_from(value: U) -> core::result::Result< impl core::convert::TryInto for aya::maps::MapKeys<'coll, K> where U: core::convert::TryFrom pub type aya::maps::MapKeys<'coll, K>::Error = >::Error pub fn aya::maps::MapKeys<'coll, K>::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::MapKeys<'coll, K> where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::MapKeys<'coll, K> where T: 'static + ?core::marker::Sized pub fn aya::maps::MapKeys<'coll, K>::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::MapKeys<'coll, K> where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::MapKeys<'coll, K> where T: ?core::marker::Sized pub fn aya::maps::MapKeys<'coll, K>::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::MapKeys<'coll, K> where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::MapKeys<'coll, K> where T: ?core::marker::Sized pub fn aya::maps::MapKeys<'coll, K>::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::MapKeys<'coll, K> pub fn aya::maps::MapKeys<'coll, K>::from(t: T) -> T @@ -1921,11 +1954,11 @@ pub fn aya::maps::PerCpuArray::try_from(value: U) -> core::result::Result< impl core::convert::TryInto for aya::maps::PerCpuArray where U: core::convert::TryFrom pub type aya::maps::PerCpuArray::Error = >::Error pub fn aya::maps::PerCpuArray::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::PerCpuArray where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::PerCpuArray where T: 'static + ?core::marker::Sized pub fn aya::maps::PerCpuArray::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::PerCpuArray where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::PerCpuArray where T: ?core::marker::Sized pub fn aya::maps::PerCpuArray::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::PerCpuArray where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::PerCpuArray where T: ?core::marker::Sized pub fn aya::maps::PerCpuArray::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::PerCpuArray pub fn aya::maps::PerCpuArray::from(t: T) -> T @@ -1965,11 +1998,11 @@ pub fn aya::maps::hash_map::PerCpuHashMap::try_from(value: U) -> core:: impl core::convert::TryInto for aya::maps::hash_map::PerCpuHashMap where U: core::convert::TryFrom pub type aya::maps::hash_map::PerCpuHashMap::Error = >::Error pub fn aya::maps::hash_map::PerCpuHashMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::hash_map::PerCpuHashMap where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::hash_map::PerCpuHashMap where T: 'static + ?core::marker::Sized pub fn aya::maps::hash_map::PerCpuHashMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::hash_map::PerCpuHashMap where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::hash_map::PerCpuHashMap where T: ?core::marker::Sized pub fn aya::maps::hash_map::PerCpuHashMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::hash_map::PerCpuHashMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::hash_map::PerCpuHashMap where T: ?core::marker::Sized pub fn aya::maps::hash_map::PerCpuHashMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::hash_map::PerCpuHashMap pub fn aya::maps::hash_map::PerCpuHashMap::from(t: T) -> T @@ -1994,6 +2027,8 @@ impl core::marker::Sync for aya::maps::PerCpuValues where T: core::marker: impl core::marker::Unpin for aya::maps::PerCpuValues impl core::panic::unwind_safe::RefUnwindSafe for aya::maps::PerCpuValues where T: core::panic::unwind_safe::RefUnwindSafe impl core::panic::unwind_safe::UnwindSafe for aya::maps::PerCpuValues where T: core::panic::unwind_safe::UnwindSafe +impl core::ops::deref::Receiver for aya::maps::PerCpuValues where P: core::ops::deref::Deref + ?core::marker::Sized, T: ?core::marker::Sized +pub type aya::maps::PerCpuValues::Target = T impl core::convert::Into for aya::maps::PerCpuValues where U: core::convert::From pub fn aya::maps::PerCpuValues::into(self) -> U impl core::convert::TryFrom for aya::maps::PerCpuValues where U: core::convert::Into @@ -2002,11 +2037,11 @@ pub fn aya::maps::PerCpuValues::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::PerCpuValues where U: core::convert::TryFrom pub type aya::maps::PerCpuValues::Error = >::Error pub fn aya::maps::PerCpuValues::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::PerCpuValues where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::PerCpuValues where T: 'static + ?core::marker::Sized pub fn aya::maps::PerCpuValues::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::PerCpuValues where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::PerCpuValues where T: ?core::marker::Sized pub fn aya::maps::PerCpuValues::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::PerCpuValues where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::PerCpuValues where T: ?core::marker::Sized pub fn aya::maps::PerCpuValues::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::PerCpuValues pub fn aya::maps::PerCpuValues::from(t: T) -> T @@ -2038,11 +2073,11 @@ pub fn aya::maps::perf::PerfEventArray::try_from(value: U) -> core::result::R impl core::convert::TryInto for aya::maps::perf::PerfEventArray where U: core::convert::TryFrom pub type aya::maps::perf::PerfEventArray::Error = >::Error pub fn aya::maps::perf::PerfEventArray::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::perf::PerfEventArray where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::perf::PerfEventArray where T: 'static + ?core::marker::Sized pub fn aya::maps::perf::PerfEventArray::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::perf::PerfEventArray where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::perf::PerfEventArray where T: ?core::marker::Sized pub fn aya::maps::perf::PerfEventArray::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::perf::PerfEventArray where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::perf::PerfEventArray where T: ?core::marker::Sized pub fn aya::maps::perf::PerfEventArray::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::perf::PerfEventArray pub fn aya::maps::perf::PerfEventArray::from(t: T) -> T @@ -2077,11 +2112,11 @@ pub fn aya::maps::ProgramArray::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::ProgramArray where U: core::convert::TryFrom pub type aya::maps::ProgramArray::Error = >::Error pub fn aya::maps::ProgramArray::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::ProgramArray where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::ProgramArray where T: 'static + ?core::marker::Sized pub fn aya::maps::ProgramArray::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::ProgramArray where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::ProgramArray where T: ?core::marker::Sized pub fn aya::maps::ProgramArray::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::ProgramArray where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::ProgramArray where T: ?core::marker::Sized pub fn aya::maps::ProgramArray::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::ProgramArray pub fn aya::maps::ProgramArray::from(t: T) -> T @@ -2116,11 +2151,11 @@ pub fn aya::maps::queue::Queue::try_from(value: U) -> core::result::Result impl core::convert::TryInto for aya::maps::queue::Queue where U: core::convert::TryFrom pub type aya::maps::queue::Queue::Error = >::Error pub fn aya::maps::queue::Queue::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::queue::Queue where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::queue::Queue where T: 'static + ?core::marker::Sized pub fn aya::maps::queue::Queue::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::queue::Queue where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::queue::Queue where T: ?core::marker::Sized pub fn aya::maps::queue::Queue::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::queue::Queue where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::queue::Queue where T: ?core::marker::Sized pub fn aya::maps::queue::Queue::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::queue::Queue pub fn aya::maps::queue::Queue::from(t: T) -> T @@ -2136,6 +2171,8 @@ pub fn aya::maps::ring_buf::RingBuf<&'a aya::maps::MapData>::try_from(map: &'a a impl<'a> core::convert::TryFrom<&'a mut aya::maps::Map> for aya::maps::ring_buf::RingBuf<&'a mut aya::maps::MapData> pub type aya::maps::ring_buf::RingBuf<&'a mut aya::maps::MapData>::Error = aya::maps::MapError pub fn aya::maps::ring_buf::RingBuf<&'a mut aya::maps::MapData>::try_from(map: &'a mut aya::maps::Map) -> core::result::Result +impl> std::os::fd::owned::AsFd for aya::maps::ring_buf::RingBuf +pub fn aya::maps::ring_buf::RingBuf::as_fd(&self) -> std::os::fd::owned::BorrowedFd<'_> impl> std::os::fd::raw::AsRawFd for aya::maps::ring_buf::RingBuf pub fn aya::maps::ring_buf::RingBuf::as_raw_fd(&self) -> std::os::fd::raw::RawFd impl core::marker::Freeze for aya::maps::ring_buf::RingBuf where T: core::marker::Freeze @@ -2152,14 +2189,55 @@ pub fn aya::maps::ring_buf::RingBuf::try_from(value: U) -> core::result::Resu impl core::convert::TryInto for aya::maps::ring_buf::RingBuf where U: core::convert::TryFrom pub type aya::maps::ring_buf::RingBuf::Error = >::Error pub fn aya::maps::ring_buf::RingBuf::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::ring_buf::RingBuf where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::ring_buf::RingBuf where T: 'static + ?core::marker::Sized pub fn aya::maps::ring_buf::RingBuf::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::ring_buf::RingBuf where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::ring_buf::RingBuf where T: ?core::marker::Sized pub fn aya::maps::ring_buf::RingBuf::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::ring_buf::RingBuf where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::ring_buf::RingBuf where T: ?core::marker::Sized pub fn aya::maps::ring_buf::RingBuf::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::ring_buf::RingBuf pub fn aya::maps::ring_buf::RingBuf::from(t: T) -> T +pub struct aya::maps::SkStorage +impl, V: aya::Pod> aya::maps::sk_storage::SkStorage +pub fn aya::maps::sk_storage::SkStorage::get(&self, socket: &impl std::os::fd::raw::AsRawFd, flags: u64) -> core::result::Result +impl, V: aya::Pod> aya::maps::sk_storage::SkStorage +pub fn aya::maps::sk_storage::SkStorage::pin>(self, path: P) -> core::result::Result<(), aya::pin::PinError> +impl, V: aya::Pod> aya::maps::sk_storage::SkStorage +pub fn aya::maps::sk_storage::SkStorage::insert(&mut self, socket: &impl std::os::fd::raw::AsRawFd, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> +pub fn aya::maps::sk_storage::SkStorage::remove(&mut self, socket: &impl std::os::fd::raw::AsRawFd) -> core::result::Result<(), aya::maps::MapError> +impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::sk_storage::SkStorage<&'a aya::maps::MapData, V> +pub type aya::maps::sk_storage::SkStorage<&'a aya::maps::MapData, V>::Error = aya::maps::MapError +pub fn aya::maps::sk_storage::SkStorage<&'a aya::maps::MapData, V>::try_from(map: &'a aya::maps::Map) -> core::result::Result +impl<'a, V: aya::Pod> core::convert::TryFrom<&'a mut aya::maps::Map> for aya::maps::sk_storage::SkStorage<&'a mut aya::maps::MapData, V> +pub type aya::maps::sk_storage::SkStorage<&'a mut aya::maps::MapData, V>::Error = aya::maps::MapError +pub fn aya::maps::sk_storage::SkStorage<&'a mut aya::maps::MapData, V>::try_from(map: &'a mut aya::maps::Map) -> core::result::Result +impl core::fmt::Debug for aya::maps::sk_storage::SkStorage +pub fn aya::maps::sk_storage::SkStorage::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::convert::TryFrom for aya::maps::sk_storage::SkStorage +pub type aya::maps::sk_storage::SkStorage::Error = aya::maps::MapError +pub fn aya::maps::sk_storage::SkStorage::try_from(map: aya::maps::Map) -> core::result::Result +impl core::marker::Freeze for aya::maps::sk_storage::SkStorage where T: core::marker::Freeze +impl core::marker::Send for aya::maps::sk_storage::SkStorage where T: core::marker::Send, V: core::marker::Send +impl core::marker::Sync for aya::maps::sk_storage::SkStorage where T: core::marker::Sync, V: core::marker::Sync +impl core::marker::Unpin for aya::maps::sk_storage::SkStorage where T: core::marker::Unpin, V: core::marker::Unpin +impl core::panic::unwind_safe::RefUnwindSafe for aya::maps::sk_storage::SkStorage where T: core::panic::unwind_safe::RefUnwindSafe, V: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::UnwindSafe for aya::maps::sk_storage::SkStorage where T: core::panic::unwind_safe::UnwindSafe, V: core::panic::unwind_safe::UnwindSafe +impl core::convert::Into for aya::maps::sk_storage::SkStorage where U: core::convert::From +pub fn aya::maps::sk_storage::SkStorage::into(self) -> U +impl core::convert::TryFrom for aya::maps::sk_storage::SkStorage where U: core::convert::Into +pub type aya::maps::sk_storage::SkStorage::Error = core::convert::Infallible +pub fn aya::maps::sk_storage::SkStorage::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::maps::sk_storage::SkStorage where U: core::convert::TryFrom +pub type aya::maps::sk_storage::SkStorage::Error = >::Error +pub fn aya::maps::sk_storage::SkStorage::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya::maps::sk_storage::SkStorage where T: 'static + ?core::marker::Sized +pub fn aya::maps::sk_storage::SkStorage::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::maps::sk_storage::SkStorage where T: ?core::marker::Sized +pub fn aya::maps::sk_storage::SkStorage::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::maps::sk_storage::SkStorage where T: ?core::marker::Sized +pub fn aya::maps::sk_storage::SkStorage::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::maps::sk_storage::SkStorage +pub fn aya::maps::sk_storage::SkStorage::from(t: T) -> T pub struct aya::maps::SockHash impl, K: aya::Pod> aya::maps::SockHash pub fn aya::maps::SockHash::fd(&self) -> &aya::maps::sock::SockMapFd @@ -2197,11 +2275,11 @@ pub fn aya::maps::SockHash::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::SockHash where U: core::convert::TryFrom pub type aya::maps::SockHash::Error = >::Error pub fn aya::maps::SockHash::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::SockHash where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::SockHash where T: 'static + ?core::marker::Sized pub fn aya::maps::SockHash::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::SockHash where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::SockHash where T: ?core::marker::Sized pub fn aya::maps::SockHash::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::SockHash where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::SockHash where T: ?core::marker::Sized pub fn aya::maps::SockHash::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::SockHash pub fn aya::maps::SockHash::from(t: T) -> T @@ -2237,11 +2315,11 @@ pub fn aya::maps::SockMap::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::SockMap where U: core::convert::TryFrom pub type aya::maps::SockMap::Error = >::Error pub fn aya::maps::SockMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::SockMap where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::SockMap where T: 'static + ?core::marker::Sized pub fn aya::maps::SockMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::SockMap where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::SockMap where T: ?core::marker::Sized pub fn aya::maps::SockMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::SockMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::SockMap where T: ?core::marker::Sized pub fn aya::maps::SockMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::SockMap pub fn aya::maps::SockMap::from(t: T) -> T @@ -2276,11 +2354,11 @@ pub fn aya::maps::stack::Stack::try_from(value: U) -> core::result::Result impl core::convert::TryInto for aya::maps::stack::Stack where U: core::convert::TryFrom pub type aya::maps::stack::Stack::Error = >::Error pub fn aya::maps::stack::Stack::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::stack::Stack where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::stack::Stack where T: 'static + ?core::marker::Sized pub fn aya::maps::stack::Stack::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::stack::Stack where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::stack::Stack where T: ?core::marker::Sized pub fn aya::maps::stack::Stack::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::stack::Stack where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::stack::Stack where T: ?core::marker::Sized pub fn aya::maps::stack::Stack::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::stack::Stack pub fn aya::maps::stack::Stack::from(t: T) -> T @@ -2325,11 +2403,11 @@ pub fn aya::maps::stack_trace::StackTraceMap::try_from(value: U) -> core::res impl core::convert::TryInto for aya::maps::stack_trace::StackTraceMap where U: core::convert::TryFrom pub type aya::maps::stack_trace::StackTraceMap::Error = >::Error pub fn aya::maps::stack_trace::StackTraceMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::stack_trace::StackTraceMap where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::stack_trace::StackTraceMap where T: 'static + ?core::marker::Sized pub fn aya::maps::stack_trace::StackTraceMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::stack_trace::StackTraceMap where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::stack_trace::StackTraceMap where T: ?core::marker::Sized pub fn aya::maps::stack_trace::StackTraceMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::stack_trace::StackTraceMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::stack_trace::StackTraceMap where T: ?core::marker::Sized pub fn aya::maps::stack_trace::StackTraceMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::stack_trace::StackTraceMap pub fn aya::maps::stack_trace::StackTraceMap::from(t: T) -> T @@ -2340,6 +2418,7 @@ impl> aya::maps::XskMap pub fn aya::maps::XskMap::pin>(self, path: P) -> core::result::Result<(), aya::pin::PinError> impl> aya::maps::XskMap pub fn aya::maps::XskMap::set(&mut self, index: u32, socket_fd: impl std::os::fd::raw::AsRawFd, flags: u64) -> core::result::Result<(), aya::maps::MapError> +pub fn aya::maps::XskMap::unset(&mut self, index: u32) -> core::result::Result<(), aya::maps::MapError> impl core::convert::TryFrom for aya::maps::XskMap pub type aya::maps::XskMap::Error = aya::maps::MapError pub fn aya::maps::XskMap::try_from(map: aya::maps::Map) -> core::result::Result @@ -2363,11 +2442,11 @@ pub fn aya::maps::XskMap::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::maps::XskMap where U: core::convert::TryFrom pub type aya::maps::XskMap::Error = >::Error pub fn aya::maps::XskMap::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::maps::XskMap where T: 'static + core::marker::Sized +impl core::any::Any for aya::maps::XskMap where T: 'static + ?core::marker::Sized pub fn aya::maps::XskMap::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::maps::XskMap where T: core::marker::Sized +impl core::borrow::Borrow for aya::maps::XskMap where T: ?core::marker::Sized pub fn aya::maps::XskMap::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::maps::XskMap where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::maps::XskMap where T: ?core::marker::Sized pub fn aya::maps::XskMap::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::XskMap pub fn aya::maps::XskMap::from(t: T) -> T @@ -2403,7 +2482,9 @@ pub aya::pin::PinError::InvalidPinPath::error: alloc::ffi::c_str::NulError pub aya::pin::PinError::InvalidPinPath::path: std::path::PathBuf pub aya::pin::PinError::NoFd pub aya::pin::PinError::NoFd::name: alloc::string::String -pub aya::pin::PinError::SyscallError(crate::sys::SyscallError) +pub aya::pin::PinError::SyscallError(aya::sys::SyscallError) +impl core::convert::From for aya::pin::PinError +pub fn aya::pin::PinError::from(source: aya::sys::SyscallError) -> Self impl core::error::Error for aya::pin::PinError pub fn aya::pin::PinError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)> impl core::fmt::Debug for aya::pin::PinError @@ -2424,13 +2505,13 @@ pub fn aya::pin::PinError::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::pin::PinError where U: core::convert::TryFrom pub type aya::pin::PinError::Error = >::Error pub fn aya::pin::PinError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya::pin::PinError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya::pin::PinError where T: core::fmt::Display + ?core::marker::Sized pub fn aya::pin::PinError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya::pin::PinError where T: 'static + core::marker::Sized +impl core::any::Any for aya::pin::PinError where T: 'static + ?core::marker::Sized pub fn aya::pin::PinError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::pin::PinError where T: core::marker::Sized +impl core::borrow::Borrow for aya::pin::PinError where T: ?core::marker::Sized pub fn aya::pin::PinError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::pin::PinError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::pin::PinError where T: ?core::marker::Sized pub fn aya::pin::PinError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::pin::PinError pub fn aya::pin::PinError::from(t: T) -> T @@ -2441,20 +2522,24 @@ pub use aya::programs::CgroupSockoptAttachType pub mod aya::programs::cgroup_device pub struct aya::programs::cgroup_device::CgroupDevice impl aya::programs::cgroup_device::CgroupDevice -pub fn aya::programs::cgroup_device::CgroupDevice::attach(&mut self, cgroup: T) -> core::result::Result -pub fn aya::programs::cgroup_device::CgroupDevice::detach(&mut self, link_id: aya::programs::cgroup_device::CgroupDeviceLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub const aya::programs::cgroup_device::CgroupDevice::PROGRAM_TYPE: aya::programs::ProgramType +pub fn aya::programs::cgroup_device::CgroupDevice::attach(&mut self, cgroup: T, mode: aya::programs::links::CgroupAttachMode) -> core::result::Result pub fn aya::programs::cgroup_device::CgroupDevice::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::cgroup_device::CgroupDevice::query(target_fd: T) -> core::result::Result, aya::programs::ProgramError> +impl aya::programs::cgroup_device::CgroupDevice +pub fn aya::programs::cgroup_device::CgroupDevice::detach(&mut self, link_id: aya::programs::cgroup_device::CgroupDeviceLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::cgroup_device::CgroupDevice::take_link(&mut self, link_id: aya::programs::cgroup_device::CgroupDeviceLinkId) -> core::result::Result impl aya::programs::cgroup_device::CgroupDevice pub fn aya::programs::cgroup_device::CgroupDevice::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::cgroup_device::CgroupDevice pub fn aya::programs::cgroup_device::CgroupDevice::from_pin>(path: P) -> core::result::Result impl aya::programs::cgroup_device::CgroupDevice +pub fn aya::programs::cgroup_device::CgroupDevice::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::cgroup_device::CgroupDevice pub fn aya::programs::cgroup_device::CgroupDevice::info(&self) -> core::result::Result impl aya::programs::cgroup_device::CgroupDevice pub fn aya::programs::cgroup_device::CgroupDevice::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::cgroup_device::CgroupDevice::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::cgroup_device::CgroupDevice::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::cgroup_device::CgroupDevice pub fn aya::programs::cgroup_device::CgroupDevice::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::cgroup_device::CgroupDevice @@ -2481,11 +2566,11 @@ pub fn aya::programs::cgroup_device::CgroupDevice::try_from(value: U) -> core::r impl core::convert::TryInto for aya::programs::cgroup_device::CgroupDevice where U: core::convert::TryFrom pub type aya::programs::cgroup_device::CgroupDevice::Error = >::Error pub fn aya::programs::cgroup_device::CgroupDevice::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_device::CgroupDevice where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_device::CgroupDevice where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_device::CgroupDevice::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_device::CgroupDevice where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_device::CgroupDevice where T: ?core::marker::Sized pub fn aya::programs::cgroup_device::CgroupDevice::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_device::CgroupDevice where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_device::CgroupDevice where T: ?core::marker::Sized pub fn aya::programs::cgroup_device::CgroupDevice::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_device::CgroupDevice pub fn aya::programs::cgroup_device::CgroupDevice::from(t: T) -> T @@ -2494,16 +2579,25 @@ impl aya::programs::links::Link for aya::programs::cgroup_device::CgroupDeviceLi pub type aya::programs::cgroup_device::CgroupDeviceLink::Id = aya::programs::cgroup_device::CgroupDeviceLinkId pub fn aya::programs::cgroup_device::CgroupDeviceLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::cgroup_device::CgroupDeviceLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::cgroup_device::CgroupDeviceLink +impl core::cmp::PartialEq for aya::programs::cgroup_device::CgroupDeviceLink +pub fn aya::programs::cgroup_device::CgroupDeviceLink::eq(&self, other: &Self) -> bool impl core::fmt::Debug for aya::programs::cgroup_device::CgroupDeviceLink pub fn aya::programs::cgroup_device::CgroupDeviceLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::cgroup_device::CgroupDeviceLink +pub fn aya::programs::cgroup_device::CgroupDeviceLink::hash(&self, state: &mut H) impl core::ops::drop::Drop for aya::programs::cgroup_device::CgroupDeviceLink pub fn aya::programs::cgroup_device::CgroupDeviceLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::cgroup_device::CgroupDeviceLinkId +pub fn aya::programs::cgroup_device::CgroupDeviceLinkId::equivalent(&self, key: &aya::programs::cgroup_device::CgroupDeviceLink) -> bool impl core::marker::Freeze for aya::programs::cgroup_device::CgroupDeviceLink impl core::marker::Send for aya::programs::cgroup_device::CgroupDeviceLink impl core::marker::Sync for aya::programs::cgroup_device::CgroupDeviceLink impl core::marker::Unpin for aya::programs::cgroup_device::CgroupDeviceLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::cgroup_device::CgroupDeviceLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::cgroup_device::CgroupDeviceLink +impl equivalent::Equivalent for aya::programs::cgroup_device::CgroupDeviceLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::cgroup_device::CgroupDeviceLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::cgroup_device::CgroupDeviceLink where U: core::convert::From pub fn aya::programs::cgroup_device::CgroupDeviceLink::into(self) -> U impl core::convert::TryFrom for aya::programs::cgroup_device::CgroupDeviceLink where U: core::convert::Into @@ -2512,11 +2606,11 @@ pub fn aya::programs::cgroup_device::CgroupDeviceLink::try_from(value: U) -> cor impl core::convert::TryInto for aya::programs::cgroup_device::CgroupDeviceLink where U: core::convert::TryFrom pub type aya::programs::cgroup_device::CgroupDeviceLink::Error = >::Error pub fn aya::programs::cgroup_device::CgroupDeviceLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_device::CgroupDeviceLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_device::CgroupDeviceLink where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_device::CgroupDeviceLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_device::CgroupDeviceLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_device::CgroupDeviceLink where T: ?core::marker::Sized pub fn aya::programs::cgroup_device::CgroupDeviceLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_device::CgroupDeviceLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_device::CgroupDeviceLink where T: ?core::marker::Sized pub fn aya::programs::cgroup_device::CgroupDeviceLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_device::CgroupDeviceLink pub fn aya::programs::cgroup_device::CgroupDeviceLink::from(t: T) -> T @@ -2529,15 +2623,15 @@ pub fn aya::programs::cgroup_device::CgroupDeviceLinkId::fmt(&self, f: &mut core impl core::hash::Hash for aya::programs::cgroup_device::CgroupDeviceLinkId pub fn aya::programs::cgroup_device::CgroupDeviceLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::cgroup_device::CgroupDeviceLinkId +impl equivalent::Equivalent for aya::programs::cgroup_device::CgroupDeviceLinkId +pub fn aya::programs::cgroup_device::CgroupDeviceLinkId::equivalent(&self, key: &aya::programs::cgroup_device::CgroupDeviceLink) -> bool impl core::marker::Freeze for aya::programs::cgroup_device::CgroupDeviceLinkId impl core::marker::Send for aya::programs::cgroup_device::CgroupDeviceLinkId impl core::marker::Sync for aya::programs::cgroup_device::CgroupDeviceLinkId impl core::marker::Unpin for aya::programs::cgroup_device::CgroupDeviceLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::cgroup_device::CgroupDeviceLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::cgroup_device::CgroupDeviceLinkId -impl equivalent::Equivalent for aya::programs::cgroup_device::CgroupDeviceLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::cgroup_device::CgroupDeviceLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::cgroup_device::CgroupDeviceLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::cgroup_device::CgroupDeviceLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::cgroup_device::CgroupDeviceLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::cgroup_device::CgroupDeviceLinkId where U: core::convert::From pub fn aya::programs::cgroup_device::CgroupDeviceLinkId::into(self) -> U @@ -2547,11 +2641,11 @@ pub fn aya::programs::cgroup_device::CgroupDeviceLinkId::try_from(value: U) -> c impl core::convert::TryInto for aya::programs::cgroup_device::CgroupDeviceLinkId where U: core::convert::TryFrom pub type aya::programs::cgroup_device::CgroupDeviceLinkId::Error = >::Error pub fn aya::programs::cgroup_device::CgroupDeviceLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_device::CgroupDeviceLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_device::CgroupDeviceLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_device::CgroupDeviceLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_device::CgroupDeviceLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_device::CgroupDeviceLinkId where T: ?core::marker::Sized pub fn aya::programs::cgroup_device::CgroupDeviceLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_device::CgroupDeviceLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_device::CgroupDeviceLinkId where T: ?core::marker::Sized pub fn aya::programs::cgroup_device::CgroupDeviceLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_device::CgroupDeviceLinkId pub fn aya::programs::cgroup_device::CgroupDeviceLinkId::from(t: T) -> T @@ -2582,29 +2676,35 @@ impl alloc::borrow::ToOwned for aya::programs::cgroup_skb::CgroupSkbAttachTyp pub type aya::programs::cgroup_skb::CgroupSkbAttachType::Owned = T pub fn aya::programs::cgroup_skb::CgroupSkbAttachType::clone_into(&self, target: &mut T) pub fn aya::programs::cgroup_skb::CgroupSkbAttachType::to_owned(&self) -> T -impl core::any::Any for aya::programs::cgroup_skb::CgroupSkbAttachType where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_skb::CgroupSkbAttachType where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_skb::CgroupSkbAttachType::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_skb::CgroupSkbAttachType where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_skb::CgroupSkbAttachType where T: ?core::marker::Sized pub fn aya::programs::cgroup_skb::CgroupSkbAttachType::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_skb::CgroupSkbAttachType where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_skb::CgroupSkbAttachType where T: ?core::marker::Sized pub fn aya::programs::cgroup_skb::CgroupSkbAttachType::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::programs::cgroup_skb::CgroupSkbAttachType where T: core::clone::Clone +pub unsafe fn aya::programs::cgroup_skb::CgroupSkbAttachType::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya::programs::cgroup_skb::CgroupSkbAttachType pub fn aya::programs::cgroup_skb::CgroupSkbAttachType::from(t: T) -> T pub struct aya::programs::cgroup_skb::CgroupSkb impl aya::programs::cgroup_skb::CgroupSkb -pub fn aya::programs::cgroup_skb::CgroupSkb::attach(&mut self, cgroup: T, attach_type: aya::programs::cgroup_skb::CgroupSkbAttachType) -> core::result::Result -pub fn aya::programs::cgroup_skb::CgroupSkb::detach(&mut self, link_id: aya::programs::cgroup_skb::CgroupSkbLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub const aya::programs::cgroup_skb::CgroupSkb::PROGRAM_TYPE: aya::programs::ProgramType +pub fn aya::programs::cgroup_skb::CgroupSkb::attach(&mut self, cgroup: T, attach_type: aya::programs::cgroup_skb::CgroupSkbAttachType, mode: aya::programs::links::CgroupAttachMode) -> core::result::Result pub fn aya::programs::cgroup_skb::CgroupSkb::expected_attach_type(&self) -> &core::option::Option pub fn aya::programs::cgroup_skb::CgroupSkb::from_pin>(path: P, expected_attach_type: aya::programs::cgroup_skb::CgroupSkbAttachType) -> core::result::Result pub fn aya::programs::cgroup_skb::CgroupSkb::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::cgroup_skb::CgroupSkb +pub fn aya::programs::cgroup_skb::CgroupSkb::detach(&mut self, link_id: aya::programs::cgroup_skb::CgroupSkbLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::cgroup_skb::CgroupSkb::take_link(&mut self, link_id: aya::programs::cgroup_skb::CgroupSkbLinkId) -> core::result::Result impl aya::programs::cgroup_skb::CgroupSkb pub fn aya::programs::cgroup_skb::CgroupSkb::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::cgroup_skb::CgroupSkb +pub fn aya::programs::cgroup_skb::CgroupSkb::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>, attach_type: core::option::Option) -> core::result::Result +impl aya::programs::cgroup_skb::CgroupSkb pub fn aya::programs::cgroup_skb::CgroupSkb::info(&self) -> core::result::Result impl aya::programs::cgroup_skb::CgroupSkb pub fn aya::programs::cgroup_skb::CgroupSkb::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::cgroup_skb::CgroupSkb::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::cgroup_skb::CgroupSkb::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::cgroup_skb::CgroupSkb pub fn aya::programs::cgroup_skb::CgroupSkb::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::cgroup_skb::CgroupSkb @@ -2631,11 +2731,11 @@ pub fn aya::programs::cgroup_skb::CgroupSkb::try_from(value: U) -> core::result: impl core::convert::TryInto for aya::programs::cgroup_skb::CgroupSkb where U: core::convert::TryFrom pub type aya::programs::cgroup_skb::CgroupSkb::Error = >::Error pub fn aya::programs::cgroup_skb::CgroupSkb::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_skb::CgroupSkb where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_skb::CgroupSkb where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_skb::CgroupSkb::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_skb::CgroupSkb where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_skb::CgroupSkb where T: ?core::marker::Sized pub fn aya::programs::cgroup_skb::CgroupSkb::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_skb::CgroupSkb where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_skb::CgroupSkb where T: ?core::marker::Sized pub fn aya::programs::cgroup_skb::CgroupSkb::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_skb::CgroupSkb pub fn aya::programs::cgroup_skb::CgroupSkb::from(t: T) -> T @@ -2644,16 +2744,28 @@ impl aya::programs::links::Link for aya::programs::cgroup_skb::CgroupSkbLink pub type aya::programs::cgroup_skb::CgroupSkbLink::Id = aya::programs::cgroup_skb::CgroupSkbLinkId pub fn aya::programs::cgroup_skb::CgroupSkbLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::cgroup_skb::CgroupSkbLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::cgroup_skb::CgroupSkbLink +impl core::cmp::PartialEq for aya::programs::cgroup_skb::CgroupSkbLink +pub fn aya::programs::cgroup_skb::CgroupSkbLink::eq(&self, other: &Self) -> bool +impl core::convert::TryFrom for aya::programs::links::FdLink +pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError +pub fn aya::programs::links::FdLink::try_from(value: aya::programs::cgroup_skb::CgroupSkbLink) -> core::result::Result impl core::fmt::Debug for aya::programs::cgroup_skb::CgroupSkbLink pub fn aya::programs::cgroup_skb::CgroupSkbLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::cgroup_skb::CgroupSkbLink +pub fn aya::programs::cgroup_skb::CgroupSkbLink::hash(&self, state: &mut H) impl core::ops::drop::Drop for aya::programs::cgroup_skb::CgroupSkbLink pub fn aya::programs::cgroup_skb::CgroupSkbLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::cgroup_skb::CgroupSkbLinkId +pub fn aya::programs::cgroup_skb::CgroupSkbLinkId::equivalent(&self, key: &aya::programs::cgroup_skb::CgroupSkbLink) -> bool impl core::marker::Freeze for aya::programs::cgroup_skb::CgroupSkbLink impl core::marker::Send for aya::programs::cgroup_skb::CgroupSkbLink impl core::marker::Sync for aya::programs::cgroup_skb::CgroupSkbLink impl core::marker::Unpin for aya::programs::cgroup_skb::CgroupSkbLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::cgroup_skb::CgroupSkbLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::cgroup_skb::CgroupSkbLink +impl equivalent::Equivalent for aya::programs::cgroup_skb::CgroupSkbLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::cgroup_skb::CgroupSkbLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::cgroup_skb::CgroupSkbLink where U: core::convert::From pub fn aya::programs::cgroup_skb::CgroupSkbLink::into(self) -> U impl core::convert::TryFrom for aya::programs::cgroup_skb::CgroupSkbLink where U: core::convert::Into @@ -2662,11 +2774,11 @@ pub fn aya::programs::cgroup_skb::CgroupSkbLink::try_from(value: U) -> core::res impl core::convert::TryInto for aya::programs::cgroup_skb::CgroupSkbLink where U: core::convert::TryFrom pub type aya::programs::cgroup_skb::CgroupSkbLink::Error = >::Error pub fn aya::programs::cgroup_skb::CgroupSkbLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_skb::CgroupSkbLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_skb::CgroupSkbLink where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_skb::CgroupSkbLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_skb::CgroupSkbLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_skb::CgroupSkbLink where T: ?core::marker::Sized pub fn aya::programs::cgroup_skb::CgroupSkbLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_skb::CgroupSkbLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_skb::CgroupSkbLink where T: ?core::marker::Sized pub fn aya::programs::cgroup_skb::CgroupSkbLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_skb::CgroupSkbLink pub fn aya::programs::cgroup_skb::CgroupSkbLink::from(t: T) -> T @@ -2679,15 +2791,15 @@ pub fn aya::programs::cgroup_skb::CgroupSkbLinkId::fmt(&self, f: &mut core::fmt: impl core::hash::Hash for aya::programs::cgroup_skb::CgroupSkbLinkId pub fn aya::programs::cgroup_skb::CgroupSkbLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::cgroup_skb::CgroupSkbLinkId +impl equivalent::Equivalent for aya::programs::cgroup_skb::CgroupSkbLinkId +pub fn aya::programs::cgroup_skb::CgroupSkbLinkId::equivalent(&self, key: &aya::programs::cgroup_skb::CgroupSkbLink) -> bool impl core::marker::Freeze for aya::programs::cgroup_skb::CgroupSkbLinkId impl core::marker::Send for aya::programs::cgroup_skb::CgroupSkbLinkId impl core::marker::Sync for aya::programs::cgroup_skb::CgroupSkbLinkId impl core::marker::Unpin for aya::programs::cgroup_skb::CgroupSkbLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::cgroup_skb::CgroupSkbLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::cgroup_skb::CgroupSkbLinkId -impl equivalent::Equivalent for aya::programs::cgroup_skb::CgroupSkbLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::cgroup_skb::CgroupSkbLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::cgroup_skb::CgroupSkbLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::cgroup_skb::CgroupSkbLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::cgroup_skb::CgroupSkbLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::cgroup_skb::CgroupSkbLinkId where U: core::convert::From pub fn aya::programs::cgroup_skb::CgroupSkbLinkId::into(self) -> U @@ -2697,11 +2809,11 @@ pub fn aya::programs::cgroup_skb::CgroupSkbLinkId::try_from(value: U) -> core::r impl core::convert::TryInto for aya::programs::cgroup_skb::CgroupSkbLinkId where U: core::convert::TryFrom pub type aya::programs::cgroup_skb::CgroupSkbLinkId::Error = >::Error pub fn aya::programs::cgroup_skb::CgroupSkbLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_skb::CgroupSkbLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_skb::CgroupSkbLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_skb::CgroupSkbLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_skb::CgroupSkbLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_skb::CgroupSkbLinkId where T: ?core::marker::Sized pub fn aya::programs::cgroup_skb::CgroupSkbLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_skb::CgroupSkbLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_skb::CgroupSkbLinkId where T: ?core::marker::Sized pub fn aya::programs::cgroup_skb::CgroupSkbLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_skb::CgroupSkbLinkId pub fn aya::programs::cgroup_skb::CgroupSkbLinkId::from(t: T) -> T @@ -2709,10 +2821,12 @@ pub mod aya::programs::cgroup_sock pub use aya::programs::cgroup_sock::CgroupSockAttachType pub struct aya::programs::cgroup_sock::CgroupSock impl aya::programs::cgroup_sock::CgroupSock -pub fn aya::programs::cgroup_sock::CgroupSock::attach(&mut self, cgroup: T) -> core::result::Result -pub fn aya::programs::cgroup_sock::CgroupSock::detach(&mut self, link_id: aya::programs::cgroup_sock::CgroupSockLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub const aya::programs::cgroup_sock::CgroupSock::PROGRAM_TYPE: aya::programs::ProgramType +pub fn aya::programs::cgroup_sock::CgroupSock::attach(&mut self, cgroup: T, mode: aya::programs::links::CgroupAttachMode) -> core::result::Result pub fn aya::programs::cgroup_sock::CgroupSock::from_pin>(path: P, attach_type: aya_obj::programs::cgroup_sock::CgroupSockAttachType) -> core::result::Result pub fn aya::programs::cgroup_sock::CgroupSock::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::cgroup_sock::CgroupSock +pub fn aya::programs::cgroup_sock::CgroupSock::detach(&mut self, link_id: aya::programs::cgroup_sock::CgroupSockLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::cgroup_sock::CgroupSock::take_link(&mut self, link_id: aya::programs::cgroup_sock::CgroupSockLinkId) -> core::result::Result impl aya::programs::cgroup_sock::CgroupSock pub fn aya::programs::cgroup_sock::CgroupSock::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> @@ -2720,7 +2834,7 @@ impl aya::programs::cgroup_sock::CgroupSock pub fn aya::programs::cgroup_sock::CgroupSock::info(&self) -> core::result::Result impl aya::programs::cgroup_sock::CgroupSock pub fn aya::programs::cgroup_sock::CgroupSock::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::cgroup_sock::CgroupSock::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::cgroup_sock::CgroupSock::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::cgroup_sock::CgroupSock pub fn aya::programs::cgroup_sock::CgroupSock::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::cgroup_sock::CgroupSock @@ -2747,11 +2861,11 @@ pub fn aya::programs::cgroup_sock::CgroupSock::try_from(value: U) -> core::resul impl core::convert::TryInto for aya::programs::cgroup_sock::CgroupSock where U: core::convert::TryFrom pub type aya::programs::cgroup_sock::CgroupSock::Error = >::Error pub fn aya::programs::cgroup_sock::CgroupSock::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_sock::CgroupSock where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_sock::CgroupSock where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_sock::CgroupSock::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_sock::CgroupSock where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_sock::CgroupSock where T: ?core::marker::Sized pub fn aya::programs::cgroup_sock::CgroupSock::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_sock::CgroupSock where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_sock::CgroupSock where T: ?core::marker::Sized pub fn aya::programs::cgroup_sock::CgroupSock::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_sock::CgroupSock pub fn aya::programs::cgroup_sock::CgroupSock::from(t: T) -> T @@ -2760,16 +2874,28 @@ impl aya::programs::links::Link for aya::programs::cgroup_sock::CgroupSockLink pub type aya::programs::cgroup_sock::CgroupSockLink::Id = aya::programs::cgroup_sock::CgroupSockLinkId pub fn aya::programs::cgroup_sock::CgroupSockLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::cgroup_sock::CgroupSockLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::cgroup_sock::CgroupSockLink +impl core::cmp::PartialEq for aya::programs::cgroup_sock::CgroupSockLink +pub fn aya::programs::cgroup_sock::CgroupSockLink::eq(&self, other: &Self) -> bool +impl core::convert::TryFrom for aya::programs::links::FdLink +pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError +pub fn aya::programs::links::FdLink::try_from(value: aya::programs::cgroup_sock::CgroupSockLink) -> core::result::Result impl core::fmt::Debug for aya::programs::cgroup_sock::CgroupSockLink pub fn aya::programs::cgroup_sock::CgroupSockLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::cgroup_sock::CgroupSockLink +pub fn aya::programs::cgroup_sock::CgroupSockLink::hash(&self, state: &mut H) impl core::ops::drop::Drop for aya::programs::cgroup_sock::CgroupSockLink pub fn aya::programs::cgroup_sock::CgroupSockLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::cgroup_sock::CgroupSockLinkId +pub fn aya::programs::cgroup_sock::CgroupSockLinkId::equivalent(&self, key: &aya::programs::cgroup_sock::CgroupSockLink) -> bool impl core::marker::Freeze for aya::programs::cgroup_sock::CgroupSockLink impl core::marker::Send for aya::programs::cgroup_sock::CgroupSockLink impl core::marker::Sync for aya::programs::cgroup_sock::CgroupSockLink impl core::marker::Unpin for aya::programs::cgroup_sock::CgroupSockLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::cgroup_sock::CgroupSockLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::cgroup_sock::CgroupSockLink +impl equivalent::Equivalent for aya::programs::cgroup_sock::CgroupSockLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::cgroup_sock::CgroupSockLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::cgroup_sock::CgroupSockLink where U: core::convert::From pub fn aya::programs::cgroup_sock::CgroupSockLink::into(self) -> U impl core::convert::TryFrom for aya::programs::cgroup_sock::CgroupSockLink where U: core::convert::Into @@ -2778,11 +2904,11 @@ pub fn aya::programs::cgroup_sock::CgroupSockLink::try_from(value: U) -> core::r impl core::convert::TryInto for aya::programs::cgroup_sock::CgroupSockLink where U: core::convert::TryFrom pub type aya::programs::cgroup_sock::CgroupSockLink::Error = >::Error pub fn aya::programs::cgroup_sock::CgroupSockLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_sock::CgroupSockLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_sock::CgroupSockLink where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_sock::CgroupSockLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_sock::CgroupSockLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_sock::CgroupSockLink where T: ?core::marker::Sized pub fn aya::programs::cgroup_sock::CgroupSockLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_sock::CgroupSockLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_sock::CgroupSockLink where T: ?core::marker::Sized pub fn aya::programs::cgroup_sock::CgroupSockLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_sock::CgroupSockLink pub fn aya::programs::cgroup_sock::CgroupSockLink::from(t: T) -> T @@ -2795,15 +2921,15 @@ pub fn aya::programs::cgroup_sock::CgroupSockLinkId::fmt(&self, f: &mut core::fm impl core::hash::Hash for aya::programs::cgroup_sock::CgroupSockLinkId pub fn aya::programs::cgroup_sock::CgroupSockLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::cgroup_sock::CgroupSockLinkId +impl equivalent::Equivalent for aya::programs::cgroup_sock::CgroupSockLinkId +pub fn aya::programs::cgroup_sock::CgroupSockLinkId::equivalent(&self, key: &aya::programs::cgroup_sock::CgroupSockLink) -> bool impl core::marker::Freeze for aya::programs::cgroup_sock::CgroupSockLinkId impl core::marker::Send for aya::programs::cgroup_sock::CgroupSockLinkId impl core::marker::Sync for aya::programs::cgroup_sock::CgroupSockLinkId impl core::marker::Unpin for aya::programs::cgroup_sock::CgroupSockLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::cgroup_sock::CgroupSockLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::cgroup_sock::CgroupSockLinkId -impl equivalent::Equivalent for aya::programs::cgroup_sock::CgroupSockLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::cgroup_sock::CgroupSockLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::cgroup_sock::CgroupSockLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::cgroup_sock::CgroupSockLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::cgroup_sock::CgroupSockLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::cgroup_sock::CgroupSockLinkId where U: core::convert::From pub fn aya::programs::cgroup_sock::CgroupSockLinkId::into(self) -> U @@ -2813,11 +2939,11 @@ pub fn aya::programs::cgroup_sock::CgroupSockLinkId::try_from(value: U) -> core: impl core::convert::TryInto for aya::programs::cgroup_sock::CgroupSockLinkId where U: core::convert::TryFrom pub type aya::programs::cgroup_sock::CgroupSockLinkId::Error = >::Error pub fn aya::programs::cgroup_sock::CgroupSockLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_sock::CgroupSockLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_sock::CgroupSockLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_sock::CgroupSockLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_sock::CgroupSockLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_sock::CgroupSockLinkId where T: ?core::marker::Sized pub fn aya::programs::cgroup_sock::CgroupSockLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_sock::CgroupSockLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_sock::CgroupSockLinkId where T: ?core::marker::Sized pub fn aya::programs::cgroup_sock::CgroupSockLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_sock::CgroupSockLinkId pub fn aya::programs::cgroup_sock::CgroupSockLinkId::from(t: T) -> T @@ -2825,10 +2951,12 @@ pub mod aya::programs::cgroup_sock_addr pub use aya::programs::cgroup_sock_addr::CgroupSockAddrAttachType pub struct aya::programs::cgroup_sock_addr::CgroupSockAddr impl aya::programs::cgroup_sock_addr::CgroupSockAddr -pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::attach(&mut self, cgroup: T) -> core::result::Result -pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::detach(&mut self, link_id: aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub const aya::programs::cgroup_sock_addr::CgroupSockAddr::PROGRAM_TYPE: aya::programs::ProgramType +pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::attach(&mut self, cgroup: T, mode: aya::programs::links::CgroupAttachMode) -> core::result::Result pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::from_pin>(path: P, attach_type: aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType) -> core::result::Result pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::cgroup_sock_addr::CgroupSockAddr +pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::detach(&mut self, link_id: aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::take_link(&mut self, link_id: aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId) -> core::result::Result impl aya::programs::cgroup_sock_addr::CgroupSockAddr pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> @@ -2836,7 +2964,7 @@ impl aya::programs::cgroup_sock_addr::CgroupSockAddr pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::info(&self) -> core::result::Result impl aya::programs::cgroup_sock_addr::CgroupSockAddr pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::cgroup_sock_addr::CgroupSockAddr pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::cgroup_sock_addr::CgroupSockAddr @@ -2863,11 +2991,11 @@ pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::try_from(value: U) -> co impl core::convert::TryInto for aya::programs::cgroup_sock_addr::CgroupSockAddr where U: core::convert::TryFrom pub type aya::programs::cgroup_sock_addr::CgroupSockAddr::Error = >::Error pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_sock_addr::CgroupSockAddr where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_sock_addr::CgroupSockAddr where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_sock_addr::CgroupSockAddr where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_sock_addr::CgroupSockAddr where T: ?core::marker::Sized pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_sock_addr::CgroupSockAddr where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_sock_addr::CgroupSockAddr where T: ?core::marker::Sized pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_sock_addr::CgroupSockAddr pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::from(t: T) -> T @@ -2876,16 +3004,28 @@ impl aya::programs::links::Link for aya::programs::cgroup_sock_addr::CgroupSockA pub type aya::programs::cgroup_sock_addr::CgroupSockAddrLink::Id = aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::cgroup_sock_addr::CgroupSockAddrLink +impl core::cmp::PartialEq for aya::programs::cgroup_sock_addr::CgroupSockAddrLink +pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLink::eq(&self, other: &Self) -> bool +impl core::convert::TryFrom for aya::programs::links::FdLink +pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError +pub fn aya::programs::links::FdLink::try_from(value: aya::programs::cgroup_sock_addr::CgroupSockAddrLink) -> core::result::Result impl core::fmt::Debug for aya::programs::cgroup_sock_addr::CgroupSockAddrLink pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::cgroup_sock_addr::CgroupSockAddrLink +pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLink::hash(&self, state: &mut H) impl core::ops::drop::Drop for aya::programs::cgroup_sock_addr::CgroupSockAddrLink pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId +pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId::equivalent(&self, key: &aya::programs::cgroup_sock_addr::CgroupSockAddrLink) -> bool impl core::marker::Freeze for aya::programs::cgroup_sock_addr::CgroupSockAddrLink impl core::marker::Send for aya::programs::cgroup_sock_addr::CgroupSockAddrLink impl core::marker::Sync for aya::programs::cgroup_sock_addr::CgroupSockAddrLink impl core::marker::Unpin for aya::programs::cgroup_sock_addr::CgroupSockAddrLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::cgroup_sock_addr::CgroupSockAddrLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::cgroup_sock_addr::CgroupSockAddrLink +impl equivalent::Equivalent for aya::programs::cgroup_sock_addr::CgroupSockAddrLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::cgroup_sock_addr::CgroupSockAddrLink where U: core::convert::From pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLink::into(self) -> U impl core::convert::TryFrom for aya::programs::cgroup_sock_addr::CgroupSockAddrLink where U: core::convert::Into @@ -2894,11 +3034,11 @@ pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLink::try_from(value: U) - impl core::convert::TryInto for aya::programs::cgroup_sock_addr::CgroupSockAddrLink where U: core::convert::TryFrom pub type aya::programs::cgroup_sock_addr::CgroupSockAddrLink::Error = >::Error pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_sock_addr::CgroupSockAddrLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_sock_addr::CgroupSockAddrLink where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_sock_addr::CgroupSockAddrLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_sock_addr::CgroupSockAddrLink where T: ?core::marker::Sized pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_sock_addr::CgroupSockAddrLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_sock_addr::CgroupSockAddrLink where T: ?core::marker::Sized pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_sock_addr::CgroupSockAddrLink pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLink::from(t: T) -> T @@ -2911,15 +3051,15 @@ pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId::fmt(&self, f: &mut impl core::hash::Hash for aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId +impl equivalent::Equivalent for aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId +pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId::equivalent(&self, key: &aya::programs::cgroup_sock_addr::CgroupSockAddrLink) -> bool impl core::marker::Freeze for aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId impl core::marker::Send for aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId impl core::marker::Sync for aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId impl core::marker::Unpin for aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId -impl equivalent::Equivalent for aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId where U: core::convert::From pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId::into(self) -> U @@ -2929,11 +3069,11 @@ pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId::try_from(value: U) impl core::convert::TryInto for aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId where U: core::convert::TryFrom pub type aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId::Error = >::Error pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId where T: ?core::marker::Sized pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId where T: ?core::marker::Sized pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId pub fn aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId::from(t: T) -> T @@ -2941,18 +3081,22 @@ pub mod aya::programs::cgroup_sockopt pub use aya::programs::cgroup_sockopt::CgroupSockoptAttachType pub struct aya::programs::cgroup_sockopt::CgroupSockopt impl aya::programs::cgroup_sockopt::CgroupSockopt -pub fn aya::programs::cgroup_sockopt::CgroupSockopt::attach(&mut self, cgroup: T) -> core::result::Result -pub fn aya::programs::cgroup_sockopt::CgroupSockopt::detach(&mut self, link_id: aya::programs::cgroup_sockopt::CgroupSockoptLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub const aya::programs::cgroup_sockopt::CgroupSockopt::PROGRAM_TYPE: aya::programs::ProgramType +pub fn aya::programs::cgroup_sockopt::CgroupSockopt::attach(&mut self, cgroup: T, mode: aya::programs::links::CgroupAttachMode) -> core::result::Result pub fn aya::programs::cgroup_sockopt::CgroupSockopt::from_pin>(path: P, attach_type: aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType) -> core::result::Result pub fn aya::programs::cgroup_sockopt::CgroupSockopt::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::cgroup_sockopt::CgroupSockopt +pub fn aya::programs::cgroup_sockopt::CgroupSockopt::detach(&mut self, link_id: aya::programs::cgroup_sockopt::CgroupSockoptLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::cgroup_sockopt::CgroupSockopt::take_link(&mut self, link_id: aya::programs::cgroup_sockopt::CgroupSockoptLinkId) -> core::result::Result impl aya::programs::cgroup_sockopt::CgroupSockopt pub fn aya::programs::cgroup_sockopt::CgroupSockopt::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::cgroup_sockopt::CgroupSockopt +pub fn aya::programs::cgroup_sockopt::CgroupSockopt::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>, attach_type: aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType) -> core::result::Result +impl aya::programs::cgroup_sockopt::CgroupSockopt pub fn aya::programs::cgroup_sockopt::CgroupSockopt::info(&self) -> core::result::Result impl aya::programs::cgroup_sockopt::CgroupSockopt pub fn aya::programs::cgroup_sockopt::CgroupSockopt::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::cgroup_sockopt::CgroupSockopt::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::cgroup_sockopt::CgroupSockopt::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::cgroup_sockopt::CgroupSockopt pub fn aya::programs::cgroup_sockopt::CgroupSockopt::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::cgroup_sockopt::CgroupSockopt @@ -2979,11 +3123,11 @@ pub fn aya::programs::cgroup_sockopt::CgroupSockopt::try_from(value: U) -> core: impl core::convert::TryInto for aya::programs::cgroup_sockopt::CgroupSockopt where U: core::convert::TryFrom pub type aya::programs::cgroup_sockopt::CgroupSockopt::Error = >::Error pub fn aya::programs::cgroup_sockopt::CgroupSockopt::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_sockopt::CgroupSockopt where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_sockopt::CgroupSockopt where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_sockopt::CgroupSockopt::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_sockopt::CgroupSockopt where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_sockopt::CgroupSockopt where T: ?core::marker::Sized pub fn aya::programs::cgroup_sockopt::CgroupSockopt::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_sockopt::CgroupSockopt where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_sockopt::CgroupSockopt where T: ?core::marker::Sized pub fn aya::programs::cgroup_sockopt::CgroupSockopt::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_sockopt::CgroupSockopt pub fn aya::programs::cgroup_sockopt::CgroupSockopt::from(t: T) -> T @@ -2992,16 +3136,25 @@ impl aya::programs::links::Link for aya::programs::cgroup_sockopt::CgroupSockopt pub type aya::programs::cgroup_sockopt::CgroupSockoptLink::Id = aya::programs::cgroup_sockopt::CgroupSockoptLinkId pub fn aya::programs::cgroup_sockopt::CgroupSockoptLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::cgroup_sockopt::CgroupSockoptLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::cgroup_sockopt::CgroupSockoptLink +impl core::cmp::PartialEq for aya::programs::cgroup_sockopt::CgroupSockoptLink +pub fn aya::programs::cgroup_sockopt::CgroupSockoptLink::eq(&self, other: &Self) -> bool impl core::fmt::Debug for aya::programs::cgroup_sockopt::CgroupSockoptLink pub fn aya::programs::cgroup_sockopt::CgroupSockoptLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::cgroup_sockopt::CgroupSockoptLink +pub fn aya::programs::cgroup_sockopt::CgroupSockoptLink::hash(&self, state: &mut H) impl core::ops::drop::Drop for aya::programs::cgroup_sockopt::CgroupSockoptLink pub fn aya::programs::cgroup_sockopt::CgroupSockoptLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::cgroup_sockopt::CgroupSockoptLinkId +pub fn aya::programs::cgroup_sockopt::CgroupSockoptLinkId::equivalent(&self, key: &aya::programs::cgroup_sockopt::CgroupSockoptLink) -> bool impl core::marker::Freeze for aya::programs::cgroup_sockopt::CgroupSockoptLink impl core::marker::Send for aya::programs::cgroup_sockopt::CgroupSockoptLink impl core::marker::Sync for aya::programs::cgroup_sockopt::CgroupSockoptLink impl core::marker::Unpin for aya::programs::cgroup_sockopt::CgroupSockoptLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::cgroup_sockopt::CgroupSockoptLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::cgroup_sockopt::CgroupSockoptLink +impl equivalent::Equivalent for aya::programs::cgroup_sockopt::CgroupSockoptLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::cgroup_sockopt::CgroupSockoptLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::cgroup_sockopt::CgroupSockoptLink where U: core::convert::From pub fn aya::programs::cgroup_sockopt::CgroupSockoptLink::into(self) -> U impl core::convert::TryFrom for aya::programs::cgroup_sockopt::CgroupSockoptLink where U: core::convert::Into @@ -3010,11 +3163,11 @@ pub fn aya::programs::cgroup_sockopt::CgroupSockoptLink::try_from(value: U) -> c impl core::convert::TryInto for aya::programs::cgroup_sockopt::CgroupSockoptLink where U: core::convert::TryFrom pub type aya::programs::cgroup_sockopt::CgroupSockoptLink::Error = >::Error pub fn aya::programs::cgroup_sockopt::CgroupSockoptLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_sockopt::CgroupSockoptLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_sockopt::CgroupSockoptLink where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_sockopt::CgroupSockoptLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_sockopt::CgroupSockoptLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_sockopt::CgroupSockoptLink where T: ?core::marker::Sized pub fn aya::programs::cgroup_sockopt::CgroupSockoptLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_sockopt::CgroupSockoptLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_sockopt::CgroupSockoptLink where T: ?core::marker::Sized pub fn aya::programs::cgroup_sockopt::CgroupSockoptLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_sockopt::CgroupSockoptLink pub fn aya::programs::cgroup_sockopt::CgroupSockoptLink::from(t: T) -> T @@ -3027,15 +3180,15 @@ pub fn aya::programs::cgroup_sockopt::CgroupSockoptLinkId::fmt(&self, f: &mut co impl core::hash::Hash for aya::programs::cgroup_sockopt::CgroupSockoptLinkId pub fn aya::programs::cgroup_sockopt::CgroupSockoptLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::cgroup_sockopt::CgroupSockoptLinkId +impl equivalent::Equivalent for aya::programs::cgroup_sockopt::CgroupSockoptLinkId +pub fn aya::programs::cgroup_sockopt::CgroupSockoptLinkId::equivalent(&self, key: &aya::programs::cgroup_sockopt::CgroupSockoptLink) -> bool impl core::marker::Freeze for aya::programs::cgroup_sockopt::CgroupSockoptLinkId impl core::marker::Send for aya::programs::cgroup_sockopt::CgroupSockoptLinkId impl core::marker::Sync for aya::programs::cgroup_sockopt::CgroupSockoptLinkId impl core::marker::Unpin for aya::programs::cgroup_sockopt::CgroupSockoptLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::cgroup_sockopt::CgroupSockoptLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::cgroup_sockopt::CgroupSockoptLinkId -impl equivalent::Equivalent for aya::programs::cgroup_sockopt::CgroupSockoptLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::cgroup_sockopt::CgroupSockoptLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::cgroup_sockopt::CgroupSockoptLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::cgroup_sockopt::CgroupSockoptLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::cgroup_sockopt::CgroupSockoptLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::cgroup_sockopt::CgroupSockoptLinkId where U: core::convert::From pub fn aya::programs::cgroup_sockopt::CgroupSockoptLinkId::into(self) -> U @@ -3045,30 +3198,34 @@ pub fn aya::programs::cgroup_sockopt::CgroupSockoptLinkId::try_from(value: U) -> impl core::convert::TryInto for aya::programs::cgroup_sockopt::CgroupSockoptLinkId where U: core::convert::TryFrom pub type aya::programs::cgroup_sockopt::CgroupSockoptLinkId::Error = >::Error pub fn aya::programs::cgroup_sockopt::CgroupSockoptLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_sockopt::CgroupSockoptLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_sockopt::CgroupSockoptLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_sockopt::CgroupSockoptLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_sockopt::CgroupSockoptLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_sockopt::CgroupSockoptLinkId where T: ?core::marker::Sized pub fn aya::programs::cgroup_sockopt::CgroupSockoptLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_sockopt::CgroupSockoptLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_sockopt::CgroupSockoptLinkId where T: ?core::marker::Sized pub fn aya::programs::cgroup_sockopt::CgroupSockoptLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_sockopt::CgroupSockoptLinkId pub fn aya::programs::cgroup_sockopt::CgroupSockoptLinkId::from(t: T) -> T pub mod aya::programs::cgroup_sysctl pub struct aya::programs::cgroup_sysctl::CgroupSysctl impl aya::programs::cgroup_sysctl::CgroupSysctl -pub fn aya::programs::cgroup_sysctl::CgroupSysctl::attach(&mut self, cgroup: T) -> core::result::Result -pub fn aya::programs::cgroup_sysctl::CgroupSysctl::detach(&mut self, link_id: aya::programs::cgroup_sysctl::CgroupSysctlLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub const aya::programs::cgroup_sysctl::CgroupSysctl::PROGRAM_TYPE: aya::programs::ProgramType +pub fn aya::programs::cgroup_sysctl::CgroupSysctl::attach(&mut self, cgroup: T, mode: aya::programs::links::CgroupAttachMode) -> core::result::Result pub fn aya::programs::cgroup_sysctl::CgroupSysctl::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::cgroup_sysctl::CgroupSysctl +pub fn aya::programs::cgroup_sysctl::CgroupSysctl::detach(&mut self, link_id: aya::programs::cgroup_sysctl::CgroupSysctlLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::cgroup_sysctl::CgroupSysctl::take_link(&mut self, link_id: aya::programs::cgroup_sysctl::CgroupSysctlLinkId) -> core::result::Result impl aya::programs::cgroup_sysctl::CgroupSysctl pub fn aya::programs::cgroup_sysctl::CgroupSysctl::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::cgroup_sysctl::CgroupSysctl pub fn aya::programs::cgroup_sysctl::CgroupSysctl::from_pin>(path: P) -> core::result::Result impl aya::programs::cgroup_sysctl::CgroupSysctl +pub fn aya::programs::cgroup_sysctl::CgroupSysctl::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::cgroup_sysctl::CgroupSysctl pub fn aya::programs::cgroup_sysctl::CgroupSysctl::info(&self) -> core::result::Result impl aya::programs::cgroup_sysctl::CgroupSysctl pub fn aya::programs::cgroup_sysctl::CgroupSysctl::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::cgroup_sysctl::CgroupSysctl::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::cgroup_sysctl::CgroupSysctl::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::cgroup_sysctl::CgroupSysctl pub fn aya::programs::cgroup_sysctl::CgroupSysctl::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::cgroup_sysctl::CgroupSysctl @@ -3095,11 +3252,11 @@ pub fn aya::programs::cgroup_sysctl::CgroupSysctl::try_from(value: U) -> core::r impl core::convert::TryInto for aya::programs::cgroup_sysctl::CgroupSysctl where U: core::convert::TryFrom pub type aya::programs::cgroup_sysctl::CgroupSysctl::Error = >::Error pub fn aya::programs::cgroup_sysctl::CgroupSysctl::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_sysctl::CgroupSysctl where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_sysctl::CgroupSysctl where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_sysctl::CgroupSysctl::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_sysctl::CgroupSysctl where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_sysctl::CgroupSysctl where T: ?core::marker::Sized pub fn aya::programs::cgroup_sysctl::CgroupSysctl::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_sysctl::CgroupSysctl where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_sysctl::CgroupSysctl where T: ?core::marker::Sized pub fn aya::programs::cgroup_sysctl::CgroupSysctl::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_sysctl::CgroupSysctl pub fn aya::programs::cgroup_sysctl::CgroupSysctl::from(t: T) -> T @@ -3108,16 +3265,25 @@ impl aya::programs::links::Link for aya::programs::cgroup_sysctl::CgroupSysctlLi pub type aya::programs::cgroup_sysctl::CgroupSysctlLink::Id = aya::programs::cgroup_sysctl::CgroupSysctlLinkId pub fn aya::programs::cgroup_sysctl::CgroupSysctlLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::cgroup_sysctl::CgroupSysctlLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::cgroup_sysctl::CgroupSysctlLink +impl core::cmp::PartialEq for aya::programs::cgroup_sysctl::CgroupSysctlLink +pub fn aya::programs::cgroup_sysctl::CgroupSysctlLink::eq(&self, other: &Self) -> bool impl core::fmt::Debug for aya::programs::cgroup_sysctl::CgroupSysctlLink pub fn aya::programs::cgroup_sysctl::CgroupSysctlLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::cgroup_sysctl::CgroupSysctlLink +pub fn aya::programs::cgroup_sysctl::CgroupSysctlLink::hash(&self, state: &mut H) impl core::ops::drop::Drop for aya::programs::cgroup_sysctl::CgroupSysctlLink pub fn aya::programs::cgroup_sysctl::CgroupSysctlLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::cgroup_sysctl::CgroupSysctlLinkId +pub fn aya::programs::cgroup_sysctl::CgroupSysctlLinkId::equivalent(&self, key: &aya::programs::cgroup_sysctl::CgroupSysctlLink) -> bool impl core::marker::Freeze for aya::programs::cgroup_sysctl::CgroupSysctlLink impl core::marker::Send for aya::programs::cgroup_sysctl::CgroupSysctlLink impl core::marker::Sync for aya::programs::cgroup_sysctl::CgroupSysctlLink impl core::marker::Unpin for aya::programs::cgroup_sysctl::CgroupSysctlLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::cgroup_sysctl::CgroupSysctlLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::cgroup_sysctl::CgroupSysctlLink +impl equivalent::Equivalent for aya::programs::cgroup_sysctl::CgroupSysctlLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::cgroup_sysctl::CgroupSysctlLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::cgroup_sysctl::CgroupSysctlLink where U: core::convert::From pub fn aya::programs::cgroup_sysctl::CgroupSysctlLink::into(self) -> U impl core::convert::TryFrom for aya::programs::cgroup_sysctl::CgroupSysctlLink where U: core::convert::Into @@ -3126,11 +3292,11 @@ pub fn aya::programs::cgroup_sysctl::CgroupSysctlLink::try_from(value: U) -> cor impl core::convert::TryInto for aya::programs::cgroup_sysctl::CgroupSysctlLink where U: core::convert::TryFrom pub type aya::programs::cgroup_sysctl::CgroupSysctlLink::Error = >::Error pub fn aya::programs::cgroup_sysctl::CgroupSysctlLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_sysctl::CgroupSysctlLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_sysctl::CgroupSysctlLink where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_sysctl::CgroupSysctlLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_sysctl::CgroupSysctlLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_sysctl::CgroupSysctlLink where T: ?core::marker::Sized pub fn aya::programs::cgroup_sysctl::CgroupSysctlLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_sysctl::CgroupSysctlLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_sysctl::CgroupSysctlLink where T: ?core::marker::Sized pub fn aya::programs::cgroup_sysctl::CgroupSysctlLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_sysctl::CgroupSysctlLink pub fn aya::programs::cgroup_sysctl::CgroupSysctlLink::from(t: T) -> T @@ -3143,15 +3309,15 @@ pub fn aya::programs::cgroup_sysctl::CgroupSysctlLinkId::fmt(&self, f: &mut core impl core::hash::Hash for aya::programs::cgroup_sysctl::CgroupSysctlLinkId pub fn aya::programs::cgroup_sysctl::CgroupSysctlLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::cgroup_sysctl::CgroupSysctlLinkId +impl equivalent::Equivalent for aya::programs::cgroup_sysctl::CgroupSysctlLinkId +pub fn aya::programs::cgroup_sysctl::CgroupSysctlLinkId::equivalent(&self, key: &aya::programs::cgroup_sysctl::CgroupSysctlLink) -> bool impl core::marker::Freeze for aya::programs::cgroup_sysctl::CgroupSysctlLinkId impl core::marker::Send for aya::programs::cgroup_sysctl::CgroupSysctlLinkId impl core::marker::Sync for aya::programs::cgroup_sysctl::CgroupSysctlLinkId impl core::marker::Unpin for aya::programs::cgroup_sysctl::CgroupSysctlLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::cgroup_sysctl::CgroupSysctlLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::cgroup_sysctl::CgroupSysctlLinkId -impl equivalent::Equivalent for aya::programs::cgroup_sysctl::CgroupSysctlLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::cgroup_sysctl::CgroupSysctlLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::cgroup_sysctl::CgroupSysctlLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::cgroup_sysctl::CgroupSysctlLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::cgroup_sysctl::CgroupSysctlLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::cgroup_sysctl::CgroupSysctlLinkId where U: core::convert::From pub fn aya::programs::cgroup_sysctl::CgroupSysctlLinkId::into(self) -> U @@ -3161,11 +3327,11 @@ pub fn aya::programs::cgroup_sysctl::CgroupSysctlLinkId::try_from(value: U) -> c impl core::convert::TryInto for aya::programs::cgroup_sysctl::CgroupSysctlLinkId where U: core::convert::TryFrom pub type aya::programs::cgroup_sysctl::CgroupSysctlLinkId::Error = >::Error pub fn aya::programs::cgroup_sysctl::CgroupSysctlLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_sysctl::CgroupSysctlLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_sysctl::CgroupSysctlLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_sysctl::CgroupSysctlLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_sysctl::CgroupSysctlLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_sysctl::CgroupSysctlLinkId where T: ?core::marker::Sized pub fn aya::programs::cgroup_sysctl::CgroupSysctlLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_sysctl::CgroupSysctlLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_sysctl::CgroupSysctlLinkId where T: ?core::marker::Sized pub fn aya::programs::cgroup_sysctl::CgroupSysctlLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_sysctl::CgroupSysctlLinkId pub fn aya::programs::cgroup_sysctl::CgroupSysctlLinkId::from(t: T) -> T @@ -3193,32 +3359,36 @@ pub fn aya::programs::extension::ExtensionError::try_from(value: U) -> core::res impl core::convert::TryInto for aya::programs::extension::ExtensionError where U: core::convert::TryFrom pub type aya::programs::extension::ExtensionError::Error = >::Error pub fn aya::programs::extension::ExtensionError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya::programs::extension::ExtensionError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya::programs::extension::ExtensionError where T: core::fmt::Display + ?core::marker::Sized pub fn aya::programs::extension::ExtensionError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya::programs::extension::ExtensionError where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::extension::ExtensionError where T: 'static + ?core::marker::Sized pub fn aya::programs::extension::ExtensionError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::extension::ExtensionError where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::extension::ExtensionError where T: ?core::marker::Sized pub fn aya::programs::extension::ExtensionError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::extension::ExtensionError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::extension::ExtensionError where T: ?core::marker::Sized pub fn aya::programs::extension::ExtensionError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::extension::ExtensionError pub fn aya::programs::extension::ExtensionError::from(t: T) -> T pub struct aya::programs::extension::Extension impl aya::programs::extension::Extension +pub const aya::programs::extension::Extension::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::extension::Extension::attach(&mut self) -> core::result::Result pub fn aya::programs::extension::Extension::attach_to_program(&mut self, program: &aya::programs::ProgramFd, func_name: &str) -> core::result::Result -pub fn aya::programs::extension::Extension::detach(&mut self, link_id: aya::programs::extension::ExtensionLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::extension::Extension::load(&mut self, program: aya::programs::ProgramFd, func_name: &str) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::extension::Extension +pub fn aya::programs::extension::Extension::detach(&mut self, link_id: aya::programs::extension::ExtensionLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::extension::Extension::take_link(&mut self, link_id: aya::programs::extension::ExtensionLinkId) -> core::result::Result impl aya::programs::extension::Extension pub fn aya::programs::extension::Extension::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::extension::Extension pub fn aya::programs::extension::Extension::from_pin>(path: P) -> core::result::Result impl aya::programs::extension::Extension +pub fn aya::programs::extension::Extension::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::extension::Extension pub fn aya::programs::extension::Extension::info(&self) -> core::result::Result impl aya::programs::extension::Extension pub fn aya::programs::extension::Extension::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::extension::Extension::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::extension::Extension::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::extension::Extension pub fn aya::programs::extension::Extension::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::extension::Extension @@ -3245,11 +3415,11 @@ pub fn aya::programs::extension::Extension::try_from(value: U) -> core::result:: impl core::convert::TryInto for aya::programs::extension::Extension where U: core::convert::TryFrom pub type aya::programs::extension::Extension::Error = >::Error pub fn aya::programs::extension::Extension::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::extension::Extension where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::extension::Extension where T: 'static + ?core::marker::Sized pub fn aya::programs::extension::Extension::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::extension::Extension where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::extension::Extension where T: ?core::marker::Sized pub fn aya::programs::extension::Extension::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::extension::Extension where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::extension::Extension where T: ?core::marker::Sized pub fn aya::programs::extension::Extension::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::extension::Extension pub fn aya::programs::extension::Extension::from(t: T) -> T @@ -3258,20 +3428,29 @@ impl aya::programs::links::Link for aya::programs::extension::ExtensionLink pub type aya::programs::extension::ExtensionLink::Id = aya::programs::extension::ExtensionLinkId pub fn aya::programs::extension::ExtensionLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::extension::ExtensionLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::extension::ExtensionLink +impl core::cmp::PartialEq for aya::programs::extension::ExtensionLink +pub fn aya::programs::extension::ExtensionLink::eq(&self, other: &Self) -> bool impl core::convert::From for aya::programs::links::FdLink pub fn aya::programs::links::FdLink::from(w: aya::programs::extension::ExtensionLink) -> aya::programs::links::FdLink impl core::convert::From for aya::programs::extension::ExtensionLink pub fn aya::programs::extension::ExtensionLink::from(b: aya::programs::links::FdLink) -> aya::programs::extension::ExtensionLink impl core::fmt::Debug for aya::programs::extension::ExtensionLink pub fn aya::programs::extension::ExtensionLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::extension::ExtensionLink +pub fn aya::programs::extension::ExtensionLink::hash(&self, state: &mut H) impl core::ops::drop::Drop for aya::programs::extension::ExtensionLink pub fn aya::programs::extension::ExtensionLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::extension::ExtensionLinkId +pub fn aya::programs::extension::ExtensionLinkId::equivalent(&self, key: &aya::programs::extension::ExtensionLink) -> bool impl core::marker::Freeze for aya::programs::extension::ExtensionLink impl core::marker::Send for aya::programs::extension::ExtensionLink impl core::marker::Sync for aya::programs::extension::ExtensionLink impl core::marker::Unpin for aya::programs::extension::ExtensionLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::extension::ExtensionLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::extension::ExtensionLink +impl equivalent::Equivalent for aya::programs::extension::ExtensionLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::extension::ExtensionLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::extension::ExtensionLink where U: core::convert::From pub fn aya::programs::extension::ExtensionLink::into(self) -> U impl core::convert::TryFrom for aya::programs::extension::ExtensionLink where U: core::convert::Into @@ -3280,11 +3459,11 @@ pub fn aya::programs::extension::ExtensionLink::try_from(value: U) -> core::resu impl core::convert::TryInto for aya::programs::extension::ExtensionLink where U: core::convert::TryFrom pub type aya::programs::extension::ExtensionLink::Error = >::Error pub fn aya::programs::extension::ExtensionLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::extension::ExtensionLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::extension::ExtensionLink where T: 'static + ?core::marker::Sized pub fn aya::programs::extension::ExtensionLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::extension::ExtensionLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::extension::ExtensionLink where T: ?core::marker::Sized pub fn aya::programs::extension::ExtensionLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::extension::ExtensionLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::extension::ExtensionLink where T: ?core::marker::Sized pub fn aya::programs::extension::ExtensionLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::extension::ExtensionLink pub fn aya::programs::extension::ExtensionLink::from(t: T) -> T @@ -3297,15 +3476,15 @@ pub fn aya::programs::extension::ExtensionLinkId::fmt(&self, f: &mut core::fmt:: impl core::hash::Hash for aya::programs::extension::ExtensionLinkId pub fn aya::programs::extension::ExtensionLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::extension::ExtensionLinkId +impl equivalent::Equivalent for aya::programs::extension::ExtensionLinkId +pub fn aya::programs::extension::ExtensionLinkId::equivalent(&self, key: &aya::programs::extension::ExtensionLink) -> bool impl core::marker::Freeze for aya::programs::extension::ExtensionLinkId impl core::marker::Send for aya::programs::extension::ExtensionLinkId impl core::marker::Sync for aya::programs::extension::ExtensionLinkId impl core::marker::Unpin for aya::programs::extension::ExtensionLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::extension::ExtensionLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::extension::ExtensionLinkId -impl equivalent::Equivalent for aya::programs::extension::ExtensionLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::extension::ExtensionLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::extension::ExtensionLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::extension::ExtensionLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::extension::ExtensionLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::extension::ExtensionLinkId where U: core::convert::From pub fn aya::programs::extension::ExtensionLinkId::into(self) -> U @@ -3315,30 +3494,34 @@ pub fn aya::programs::extension::ExtensionLinkId::try_from(value: U) -> core::re impl core::convert::TryInto for aya::programs::extension::ExtensionLinkId where U: core::convert::TryFrom pub type aya::programs::extension::ExtensionLinkId::Error = >::Error pub fn aya::programs::extension::ExtensionLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::extension::ExtensionLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::extension::ExtensionLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::extension::ExtensionLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::extension::ExtensionLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::extension::ExtensionLinkId where T: ?core::marker::Sized pub fn aya::programs::extension::ExtensionLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::extension::ExtensionLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::extension::ExtensionLinkId where T: ?core::marker::Sized pub fn aya::programs::extension::ExtensionLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::extension::ExtensionLinkId pub fn aya::programs::extension::ExtensionLinkId::from(t: T) -> T pub mod aya::programs::fentry pub struct aya::programs::fentry::FEntry impl aya::programs::fentry::FEntry +pub const aya::programs::fentry::FEntry::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::fentry::FEntry::attach(&mut self) -> core::result::Result -pub fn aya::programs::fentry::FEntry::detach(&mut self, link_id: aya::programs::fentry::FEntryLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::fentry::FEntry::load(&mut self, fn_name: &str, btf: &aya_obj::btf::btf::Btf) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::fentry::FEntry +pub fn aya::programs::fentry::FEntry::detach(&mut self, link_id: aya::programs::fentry::FEntryLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::fentry::FEntry::take_link(&mut self, link_id: aya::programs::fentry::FEntryLinkId) -> core::result::Result impl aya::programs::fentry::FEntry pub fn aya::programs::fentry::FEntry::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::fentry::FEntry pub fn aya::programs::fentry::FEntry::from_pin>(path: P) -> core::result::Result impl aya::programs::fentry::FEntry +pub unsafe fn aya::programs::fentry::FEntry::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::fentry::FEntry pub fn aya::programs::fentry::FEntry::info(&self) -> core::result::Result impl aya::programs::fentry::FEntry pub fn aya::programs::fentry::FEntry::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::fentry::FEntry::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::fentry::FEntry::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::fentry::FEntry pub fn aya::programs::fentry::FEntry::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::fentry::FEntry @@ -3365,11 +3548,11 @@ pub fn aya::programs::fentry::FEntry::try_from(value: U) -> core::result::Result impl core::convert::TryInto for aya::programs::fentry::FEntry where U: core::convert::TryFrom pub type aya::programs::fentry::FEntry::Error = >::Error pub fn aya::programs::fentry::FEntry::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::fentry::FEntry where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::fentry::FEntry where T: 'static + ?core::marker::Sized pub fn aya::programs::fentry::FEntry::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::fentry::FEntry where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::fentry::FEntry where T: ?core::marker::Sized pub fn aya::programs::fentry::FEntry::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::fentry::FEntry where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::fentry::FEntry where T: ?core::marker::Sized pub fn aya::programs::fentry::FEntry::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::fentry::FEntry pub fn aya::programs::fentry::FEntry::from(t: T) -> T @@ -3378,20 +3561,29 @@ impl aya::programs::links::Link for aya::programs::fentry::FEntryLink pub type aya::programs::fentry::FEntryLink::Id = aya::programs::fentry::FEntryLinkId pub fn aya::programs::fentry::FEntryLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::fentry::FEntryLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::fentry::FEntryLink +impl core::cmp::PartialEq for aya::programs::fentry::FEntryLink +pub fn aya::programs::fentry::FEntryLink::eq(&self, other: &Self) -> bool impl core::convert::From for aya::programs::links::FdLink pub fn aya::programs::links::FdLink::from(w: aya::programs::fentry::FEntryLink) -> aya::programs::links::FdLink impl core::convert::From for aya::programs::fentry::FEntryLink pub fn aya::programs::fentry::FEntryLink::from(b: aya::programs::links::FdLink) -> aya::programs::fentry::FEntryLink impl core::fmt::Debug for aya::programs::fentry::FEntryLink pub fn aya::programs::fentry::FEntryLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::fentry::FEntryLink +pub fn aya::programs::fentry::FEntryLink::hash(&self, state: &mut H) impl core::ops::drop::Drop for aya::programs::fentry::FEntryLink pub fn aya::programs::fentry::FEntryLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::fentry::FEntryLinkId +pub fn aya::programs::fentry::FEntryLinkId::equivalent(&self, key: &aya::programs::fentry::FEntryLink) -> bool impl core::marker::Freeze for aya::programs::fentry::FEntryLink impl core::marker::Send for aya::programs::fentry::FEntryLink impl core::marker::Sync for aya::programs::fentry::FEntryLink impl core::marker::Unpin for aya::programs::fentry::FEntryLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::fentry::FEntryLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::fentry::FEntryLink +impl equivalent::Equivalent for aya::programs::fentry::FEntryLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::fentry::FEntryLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::fentry::FEntryLink where U: core::convert::From pub fn aya::programs::fentry::FEntryLink::into(self) -> U impl core::convert::TryFrom for aya::programs::fentry::FEntryLink where U: core::convert::Into @@ -3400,11 +3592,11 @@ pub fn aya::programs::fentry::FEntryLink::try_from(value: U) -> core::result::Re impl core::convert::TryInto for aya::programs::fentry::FEntryLink where U: core::convert::TryFrom pub type aya::programs::fentry::FEntryLink::Error = >::Error pub fn aya::programs::fentry::FEntryLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::fentry::FEntryLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::fentry::FEntryLink where T: 'static + ?core::marker::Sized pub fn aya::programs::fentry::FEntryLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::fentry::FEntryLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::fentry::FEntryLink where T: ?core::marker::Sized pub fn aya::programs::fentry::FEntryLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::fentry::FEntryLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::fentry::FEntryLink where T: ?core::marker::Sized pub fn aya::programs::fentry::FEntryLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::fentry::FEntryLink pub fn aya::programs::fentry::FEntryLink::from(t: T) -> T @@ -3417,15 +3609,15 @@ pub fn aya::programs::fentry::FEntryLinkId::fmt(&self, f: &mut core::fmt::Format impl core::hash::Hash for aya::programs::fentry::FEntryLinkId pub fn aya::programs::fentry::FEntryLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::fentry::FEntryLinkId +impl equivalent::Equivalent for aya::programs::fentry::FEntryLinkId +pub fn aya::programs::fentry::FEntryLinkId::equivalent(&self, key: &aya::programs::fentry::FEntryLink) -> bool impl core::marker::Freeze for aya::programs::fentry::FEntryLinkId impl core::marker::Send for aya::programs::fentry::FEntryLinkId impl core::marker::Sync for aya::programs::fentry::FEntryLinkId impl core::marker::Unpin for aya::programs::fentry::FEntryLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::fentry::FEntryLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::fentry::FEntryLinkId -impl equivalent::Equivalent for aya::programs::fentry::FEntryLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::fentry::FEntryLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::fentry::FEntryLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::fentry::FEntryLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::fentry::FEntryLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::fentry::FEntryLinkId where U: core::convert::From pub fn aya::programs::fentry::FEntryLinkId::into(self) -> U @@ -3435,30 +3627,34 @@ pub fn aya::programs::fentry::FEntryLinkId::try_from(value: U) -> core::result:: impl core::convert::TryInto for aya::programs::fentry::FEntryLinkId where U: core::convert::TryFrom pub type aya::programs::fentry::FEntryLinkId::Error = >::Error pub fn aya::programs::fentry::FEntryLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::fentry::FEntryLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::fentry::FEntryLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::fentry::FEntryLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::fentry::FEntryLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::fentry::FEntryLinkId where T: ?core::marker::Sized pub fn aya::programs::fentry::FEntryLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::fentry::FEntryLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::fentry::FEntryLinkId where T: ?core::marker::Sized pub fn aya::programs::fentry::FEntryLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::fentry::FEntryLinkId pub fn aya::programs::fentry::FEntryLinkId::from(t: T) -> T pub mod aya::programs::fexit pub struct aya::programs::fexit::FExit impl aya::programs::fexit::FExit +pub const aya::programs::fexit::FExit::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::fexit::FExit::attach(&mut self) -> core::result::Result -pub fn aya::programs::fexit::FExit::detach(&mut self, link_id: aya::programs::fexit::FExitLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::fexit::FExit::load(&mut self, fn_name: &str, btf: &aya_obj::btf::btf::Btf) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::fexit::FExit +pub fn aya::programs::fexit::FExit::detach(&mut self, link_id: aya::programs::fexit::FExitLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::fexit::FExit::take_link(&mut self, link_id: aya::programs::fexit::FExitLinkId) -> core::result::Result impl aya::programs::fexit::FExit pub fn aya::programs::fexit::FExit::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::fexit::FExit pub fn aya::programs::fexit::FExit::from_pin>(path: P) -> core::result::Result impl aya::programs::fexit::FExit +pub unsafe fn aya::programs::fexit::FExit::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::fexit::FExit pub fn aya::programs::fexit::FExit::info(&self) -> core::result::Result impl aya::programs::fexit::FExit pub fn aya::programs::fexit::FExit::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::fexit::FExit::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::fexit::FExit::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::fexit::FExit pub fn aya::programs::fexit::FExit::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::fexit::FExit @@ -3485,11 +3681,11 @@ pub fn aya::programs::fexit::FExit::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::programs::fexit::FExit where U: core::convert::TryFrom pub type aya::programs::fexit::FExit::Error = >::Error pub fn aya::programs::fexit::FExit::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::fexit::FExit where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::fexit::FExit where T: 'static + ?core::marker::Sized pub fn aya::programs::fexit::FExit::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::fexit::FExit where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::fexit::FExit where T: ?core::marker::Sized pub fn aya::programs::fexit::FExit::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::fexit::FExit where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::fexit::FExit where T: ?core::marker::Sized pub fn aya::programs::fexit::FExit::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::fexit::FExit pub fn aya::programs::fexit::FExit::from(t: T) -> T @@ -3498,20 +3694,29 @@ impl aya::programs::links::Link for aya::programs::fexit::FExitLink pub type aya::programs::fexit::FExitLink::Id = aya::programs::fexit::FExitLinkId pub fn aya::programs::fexit::FExitLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::fexit::FExitLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::fexit::FExitLink +impl core::cmp::PartialEq for aya::programs::fexit::FExitLink +pub fn aya::programs::fexit::FExitLink::eq(&self, other: &Self) -> bool impl core::convert::From for aya::programs::links::FdLink pub fn aya::programs::links::FdLink::from(w: aya::programs::fexit::FExitLink) -> aya::programs::links::FdLink impl core::convert::From for aya::programs::fexit::FExitLink pub fn aya::programs::fexit::FExitLink::from(b: aya::programs::links::FdLink) -> aya::programs::fexit::FExitLink impl core::fmt::Debug for aya::programs::fexit::FExitLink pub fn aya::programs::fexit::FExitLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::fexit::FExitLink +pub fn aya::programs::fexit::FExitLink::hash(&self, state: &mut H) impl core::ops::drop::Drop for aya::programs::fexit::FExitLink pub fn aya::programs::fexit::FExitLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::fexit::FExitLinkId +pub fn aya::programs::fexit::FExitLinkId::equivalent(&self, key: &aya::programs::fexit::FExitLink) -> bool impl core::marker::Freeze for aya::programs::fexit::FExitLink impl core::marker::Send for aya::programs::fexit::FExitLink impl core::marker::Sync for aya::programs::fexit::FExitLink impl core::marker::Unpin for aya::programs::fexit::FExitLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::fexit::FExitLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::fexit::FExitLink +impl equivalent::Equivalent for aya::programs::fexit::FExitLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::fexit::FExitLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::fexit::FExitLink where U: core::convert::From pub fn aya::programs::fexit::FExitLink::into(self) -> U impl core::convert::TryFrom for aya::programs::fexit::FExitLink where U: core::convert::Into @@ -3520,11 +3725,11 @@ pub fn aya::programs::fexit::FExitLink::try_from(value: U) -> core::result::Resu impl core::convert::TryInto for aya::programs::fexit::FExitLink where U: core::convert::TryFrom pub type aya::programs::fexit::FExitLink::Error = >::Error pub fn aya::programs::fexit::FExitLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::fexit::FExitLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::fexit::FExitLink where T: 'static + ?core::marker::Sized pub fn aya::programs::fexit::FExitLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::fexit::FExitLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::fexit::FExitLink where T: ?core::marker::Sized pub fn aya::programs::fexit::FExitLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::fexit::FExitLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::fexit::FExitLink where T: ?core::marker::Sized pub fn aya::programs::fexit::FExitLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::fexit::FExitLink pub fn aya::programs::fexit::FExitLink::from(t: T) -> T @@ -3537,15 +3742,15 @@ pub fn aya::programs::fexit::FExitLinkId::fmt(&self, f: &mut core::fmt::Formatte impl core::hash::Hash for aya::programs::fexit::FExitLinkId pub fn aya::programs::fexit::FExitLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::fexit::FExitLinkId +impl equivalent::Equivalent for aya::programs::fexit::FExitLinkId +pub fn aya::programs::fexit::FExitLinkId::equivalent(&self, key: &aya::programs::fexit::FExitLink) -> bool impl core::marker::Freeze for aya::programs::fexit::FExitLinkId impl core::marker::Send for aya::programs::fexit::FExitLinkId impl core::marker::Sync for aya::programs::fexit::FExitLinkId impl core::marker::Unpin for aya::programs::fexit::FExitLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::fexit::FExitLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::fexit::FExitLinkId -impl equivalent::Equivalent for aya::programs::fexit::FExitLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::fexit::FExitLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::fexit::FExitLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::fexit::FExitLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::fexit::FExitLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::fexit::FExitLinkId where U: core::convert::From pub fn aya::programs::fexit::FExitLinkId::into(self) -> U @@ -3555,14 +3760,308 @@ pub fn aya::programs::fexit::FExitLinkId::try_from(value: U) -> core::result::Re impl core::convert::TryInto for aya::programs::fexit::FExitLinkId where U: core::convert::TryFrom pub type aya::programs::fexit::FExitLinkId::Error = >::Error pub fn aya::programs::fexit::FExitLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::fexit::FExitLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::fexit::FExitLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::fexit::FExitLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::fexit::FExitLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::fexit::FExitLinkId where T: ?core::marker::Sized pub fn aya::programs::fexit::FExitLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::fexit::FExitLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::fexit::FExitLinkId where T: ?core::marker::Sized pub fn aya::programs::fexit::FExitLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::fexit::FExitLinkId pub fn aya::programs::fexit::FExitLinkId::from(t: T) -> T +pub mod aya::programs::flow_dissector +pub struct aya::programs::flow_dissector::FlowDissector +impl aya::programs::flow_dissector::FlowDissector +pub const aya::programs::flow_dissector::FlowDissector::PROGRAM_TYPE: aya::programs::ProgramType +pub fn aya::programs::flow_dissector::FlowDissector::attach(&mut self, netns: T) -> core::result::Result +pub fn aya::programs::flow_dissector::FlowDissector::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::flow_dissector::FlowDissector +pub fn aya::programs::flow_dissector::FlowDissector::detach(&mut self, link_id: aya::programs::flow_dissector::FlowDissectorLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub fn aya::programs::flow_dissector::FlowDissector::take_link(&mut self, link_id: aya::programs::flow_dissector::FlowDissectorLinkId) -> core::result::Result +impl aya::programs::flow_dissector::FlowDissector +pub fn aya::programs::flow_dissector::FlowDissector::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> +impl aya::programs::flow_dissector::FlowDissector +pub fn aya::programs::flow_dissector::FlowDissector::from_pin>(path: P) -> core::result::Result +impl aya::programs::flow_dissector::FlowDissector +pub fn aya::programs::flow_dissector::FlowDissector::info(&self) -> core::result::Result +impl aya::programs::flow_dissector::FlowDissector +pub fn aya::programs::flow_dissector::FlowDissector::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::programs::flow_dissector::FlowDissector::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> +impl aya::programs::flow_dissector::FlowDissector +pub fn aya::programs::flow_dissector::FlowDissector::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl core::fmt::Debug for aya::programs::flow_dissector::FlowDissector +pub fn aya::programs::flow_dissector::FlowDissector::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::ops::drop::Drop for aya::programs::flow_dissector::FlowDissector +pub fn aya::programs::flow_dissector::FlowDissector::drop(&mut self) +impl<'a> core::convert::TryFrom<&'a aya::programs::Program> for &'a aya::programs::flow_dissector::FlowDissector +pub type &'a aya::programs::flow_dissector::FlowDissector::Error = aya::programs::ProgramError +pub fn &'a aya::programs::flow_dissector::FlowDissector::try_from(program: &'a aya::programs::Program) -> core::result::Result<&'a aya::programs::flow_dissector::FlowDissector, aya::programs::ProgramError> +impl<'a> core::convert::TryFrom<&'a mut aya::programs::Program> for &'a mut aya::programs::flow_dissector::FlowDissector +pub type &'a mut aya::programs::flow_dissector::FlowDissector::Error = aya::programs::ProgramError +pub fn &'a mut aya::programs::flow_dissector::FlowDissector::try_from(program: &'a mut aya::programs::Program) -> core::result::Result<&'a mut aya::programs::flow_dissector::FlowDissector, aya::programs::ProgramError> +impl core::marker::Freeze for aya::programs::flow_dissector::FlowDissector +impl core::marker::Send for aya::programs::flow_dissector::FlowDissector +impl core::marker::Sync for aya::programs::flow_dissector::FlowDissector +impl core::marker::Unpin for aya::programs::flow_dissector::FlowDissector +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::flow_dissector::FlowDissector +impl core::panic::unwind_safe::UnwindSafe for aya::programs::flow_dissector::FlowDissector +impl core::convert::Into for aya::programs::flow_dissector::FlowDissector where U: core::convert::From +pub fn aya::programs::flow_dissector::FlowDissector::into(self) -> U +impl core::convert::TryFrom for aya::programs::flow_dissector::FlowDissector where U: core::convert::Into +pub type aya::programs::flow_dissector::FlowDissector::Error = core::convert::Infallible +pub fn aya::programs::flow_dissector::FlowDissector::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::flow_dissector::FlowDissector where U: core::convert::TryFrom +pub type aya::programs::flow_dissector::FlowDissector::Error = >::Error +pub fn aya::programs::flow_dissector::FlowDissector::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya::programs::flow_dissector::FlowDissector where T: 'static + ?core::marker::Sized +pub fn aya::programs::flow_dissector::FlowDissector::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::flow_dissector::FlowDissector where T: ?core::marker::Sized +pub fn aya::programs::flow_dissector::FlowDissector::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::flow_dissector::FlowDissector where T: ?core::marker::Sized +pub fn aya::programs::flow_dissector::FlowDissector::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::programs::flow_dissector::FlowDissector +pub fn aya::programs::flow_dissector::FlowDissector::from(t: T) -> T +pub struct aya::programs::flow_dissector::FlowDissectorLink(_) +impl aya::programs::links::Link for aya::programs::flow_dissector::FlowDissectorLink +pub type aya::programs::flow_dissector::FlowDissectorLink::Id = aya::programs::flow_dissector::FlowDissectorLinkId +pub fn aya::programs::flow_dissector::FlowDissectorLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> +pub fn aya::programs::flow_dissector::FlowDissectorLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::flow_dissector::FlowDissectorLink +impl core::cmp::PartialEq for aya::programs::flow_dissector::FlowDissectorLink +pub fn aya::programs::flow_dissector::FlowDissectorLink::eq(&self, other: &Self) -> bool +impl core::convert::TryFrom for aya::programs::links::FdLink +pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError +pub fn aya::programs::links::FdLink::try_from(value: aya::programs::flow_dissector::FlowDissectorLink) -> core::result::Result +impl core::fmt::Debug for aya::programs::flow_dissector::FlowDissectorLink +pub fn aya::programs::flow_dissector::FlowDissectorLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::flow_dissector::FlowDissectorLink +pub fn aya::programs::flow_dissector::FlowDissectorLink::hash(&self, state: &mut H) +impl core::ops::drop::Drop for aya::programs::flow_dissector::FlowDissectorLink +pub fn aya::programs::flow_dissector::FlowDissectorLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::flow_dissector::FlowDissectorLinkId +pub fn aya::programs::flow_dissector::FlowDissectorLinkId::equivalent(&self, key: &aya::programs::flow_dissector::FlowDissectorLink) -> bool +impl core::marker::Freeze for aya::programs::flow_dissector::FlowDissectorLink +impl core::marker::Send for aya::programs::flow_dissector::FlowDissectorLink +impl core::marker::Sync for aya::programs::flow_dissector::FlowDissectorLink +impl core::marker::Unpin for aya::programs::flow_dissector::FlowDissectorLink +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::flow_dissector::FlowDissectorLink +impl core::panic::unwind_safe::UnwindSafe for aya::programs::flow_dissector::FlowDissectorLink +impl equivalent::Equivalent for aya::programs::flow_dissector::FlowDissectorLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::flow_dissector::FlowDissectorLink::equivalent(&self, key: &K) -> bool +impl core::convert::Into for aya::programs::flow_dissector::FlowDissectorLink where U: core::convert::From +pub fn aya::programs::flow_dissector::FlowDissectorLink::into(self) -> U +impl core::convert::TryFrom for aya::programs::flow_dissector::FlowDissectorLink where U: core::convert::Into +pub type aya::programs::flow_dissector::FlowDissectorLink::Error = core::convert::Infallible +pub fn aya::programs::flow_dissector::FlowDissectorLink::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::flow_dissector::FlowDissectorLink where U: core::convert::TryFrom +pub type aya::programs::flow_dissector::FlowDissectorLink::Error = >::Error +pub fn aya::programs::flow_dissector::FlowDissectorLink::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya::programs::flow_dissector::FlowDissectorLink where T: 'static + ?core::marker::Sized +pub fn aya::programs::flow_dissector::FlowDissectorLink::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::flow_dissector::FlowDissectorLink where T: ?core::marker::Sized +pub fn aya::programs::flow_dissector::FlowDissectorLink::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::flow_dissector::FlowDissectorLink where T: ?core::marker::Sized +pub fn aya::programs::flow_dissector::FlowDissectorLink::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::programs::flow_dissector::FlowDissectorLink +pub fn aya::programs::flow_dissector::FlowDissectorLink::from(t: T) -> T +pub struct aya::programs::flow_dissector::FlowDissectorLinkId(_) +impl core::cmp::Eq for aya::programs::flow_dissector::FlowDissectorLinkId +impl core::cmp::PartialEq for aya::programs::flow_dissector::FlowDissectorLinkId +pub fn aya::programs::flow_dissector::FlowDissectorLinkId::eq(&self, other: &aya::programs::flow_dissector::FlowDissectorLinkId) -> bool +impl core::fmt::Debug for aya::programs::flow_dissector::FlowDissectorLinkId +pub fn aya::programs::flow_dissector::FlowDissectorLinkId::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::flow_dissector::FlowDissectorLinkId +pub fn aya::programs::flow_dissector::FlowDissectorLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::StructuralPartialEq for aya::programs::flow_dissector::FlowDissectorLinkId +impl equivalent::Equivalent for aya::programs::flow_dissector::FlowDissectorLinkId +pub fn aya::programs::flow_dissector::FlowDissectorLinkId::equivalent(&self, key: &aya::programs::flow_dissector::FlowDissectorLink) -> bool +impl core::marker::Freeze for aya::programs::flow_dissector::FlowDissectorLinkId +impl core::marker::Send for aya::programs::flow_dissector::FlowDissectorLinkId +impl core::marker::Sync for aya::programs::flow_dissector::FlowDissectorLinkId +impl core::marker::Unpin for aya::programs::flow_dissector::FlowDissectorLinkId +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::flow_dissector::FlowDissectorLinkId +impl core::panic::unwind_safe::UnwindSafe for aya::programs::flow_dissector::FlowDissectorLinkId +impl equivalent::Equivalent for aya::programs::flow_dissector::FlowDissectorLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::flow_dissector::FlowDissectorLinkId::equivalent(&self, key: &K) -> bool +impl core::convert::Into for aya::programs::flow_dissector::FlowDissectorLinkId where U: core::convert::From +pub fn aya::programs::flow_dissector::FlowDissectorLinkId::into(self) -> U +impl core::convert::TryFrom for aya::programs::flow_dissector::FlowDissectorLinkId where U: core::convert::Into +pub type aya::programs::flow_dissector::FlowDissectorLinkId::Error = core::convert::Infallible +pub fn aya::programs::flow_dissector::FlowDissectorLinkId::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::flow_dissector::FlowDissectorLinkId where U: core::convert::TryFrom +pub type aya::programs::flow_dissector::FlowDissectorLinkId::Error = >::Error +pub fn aya::programs::flow_dissector::FlowDissectorLinkId::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya::programs::flow_dissector::FlowDissectorLinkId where T: 'static + ?core::marker::Sized +pub fn aya::programs::flow_dissector::FlowDissectorLinkId::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::flow_dissector::FlowDissectorLinkId where T: ?core::marker::Sized +pub fn aya::programs::flow_dissector::FlowDissectorLinkId::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::flow_dissector::FlowDissectorLinkId where T: ?core::marker::Sized +pub fn aya::programs::flow_dissector::FlowDissectorLinkId::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::programs::flow_dissector::FlowDissectorLinkId +pub fn aya::programs::flow_dissector::FlowDissectorLinkId::from(t: T) -> T +pub mod aya::programs::iter +pub struct aya::programs::iter::Iter +impl aya::programs::iter::Iter +pub const aya::programs::iter::Iter::PROGRAM_TYPE: aya::programs::ProgramType +pub fn aya::programs::iter::Iter::attach(&mut self) -> core::result::Result +pub fn aya::programs::iter::Iter::load(&mut self, iter_type: &str, btf: &aya_obj::btf::btf::Btf) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::iter::Iter +pub fn aya::programs::iter::Iter::detach(&mut self, link_id: aya::programs::iter::IterLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub fn aya::programs::iter::Iter::take_link(&mut self, link_id: aya::programs::iter::IterLinkId) -> core::result::Result +impl aya::programs::iter::Iter +pub fn aya::programs::iter::Iter::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> +impl aya::programs::iter::Iter +pub fn aya::programs::iter::Iter::from_pin>(path: P) -> core::result::Result +impl aya::programs::iter::Iter +pub fn aya::programs::iter::Iter::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::iter::Iter +pub fn aya::programs::iter::Iter::info(&self) -> core::result::Result +impl aya::programs::iter::Iter +pub fn aya::programs::iter::Iter::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::programs::iter::Iter::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> +impl aya::programs::iter::Iter +pub fn aya::programs::iter::Iter::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl core::fmt::Debug for aya::programs::iter::Iter +pub fn aya::programs::iter::Iter::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::ops::drop::Drop for aya::programs::iter::Iter +pub fn aya::programs::iter::Iter::drop(&mut self) +impl<'a> core::convert::TryFrom<&'a aya::programs::Program> for &'a aya::programs::iter::Iter +pub type &'a aya::programs::iter::Iter::Error = aya::programs::ProgramError +pub fn &'a aya::programs::iter::Iter::try_from(program: &'a aya::programs::Program) -> core::result::Result<&'a aya::programs::iter::Iter, aya::programs::ProgramError> +impl<'a> core::convert::TryFrom<&'a mut aya::programs::Program> for &'a mut aya::programs::iter::Iter +pub type &'a mut aya::programs::iter::Iter::Error = aya::programs::ProgramError +pub fn &'a mut aya::programs::iter::Iter::try_from(program: &'a mut aya::programs::Program) -> core::result::Result<&'a mut aya::programs::iter::Iter, aya::programs::ProgramError> +impl core::marker::Freeze for aya::programs::iter::Iter +impl core::marker::Send for aya::programs::iter::Iter +impl core::marker::Sync for aya::programs::iter::Iter +impl core::marker::Unpin for aya::programs::iter::Iter +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::iter::Iter +impl core::panic::unwind_safe::UnwindSafe for aya::programs::iter::Iter +impl core::convert::Into for aya::programs::iter::Iter where U: core::convert::From +pub fn aya::programs::iter::Iter::into(self) -> U +impl core::convert::TryFrom for aya::programs::iter::Iter where U: core::convert::Into +pub type aya::programs::iter::Iter::Error = core::convert::Infallible +pub fn aya::programs::iter::Iter::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::iter::Iter where U: core::convert::TryFrom +pub type aya::programs::iter::Iter::Error = >::Error +pub fn aya::programs::iter::Iter::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya::programs::iter::Iter where T: 'static + ?core::marker::Sized +pub fn aya::programs::iter::Iter::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::iter::Iter where T: ?core::marker::Sized +pub fn aya::programs::iter::Iter::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::iter::Iter where T: ?core::marker::Sized +pub fn aya::programs::iter::Iter::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::programs::iter::Iter +pub fn aya::programs::iter::Iter::from(t: T) -> T +pub struct aya::programs::iter::IterFd +impl core::fmt::Debug for aya::programs::iter::IterFd +pub fn aya::programs::iter::IterFd::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl std::os::fd::owned::AsFd for aya::programs::iter::IterFd +pub fn aya::programs::iter::IterFd::as_fd(&self) -> std::os::fd::owned::BorrowedFd<'_> +impl core::marker::Freeze for aya::programs::iter::IterFd +impl core::marker::Send for aya::programs::iter::IterFd +impl core::marker::Sync for aya::programs::iter::IterFd +impl core::marker::Unpin for aya::programs::iter::IterFd +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::iter::IterFd +impl core::panic::unwind_safe::UnwindSafe for aya::programs::iter::IterFd +impl core::convert::Into for aya::programs::iter::IterFd where U: core::convert::From +pub fn aya::programs::iter::IterFd::into(self) -> U +impl core::convert::TryFrom for aya::programs::iter::IterFd where U: core::convert::Into +pub type aya::programs::iter::IterFd::Error = core::convert::Infallible +pub fn aya::programs::iter::IterFd::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::iter::IterFd where U: core::convert::TryFrom +pub type aya::programs::iter::IterFd::Error = >::Error +pub fn aya::programs::iter::IterFd::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya::programs::iter::IterFd where T: 'static + ?core::marker::Sized +pub fn aya::programs::iter::IterFd::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::iter::IterFd where T: ?core::marker::Sized +pub fn aya::programs::iter::IterFd::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::iter::IterFd where T: ?core::marker::Sized +pub fn aya::programs::iter::IterFd::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::programs::iter::IterFd +pub fn aya::programs::iter::IterFd::from(t: T) -> T +pub struct aya::programs::iter::IterLink(_) +impl aya::programs::iter::IterLink +pub fn aya::programs::iter::IterLink::into_file(self) -> core::result::Result +impl aya::programs::links::Link for aya::programs::iter::IterLink +pub type aya::programs::iter::IterLink::Id = aya::programs::iter::IterLinkId +pub fn aya::programs::iter::IterLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> +pub fn aya::programs::iter::IterLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::iter::IterLink +impl core::cmp::PartialEq for aya::programs::iter::IterLink +pub fn aya::programs::iter::IterLink::eq(&self, other: &Self) -> bool +impl core::convert::TryFrom for aya::programs::links::FdLink +pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError +pub fn aya::programs::links::FdLink::try_from(value: aya::programs::iter::IterLink) -> core::result::Result +impl core::convert::TryFrom for aya::programs::iter::IterLink +pub type aya::programs::iter::IterLink::Error = aya::programs::links::LinkError +pub fn aya::programs::iter::IterLink::try_from(fd_link: aya::programs::links::FdLink) -> core::result::Result +impl core::fmt::Debug for aya::programs::iter::IterLink +pub fn aya::programs::iter::IterLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::iter::IterLink +pub fn aya::programs::iter::IterLink::hash(&self, state: &mut H) +impl core::ops::drop::Drop for aya::programs::iter::IterLink +pub fn aya::programs::iter::IterLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::iter::IterLinkId +pub fn aya::programs::iter::IterLinkId::equivalent(&self, key: &aya::programs::iter::IterLink) -> bool +impl core::marker::Freeze for aya::programs::iter::IterLink +impl core::marker::Send for aya::programs::iter::IterLink +impl core::marker::Sync for aya::programs::iter::IterLink +impl core::marker::Unpin for aya::programs::iter::IterLink +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::iter::IterLink +impl core::panic::unwind_safe::UnwindSafe for aya::programs::iter::IterLink +impl equivalent::Equivalent for aya::programs::iter::IterLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::iter::IterLink::equivalent(&self, key: &K) -> bool +impl core::convert::Into for aya::programs::iter::IterLink where U: core::convert::From +pub fn aya::programs::iter::IterLink::into(self) -> U +impl core::convert::TryFrom for aya::programs::iter::IterLink where U: core::convert::Into +pub type aya::programs::iter::IterLink::Error = core::convert::Infallible +pub fn aya::programs::iter::IterLink::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::iter::IterLink where U: core::convert::TryFrom +pub type aya::programs::iter::IterLink::Error = >::Error +pub fn aya::programs::iter::IterLink::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya::programs::iter::IterLink where T: 'static + ?core::marker::Sized +pub fn aya::programs::iter::IterLink::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::iter::IterLink where T: ?core::marker::Sized +pub fn aya::programs::iter::IterLink::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::iter::IterLink where T: ?core::marker::Sized +pub fn aya::programs::iter::IterLink::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::programs::iter::IterLink +pub fn aya::programs::iter::IterLink::from(t: T) -> T +pub struct aya::programs::iter::IterLinkId(_) +impl core::cmp::Eq for aya::programs::iter::IterLinkId +impl core::cmp::PartialEq for aya::programs::iter::IterLinkId +pub fn aya::programs::iter::IterLinkId::eq(&self, other: &aya::programs::iter::IterLinkId) -> bool +impl core::fmt::Debug for aya::programs::iter::IterLinkId +pub fn aya::programs::iter::IterLinkId::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::iter::IterLinkId +pub fn aya::programs::iter::IterLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::StructuralPartialEq for aya::programs::iter::IterLinkId +impl equivalent::Equivalent for aya::programs::iter::IterLinkId +pub fn aya::programs::iter::IterLinkId::equivalent(&self, key: &aya::programs::iter::IterLink) -> bool +impl core::marker::Freeze for aya::programs::iter::IterLinkId +impl core::marker::Send for aya::programs::iter::IterLinkId +impl core::marker::Sync for aya::programs::iter::IterLinkId +impl core::marker::Unpin for aya::programs::iter::IterLinkId +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::iter::IterLinkId +impl core::panic::unwind_safe::UnwindSafe for aya::programs::iter::IterLinkId +impl equivalent::Equivalent for aya::programs::iter::IterLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::iter::IterLinkId::equivalent(&self, key: &K) -> bool +impl core::convert::Into for aya::programs::iter::IterLinkId where U: core::convert::From +pub fn aya::programs::iter::IterLinkId::into(self) -> U +impl core::convert::TryFrom for aya::programs::iter::IterLinkId where U: core::convert::Into +pub type aya::programs::iter::IterLinkId::Error = core::convert::Infallible +pub fn aya::programs::iter::IterLinkId::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::iter::IterLinkId where U: core::convert::TryFrom +pub type aya::programs::iter::IterLinkId::Error = >::Error +pub fn aya::programs::iter::IterLinkId::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya::programs::iter::IterLinkId where T: 'static + ?core::marker::Sized +pub fn aya::programs::iter::IterLinkId::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::iter::IterLinkId where T: ?core::marker::Sized +pub fn aya::programs::iter::IterLinkId::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::iter::IterLinkId where T: ?core::marker::Sized +pub fn aya::programs::iter::IterLinkId::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::programs::iter::IterLinkId +pub fn aya::programs::iter::IterLinkId::from(t: T) -> T pub mod aya::programs::kprobe pub enum aya::programs::kprobe::KProbeError pub aya::programs::kprobe::KProbeError::FileError @@ -3590,31 +4089,35 @@ pub fn aya::programs::kprobe::KProbeError::try_from(value: U) -> core::result::R impl core::convert::TryInto for aya::programs::kprobe::KProbeError where U: core::convert::TryFrom pub type aya::programs::kprobe::KProbeError::Error = >::Error pub fn aya::programs::kprobe::KProbeError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya::programs::kprobe::KProbeError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya::programs::kprobe::KProbeError where T: core::fmt::Display + ?core::marker::Sized pub fn aya::programs::kprobe::KProbeError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya::programs::kprobe::KProbeError where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::kprobe::KProbeError where T: 'static + ?core::marker::Sized pub fn aya::programs::kprobe::KProbeError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::kprobe::KProbeError where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::kprobe::KProbeError where T: ?core::marker::Sized pub fn aya::programs::kprobe::KProbeError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::kprobe::KProbeError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::kprobe::KProbeError where T: ?core::marker::Sized pub fn aya::programs::kprobe::KProbeError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::kprobe::KProbeError pub fn aya::programs::kprobe::KProbeError::from(t: T) -> T pub struct aya::programs::kprobe::KProbe impl aya::programs::kprobe::KProbe +pub const aya::programs::kprobe::KProbe::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::kprobe::KProbe::attach>(&mut self, fn_name: T, offset: u64) -> core::result::Result -pub fn aya::programs::kprobe::KProbe::detach(&mut self, link_id: aya::programs::kprobe::KProbeLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::kprobe::KProbe::from_pin>(path: P, kind: aya::programs::ProbeKind) -> core::result::Result pub fn aya::programs::kprobe::KProbe::kind(&self) -> aya::programs::ProbeKind pub fn aya::programs::kprobe::KProbe::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::kprobe::KProbe +pub fn aya::programs::kprobe::KProbe::detach(&mut self, link_id: aya::programs::kprobe::KProbeLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::kprobe::KProbe::take_link(&mut self, link_id: aya::programs::kprobe::KProbeLinkId) -> core::result::Result impl aya::programs::kprobe::KProbe pub fn aya::programs::kprobe::KProbe::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::kprobe::KProbe +pub unsafe fn aya::programs::kprobe::KProbe::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>, kind: aya::programs::ProbeKind) -> core::result::Result +impl aya::programs::kprobe::KProbe pub fn aya::programs::kprobe::KProbe::info(&self) -> core::result::Result impl aya::programs::kprobe::KProbe pub fn aya::programs::kprobe::KProbe::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::kprobe::KProbe::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::kprobe::KProbe::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::kprobe::KProbe pub fn aya::programs::kprobe::KProbe::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::kprobe::KProbe @@ -3641,11 +4144,11 @@ pub fn aya::programs::kprobe::KProbe::try_from(value: U) -> core::result::Result impl core::convert::TryInto for aya::programs::kprobe::KProbe where U: core::convert::TryFrom pub type aya::programs::kprobe::KProbe::Error = >::Error pub fn aya::programs::kprobe::KProbe::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::kprobe::KProbe where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::kprobe::KProbe where T: 'static + ?core::marker::Sized pub fn aya::programs::kprobe::KProbe::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::kprobe::KProbe where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::kprobe::KProbe where T: ?core::marker::Sized pub fn aya::programs::kprobe::KProbe::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::kprobe::KProbe where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::kprobe::KProbe where T: ?core::marker::Sized pub fn aya::programs::kprobe::KProbe::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::kprobe::KProbe pub fn aya::programs::kprobe::KProbe::from(t: T) -> T @@ -3654,6 +4157,9 @@ impl aya::programs::links::Link for aya::programs::kprobe::KProbeLink pub type aya::programs::kprobe::KProbeLink::Id = aya::programs::kprobe::KProbeLinkId pub fn aya::programs::kprobe::KProbeLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::kprobe::KProbeLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::kprobe::KProbeLink +impl core::cmp::PartialEq for aya::programs::kprobe::KProbeLink +pub fn aya::programs::kprobe::KProbeLink::eq(&self, other: &Self) -> bool impl core::convert::TryFrom for aya::programs::links::FdLink pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError pub fn aya::programs::links::FdLink::try_from(value: aya::programs::kprobe::KProbeLink) -> core::result::Result @@ -3662,14 +4168,20 @@ pub type aya::programs::kprobe::KProbeLink::Error = aya::programs::links::LinkEr pub fn aya::programs::kprobe::KProbeLink::try_from(fd_link: aya::programs::links::FdLink) -> core::result::Result impl core::fmt::Debug for aya::programs::kprobe::KProbeLink pub fn aya::programs::kprobe::KProbeLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::kprobe::KProbeLink +pub fn aya::programs::kprobe::KProbeLink::hash(&self, state: &mut H) impl core::ops::drop::Drop for aya::programs::kprobe::KProbeLink pub fn aya::programs::kprobe::KProbeLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::kprobe::KProbeLinkId +pub fn aya::programs::kprobe::KProbeLinkId::equivalent(&self, key: &aya::programs::kprobe::KProbeLink) -> bool impl core::marker::Freeze for aya::programs::kprobe::KProbeLink impl core::marker::Send for aya::programs::kprobe::KProbeLink impl core::marker::Sync for aya::programs::kprobe::KProbeLink impl core::marker::Unpin for aya::programs::kprobe::KProbeLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::kprobe::KProbeLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::kprobe::KProbeLink +impl equivalent::Equivalent for aya::programs::kprobe::KProbeLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::kprobe::KProbeLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::kprobe::KProbeLink where U: core::convert::From pub fn aya::programs::kprobe::KProbeLink::into(self) -> U impl core::convert::TryFrom for aya::programs::kprobe::KProbeLink where U: core::convert::Into @@ -3678,11 +4190,11 @@ pub fn aya::programs::kprobe::KProbeLink::try_from(value: U) -> core::result::Re impl core::convert::TryInto for aya::programs::kprobe::KProbeLink where U: core::convert::TryFrom pub type aya::programs::kprobe::KProbeLink::Error = >::Error pub fn aya::programs::kprobe::KProbeLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::kprobe::KProbeLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::kprobe::KProbeLink where T: 'static + ?core::marker::Sized pub fn aya::programs::kprobe::KProbeLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::kprobe::KProbeLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::kprobe::KProbeLink where T: ?core::marker::Sized pub fn aya::programs::kprobe::KProbeLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::kprobe::KProbeLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::kprobe::KProbeLink where T: ?core::marker::Sized pub fn aya::programs::kprobe::KProbeLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::kprobe::KProbeLink pub fn aya::programs::kprobe::KProbeLink::from(t: T) -> T @@ -3695,15 +4207,15 @@ pub fn aya::programs::kprobe::KProbeLinkId::fmt(&self, f: &mut core::fmt::Format impl core::hash::Hash for aya::programs::kprobe::KProbeLinkId pub fn aya::programs::kprobe::KProbeLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::kprobe::KProbeLinkId +impl equivalent::Equivalent for aya::programs::kprobe::KProbeLinkId +pub fn aya::programs::kprobe::KProbeLinkId::equivalent(&self, key: &aya::programs::kprobe::KProbeLink) -> bool impl core::marker::Freeze for aya::programs::kprobe::KProbeLinkId impl core::marker::Send for aya::programs::kprobe::KProbeLinkId impl core::marker::Sync for aya::programs::kprobe::KProbeLinkId impl core::marker::Unpin for aya::programs::kprobe::KProbeLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::kprobe::KProbeLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::kprobe::KProbeLinkId -impl equivalent::Equivalent for aya::programs::kprobe::KProbeLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::kprobe::KProbeLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::kprobe::KProbeLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::kprobe::KProbeLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::kprobe::KProbeLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::kprobe::KProbeLinkId where U: core::convert::From pub fn aya::programs::kprobe::KProbeLinkId::into(self) -> U @@ -3713,18 +4225,62 @@ pub fn aya::programs::kprobe::KProbeLinkId::try_from(value: U) -> core::result:: impl core::convert::TryInto for aya::programs::kprobe::KProbeLinkId where U: core::convert::TryFrom pub type aya::programs::kprobe::KProbeLinkId::Error = >::Error pub fn aya::programs::kprobe::KProbeLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::kprobe::KProbeLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::kprobe::KProbeLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::kprobe::KProbeLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::kprobe::KProbeLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::kprobe::KProbeLinkId where T: ?core::marker::Sized pub fn aya::programs::kprobe::KProbeLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::kprobe::KProbeLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::kprobe::KProbeLinkId where T: ?core::marker::Sized pub fn aya::programs::kprobe::KProbeLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::kprobe::KProbeLinkId pub fn aya::programs::kprobe::KProbeLinkId::from(t: T) -> T pub mod aya::programs::links +pub enum aya::programs::links::CgroupAttachMode +pub aya::programs::links::CgroupAttachMode::AllowMultiple +pub aya::programs::links::CgroupAttachMode::AllowOverride +pub aya::programs::links::CgroupAttachMode::Single +impl core::clone::Clone for aya::programs::links::CgroupAttachMode +pub fn aya::programs::links::CgroupAttachMode::clone(&self) -> aya::programs::links::CgroupAttachMode +impl core::convert::From for u32 +pub fn u32::from(mode: aya::programs::links::CgroupAttachMode) -> Self +impl core::default::Default for aya::programs::links::CgroupAttachMode +pub fn aya::programs::links::CgroupAttachMode::default() -> aya::programs::links::CgroupAttachMode +impl core::fmt::Debug for aya::programs::links::CgroupAttachMode +pub fn aya::programs::links::CgroupAttachMode::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Copy for aya::programs::links::CgroupAttachMode +impl core::marker::Freeze for aya::programs::links::CgroupAttachMode +impl core::marker::Send for aya::programs::links::CgroupAttachMode +impl core::marker::Sync for aya::programs::links::CgroupAttachMode +impl core::marker::Unpin for aya::programs::links::CgroupAttachMode +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::links::CgroupAttachMode +impl core::panic::unwind_safe::UnwindSafe for aya::programs::links::CgroupAttachMode +impl core::convert::Into for aya::programs::links::CgroupAttachMode where U: core::convert::From +pub fn aya::programs::links::CgroupAttachMode::into(self) -> U +impl core::convert::TryFrom for aya::programs::links::CgroupAttachMode where U: core::convert::Into +pub type aya::programs::links::CgroupAttachMode::Error = core::convert::Infallible +pub fn aya::programs::links::CgroupAttachMode::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::links::CgroupAttachMode where U: core::convert::TryFrom +pub type aya::programs::links::CgroupAttachMode::Error = >::Error +pub fn aya::programs::links::CgroupAttachMode::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya::programs::links::CgroupAttachMode where T: core::clone::Clone +pub type aya::programs::links::CgroupAttachMode::Owned = T +pub fn aya::programs::links::CgroupAttachMode::clone_into(&self, target: &mut T) +pub fn aya::programs::links::CgroupAttachMode::to_owned(&self) -> T +impl core::any::Any for aya::programs::links::CgroupAttachMode where T: 'static + ?core::marker::Sized +pub fn aya::programs::links::CgroupAttachMode::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::links::CgroupAttachMode where T: ?core::marker::Sized +pub fn aya::programs::links::CgroupAttachMode::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::links::CgroupAttachMode where T: ?core::marker::Sized +pub fn aya::programs::links::CgroupAttachMode::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::programs::links::CgroupAttachMode where T: core::clone::Clone +pub unsafe fn aya::programs::links::CgroupAttachMode::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya::programs::links::CgroupAttachMode +pub fn aya::programs::links::CgroupAttachMode::from(t: T) -> T pub enum aya::programs::links::LinkError pub aya::programs::links::LinkError::InvalidLink -pub aya::programs::links::LinkError::SyscallError(crate::sys::SyscallError) +pub aya::programs::links::LinkError::SyscallError(aya::sys::SyscallError) +pub aya::programs::links::LinkError::UnknownLinkType(u32) +impl core::convert::From for aya::programs::links::LinkError +pub fn aya::programs::links::LinkError::from(source: aya::sys::SyscallError) -> Self impl core::error::Error for aya::programs::links::LinkError pub fn aya::programs::links::LinkError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)> impl core::fmt::Debug for aya::programs::links::LinkError @@ -3745,23 +4301,81 @@ pub fn aya::programs::links::LinkError::try_from(value: U) -> core::result::Resu impl core::convert::TryInto for aya::programs::links::LinkError where U: core::convert::TryFrom pub type aya::programs::links::LinkError::Error = >::Error pub fn aya::programs::links::LinkError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya::programs::links::LinkError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya::programs::links::LinkError where T: core::fmt::Display + ?core::marker::Sized pub fn aya::programs::links::LinkError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya::programs::links::LinkError where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::links::LinkError where T: 'static + ?core::marker::Sized pub fn aya::programs::links::LinkError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::links::LinkError where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::links::LinkError where T: ?core::marker::Sized pub fn aya::programs::links::LinkError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::links::LinkError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::links::LinkError where T: ?core::marker::Sized pub fn aya::programs::links::LinkError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::links::LinkError pub fn aya::programs::links::LinkError::from(t: T) -> T +#[non_exhaustive] pub enum aya::programs::links::LinkType +pub aya::programs::links::LinkType::Cgroup = 3 +pub aya::programs::links::LinkType::Iter = 4 +pub aya::programs::links::LinkType::KProbeMulti = 8 +pub aya::programs::links::LinkType::Netfilter = 10 +pub aya::programs::links::LinkType::Netkit = 13 +pub aya::programs::links::LinkType::Netns = 5 +pub aya::programs::links::LinkType::PerfEvent = 7 +pub aya::programs::links::LinkType::RawTracePoint = 1 +pub aya::programs::links::LinkType::StructOps = 9 +pub aya::programs::links::LinkType::Tcx = 11 +pub aya::programs::links::LinkType::Tracing = 2 +pub aya::programs::links::LinkType::UProbeMulti = 12 +pub aya::programs::links::LinkType::Unspecified = 0 +pub aya::programs::links::LinkType::Xdp = 6 +impl core::clone::Clone for aya::programs::links::LinkType +pub fn aya::programs::links::LinkType::clone(&self) -> aya::programs::links::LinkType +impl core::cmp::PartialEq for aya::programs::links::LinkType +pub fn aya::programs::links::LinkType::eq(&self, other: &aya::programs::links::LinkType) -> bool +impl core::convert::TryFrom for aya::programs::links::LinkType +pub type aya::programs::links::LinkType::Error = aya::programs::links::LinkError +pub fn aya::programs::links::LinkType::try_from(link_type: aya_obj::generated::linux_bindings_x86_64::bpf_link_type) -> core::result::Result +impl core::fmt::Debug for aya::programs::links::LinkType +pub fn aya::programs::links::LinkType::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Copy for aya::programs::links::LinkType +impl core::marker::StructuralPartialEq for aya::programs::links::LinkType +impl core::marker::Freeze for aya::programs::links::LinkType +impl core::marker::Send for aya::programs::links::LinkType +impl core::marker::Sync for aya::programs::links::LinkType +impl core::marker::Unpin for aya::programs::links::LinkType +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::links::LinkType +impl core::panic::unwind_safe::UnwindSafe for aya::programs::links::LinkType +impl core::convert::Into for aya::programs::links::LinkType where U: core::convert::From +pub fn aya::programs::links::LinkType::into(self) -> U +impl core::convert::TryFrom for aya::programs::links::LinkType where U: core::convert::Into +pub type aya::programs::links::LinkType::Error = core::convert::Infallible +pub fn aya::programs::links::LinkType::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::links::LinkType where U: core::convert::TryFrom +pub type aya::programs::links::LinkType::Error = >::Error +pub fn aya::programs::links::LinkType::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya::programs::links::LinkType where T: core::clone::Clone +pub type aya::programs::links::LinkType::Owned = T +pub fn aya::programs::links::LinkType::clone_into(&self, target: &mut T) +pub fn aya::programs::links::LinkType::to_owned(&self) -> T +impl core::any::Any for aya::programs::links::LinkType where T: 'static + ?core::marker::Sized +pub fn aya::programs::links::LinkType::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::links::LinkType where T: ?core::marker::Sized +pub fn aya::programs::links::LinkType::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::links::LinkType where T: ?core::marker::Sized +pub fn aya::programs::links::LinkType::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::programs::links::LinkType where T: core::clone::Clone +pub unsafe fn aya::programs::links::LinkType::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya::programs::links::LinkType +pub fn aya::programs::links::LinkType::from(t: T) -> T pub struct aya::programs::links::FdLink impl aya::programs::links::FdLink +pub fn aya::programs::links::FdLink::info(&self) -> core::result::Result pub fn aya::programs::links::FdLink::pin>(self, path: P) -> core::result::Result impl aya::programs::links::Link for aya::programs::links::FdLink pub type aya::programs::links::FdLink::Id = aya::programs::links::FdLinkId pub fn aya::programs::links::FdLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::links::FdLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::links::FdLink +impl core::cmp::PartialEq for aya::programs::links::FdLink +pub fn aya::programs::links::FdLink::eq(&self, other: &Self) -> bool impl core::convert::From for aya::programs::links::FdLink pub fn aya::programs::links::FdLink::from(w: aya::programs::extension::ExtensionLink) -> aya::programs::links::FdLink impl core::convert::From for aya::programs::links::FdLink @@ -3776,6 +4390,8 @@ impl core::convert::From for aya::programs::fexit: pub fn aya::programs::fexit::FExitLink::from(b: aya::programs::links::FdLink) -> aya::programs::fexit::FExitLink impl core::convert::From for aya::programs::lsm::LsmLink pub fn aya::programs::lsm::LsmLink::from(b: aya::programs::links::FdLink) -> aya::programs::lsm::LsmLink +impl core::convert::From for aya::programs::lsm_cgroup::LsmLink +pub fn aya::programs::lsm_cgroup::LsmLink::from(b: aya::programs::links::FdLink) -> aya::programs::lsm_cgroup::LsmLink impl core::convert::From for aya::programs::raw_trace_point::RawTracePointLink pub fn aya::programs::raw_trace_point::RawTracePointLink::from(b: aya::programs::links::FdLink) -> aya::programs::raw_trace_point::RawTracePointLink impl core::convert::From for aya::programs::sk_lookup::SkLookupLink @@ -3786,21 +4402,44 @@ impl core::convert::From for aya::programs::li pub fn aya::programs::links::FdLink::from(p: aya::programs::links::PinnedLink) -> Self impl core::convert::From for aya::programs::links::FdLink pub fn aya::programs::links::FdLink::from(w: aya::programs::lsm::LsmLink) -> aya::programs::links::FdLink +impl core::convert::From for aya::programs::links::FdLink +pub fn aya::programs::links::FdLink::from(w: aya::programs::lsm_cgroup::LsmLink) -> aya::programs::links::FdLink impl core::convert::From for aya::programs::links::FdLink pub fn aya::programs::links::FdLink::from(w: aya::programs::raw_trace_point::RawTracePointLink) -> aya::programs::links::FdLink impl core::convert::From for aya::programs::links::FdLink pub fn aya::programs::links::FdLink::from(w: aya::programs::sk_lookup::SkLookupLink) -> aya::programs::links::FdLink impl core::convert::From for aya::programs::links::FdLink pub fn aya::programs::links::FdLink::from(w: aya::programs::tp_btf::BtfTracePointLink) -> aya::programs::links::FdLink +impl core::convert::TryFrom for aya::programs::links::FdLink +pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError +pub fn aya::programs::links::FdLink::try_from(value: aya::programs::cgroup_skb::CgroupSkbLink) -> core::result::Result +impl core::convert::TryFrom for aya::programs::links::FdLink +pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError +pub fn aya::programs::links::FdLink::try_from(value: aya::programs::cgroup_sock::CgroupSockLink) -> core::result::Result +impl core::convert::TryFrom for aya::programs::links::FdLink +pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError +pub fn aya::programs::links::FdLink::try_from(value: aya::programs::cgroup_sock_addr::CgroupSockAddrLink) -> core::result::Result +impl core::convert::TryFrom for aya::programs::links::FdLink +pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError +pub fn aya::programs::links::FdLink::try_from(value: aya::programs::flow_dissector::FlowDissectorLink) -> core::result::Result +impl core::convert::TryFrom for aya::programs::links::FdLink +pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError +pub fn aya::programs::links::FdLink::try_from(value: aya::programs::iter::IterLink) -> core::result::Result impl core::convert::TryFrom for aya::programs::links::FdLink pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError pub fn aya::programs::links::FdLink::try_from(value: aya::programs::kprobe::KProbeLink) -> core::result::Result +impl core::convert::TryFrom for aya::programs::iter::IterLink +pub type aya::programs::iter::IterLink::Error = aya::programs::links::LinkError +pub fn aya::programs::iter::IterLink::try_from(fd_link: aya::programs::links::FdLink) -> core::result::Result impl core::convert::TryFrom for aya::programs::kprobe::KProbeLink pub type aya::programs::kprobe::KProbeLink::Error = aya::programs::links::LinkError pub fn aya::programs::kprobe::KProbeLink::try_from(fd_link: aya::programs::links::FdLink) -> core::result::Result impl core::convert::TryFrom for aya::programs::perf_event::PerfEventLink pub type aya::programs::perf_event::PerfEventLink::Error = aya::programs::links::LinkError pub fn aya::programs::perf_event::PerfEventLink::try_from(fd_link: aya::programs::links::FdLink) -> core::result::Result +impl core::convert::TryFrom for aya::programs::tc::SchedClassifierLink +pub type aya::programs::tc::SchedClassifierLink::Error = aya::programs::links::LinkError +pub fn aya::programs::tc::SchedClassifierLink::try_from(fd_link: aya::programs::links::FdLink) -> core::result::Result impl core::convert::TryFrom for aya::programs::trace_point::TracePointLink pub type aya::programs::trace_point::TracePointLink::Error = aya::programs::links::LinkError pub fn aya::programs::trace_point::TracePointLink::try_from(fd_link: aya::programs::links::FdLink) -> core::result::Result @@ -3813,6 +4452,12 @@ pub fn aya::programs::xdp::XdpLink::try_from(fd_link: aya::programs::links::FdLi impl core::convert::TryFrom for aya::programs::links::FdLink pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError pub fn aya::programs::links::FdLink::try_from(value: aya::programs::perf_event::PerfEventLink) -> core::result::Result +impl core::convert::TryFrom for aya::programs::links::FdLink +pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError +pub fn aya::programs::links::FdLink::try_from(value: aya::programs::sock_ops::SockOpsLink) -> core::result::Result +impl core::convert::TryFrom for aya::programs::links::FdLink +pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError +pub fn aya::programs::links::FdLink::try_from(value: aya::programs::tc::SchedClassifierLink) -> core::result::Result impl core::convert::TryFrom for aya::programs::links::FdLink pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError pub fn aya::programs::links::FdLink::try_from(value: aya::programs::trace_point::TracePointLink) -> core::result::Result @@ -3824,12 +4469,21 @@ pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError pub fn aya::programs::links::FdLink::try_from(value: aya::programs::xdp::XdpLink) -> core::result::Result impl core::fmt::Debug for aya::programs::links::FdLink pub fn aya::programs::links::FdLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::links::FdLink +pub fn aya::programs::links::FdLink::hash(&self, state: &mut H) +impl equivalent::Equivalent for aya::programs::links::FdLinkId +pub fn aya::programs::links::FdLinkId::equivalent(&self, key: &aya::programs::links::FdLink) -> bool +impl<'a> core::convert::TryFrom<&'a aya::programs::tc::SchedClassifierLink> for &'a aya::programs::links::FdLink +pub type &'a aya::programs::links::FdLink::Error = aya::programs::links::LinkError +pub fn &'a aya::programs::links::FdLink::try_from(value: &'a aya::programs::tc::SchedClassifierLink) -> core::result::Result impl core::marker::Freeze for aya::programs::links::FdLink impl core::marker::Send for aya::programs::links::FdLink impl core::marker::Sync for aya::programs::links::FdLink impl core::marker::Unpin for aya::programs::links::FdLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::links::FdLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::links::FdLink +impl equivalent::Equivalent for aya::programs::links::FdLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::links::FdLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::links::FdLink where U: core::convert::From pub fn aya::programs::links::FdLink::into(self) -> U impl core::convert::TryFrom for aya::programs::links::FdLink where U: core::convert::Into @@ -3838,11 +4492,11 @@ pub fn aya::programs::links::FdLink::try_from(value: U) -> core::result::Result< impl core::convert::TryInto for aya::programs::links::FdLink where U: core::convert::TryFrom pub type aya::programs::links::FdLink::Error = >::Error pub fn aya::programs::links::FdLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::links::FdLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::links::FdLink where T: 'static + ?core::marker::Sized pub fn aya::programs::links::FdLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::links::FdLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::links::FdLink where T: ?core::marker::Sized pub fn aya::programs::links::FdLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::links::FdLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::links::FdLink where T: ?core::marker::Sized pub fn aya::programs::links::FdLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::links::FdLink pub fn aya::programs::links::FdLink::from(t: T) -> T @@ -3855,15 +4509,15 @@ pub fn aya::programs::links::FdLinkId::fmt(&self, f: &mut core::fmt::Formatter<' impl core::hash::Hash for aya::programs::links::FdLinkId pub fn aya::programs::links::FdLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::links::FdLinkId +impl equivalent::Equivalent for aya::programs::links::FdLinkId +pub fn aya::programs::links::FdLinkId::equivalent(&self, key: &aya::programs::links::FdLink) -> bool impl core::marker::Freeze for aya::programs::links::FdLinkId impl core::marker::Send for aya::programs::links::FdLinkId impl core::marker::Sync for aya::programs::links::FdLinkId impl core::marker::Unpin for aya::programs::links::FdLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::links::FdLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::links::FdLinkId -impl equivalent::Equivalent for aya::programs::links::FdLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::links::FdLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::links::FdLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::links::FdLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::links::FdLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::links::FdLinkId where U: core::convert::From pub fn aya::programs::links::FdLinkId::into(self) -> U @@ -3873,14 +4527,77 @@ pub fn aya::programs::links::FdLinkId::try_from(value: U) -> core::result::Resul impl core::convert::TryInto for aya::programs::links::FdLinkId where U: core::convert::TryFrom pub type aya::programs::links::FdLinkId::Error = >::Error pub fn aya::programs::links::FdLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::links::FdLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::links::FdLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::links::FdLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::links::FdLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::links::FdLinkId where T: ?core::marker::Sized pub fn aya::programs::links::FdLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::links::FdLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::links::FdLinkId where T: ?core::marker::Sized pub fn aya::programs::links::FdLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::links::FdLinkId pub fn aya::programs::links::FdLinkId::from(t: T) -> T +pub struct aya::programs::links::LinkInfo(_) +impl aya::programs::links::LinkInfo +pub fn aya::programs::links::LinkInfo::id(&self) -> u32 +pub fn aya::programs::links::LinkInfo::link_type(&self) -> core::result::Result +pub fn aya::programs::links::LinkInfo::program_id(&self) -> u32 +impl core::marker::Freeze for aya::programs::links::LinkInfo +impl core::marker::Send for aya::programs::links::LinkInfo +impl core::marker::Sync for aya::programs::links::LinkInfo +impl core::marker::Unpin for aya::programs::links::LinkInfo +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::links::LinkInfo +impl core::panic::unwind_safe::UnwindSafe for aya::programs::links::LinkInfo +impl core::convert::Into for aya::programs::links::LinkInfo where U: core::convert::From +pub fn aya::programs::links::LinkInfo::into(self) -> U +impl core::convert::TryFrom for aya::programs::links::LinkInfo where U: core::convert::Into +pub type aya::programs::links::LinkInfo::Error = core::convert::Infallible +pub fn aya::programs::links::LinkInfo::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::links::LinkInfo where U: core::convert::TryFrom +pub type aya::programs::links::LinkInfo::Error = >::Error +pub fn aya::programs::links::LinkInfo::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya::programs::links::LinkInfo where T: 'static + ?core::marker::Sized +pub fn aya::programs::links::LinkInfo::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::links::LinkInfo where T: ?core::marker::Sized +pub fn aya::programs::links::LinkInfo::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::links::LinkInfo where T: ?core::marker::Sized +pub fn aya::programs::links::LinkInfo::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::programs::links::LinkInfo +pub fn aya::programs::links::LinkInfo::from(t: T) -> T +pub struct aya::programs::links::LinkOrder +impl aya::programs::links::LinkOrder +pub fn aya::programs::links::LinkOrder::after_link(link: &L) -> core::result::Result +pub fn aya::programs::links::LinkOrder::after_program(program: &P) -> core::result::Result +pub fn aya::programs::links::LinkOrder::after_program_id(id: aya::programs::ProgramId) -> Self +pub fn aya::programs::links::LinkOrder::before_link(link: &L) -> core::result::Result +pub fn aya::programs::links::LinkOrder::before_program(program: &P) -> core::result::Result +pub fn aya::programs::links::LinkOrder::before_program_id(id: aya::programs::ProgramId) -> Self +pub fn aya::programs::links::LinkOrder::first() -> Self +pub fn aya::programs::links::LinkOrder::last() -> Self +impl core::default::Default for aya::programs::links::LinkOrder +pub fn aya::programs::links::LinkOrder::default() -> Self +impl core::fmt::Debug for aya::programs::links::LinkOrder +pub fn aya::programs::links::LinkOrder::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Freeze for aya::programs::links::LinkOrder +impl core::marker::Send for aya::programs::links::LinkOrder +impl core::marker::Sync for aya::programs::links::LinkOrder +impl core::marker::Unpin for aya::programs::links::LinkOrder +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::links::LinkOrder +impl core::panic::unwind_safe::UnwindSafe for aya::programs::links::LinkOrder +impl core::convert::Into for aya::programs::links::LinkOrder where U: core::convert::From +pub fn aya::programs::links::LinkOrder::into(self) -> U +impl core::convert::TryFrom for aya::programs::links::LinkOrder where U: core::convert::Into +pub type aya::programs::links::LinkOrder::Error = core::convert::Infallible +pub fn aya::programs::links::LinkOrder::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::links::LinkOrder where U: core::convert::TryFrom +pub type aya::programs::links::LinkOrder::Error = >::Error +pub fn aya::programs::links::LinkOrder::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya::programs::links::LinkOrder where T: 'static + ?core::marker::Sized +pub fn aya::programs::links::LinkOrder::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::links::LinkOrder where T: ?core::marker::Sized +pub fn aya::programs::links::LinkOrder::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::links::LinkOrder where T: ?core::marker::Sized +pub fn aya::programs::links::LinkOrder::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::programs::links::LinkOrder +pub fn aya::programs::links::LinkOrder::from(t: T) -> T pub struct aya::programs::links::PinnedLink impl aya::programs::links::PinnedLink pub fn aya::programs::links::PinnedLink::from_pin>(path: P) -> core::result::Result @@ -3903,11 +4620,11 @@ pub fn aya::programs::links::PinnedLink::try_from(value: U) -> core::result::Res impl core::convert::TryInto for aya::programs::links::PinnedLink where U: core::convert::TryFrom pub type aya::programs::links::PinnedLink::Error = >::Error pub fn aya::programs::links::PinnedLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::links::PinnedLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::links::PinnedLink where T: 'static + ?core::marker::Sized pub fn aya::programs::links::PinnedLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::links::PinnedLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::links::PinnedLink where T: ?core::marker::Sized pub fn aya::programs::links::PinnedLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::links::PinnedLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::links::PinnedLink where T: ?core::marker::Sized pub fn aya::programs::links::PinnedLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::links::PinnedLink pub fn aya::programs::links::PinnedLink::from(t: T) -> T @@ -3916,26 +4633,31 @@ impl aya::programs::links::Link for aya::programs::links::ProgAttachLink pub type aya::programs::links::ProgAttachLink::Id = aya::programs::links::ProgAttachLinkId pub fn aya::programs::links::ProgAttachLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::links::ProgAttachLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::links::ProgAttachLink +impl core::cmp::PartialEq for aya::programs::links::ProgAttachLink +pub fn aya::programs::links::ProgAttachLink::eq(&self, other: &Self) -> bool impl core::convert::From for aya::programs::sk_msg::SkMsgLink pub fn aya::programs::sk_msg::SkMsgLink::from(b: aya::programs::links::ProgAttachLink) -> aya::programs::sk_msg::SkMsgLink impl core::convert::From for aya::programs::sk_skb::SkSkbLink pub fn aya::programs::sk_skb::SkSkbLink::from(b: aya::programs::links::ProgAttachLink) -> aya::programs::sk_skb::SkSkbLink -impl core::convert::From for aya::programs::sock_ops::SockOpsLink -pub fn aya::programs::sock_ops::SockOpsLink::from(b: aya::programs::links::ProgAttachLink) -> aya::programs::sock_ops::SockOpsLink impl core::convert::From for aya::programs::links::ProgAttachLink pub fn aya::programs::links::ProgAttachLink::from(w: aya::programs::sk_msg::SkMsgLink) -> aya::programs::links::ProgAttachLink impl core::convert::From for aya::programs::links::ProgAttachLink pub fn aya::programs::links::ProgAttachLink::from(w: aya::programs::sk_skb::SkSkbLink) -> aya::programs::links::ProgAttachLink -impl core::convert::From for aya::programs::links::ProgAttachLink -pub fn aya::programs::links::ProgAttachLink::from(w: aya::programs::sock_ops::SockOpsLink) -> aya::programs::links::ProgAttachLink impl core::fmt::Debug for aya::programs::links::ProgAttachLink pub fn aya::programs::links::ProgAttachLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::links::ProgAttachLink +pub fn aya::programs::links::ProgAttachLink::hash(&self, state: &mut H) +impl equivalent::Equivalent for aya::programs::links::ProgAttachLinkId +pub fn aya::programs::links::ProgAttachLinkId::equivalent(&self, key: &aya::programs::links::ProgAttachLink) -> bool impl core::marker::Freeze for aya::programs::links::ProgAttachLink impl core::marker::Send for aya::programs::links::ProgAttachLink impl core::marker::Sync for aya::programs::links::ProgAttachLink impl core::marker::Unpin for aya::programs::links::ProgAttachLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::links::ProgAttachLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::links::ProgAttachLink +impl equivalent::Equivalent for aya::programs::links::ProgAttachLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::links::ProgAttachLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::links::ProgAttachLink where U: core::convert::From pub fn aya::programs::links::ProgAttachLink::into(self) -> U impl core::convert::TryFrom for aya::programs::links::ProgAttachLink where U: core::convert::Into @@ -3944,11 +4666,11 @@ pub fn aya::programs::links::ProgAttachLink::try_from(value: U) -> core::result: impl core::convert::TryInto for aya::programs::links::ProgAttachLink where U: core::convert::TryFrom pub type aya::programs::links::ProgAttachLink::Error = >::Error pub fn aya::programs::links::ProgAttachLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::links::ProgAttachLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::links::ProgAttachLink where T: 'static + ?core::marker::Sized pub fn aya::programs::links::ProgAttachLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::links::ProgAttachLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::links::ProgAttachLink where T: ?core::marker::Sized pub fn aya::programs::links::ProgAttachLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::links::ProgAttachLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::links::ProgAttachLink where T: ?core::marker::Sized pub fn aya::programs::links::ProgAttachLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::links::ProgAttachLink pub fn aya::programs::links::ProgAttachLink::from(t: T) -> T @@ -3961,15 +4683,15 @@ pub fn aya::programs::links::ProgAttachLinkId::fmt(&self, f: &mut core::fmt::For impl core::hash::Hash for aya::programs::links::ProgAttachLinkId pub fn aya::programs::links::ProgAttachLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::links::ProgAttachLinkId +impl equivalent::Equivalent for aya::programs::links::ProgAttachLinkId +pub fn aya::programs::links::ProgAttachLinkId::equivalent(&self, key: &aya::programs::links::ProgAttachLink) -> bool impl core::marker::Freeze for aya::programs::links::ProgAttachLinkId impl core::marker::Send for aya::programs::links::ProgAttachLinkId impl core::marker::Sync for aya::programs::links::ProgAttachLinkId impl core::marker::Unpin for aya::programs::links::ProgAttachLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::links::ProgAttachLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::links::ProgAttachLinkId -impl equivalent::Equivalent for aya::programs::links::ProgAttachLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::links::ProgAttachLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::links::ProgAttachLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::links::ProgAttachLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::links::ProgAttachLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::links::ProgAttachLinkId where U: core::convert::From pub fn aya::programs::links::ProgAttachLinkId::into(self) -> U @@ -3979,16 +4701,16 @@ pub fn aya::programs::links::ProgAttachLinkId::try_from(value: U) -> core::resul impl core::convert::TryInto for aya::programs::links::ProgAttachLinkId where U: core::convert::TryFrom pub type aya::programs::links::ProgAttachLinkId::Error = >::Error pub fn aya::programs::links::ProgAttachLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::links::ProgAttachLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::links::ProgAttachLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::links::ProgAttachLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::links::ProgAttachLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::links::ProgAttachLinkId where T: ?core::marker::Sized pub fn aya::programs::links::ProgAttachLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::links::ProgAttachLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::links::ProgAttachLinkId where T: ?core::marker::Sized pub fn aya::programs::links::ProgAttachLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::links::ProgAttachLinkId pub fn aya::programs::links::ProgAttachLinkId::from(t: T) -> T -pub trait aya::programs::links::Link: core::fmt::Debug + 'static -pub type aya::programs::links::Link::Id: core::fmt::Debug + core::hash::Hash + core::cmp::Eq + core::cmp::PartialEq +pub trait aya::programs::links::Link: core::fmt::Debug + core::cmp::Eq + core::hash::Hash + 'static +pub type aya::programs::links::Link::Id: core::fmt::Debug + core::cmp::Eq + core::hash::Hash + equivalent::Equivalent pub fn aya::programs::links::Link::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::links::Link::id(&self) -> Self::Id impl aya::programs::links::Link for aya::programs::cgroup_device::CgroupDeviceLink @@ -4027,6 +4749,14 @@ impl aya::programs::links::Link for aya::programs::fexit::FExitLink pub type aya::programs::fexit::FExitLink::Id = aya::programs::fexit::FExitLinkId pub fn aya::programs::fexit::FExitLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::fexit::FExitLink::id(&self) -> Self::Id +impl aya::programs::links::Link for aya::programs::flow_dissector::FlowDissectorLink +pub type aya::programs::flow_dissector::FlowDissectorLink::Id = aya::programs::flow_dissector::FlowDissectorLinkId +pub fn aya::programs::flow_dissector::FlowDissectorLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> +pub fn aya::programs::flow_dissector::FlowDissectorLink::id(&self) -> Self::Id +impl aya::programs::links::Link for aya::programs::iter::IterLink +pub type aya::programs::iter::IterLink::Id = aya::programs::iter::IterLinkId +pub fn aya::programs::iter::IterLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> +pub fn aya::programs::iter::IterLink::id(&self) -> Self::Id impl aya::programs::links::Link for aya::programs::kprobe::KProbeLink pub type aya::programs::kprobe::KProbeLink::Id = aya::programs::kprobe::KProbeLinkId pub fn aya::programs::kprobe::KProbeLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> @@ -4047,6 +4777,10 @@ impl aya::programs::links::Link for aya::programs::lsm::LsmLink pub type aya::programs::lsm::LsmLink::Id = aya::programs::lsm::LsmLinkId pub fn aya::programs::lsm::LsmLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::lsm::LsmLink::id(&self) -> Self::Id +impl aya::programs::links::Link for aya::programs::lsm_cgroup::LsmLink +pub type aya::programs::lsm_cgroup::LsmLink::Id = aya::programs::lsm_cgroup::LsmLinkId +pub fn aya::programs::lsm_cgroup::LsmLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> +pub fn aya::programs::lsm_cgroup::LsmLink::id(&self) -> Self::Id impl aya::programs::links::Link for aya::programs::perf_attach::PerfLink pub type aya::programs::perf_attach::PerfLink::Id = aya::programs::perf_attach::PerfLinkId pub fn aya::programs::perf_attach::PerfLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> @@ -4107,14 +4841,23 @@ impl aya::programs::links::Link for aya::programs::lirc_mode2::LircLink pub type aya::programs::lirc_mode2::LircLink::Id = aya::programs::lirc_mode2::LircLinkId pub fn aya::programs::lirc_mode2::LircLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::lirc_mode2::LircLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::lirc_mode2::LircLink +impl core::cmp::PartialEq for aya::programs::lirc_mode2::LircLink +pub fn aya::programs::lirc_mode2::LircLink::eq(&self, other: &Self) -> bool impl core::fmt::Debug for aya::programs::lirc_mode2::LircLink pub fn aya::programs::lirc_mode2::LircLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::lirc_mode2::LircLink +pub fn aya::programs::lirc_mode2::LircLink::hash(&self, state: &mut H) +impl equivalent::Equivalent for aya::programs::lirc_mode2::LircLinkId +pub fn aya::programs::lirc_mode2::LircLinkId::equivalent(&self, key: &aya::programs::lirc_mode2::LircLink) -> bool impl core::marker::Freeze for aya::programs::lirc_mode2::LircLink impl core::marker::Send for aya::programs::lirc_mode2::LircLink impl core::marker::Sync for aya::programs::lirc_mode2::LircLink impl core::marker::Unpin for aya::programs::lirc_mode2::LircLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::lirc_mode2::LircLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::lirc_mode2::LircLink +impl equivalent::Equivalent for aya::programs::lirc_mode2::LircLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::lirc_mode2::LircLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::lirc_mode2::LircLink where U: core::convert::From pub fn aya::programs::lirc_mode2::LircLink::into(self) -> U impl core::convert::TryFrom for aya::programs::lirc_mode2::LircLink where U: core::convert::Into @@ -4123,11 +4866,11 @@ pub fn aya::programs::lirc_mode2::LircLink::try_from(value: U) -> core::result:: impl core::convert::TryInto for aya::programs::lirc_mode2::LircLink where U: core::convert::TryFrom pub type aya::programs::lirc_mode2::LircLink::Error = >::Error pub fn aya::programs::lirc_mode2::LircLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::lirc_mode2::LircLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::lirc_mode2::LircLink where T: 'static + ?core::marker::Sized pub fn aya::programs::lirc_mode2::LircLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::lirc_mode2::LircLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::lirc_mode2::LircLink where T: ?core::marker::Sized pub fn aya::programs::lirc_mode2::LircLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::lirc_mode2::LircLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::lirc_mode2::LircLink where T: ?core::marker::Sized pub fn aya::programs::lirc_mode2::LircLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::lirc_mode2::LircLink pub fn aya::programs::lirc_mode2::LircLink::from(t: T) -> T @@ -4140,15 +4883,15 @@ pub fn aya::programs::lirc_mode2::LircLinkId::fmt(&self, f: &mut core::fmt::Form impl core::hash::Hash for aya::programs::lirc_mode2::LircLinkId pub fn aya::programs::lirc_mode2::LircLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::lirc_mode2::LircLinkId +impl equivalent::Equivalent for aya::programs::lirc_mode2::LircLinkId +pub fn aya::programs::lirc_mode2::LircLinkId::equivalent(&self, key: &aya::programs::lirc_mode2::LircLink) -> bool impl core::marker::Freeze for aya::programs::lirc_mode2::LircLinkId impl core::marker::Send for aya::programs::lirc_mode2::LircLinkId impl core::marker::Sync for aya::programs::lirc_mode2::LircLinkId impl core::marker::Unpin for aya::programs::lirc_mode2::LircLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::lirc_mode2::LircLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::lirc_mode2::LircLinkId -impl equivalent::Equivalent for aya::programs::lirc_mode2::LircLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::lirc_mode2::LircLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::lirc_mode2::LircLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::lirc_mode2::LircLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::lirc_mode2::LircLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::lirc_mode2::LircLinkId where U: core::convert::From pub fn aya::programs::lirc_mode2::LircLinkId::into(self) -> U @@ -4158,16 +4901,17 @@ pub fn aya::programs::lirc_mode2::LircLinkId::try_from(value: U) -> core::result impl core::convert::TryInto for aya::programs::lirc_mode2::LircLinkId where U: core::convert::TryFrom pub type aya::programs::lirc_mode2::LircLinkId::Error = >::Error pub fn aya::programs::lirc_mode2::LircLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::lirc_mode2::LircLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::lirc_mode2::LircLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::lirc_mode2::LircLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::lirc_mode2::LircLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::lirc_mode2::LircLinkId where T: ?core::marker::Sized pub fn aya::programs::lirc_mode2::LircLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::lirc_mode2::LircLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::lirc_mode2::LircLinkId where T: ?core::marker::Sized pub fn aya::programs::lirc_mode2::LircLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::lirc_mode2::LircLinkId pub fn aya::programs::lirc_mode2::LircLinkId::from(t: T) -> T pub struct aya::programs::lirc_mode2::LircMode2 impl aya::programs::lirc_mode2::LircMode2 +pub const aya::programs::lirc_mode2::LircMode2::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::lirc_mode2::LircMode2::attach(&mut self, lircdev: T) -> core::result::Result pub fn aya::programs::lirc_mode2::LircMode2::detach(&mut self, link_id: aya::programs::lirc_mode2::LircLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::lirc_mode2::LircMode2::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> @@ -4178,10 +4922,12 @@ pub fn aya::programs::lirc_mode2::LircMode2::fd(&self) -> core::result::Result<& impl aya::programs::lirc_mode2::LircMode2 pub fn aya::programs::lirc_mode2::LircMode2::from_pin>(path: P) -> core::result::Result impl aya::programs::lirc_mode2::LircMode2 +pub fn aya::programs::lirc_mode2::LircMode2::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::lirc_mode2::LircMode2 pub fn aya::programs::lirc_mode2::LircMode2::info(&self) -> core::result::Result impl aya::programs::lirc_mode2::LircMode2 pub fn aya::programs::lirc_mode2::LircMode2::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::lirc_mode2::LircMode2::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::lirc_mode2::LircMode2::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::lirc_mode2::LircMode2 pub fn aya::programs::lirc_mode2::LircMode2::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::lirc_mode2::LircMode2 @@ -4208,30 +4954,34 @@ pub fn aya::programs::lirc_mode2::LircMode2::try_from(value: U) -> core::result: impl core::convert::TryInto for aya::programs::lirc_mode2::LircMode2 where U: core::convert::TryFrom pub type aya::programs::lirc_mode2::LircMode2::Error = >::Error pub fn aya::programs::lirc_mode2::LircMode2::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::lirc_mode2::LircMode2 where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::lirc_mode2::LircMode2 where T: 'static + ?core::marker::Sized pub fn aya::programs::lirc_mode2::LircMode2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::lirc_mode2::LircMode2 where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::lirc_mode2::LircMode2 where T: ?core::marker::Sized pub fn aya::programs::lirc_mode2::LircMode2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::lirc_mode2::LircMode2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::lirc_mode2::LircMode2 where T: ?core::marker::Sized pub fn aya::programs::lirc_mode2::LircMode2::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::lirc_mode2::LircMode2 pub fn aya::programs::lirc_mode2::LircMode2::from(t: T) -> T pub mod aya::programs::lsm pub struct aya::programs::lsm::Lsm impl aya::programs::lsm::Lsm +pub const aya::programs::lsm::Lsm::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::lsm::Lsm::attach(&mut self) -> core::result::Result -pub fn aya::programs::lsm::Lsm::detach(&mut self, link_id: aya::programs::lsm::LsmLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::lsm::Lsm::load(&mut self, lsm_hook_name: &str, btf: &aya_obj::btf::btf::Btf) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::lsm::Lsm +pub fn aya::programs::lsm::Lsm::detach(&mut self, link_id: aya::programs::lsm::LsmLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::lsm::Lsm::take_link(&mut self, link_id: aya::programs::lsm::LsmLinkId) -> core::result::Result impl aya::programs::lsm::Lsm pub fn aya::programs::lsm::Lsm::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::lsm::Lsm pub fn aya::programs::lsm::Lsm::from_pin>(path: P) -> core::result::Result impl aya::programs::lsm::Lsm +pub fn aya::programs::lsm::Lsm::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::lsm::Lsm pub fn aya::programs::lsm::Lsm::info(&self) -> core::result::Result impl aya::programs::lsm::Lsm pub fn aya::programs::lsm::Lsm::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::lsm::Lsm::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::lsm::Lsm::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::lsm::Lsm pub fn aya::programs::lsm::Lsm::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::lsm::Lsm @@ -4258,11 +5008,11 @@ pub fn aya::programs::lsm::Lsm::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::programs::lsm::Lsm where U: core::convert::TryFrom pub type aya::programs::lsm::Lsm::Error = >::Error pub fn aya::programs::lsm::Lsm::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::lsm::Lsm where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::lsm::Lsm where T: 'static + ?core::marker::Sized pub fn aya::programs::lsm::Lsm::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::lsm::Lsm where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::lsm::Lsm where T: ?core::marker::Sized pub fn aya::programs::lsm::Lsm::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::lsm::Lsm where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::lsm::Lsm where T: ?core::marker::Sized pub fn aya::programs::lsm::Lsm::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::lsm::Lsm pub fn aya::programs::lsm::Lsm::from(t: T) -> T @@ -4271,20 +5021,29 @@ impl aya::programs::links::Link for aya::programs::lsm::LsmLink pub type aya::programs::lsm::LsmLink::Id = aya::programs::lsm::LsmLinkId pub fn aya::programs::lsm::LsmLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::lsm::LsmLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::lsm::LsmLink +impl core::cmp::PartialEq for aya::programs::lsm::LsmLink +pub fn aya::programs::lsm::LsmLink::eq(&self, other: &Self) -> bool impl core::convert::From for aya::programs::lsm::LsmLink pub fn aya::programs::lsm::LsmLink::from(b: aya::programs::links::FdLink) -> aya::programs::lsm::LsmLink impl core::convert::From for aya::programs::links::FdLink pub fn aya::programs::links::FdLink::from(w: aya::programs::lsm::LsmLink) -> aya::programs::links::FdLink impl core::fmt::Debug for aya::programs::lsm::LsmLink pub fn aya::programs::lsm::LsmLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::lsm::LsmLink +pub fn aya::programs::lsm::LsmLink::hash(&self, state: &mut H) impl core::ops::drop::Drop for aya::programs::lsm::LsmLink pub fn aya::programs::lsm::LsmLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::lsm::LsmLinkId +pub fn aya::programs::lsm::LsmLinkId::equivalent(&self, key: &aya::programs::lsm::LsmLink) -> bool impl core::marker::Freeze for aya::programs::lsm::LsmLink impl core::marker::Send for aya::programs::lsm::LsmLink impl core::marker::Sync for aya::programs::lsm::LsmLink impl core::marker::Unpin for aya::programs::lsm::LsmLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::lsm::LsmLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::lsm::LsmLink +impl equivalent::Equivalent for aya::programs::lsm::LsmLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::lsm::LsmLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::lsm::LsmLink where U: core::convert::From pub fn aya::programs::lsm::LsmLink::into(self) -> U impl core::convert::TryFrom for aya::programs::lsm::LsmLink where U: core::convert::Into @@ -4293,11 +5052,11 @@ pub fn aya::programs::lsm::LsmLink::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::programs::lsm::LsmLink where U: core::convert::TryFrom pub type aya::programs::lsm::LsmLink::Error = >::Error pub fn aya::programs::lsm::LsmLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::lsm::LsmLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::lsm::LsmLink where T: 'static + ?core::marker::Sized pub fn aya::programs::lsm::LsmLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::lsm::LsmLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::lsm::LsmLink where T: ?core::marker::Sized pub fn aya::programs::lsm::LsmLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::lsm::LsmLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::lsm::LsmLink where T: ?core::marker::Sized pub fn aya::programs::lsm::LsmLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::lsm::LsmLink pub fn aya::programs::lsm::LsmLink::from(t: T) -> T @@ -4310,15 +5069,15 @@ pub fn aya::programs::lsm::LsmLinkId::fmt(&self, f: &mut core::fmt::Formatter<'_ impl core::hash::Hash for aya::programs::lsm::LsmLinkId pub fn aya::programs::lsm::LsmLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::lsm::LsmLinkId +impl equivalent::Equivalent for aya::programs::lsm::LsmLinkId +pub fn aya::programs::lsm::LsmLinkId::equivalent(&self, key: &aya::programs::lsm::LsmLink) -> bool impl core::marker::Freeze for aya::programs::lsm::LsmLinkId impl core::marker::Send for aya::programs::lsm::LsmLinkId impl core::marker::Sync for aya::programs::lsm::LsmLinkId impl core::marker::Unpin for aya::programs::lsm::LsmLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::lsm::LsmLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::lsm::LsmLinkId -impl equivalent::Equivalent for aya::programs::lsm::LsmLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::lsm::LsmLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::lsm::LsmLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::lsm::LsmLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::lsm::LsmLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::lsm::LsmLinkId where U: core::convert::From pub fn aya::programs::lsm::LsmLinkId::into(self) -> U @@ -4328,28 +5087,166 @@ pub fn aya::programs::lsm::LsmLinkId::try_from(value: U) -> core::result::Result impl core::convert::TryInto for aya::programs::lsm::LsmLinkId where U: core::convert::TryFrom pub type aya::programs::lsm::LsmLinkId::Error = >::Error pub fn aya::programs::lsm::LsmLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::lsm::LsmLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::lsm::LsmLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::lsm::LsmLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::lsm::LsmLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::lsm::LsmLinkId where T: ?core::marker::Sized pub fn aya::programs::lsm::LsmLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::lsm::LsmLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::lsm::LsmLinkId where T: ?core::marker::Sized pub fn aya::programs::lsm::LsmLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::lsm::LsmLinkId pub fn aya::programs::lsm::LsmLinkId::from(t: T) -> T +pub mod aya::programs::lsm_cgroup +pub struct aya::programs::lsm_cgroup::LsmCgroup +impl aya::programs::lsm_cgroup::LsmCgroup +pub fn aya::programs::lsm_cgroup::LsmCgroup::attach(&mut self, cgroup: T) -> core::result::Result +pub fn aya::programs::lsm_cgroup::LsmCgroup::from_pin>(path: P) -> core::result::Result +pub fn aya::programs::lsm_cgroup::LsmCgroup::load(&mut self, lsm_hook_name: &str, btf: &aya_obj::btf::btf::Btf) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::lsm_cgroup::LsmCgroup +pub fn aya::programs::lsm_cgroup::LsmCgroup::detach(&mut self, link_id: aya::programs::lsm_cgroup::LsmLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub fn aya::programs::lsm_cgroup::LsmCgroup::take_link(&mut self, link_id: aya::programs::lsm_cgroup::LsmLinkId) -> core::result::Result +impl aya::programs::lsm_cgroup::LsmCgroup +pub fn aya::programs::lsm_cgroup::LsmCgroup::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> +impl aya::programs::lsm_cgroup::LsmCgroup +pub fn aya::programs::lsm_cgroup::LsmCgroup::info(&self) -> core::result::Result +impl aya::programs::lsm_cgroup::LsmCgroup +pub fn aya::programs::lsm_cgroup::LsmCgroup::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::programs::lsm_cgroup::LsmCgroup::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> +impl aya::programs::lsm_cgroup::LsmCgroup +pub fn aya::programs::lsm_cgroup::LsmCgroup::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl core::fmt::Debug for aya::programs::lsm_cgroup::LsmCgroup +pub fn aya::programs::lsm_cgroup::LsmCgroup::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::ops::drop::Drop for aya::programs::lsm_cgroup::LsmCgroup +pub fn aya::programs::lsm_cgroup::LsmCgroup::drop(&mut self) +impl<'a> core::convert::TryFrom<&'a aya::programs::Program> for &'a aya::programs::lsm_cgroup::LsmCgroup +pub type &'a aya::programs::lsm_cgroup::LsmCgroup::Error = aya::programs::ProgramError +pub fn &'a aya::programs::lsm_cgroup::LsmCgroup::try_from(program: &'a aya::programs::Program) -> core::result::Result<&'a aya::programs::lsm_cgroup::LsmCgroup, aya::programs::ProgramError> +impl<'a> core::convert::TryFrom<&'a mut aya::programs::Program> for &'a mut aya::programs::lsm_cgroup::LsmCgroup +pub type &'a mut aya::programs::lsm_cgroup::LsmCgroup::Error = aya::programs::ProgramError +pub fn &'a mut aya::programs::lsm_cgroup::LsmCgroup::try_from(program: &'a mut aya::programs::Program) -> core::result::Result<&'a mut aya::programs::lsm_cgroup::LsmCgroup, aya::programs::ProgramError> +impl core::marker::Freeze for aya::programs::lsm_cgroup::LsmCgroup +impl core::marker::Send for aya::programs::lsm_cgroup::LsmCgroup +impl core::marker::Sync for aya::programs::lsm_cgroup::LsmCgroup +impl core::marker::Unpin for aya::programs::lsm_cgroup::LsmCgroup +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::lsm_cgroup::LsmCgroup +impl core::panic::unwind_safe::UnwindSafe for aya::programs::lsm_cgroup::LsmCgroup +impl core::convert::Into for aya::programs::lsm_cgroup::LsmCgroup where U: core::convert::From +pub fn aya::programs::lsm_cgroup::LsmCgroup::into(self) -> U +impl core::convert::TryFrom for aya::programs::lsm_cgroup::LsmCgroup where U: core::convert::Into +pub type aya::programs::lsm_cgroup::LsmCgroup::Error = core::convert::Infallible +pub fn aya::programs::lsm_cgroup::LsmCgroup::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::lsm_cgroup::LsmCgroup where U: core::convert::TryFrom +pub type aya::programs::lsm_cgroup::LsmCgroup::Error = >::Error +pub fn aya::programs::lsm_cgroup::LsmCgroup::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya::programs::lsm_cgroup::LsmCgroup where T: 'static + ?core::marker::Sized +pub fn aya::programs::lsm_cgroup::LsmCgroup::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::lsm_cgroup::LsmCgroup where T: ?core::marker::Sized +pub fn aya::programs::lsm_cgroup::LsmCgroup::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::lsm_cgroup::LsmCgroup where T: ?core::marker::Sized +pub fn aya::programs::lsm_cgroup::LsmCgroup::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::programs::lsm_cgroup::LsmCgroup +pub fn aya::programs::lsm_cgroup::LsmCgroup::from(t: T) -> T +pub struct aya::programs::lsm_cgroup::LsmLink(_) +impl aya::programs::links::Link for aya::programs::lsm_cgroup::LsmLink +pub type aya::programs::lsm_cgroup::LsmLink::Id = aya::programs::lsm_cgroup::LsmLinkId +pub fn aya::programs::lsm_cgroup::LsmLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> +pub fn aya::programs::lsm_cgroup::LsmLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::lsm_cgroup::LsmLink +impl core::cmp::PartialEq for aya::programs::lsm_cgroup::LsmLink +pub fn aya::programs::lsm_cgroup::LsmLink::eq(&self, other: &Self) -> bool +impl core::convert::From for aya::programs::lsm_cgroup::LsmLink +pub fn aya::programs::lsm_cgroup::LsmLink::from(b: aya::programs::links::FdLink) -> aya::programs::lsm_cgroup::LsmLink +impl core::convert::From for aya::programs::links::FdLink +pub fn aya::programs::links::FdLink::from(w: aya::programs::lsm_cgroup::LsmLink) -> aya::programs::links::FdLink +impl core::fmt::Debug for aya::programs::lsm_cgroup::LsmLink +pub fn aya::programs::lsm_cgroup::LsmLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::lsm_cgroup::LsmLink +pub fn aya::programs::lsm_cgroup::LsmLink::hash(&self, state: &mut H) +impl core::ops::drop::Drop for aya::programs::lsm_cgroup::LsmLink +pub fn aya::programs::lsm_cgroup::LsmLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::lsm_cgroup::LsmLinkId +pub fn aya::programs::lsm_cgroup::LsmLinkId::equivalent(&self, key: &aya::programs::lsm_cgroup::LsmLink) -> bool +impl core::marker::Freeze for aya::programs::lsm_cgroup::LsmLink +impl core::marker::Send for aya::programs::lsm_cgroup::LsmLink +impl core::marker::Sync for aya::programs::lsm_cgroup::LsmLink +impl core::marker::Unpin for aya::programs::lsm_cgroup::LsmLink +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::lsm_cgroup::LsmLink +impl core::panic::unwind_safe::UnwindSafe for aya::programs::lsm_cgroup::LsmLink +impl equivalent::Equivalent for aya::programs::lsm_cgroup::LsmLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::lsm_cgroup::LsmLink::equivalent(&self, key: &K) -> bool +impl core::convert::Into for aya::programs::lsm_cgroup::LsmLink where U: core::convert::From +pub fn aya::programs::lsm_cgroup::LsmLink::into(self) -> U +impl core::convert::TryFrom for aya::programs::lsm_cgroup::LsmLink where U: core::convert::Into +pub type aya::programs::lsm_cgroup::LsmLink::Error = core::convert::Infallible +pub fn aya::programs::lsm_cgroup::LsmLink::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::lsm_cgroup::LsmLink where U: core::convert::TryFrom +pub type aya::programs::lsm_cgroup::LsmLink::Error = >::Error +pub fn aya::programs::lsm_cgroup::LsmLink::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya::programs::lsm_cgroup::LsmLink where T: 'static + ?core::marker::Sized +pub fn aya::programs::lsm_cgroup::LsmLink::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::lsm_cgroup::LsmLink where T: ?core::marker::Sized +pub fn aya::programs::lsm_cgroup::LsmLink::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::lsm_cgroup::LsmLink where T: ?core::marker::Sized +pub fn aya::programs::lsm_cgroup::LsmLink::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::programs::lsm_cgroup::LsmLink +pub fn aya::programs::lsm_cgroup::LsmLink::from(t: T) -> T +pub struct aya::programs::lsm_cgroup::LsmLinkId(_) +impl core::cmp::Eq for aya::programs::lsm_cgroup::LsmLinkId +impl core::cmp::PartialEq for aya::programs::lsm_cgroup::LsmLinkId +pub fn aya::programs::lsm_cgroup::LsmLinkId::eq(&self, other: &aya::programs::lsm_cgroup::LsmLinkId) -> bool +impl core::fmt::Debug for aya::programs::lsm_cgroup::LsmLinkId +pub fn aya::programs::lsm_cgroup::LsmLinkId::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::lsm_cgroup::LsmLinkId +pub fn aya::programs::lsm_cgroup::LsmLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::StructuralPartialEq for aya::programs::lsm_cgroup::LsmLinkId +impl equivalent::Equivalent for aya::programs::lsm_cgroup::LsmLinkId +pub fn aya::programs::lsm_cgroup::LsmLinkId::equivalent(&self, key: &aya::programs::lsm_cgroup::LsmLink) -> bool +impl core::marker::Freeze for aya::programs::lsm_cgroup::LsmLinkId +impl core::marker::Send for aya::programs::lsm_cgroup::LsmLinkId +impl core::marker::Sync for aya::programs::lsm_cgroup::LsmLinkId +impl core::marker::Unpin for aya::programs::lsm_cgroup::LsmLinkId +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::lsm_cgroup::LsmLinkId +impl core::panic::unwind_safe::UnwindSafe for aya::programs::lsm_cgroup::LsmLinkId +impl equivalent::Equivalent for aya::programs::lsm_cgroup::LsmLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::lsm_cgroup::LsmLinkId::equivalent(&self, key: &K) -> bool +impl core::convert::Into for aya::programs::lsm_cgroup::LsmLinkId where U: core::convert::From +pub fn aya::programs::lsm_cgroup::LsmLinkId::into(self) -> U +impl core::convert::TryFrom for aya::programs::lsm_cgroup::LsmLinkId where U: core::convert::Into +pub type aya::programs::lsm_cgroup::LsmLinkId::Error = core::convert::Infallible +pub fn aya::programs::lsm_cgroup::LsmLinkId::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::lsm_cgroup::LsmLinkId where U: core::convert::TryFrom +pub type aya::programs::lsm_cgroup::LsmLinkId::Error = >::Error +pub fn aya::programs::lsm_cgroup::LsmLinkId::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya::programs::lsm_cgroup::LsmLinkId where T: 'static + ?core::marker::Sized +pub fn aya::programs::lsm_cgroup::LsmLinkId::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::lsm_cgroup::LsmLinkId where T: ?core::marker::Sized +pub fn aya::programs::lsm_cgroup::LsmLinkId::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::lsm_cgroup::LsmLinkId where T: ?core::marker::Sized +pub fn aya::programs::lsm_cgroup::LsmLinkId::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::programs::lsm_cgroup::LsmLinkId +pub fn aya::programs::lsm_cgroup::LsmLinkId::from(t: T) -> T pub mod aya::programs::perf_attach pub struct aya::programs::perf_attach::PerfLink impl aya::programs::links::Link for aya::programs::perf_attach::PerfLink pub type aya::programs::perf_attach::PerfLink::Id = aya::programs::perf_attach::PerfLinkId pub fn aya::programs::perf_attach::PerfLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::perf_attach::PerfLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::perf_attach::PerfLink +impl core::cmp::PartialEq for aya::programs::perf_attach::PerfLink +pub fn aya::programs::perf_attach::PerfLink::eq(&self, other: &Self) -> bool impl core::fmt::Debug for aya::programs::perf_attach::PerfLink pub fn aya::programs::perf_attach::PerfLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::perf_attach::PerfLink +pub fn aya::programs::perf_attach::PerfLink::hash(&self, state: &mut H) +impl equivalent::Equivalent for aya::programs::perf_attach::PerfLinkId +pub fn aya::programs::perf_attach::PerfLinkId::equivalent(&self, key: &aya::programs::perf_attach::PerfLink) -> bool impl core::marker::Freeze for aya::programs::perf_attach::PerfLink impl core::marker::Send for aya::programs::perf_attach::PerfLink impl core::marker::Sync for aya::programs::perf_attach::PerfLink impl core::marker::Unpin for aya::programs::perf_attach::PerfLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::perf_attach::PerfLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::perf_attach::PerfLink +impl equivalent::Equivalent for aya::programs::perf_attach::PerfLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::perf_attach::PerfLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::perf_attach::PerfLink where U: core::convert::From pub fn aya::programs::perf_attach::PerfLink::into(self) -> U impl core::convert::TryFrom for aya::programs::perf_attach::PerfLink where U: core::convert::Into @@ -4358,11 +5255,11 @@ pub fn aya::programs::perf_attach::PerfLink::try_from(value: U) -> core::result: impl core::convert::TryInto for aya::programs::perf_attach::PerfLink where U: core::convert::TryFrom pub type aya::programs::perf_attach::PerfLink::Error = >::Error pub fn aya::programs::perf_attach::PerfLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::perf_attach::PerfLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::perf_attach::PerfLink where T: 'static + ?core::marker::Sized pub fn aya::programs::perf_attach::PerfLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::perf_attach::PerfLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::perf_attach::PerfLink where T: ?core::marker::Sized pub fn aya::programs::perf_attach::PerfLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::perf_attach::PerfLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::perf_attach::PerfLink where T: ?core::marker::Sized pub fn aya::programs::perf_attach::PerfLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::perf_attach::PerfLink pub fn aya::programs::perf_attach::PerfLink::from(t: T) -> T @@ -4375,15 +5272,15 @@ pub fn aya::programs::perf_attach::PerfLinkId::fmt(&self, f: &mut core::fmt::For impl core::hash::Hash for aya::programs::perf_attach::PerfLinkId pub fn aya::programs::perf_attach::PerfLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::perf_attach::PerfLinkId +impl equivalent::Equivalent for aya::programs::perf_attach::PerfLinkId +pub fn aya::programs::perf_attach::PerfLinkId::equivalent(&self, key: &aya::programs::perf_attach::PerfLink) -> bool impl core::marker::Freeze for aya::programs::perf_attach::PerfLinkId impl core::marker::Send for aya::programs::perf_attach::PerfLinkId impl core::marker::Sync for aya::programs::perf_attach::PerfLinkId impl core::marker::Unpin for aya::programs::perf_attach::PerfLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::perf_attach::PerfLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::perf_attach::PerfLinkId -impl equivalent::Equivalent for aya::programs::perf_attach::PerfLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::perf_attach::PerfLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::perf_attach::PerfLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::perf_attach::PerfLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::perf_attach::PerfLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::perf_attach::PerfLinkId where U: core::convert::From pub fn aya::programs::perf_attach::PerfLinkId::into(self) -> U @@ -4393,35 +5290,234 @@ pub fn aya::programs::perf_attach::PerfLinkId::try_from(value: U) -> core::resul impl core::convert::TryInto for aya::programs::perf_attach::PerfLinkId where U: core::convert::TryFrom pub type aya::programs::perf_attach::PerfLinkId::Error = >::Error pub fn aya::programs::perf_attach::PerfLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::perf_attach::PerfLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::perf_attach::PerfLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::perf_attach::PerfLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::perf_attach::PerfLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::perf_attach::PerfLinkId where T: ?core::marker::Sized pub fn aya::programs::perf_attach::PerfLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::perf_attach::PerfLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::perf_attach::PerfLinkId where T: ?core::marker::Sized pub fn aya::programs::perf_attach::PerfLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::perf_attach::PerfLinkId pub fn aya::programs::perf_attach::PerfLinkId::from(t: T) -> T pub mod aya::programs::perf_event -pub use aya::programs::perf_event::perf_hw_cache_id -pub use aya::programs::perf_event::perf_hw_cache_op_id -pub use aya::programs::perf_event::perf_hw_cache_op_result_id -pub use aya::programs::perf_event::perf_hw_id -pub use aya::programs::perf_event::perf_sw_ids +#[repr(u32)] pub enum aya::programs::perf_event::HardwareEvent +pub aya::programs::perf_event::HardwareEvent::BranchInstructions = 4 +pub aya::programs::perf_event::HardwareEvent::BranchMisses = 5 +pub aya::programs::perf_event::HardwareEvent::BusCycles = 6 +pub aya::programs::perf_event::HardwareEvent::CacheMisses = 3 +pub aya::programs::perf_event::HardwareEvent::CacheReferences = 2 +pub aya::programs::perf_event::HardwareEvent::CpuCycles = 0 +pub aya::programs::perf_event::HardwareEvent::Instructions = 1 +pub aya::programs::perf_event::HardwareEvent::RefCpuCycles = 9 +pub aya::programs::perf_event::HardwareEvent::StalledCyclesBackend = 8 +pub aya::programs::perf_event::HardwareEvent::StalledCyclesFrontend = 7 +impl core::clone::Clone for aya::programs::perf_event::HardwareEvent +pub fn aya::programs::perf_event::HardwareEvent::clone(&self) -> aya::programs::perf_event::HardwareEvent +impl core::fmt::Debug for aya::programs::perf_event::HardwareEvent +pub fn aya::programs::perf_event::HardwareEvent::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Copy for aya::programs::perf_event::HardwareEvent +impl core::marker::Freeze for aya::programs::perf_event::HardwareEvent +impl core::marker::Send for aya::programs::perf_event::HardwareEvent +impl core::marker::Sync for aya::programs::perf_event::HardwareEvent +impl core::marker::Unpin for aya::programs::perf_event::HardwareEvent +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::perf_event::HardwareEvent +impl core::panic::unwind_safe::UnwindSafe for aya::programs::perf_event::HardwareEvent +impl core::convert::Into for aya::programs::perf_event::HardwareEvent where U: core::convert::From +pub fn aya::programs::perf_event::HardwareEvent::into(self) -> U +impl core::convert::TryFrom for aya::programs::perf_event::HardwareEvent where U: core::convert::Into +pub type aya::programs::perf_event::HardwareEvent::Error = core::convert::Infallible +pub fn aya::programs::perf_event::HardwareEvent::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::perf_event::HardwareEvent where U: core::convert::TryFrom +pub type aya::programs::perf_event::HardwareEvent::Error = >::Error +pub fn aya::programs::perf_event::HardwareEvent::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya::programs::perf_event::HardwareEvent where T: core::clone::Clone +pub type aya::programs::perf_event::HardwareEvent::Owned = T +pub fn aya::programs::perf_event::HardwareEvent::clone_into(&self, target: &mut T) +pub fn aya::programs::perf_event::HardwareEvent::to_owned(&self) -> T +impl core::any::Any for aya::programs::perf_event::HardwareEvent where T: 'static + ?core::marker::Sized +pub fn aya::programs::perf_event::HardwareEvent::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::perf_event::HardwareEvent where T: ?core::marker::Sized +pub fn aya::programs::perf_event::HardwareEvent::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::perf_event::HardwareEvent where T: ?core::marker::Sized +pub fn aya::programs::perf_event::HardwareEvent::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::programs::perf_event::HardwareEvent where T: core::clone::Clone +pub unsafe fn aya::programs::perf_event::HardwareEvent::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya::programs::perf_event::HardwareEvent +pub fn aya::programs::perf_event::HardwareEvent::from(t: T) -> T +#[repr(u32)] pub enum aya::programs::perf_event::HwCacheEvent +pub aya::programs::perf_event::HwCacheEvent::Bpu = 5 +pub aya::programs::perf_event::HwCacheEvent::Dtlb = 3 +pub aya::programs::perf_event::HwCacheEvent::Itlb = 4 +pub aya::programs::perf_event::HwCacheEvent::L1d = 0 +pub aya::programs::perf_event::HwCacheEvent::L1i = 1 +pub aya::programs::perf_event::HwCacheEvent::Ll = 2 +pub aya::programs::perf_event::HwCacheEvent::Node = 6 +impl core::clone::Clone for aya::programs::perf_event::HwCacheEvent +pub fn aya::programs::perf_event::HwCacheEvent::clone(&self) -> aya::programs::perf_event::HwCacheEvent +impl core::fmt::Debug for aya::programs::perf_event::HwCacheEvent +pub fn aya::programs::perf_event::HwCacheEvent::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Copy for aya::programs::perf_event::HwCacheEvent +impl core::marker::Freeze for aya::programs::perf_event::HwCacheEvent +impl core::marker::Send for aya::programs::perf_event::HwCacheEvent +impl core::marker::Sync for aya::programs::perf_event::HwCacheEvent +impl core::marker::Unpin for aya::programs::perf_event::HwCacheEvent +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::perf_event::HwCacheEvent +impl core::panic::unwind_safe::UnwindSafe for aya::programs::perf_event::HwCacheEvent +impl core::convert::Into for aya::programs::perf_event::HwCacheEvent where U: core::convert::From +pub fn aya::programs::perf_event::HwCacheEvent::into(self) -> U +impl core::convert::TryFrom for aya::programs::perf_event::HwCacheEvent where U: core::convert::Into +pub type aya::programs::perf_event::HwCacheEvent::Error = core::convert::Infallible +pub fn aya::programs::perf_event::HwCacheEvent::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::perf_event::HwCacheEvent where U: core::convert::TryFrom +pub type aya::programs::perf_event::HwCacheEvent::Error = >::Error +pub fn aya::programs::perf_event::HwCacheEvent::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya::programs::perf_event::HwCacheEvent where T: core::clone::Clone +pub type aya::programs::perf_event::HwCacheEvent::Owned = T +pub fn aya::programs::perf_event::HwCacheEvent::clone_into(&self, target: &mut T) +pub fn aya::programs::perf_event::HwCacheEvent::to_owned(&self) -> T +impl core::any::Any for aya::programs::perf_event::HwCacheEvent where T: 'static + ?core::marker::Sized +pub fn aya::programs::perf_event::HwCacheEvent::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::perf_event::HwCacheEvent where T: ?core::marker::Sized +pub fn aya::programs::perf_event::HwCacheEvent::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::perf_event::HwCacheEvent where T: ?core::marker::Sized +pub fn aya::programs::perf_event::HwCacheEvent::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::programs::perf_event::HwCacheEvent where T: core::clone::Clone +pub unsafe fn aya::programs::perf_event::HwCacheEvent::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya::programs::perf_event::HwCacheEvent +pub fn aya::programs::perf_event::HwCacheEvent::from(t: T) -> T +#[repr(u32)] pub enum aya::programs::perf_event::HwCacheOp +pub aya::programs::perf_event::HwCacheOp::Prefetch = 2 +pub aya::programs::perf_event::HwCacheOp::Read = 0 +pub aya::programs::perf_event::HwCacheOp::Write = 1 +impl core::clone::Clone for aya::programs::perf_event::HwCacheOp +pub fn aya::programs::perf_event::HwCacheOp::clone(&self) -> aya::programs::perf_event::HwCacheOp +impl core::fmt::Debug for aya::programs::perf_event::HwCacheOp +pub fn aya::programs::perf_event::HwCacheOp::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Copy for aya::programs::perf_event::HwCacheOp +impl core::marker::Freeze for aya::programs::perf_event::HwCacheOp +impl core::marker::Send for aya::programs::perf_event::HwCacheOp +impl core::marker::Sync for aya::programs::perf_event::HwCacheOp +impl core::marker::Unpin for aya::programs::perf_event::HwCacheOp +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::perf_event::HwCacheOp +impl core::panic::unwind_safe::UnwindSafe for aya::programs::perf_event::HwCacheOp +impl core::convert::Into for aya::programs::perf_event::HwCacheOp where U: core::convert::From +pub fn aya::programs::perf_event::HwCacheOp::into(self) -> U +impl core::convert::TryFrom for aya::programs::perf_event::HwCacheOp where U: core::convert::Into +pub type aya::programs::perf_event::HwCacheOp::Error = core::convert::Infallible +pub fn aya::programs::perf_event::HwCacheOp::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::perf_event::HwCacheOp where U: core::convert::TryFrom +pub type aya::programs::perf_event::HwCacheOp::Error = >::Error +pub fn aya::programs::perf_event::HwCacheOp::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya::programs::perf_event::HwCacheOp where T: core::clone::Clone +pub type aya::programs::perf_event::HwCacheOp::Owned = T +pub fn aya::programs::perf_event::HwCacheOp::clone_into(&self, target: &mut T) +pub fn aya::programs::perf_event::HwCacheOp::to_owned(&self) -> T +impl core::any::Any for aya::programs::perf_event::HwCacheOp where T: 'static + ?core::marker::Sized +pub fn aya::programs::perf_event::HwCacheOp::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::perf_event::HwCacheOp where T: ?core::marker::Sized +pub fn aya::programs::perf_event::HwCacheOp::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::perf_event::HwCacheOp where T: ?core::marker::Sized +pub fn aya::programs::perf_event::HwCacheOp::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::programs::perf_event::HwCacheOp where T: core::clone::Clone +pub unsafe fn aya::programs::perf_event::HwCacheOp::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya::programs::perf_event::HwCacheOp +pub fn aya::programs::perf_event::HwCacheOp::from(t: T) -> T +#[repr(u32)] pub enum aya::programs::perf_event::HwCacheResult +pub aya::programs::perf_event::HwCacheResult::Access = 0 +pub aya::programs::perf_event::HwCacheResult::Miss = 1 +impl core::clone::Clone for aya::programs::perf_event::HwCacheResult +pub fn aya::programs::perf_event::HwCacheResult::clone(&self) -> aya::programs::perf_event::HwCacheResult +impl core::fmt::Debug for aya::programs::perf_event::HwCacheResult +pub fn aya::programs::perf_event::HwCacheResult::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Copy for aya::programs::perf_event::HwCacheResult +impl core::marker::Freeze for aya::programs::perf_event::HwCacheResult +impl core::marker::Send for aya::programs::perf_event::HwCacheResult +impl core::marker::Sync for aya::programs::perf_event::HwCacheResult +impl core::marker::Unpin for aya::programs::perf_event::HwCacheResult +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::perf_event::HwCacheResult +impl core::panic::unwind_safe::UnwindSafe for aya::programs::perf_event::HwCacheResult +impl core::convert::Into for aya::programs::perf_event::HwCacheResult where U: core::convert::From +pub fn aya::programs::perf_event::HwCacheResult::into(self) -> U +impl core::convert::TryFrom for aya::programs::perf_event::HwCacheResult where U: core::convert::Into +pub type aya::programs::perf_event::HwCacheResult::Error = core::convert::Infallible +pub fn aya::programs::perf_event::HwCacheResult::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::perf_event::HwCacheResult where U: core::convert::TryFrom +pub type aya::programs::perf_event::HwCacheResult::Error = >::Error +pub fn aya::programs::perf_event::HwCacheResult::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya::programs::perf_event::HwCacheResult where T: core::clone::Clone +pub type aya::programs::perf_event::HwCacheResult::Owned = T +pub fn aya::programs::perf_event::HwCacheResult::clone_into(&self, target: &mut T) +pub fn aya::programs::perf_event::HwCacheResult::to_owned(&self) -> T +impl core::any::Any for aya::programs::perf_event::HwCacheResult where T: 'static + ?core::marker::Sized +pub fn aya::programs::perf_event::HwCacheResult::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::perf_event::HwCacheResult where T: ?core::marker::Sized +pub fn aya::programs::perf_event::HwCacheResult::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::perf_event::HwCacheResult where T: ?core::marker::Sized +pub fn aya::programs::perf_event::HwCacheResult::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::programs::perf_event::HwCacheResult where T: core::clone::Clone +pub unsafe fn aya::programs::perf_event::HwCacheResult::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya::programs::perf_event::HwCacheResult +pub fn aya::programs::perf_event::HwCacheResult::from(t: T) -> T +pub enum aya::programs::perf_event::PerfEventConfig +pub aya::programs::perf_event::PerfEventConfig::Breakpoint +pub aya::programs::perf_event::PerfEventConfig::Hardware(aya::programs::perf_event::HardwareEvent) +pub aya::programs::perf_event::PerfEventConfig::HwCache +pub aya::programs::perf_event::PerfEventConfig::HwCache::event: aya::programs::perf_event::HwCacheEvent +pub aya::programs::perf_event::PerfEventConfig::HwCache::operation: aya::programs::perf_event::HwCacheOp +pub aya::programs::perf_event::PerfEventConfig::HwCache::result: aya::programs::perf_event::HwCacheResult +pub aya::programs::perf_event::PerfEventConfig::Pmu +pub aya::programs::perf_event::PerfEventConfig::Pmu::config: u64 +pub aya::programs::perf_event::PerfEventConfig::Pmu::pmu_type: u32 +pub aya::programs::perf_event::PerfEventConfig::Raw +pub aya::programs::perf_event::PerfEventConfig::Raw::event_id: u64 +pub aya::programs::perf_event::PerfEventConfig::Software(aya::programs::perf_event::SoftwareEvent) +pub aya::programs::perf_event::PerfEventConfig::TracePoint +pub aya::programs::perf_event::PerfEventConfig::TracePoint::event_id: u64 +impl core::clone::Clone for aya::programs::perf_event::PerfEventConfig +pub fn aya::programs::perf_event::PerfEventConfig::clone(&self) -> aya::programs::perf_event::PerfEventConfig +impl core::fmt::Debug for aya::programs::perf_event::PerfEventConfig +pub fn aya::programs::perf_event::PerfEventConfig::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Copy for aya::programs::perf_event::PerfEventConfig +impl core::marker::Freeze for aya::programs::perf_event::PerfEventConfig +impl core::marker::Send for aya::programs::perf_event::PerfEventConfig +impl core::marker::Sync for aya::programs::perf_event::PerfEventConfig +impl core::marker::Unpin for aya::programs::perf_event::PerfEventConfig +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::perf_event::PerfEventConfig +impl core::panic::unwind_safe::UnwindSafe for aya::programs::perf_event::PerfEventConfig +impl core::convert::Into for aya::programs::perf_event::PerfEventConfig where U: core::convert::From +pub fn aya::programs::perf_event::PerfEventConfig::into(self) -> U +impl core::convert::TryFrom for aya::programs::perf_event::PerfEventConfig where U: core::convert::Into +pub type aya::programs::perf_event::PerfEventConfig::Error = core::convert::Infallible +pub fn aya::programs::perf_event::PerfEventConfig::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::perf_event::PerfEventConfig where U: core::convert::TryFrom +pub type aya::programs::perf_event::PerfEventConfig::Error = >::Error +pub fn aya::programs::perf_event::PerfEventConfig::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya::programs::perf_event::PerfEventConfig where T: core::clone::Clone +pub type aya::programs::perf_event::PerfEventConfig::Owned = T +pub fn aya::programs::perf_event::PerfEventConfig::clone_into(&self, target: &mut T) +pub fn aya::programs::perf_event::PerfEventConfig::to_owned(&self) -> T +impl core::any::Any for aya::programs::perf_event::PerfEventConfig where T: 'static + ?core::marker::Sized +pub fn aya::programs::perf_event::PerfEventConfig::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::perf_event::PerfEventConfig where T: ?core::marker::Sized +pub fn aya::programs::perf_event::PerfEventConfig::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::perf_event::PerfEventConfig where T: ?core::marker::Sized +pub fn aya::programs::perf_event::PerfEventConfig::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::programs::perf_event::PerfEventConfig where T: core::clone::Clone +pub unsafe fn aya::programs::perf_event::PerfEventConfig::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya::programs::perf_event::PerfEventConfig +pub fn aya::programs::perf_event::PerfEventConfig::from(t: T) -> T pub enum aya::programs::perf_event::PerfEventScope pub aya::programs::perf_event::PerfEventScope::AllProcessesOneCpu pub aya::programs::perf_event::PerfEventScope::AllProcessesOneCpu::cpu: u32 -pub aya::programs::perf_event::PerfEventScope::CallingProcessAnyCpu -pub aya::programs::perf_event::PerfEventScope::CallingProcessOneCpu -pub aya::programs::perf_event::PerfEventScope::CallingProcessOneCpu::cpu: u32 -pub aya::programs::perf_event::PerfEventScope::OneProcessAnyCpu -pub aya::programs::perf_event::PerfEventScope::OneProcessAnyCpu::pid: u32 -pub aya::programs::perf_event::PerfEventScope::OneProcessOneCpu -pub aya::programs::perf_event::PerfEventScope::OneProcessOneCpu::cpu: u32 -pub aya::programs::perf_event::PerfEventScope::OneProcessOneCpu::pid: u32 +pub aya::programs::perf_event::PerfEventScope::CallingProcess +pub aya::programs::perf_event::PerfEventScope::CallingProcess::cpu: core::option::Option +pub aya::programs::perf_event::PerfEventScope::OneProcess +pub aya::programs::perf_event::PerfEventScope::OneProcess::cpu: core::option::Option +pub aya::programs::perf_event::PerfEventScope::OneProcess::pid: i32 impl core::clone::Clone for aya::programs::perf_event::PerfEventScope pub fn aya::programs::perf_event::PerfEventScope::clone(&self) -> aya::programs::perf_event::PerfEventScope impl core::fmt::Debug for aya::programs::perf_event::PerfEventScope pub fn aya::programs::perf_event::PerfEventScope::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Copy for aya::programs::perf_event::PerfEventScope impl core::marker::Freeze for aya::programs::perf_event::PerfEventScope impl core::marker::Send for aya::programs::perf_event::PerfEventScope impl core::marker::Sync for aya::programs::perf_event::PerfEventScope @@ -4440,51 +5536,16 @@ impl alloc::borrow::ToOwned for aya::programs::perf_event::PerfEventScope whe pub type aya::programs::perf_event::PerfEventScope::Owned = T pub fn aya::programs::perf_event::PerfEventScope::clone_into(&self, target: &mut T) pub fn aya::programs::perf_event::PerfEventScope::to_owned(&self) -> T -impl core::any::Any for aya::programs::perf_event::PerfEventScope where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::perf_event::PerfEventScope where T: 'static + ?core::marker::Sized pub fn aya::programs::perf_event::PerfEventScope::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::perf_event::PerfEventScope where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::perf_event::PerfEventScope where T: ?core::marker::Sized pub fn aya::programs::perf_event::PerfEventScope::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::perf_event::PerfEventScope where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::perf_event::PerfEventScope where T: ?core::marker::Sized pub fn aya::programs::perf_event::PerfEventScope::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::programs::perf_event::PerfEventScope where T: core::clone::Clone +pub unsafe fn aya::programs::perf_event::PerfEventScope::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya::programs::perf_event::PerfEventScope pub fn aya::programs::perf_event::PerfEventScope::from(t: T) -> T -#[repr(u32)] pub enum aya::programs::perf_event::PerfTypeId -pub aya::programs::perf_event::PerfTypeId::Breakpoint = 5 -pub aya::programs::perf_event::PerfTypeId::Hardware = 0 -pub aya::programs::perf_event::PerfTypeId::HwCache = 3 -pub aya::programs::perf_event::PerfTypeId::Raw = 4 -pub aya::programs::perf_event::PerfTypeId::Software = 1 -pub aya::programs::perf_event::PerfTypeId::TracePoint = 2 -impl core::clone::Clone for aya::programs::perf_event::PerfTypeId -pub fn aya::programs::perf_event::PerfTypeId::clone(&self) -> aya::programs::perf_event::PerfTypeId -impl core::fmt::Debug for aya::programs::perf_event::PerfTypeId -pub fn aya::programs::perf_event::PerfTypeId::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl core::marker::Freeze for aya::programs::perf_event::PerfTypeId -impl core::marker::Send for aya::programs::perf_event::PerfTypeId -impl core::marker::Sync for aya::programs::perf_event::PerfTypeId -impl core::marker::Unpin for aya::programs::perf_event::PerfTypeId -impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::perf_event::PerfTypeId -impl core::panic::unwind_safe::UnwindSafe for aya::programs::perf_event::PerfTypeId -impl core::convert::Into for aya::programs::perf_event::PerfTypeId where U: core::convert::From -pub fn aya::programs::perf_event::PerfTypeId::into(self) -> U -impl core::convert::TryFrom for aya::programs::perf_event::PerfTypeId where U: core::convert::Into -pub type aya::programs::perf_event::PerfTypeId::Error = core::convert::Infallible -pub fn aya::programs::perf_event::PerfTypeId::try_from(value: U) -> core::result::Result>::Error> -impl core::convert::TryInto for aya::programs::perf_event::PerfTypeId where U: core::convert::TryFrom -pub type aya::programs::perf_event::PerfTypeId::Error = >::Error -pub fn aya::programs::perf_event::PerfTypeId::try_into(self) -> core::result::Result>::Error> -impl alloc::borrow::ToOwned for aya::programs::perf_event::PerfTypeId where T: core::clone::Clone -pub type aya::programs::perf_event::PerfTypeId::Owned = T -pub fn aya::programs::perf_event::PerfTypeId::clone_into(&self, target: &mut T) -pub fn aya::programs::perf_event::PerfTypeId::to_owned(&self) -> T -impl core::any::Any for aya::programs::perf_event::PerfTypeId where T: 'static + core::marker::Sized -pub fn aya::programs::perf_event::PerfTypeId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::perf_event::PerfTypeId where T: core::marker::Sized -pub fn aya::programs::perf_event::PerfTypeId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::perf_event::PerfTypeId where T: core::marker::Sized -pub fn aya::programs::perf_event::PerfTypeId::borrow_mut(&mut self) -> &mut T -impl core::convert::From for aya::programs::perf_event::PerfTypeId -pub fn aya::programs::perf_event::PerfTypeId::from(t: T) -> T pub enum aya::programs::perf_event::SamplePolicy pub aya::programs::perf_event::SamplePolicy::Frequency(u64) pub aya::programs::perf_event::SamplePolicy::Period(u64) @@ -4492,6 +5553,7 @@ impl core::clone::Clone for aya::programs::perf_event::SamplePolicy pub fn aya::programs::perf_event::SamplePolicy::clone(&self) -> aya::programs::perf_event::SamplePolicy impl core::fmt::Debug for aya::programs::perf_event::SamplePolicy pub fn aya::programs::perf_event::SamplePolicy::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Copy for aya::programs::perf_event::SamplePolicy impl core::marker::Freeze for aya::programs::perf_event::SamplePolicy impl core::marker::Send for aya::programs::perf_event::SamplePolicy impl core::marker::Sync for aya::programs::perf_event::SamplePolicy @@ -4510,29 +5572,81 @@ impl alloc::borrow::ToOwned for aya::programs::perf_event::SamplePolicy where pub type aya::programs::perf_event::SamplePolicy::Owned = T pub fn aya::programs::perf_event::SamplePolicy::clone_into(&self, target: &mut T) pub fn aya::programs::perf_event::SamplePolicy::to_owned(&self) -> T -impl core::any::Any for aya::programs::perf_event::SamplePolicy where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::perf_event::SamplePolicy where T: 'static + ?core::marker::Sized pub fn aya::programs::perf_event::SamplePolicy::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::perf_event::SamplePolicy where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::perf_event::SamplePolicy where T: ?core::marker::Sized pub fn aya::programs::perf_event::SamplePolicy::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::perf_event::SamplePolicy where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::perf_event::SamplePolicy where T: ?core::marker::Sized pub fn aya::programs::perf_event::SamplePolicy::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::programs::perf_event::SamplePolicy where T: core::clone::Clone +pub unsafe fn aya::programs::perf_event::SamplePolicy::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya::programs::perf_event::SamplePolicy pub fn aya::programs::perf_event::SamplePolicy::from(t: T) -> T +#[repr(u32)] pub enum aya::programs::perf_event::SoftwareEvent +pub aya::programs::perf_event::SoftwareEvent::AlignmentFaults = 7 +pub aya::programs::perf_event::SoftwareEvent::BpfOutput = 10 +pub aya::programs::perf_event::SoftwareEvent::CgroupSwitches = 11 +pub aya::programs::perf_event::SoftwareEvent::ContextSwitches = 3 +pub aya::programs::perf_event::SoftwareEvent::CpuClock = 0 +pub aya::programs::perf_event::SoftwareEvent::CpuMigrations = 4 +pub aya::programs::perf_event::SoftwareEvent::Dummy = 9 +pub aya::programs::perf_event::SoftwareEvent::EmulationFaults = 8 +pub aya::programs::perf_event::SoftwareEvent::PageFaults = 2 +pub aya::programs::perf_event::SoftwareEvent::PageFaultsMaj = 6 +pub aya::programs::perf_event::SoftwareEvent::PageFaultsMin = 5 +pub aya::programs::perf_event::SoftwareEvent::TaskClock = 1 +impl core::clone::Clone for aya::programs::perf_event::SoftwareEvent +pub fn aya::programs::perf_event::SoftwareEvent::clone(&self) -> aya::programs::perf_event::SoftwareEvent +impl core::fmt::Debug for aya::programs::perf_event::SoftwareEvent +pub fn aya::programs::perf_event::SoftwareEvent::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Copy for aya::programs::perf_event::SoftwareEvent +impl core::marker::Freeze for aya::programs::perf_event::SoftwareEvent +impl core::marker::Send for aya::programs::perf_event::SoftwareEvent +impl core::marker::Sync for aya::programs::perf_event::SoftwareEvent +impl core::marker::Unpin for aya::programs::perf_event::SoftwareEvent +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::perf_event::SoftwareEvent +impl core::panic::unwind_safe::UnwindSafe for aya::programs::perf_event::SoftwareEvent +impl core::convert::Into for aya::programs::perf_event::SoftwareEvent where U: core::convert::From +pub fn aya::programs::perf_event::SoftwareEvent::into(self) -> U +impl core::convert::TryFrom for aya::programs::perf_event::SoftwareEvent where U: core::convert::Into +pub type aya::programs::perf_event::SoftwareEvent::Error = core::convert::Infallible +pub fn aya::programs::perf_event::SoftwareEvent::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::perf_event::SoftwareEvent where U: core::convert::TryFrom +pub type aya::programs::perf_event::SoftwareEvent::Error = >::Error +pub fn aya::programs::perf_event::SoftwareEvent::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya::programs::perf_event::SoftwareEvent where T: core::clone::Clone +pub type aya::programs::perf_event::SoftwareEvent::Owned = T +pub fn aya::programs::perf_event::SoftwareEvent::clone_into(&self, target: &mut T) +pub fn aya::programs::perf_event::SoftwareEvent::to_owned(&self) -> T +impl core::any::Any for aya::programs::perf_event::SoftwareEvent where T: 'static + ?core::marker::Sized +pub fn aya::programs::perf_event::SoftwareEvent::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::perf_event::SoftwareEvent where T: ?core::marker::Sized +pub fn aya::programs::perf_event::SoftwareEvent::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::perf_event::SoftwareEvent where T: ?core::marker::Sized +pub fn aya::programs::perf_event::SoftwareEvent::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::programs::perf_event::SoftwareEvent where T: core::clone::Clone +pub unsafe fn aya::programs::perf_event::SoftwareEvent::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya::programs::perf_event::SoftwareEvent +pub fn aya::programs::perf_event::SoftwareEvent::from(t: T) -> T pub struct aya::programs::perf_event::PerfEvent impl aya::programs::perf_event::PerfEvent -pub fn aya::programs::perf_event::PerfEvent::attach(&mut self, perf_type: aya::programs::perf_event::PerfTypeId, config: u64, scope: aya::programs::perf_event::PerfEventScope, sample_policy: aya::programs::perf_event::SamplePolicy, inherit: bool) -> core::result::Result -pub fn aya::programs::perf_event::PerfEvent::detach(&mut self, link_id: aya::programs::perf_event::PerfEventLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub const aya::programs::perf_event::PerfEvent::PROGRAM_TYPE: aya::programs::ProgramType +pub fn aya::programs::perf_event::PerfEvent::attach(&mut self, config: aya::programs::perf_event::PerfEventConfig, scope: aya::programs::perf_event::PerfEventScope, sample_policy: aya::programs::perf_event::SamplePolicy, inherit: bool) -> core::result::Result pub fn aya::programs::perf_event::PerfEvent::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::perf_event::PerfEvent +pub fn aya::programs::perf_event::PerfEvent::detach(&mut self, link_id: aya::programs::perf_event::PerfEventLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::perf_event::PerfEvent::take_link(&mut self, link_id: aya::programs::perf_event::PerfEventLinkId) -> core::result::Result impl aya::programs::perf_event::PerfEvent pub fn aya::programs::perf_event::PerfEvent::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::perf_event::PerfEvent pub fn aya::programs::perf_event::PerfEvent::from_pin>(path: P) -> core::result::Result impl aya::programs::perf_event::PerfEvent +pub fn aya::programs::perf_event::PerfEvent::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::perf_event::PerfEvent pub fn aya::programs::perf_event::PerfEvent::info(&self) -> core::result::Result impl aya::programs::perf_event::PerfEvent pub fn aya::programs::perf_event::PerfEvent::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::perf_event::PerfEvent::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::perf_event::PerfEvent::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::perf_event::PerfEvent pub fn aya::programs::perf_event::PerfEvent::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::perf_event::PerfEvent @@ -4559,11 +5673,11 @@ pub fn aya::programs::perf_event::PerfEvent::try_from(value: U) -> core::result: impl core::convert::TryInto for aya::programs::perf_event::PerfEvent where U: core::convert::TryFrom pub type aya::programs::perf_event::PerfEvent::Error = >::Error pub fn aya::programs::perf_event::PerfEvent::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::perf_event::PerfEvent where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::perf_event::PerfEvent where T: 'static + ?core::marker::Sized pub fn aya::programs::perf_event::PerfEvent::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::perf_event::PerfEvent where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::perf_event::PerfEvent where T: ?core::marker::Sized pub fn aya::programs::perf_event::PerfEvent::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::perf_event::PerfEvent where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::perf_event::PerfEvent where T: ?core::marker::Sized pub fn aya::programs::perf_event::PerfEvent::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::perf_event::PerfEvent pub fn aya::programs::perf_event::PerfEvent::from(t: T) -> T @@ -4572,6 +5686,9 @@ impl aya::programs::links::Link for aya::programs::perf_event::PerfEventLink pub type aya::programs::perf_event::PerfEventLink::Id = aya::programs::perf_event::PerfEventLinkId pub fn aya::programs::perf_event::PerfEventLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::perf_event::PerfEventLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::perf_event::PerfEventLink +impl core::cmp::PartialEq for aya::programs::perf_event::PerfEventLink +pub fn aya::programs::perf_event::PerfEventLink::eq(&self, other: &Self) -> bool impl core::convert::TryFrom for aya::programs::perf_event::PerfEventLink pub type aya::programs::perf_event::PerfEventLink::Error = aya::programs::links::LinkError pub fn aya::programs::perf_event::PerfEventLink::try_from(fd_link: aya::programs::links::FdLink) -> core::result::Result @@ -4580,14 +5697,20 @@ pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError pub fn aya::programs::links::FdLink::try_from(value: aya::programs::perf_event::PerfEventLink) -> core::result::Result impl core::fmt::Debug for aya::programs::perf_event::PerfEventLink pub fn aya::programs::perf_event::PerfEventLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::perf_event::PerfEventLink +pub fn aya::programs::perf_event::PerfEventLink::hash(&self, state: &mut H) impl core::ops::drop::Drop for aya::programs::perf_event::PerfEventLink pub fn aya::programs::perf_event::PerfEventLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::perf_event::PerfEventLinkId +pub fn aya::programs::perf_event::PerfEventLinkId::equivalent(&self, key: &aya::programs::perf_event::PerfEventLink) -> bool impl core::marker::Freeze for aya::programs::perf_event::PerfEventLink impl core::marker::Send for aya::programs::perf_event::PerfEventLink impl core::marker::Sync for aya::programs::perf_event::PerfEventLink impl core::marker::Unpin for aya::programs::perf_event::PerfEventLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::perf_event::PerfEventLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::perf_event::PerfEventLink +impl equivalent::Equivalent for aya::programs::perf_event::PerfEventLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::perf_event::PerfEventLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::perf_event::PerfEventLink where U: core::convert::From pub fn aya::programs::perf_event::PerfEventLink::into(self) -> U impl core::convert::TryFrom for aya::programs::perf_event::PerfEventLink where U: core::convert::Into @@ -4596,11 +5719,11 @@ pub fn aya::programs::perf_event::PerfEventLink::try_from(value: U) -> core::res impl core::convert::TryInto for aya::programs::perf_event::PerfEventLink where U: core::convert::TryFrom pub type aya::programs::perf_event::PerfEventLink::Error = >::Error pub fn aya::programs::perf_event::PerfEventLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::perf_event::PerfEventLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::perf_event::PerfEventLink where T: 'static + ?core::marker::Sized pub fn aya::programs::perf_event::PerfEventLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::perf_event::PerfEventLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::perf_event::PerfEventLink where T: ?core::marker::Sized pub fn aya::programs::perf_event::PerfEventLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::perf_event::PerfEventLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::perf_event::PerfEventLink where T: ?core::marker::Sized pub fn aya::programs::perf_event::PerfEventLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::perf_event::PerfEventLink pub fn aya::programs::perf_event::PerfEventLink::from(t: T) -> T @@ -4613,15 +5736,15 @@ pub fn aya::programs::perf_event::PerfEventLinkId::fmt(&self, f: &mut core::fmt: impl core::hash::Hash for aya::programs::perf_event::PerfEventLinkId pub fn aya::programs::perf_event::PerfEventLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::perf_event::PerfEventLinkId +impl equivalent::Equivalent for aya::programs::perf_event::PerfEventLinkId +pub fn aya::programs::perf_event::PerfEventLinkId::equivalent(&self, key: &aya::programs::perf_event::PerfEventLink) -> bool impl core::marker::Freeze for aya::programs::perf_event::PerfEventLinkId impl core::marker::Send for aya::programs::perf_event::PerfEventLinkId impl core::marker::Sync for aya::programs::perf_event::PerfEventLinkId impl core::marker::Unpin for aya::programs::perf_event::PerfEventLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::perf_event::PerfEventLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::perf_event::PerfEventLinkId -impl equivalent::Equivalent for aya::programs::perf_event::PerfEventLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::perf_event::PerfEventLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::perf_event::PerfEventLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::perf_event::PerfEventLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::perf_event::PerfEventLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::perf_event::PerfEventLinkId where U: core::convert::From pub fn aya::programs::perf_event::PerfEventLinkId::into(self) -> U @@ -4631,30 +5754,34 @@ pub fn aya::programs::perf_event::PerfEventLinkId::try_from(value: U) -> core::r impl core::convert::TryInto for aya::programs::perf_event::PerfEventLinkId where U: core::convert::TryFrom pub type aya::programs::perf_event::PerfEventLinkId::Error = >::Error pub fn aya::programs::perf_event::PerfEventLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::perf_event::PerfEventLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::perf_event::PerfEventLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::perf_event::PerfEventLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::perf_event::PerfEventLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::perf_event::PerfEventLinkId where T: ?core::marker::Sized pub fn aya::programs::perf_event::PerfEventLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::perf_event::PerfEventLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::perf_event::PerfEventLinkId where T: ?core::marker::Sized pub fn aya::programs::perf_event::PerfEventLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::perf_event::PerfEventLinkId pub fn aya::programs::perf_event::PerfEventLinkId::from(t: T) -> T pub mod aya::programs::raw_trace_point pub struct aya::programs::raw_trace_point::RawTracePoint impl aya::programs::raw_trace_point::RawTracePoint +pub const aya::programs::raw_trace_point::RawTracePoint::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::raw_trace_point::RawTracePoint::attach(&mut self, tp_name: &str) -> core::result::Result -pub fn aya::programs::raw_trace_point::RawTracePoint::detach(&mut self, link_id: aya::programs::raw_trace_point::RawTracePointLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::raw_trace_point::RawTracePoint::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::raw_trace_point::RawTracePoint +pub fn aya::programs::raw_trace_point::RawTracePoint::detach(&mut self, link_id: aya::programs::raw_trace_point::RawTracePointLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::raw_trace_point::RawTracePoint::take_link(&mut self, link_id: aya::programs::raw_trace_point::RawTracePointLinkId) -> core::result::Result impl aya::programs::raw_trace_point::RawTracePoint pub fn aya::programs::raw_trace_point::RawTracePoint::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::raw_trace_point::RawTracePoint pub fn aya::programs::raw_trace_point::RawTracePoint::from_pin>(path: P) -> core::result::Result impl aya::programs::raw_trace_point::RawTracePoint +pub fn aya::programs::raw_trace_point::RawTracePoint::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::raw_trace_point::RawTracePoint pub fn aya::programs::raw_trace_point::RawTracePoint::info(&self) -> core::result::Result impl aya::programs::raw_trace_point::RawTracePoint pub fn aya::programs::raw_trace_point::RawTracePoint::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::raw_trace_point::RawTracePoint::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::raw_trace_point::RawTracePoint::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::raw_trace_point::RawTracePoint pub fn aya::programs::raw_trace_point::RawTracePoint::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::raw_trace_point::RawTracePoint @@ -4681,11 +5808,11 @@ pub fn aya::programs::raw_trace_point::RawTracePoint::try_from(value: U) -> core impl core::convert::TryInto for aya::programs::raw_trace_point::RawTracePoint where U: core::convert::TryFrom pub type aya::programs::raw_trace_point::RawTracePoint::Error = >::Error pub fn aya::programs::raw_trace_point::RawTracePoint::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::raw_trace_point::RawTracePoint where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::raw_trace_point::RawTracePoint where T: 'static + ?core::marker::Sized pub fn aya::programs::raw_trace_point::RawTracePoint::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::raw_trace_point::RawTracePoint where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::raw_trace_point::RawTracePoint where T: ?core::marker::Sized pub fn aya::programs::raw_trace_point::RawTracePoint::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::raw_trace_point::RawTracePoint where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::raw_trace_point::RawTracePoint where T: ?core::marker::Sized pub fn aya::programs::raw_trace_point::RawTracePoint::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::raw_trace_point::RawTracePoint pub fn aya::programs::raw_trace_point::RawTracePoint::from(t: T) -> T @@ -4694,20 +5821,29 @@ impl aya::programs::links::Link for aya::programs::raw_trace_point::RawTracePoin pub type aya::programs::raw_trace_point::RawTracePointLink::Id = aya::programs::raw_trace_point::RawTracePointLinkId pub fn aya::programs::raw_trace_point::RawTracePointLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::raw_trace_point::RawTracePointLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::raw_trace_point::RawTracePointLink +impl core::cmp::PartialEq for aya::programs::raw_trace_point::RawTracePointLink +pub fn aya::programs::raw_trace_point::RawTracePointLink::eq(&self, other: &Self) -> bool impl core::convert::From for aya::programs::raw_trace_point::RawTracePointLink pub fn aya::programs::raw_trace_point::RawTracePointLink::from(b: aya::programs::links::FdLink) -> aya::programs::raw_trace_point::RawTracePointLink impl core::convert::From for aya::programs::links::FdLink pub fn aya::programs::links::FdLink::from(w: aya::programs::raw_trace_point::RawTracePointLink) -> aya::programs::links::FdLink impl core::fmt::Debug for aya::programs::raw_trace_point::RawTracePointLink pub fn aya::programs::raw_trace_point::RawTracePointLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::raw_trace_point::RawTracePointLink +pub fn aya::programs::raw_trace_point::RawTracePointLink::hash(&self, state: &mut H) impl core::ops::drop::Drop for aya::programs::raw_trace_point::RawTracePointLink pub fn aya::programs::raw_trace_point::RawTracePointLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::raw_trace_point::RawTracePointLinkId +pub fn aya::programs::raw_trace_point::RawTracePointLinkId::equivalent(&self, key: &aya::programs::raw_trace_point::RawTracePointLink) -> bool impl core::marker::Freeze for aya::programs::raw_trace_point::RawTracePointLink impl core::marker::Send for aya::programs::raw_trace_point::RawTracePointLink impl core::marker::Sync for aya::programs::raw_trace_point::RawTracePointLink impl core::marker::Unpin for aya::programs::raw_trace_point::RawTracePointLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::raw_trace_point::RawTracePointLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::raw_trace_point::RawTracePointLink +impl equivalent::Equivalent for aya::programs::raw_trace_point::RawTracePointLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::raw_trace_point::RawTracePointLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::raw_trace_point::RawTracePointLink where U: core::convert::From pub fn aya::programs::raw_trace_point::RawTracePointLink::into(self) -> U impl core::convert::TryFrom for aya::programs::raw_trace_point::RawTracePointLink where U: core::convert::Into @@ -4716,11 +5852,11 @@ pub fn aya::programs::raw_trace_point::RawTracePointLink::try_from(value: U) -> impl core::convert::TryInto for aya::programs::raw_trace_point::RawTracePointLink where U: core::convert::TryFrom pub type aya::programs::raw_trace_point::RawTracePointLink::Error = >::Error pub fn aya::programs::raw_trace_point::RawTracePointLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::raw_trace_point::RawTracePointLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::raw_trace_point::RawTracePointLink where T: 'static + ?core::marker::Sized pub fn aya::programs::raw_trace_point::RawTracePointLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::raw_trace_point::RawTracePointLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::raw_trace_point::RawTracePointLink where T: ?core::marker::Sized pub fn aya::programs::raw_trace_point::RawTracePointLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::raw_trace_point::RawTracePointLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::raw_trace_point::RawTracePointLink where T: ?core::marker::Sized pub fn aya::programs::raw_trace_point::RawTracePointLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::raw_trace_point::RawTracePointLink pub fn aya::programs::raw_trace_point::RawTracePointLink::from(t: T) -> T @@ -4733,15 +5869,15 @@ pub fn aya::programs::raw_trace_point::RawTracePointLinkId::fmt(&self, f: &mut c impl core::hash::Hash for aya::programs::raw_trace_point::RawTracePointLinkId pub fn aya::programs::raw_trace_point::RawTracePointLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::raw_trace_point::RawTracePointLinkId +impl equivalent::Equivalent for aya::programs::raw_trace_point::RawTracePointLinkId +pub fn aya::programs::raw_trace_point::RawTracePointLinkId::equivalent(&self, key: &aya::programs::raw_trace_point::RawTracePointLink) -> bool impl core::marker::Freeze for aya::programs::raw_trace_point::RawTracePointLinkId impl core::marker::Send for aya::programs::raw_trace_point::RawTracePointLinkId impl core::marker::Sync for aya::programs::raw_trace_point::RawTracePointLinkId impl core::marker::Unpin for aya::programs::raw_trace_point::RawTracePointLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::raw_trace_point::RawTracePointLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::raw_trace_point::RawTracePointLinkId -impl equivalent::Equivalent for aya::programs::raw_trace_point::RawTracePointLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::raw_trace_point::RawTracePointLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::raw_trace_point::RawTracePointLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::raw_trace_point::RawTracePointLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::raw_trace_point::RawTracePointLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::raw_trace_point::RawTracePointLinkId where U: core::convert::From pub fn aya::programs::raw_trace_point::RawTracePointLinkId::into(self) -> U @@ -4751,30 +5887,34 @@ pub fn aya::programs::raw_trace_point::RawTracePointLinkId::try_from(value: U) - impl core::convert::TryInto for aya::programs::raw_trace_point::RawTracePointLinkId where U: core::convert::TryFrom pub type aya::programs::raw_trace_point::RawTracePointLinkId::Error = >::Error pub fn aya::programs::raw_trace_point::RawTracePointLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::raw_trace_point::RawTracePointLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::raw_trace_point::RawTracePointLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::raw_trace_point::RawTracePointLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::raw_trace_point::RawTracePointLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::raw_trace_point::RawTracePointLinkId where T: ?core::marker::Sized pub fn aya::programs::raw_trace_point::RawTracePointLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::raw_trace_point::RawTracePointLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::raw_trace_point::RawTracePointLinkId where T: ?core::marker::Sized pub fn aya::programs::raw_trace_point::RawTracePointLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::raw_trace_point::RawTracePointLinkId pub fn aya::programs::raw_trace_point::RawTracePointLinkId::from(t: T) -> T pub mod aya::programs::sk_lookup pub struct aya::programs::sk_lookup::SkLookup impl aya::programs::sk_lookup::SkLookup +pub const aya::programs::sk_lookup::SkLookup::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::sk_lookup::SkLookup::attach(&mut self, netns: T) -> core::result::Result -pub fn aya::programs::sk_lookup::SkLookup::detach(&mut self, link_id: aya::programs::sk_lookup::SkLookupLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::sk_lookup::SkLookup::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::sk_lookup::SkLookup +pub fn aya::programs::sk_lookup::SkLookup::detach(&mut self, link_id: aya::programs::sk_lookup::SkLookupLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::sk_lookup::SkLookup::take_link(&mut self, link_id: aya::programs::sk_lookup::SkLookupLinkId) -> core::result::Result impl aya::programs::sk_lookup::SkLookup pub fn aya::programs::sk_lookup::SkLookup::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::sk_lookup::SkLookup pub fn aya::programs::sk_lookup::SkLookup::from_pin>(path: P) -> core::result::Result impl aya::programs::sk_lookup::SkLookup +pub fn aya::programs::sk_lookup::SkLookup::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::sk_lookup::SkLookup pub fn aya::programs::sk_lookup::SkLookup::info(&self) -> core::result::Result impl aya::programs::sk_lookup::SkLookup pub fn aya::programs::sk_lookup::SkLookup::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::sk_lookup::SkLookup::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::sk_lookup::SkLookup::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::sk_lookup::SkLookup pub fn aya::programs::sk_lookup::SkLookup::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::sk_lookup::SkLookup @@ -4801,11 +5941,11 @@ pub fn aya::programs::sk_lookup::SkLookup::try_from(value: U) -> core::result::R impl core::convert::TryInto for aya::programs::sk_lookup::SkLookup where U: core::convert::TryFrom pub type aya::programs::sk_lookup::SkLookup::Error = >::Error pub fn aya::programs::sk_lookup::SkLookup::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::sk_lookup::SkLookup where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::sk_lookup::SkLookup where T: 'static + ?core::marker::Sized pub fn aya::programs::sk_lookup::SkLookup::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::sk_lookup::SkLookup where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::sk_lookup::SkLookup where T: ?core::marker::Sized pub fn aya::programs::sk_lookup::SkLookup::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::sk_lookup::SkLookup where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::sk_lookup::SkLookup where T: ?core::marker::Sized pub fn aya::programs::sk_lookup::SkLookup::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::sk_lookup::SkLookup pub fn aya::programs::sk_lookup::SkLookup::from(t: T) -> T @@ -4814,20 +5954,29 @@ impl aya::programs::links::Link for aya::programs::sk_lookup::SkLookupLink pub type aya::programs::sk_lookup::SkLookupLink::Id = aya::programs::sk_lookup::SkLookupLinkId pub fn aya::programs::sk_lookup::SkLookupLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::sk_lookup::SkLookupLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::sk_lookup::SkLookupLink +impl core::cmp::PartialEq for aya::programs::sk_lookup::SkLookupLink +pub fn aya::programs::sk_lookup::SkLookupLink::eq(&self, other: &Self) -> bool impl core::convert::From for aya::programs::sk_lookup::SkLookupLink pub fn aya::programs::sk_lookup::SkLookupLink::from(b: aya::programs::links::FdLink) -> aya::programs::sk_lookup::SkLookupLink impl core::convert::From for aya::programs::links::FdLink pub fn aya::programs::links::FdLink::from(w: aya::programs::sk_lookup::SkLookupLink) -> aya::programs::links::FdLink impl core::fmt::Debug for aya::programs::sk_lookup::SkLookupLink pub fn aya::programs::sk_lookup::SkLookupLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::sk_lookup::SkLookupLink +pub fn aya::programs::sk_lookup::SkLookupLink::hash(&self, state: &mut H) impl core::ops::drop::Drop for aya::programs::sk_lookup::SkLookupLink pub fn aya::programs::sk_lookup::SkLookupLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::sk_lookup::SkLookupLinkId +pub fn aya::programs::sk_lookup::SkLookupLinkId::equivalent(&self, key: &aya::programs::sk_lookup::SkLookupLink) -> bool impl core::marker::Freeze for aya::programs::sk_lookup::SkLookupLink impl core::marker::Send for aya::programs::sk_lookup::SkLookupLink impl core::marker::Sync for aya::programs::sk_lookup::SkLookupLink impl core::marker::Unpin for aya::programs::sk_lookup::SkLookupLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::sk_lookup::SkLookupLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::sk_lookup::SkLookupLink +impl equivalent::Equivalent for aya::programs::sk_lookup::SkLookupLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::sk_lookup::SkLookupLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::sk_lookup::SkLookupLink where U: core::convert::From pub fn aya::programs::sk_lookup::SkLookupLink::into(self) -> U impl core::convert::TryFrom for aya::programs::sk_lookup::SkLookupLink where U: core::convert::Into @@ -4836,11 +5985,11 @@ pub fn aya::programs::sk_lookup::SkLookupLink::try_from(value: U) -> core::resul impl core::convert::TryInto for aya::programs::sk_lookup::SkLookupLink where U: core::convert::TryFrom pub type aya::programs::sk_lookup::SkLookupLink::Error = >::Error pub fn aya::programs::sk_lookup::SkLookupLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::sk_lookup::SkLookupLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::sk_lookup::SkLookupLink where T: 'static + ?core::marker::Sized pub fn aya::programs::sk_lookup::SkLookupLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::sk_lookup::SkLookupLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::sk_lookup::SkLookupLink where T: ?core::marker::Sized pub fn aya::programs::sk_lookup::SkLookupLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::sk_lookup::SkLookupLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::sk_lookup::SkLookupLink where T: ?core::marker::Sized pub fn aya::programs::sk_lookup::SkLookupLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::sk_lookup::SkLookupLink pub fn aya::programs::sk_lookup::SkLookupLink::from(t: T) -> T @@ -4853,15 +6002,15 @@ pub fn aya::programs::sk_lookup::SkLookupLinkId::fmt(&self, f: &mut core::fmt::F impl core::hash::Hash for aya::programs::sk_lookup::SkLookupLinkId pub fn aya::programs::sk_lookup::SkLookupLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::sk_lookup::SkLookupLinkId +impl equivalent::Equivalent for aya::programs::sk_lookup::SkLookupLinkId +pub fn aya::programs::sk_lookup::SkLookupLinkId::equivalent(&self, key: &aya::programs::sk_lookup::SkLookupLink) -> bool impl core::marker::Freeze for aya::programs::sk_lookup::SkLookupLinkId impl core::marker::Send for aya::programs::sk_lookup::SkLookupLinkId impl core::marker::Sync for aya::programs::sk_lookup::SkLookupLinkId impl core::marker::Unpin for aya::programs::sk_lookup::SkLookupLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::sk_lookup::SkLookupLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::sk_lookup::SkLookupLinkId -impl equivalent::Equivalent for aya::programs::sk_lookup::SkLookupLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::sk_lookup::SkLookupLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::sk_lookup::SkLookupLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::sk_lookup::SkLookupLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::sk_lookup::SkLookupLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::sk_lookup::SkLookupLinkId where U: core::convert::From pub fn aya::programs::sk_lookup::SkLookupLinkId::into(self) -> U @@ -4871,30 +6020,34 @@ pub fn aya::programs::sk_lookup::SkLookupLinkId::try_from(value: U) -> core::res impl core::convert::TryInto for aya::programs::sk_lookup::SkLookupLinkId where U: core::convert::TryFrom pub type aya::programs::sk_lookup::SkLookupLinkId::Error = >::Error pub fn aya::programs::sk_lookup::SkLookupLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::sk_lookup::SkLookupLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::sk_lookup::SkLookupLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::sk_lookup::SkLookupLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::sk_lookup::SkLookupLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::sk_lookup::SkLookupLinkId where T: ?core::marker::Sized pub fn aya::programs::sk_lookup::SkLookupLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::sk_lookup::SkLookupLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::sk_lookup::SkLookupLinkId where T: ?core::marker::Sized pub fn aya::programs::sk_lookup::SkLookupLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::sk_lookup::SkLookupLinkId pub fn aya::programs::sk_lookup::SkLookupLinkId::from(t: T) -> T pub mod aya::programs::sk_msg pub struct aya::programs::sk_msg::SkMsg impl aya::programs::sk_msg::SkMsg +pub const aya::programs::sk_msg::SkMsg::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::sk_msg::SkMsg::attach(&mut self, map: &aya::maps::sock::SockMapFd) -> core::result::Result -pub fn aya::programs::sk_msg::SkMsg::detach(&mut self, link_id: aya::programs::sk_msg::SkMsgLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::sk_msg::SkMsg::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::sk_msg::SkMsg +pub fn aya::programs::sk_msg::SkMsg::detach(&mut self, link_id: aya::programs::sk_msg::SkMsgLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::sk_msg::SkMsg::take_link(&mut self, link_id: aya::programs::sk_msg::SkMsgLinkId) -> core::result::Result impl aya::programs::sk_msg::SkMsg pub fn aya::programs::sk_msg::SkMsg::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::sk_msg::SkMsg pub fn aya::programs::sk_msg::SkMsg::from_pin>(path: P) -> core::result::Result impl aya::programs::sk_msg::SkMsg +pub fn aya::programs::sk_msg::SkMsg::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::sk_msg::SkMsg pub fn aya::programs::sk_msg::SkMsg::info(&self) -> core::result::Result impl aya::programs::sk_msg::SkMsg pub fn aya::programs::sk_msg::SkMsg::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::sk_msg::SkMsg::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::sk_msg::SkMsg::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::sk_msg::SkMsg pub fn aya::programs::sk_msg::SkMsg::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::sk_msg::SkMsg @@ -4921,11 +6074,11 @@ pub fn aya::programs::sk_msg::SkMsg::try_from(value: U) -> core::result::Result< impl core::convert::TryInto for aya::programs::sk_msg::SkMsg where U: core::convert::TryFrom pub type aya::programs::sk_msg::SkMsg::Error = >::Error pub fn aya::programs::sk_msg::SkMsg::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::sk_msg::SkMsg where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::sk_msg::SkMsg where T: 'static + ?core::marker::Sized pub fn aya::programs::sk_msg::SkMsg::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::sk_msg::SkMsg where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::sk_msg::SkMsg where T: ?core::marker::Sized pub fn aya::programs::sk_msg::SkMsg::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::sk_msg::SkMsg where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::sk_msg::SkMsg where T: ?core::marker::Sized pub fn aya::programs::sk_msg::SkMsg::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::sk_msg::SkMsg pub fn aya::programs::sk_msg::SkMsg::from(t: T) -> T @@ -4934,20 +6087,29 @@ impl aya::programs::links::Link for aya::programs::sk_msg::SkMsgLink pub type aya::programs::sk_msg::SkMsgLink::Id = aya::programs::sk_msg::SkMsgLinkId pub fn aya::programs::sk_msg::SkMsgLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::sk_msg::SkMsgLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::sk_msg::SkMsgLink +impl core::cmp::PartialEq for aya::programs::sk_msg::SkMsgLink +pub fn aya::programs::sk_msg::SkMsgLink::eq(&self, other: &Self) -> bool impl core::convert::From for aya::programs::sk_msg::SkMsgLink pub fn aya::programs::sk_msg::SkMsgLink::from(b: aya::programs::links::ProgAttachLink) -> aya::programs::sk_msg::SkMsgLink impl core::convert::From for aya::programs::links::ProgAttachLink pub fn aya::programs::links::ProgAttachLink::from(w: aya::programs::sk_msg::SkMsgLink) -> aya::programs::links::ProgAttachLink impl core::fmt::Debug for aya::programs::sk_msg::SkMsgLink pub fn aya::programs::sk_msg::SkMsgLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::sk_msg::SkMsgLink +pub fn aya::programs::sk_msg::SkMsgLink::hash(&self, state: &mut H) impl core::ops::drop::Drop for aya::programs::sk_msg::SkMsgLink pub fn aya::programs::sk_msg::SkMsgLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::sk_msg::SkMsgLinkId +pub fn aya::programs::sk_msg::SkMsgLinkId::equivalent(&self, key: &aya::programs::sk_msg::SkMsgLink) -> bool impl core::marker::Freeze for aya::programs::sk_msg::SkMsgLink impl core::marker::Send for aya::programs::sk_msg::SkMsgLink impl core::marker::Sync for aya::programs::sk_msg::SkMsgLink impl core::marker::Unpin for aya::programs::sk_msg::SkMsgLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::sk_msg::SkMsgLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::sk_msg::SkMsgLink +impl equivalent::Equivalent for aya::programs::sk_msg::SkMsgLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::sk_msg::SkMsgLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::sk_msg::SkMsgLink where U: core::convert::From pub fn aya::programs::sk_msg::SkMsgLink::into(self) -> U impl core::convert::TryFrom for aya::programs::sk_msg::SkMsgLink where U: core::convert::Into @@ -4956,11 +6118,11 @@ pub fn aya::programs::sk_msg::SkMsgLink::try_from(value: U) -> core::result::Res impl core::convert::TryInto for aya::programs::sk_msg::SkMsgLink where U: core::convert::TryFrom pub type aya::programs::sk_msg::SkMsgLink::Error = >::Error pub fn aya::programs::sk_msg::SkMsgLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::sk_msg::SkMsgLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::sk_msg::SkMsgLink where T: 'static + ?core::marker::Sized pub fn aya::programs::sk_msg::SkMsgLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::sk_msg::SkMsgLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::sk_msg::SkMsgLink where T: ?core::marker::Sized pub fn aya::programs::sk_msg::SkMsgLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::sk_msg::SkMsgLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::sk_msg::SkMsgLink where T: ?core::marker::Sized pub fn aya::programs::sk_msg::SkMsgLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::sk_msg::SkMsgLink pub fn aya::programs::sk_msg::SkMsgLink::from(t: T) -> T @@ -4973,15 +6135,15 @@ pub fn aya::programs::sk_msg::SkMsgLinkId::fmt(&self, f: &mut core::fmt::Formatt impl core::hash::Hash for aya::programs::sk_msg::SkMsgLinkId pub fn aya::programs::sk_msg::SkMsgLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::sk_msg::SkMsgLinkId +impl equivalent::Equivalent for aya::programs::sk_msg::SkMsgLinkId +pub fn aya::programs::sk_msg::SkMsgLinkId::equivalent(&self, key: &aya::programs::sk_msg::SkMsgLink) -> bool impl core::marker::Freeze for aya::programs::sk_msg::SkMsgLinkId impl core::marker::Send for aya::programs::sk_msg::SkMsgLinkId impl core::marker::Sync for aya::programs::sk_msg::SkMsgLinkId impl core::marker::Unpin for aya::programs::sk_msg::SkMsgLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::sk_msg::SkMsgLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::sk_msg::SkMsgLinkId -impl equivalent::Equivalent for aya::programs::sk_msg::SkMsgLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::sk_msg::SkMsgLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::sk_msg::SkMsgLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::sk_msg::SkMsgLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::sk_msg::SkMsgLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::sk_msg::SkMsgLinkId where U: core::convert::From pub fn aya::programs::sk_msg::SkMsgLinkId::into(self) -> U @@ -4991,11 +6153,11 @@ pub fn aya::programs::sk_msg::SkMsgLinkId::try_from(value: U) -> core::result::R impl core::convert::TryInto for aya::programs::sk_msg::SkMsgLinkId where U: core::convert::TryFrom pub type aya::programs::sk_msg::SkMsgLinkId::Error = >::Error pub fn aya::programs::sk_msg::SkMsgLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::sk_msg::SkMsgLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::sk_msg::SkMsgLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::sk_msg::SkMsgLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::sk_msg::SkMsgLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::sk_msg::SkMsgLinkId where T: ?core::marker::Sized pub fn aya::programs::sk_msg::SkMsgLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::sk_msg::SkMsgLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::sk_msg::SkMsgLinkId where T: ?core::marker::Sized pub fn aya::programs::sk_msg::SkMsgLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::sk_msg::SkMsgLinkId pub fn aya::programs::sk_msg::SkMsgLinkId::from(t: T) -> T @@ -5026,28 +6188,34 @@ impl alloc::borrow::ToOwned for aya::programs::sk_skb::SkSkbKind where T: cor pub type aya::programs::sk_skb::SkSkbKind::Owned = T pub fn aya::programs::sk_skb::SkSkbKind::clone_into(&self, target: &mut T) pub fn aya::programs::sk_skb::SkSkbKind::to_owned(&self) -> T -impl core::any::Any for aya::programs::sk_skb::SkSkbKind where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::sk_skb::SkSkbKind where T: 'static + ?core::marker::Sized pub fn aya::programs::sk_skb::SkSkbKind::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::sk_skb::SkSkbKind where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::sk_skb::SkSkbKind where T: ?core::marker::Sized pub fn aya::programs::sk_skb::SkSkbKind::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::sk_skb::SkSkbKind where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::sk_skb::SkSkbKind where T: ?core::marker::Sized pub fn aya::programs::sk_skb::SkSkbKind::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::programs::sk_skb::SkSkbKind where T: core::clone::Clone +pub unsafe fn aya::programs::sk_skb::SkSkbKind::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya::programs::sk_skb::SkSkbKind pub fn aya::programs::sk_skb::SkSkbKind::from(t: T) -> T pub struct aya::programs::sk_skb::SkSkb impl aya::programs::sk_skb::SkSkb +pub const aya::programs::sk_skb::SkSkb::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::sk_skb::SkSkb::attach(&mut self, map: &aya::maps::sock::SockMapFd) -> core::result::Result -pub fn aya::programs::sk_skb::SkSkb::detach(&mut self, link_id: aya::programs::sk_skb::SkSkbLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::sk_skb::SkSkb::from_pin>(path: P, kind: aya::programs::sk_skb::SkSkbKind) -> core::result::Result pub fn aya::programs::sk_skb::SkSkb::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::sk_skb::SkSkb +pub fn aya::programs::sk_skb::SkSkb::detach(&mut self, link_id: aya::programs::sk_skb::SkSkbLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::sk_skb::SkSkb::take_link(&mut self, link_id: aya::programs::sk_skb::SkSkbLinkId) -> core::result::Result impl aya::programs::sk_skb::SkSkb pub fn aya::programs::sk_skb::SkSkb::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::sk_skb::SkSkb +pub fn aya::programs::sk_skb::SkSkb::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>, kind: aya::programs::sk_skb::SkSkbKind) -> core::result::Result +impl aya::programs::sk_skb::SkSkb pub fn aya::programs::sk_skb::SkSkb::info(&self) -> core::result::Result impl aya::programs::sk_skb::SkSkb pub fn aya::programs::sk_skb::SkSkb::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::sk_skb::SkSkb::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::sk_skb::SkSkb::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::sk_skb::SkSkb pub fn aya::programs::sk_skb::SkSkb::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::sk_skb::SkSkb @@ -5074,11 +6242,11 @@ pub fn aya::programs::sk_skb::SkSkb::try_from(value: U) -> core::result::Result< impl core::convert::TryInto for aya::programs::sk_skb::SkSkb where U: core::convert::TryFrom pub type aya::programs::sk_skb::SkSkb::Error = >::Error pub fn aya::programs::sk_skb::SkSkb::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::sk_skb::SkSkb where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::sk_skb::SkSkb where T: 'static + ?core::marker::Sized pub fn aya::programs::sk_skb::SkSkb::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::sk_skb::SkSkb where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::sk_skb::SkSkb where T: ?core::marker::Sized pub fn aya::programs::sk_skb::SkSkb::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::sk_skb::SkSkb where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::sk_skb::SkSkb where T: ?core::marker::Sized pub fn aya::programs::sk_skb::SkSkb::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::sk_skb::SkSkb pub fn aya::programs::sk_skb::SkSkb::from(t: T) -> T @@ -5087,20 +6255,29 @@ impl aya::programs::links::Link for aya::programs::sk_skb::SkSkbLink pub type aya::programs::sk_skb::SkSkbLink::Id = aya::programs::sk_skb::SkSkbLinkId pub fn aya::programs::sk_skb::SkSkbLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::sk_skb::SkSkbLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::sk_skb::SkSkbLink +impl core::cmp::PartialEq for aya::programs::sk_skb::SkSkbLink +pub fn aya::programs::sk_skb::SkSkbLink::eq(&self, other: &Self) -> bool impl core::convert::From for aya::programs::sk_skb::SkSkbLink pub fn aya::programs::sk_skb::SkSkbLink::from(b: aya::programs::links::ProgAttachLink) -> aya::programs::sk_skb::SkSkbLink impl core::convert::From for aya::programs::links::ProgAttachLink pub fn aya::programs::links::ProgAttachLink::from(w: aya::programs::sk_skb::SkSkbLink) -> aya::programs::links::ProgAttachLink impl core::fmt::Debug for aya::programs::sk_skb::SkSkbLink pub fn aya::programs::sk_skb::SkSkbLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::sk_skb::SkSkbLink +pub fn aya::programs::sk_skb::SkSkbLink::hash(&self, state: &mut H) impl core::ops::drop::Drop for aya::programs::sk_skb::SkSkbLink pub fn aya::programs::sk_skb::SkSkbLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::sk_skb::SkSkbLinkId +pub fn aya::programs::sk_skb::SkSkbLinkId::equivalent(&self, key: &aya::programs::sk_skb::SkSkbLink) -> bool impl core::marker::Freeze for aya::programs::sk_skb::SkSkbLink impl core::marker::Send for aya::programs::sk_skb::SkSkbLink impl core::marker::Sync for aya::programs::sk_skb::SkSkbLink impl core::marker::Unpin for aya::programs::sk_skb::SkSkbLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::sk_skb::SkSkbLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::sk_skb::SkSkbLink +impl equivalent::Equivalent for aya::programs::sk_skb::SkSkbLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::sk_skb::SkSkbLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::sk_skb::SkSkbLink where U: core::convert::From pub fn aya::programs::sk_skb::SkSkbLink::into(self) -> U impl core::convert::TryFrom for aya::programs::sk_skb::SkSkbLink where U: core::convert::Into @@ -5109,11 +6286,11 @@ pub fn aya::programs::sk_skb::SkSkbLink::try_from(value: U) -> core::result::Res impl core::convert::TryInto for aya::programs::sk_skb::SkSkbLink where U: core::convert::TryFrom pub type aya::programs::sk_skb::SkSkbLink::Error = >::Error pub fn aya::programs::sk_skb::SkSkbLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::sk_skb::SkSkbLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::sk_skb::SkSkbLink where T: 'static + ?core::marker::Sized pub fn aya::programs::sk_skb::SkSkbLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::sk_skb::SkSkbLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::sk_skb::SkSkbLink where T: ?core::marker::Sized pub fn aya::programs::sk_skb::SkSkbLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::sk_skb::SkSkbLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::sk_skb::SkSkbLink where T: ?core::marker::Sized pub fn aya::programs::sk_skb::SkSkbLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::sk_skb::SkSkbLink pub fn aya::programs::sk_skb::SkSkbLink::from(t: T) -> T @@ -5126,15 +6303,15 @@ pub fn aya::programs::sk_skb::SkSkbLinkId::fmt(&self, f: &mut core::fmt::Formatt impl core::hash::Hash for aya::programs::sk_skb::SkSkbLinkId pub fn aya::programs::sk_skb::SkSkbLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::sk_skb::SkSkbLinkId +impl equivalent::Equivalent for aya::programs::sk_skb::SkSkbLinkId +pub fn aya::programs::sk_skb::SkSkbLinkId::equivalent(&self, key: &aya::programs::sk_skb::SkSkbLink) -> bool impl core::marker::Freeze for aya::programs::sk_skb::SkSkbLinkId impl core::marker::Send for aya::programs::sk_skb::SkSkbLinkId impl core::marker::Sync for aya::programs::sk_skb::SkSkbLinkId impl core::marker::Unpin for aya::programs::sk_skb::SkSkbLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::sk_skb::SkSkbLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::sk_skb::SkSkbLinkId -impl equivalent::Equivalent for aya::programs::sk_skb::SkSkbLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::sk_skb::SkSkbLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::sk_skb::SkSkbLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::sk_skb::SkSkbLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::sk_skb::SkSkbLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::sk_skb::SkSkbLinkId where U: core::convert::From pub fn aya::programs::sk_skb::SkSkbLinkId::into(self) -> U @@ -5144,30 +6321,34 @@ pub fn aya::programs::sk_skb::SkSkbLinkId::try_from(value: U) -> core::result::R impl core::convert::TryInto for aya::programs::sk_skb::SkSkbLinkId where U: core::convert::TryFrom pub type aya::programs::sk_skb::SkSkbLinkId::Error = >::Error pub fn aya::programs::sk_skb::SkSkbLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::sk_skb::SkSkbLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::sk_skb::SkSkbLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::sk_skb::SkSkbLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::sk_skb::SkSkbLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::sk_skb::SkSkbLinkId where T: ?core::marker::Sized pub fn aya::programs::sk_skb::SkSkbLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::sk_skb::SkSkbLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::sk_skb::SkSkbLinkId where T: ?core::marker::Sized pub fn aya::programs::sk_skb::SkSkbLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::sk_skb::SkSkbLinkId pub fn aya::programs::sk_skb::SkSkbLinkId::from(t: T) -> T pub mod aya::programs::sock_ops pub struct aya::programs::sock_ops::SockOps impl aya::programs::sock_ops::SockOps -pub fn aya::programs::sock_ops::SockOps::attach(&mut self, cgroup: T) -> core::result::Result -pub fn aya::programs::sock_ops::SockOps::detach(&mut self, link_id: aya::programs::sock_ops::SockOpsLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub const aya::programs::sock_ops::SockOps::PROGRAM_TYPE: aya::programs::ProgramType +pub fn aya::programs::sock_ops::SockOps::attach(&mut self, cgroup: T, mode: aya::programs::links::CgroupAttachMode) -> core::result::Result pub fn aya::programs::sock_ops::SockOps::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::sock_ops::SockOps +pub fn aya::programs::sock_ops::SockOps::detach(&mut self, link_id: aya::programs::sock_ops::SockOpsLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::sock_ops::SockOps::take_link(&mut self, link_id: aya::programs::sock_ops::SockOpsLinkId) -> core::result::Result impl aya::programs::sock_ops::SockOps pub fn aya::programs::sock_ops::SockOps::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::sock_ops::SockOps pub fn aya::programs::sock_ops::SockOps::from_pin>(path: P) -> core::result::Result impl aya::programs::sock_ops::SockOps +pub fn aya::programs::sock_ops::SockOps::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::sock_ops::SockOps pub fn aya::programs::sock_ops::SockOps::info(&self) -> core::result::Result impl aya::programs::sock_ops::SockOps pub fn aya::programs::sock_ops::SockOps::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::sock_ops::SockOps::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::sock_ops::SockOps::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::sock_ops::SockOps pub fn aya::programs::sock_ops::SockOps::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::sock_ops::SockOps @@ -5194,11 +6375,11 @@ pub fn aya::programs::sock_ops::SockOps::try_from(value: U) -> core::result::Res impl core::convert::TryInto for aya::programs::sock_ops::SockOps where U: core::convert::TryFrom pub type aya::programs::sock_ops::SockOps::Error = >::Error pub fn aya::programs::sock_ops::SockOps::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::sock_ops::SockOps where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::sock_ops::SockOps where T: 'static + ?core::marker::Sized pub fn aya::programs::sock_ops::SockOps::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::sock_ops::SockOps where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::sock_ops::SockOps where T: ?core::marker::Sized pub fn aya::programs::sock_ops::SockOps::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::sock_ops::SockOps where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::sock_ops::SockOps where T: ?core::marker::Sized pub fn aya::programs::sock_ops::SockOps::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::sock_ops::SockOps pub fn aya::programs::sock_ops::SockOps::from(t: T) -> T @@ -5207,20 +6388,28 @@ impl aya::programs::links::Link for aya::programs::sock_ops::SockOpsLink pub type aya::programs::sock_ops::SockOpsLink::Id = aya::programs::sock_ops::SockOpsLinkId pub fn aya::programs::sock_ops::SockOpsLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::sock_ops::SockOpsLink::id(&self) -> Self::Id -impl core::convert::From for aya::programs::sock_ops::SockOpsLink -pub fn aya::programs::sock_ops::SockOpsLink::from(b: aya::programs::links::ProgAttachLink) -> aya::programs::sock_ops::SockOpsLink -impl core::convert::From for aya::programs::links::ProgAttachLink -pub fn aya::programs::links::ProgAttachLink::from(w: aya::programs::sock_ops::SockOpsLink) -> aya::programs::links::ProgAttachLink +impl core::cmp::Eq for aya::programs::sock_ops::SockOpsLink +impl core::cmp::PartialEq for aya::programs::sock_ops::SockOpsLink +pub fn aya::programs::sock_ops::SockOpsLink::eq(&self, other: &Self) -> bool +impl core::convert::TryFrom for aya::programs::links::FdLink +pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError +pub fn aya::programs::links::FdLink::try_from(value: aya::programs::sock_ops::SockOpsLink) -> core::result::Result impl core::fmt::Debug for aya::programs::sock_ops::SockOpsLink pub fn aya::programs::sock_ops::SockOpsLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::sock_ops::SockOpsLink +pub fn aya::programs::sock_ops::SockOpsLink::hash(&self, state: &mut H) impl core::ops::drop::Drop for aya::programs::sock_ops::SockOpsLink pub fn aya::programs::sock_ops::SockOpsLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::sock_ops::SockOpsLinkId +pub fn aya::programs::sock_ops::SockOpsLinkId::equivalent(&self, key: &aya::programs::sock_ops::SockOpsLink) -> bool impl core::marker::Freeze for aya::programs::sock_ops::SockOpsLink impl core::marker::Send for aya::programs::sock_ops::SockOpsLink impl core::marker::Sync for aya::programs::sock_ops::SockOpsLink impl core::marker::Unpin for aya::programs::sock_ops::SockOpsLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::sock_ops::SockOpsLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::sock_ops::SockOpsLink +impl equivalent::Equivalent for aya::programs::sock_ops::SockOpsLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::sock_ops::SockOpsLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::sock_ops::SockOpsLink where U: core::convert::From pub fn aya::programs::sock_ops::SockOpsLink::into(self) -> U impl core::convert::TryFrom for aya::programs::sock_ops::SockOpsLink where U: core::convert::Into @@ -5229,11 +6418,11 @@ pub fn aya::programs::sock_ops::SockOpsLink::try_from(value: U) -> core::result: impl core::convert::TryInto for aya::programs::sock_ops::SockOpsLink where U: core::convert::TryFrom pub type aya::programs::sock_ops::SockOpsLink::Error = >::Error pub fn aya::programs::sock_ops::SockOpsLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::sock_ops::SockOpsLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::sock_ops::SockOpsLink where T: 'static + ?core::marker::Sized pub fn aya::programs::sock_ops::SockOpsLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::sock_ops::SockOpsLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::sock_ops::SockOpsLink where T: ?core::marker::Sized pub fn aya::programs::sock_ops::SockOpsLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::sock_ops::SockOpsLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::sock_ops::SockOpsLink where T: ?core::marker::Sized pub fn aya::programs::sock_ops::SockOpsLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::sock_ops::SockOpsLink pub fn aya::programs::sock_ops::SockOpsLink::from(t: T) -> T @@ -5246,15 +6435,15 @@ pub fn aya::programs::sock_ops::SockOpsLinkId::fmt(&self, f: &mut core::fmt::For impl core::hash::Hash for aya::programs::sock_ops::SockOpsLinkId pub fn aya::programs::sock_ops::SockOpsLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::sock_ops::SockOpsLinkId +impl equivalent::Equivalent for aya::programs::sock_ops::SockOpsLinkId +pub fn aya::programs::sock_ops::SockOpsLinkId::equivalent(&self, key: &aya::programs::sock_ops::SockOpsLink) -> bool impl core::marker::Freeze for aya::programs::sock_ops::SockOpsLinkId impl core::marker::Send for aya::programs::sock_ops::SockOpsLinkId impl core::marker::Sync for aya::programs::sock_ops::SockOpsLinkId impl core::marker::Unpin for aya::programs::sock_ops::SockOpsLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::sock_ops::SockOpsLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::sock_ops::SockOpsLinkId -impl equivalent::Equivalent for aya::programs::sock_ops::SockOpsLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::sock_ops::SockOpsLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::sock_ops::SockOpsLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::sock_ops::SockOpsLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::sock_ops::SockOpsLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::sock_ops::SockOpsLinkId where U: core::convert::From pub fn aya::programs::sock_ops::SockOpsLinkId::into(self) -> U @@ -5264,11 +6453,11 @@ pub fn aya::programs::sock_ops::SockOpsLinkId::try_from(value: U) -> core::resul impl core::convert::TryInto for aya::programs::sock_ops::SockOpsLinkId where U: core::convert::TryFrom pub type aya::programs::sock_ops::SockOpsLinkId::Error = >::Error pub fn aya::programs::sock_ops::SockOpsLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::sock_ops::SockOpsLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::sock_ops::SockOpsLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::sock_ops::SockOpsLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::sock_ops::SockOpsLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::sock_ops::SockOpsLinkId where T: ?core::marker::Sized pub fn aya::programs::sock_ops::SockOpsLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::sock_ops::SockOpsLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::sock_ops::SockOpsLinkId where T: ?core::marker::Sized pub fn aya::programs::sock_ops::SockOpsLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::sock_ops::SockOpsLinkId pub fn aya::programs::sock_ops::SockOpsLinkId::from(t: T) -> T @@ -5298,18 +6487,19 @@ pub fn aya::programs::socket_filter::SocketFilterError::try_from(value: U) -> co impl core::convert::TryInto for aya::programs::socket_filter::SocketFilterError where U: core::convert::TryFrom pub type aya::programs::socket_filter::SocketFilterError::Error = >::Error pub fn aya::programs::socket_filter::SocketFilterError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya::programs::socket_filter::SocketFilterError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya::programs::socket_filter::SocketFilterError where T: core::fmt::Display + ?core::marker::Sized pub fn aya::programs::socket_filter::SocketFilterError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya::programs::socket_filter::SocketFilterError where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::socket_filter::SocketFilterError where T: 'static + ?core::marker::Sized pub fn aya::programs::socket_filter::SocketFilterError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::socket_filter::SocketFilterError where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::socket_filter::SocketFilterError where T: ?core::marker::Sized pub fn aya::programs::socket_filter::SocketFilterError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::socket_filter::SocketFilterError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::socket_filter::SocketFilterError where T: ?core::marker::Sized pub fn aya::programs::socket_filter::SocketFilterError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::socket_filter::SocketFilterError pub fn aya::programs::socket_filter::SocketFilterError::from(t: T) -> T pub struct aya::programs::socket_filter::SocketFilter impl aya::programs::socket_filter::SocketFilter +pub const aya::programs::socket_filter::SocketFilter::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::socket_filter::SocketFilter::attach(&mut self, socket: T) -> core::result::Result pub fn aya::programs::socket_filter::SocketFilter::detach(&mut self, link_id: aya::programs::socket_filter::SocketFilterLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::socket_filter::SocketFilter::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> @@ -5322,7 +6512,7 @@ impl aya::programs::socket_filter::SocketFilter pub fn aya::programs::socket_filter::SocketFilter::info(&self) -> core::result::Result impl aya::programs::socket_filter::SocketFilter pub fn aya::programs::socket_filter::SocketFilter::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::socket_filter::SocketFilter::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::socket_filter::SocketFilter::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::socket_filter::SocketFilter pub fn aya::programs::socket_filter::SocketFilter::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::socket_filter::SocketFilter @@ -5349,11 +6539,11 @@ pub fn aya::programs::socket_filter::SocketFilter::try_from(value: U) -> core::r impl core::convert::TryInto for aya::programs::socket_filter::SocketFilter where U: core::convert::TryFrom pub type aya::programs::socket_filter::SocketFilter::Error = >::Error pub fn aya::programs::socket_filter::SocketFilter::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::socket_filter::SocketFilter where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::socket_filter::SocketFilter where T: 'static + ?core::marker::Sized pub fn aya::programs::socket_filter::SocketFilter::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::socket_filter::SocketFilter where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::socket_filter::SocketFilter where T: ?core::marker::Sized pub fn aya::programs::socket_filter::SocketFilter::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::socket_filter::SocketFilter where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::socket_filter::SocketFilter where T: ?core::marker::Sized pub fn aya::programs::socket_filter::SocketFilter::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::socket_filter::SocketFilter pub fn aya::programs::socket_filter::SocketFilter::from(t: T) -> T @@ -5362,14 +6552,23 @@ impl aya::programs::links::Link for aya::programs::socket_filter::SocketFilterLi pub type aya::programs::socket_filter::SocketFilterLink::Id = aya::programs::socket_filter::SocketFilterLinkId pub fn aya::programs::socket_filter::SocketFilterLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::socket_filter::SocketFilterLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::socket_filter::SocketFilterLink +impl core::cmp::PartialEq for aya::programs::socket_filter::SocketFilterLink +pub fn aya::programs::socket_filter::SocketFilterLink::eq(&self, other: &Self) -> bool impl core::fmt::Debug for aya::programs::socket_filter::SocketFilterLink pub fn aya::programs::socket_filter::SocketFilterLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::socket_filter::SocketFilterLink +pub fn aya::programs::socket_filter::SocketFilterLink::hash(&self, state: &mut H) +impl equivalent::Equivalent for aya::programs::socket_filter::SocketFilterLinkId +pub fn aya::programs::socket_filter::SocketFilterLinkId::equivalent(&self, key: &aya::programs::socket_filter::SocketFilterLink) -> bool impl core::marker::Freeze for aya::programs::socket_filter::SocketFilterLink impl core::marker::Send for aya::programs::socket_filter::SocketFilterLink impl core::marker::Sync for aya::programs::socket_filter::SocketFilterLink impl core::marker::Unpin for aya::programs::socket_filter::SocketFilterLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::socket_filter::SocketFilterLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::socket_filter::SocketFilterLink +impl equivalent::Equivalent for aya::programs::socket_filter::SocketFilterLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::socket_filter::SocketFilterLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::socket_filter::SocketFilterLink where U: core::convert::From pub fn aya::programs::socket_filter::SocketFilterLink::into(self) -> U impl core::convert::TryFrom for aya::programs::socket_filter::SocketFilterLink where U: core::convert::Into @@ -5378,11 +6577,11 @@ pub fn aya::programs::socket_filter::SocketFilterLink::try_from(value: U) -> cor impl core::convert::TryInto for aya::programs::socket_filter::SocketFilterLink where U: core::convert::TryFrom pub type aya::programs::socket_filter::SocketFilterLink::Error = >::Error pub fn aya::programs::socket_filter::SocketFilterLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::socket_filter::SocketFilterLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::socket_filter::SocketFilterLink where T: 'static + ?core::marker::Sized pub fn aya::programs::socket_filter::SocketFilterLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::socket_filter::SocketFilterLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::socket_filter::SocketFilterLink where T: ?core::marker::Sized pub fn aya::programs::socket_filter::SocketFilterLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::socket_filter::SocketFilterLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::socket_filter::SocketFilterLink where T: ?core::marker::Sized pub fn aya::programs::socket_filter::SocketFilterLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::socket_filter::SocketFilterLink pub fn aya::programs::socket_filter::SocketFilterLink::from(t: T) -> T @@ -5395,15 +6594,15 @@ pub fn aya::programs::socket_filter::SocketFilterLinkId::fmt(&self, f: &mut core impl core::hash::Hash for aya::programs::socket_filter::SocketFilterLinkId pub fn aya::programs::socket_filter::SocketFilterLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::socket_filter::SocketFilterLinkId +impl equivalent::Equivalent for aya::programs::socket_filter::SocketFilterLinkId +pub fn aya::programs::socket_filter::SocketFilterLinkId::equivalent(&self, key: &aya::programs::socket_filter::SocketFilterLink) -> bool impl core::marker::Freeze for aya::programs::socket_filter::SocketFilterLinkId impl core::marker::Send for aya::programs::socket_filter::SocketFilterLinkId impl core::marker::Sync for aya::programs::socket_filter::SocketFilterLinkId impl core::marker::Unpin for aya::programs::socket_filter::SocketFilterLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::socket_filter::SocketFilterLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::socket_filter::SocketFilterLinkId -impl equivalent::Equivalent for aya::programs::socket_filter::SocketFilterLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::socket_filter::SocketFilterLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::socket_filter::SocketFilterLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::socket_filter::SocketFilterLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::socket_filter::SocketFilterLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::socket_filter::SocketFilterLinkId where U: core::convert::From pub fn aya::programs::socket_filter::SocketFilterLinkId::into(self) -> U @@ -5413,15 +6612,42 @@ pub fn aya::programs::socket_filter::SocketFilterLinkId::try_from(value: U) -> c impl core::convert::TryInto for aya::programs::socket_filter::SocketFilterLinkId where U: core::convert::TryFrom pub type aya::programs::socket_filter::SocketFilterLinkId::Error = >::Error pub fn aya::programs::socket_filter::SocketFilterLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::socket_filter::SocketFilterLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::socket_filter::SocketFilterLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::socket_filter::SocketFilterLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::socket_filter::SocketFilterLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::socket_filter::SocketFilterLinkId where T: ?core::marker::Sized pub fn aya::programs::socket_filter::SocketFilterLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::socket_filter::SocketFilterLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::socket_filter::SocketFilterLinkId where T: ?core::marker::Sized pub fn aya::programs::socket_filter::SocketFilterLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::socket_filter::SocketFilterLinkId pub fn aya::programs::socket_filter::SocketFilterLinkId::from(t: T) -> T pub mod aya::programs::tc +pub enum aya::programs::tc::TcAttachOptions +pub aya::programs::tc::TcAttachOptions::Netlink(aya::programs::tc::NlOptions) +pub aya::programs::tc::TcAttachOptions::TcxOrder(aya::programs::links::LinkOrder) +impl core::fmt::Debug for aya::programs::tc::TcAttachOptions +pub fn aya::programs::tc::TcAttachOptions::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Freeze for aya::programs::tc::TcAttachOptions +impl core::marker::Send for aya::programs::tc::TcAttachOptions +impl core::marker::Sync for aya::programs::tc::TcAttachOptions +impl core::marker::Unpin for aya::programs::tc::TcAttachOptions +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::tc::TcAttachOptions +impl core::panic::unwind_safe::UnwindSafe for aya::programs::tc::TcAttachOptions +impl core::convert::Into for aya::programs::tc::TcAttachOptions where U: core::convert::From +pub fn aya::programs::tc::TcAttachOptions::into(self) -> U +impl core::convert::TryFrom for aya::programs::tc::TcAttachOptions where U: core::convert::Into +pub type aya::programs::tc::TcAttachOptions::Error = core::convert::Infallible +pub fn aya::programs::tc::TcAttachOptions::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::tc::TcAttachOptions where U: core::convert::TryFrom +pub type aya::programs::tc::TcAttachOptions::Error = >::Error +pub fn aya::programs::tc::TcAttachOptions::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya::programs::tc::TcAttachOptions where T: 'static + ?core::marker::Sized +pub fn aya::programs::tc::TcAttachOptions::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::tc::TcAttachOptions where T: ?core::marker::Sized +pub fn aya::programs::tc::TcAttachOptions::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::tc::TcAttachOptions where T: ?core::marker::Sized +pub fn aya::programs::tc::TcAttachOptions::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::programs::tc::TcAttachOptions +pub fn aya::programs::tc::TcAttachOptions::from(t: T) -> T pub enum aya::programs::tc::TcAttachType pub aya::programs::tc::TcAttachType::Custom(u32) pub aya::programs::tc::TcAttachType::Egress @@ -5443,9 +6669,7 @@ impl core::marker::Sync for aya::programs::tc::TcAttachType impl core::marker::Unpin for aya::programs::tc::TcAttachType impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::tc::TcAttachType impl core::panic::unwind_safe::UnwindSafe for aya::programs::tc::TcAttachType -impl equivalent::Equivalent for aya::programs::tc::TcAttachType where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::tc::TcAttachType::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::tc::TcAttachType where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::tc::TcAttachType where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::tc::TcAttachType::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::tc::TcAttachType where U: core::convert::From pub fn aya::programs::tc::TcAttachType::into(self) -> U @@ -5459,20 +6683,29 @@ impl alloc::borrow::ToOwned for aya::programs::tc::TcAttachType where T: core pub type aya::programs::tc::TcAttachType::Owned = T pub fn aya::programs::tc::TcAttachType::clone_into(&self, target: &mut T) pub fn aya::programs::tc::TcAttachType::to_owned(&self) -> T -impl core::any::Any for aya::programs::tc::TcAttachType where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::tc::TcAttachType where T: 'static + ?core::marker::Sized pub fn aya::programs::tc::TcAttachType::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::tc::TcAttachType where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::tc::TcAttachType where T: ?core::marker::Sized pub fn aya::programs::tc::TcAttachType::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::tc::TcAttachType where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::tc::TcAttachType where T: ?core::marker::Sized pub fn aya::programs::tc::TcAttachType::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::programs::tc::TcAttachType where T: core::clone::Clone +pub unsafe fn aya::programs::tc::TcAttachType::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya::programs::tc::TcAttachType pub fn aya::programs::tc::TcAttachType::from(t: T) -> T pub enum aya::programs::tc::TcError pub aya::programs::tc::TcError::AlreadyAttached -pub aya::programs::tc::TcError::NetlinkError -pub aya::programs::tc::TcError::NetlinkError::io_error: std::io::error::Error +pub aya::programs::tc::TcError::InvalidLinkOperation +pub aya::programs::tc::TcError::InvalidTcxAttach(u32) +pub aya::programs::tc::TcError::IoError(std::io::error::Error) +pub aya::programs::tc::TcError::NetlinkError(aya::sys::netlink::NetlinkError) +pub aya::programs::tc::TcError::NulError(alloc::ffi::c_str::NulError) +impl core::convert::From for aya::programs::tc::TcError +pub fn aya::programs::tc::TcError::from(source: alloc::ffi::c_str::NulError) -> Self impl core::convert::From for aya::programs::ProgramError pub fn aya::programs::ProgramError::from(source: aya::programs::tc::TcError) -> Self +impl core::convert::From for aya::programs::tc::TcError +pub fn aya::programs::tc::TcError::from(source: std::io::error::Error) -> Self impl core::error::Error for aya::programs::tc::TcError pub fn aya::programs::tc::TcError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)> impl core::fmt::Debug for aya::programs::tc::TcError @@ -5493,34 +6726,78 @@ pub fn aya::programs::tc::TcError::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::programs::tc::TcError where U: core::convert::TryFrom pub type aya::programs::tc::TcError::Error = >::Error pub fn aya::programs::tc::TcError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya::programs::tc::TcError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya::programs::tc::TcError where T: core::fmt::Display + ?core::marker::Sized pub fn aya::programs::tc::TcError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya::programs::tc::TcError where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::tc::TcError where T: 'static + ?core::marker::Sized pub fn aya::programs::tc::TcError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::tc::TcError where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::tc::TcError where T: ?core::marker::Sized pub fn aya::programs::tc::TcError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::tc::TcError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::tc::TcError where T: ?core::marker::Sized pub fn aya::programs::tc::TcError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::tc::TcError pub fn aya::programs::tc::TcError::from(t: T) -> T +pub struct aya::programs::tc::NlOptions +pub aya::programs::tc::NlOptions::handle: u32 +pub aya::programs::tc::NlOptions::priority: u16 +impl core::cmp::Eq for aya::programs::tc::NlOptions +impl core::cmp::PartialEq for aya::programs::tc::NlOptions +pub fn aya::programs::tc::NlOptions::eq(&self, other: &aya::programs::tc::NlOptions) -> bool +impl core::default::Default for aya::programs::tc::NlOptions +pub fn aya::programs::tc::NlOptions::default() -> aya::programs::tc::NlOptions +impl core::fmt::Debug for aya::programs::tc::NlOptions +pub fn aya::programs::tc::NlOptions::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::tc::NlOptions +pub fn aya::programs::tc::NlOptions::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::StructuralPartialEq for aya::programs::tc::NlOptions +impl core::marker::Freeze for aya::programs::tc::NlOptions +impl core::marker::Send for aya::programs::tc::NlOptions +impl core::marker::Sync for aya::programs::tc::NlOptions +impl core::marker::Unpin for aya::programs::tc::NlOptions +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::tc::NlOptions +impl core::panic::unwind_safe::UnwindSafe for aya::programs::tc::NlOptions +impl equivalent::Equivalent for aya::programs::tc::NlOptions where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::tc::NlOptions::equivalent(&self, key: &K) -> bool +impl core::convert::Into for aya::programs::tc::NlOptions where U: core::convert::From +pub fn aya::programs::tc::NlOptions::into(self) -> U +impl core::convert::TryFrom for aya::programs::tc::NlOptions where U: core::convert::Into +pub type aya::programs::tc::NlOptions::Error = core::convert::Infallible +pub fn aya::programs::tc::NlOptions::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::tc::NlOptions where U: core::convert::TryFrom +pub type aya::programs::tc::NlOptions::Error = >::Error +pub fn aya::programs::tc::NlOptions::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya::programs::tc::NlOptions where T: 'static + ?core::marker::Sized +pub fn aya::programs::tc::NlOptions::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::tc::NlOptions where T: ?core::marker::Sized +pub fn aya::programs::tc::NlOptions::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::tc::NlOptions where T: ?core::marker::Sized +pub fn aya::programs::tc::NlOptions::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::programs::tc::NlOptions +pub fn aya::programs::tc::NlOptions::from(t: T) -> T pub struct aya::programs::tc::SchedClassifier impl aya::programs::tc::SchedClassifier +pub const aya::programs::tc::SchedClassifier::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::tc::SchedClassifier::attach(&mut self, interface: &str, attach_type: aya::programs::tc::TcAttachType) -> core::result::Result pub fn aya::programs::tc::SchedClassifier::attach_to_link(&mut self, link: aya::programs::tc::SchedClassifierLink) -> core::result::Result -pub fn aya::programs::tc::SchedClassifier::attach_with_options(&mut self, interface: &str, attach_type: aya::programs::tc::TcAttachType, options: aya::programs::tc::TcOptions) -> core::result::Result -pub fn aya::programs::tc::SchedClassifier::detach(&mut self, link_id: aya::programs::tc::SchedClassifierLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub fn aya::programs::tc::SchedClassifier::attach_with_options(&mut self, interface: &str, attach_type: aya::programs::tc::TcAttachType, options: aya::programs::tc::TcAttachOptions) -> core::result::Result pub fn aya::programs::tc::SchedClassifier::from_pin>(path: P) -> core::result::Result pub fn aya::programs::tc::SchedClassifier::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +pub fn aya::programs::tc::SchedClassifier::query_tcx(interface: &str, attach_type: aya::programs::tc::TcAttachType) -> core::result::Result<(u64, alloc::vec::Vec), aya::programs::ProgramError> +impl aya::programs::tc::SchedClassifier +pub fn aya::programs::tc::SchedClassifier::detach(&mut self, link_id: aya::programs::tc::SchedClassifierLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::tc::SchedClassifier::take_link(&mut self, link_id: aya::programs::tc::SchedClassifierLinkId) -> core::result::Result impl aya::programs::tc::SchedClassifier pub fn aya::programs::tc::SchedClassifier::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::tc::SchedClassifier +pub fn aya::programs::tc::SchedClassifier::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::tc::SchedClassifier pub fn aya::programs::tc::SchedClassifier::info(&self) -> core::result::Result impl aya::programs::tc::SchedClassifier pub fn aya::programs::tc::SchedClassifier::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::tc::SchedClassifier::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::tc::SchedClassifier::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::tc::SchedClassifier pub fn aya::programs::tc::SchedClassifier::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::MultiProgram for aya::programs::tc::SchedClassifier +pub fn aya::programs::tc::SchedClassifier::fd(&self) -> core::result::Result, aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::tc::SchedClassifier pub fn aya::programs::tc::SchedClassifier::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result impl core::ops::drop::Drop for aya::programs::tc::SchedClassifier @@ -5545,34 +6822,54 @@ pub fn aya::programs::tc::SchedClassifier::try_from(value: U) -> core::result::R impl core::convert::TryInto for aya::programs::tc::SchedClassifier where U: core::convert::TryFrom pub type aya::programs::tc::SchedClassifier::Error = >::Error pub fn aya::programs::tc::SchedClassifier::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::tc::SchedClassifier where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::tc::SchedClassifier where T: 'static + ?core::marker::Sized pub fn aya::programs::tc::SchedClassifier::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::tc::SchedClassifier where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::tc::SchedClassifier where T: ?core::marker::Sized pub fn aya::programs::tc::SchedClassifier::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::tc::SchedClassifier where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::tc::SchedClassifier where T: ?core::marker::Sized pub fn aya::programs::tc::SchedClassifier::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::tc::SchedClassifier pub fn aya::programs::tc::SchedClassifier::from(t: T) -> T pub struct aya::programs::tc::SchedClassifierLink(_) impl aya::programs::tc::SchedClassifierLink -pub fn aya::programs::tc::SchedClassifierLink::attach_type(&self) -> aya::programs::tc::TcAttachType +pub fn aya::programs::tc::SchedClassifierLink::attach_type(&self) -> core::result::Result pub fn aya::programs::tc::SchedClassifierLink::attached(if_name: &str, attach_type: aya::programs::tc::TcAttachType, priority: u16, handle: u32) -> core::result::Result -pub fn aya::programs::tc::SchedClassifierLink::handle(&self) -> u32 -pub fn aya::programs::tc::SchedClassifierLink::priority(&self) -> u16 +pub fn aya::programs::tc::SchedClassifierLink::handle(&self) -> core::result::Result +pub fn aya::programs::tc::SchedClassifierLink::priority(&self) -> core::result::Result +impl aya::programs::MultiProgLink for aya::programs::tc::SchedClassifierLink +pub fn aya::programs::tc::SchedClassifierLink::fd(&self) -> core::result::Result, aya::programs::links::LinkError> impl aya::programs::links::Link for aya::programs::tc::SchedClassifierLink pub type aya::programs::tc::SchedClassifierLink::Id = aya::programs::tc::SchedClassifierLinkId pub fn aya::programs::tc::SchedClassifierLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::tc::SchedClassifierLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::tc::SchedClassifierLink +impl core::cmp::PartialEq for aya::programs::tc::SchedClassifierLink +pub fn aya::programs::tc::SchedClassifierLink::eq(&self, other: &Self) -> bool +impl core::convert::TryFrom for aya::programs::tc::SchedClassifierLink +pub type aya::programs::tc::SchedClassifierLink::Error = aya::programs::links::LinkError +pub fn aya::programs::tc::SchedClassifierLink::try_from(fd_link: aya::programs::links::FdLink) -> core::result::Result +impl core::convert::TryFrom for aya::programs::links::FdLink +pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError +pub fn aya::programs::links::FdLink::try_from(value: aya::programs::tc::SchedClassifierLink) -> core::result::Result impl core::fmt::Debug for aya::programs::tc::SchedClassifierLink pub fn aya::programs::tc::SchedClassifierLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::tc::SchedClassifierLink +pub fn aya::programs::tc::SchedClassifierLink::hash(&self, state: &mut H) impl core::ops::drop::Drop for aya::programs::tc::SchedClassifierLink pub fn aya::programs::tc::SchedClassifierLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::tc::SchedClassifierLinkId +pub fn aya::programs::tc::SchedClassifierLinkId::equivalent(&self, key: &aya::programs::tc::SchedClassifierLink) -> bool +impl<'a> core::convert::TryFrom<&'a aya::programs::tc::SchedClassifierLink> for &'a aya::programs::links::FdLink +pub type &'a aya::programs::links::FdLink::Error = aya::programs::links::LinkError +pub fn &'a aya::programs::links::FdLink::try_from(value: &'a aya::programs::tc::SchedClassifierLink) -> core::result::Result impl core::marker::Freeze for aya::programs::tc::SchedClassifierLink impl core::marker::Send for aya::programs::tc::SchedClassifierLink impl core::marker::Sync for aya::programs::tc::SchedClassifierLink impl core::marker::Unpin for aya::programs::tc::SchedClassifierLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::tc::SchedClassifierLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::tc::SchedClassifierLink +impl equivalent::Equivalent for aya::programs::tc::SchedClassifierLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::tc::SchedClassifierLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::tc::SchedClassifierLink where U: core::convert::From pub fn aya::programs::tc::SchedClassifierLink::into(self) -> U impl core::convert::TryFrom for aya::programs::tc::SchedClassifierLink where U: core::convert::Into @@ -5581,11 +6878,11 @@ pub fn aya::programs::tc::SchedClassifierLink::try_from(value: U) -> core::resul impl core::convert::TryInto for aya::programs::tc::SchedClassifierLink where U: core::convert::TryFrom pub type aya::programs::tc::SchedClassifierLink::Error = >::Error pub fn aya::programs::tc::SchedClassifierLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::tc::SchedClassifierLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::tc::SchedClassifierLink where T: 'static + ?core::marker::Sized pub fn aya::programs::tc::SchedClassifierLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::tc::SchedClassifierLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::tc::SchedClassifierLink where T: ?core::marker::Sized pub fn aya::programs::tc::SchedClassifierLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::tc::SchedClassifierLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::tc::SchedClassifierLink where T: ?core::marker::Sized pub fn aya::programs::tc::SchedClassifierLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::tc::SchedClassifierLink pub fn aya::programs::tc::SchedClassifierLink::from(t: T) -> T @@ -5598,15 +6895,15 @@ pub fn aya::programs::tc::SchedClassifierLinkId::fmt(&self, f: &mut core::fmt::F impl core::hash::Hash for aya::programs::tc::SchedClassifierLinkId pub fn aya::programs::tc::SchedClassifierLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::tc::SchedClassifierLinkId +impl equivalent::Equivalent for aya::programs::tc::SchedClassifierLinkId +pub fn aya::programs::tc::SchedClassifierLinkId::equivalent(&self, key: &aya::programs::tc::SchedClassifierLink) -> bool impl core::marker::Freeze for aya::programs::tc::SchedClassifierLinkId impl core::marker::Send for aya::programs::tc::SchedClassifierLinkId impl core::marker::Sync for aya::programs::tc::SchedClassifierLinkId impl core::marker::Unpin for aya::programs::tc::SchedClassifierLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::tc::SchedClassifierLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::tc::SchedClassifierLinkId -impl equivalent::Equivalent for aya::programs::tc::SchedClassifierLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::tc::SchedClassifierLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::tc::SchedClassifierLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::tc::SchedClassifierLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::tc::SchedClassifierLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::tc::SchedClassifierLinkId where U: core::convert::From pub fn aya::programs::tc::SchedClassifierLinkId::into(self) -> U @@ -5616,59 +6913,36 @@ pub fn aya::programs::tc::SchedClassifierLinkId::try_from(value: U) -> core::res impl core::convert::TryInto for aya::programs::tc::SchedClassifierLinkId where U: core::convert::TryFrom pub type aya::programs::tc::SchedClassifierLinkId::Error = >::Error pub fn aya::programs::tc::SchedClassifierLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::tc::SchedClassifierLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::tc::SchedClassifierLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::tc::SchedClassifierLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::tc::SchedClassifierLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::tc::SchedClassifierLinkId where T: ?core::marker::Sized pub fn aya::programs::tc::SchedClassifierLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::tc::SchedClassifierLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::tc::SchedClassifierLinkId where T: ?core::marker::Sized pub fn aya::programs::tc::SchedClassifierLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::tc::SchedClassifierLinkId pub fn aya::programs::tc::SchedClassifierLinkId::from(t: T) -> T -pub struct aya::programs::tc::TcOptions -pub aya::programs::tc::TcOptions::handle: u32 -pub aya::programs::tc::TcOptions::priority: u16 -impl core::default::Default for aya::programs::tc::TcOptions -pub fn aya::programs::tc::TcOptions::default() -> aya::programs::tc::TcOptions -impl core::marker::Freeze for aya::programs::tc::TcOptions -impl core::marker::Send for aya::programs::tc::TcOptions -impl core::marker::Sync for aya::programs::tc::TcOptions -impl core::marker::Unpin for aya::programs::tc::TcOptions -impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::tc::TcOptions -impl core::panic::unwind_safe::UnwindSafe for aya::programs::tc::TcOptions -impl core::convert::Into for aya::programs::tc::TcOptions where U: core::convert::From -pub fn aya::programs::tc::TcOptions::into(self) -> U -impl core::convert::TryFrom for aya::programs::tc::TcOptions where U: core::convert::Into -pub type aya::programs::tc::TcOptions::Error = core::convert::Infallible -pub fn aya::programs::tc::TcOptions::try_from(value: U) -> core::result::Result>::Error> -impl core::convert::TryInto for aya::programs::tc::TcOptions where U: core::convert::TryFrom -pub type aya::programs::tc::TcOptions::Error = >::Error -pub fn aya::programs::tc::TcOptions::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::tc::TcOptions where T: 'static + core::marker::Sized -pub fn aya::programs::tc::TcOptions::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::tc::TcOptions where T: core::marker::Sized -pub fn aya::programs::tc::TcOptions::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::tc::TcOptions where T: core::marker::Sized -pub fn aya::programs::tc::TcOptions::borrow_mut(&mut self) -> &mut T -impl core::convert::From for aya::programs::tc::TcOptions -pub fn aya::programs::tc::TcOptions::from(t: T) -> T -pub fn aya::programs::tc::qdisc_add_clsact(if_name: &str) -> core::result::Result<(), std::io::error::Error> -pub fn aya::programs::tc::qdisc_detach_program(if_name: &str, attach_type: aya::programs::tc::TcAttachType, name: &str) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::tc::qdisc_add_clsact(if_name: &str) -> core::result::Result<(), aya::programs::tc::TcError> +pub fn aya::programs::tc::qdisc_detach_program(if_name: &str, attach_type: aya::programs::tc::TcAttachType, name: &str) -> core::result::Result<(), aya::programs::tc::TcError> pub mod aya::programs::tp_btf pub struct aya::programs::tp_btf::BtfTracePoint impl aya::programs::tp_btf::BtfTracePoint +pub const aya::programs::tp_btf::BtfTracePoint::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::tp_btf::BtfTracePoint::attach(&mut self) -> core::result::Result -pub fn aya::programs::tp_btf::BtfTracePoint::detach(&mut self, link_id: aya::programs::tp_btf::BtfTracePointLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::tp_btf::BtfTracePoint::load(&mut self, tracepoint: &str, btf: &aya_obj::btf::btf::Btf) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::tp_btf::BtfTracePoint +pub fn aya::programs::tp_btf::BtfTracePoint::detach(&mut self, link_id: aya::programs::tp_btf::BtfTracePointLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::tp_btf::BtfTracePoint::take_link(&mut self, link_id: aya::programs::tp_btf::BtfTracePointLinkId) -> core::result::Result impl aya::programs::tp_btf::BtfTracePoint pub fn aya::programs::tp_btf::BtfTracePoint::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::tp_btf::BtfTracePoint pub fn aya::programs::tp_btf::BtfTracePoint::from_pin>(path: P) -> core::result::Result impl aya::programs::tp_btf::BtfTracePoint +pub unsafe fn aya::programs::tp_btf::BtfTracePoint::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::tp_btf::BtfTracePoint pub fn aya::programs::tp_btf::BtfTracePoint::info(&self) -> core::result::Result impl aya::programs::tp_btf::BtfTracePoint pub fn aya::programs::tp_btf::BtfTracePoint::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::tp_btf::BtfTracePoint::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::tp_btf::BtfTracePoint::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::tp_btf::BtfTracePoint pub fn aya::programs::tp_btf::BtfTracePoint::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::tp_btf::BtfTracePoint @@ -5695,11 +6969,11 @@ pub fn aya::programs::tp_btf::BtfTracePoint::try_from(value: U) -> core::result: impl core::convert::TryInto for aya::programs::tp_btf::BtfTracePoint where U: core::convert::TryFrom pub type aya::programs::tp_btf::BtfTracePoint::Error = >::Error pub fn aya::programs::tp_btf::BtfTracePoint::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::tp_btf::BtfTracePoint where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::tp_btf::BtfTracePoint where T: 'static + ?core::marker::Sized pub fn aya::programs::tp_btf::BtfTracePoint::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::tp_btf::BtfTracePoint where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::tp_btf::BtfTracePoint where T: ?core::marker::Sized pub fn aya::programs::tp_btf::BtfTracePoint::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::tp_btf::BtfTracePoint where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::tp_btf::BtfTracePoint where T: ?core::marker::Sized pub fn aya::programs::tp_btf::BtfTracePoint::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::tp_btf::BtfTracePoint pub fn aya::programs::tp_btf::BtfTracePoint::from(t: T) -> T @@ -5708,20 +6982,29 @@ impl aya::programs::links::Link for aya::programs::tp_btf::BtfTracePointLink pub type aya::programs::tp_btf::BtfTracePointLink::Id = aya::programs::tp_btf::BtfTracePointLinkId pub fn aya::programs::tp_btf::BtfTracePointLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::tp_btf::BtfTracePointLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::tp_btf::BtfTracePointLink +impl core::cmp::PartialEq for aya::programs::tp_btf::BtfTracePointLink +pub fn aya::programs::tp_btf::BtfTracePointLink::eq(&self, other: &Self) -> bool impl core::convert::From for aya::programs::tp_btf::BtfTracePointLink pub fn aya::programs::tp_btf::BtfTracePointLink::from(b: aya::programs::links::FdLink) -> aya::programs::tp_btf::BtfTracePointLink impl core::convert::From for aya::programs::links::FdLink pub fn aya::programs::links::FdLink::from(w: aya::programs::tp_btf::BtfTracePointLink) -> aya::programs::links::FdLink impl core::fmt::Debug for aya::programs::tp_btf::BtfTracePointLink pub fn aya::programs::tp_btf::BtfTracePointLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::tp_btf::BtfTracePointLink +pub fn aya::programs::tp_btf::BtfTracePointLink::hash(&self, state: &mut H) impl core::ops::drop::Drop for aya::programs::tp_btf::BtfTracePointLink pub fn aya::programs::tp_btf::BtfTracePointLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::tp_btf::BtfTracePointLinkId +pub fn aya::programs::tp_btf::BtfTracePointLinkId::equivalent(&self, key: &aya::programs::tp_btf::BtfTracePointLink) -> bool impl core::marker::Freeze for aya::programs::tp_btf::BtfTracePointLink impl core::marker::Send for aya::programs::tp_btf::BtfTracePointLink impl core::marker::Sync for aya::programs::tp_btf::BtfTracePointLink impl core::marker::Unpin for aya::programs::tp_btf::BtfTracePointLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::tp_btf::BtfTracePointLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::tp_btf::BtfTracePointLink +impl equivalent::Equivalent for aya::programs::tp_btf::BtfTracePointLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::tp_btf::BtfTracePointLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::tp_btf::BtfTracePointLink where U: core::convert::From pub fn aya::programs::tp_btf::BtfTracePointLink::into(self) -> U impl core::convert::TryFrom for aya::programs::tp_btf::BtfTracePointLink where U: core::convert::Into @@ -5730,11 +7013,11 @@ pub fn aya::programs::tp_btf::BtfTracePointLink::try_from(value: U) -> core::res impl core::convert::TryInto for aya::programs::tp_btf::BtfTracePointLink where U: core::convert::TryFrom pub type aya::programs::tp_btf::BtfTracePointLink::Error = >::Error pub fn aya::programs::tp_btf::BtfTracePointLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::tp_btf::BtfTracePointLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::tp_btf::BtfTracePointLink where T: 'static + ?core::marker::Sized pub fn aya::programs::tp_btf::BtfTracePointLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::tp_btf::BtfTracePointLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::tp_btf::BtfTracePointLink where T: ?core::marker::Sized pub fn aya::programs::tp_btf::BtfTracePointLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::tp_btf::BtfTracePointLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::tp_btf::BtfTracePointLink where T: ?core::marker::Sized pub fn aya::programs::tp_btf::BtfTracePointLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::tp_btf::BtfTracePointLink pub fn aya::programs::tp_btf::BtfTracePointLink::from(t: T) -> T @@ -5747,15 +7030,15 @@ pub fn aya::programs::tp_btf::BtfTracePointLinkId::fmt(&self, f: &mut core::fmt: impl core::hash::Hash for aya::programs::tp_btf::BtfTracePointLinkId pub fn aya::programs::tp_btf::BtfTracePointLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::tp_btf::BtfTracePointLinkId +impl equivalent::Equivalent for aya::programs::tp_btf::BtfTracePointLinkId +pub fn aya::programs::tp_btf::BtfTracePointLinkId::equivalent(&self, key: &aya::programs::tp_btf::BtfTracePointLink) -> bool impl core::marker::Freeze for aya::programs::tp_btf::BtfTracePointLinkId impl core::marker::Send for aya::programs::tp_btf::BtfTracePointLinkId impl core::marker::Sync for aya::programs::tp_btf::BtfTracePointLinkId impl core::marker::Unpin for aya::programs::tp_btf::BtfTracePointLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::tp_btf::BtfTracePointLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::tp_btf::BtfTracePointLinkId -impl equivalent::Equivalent for aya::programs::tp_btf::BtfTracePointLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::tp_btf::BtfTracePointLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::tp_btf::BtfTracePointLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::tp_btf::BtfTracePointLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::tp_btf::BtfTracePointLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::tp_btf::BtfTracePointLinkId where U: core::convert::From pub fn aya::programs::tp_btf::BtfTracePointLinkId::into(self) -> U @@ -5765,18 +7048,18 @@ pub fn aya::programs::tp_btf::BtfTracePointLinkId::try_from(value: U) -> core::r impl core::convert::TryInto for aya::programs::tp_btf::BtfTracePointLinkId where U: core::convert::TryFrom pub type aya::programs::tp_btf::BtfTracePointLinkId::Error = >::Error pub fn aya::programs::tp_btf::BtfTracePointLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::tp_btf::BtfTracePointLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::tp_btf::BtfTracePointLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::tp_btf::BtfTracePointLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::tp_btf::BtfTracePointLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::tp_btf::BtfTracePointLinkId where T: ?core::marker::Sized pub fn aya::programs::tp_btf::BtfTracePointLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::tp_btf::BtfTracePointLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::tp_btf::BtfTracePointLinkId where T: ?core::marker::Sized pub fn aya::programs::tp_btf::BtfTracePointLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::tp_btf::BtfTracePointLinkId pub fn aya::programs::tp_btf::BtfTracePointLinkId::from(t: T) -> T pub mod aya::programs::trace_point pub enum aya::programs::trace_point::TracePointError pub aya::programs::trace_point::TracePointError::FileError -pub aya::programs::trace_point::TracePointError::FileError::filename: alloc::string::String +pub aya::programs::trace_point::TracePointError::FileError::filename: std::path::PathBuf pub aya::programs::trace_point::TracePointError::FileError::io_error: std::io::error::Error impl core::convert::From for aya::programs::ProgramError pub fn aya::programs::ProgramError::from(source: aya::programs::trace_point::TracePointError) -> Self @@ -5800,31 +7083,35 @@ pub fn aya::programs::trace_point::TracePointError::try_from(value: U) -> core:: impl core::convert::TryInto for aya::programs::trace_point::TracePointError where U: core::convert::TryFrom pub type aya::programs::trace_point::TracePointError::Error = >::Error pub fn aya::programs::trace_point::TracePointError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya::programs::trace_point::TracePointError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya::programs::trace_point::TracePointError where T: core::fmt::Display + ?core::marker::Sized pub fn aya::programs::trace_point::TracePointError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya::programs::trace_point::TracePointError where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::trace_point::TracePointError where T: 'static + ?core::marker::Sized pub fn aya::programs::trace_point::TracePointError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::trace_point::TracePointError where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::trace_point::TracePointError where T: ?core::marker::Sized pub fn aya::programs::trace_point::TracePointError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::trace_point::TracePointError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::trace_point::TracePointError where T: ?core::marker::Sized pub fn aya::programs::trace_point::TracePointError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::trace_point::TracePointError pub fn aya::programs::trace_point::TracePointError::from(t: T) -> T pub struct aya::programs::trace_point::TracePoint impl aya::programs::trace_point::TracePoint +pub const aya::programs::trace_point::TracePoint::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::trace_point::TracePoint::attach(&mut self, category: &str, name: &str) -> core::result::Result -pub fn aya::programs::trace_point::TracePoint::detach(&mut self, link_id: aya::programs::trace_point::TracePointLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::trace_point::TracePoint::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::trace_point::TracePoint +pub fn aya::programs::trace_point::TracePoint::detach(&mut self, link_id: aya::programs::trace_point::TracePointLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::trace_point::TracePoint::take_link(&mut self, link_id: aya::programs::trace_point::TracePointLinkId) -> core::result::Result impl aya::programs::trace_point::TracePoint pub fn aya::programs::trace_point::TracePoint::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::trace_point::TracePoint pub fn aya::programs::trace_point::TracePoint::from_pin>(path: P) -> core::result::Result impl aya::programs::trace_point::TracePoint +pub fn aya::programs::trace_point::TracePoint::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::trace_point::TracePoint pub fn aya::programs::trace_point::TracePoint::info(&self) -> core::result::Result impl aya::programs::trace_point::TracePoint pub fn aya::programs::trace_point::TracePoint::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::trace_point::TracePoint::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::trace_point::TracePoint::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::trace_point::TracePoint pub fn aya::programs::trace_point::TracePoint::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::trace_point::TracePoint @@ -5851,11 +7138,11 @@ pub fn aya::programs::trace_point::TracePoint::try_from(value: U) -> core::resul impl core::convert::TryInto for aya::programs::trace_point::TracePoint where U: core::convert::TryFrom pub type aya::programs::trace_point::TracePoint::Error = >::Error pub fn aya::programs::trace_point::TracePoint::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::trace_point::TracePoint where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::trace_point::TracePoint where T: 'static + ?core::marker::Sized pub fn aya::programs::trace_point::TracePoint::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::trace_point::TracePoint where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::trace_point::TracePoint where T: ?core::marker::Sized pub fn aya::programs::trace_point::TracePoint::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::trace_point::TracePoint where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::trace_point::TracePoint where T: ?core::marker::Sized pub fn aya::programs::trace_point::TracePoint::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::trace_point::TracePoint pub fn aya::programs::trace_point::TracePoint::from(t: T) -> T @@ -5864,6 +7151,9 @@ impl aya::programs::links::Link for aya::programs::trace_point::TracePointLink pub type aya::programs::trace_point::TracePointLink::Id = aya::programs::trace_point::TracePointLinkId pub fn aya::programs::trace_point::TracePointLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::trace_point::TracePointLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::trace_point::TracePointLink +impl core::cmp::PartialEq for aya::programs::trace_point::TracePointLink +pub fn aya::programs::trace_point::TracePointLink::eq(&self, other: &Self) -> bool impl core::convert::TryFrom for aya::programs::trace_point::TracePointLink pub type aya::programs::trace_point::TracePointLink::Error = aya::programs::links::LinkError pub fn aya::programs::trace_point::TracePointLink::try_from(fd_link: aya::programs::links::FdLink) -> core::result::Result @@ -5872,14 +7162,20 @@ pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError pub fn aya::programs::links::FdLink::try_from(value: aya::programs::trace_point::TracePointLink) -> core::result::Result impl core::fmt::Debug for aya::programs::trace_point::TracePointLink pub fn aya::programs::trace_point::TracePointLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::trace_point::TracePointLink +pub fn aya::programs::trace_point::TracePointLink::hash(&self, state: &mut H) impl core::ops::drop::Drop for aya::programs::trace_point::TracePointLink pub fn aya::programs::trace_point::TracePointLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::trace_point::TracePointLinkId +pub fn aya::programs::trace_point::TracePointLinkId::equivalent(&self, key: &aya::programs::trace_point::TracePointLink) -> bool impl core::marker::Freeze for aya::programs::trace_point::TracePointLink impl core::marker::Send for aya::programs::trace_point::TracePointLink impl core::marker::Sync for aya::programs::trace_point::TracePointLink impl core::marker::Unpin for aya::programs::trace_point::TracePointLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::trace_point::TracePointLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::trace_point::TracePointLink +impl equivalent::Equivalent for aya::programs::trace_point::TracePointLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::trace_point::TracePointLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::trace_point::TracePointLink where U: core::convert::From pub fn aya::programs::trace_point::TracePointLink::into(self) -> U impl core::convert::TryFrom for aya::programs::trace_point::TracePointLink where U: core::convert::Into @@ -5888,11 +7184,11 @@ pub fn aya::programs::trace_point::TracePointLink::try_from(value: U) -> core::r impl core::convert::TryInto for aya::programs::trace_point::TracePointLink where U: core::convert::TryFrom pub type aya::programs::trace_point::TracePointLink::Error = >::Error pub fn aya::programs::trace_point::TracePointLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::trace_point::TracePointLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::trace_point::TracePointLink where T: 'static + ?core::marker::Sized pub fn aya::programs::trace_point::TracePointLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::trace_point::TracePointLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::trace_point::TracePointLink where T: ?core::marker::Sized pub fn aya::programs::trace_point::TracePointLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::trace_point::TracePointLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::trace_point::TracePointLink where T: ?core::marker::Sized pub fn aya::programs::trace_point::TracePointLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::trace_point::TracePointLink pub fn aya::programs::trace_point::TracePointLink::from(t: T) -> T @@ -5905,15 +7201,15 @@ pub fn aya::programs::trace_point::TracePointLinkId::fmt(&self, f: &mut core::fm impl core::hash::Hash for aya::programs::trace_point::TracePointLinkId pub fn aya::programs::trace_point::TracePointLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::trace_point::TracePointLinkId +impl equivalent::Equivalent for aya::programs::trace_point::TracePointLinkId +pub fn aya::programs::trace_point::TracePointLinkId::equivalent(&self, key: &aya::programs::trace_point::TracePointLink) -> bool impl core::marker::Freeze for aya::programs::trace_point::TracePointLinkId impl core::marker::Send for aya::programs::trace_point::TracePointLinkId impl core::marker::Sync for aya::programs::trace_point::TracePointLinkId impl core::marker::Unpin for aya::programs::trace_point::TracePointLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::trace_point::TracePointLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::trace_point::TracePointLinkId -impl equivalent::Equivalent for aya::programs::trace_point::TracePointLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::trace_point::TracePointLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::trace_point::TracePointLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::trace_point::TracePointLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::trace_point::TracePointLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::trace_point::TracePointLinkId where U: core::convert::From pub fn aya::programs::trace_point::TracePointLinkId::into(self) -> U @@ -5923,23 +7219,92 @@ pub fn aya::programs::trace_point::TracePointLinkId::try_from(value: U) -> core: impl core::convert::TryInto for aya::programs::trace_point::TracePointLinkId where U: core::convert::TryFrom pub type aya::programs::trace_point::TracePointLinkId::Error = >::Error pub fn aya::programs::trace_point::TracePointLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::trace_point::TracePointLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::trace_point::TracePointLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::trace_point::TracePointLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::trace_point::TracePointLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::trace_point::TracePointLinkId where T: ?core::marker::Sized pub fn aya::programs::trace_point::TracePointLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::trace_point::TracePointLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::trace_point::TracePointLinkId where T: ?core::marker::Sized pub fn aya::programs::trace_point::TracePointLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::trace_point::TracePointLinkId pub fn aya::programs::trace_point::TracePointLinkId::from(t: T) -> T pub mod aya::programs::uprobe +pub enum aya::programs::uprobe::ProcMapError +pub aya::programs::uprobe::ProcMapError::ParseLine +pub aya::programs::uprobe::ProcMapError::ParseLine::line: alloc::vec::Vec +pub aya::programs::uprobe::ProcMapError::ReadFile(std::io::error::Error) +impl core::convert::From for aya::programs::uprobe::ProcMapError +pub fn aya::programs::uprobe::ProcMapError::from(source: std::io::error::Error) -> Self +impl core::error::Error for aya::programs::uprobe::ProcMapError +pub fn aya::programs::uprobe::ProcMapError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)> +impl core::fmt::Debug for aya::programs::uprobe::ProcMapError +pub fn aya::programs::uprobe::ProcMapError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::fmt::Display for aya::programs::uprobe::ProcMapError +pub fn aya::programs::uprobe::ProcMapError::fmt(&self, __formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Freeze for aya::programs::uprobe::ProcMapError +impl core::marker::Send for aya::programs::uprobe::ProcMapError +impl core::marker::Sync for aya::programs::uprobe::ProcMapError +impl core::marker::Unpin for aya::programs::uprobe::ProcMapError +impl !core::panic::unwind_safe::RefUnwindSafe for aya::programs::uprobe::ProcMapError +impl !core::panic::unwind_safe::UnwindSafe for aya::programs::uprobe::ProcMapError +impl core::convert::Into for aya::programs::uprobe::ProcMapError where U: core::convert::From +pub fn aya::programs::uprobe::ProcMapError::into(self) -> U +impl core::convert::TryFrom for aya::programs::uprobe::ProcMapError where U: core::convert::Into +pub type aya::programs::uprobe::ProcMapError::Error = core::convert::Infallible +pub fn aya::programs::uprobe::ProcMapError::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::uprobe::ProcMapError where U: core::convert::TryFrom +pub type aya::programs::uprobe::ProcMapError::Error = >::Error +pub fn aya::programs::uprobe::ProcMapError::try_into(self) -> core::result::Result>::Error> +impl alloc::string::ToString for aya::programs::uprobe::ProcMapError where T: core::fmt::Display + ?core::marker::Sized +pub fn aya::programs::uprobe::ProcMapError::to_string(&self) -> alloc::string::String +impl core::any::Any for aya::programs::uprobe::ProcMapError where T: 'static + ?core::marker::Sized +pub fn aya::programs::uprobe::ProcMapError::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::uprobe::ProcMapError where T: ?core::marker::Sized +pub fn aya::programs::uprobe::ProcMapError::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::uprobe::ProcMapError where T: ?core::marker::Sized +pub fn aya::programs::uprobe::ProcMapError::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::programs::uprobe::ProcMapError +pub fn aya::programs::uprobe::ProcMapError::from(t: T) -> T +pub enum aya::programs::uprobe::UProbeAttachLocation<'a> +pub aya::programs::uprobe::UProbeAttachLocation::AbsoluteOffset(u64) +pub aya::programs::uprobe::UProbeAttachLocation::Symbol(&'a str) +pub aya::programs::uprobe::UProbeAttachLocation::SymbolOffset(&'a str, u64) +impl core::convert::From for aya::programs::uprobe::UProbeAttachLocation<'static> +pub fn aya::programs::uprobe::UProbeAttachLocation<'static>::from(offset: u64) -> Self +impl<'a> core::convert::From<&'a str> for aya::programs::uprobe::UProbeAttachLocation<'a> +pub fn aya::programs::uprobe::UProbeAttachLocation<'a>::from(s: &'a str) -> Self +impl<'a> core::marker::Freeze for aya::programs::uprobe::UProbeAttachLocation<'a> +impl<'a> core::marker::Send for aya::programs::uprobe::UProbeAttachLocation<'a> +impl<'a> core::marker::Sync for aya::programs::uprobe::UProbeAttachLocation<'a> +impl<'a> core::marker::Unpin for aya::programs::uprobe::UProbeAttachLocation<'a> +impl<'a> core::panic::unwind_safe::RefUnwindSafe for aya::programs::uprobe::UProbeAttachLocation<'a> +impl<'a> core::panic::unwind_safe::UnwindSafe for aya::programs::uprobe::UProbeAttachLocation<'a> +impl core::convert::Into for aya::programs::uprobe::UProbeAttachLocation<'a> where U: core::convert::From +pub fn aya::programs::uprobe::UProbeAttachLocation<'a>::into(self) -> U +impl core::convert::TryFrom for aya::programs::uprobe::UProbeAttachLocation<'a> where U: core::convert::Into +pub type aya::programs::uprobe::UProbeAttachLocation<'a>::Error = core::convert::Infallible +pub fn aya::programs::uprobe::UProbeAttachLocation<'a>::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::uprobe::UProbeAttachLocation<'a> where U: core::convert::TryFrom +pub type aya::programs::uprobe::UProbeAttachLocation<'a>::Error = >::Error +pub fn aya::programs::uprobe::UProbeAttachLocation<'a>::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya::programs::uprobe::UProbeAttachLocation<'a> where T: 'static + ?core::marker::Sized +pub fn aya::programs::uprobe::UProbeAttachLocation<'a>::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::uprobe::UProbeAttachLocation<'a> where T: ?core::marker::Sized +pub fn aya::programs::uprobe::UProbeAttachLocation<'a>::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::uprobe::UProbeAttachLocation<'a> where T: ?core::marker::Sized +pub fn aya::programs::uprobe::UProbeAttachLocation<'a>::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::programs::uprobe::UProbeAttachLocation<'a> +pub fn aya::programs::uprobe::UProbeAttachLocation<'a>::from(t: T) -> T pub enum aya::programs::uprobe::UProbeError pub aya::programs::uprobe::UProbeError::FileError pub aya::programs::uprobe::UProbeError::FileError::filename: std::path::PathBuf pub aya::programs::uprobe::UProbeError::FileError::io_error: std::io::error::Error pub aya::programs::uprobe::UProbeError::InvalidLdSoCache -pub aya::programs::uprobe::UProbeError::InvalidLdSoCache::io_error: alloc::sync::Arc +pub aya::programs::uprobe::UProbeError::InvalidLdSoCache::io_error: &'static std::io::error::Error pub aya::programs::uprobe::UProbeError::InvalidTarget pub aya::programs::uprobe::UProbeError::InvalidTarget::path: std::path::PathBuf +pub aya::programs::uprobe::UProbeError::ProcMap +pub aya::programs::uprobe::UProbeError::ProcMap::pid: i32 +pub aya::programs::uprobe::UProbeError::ProcMap::source: aya::programs::uprobe::ProcMapError pub aya::programs::uprobe::UProbeError::SymbolError pub aya::programs::uprobe::UProbeError::SymbolError::error: alloc::boxed::Box<(dyn core::error::Error + core::marker::Send + core::marker::Sync)> pub aya::programs::uprobe::UProbeError::SymbolError::symbol: alloc::string::String @@ -5965,31 +7330,35 @@ pub fn aya::programs::uprobe::UProbeError::try_from(value: U) -> core::result::R impl core::convert::TryInto for aya::programs::uprobe::UProbeError where U: core::convert::TryFrom pub type aya::programs::uprobe::UProbeError::Error = >::Error pub fn aya::programs::uprobe::UProbeError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya::programs::uprobe::UProbeError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya::programs::uprobe::UProbeError where T: core::fmt::Display + ?core::marker::Sized pub fn aya::programs::uprobe::UProbeError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya::programs::uprobe::UProbeError where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::uprobe::UProbeError where T: 'static + ?core::marker::Sized pub fn aya::programs::uprobe::UProbeError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::uprobe::UProbeError where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::uprobe::UProbeError where T: ?core::marker::Sized pub fn aya::programs::uprobe::UProbeError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::uprobe::UProbeError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::uprobe::UProbeError where T: ?core::marker::Sized pub fn aya::programs::uprobe::UProbeError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::uprobe::UProbeError pub fn aya::programs::uprobe::UProbeError::from(t: T) -> T pub struct aya::programs::uprobe::UProbe impl aya::programs::uprobe::UProbe -pub fn aya::programs::uprobe::UProbe::attach>(&mut self, fn_name: core::option::Option<&str>, offset: u64, target: T, pid: core::option::Option) -> core::result::Result -pub fn aya::programs::uprobe::UProbe::detach(&mut self, link_id: aya::programs::uprobe::UProbeLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub const aya::programs::uprobe::UProbe::PROGRAM_TYPE: aya::programs::ProgramType +pub fn aya::programs::uprobe::UProbe::attach<'loc, T: core::convert::AsRef, Loc: core::convert::Into>>(&mut self, location: Loc, target: T, pid: core::option::Option, cookie: core::option::Option) -> core::result::Result pub fn aya::programs::uprobe::UProbe::from_pin>(path: P, kind: aya::programs::ProbeKind) -> core::result::Result pub fn aya::programs::uprobe::UProbe::kind(&self) -> aya::programs::ProbeKind pub fn aya::programs::uprobe::UProbe::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::uprobe::UProbe +pub fn aya::programs::uprobe::UProbe::detach(&mut self, link_id: aya::programs::uprobe::UProbeLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::uprobe::UProbe::take_link(&mut self, link_id: aya::programs::uprobe::UProbeLinkId) -> core::result::Result impl aya::programs::uprobe::UProbe pub fn aya::programs::uprobe::UProbe::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::uprobe::UProbe +pub unsafe fn aya::programs::uprobe::UProbe::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>, kind: aya::programs::ProbeKind) -> core::result::Result +impl aya::programs::uprobe::UProbe pub fn aya::programs::uprobe::UProbe::info(&self) -> core::result::Result impl aya::programs::uprobe::UProbe pub fn aya::programs::uprobe::UProbe::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::uprobe::UProbe::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::uprobe::UProbe::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::uprobe::UProbe pub fn aya::programs::uprobe::UProbe::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::uprobe::UProbe @@ -6016,11 +7385,11 @@ pub fn aya::programs::uprobe::UProbe::try_from(value: U) -> core::result::Result impl core::convert::TryInto for aya::programs::uprobe::UProbe where U: core::convert::TryFrom pub type aya::programs::uprobe::UProbe::Error = >::Error pub fn aya::programs::uprobe::UProbe::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::uprobe::UProbe where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::uprobe::UProbe where T: 'static + ?core::marker::Sized pub fn aya::programs::uprobe::UProbe::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::uprobe::UProbe where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::uprobe::UProbe where T: ?core::marker::Sized pub fn aya::programs::uprobe::UProbe::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::uprobe::UProbe where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::uprobe::UProbe where T: ?core::marker::Sized pub fn aya::programs::uprobe::UProbe::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::uprobe::UProbe pub fn aya::programs::uprobe::UProbe::from(t: T) -> T @@ -6029,6 +7398,9 @@ impl aya::programs::links::Link for aya::programs::uprobe::UProbeLink pub type aya::programs::uprobe::UProbeLink::Id = aya::programs::uprobe::UProbeLinkId pub fn aya::programs::uprobe::UProbeLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::uprobe::UProbeLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::uprobe::UProbeLink +impl core::cmp::PartialEq for aya::programs::uprobe::UProbeLink +pub fn aya::programs::uprobe::UProbeLink::eq(&self, other: &Self) -> bool impl core::convert::TryFrom for aya::programs::uprobe::UProbeLink pub type aya::programs::uprobe::UProbeLink::Error = aya::programs::links::LinkError pub fn aya::programs::uprobe::UProbeLink::try_from(fd_link: aya::programs::links::FdLink) -> core::result::Result @@ -6037,14 +7409,20 @@ pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError pub fn aya::programs::links::FdLink::try_from(value: aya::programs::uprobe::UProbeLink) -> core::result::Result impl core::fmt::Debug for aya::programs::uprobe::UProbeLink pub fn aya::programs::uprobe::UProbeLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::uprobe::UProbeLink +pub fn aya::programs::uprobe::UProbeLink::hash(&self, state: &mut H) impl core::ops::drop::Drop for aya::programs::uprobe::UProbeLink pub fn aya::programs::uprobe::UProbeLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::uprobe::UProbeLinkId +pub fn aya::programs::uprobe::UProbeLinkId::equivalent(&self, key: &aya::programs::uprobe::UProbeLink) -> bool impl core::marker::Freeze for aya::programs::uprobe::UProbeLink impl core::marker::Send for aya::programs::uprobe::UProbeLink impl core::marker::Sync for aya::programs::uprobe::UProbeLink impl core::marker::Unpin for aya::programs::uprobe::UProbeLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::uprobe::UProbeLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::uprobe::UProbeLink +impl equivalent::Equivalent for aya::programs::uprobe::UProbeLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::uprobe::UProbeLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::uprobe::UProbeLink where U: core::convert::From pub fn aya::programs::uprobe::UProbeLink::into(self) -> U impl core::convert::TryFrom for aya::programs::uprobe::UProbeLink where U: core::convert::Into @@ -6053,11 +7431,11 @@ pub fn aya::programs::uprobe::UProbeLink::try_from(value: U) -> core::result::Re impl core::convert::TryInto for aya::programs::uprobe::UProbeLink where U: core::convert::TryFrom pub type aya::programs::uprobe::UProbeLink::Error = >::Error pub fn aya::programs::uprobe::UProbeLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::uprobe::UProbeLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::uprobe::UProbeLink where T: 'static + ?core::marker::Sized pub fn aya::programs::uprobe::UProbeLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::uprobe::UProbeLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::uprobe::UProbeLink where T: ?core::marker::Sized pub fn aya::programs::uprobe::UProbeLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::uprobe::UProbeLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::uprobe::UProbeLink where T: ?core::marker::Sized pub fn aya::programs::uprobe::UProbeLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::uprobe::UProbeLink pub fn aya::programs::uprobe::UProbeLink::from(t: T) -> T @@ -6070,15 +7448,15 @@ pub fn aya::programs::uprobe::UProbeLinkId::fmt(&self, f: &mut core::fmt::Format impl core::hash::Hash for aya::programs::uprobe::UProbeLinkId pub fn aya::programs::uprobe::UProbeLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::uprobe::UProbeLinkId +impl equivalent::Equivalent for aya::programs::uprobe::UProbeLinkId +pub fn aya::programs::uprobe::UProbeLinkId::equivalent(&self, key: &aya::programs::uprobe::UProbeLink) -> bool impl core::marker::Freeze for aya::programs::uprobe::UProbeLinkId impl core::marker::Send for aya::programs::uprobe::UProbeLinkId impl core::marker::Sync for aya::programs::uprobe::UProbeLinkId impl core::marker::Unpin for aya::programs::uprobe::UProbeLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::uprobe::UProbeLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::uprobe::UProbeLinkId -impl equivalent::Equivalent for aya::programs::uprobe::UProbeLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::uprobe::UProbeLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::uprobe::UProbeLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::uprobe::UProbeLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::uprobe::UProbeLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::uprobe::UProbeLinkId where U: core::convert::From pub fn aya::programs::uprobe::UProbeLinkId::into(self) -> U @@ -6088,18 +7466,17 @@ pub fn aya::programs::uprobe::UProbeLinkId::try_from(value: U) -> core::result:: impl core::convert::TryInto for aya::programs::uprobe::UProbeLinkId where U: core::convert::TryFrom pub type aya::programs::uprobe::UProbeLinkId::Error = >::Error pub fn aya::programs::uprobe::UProbeLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::uprobe::UProbeLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::uprobe::UProbeLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::uprobe::UProbeLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::uprobe::UProbeLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::uprobe::UProbeLinkId where T: ?core::marker::Sized pub fn aya::programs::uprobe::UProbeLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::uprobe::UProbeLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::uprobe::UProbeLinkId where T: ?core::marker::Sized pub fn aya::programs::uprobe::UProbeLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::uprobe::UProbeLinkId pub fn aya::programs::uprobe::UProbeLinkId::from(t: T) -> T pub mod aya::programs::xdp pub enum aya::programs::xdp::XdpError -pub aya::programs::xdp::XdpError::NetlinkError -pub aya::programs::xdp::XdpError::NetlinkError::io_error: std::io::error::Error +pub aya::programs::xdp::XdpError::NetlinkError(aya::sys::netlink::NetlinkError) impl core::convert::From for aya::programs::ProgramError pub fn aya::programs::ProgramError::from(source: aya::programs::xdp::XdpError) -> Self impl core::error::Error for aya::programs::xdp::XdpError @@ -6122,32 +7499,36 @@ pub fn aya::programs::xdp::XdpError::try_from(value: U) -> core::result::Result< impl core::convert::TryInto for aya::programs::xdp::XdpError where U: core::convert::TryFrom pub type aya::programs::xdp::XdpError::Error = >::Error pub fn aya::programs::xdp::XdpError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya::programs::xdp::XdpError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya::programs::xdp::XdpError where T: core::fmt::Display + ?core::marker::Sized pub fn aya::programs::xdp::XdpError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya::programs::xdp::XdpError where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::xdp::XdpError where T: 'static + ?core::marker::Sized pub fn aya::programs::xdp::XdpError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::xdp::XdpError where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::xdp::XdpError where T: ?core::marker::Sized pub fn aya::programs::xdp::XdpError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::xdp::XdpError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::xdp::XdpError where T: ?core::marker::Sized pub fn aya::programs::xdp::XdpError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::xdp::XdpError pub fn aya::programs::xdp::XdpError::from(t: T) -> T pub struct aya::programs::xdp::Xdp impl aya::programs::xdp::Xdp +pub const aya::programs::xdp::Xdp::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::xdp::Xdp::attach(&mut self, interface: &str, flags: aya::programs::xdp::XdpFlags) -> core::result::Result pub fn aya::programs::xdp::Xdp::attach_to_if_index(&mut self, if_index: u32, flags: aya::programs::xdp::XdpFlags) -> core::result::Result pub fn aya::programs::xdp::Xdp::attach_to_link(&mut self, link: aya::programs::xdp::XdpLink) -> core::result::Result -pub fn aya::programs::xdp::Xdp::detach(&mut self, link_id: aya::programs::xdp::XdpLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::xdp::Xdp::from_pin>(path: P, attach_type: aya_obj::programs::xdp::XdpAttachType) -> core::result::Result pub fn aya::programs::xdp::Xdp::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::xdp::Xdp +pub fn aya::programs::xdp::Xdp::detach(&mut self, link_id: aya::programs::xdp::XdpLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::xdp::Xdp::take_link(&mut self, link_id: aya::programs::xdp::XdpLinkId) -> core::result::Result impl aya::programs::xdp::Xdp pub fn aya::programs::xdp::Xdp::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::xdp::Xdp +pub fn aya::programs::xdp::Xdp::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>, attach_type: aya_obj::programs::xdp::XdpAttachType) -> core::result::Result +impl aya::programs::xdp::Xdp pub fn aya::programs::xdp::Xdp::info(&self) -> core::result::Result impl aya::programs::xdp::Xdp pub fn aya::programs::xdp::Xdp::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::xdp::Xdp::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::xdp::Xdp::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::xdp::Xdp pub fn aya::programs::xdp::Xdp::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::xdp::Xdp @@ -6174,11 +7555,11 @@ pub fn aya::programs::xdp::Xdp::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::programs::xdp::Xdp where U: core::convert::TryFrom pub type aya::programs::xdp::Xdp::Error = >::Error pub fn aya::programs::xdp::Xdp::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::xdp::Xdp where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::xdp::Xdp where T: 'static + ?core::marker::Sized pub fn aya::programs::xdp::Xdp::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::xdp::Xdp where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::xdp::Xdp where T: ?core::marker::Sized pub fn aya::programs::xdp::Xdp::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::xdp::Xdp where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::xdp::Xdp where T: ?core::marker::Sized pub fn aya::programs::xdp::Xdp::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::xdp::Xdp pub fn aya::programs::xdp::Xdp::from(t: T) -> T @@ -6285,12 +7666,14 @@ impl alloc::borrow::ToOwned for aya::programs::xdp::XdpFlags where T: core::c pub type aya::programs::xdp::XdpFlags::Owned = T pub fn aya::programs::xdp::XdpFlags::clone_into(&self, target: &mut T) pub fn aya::programs::xdp::XdpFlags::to_owned(&self) -> T -impl core::any::Any for aya::programs::xdp::XdpFlags where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::xdp::XdpFlags where T: 'static + ?core::marker::Sized pub fn aya::programs::xdp::XdpFlags::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::xdp::XdpFlags where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::xdp::XdpFlags where T: ?core::marker::Sized pub fn aya::programs::xdp::XdpFlags::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::xdp::XdpFlags where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::xdp::XdpFlags where T: ?core::marker::Sized pub fn aya::programs::xdp::XdpFlags::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::programs::xdp::XdpFlags where T: core::clone::Clone +pub unsafe fn aya::programs::xdp::XdpFlags::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya::programs::xdp::XdpFlags pub fn aya::programs::xdp::XdpFlags::from(t: T) -> T pub struct aya::programs::xdp::XdpLink(_) @@ -6298,6 +7681,9 @@ impl aya::programs::links::Link for aya::programs::xdp::XdpLink pub type aya::programs::xdp::XdpLink::Id = aya::programs::xdp::XdpLinkId pub fn aya::programs::xdp::XdpLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::xdp::XdpLink::id(&self) -> Self::Id +impl core::cmp::Eq for aya::programs::xdp::XdpLink +impl core::cmp::PartialEq for aya::programs::xdp::XdpLink +pub fn aya::programs::xdp::XdpLink::eq(&self, other: &Self) -> bool impl core::convert::TryFrom for aya::programs::xdp::XdpLink pub type aya::programs::xdp::XdpLink::Error = aya::programs::links::LinkError pub fn aya::programs::xdp::XdpLink::try_from(fd_link: aya::programs::links::FdLink) -> core::result::Result @@ -6306,14 +7692,20 @@ pub type aya::programs::links::FdLink::Error = aya::programs::links::LinkError pub fn aya::programs::links::FdLink::try_from(value: aya::programs::xdp::XdpLink) -> core::result::Result impl core::fmt::Debug for aya::programs::xdp::XdpLink pub fn aya::programs::xdp::XdpLink::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya::programs::xdp::XdpLink +pub fn aya::programs::xdp::XdpLink::hash(&self, state: &mut H) impl core::ops::drop::Drop for aya::programs::xdp::XdpLink pub fn aya::programs::xdp::XdpLink::drop(&mut self) +impl equivalent::Equivalent for aya::programs::xdp::XdpLinkId +pub fn aya::programs::xdp::XdpLinkId::equivalent(&self, key: &aya::programs::xdp::XdpLink) -> bool impl core::marker::Freeze for aya::programs::xdp::XdpLink impl core::marker::Send for aya::programs::xdp::XdpLink impl core::marker::Sync for aya::programs::xdp::XdpLink impl core::marker::Unpin for aya::programs::xdp::XdpLink impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::xdp::XdpLink impl core::panic::unwind_safe::UnwindSafe for aya::programs::xdp::XdpLink +impl equivalent::Equivalent for aya::programs::xdp::XdpLink where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized +pub fn aya::programs::xdp::XdpLink::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::xdp::XdpLink where U: core::convert::From pub fn aya::programs::xdp::XdpLink::into(self) -> U impl core::convert::TryFrom for aya::programs::xdp::XdpLink where U: core::convert::Into @@ -6322,11 +7714,11 @@ pub fn aya::programs::xdp::XdpLink::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::programs::xdp::XdpLink where U: core::convert::TryFrom pub type aya::programs::xdp::XdpLink::Error = >::Error pub fn aya::programs::xdp::XdpLink::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::xdp::XdpLink where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::xdp::XdpLink where T: 'static + ?core::marker::Sized pub fn aya::programs::xdp::XdpLink::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::xdp::XdpLink where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::xdp::XdpLink where T: ?core::marker::Sized pub fn aya::programs::xdp::XdpLink::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::xdp::XdpLink where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::xdp::XdpLink where T: ?core::marker::Sized pub fn aya::programs::xdp::XdpLink::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::xdp::XdpLink pub fn aya::programs::xdp::XdpLink::from(t: T) -> T @@ -6339,15 +7731,15 @@ pub fn aya::programs::xdp::XdpLinkId::fmt(&self, f: &mut core::fmt::Formatter<'_ impl core::hash::Hash for aya::programs::xdp::XdpLinkId pub fn aya::programs::xdp::XdpLinkId::hash<__H: core::hash::Hasher>(&self, state: &mut __H) impl core::marker::StructuralPartialEq for aya::programs::xdp::XdpLinkId +impl equivalent::Equivalent for aya::programs::xdp::XdpLinkId +pub fn aya::programs::xdp::XdpLinkId::equivalent(&self, key: &aya::programs::xdp::XdpLink) -> bool impl core::marker::Freeze for aya::programs::xdp::XdpLinkId impl core::marker::Send for aya::programs::xdp::XdpLinkId impl core::marker::Sync for aya::programs::xdp::XdpLinkId impl core::marker::Unpin for aya::programs::xdp::XdpLinkId impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::xdp::XdpLinkId impl core::panic::unwind_safe::UnwindSafe for aya::programs::xdp::XdpLinkId -impl equivalent::Equivalent for aya::programs::xdp::XdpLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::xdp::XdpLinkId::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::xdp::XdpLinkId where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::xdp::XdpLinkId where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::xdp::XdpLinkId::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::xdp::XdpLinkId where U: core::convert::From pub fn aya::programs::xdp::XdpLinkId::into(self) -> U @@ -6357,14 +7749,55 @@ pub fn aya::programs::xdp::XdpLinkId::try_from(value: U) -> core::result::Result impl core::convert::TryInto for aya::programs::xdp::XdpLinkId where U: core::convert::TryFrom pub type aya::programs::xdp::XdpLinkId::Error = >::Error pub fn aya::programs::xdp::XdpLinkId::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::xdp::XdpLinkId where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::xdp::XdpLinkId where T: 'static + ?core::marker::Sized pub fn aya::programs::xdp::XdpLinkId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::xdp::XdpLinkId where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::xdp::XdpLinkId where T: ?core::marker::Sized pub fn aya::programs::xdp::XdpLinkId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::xdp::XdpLinkId where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::xdp::XdpLinkId where T: ?core::marker::Sized pub fn aya::programs::xdp::XdpLinkId::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::xdp::XdpLinkId pub fn aya::programs::xdp::XdpLinkId::from(t: T) -> T +pub enum aya::programs::CgroupAttachMode +pub aya::programs::CgroupAttachMode::AllowMultiple +pub aya::programs::CgroupAttachMode::AllowOverride +pub aya::programs::CgroupAttachMode::Single +impl core::clone::Clone for aya::programs::links::CgroupAttachMode +pub fn aya::programs::links::CgroupAttachMode::clone(&self) -> aya::programs::links::CgroupAttachMode +impl core::convert::From for u32 +pub fn u32::from(mode: aya::programs::links::CgroupAttachMode) -> Self +impl core::default::Default for aya::programs::links::CgroupAttachMode +pub fn aya::programs::links::CgroupAttachMode::default() -> aya::programs::links::CgroupAttachMode +impl core::fmt::Debug for aya::programs::links::CgroupAttachMode +pub fn aya::programs::links::CgroupAttachMode::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Copy for aya::programs::links::CgroupAttachMode +impl core::marker::Freeze for aya::programs::links::CgroupAttachMode +impl core::marker::Send for aya::programs::links::CgroupAttachMode +impl core::marker::Sync for aya::programs::links::CgroupAttachMode +impl core::marker::Unpin for aya::programs::links::CgroupAttachMode +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::links::CgroupAttachMode +impl core::panic::unwind_safe::UnwindSafe for aya::programs::links::CgroupAttachMode +impl core::convert::Into for aya::programs::links::CgroupAttachMode where U: core::convert::From +pub fn aya::programs::links::CgroupAttachMode::into(self) -> U +impl core::convert::TryFrom for aya::programs::links::CgroupAttachMode where U: core::convert::Into +pub type aya::programs::links::CgroupAttachMode::Error = core::convert::Infallible +pub fn aya::programs::links::CgroupAttachMode::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::links::CgroupAttachMode where U: core::convert::TryFrom +pub type aya::programs::links::CgroupAttachMode::Error = >::Error +pub fn aya::programs::links::CgroupAttachMode::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya::programs::links::CgroupAttachMode where T: core::clone::Clone +pub type aya::programs::links::CgroupAttachMode::Owned = T +pub fn aya::programs::links::CgroupAttachMode::clone_into(&self, target: &mut T) +pub fn aya::programs::links::CgroupAttachMode::to_owned(&self) -> T +impl core::any::Any for aya::programs::links::CgroupAttachMode where T: 'static + ?core::marker::Sized +pub fn aya::programs::links::CgroupAttachMode::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::links::CgroupAttachMode where T: ?core::marker::Sized +pub fn aya::programs::links::CgroupAttachMode::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::links::CgroupAttachMode where T: ?core::marker::Sized +pub fn aya::programs::links::CgroupAttachMode::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::programs::links::CgroupAttachMode where T: core::clone::Clone +pub unsafe fn aya::programs::links::CgroupAttachMode::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya::programs::links::CgroupAttachMode +pub fn aya::programs::links::CgroupAttachMode::from(t: T) -> T pub enum aya::programs::CgroupSkbAttachType pub aya::programs::CgroupSkbAttachType::Egress pub aya::programs::CgroupSkbAttachType::Ingress @@ -6391,12 +7824,14 @@ impl alloc::borrow::ToOwned for aya::programs::cgroup_skb::CgroupSkbAttachTyp pub type aya::programs::cgroup_skb::CgroupSkbAttachType::Owned = T pub fn aya::programs::cgroup_skb::CgroupSkbAttachType::clone_into(&self, target: &mut T) pub fn aya::programs::cgroup_skb::CgroupSkbAttachType::to_owned(&self) -> T -impl core::any::Any for aya::programs::cgroup_skb::CgroupSkbAttachType where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_skb::CgroupSkbAttachType where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_skb::CgroupSkbAttachType::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_skb::CgroupSkbAttachType where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_skb::CgroupSkbAttachType where T: ?core::marker::Sized pub fn aya::programs::cgroup_skb::CgroupSkbAttachType::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_skb::CgroupSkbAttachType where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_skb::CgroupSkbAttachType where T: ?core::marker::Sized pub fn aya::programs::cgroup_skb::CgroupSkbAttachType::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::programs::cgroup_skb::CgroupSkbAttachType where T: core::clone::Clone +pub unsafe fn aya::programs::cgroup_skb::CgroupSkbAttachType::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya::programs::cgroup_skb::CgroupSkbAttachType pub fn aya::programs::cgroup_skb::CgroupSkbAttachType::from(t: T) -> T pub enum aya::programs::ExtensionError @@ -6422,13 +7857,13 @@ pub fn aya::programs::extension::ExtensionError::try_from(value: U) -> core::res impl core::convert::TryInto for aya::programs::extension::ExtensionError where U: core::convert::TryFrom pub type aya::programs::extension::ExtensionError::Error = >::Error pub fn aya::programs::extension::ExtensionError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya::programs::extension::ExtensionError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya::programs::extension::ExtensionError where T: core::fmt::Display + ?core::marker::Sized pub fn aya::programs::extension::ExtensionError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya::programs::extension::ExtensionError where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::extension::ExtensionError where T: 'static + ?core::marker::Sized pub fn aya::programs::extension::ExtensionError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::extension::ExtensionError where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::extension::ExtensionError where T: ?core::marker::Sized pub fn aya::programs::extension::ExtensionError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::extension::ExtensionError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::extension::ExtensionError where T: ?core::marker::Sized pub fn aya::programs::extension::ExtensionError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::extension::ExtensionError pub fn aya::programs::extension::ExtensionError::from(t: T) -> T @@ -6458,94 +7893,55 @@ pub fn aya::programs::kprobe::KProbeError::try_from(value: U) -> core::result::R impl core::convert::TryInto for aya::programs::kprobe::KProbeError where U: core::convert::TryFrom pub type aya::programs::kprobe::KProbeError::Error = >::Error pub fn aya::programs::kprobe::KProbeError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya::programs::kprobe::KProbeError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya::programs::kprobe::KProbeError where T: core::fmt::Display + ?core::marker::Sized pub fn aya::programs::kprobe::KProbeError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya::programs::kprobe::KProbeError where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::kprobe::KProbeError where T: 'static + ?core::marker::Sized pub fn aya::programs::kprobe::KProbeError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::kprobe::KProbeError where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::kprobe::KProbeError where T: ?core::marker::Sized pub fn aya::programs::kprobe::KProbeError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::kprobe::KProbeError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::kprobe::KProbeError where T: ?core::marker::Sized pub fn aya::programs::kprobe::KProbeError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::kprobe::KProbeError pub fn aya::programs::kprobe::KProbeError::from(t: T) -> T -pub enum aya::programs::PerfEventScope -pub aya::programs::PerfEventScope::AllProcessesOneCpu -pub aya::programs::PerfEventScope::AllProcessesOneCpu::cpu: u32 -pub aya::programs::PerfEventScope::CallingProcessAnyCpu -pub aya::programs::PerfEventScope::CallingProcessOneCpu -pub aya::programs::PerfEventScope::CallingProcessOneCpu::cpu: u32 -pub aya::programs::PerfEventScope::OneProcessAnyCpu -pub aya::programs::PerfEventScope::OneProcessAnyCpu::pid: u32 -pub aya::programs::PerfEventScope::OneProcessOneCpu -pub aya::programs::PerfEventScope::OneProcessOneCpu::cpu: u32 -pub aya::programs::PerfEventScope::OneProcessOneCpu::pid: u32 -impl core::clone::Clone for aya::programs::perf_event::PerfEventScope -pub fn aya::programs::perf_event::PerfEventScope::clone(&self) -> aya::programs::perf_event::PerfEventScope -impl core::fmt::Debug for aya::programs::perf_event::PerfEventScope -pub fn aya::programs::perf_event::PerfEventScope::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl core::marker::Freeze for aya::programs::perf_event::PerfEventScope -impl core::marker::Send for aya::programs::perf_event::PerfEventScope -impl core::marker::Sync for aya::programs::perf_event::PerfEventScope -impl core::marker::Unpin for aya::programs::perf_event::PerfEventScope -impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::perf_event::PerfEventScope -impl core::panic::unwind_safe::UnwindSafe for aya::programs::perf_event::PerfEventScope -impl core::convert::Into for aya::programs::perf_event::PerfEventScope where U: core::convert::From -pub fn aya::programs::perf_event::PerfEventScope::into(self) -> U -impl core::convert::TryFrom for aya::programs::perf_event::PerfEventScope where U: core::convert::Into -pub type aya::programs::perf_event::PerfEventScope::Error = core::convert::Infallible -pub fn aya::programs::perf_event::PerfEventScope::try_from(value: U) -> core::result::Result>::Error> -impl core::convert::TryInto for aya::programs::perf_event::PerfEventScope where U: core::convert::TryFrom -pub type aya::programs::perf_event::PerfEventScope::Error = >::Error -pub fn aya::programs::perf_event::PerfEventScope::try_into(self) -> core::result::Result>::Error> -impl alloc::borrow::ToOwned for aya::programs::perf_event::PerfEventScope where T: core::clone::Clone -pub type aya::programs::perf_event::PerfEventScope::Owned = T -pub fn aya::programs::perf_event::PerfEventScope::clone_into(&self, target: &mut T) -pub fn aya::programs::perf_event::PerfEventScope::to_owned(&self) -> T -impl core::any::Any for aya::programs::perf_event::PerfEventScope where T: 'static + core::marker::Sized -pub fn aya::programs::perf_event::PerfEventScope::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::perf_event::PerfEventScope where T: core::marker::Sized -pub fn aya::programs::perf_event::PerfEventScope::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::perf_event::PerfEventScope where T: core::marker::Sized -pub fn aya::programs::perf_event::PerfEventScope::borrow_mut(&mut self) -> &mut T -impl core::convert::From for aya::programs::perf_event::PerfEventScope -pub fn aya::programs::perf_event::PerfEventScope::from(t: T) -> T -#[repr(u32)] pub enum aya::programs::PerfTypeId -pub aya::programs::PerfTypeId::Breakpoint = 5 -pub aya::programs::PerfTypeId::Hardware = 0 -pub aya::programs::PerfTypeId::HwCache = 3 -pub aya::programs::PerfTypeId::Raw = 4 -pub aya::programs::PerfTypeId::Software = 1 -pub aya::programs::PerfTypeId::TracePoint = 2 -impl core::clone::Clone for aya::programs::perf_event::PerfTypeId -pub fn aya::programs::perf_event::PerfTypeId::clone(&self) -> aya::programs::perf_event::PerfTypeId -impl core::fmt::Debug for aya::programs::perf_event::PerfTypeId -pub fn aya::programs::perf_event::PerfTypeId::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl core::marker::Freeze for aya::programs::perf_event::PerfTypeId -impl core::marker::Send for aya::programs::perf_event::PerfTypeId -impl core::marker::Sync for aya::programs::perf_event::PerfTypeId -impl core::marker::Unpin for aya::programs::perf_event::PerfTypeId -impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::perf_event::PerfTypeId -impl core::panic::unwind_safe::UnwindSafe for aya::programs::perf_event::PerfTypeId -impl core::convert::Into for aya::programs::perf_event::PerfTypeId where U: core::convert::From -pub fn aya::programs::perf_event::PerfTypeId::into(self) -> U -impl core::convert::TryFrom for aya::programs::perf_event::PerfTypeId where U: core::convert::Into -pub type aya::programs::perf_event::PerfTypeId::Error = core::convert::Infallible -pub fn aya::programs::perf_event::PerfTypeId::try_from(value: U) -> core::result::Result>::Error> -impl core::convert::TryInto for aya::programs::perf_event::PerfTypeId where U: core::convert::TryFrom -pub type aya::programs::perf_event::PerfTypeId::Error = >::Error -pub fn aya::programs::perf_event::PerfTypeId::try_into(self) -> core::result::Result>::Error> -impl alloc::borrow::ToOwned for aya::programs::perf_event::PerfTypeId where T: core::clone::Clone -pub type aya::programs::perf_event::PerfTypeId::Owned = T -pub fn aya::programs::perf_event::PerfTypeId::clone_into(&self, target: &mut T) -pub fn aya::programs::perf_event::PerfTypeId::to_owned(&self) -> T -impl core::any::Any for aya::programs::perf_event::PerfTypeId where T: 'static + core::marker::Sized -pub fn aya::programs::perf_event::PerfTypeId::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::perf_event::PerfTypeId where T: core::marker::Sized -pub fn aya::programs::perf_event::PerfTypeId::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::perf_event::PerfTypeId where T: core::marker::Sized -pub fn aya::programs::perf_event::PerfTypeId::borrow_mut(&mut self) -> &mut T -impl core::convert::From for aya::programs::perf_event::PerfTypeId -pub fn aya::programs::perf_event::PerfTypeId::from(t: T) -> T +pub enum aya::programs::LsmAttachType +pub aya::programs::LsmAttachType::Cgroup +pub aya::programs::LsmAttachType::Mac +impl core::clone::Clone for aya::programs::LsmAttachType +pub fn aya::programs::LsmAttachType::clone(&self) -> aya::programs::LsmAttachType +impl core::cmp::PartialEq for aya::programs::LsmAttachType +pub fn aya::programs::LsmAttachType::eq(&self, other: &aya::programs::LsmAttachType) -> bool +impl core::fmt::Debug for aya::programs::LsmAttachType +pub fn aya::programs::LsmAttachType::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Copy for aya::programs::LsmAttachType +impl core::marker::StructuralPartialEq for aya::programs::LsmAttachType +impl core::marker::Freeze for aya::programs::LsmAttachType +impl core::marker::Send for aya::programs::LsmAttachType +impl core::marker::Sync for aya::programs::LsmAttachType +impl core::marker::Unpin for aya::programs::LsmAttachType +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::LsmAttachType +impl core::panic::unwind_safe::UnwindSafe for aya::programs::LsmAttachType +impl core::convert::Into for aya::programs::LsmAttachType where U: core::convert::From +pub fn aya::programs::LsmAttachType::into(self) -> U +impl core::convert::TryFrom for aya::programs::LsmAttachType where U: core::convert::Into +pub type aya::programs::LsmAttachType::Error = core::convert::Infallible +pub fn aya::programs::LsmAttachType::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::LsmAttachType where U: core::convert::TryFrom +pub type aya::programs::LsmAttachType::Error = >::Error +pub fn aya::programs::LsmAttachType::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya::programs::LsmAttachType where T: core::clone::Clone +pub type aya::programs::LsmAttachType::Owned = T +pub fn aya::programs::LsmAttachType::clone_into(&self, target: &mut T) +pub fn aya::programs::LsmAttachType::to_owned(&self) -> T +impl core::any::Any for aya::programs::LsmAttachType where T: 'static + ?core::marker::Sized +pub fn aya::programs::LsmAttachType::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::LsmAttachType where T: ?core::marker::Sized +pub fn aya::programs::LsmAttachType::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::LsmAttachType where T: ?core::marker::Sized +pub fn aya::programs::LsmAttachType::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::programs::LsmAttachType where T: core::clone::Clone +pub unsafe fn aya::programs::LsmAttachType::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya::programs::LsmAttachType +pub fn aya::programs::LsmAttachType::from(t: T) -> T pub enum aya::programs::ProbeKind pub aya::programs::ProbeKind::KProbe pub aya::programs::ProbeKind::KRetProbe @@ -6574,12 +7970,14 @@ impl alloc::borrow::ToOwned for aya::programs::ProbeKind where T: core::clone pub type aya::programs::ProbeKind::Owned = T pub fn aya::programs::ProbeKind::clone_into(&self, target: &mut T) pub fn aya::programs::ProbeKind::to_owned(&self) -> T -impl core::any::Any for aya::programs::ProbeKind where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::ProbeKind where T: 'static + ?core::marker::Sized pub fn aya::programs::ProbeKind::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::ProbeKind where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::ProbeKind where T: ?core::marker::Sized pub fn aya::programs::ProbeKind::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::ProbeKind where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::ProbeKind where T: ?core::marker::Sized pub fn aya::programs::ProbeKind::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::programs::ProbeKind where T: core::clone::Clone +pub unsafe fn aya::programs::ProbeKind::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya::programs::ProbeKind pub fn aya::programs::ProbeKind::from(t: T) -> T pub enum aya::programs::Program @@ -6593,9 +7991,12 @@ pub aya::programs::Program::CgroupSysctl(aya::programs::cgroup_sysctl::CgroupSys pub aya::programs::Program::Extension(aya::programs::extension::Extension) pub aya::programs::Program::FEntry(aya::programs::fentry::FEntry) pub aya::programs::Program::FExit(aya::programs::fexit::FExit) +pub aya::programs::Program::FlowDissector(aya::programs::flow_dissector::FlowDissector) +pub aya::programs::Program::Iter(aya::programs::iter::Iter) pub aya::programs::Program::KProbe(aya::programs::kprobe::KProbe) pub aya::programs::Program::LircMode2(aya::programs::lirc_mode2::LircMode2) pub aya::programs::Program::Lsm(aya::programs::lsm::Lsm) +pub aya::programs::Program::LsmCgroup(aya::programs::lsm_cgroup::LsmCgroup) pub aya::programs::Program::PerfEvent(aya::programs::perf_event::PerfEvent) pub aya::programs::Program::RawTracePoint(aya::programs::raw_trace_point::RawTracePoint) pub aya::programs::Program::SchedClassifier(aya::programs::tc::SchedClassifier) @@ -6611,7 +8012,7 @@ impl aya::programs::Program pub fn aya::programs::Program::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> pub fn aya::programs::Program::info(&self) -> core::result::Result pub fn aya::programs::Program::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::Program::prog_type(&self) -> aya_obj::generated::linux_bindings_x86_64::bpf_prog_type +pub fn aya::programs::Program::prog_type(&self) -> aya::programs::ProgramType pub fn aya::programs::Program::unload(self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::Program pub fn aya::programs::Program::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result @@ -6642,6 +8043,12 @@ pub fn &'a aya::programs::fentry::FEntry::try_from(program: &'a aya::programs::P impl<'a> core::convert::TryFrom<&'a aya::programs::Program> for &'a aya::programs::fexit::FExit pub type &'a aya::programs::fexit::FExit::Error = aya::programs::ProgramError pub fn &'a aya::programs::fexit::FExit::try_from(program: &'a aya::programs::Program) -> core::result::Result<&'a aya::programs::fexit::FExit, aya::programs::ProgramError> +impl<'a> core::convert::TryFrom<&'a aya::programs::Program> for &'a aya::programs::flow_dissector::FlowDissector +pub type &'a aya::programs::flow_dissector::FlowDissector::Error = aya::programs::ProgramError +pub fn &'a aya::programs::flow_dissector::FlowDissector::try_from(program: &'a aya::programs::Program) -> core::result::Result<&'a aya::programs::flow_dissector::FlowDissector, aya::programs::ProgramError> +impl<'a> core::convert::TryFrom<&'a aya::programs::Program> for &'a aya::programs::iter::Iter +pub type &'a aya::programs::iter::Iter::Error = aya::programs::ProgramError +pub fn &'a aya::programs::iter::Iter::try_from(program: &'a aya::programs::Program) -> core::result::Result<&'a aya::programs::iter::Iter, aya::programs::ProgramError> impl<'a> core::convert::TryFrom<&'a aya::programs::Program> for &'a aya::programs::kprobe::KProbe pub type &'a aya::programs::kprobe::KProbe::Error = aya::programs::ProgramError pub fn &'a aya::programs::kprobe::KProbe::try_from(program: &'a aya::programs::Program) -> core::result::Result<&'a aya::programs::kprobe::KProbe, aya::programs::ProgramError> @@ -6651,6 +8058,9 @@ pub fn &'a aya::programs::lirc_mode2::LircMode2::try_from(program: &'a aya::prog impl<'a> core::convert::TryFrom<&'a aya::programs::Program> for &'a aya::programs::lsm::Lsm pub type &'a aya::programs::lsm::Lsm::Error = aya::programs::ProgramError pub fn &'a aya::programs::lsm::Lsm::try_from(program: &'a aya::programs::Program) -> core::result::Result<&'a aya::programs::lsm::Lsm, aya::programs::ProgramError> +impl<'a> core::convert::TryFrom<&'a aya::programs::Program> for &'a aya::programs::lsm_cgroup::LsmCgroup +pub type &'a aya::programs::lsm_cgroup::LsmCgroup::Error = aya::programs::ProgramError +pub fn &'a aya::programs::lsm_cgroup::LsmCgroup::try_from(program: &'a aya::programs::Program) -> core::result::Result<&'a aya::programs::lsm_cgroup::LsmCgroup, aya::programs::ProgramError> impl<'a> core::convert::TryFrom<&'a aya::programs::Program> for &'a aya::programs::perf_event::PerfEvent pub type &'a aya::programs::perf_event::PerfEvent::Error = aya::programs::ProgramError pub fn &'a aya::programs::perf_event::PerfEvent::try_from(program: &'a aya::programs::Program) -> core::result::Result<&'a aya::programs::perf_event::PerfEvent, aya::programs::ProgramError> @@ -6714,6 +8124,12 @@ pub fn &'a mut aya::programs::fentry::FEntry::try_from(program: &'a mut aya::pro impl<'a> core::convert::TryFrom<&'a mut aya::programs::Program> for &'a mut aya::programs::fexit::FExit pub type &'a mut aya::programs::fexit::FExit::Error = aya::programs::ProgramError pub fn &'a mut aya::programs::fexit::FExit::try_from(program: &'a mut aya::programs::Program) -> core::result::Result<&'a mut aya::programs::fexit::FExit, aya::programs::ProgramError> +impl<'a> core::convert::TryFrom<&'a mut aya::programs::Program> for &'a mut aya::programs::flow_dissector::FlowDissector +pub type &'a mut aya::programs::flow_dissector::FlowDissector::Error = aya::programs::ProgramError +pub fn &'a mut aya::programs::flow_dissector::FlowDissector::try_from(program: &'a mut aya::programs::Program) -> core::result::Result<&'a mut aya::programs::flow_dissector::FlowDissector, aya::programs::ProgramError> +impl<'a> core::convert::TryFrom<&'a mut aya::programs::Program> for &'a mut aya::programs::iter::Iter +pub type &'a mut aya::programs::iter::Iter::Error = aya::programs::ProgramError +pub fn &'a mut aya::programs::iter::Iter::try_from(program: &'a mut aya::programs::Program) -> core::result::Result<&'a mut aya::programs::iter::Iter, aya::programs::ProgramError> impl<'a> core::convert::TryFrom<&'a mut aya::programs::Program> for &'a mut aya::programs::kprobe::KProbe pub type &'a mut aya::programs::kprobe::KProbe::Error = aya::programs::ProgramError pub fn &'a mut aya::programs::kprobe::KProbe::try_from(program: &'a mut aya::programs::Program) -> core::result::Result<&'a mut aya::programs::kprobe::KProbe, aya::programs::ProgramError> @@ -6723,6 +8139,9 @@ pub fn &'a mut aya::programs::lirc_mode2::LircMode2::try_from(program: &'a mut a impl<'a> core::convert::TryFrom<&'a mut aya::programs::Program> for &'a mut aya::programs::lsm::Lsm pub type &'a mut aya::programs::lsm::Lsm::Error = aya::programs::ProgramError pub fn &'a mut aya::programs::lsm::Lsm::try_from(program: &'a mut aya::programs::Program) -> core::result::Result<&'a mut aya::programs::lsm::Lsm, aya::programs::ProgramError> +impl<'a> core::convert::TryFrom<&'a mut aya::programs::Program> for &'a mut aya::programs::lsm_cgroup::LsmCgroup +pub type &'a mut aya::programs::lsm_cgroup::LsmCgroup::Error = aya::programs::ProgramError +pub fn &'a mut aya::programs::lsm_cgroup::LsmCgroup::try_from(program: &'a mut aya::programs::Program) -> core::result::Result<&'a mut aya::programs::lsm_cgroup::LsmCgroup, aya::programs::ProgramError> impl<'a> core::convert::TryFrom<&'a mut aya::programs::Program> for &'a mut aya::programs::perf_event::PerfEvent pub type &'a mut aya::programs::perf_event::PerfEvent::Error = aya::programs::ProgramError pub fn &'a mut aya::programs::perf_event::PerfEvent::try_from(program: &'a mut aya::programs::Program) -> core::result::Result<&'a mut aya::programs::perf_event::PerfEvent, aya::programs::ProgramError> @@ -6773,17 +8192,18 @@ pub fn aya::programs::Program::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::programs::Program where U: core::convert::TryFrom pub type aya::programs::Program::Error = >::Error pub fn aya::programs::Program::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::Program where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::Program where T: 'static + ?core::marker::Sized pub fn aya::programs::Program::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::Program where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::Program where T: ?core::marker::Sized pub fn aya::programs::Program::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::Program where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::Program where T: ?core::marker::Sized pub fn aya::programs::Program::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::Program pub fn aya::programs::Program::from(t: T) -> T pub enum aya::programs::ProgramError pub aya::programs::ProgramError::AlreadyAttached pub aya::programs::ProgramError::AlreadyLoaded +pub aya::programs::ProgramError::AttachCookieNotSupported pub aya::programs::ProgramError::Btf(aya_obj::btf::btf::BtfError) pub aya::programs::ProgramError::ExtensionError(aya::programs::extension::ExtensionError) pub aya::programs::ProgramError::IOError(std::io::error::Error) @@ -6794,10 +8214,11 @@ pub aya::programs::ProgramError::LoadError pub aya::programs::ProgramError::LoadError::io_error: std::io::error::Error pub aya::programs::ProgramError::LoadError::verifier_log: aya_obj::VerifierLog pub aya::programs::ProgramError::MapError(aya::maps::MapError) +pub aya::programs::ProgramError::NetlinkError(aya::sys::netlink::NetlinkError) pub aya::programs::ProgramError::NotAttached pub aya::programs::ProgramError::NotLoaded pub aya::programs::ProgramError::SocketFilterError(aya::programs::socket_filter::SocketFilterError) -pub aya::programs::ProgramError::SyscallError(crate::sys::SyscallError) +pub aya::programs::ProgramError::SyscallError(aya::sys::SyscallError) pub aya::programs::ProgramError::TcError(aya::programs::tc::TcError) pub aya::programs::ProgramError::TracePointError(aya::programs::trace_point::TracePointError) pub aya::programs::ProgramError::UProbeError(aya::programs::uprobe::UProbeError) @@ -6823,6 +8244,8 @@ impl core::convert::From for aya::programs:: pub fn aya::programs::ProgramError::from(source: aya::programs::uprobe::UProbeError) -> Self impl core::convert::From for aya::programs::ProgramError pub fn aya::programs::ProgramError::from(source: aya::programs::xdp::XdpError) -> Self +impl core::convert::From for aya::programs::ProgramError +pub fn aya::programs::ProgramError::from(source: aya::sys::SyscallError) -> Self impl core::convert::From for aya::programs::ProgramError pub fn aya::programs::ProgramError::from(source: aya_obj::btf::btf::BtfError) -> Self impl core::convert::From for aya::programs::ProgramError @@ -6847,49 +8270,88 @@ pub fn aya::programs::ProgramError::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::programs::ProgramError where U: core::convert::TryFrom pub type aya::programs::ProgramError::Error = >::Error pub fn aya::programs::ProgramError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya::programs::ProgramError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya::programs::ProgramError where T: core::fmt::Display + ?core::marker::Sized pub fn aya::programs::ProgramError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya::programs::ProgramError where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::ProgramError where T: 'static + ?core::marker::Sized pub fn aya::programs::ProgramError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::ProgramError where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::ProgramError where T: ?core::marker::Sized pub fn aya::programs::ProgramError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::ProgramError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::ProgramError where T: ?core::marker::Sized pub fn aya::programs::ProgramError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::ProgramError pub fn aya::programs::ProgramError::from(t: T) -> T -pub enum aya::programs::SamplePolicy -pub aya::programs::SamplePolicy::Frequency(u64) -pub aya::programs::SamplePolicy::Period(u64) -impl core::clone::Clone for aya::programs::perf_event::SamplePolicy -pub fn aya::programs::perf_event::SamplePolicy::clone(&self) -> aya::programs::perf_event::SamplePolicy -impl core::fmt::Debug for aya::programs::perf_event::SamplePolicy -pub fn aya::programs::perf_event::SamplePolicy::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl core::marker::Freeze for aya::programs::perf_event::SamplePolicy -impl core::marker::Send for aya::programs::perf_event::SamplePolicy -impl core::marker::Sync for aya::programs::perf_event::SamplePolicy -impl core::marker::Unpin for aya::programs::perf_event::SamplePolicy -impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::perf_event::SamplePolicy -impl core::panic::unwind_safe::UnwindSafe for aya::programs::perf_event::SamplePolicy -impl core::convert::Into for aya::programs::perf_event::SamplePolicy where U: core::convert::From -pub fn aya::programs::perf_event::SamplePolicy::into(self) -> U -impl core::convert::TryFrom for aya::programs::perf_event::SamplePolicy where U: core::convert::Into -pub type aya::programs::perf_event::SamplePolicy::Error = core::convert::Infallible -pub fn aya::programs::perf_event::SamplePolicy::try_from(value: U) -> core::result::Result>::Error> -impl core::convert::TryInto for aya::programs::perf_event::SamplePolicy where U: core::convert::TryFrom -pub type aya::programs::perf_event::SamplePolicy::Error = >::Error -pub fn aya::programs::perf_event::SamplePolicy::try_into(self) -> core::result::Result>::Error> -impl alloc::borrow::ToOwned for aya::programs::perf_event::SamplePolicy where T: core::clone::Clone -pub type aya::programs::perf_event::SamplePolicy::Owned = T -pub fn aya::programs::perf_event::SamplePolicy::clone_into(&self, target: &mut T) -pub fn aya::programs::perf_event::SamplePolicy::to_owned(&self) -> T -impl core::any::Any for aya::programs::perf_event::SamplePolicy where T: 'static + core::marker::Sized -pub fn aya::programs::perf_event::SamplePolicy::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::perf_event::SamplePolicy where T: core::marker::Sized -pub fn aya::programs::perf_event::SamplePolicy::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::perf_event::SamplePolicy where T: core::marker::Sized -pub fn aya::programs::perf_event::SamplePolicy::borrow_mut(&mut self) -> &mut T -impl core::convert::From for aya::programs::perf_event::SamplePolicy -pub fn aya::programs::perf_event::SamplePolicy::from(t: T) -> T +#[non_exhaustive] pub enum aya::programs::ProgramType +pub aya::programs::ProgramType::CgroupDevice +pub aya::programs::ProgramType::CgroupSkb +pub aya::programs::ProgramType::CgroupSock +pub aya::programs::ProgramType::CgroupSockAddr +pub aya::programs::ProgramType::CgroupSockopt +pub aya::programs::ProgramType::CgroupSysctl +pub aya::programs::ProgramType::Extension +pub aya::programs::ProgramType::FlowDissector +pub aya::programs::ProgramType::KProbe +pub aya::programs::ProgramType::LircMode2 +pub aya::programs::ProgramType::Lsm(aya::programs::LsmAttachType) +pub aya::programs::ProgramType::LwtInput +pub aya::programs::ProgramType::LwtOutput +pub aya::programs::ProgramType::LwtSeg6local +pub aya::programs::ProgramType::LwtXmit +pub aya::programs::ProgramType::Netfilter +pub aya::programs::ProgramType::PerfEvent +pub aya::programs::ProgramType::RawTracePoint +pub aya::programs::ProgramType::RawTracePointWritable +pub aya::programs::ProgramType::SchedAction +pub aya::programs::ProgramType::SchedClassifier +pub aya::programs::ProgramType::SkLookup +pub aya::programs::ProgramType::SkMsg +pub aya::programs::ProgramType::SkReuseport +pub aya::programs::ProgramType::SkSkb +pub aya::programs::ProgramType::SockOps +pub aya::programs::ProgramType::SocketFilter +pub aya::programs::ProgramType::StructOps +pub aya::programs::ProgramType::Syscall +pub aya::programs::ProgramType::TracePoint +pub aya::programs::ProgramType::Tracing +pub aya::programs::ProgramType::Unspecified +pub aya::programs::ProgramType::Xdp +impl core::clone::Clone for aya::programs::ProgramType +pub fn aya::programs::ProgramType::clone(&self) -> aya::programs::ProgramType +impl core::cmp::PartialEq for aya::programs::ProgramType +pub fn aya::programs::ProgramType::eq(&self, other: &aya::programs::ProgramType) -> bool +impl core::convert::From for aya_obj::generated::linux_bindings_x86_64::bpf_prog_type +pub fn aya_obj::generated::linux_bindings_x86_64::bpf_prog_type::from(value: aya::programs::ProgramType) -> Self +impl core::fmt::Debug for aya::programs::ProgramType +pub fn aya::programs::ProgramType::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Copy for aya::programs::ProgramType +impl core::marker::StructuralPartialEq for aya::programs::ProgramType +impl core::marker::Freeze for aya::programs::ProgramType +impl core::marker::Send for aya::programs::ProgramType +impl core::marker::Sync for aya::programs::ProgramType +impl core::marker::Unpin for aya::programs::ProgramType +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::ProgramType +impl core::panic::unwind_safe::UnwindSafe for aya::programs::ProgramType +impl core::convert::Into for aya::programs::ProgramType where U: core::convert::From +pub fn aya::programs::ProgramType::into(self) -> U +impl core::convert::TryFrom for aya::programs::ProgramType where U: core::convert::Into +pub type aya::programs::ProgramType::Error = core::convert::Infallible +pub fn aya::programs::ProgramType::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::ProgramType where U: core::convert::TryFrom +pub type aya::programs::ProgramType::Error = >::Error +pub fn aya::programs::ProgramType::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya::programs::ProgramType where T: core::clone::Clone +pub type aya::programs::ProgramType::Owned = T +pub fn aya::programs::ProgramType::clone_into(&self, target: &mut T) +pub fn aya::programs::ProgramType::to_owned(&self) -> T +impl core::any::Any for aya::programs::ProgramType where T: 'static + ?core::marker::Sized +pub fn aya::programs::ProgramType::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::ProgramType where T: ?core::marker::Sized +pub fn aya::programs::ProgramType::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::ProgramType where T: ?core::marker::Sized +pub fn aya::programs::ProgramType::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::programs::ProgramType where T: core::clone::Clone +pub unsafe fn aya::programs::ProgramType::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya::programs::ProgramType +pub fn aya::programs::ProgramType::from(t: T) -> T pub enum aya::programs::SkSkbKind pub aya::programs::SkSkbKind::StreamParser pub aya::programs::SkSkbKind::StreamVerdict @@ -6916,12 +8378,14 @@ impl alloc::borrow::ToOwned for aya::programs::sk_skb::SkSkbKind where T: cor pub type aya::programs::sk_skb::SkSkbKind::Owned = T pub fn aya::programs::sk_skb::SkSkbKind::clone_into(&self, target: &mut T) pub fn aya::programs::sk_skb::SkSkbKind::to_owned(&self) -> T -impl core::any::Any for aya::programs::sk_skb::SkSkbKind where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::sk_skb::SkSkbKind where T: 'static + ?core::marker::Sized pub fn aya::programs::sk_skb::SkSkbKind::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::sk_skb::SkSkbKind where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::sk_skb::SkSkbKind where T: ?core::marker::Sized pub fn aya::programs::sk_skb::SkSkbKind::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::sk_skb::SkSkbKind where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::sk_skb::SkSkbKind where T: ?core::marker::Sized pub fn aya::programs::sk_skb::SkSkbKind::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::programs::sk_skb::SkSkbKind where T: core::clone::Clone +pub unsafe fn aya::programs::sk_skb::SkSkbKind::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya::programs::sk_skb::SkSkbKind pub fn aya::programs::sk_skb::SkSkbKind::from(t: T) -> T pub enum aya::programs::SocketFilterError @@ -6949,13 +8413,13 @@ pub fn aya::programs::socket_filter::SocketFilterError::try_from(value: U) -> co impl core::convert::TryInto for aya::programs::socket_filter::SocketFilterError where U: core::convert::TryFrom pub type aya::programs::socket_filter::SocketFilterError::Error = >::Error pub fn aya::programs::socket_filter::SocketFilterError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya::programs::socket_filter::SocketFilterError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya::programs::socket_filter::SocketFilterError where T: core::fmt::Display + ?core::marker::Sized pub fn aya::programs::socket_filter::SocketFilterError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya::programs::socket_filter::SocketFilterError where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::socket_filter::SocketFilterError where T: 'static + ?core::marker::Sized pub fn aya::programs::socket_filter::SocketFilterError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::socket_filter::SocketFilterError where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::socket_filter::SocketFilterError where T: ?core::marker::Sized pub fn aya::programs::socket_filter::SocketFilterError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::socket_filter::SocketFilterError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::socket_filter::SocketFilterError where T: ?core::marker::Sized pub fn aya::programs::socket_filter::SocketFilterError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::socket_filter::SocketFilterError pub fn aya::programs::socket_filter::SocketFilterError::from(t: T) -> T @@ -6980,9 +8444,7 @@ impl core::marker::Sync for aya::programs::tc::TcAttachType impl core::marker::Unpin for aya::programs::tc::TcAttachType impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::tc::TcAttachType impl core::panic::unwind_safe::UnwindSafe for aya::programs::tc::TcAttachType -impl equivalent::Equivalent for aya::programs::tc::TcAttachType where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::programs::tc::TcAttachType::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::programs::tc::TcAttachType where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::programs::tc::TcAttachType where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::programs::tc::TcAttachType::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::programs::tc::TcAttachType where U: core::convert::From pub fn aya::programs::tc::TcAttachType::into(self) -> U @@ -6996,20 +8458,29 @@ impl alloc::borrow::ToOwned for aya::programs::tc::TcAttachType where T: core pub type aya::programs::tc::TcAttachType::Owned = T pub fn aya::programs::tc::TcAttachType::clone_into(&self, target: &mut T) pub fn aya::programs::tc::TcAttachType::to_owned(&self) -> T -impl core::any::Any for aya::programs::tc::TcAttachType where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::tc::TcAttachType where T: 'static + ?core::marker::Sized pub fn aya::programs::tc::TcAttachType::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::tc::TcAttachType where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::tc::TcAttachType where T: ?core::marker::Sized pub fn aya::programs::tc::TcAttachType::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::tc::TcAttachType where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::tc::TcAttachType where T: ?core::marker::Sized pub fn aya::programs::tc::TcAttachType::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::programs::tc::TcAttachType where T: core::clone::Clone +pub unsafe fn aya::programs::tc::TcAttachType::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya::programs::tc::TcAttachType pub fn aya::programs::tc::TcAttachType::from(t: T) -> T pub enum aya::programs::TcError pub aya::programs::TcError::AlreadyAttached -pub aya::programs::TcError::NetlinkError -pub aya::programs::TcError::NetlinkError::io_error: std::io::error::Error +pub aya::programs::TcError::InvalidLinkOperation +pub aya::programs::TcError::InvalidTcxAttach(u32) +pub aya::programs::TcError::IoError(std::io::error::Error) +pub aya::programs::TcError::NetlinkError(aya::sys::netlink::NetlinkError) +pub aya::programs::TcError::NulError(alloc::ffi::c_str::NulError) +impl core::convert::From for aya::programs::tc::TcError +pub fn aya::programs::tc::TcError::from(source: alloc::ffi::c_str::NulError) -> Self impl core::convert::From for aya::programs::ProgramError pub fn aya::programs::ProgramError::from(source: aya::programs::tc::TcError) -> Self +impl core::convert::From for aya::programs::tc::TcError +pub fn aya::programs::tc::TcError::from(source: std::io::error::Error) -> Self impl core::error::Error for aya::programs::tc::TcError pub fn aya::programs::tc::TcError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)> impl core::fmt::Debug for aya::programs::tc::TcError @@ -7030,19 +8501,19 @@ pub fn aya::programs::tc::TcError::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::programs::tc::TcError where U: core::convert::TryFrom pub type aya::programs::tc::TcError::Error = >::Error pub fn aya::programs::tc::TcError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya::programs::tc::TcError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya::programs::tc::TcError where T: core::fmt::Display + ?core::marker::Sized pub fn aya::programs::tc::TcError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya::programs::tc::TcError where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::tc::TcError where T: 'static + ?core::marker::Sized pub fn aya::programs::tc::TcError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::tc::TcError where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::tc::TcError where T: ?core::marker::Sized pub fn aya::programs::tc::TcError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::tc::TcError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::tc::TcError where T: ?core::marker::Sized pub fn aya::programs::tc::TcError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::tc::TcError pub fn aya::programs::tc::TcError::from(t: T) -> T pub enum aya::programs::TracePointError pub aya::programs::TracePointError::FileError -pub aya::programs::TracePointError::FileError::filename: alloc::string::String +pub aya::programs::TracePointError::FileError::filename: std::path::PathBuf pub aya::programs::TracePointError::FileError::io_error: std::io::error::Error impl core::convert::From for aya::programs::ProgramError pub fn aya::programs::ProgramError::from(source: aya::programs::trace_point::TracePointError) -> Self @@ -7066,13 +8537,13 @@ pub fn aya::programs::trace_point::TracePointError::try_from(value: U) -> core:: impl core::convert::TryInto for aya::programs::trace_point::TracePointError where U: core::convert::TryFrom pub type aya::programs::trace_point::TracePointError::Error = >::Error pub fn aya::programs::trace_point::TracePointError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya::programs::trace_point::TracePointError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya::programs::trace_point::TracePointError where T: core::fmt::Display + ?core::marker::Sized pub fn aya::programs::trace_point::TracePointError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya::programs::trace_point::TracePointError where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::trace_point::TracePointError where T: 'static + ?core::marker::Sized pub fn aya::programs::trace_point::TracePointError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::trace_point::TracePointError where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::trace_point::TracePointError where T: ?core::marker::Sized pub fn aya::programs::trace_point::TracePointError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::trace_point::TracePointError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::trace_point::TracePointError where T: ?core::marker::Sized pub fn aya::programs::trace_point::TracePointError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::trace_point::TracePointError pub fn aya::programs::trace_point::TracePointError::from(t: T) -> T @@ -7081,9 +8552,12 @@ pub aya::programs::UProbeError::FileError pub aya::programs::UProbeError::FileError::filename: std::path::PathBuf pub aya::programs::UProbeError::FileError::io_error: std::io::error::Error pub aya::programs::UProbeError::InvalidLdSoCache -pub aya::programs::UProbeError::InvalidLdSoCache::io_error: alloc::sync::Arc +pub aya::programs::UProbeError::InvalidLdSoCache::io_error: &'static std::io::error::Error pub aya::programs::UProbeError::InvalidTarget pub aya::programs::UProbeError::InvalidTarget::path: std::path::PathBuf +pub aya::programs::UProbeError::ProcMap +pub aya::programs::UProbeError::ProcMap::pid: i32 +pub aya::programs::UProbeError::ProcMap::source: aya::programs::uprobe::ProcMapError pub aya::programs::UProbeError::SymbolError pub aya::programs::UProbeError::SymbolError::error: alloc::boxed::Box<(dyn core::error::Error + core::marker::Send + core::marker::Sync)> pub aya::programs::UProbeError::SymbolError::symbol: alloc::string::String @@ -7109,19 +8583,18 @@ pub fn aya::programs::uprobe::UProbeError::try_from(value: U) -> core::result::R impl core::convert::TryInto for aya::programs::uprobe::UProbeError where U: core::convert::TryFrom pub type aya::programs::uprobe::UProbeError::Error = >::Error pub fn aya::programs::uprobe::UProbeError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya::programs::uprobe::UProbeError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya::programs::uprobe::UProbeError where T: core::fmt::Display + ?core::marker::Sized pub fn aya::programs::uprobe::UProbeError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya::programs::uprobe::UProbeError where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::uprobe::UProbeError where T: 'static + ?core::marker::Sized pub fn aya::programs::uprobe::UProbeError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::uprobe::UProbeError where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::uprobe::UProbeError where T: ?core::marker::Sized pub fn aya::programs::uprobe::UProbeError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::uprobe::UProbeError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::uprobe::UProbeError where T: ?core::marker::Sized pub fn aya::programs::uprobe::UProbeError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::uprobe::UProbeError pub fn aya::programs::uprobe::UProbeError::from(t: T) -> T pub enum aya::programs::XdpError -pub aya::programs::XdpError::NetlinkError -pub aya::programs::XdpError::NetlinkError::io_error: std::io::error::Error +pub aya::programs::XdpError::NetlinkError(aya::sys::netlink::NetlinkError) impl core::convert::From for aya::programs::ProgramError pub fn aya::programs::ProgramError::from(source: aya::programs::xdp::XdpError) -> Self impl core::error::Error for aya::programs::xdp::XdpError @@ -7144,31 +8617,35 @@ pub fn aya::programs::xdp::XdpError::try_from(value: U) -> core::result::Result< impl core::convert::TryInto for aya::programs::xdp::XdpError where U: core::convert::TryFrom pub type aya::programs::xdp::XdpError::Error = >::Error pub fn aya::programs::xdp::XdpError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya::programs::xdp::XdpError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya::programs::xdp::XdpError where T: core::fmt::Display + ?core::marker::Sized pub fn aya::programs::xdp::XdpError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya::programs::xdp::XdpError where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::xdp::XdpError where T: 'static + ?core::marker::Sized pub fn aya::programs::xdp::XdpError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::xdp::XdpError where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::xdp::XdpError where T: ?core::marker::Sized pub fn aya::programs::xdp::XdpError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::xdp::XdpError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::xdp::XdpError where T: ?core::marker::Sized pub fn aya::programs::xdp::XdpError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::xdp::XdpError pub fn aya::programs::xdp::XdpError::from(t: T) -> T pub struct aya::programs::BtfTracePoint impl aya::programs::tp_btf::BtfTracePoint +pub const aya::programs::tp_btf::BtfTracePoint::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::tp_btf::BtfTracePoint::attach(&mut self) -> core::result::Result -pub fn aya::programs::tp_btf::BtfTracePoint::detach(&mut self, link_id: aya::programs::tp_btf::BtfTracePointLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::tp_btf::BtfTracePoint::load(&mut self, tracepoint: &str, btf: &aya_obj::btf::btf::Btf) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::tp_btf::BtfTracePoint +pub fn aya::programs::tp_btf::BtfTracePoint::detach(&mut self, link_id: aya::programs::tp_btf::BtfTracePointLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::tp_btf::BtfTracePoint::take_link(&mut self, link_id: aya::programs::tp_btf::BtfTracePointLinkId) -> core::result::Result impl aya::programs::tp_btf::BtfTracePoint pub fn aya::programs::tp_btf::BtfTracePoint::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::tp_btf::BtfTracePoint pub fn aya::programs::tp_btf::BtfTracePoint::from_pin>(path: P) -> core::result::Result impl aya::programs::tp_btf::BtfTracePoint +pub unsafe fn aya::programs::tp_btf::BtfTracePoint::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::tp_btf::BtfTracePoint pub fn aya::programs::tp_btf::BtfTracePoint::info(&self) -> core::result::Result impl aya::programs::tp_btf::BtfTracePoint pub fn aya::programs::tp_btf::BtfTracePoint::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::tp_btf::BtfTracePoint::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::tp_btf::BtfTracePoint::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::tp_btf::BtfTracePoint pub fn aya::programs::tp_btf::BtfTracePoint::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::tp_btf::BtfTracePoint @@ -7195,30 +8672,34 @@ pub fn aya::programs::tp_btf::BtfTracePoint::try_from(value: U) -> core::result: impl core::convert::TryInto for aya::programs::tp_btf::BtfTracePoint where U: core::convert::TryFrom pub type aya::programs::tp_btf::BtfTracePoint::Error = >::Error pub fn aya::programs::tp_btf::BtfTracePoint::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::tp_btf::BtfTracePoint where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::tp_btf::BtfTracePoint where T: 'static + ?core::marker::Sized pub fn aya::programs::tp_btf::BtfTracePoint::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::tp_btf::BtfTracePoint where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::tp_btf::BtfTracePoint where T: ?core::marker::Sized pub fn aya::programs::tp_btf::BtfTracePoint::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::tp_btf::BtfTracePoint where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::tp_btf::BtfTracePoint where T: ?core::marker::Sized pub fn aya::programs::tp_btf::BtfTracePoint::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::tp_btf::BtfTracePoint pub fn aya::programs::tp_btf::BtfTracePoint::from(t: T) -> T pub struct aya::programs::CgroupDevice impl aya::programs::cgroup_device::CgroupDevice -pub fn aya::programs::cgroup_device::CgroupDevice::attach(&mut self, cgroup: T) -> core::result::Result -pub fn aya::programs::cgroup_device::CgroupDevice::detach(&mut self, link_id: aya::programs::cgroup_device::CgroupDeviceLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub const aya::programs::cgroup_device::CgroupDevice::PROGRAM_TYPE: aya::programs::ProgramType +pub fn aya::programs::cgroup_device::CgroupDevice::attach(&mut self, cgroup: T, mode: aya::programs::links::CgroupAttachMode) -> core::result::Result pub fn aya::programs::cgroup_device::CgroupDevice::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::cgroup_device::CgroupDevice::query(target_fd: T) -> core::result::Result, aya::programs::ProgramError> +impl aya::programs::cgroup_device::CgroupDevice +pub fn aya::programs::cgroup_device::CgroupDevice::detach(&mut self, link_id: aya::programs::cgroup_device::CgroupDeviceLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::cgroup_device::CgroupDevice::take_link(&mut self, link_id: aya::programs::cgroup_device::CgroupDeviceLinkId) -> core::result::Result impl aya::programs::cgroup_device::CgroupDevice pub fn aya::programs::cgroup_device::CgroupDevice::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::cgroup_device::CgroupDevice pub fn aya::programs::cgroup_device::CgroupDevice::from_pin>(path: P) -> core::result::Result impl aya::programs::cgroup_device::CgroupDevice +pub fn aya::programs::cgroup_device::CgroupDevice::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::cgroup_device::CgroupDevice pub fn aya::programs::cgroup_device::CgroupDevice::info(&self) -> core::result::Result impl aya::programs::cgroup_device::CgroupDevice pub fn aya::programs::cgroup_device::CgroupDevice::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::cgroup_device::CgroupDevice::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::cgroup_device::CgroupDevice::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::cgroup_device::CgroupDevice pub fn aya::programs::cgroup_device::CgroupDevice::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::cgroup_device::CgroupDevice @@ -7245,29 +8726,33 @@ pub fn aya::programs::cgroup_device::CgroupDevice::try_from(value: U) -> core::r impl core::convert::TryInto for aya::programs::cgroup_device::CgroupDevice where U: core::convert::TryFrom pub type aya::programs::cgroup_device::CgroupDevice::Error = >::Error pub fn aya::programs::cgroup_device::CgroupDevice::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_device::CgroupDevice where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_device::CgroupDevice where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_device::CgroupDevice::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_device::CgroupDevice where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_device::CgroupDevice where T: ?core::marker::Sized pub fn aya::programs::cgroup_device::CgroupDevice::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_device::CgroupDevice where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_device::CgroupDevice where T: ?core::marker::Sized pub fn aya::programs::cgroup_device::CgroupDevice::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_device::CgroupDevice pub fn aya::programs::cgroup_device::CgroupDevice::from(t: T) -> T pub struct aya::programs::CgroupSkb impl aya::programs::cgroup_skb::CgroupSkb -pub fn aya::programs::cgroup_skb::CgroupSkb::attach(&mut self, cgroup: T, attach_type: aya::programs::cgroup_skb::CgroupSkbAttachType) -> core::result::Result -pub fn aya::programs::cgroup_skb::CgroupSkb::detach(&mut self, link_id: aya::programs::cgroup_skb::CgroupSkbLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub const aya::programs::cgroup_skb::CgroupSkb::PROGRAM_TYPE: aya::programs::ProgramType +pub fn aya::programs::cgroup_skb::CgroupSkb::attach(&mut self, cgroup: T, attach_type: aya::programs::cgroup_skb::CgroupSkbAttachType, mode: aya::programs::links::CgroupAttachMode) -> core::result::Result pub fn aya::programs::cgroup_skb::CgroupSkb::expected_attach_type(&self) -> &core::option::Option pub fn aya::programs::cgroup_skb::CgroupSkb::from_pin>(path: P, expected_attach_type: aya::programs::cgroup_skb::CgroupSkbAttachType) -> core::result::Result pub fn aya::programs::cgroup_skb::CgroupSkb::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::cgroup_skb::CgroupSkb +pub fn aya::programs::cgroup_skb::CgroupSkb::detach(&mut self, link_id: aya::programs::cgroup_skb::CgroupSkbLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::cgroup_skb::CgroupSkb::take_link(&mut self, link_id: aya::programs::cgroup_skb::CgroupSkbLinkId) -> core::result::Result impl aya::programs::cgroup_skb::CgroupSkb pub fn aya::programs::cgroup_skb::CgroupSkb::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::cgroup_skb::CgroupSkb +pub fn aya::programs::cgroup_skb::CgroupSkb::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>, attach_type: core::option::Option) -> core::result::Result +impl aya::programs::cgroup_skb::CgroupSkb pub fn aya::programs::cgroup_skb::CgroupSkb::info(&self) -> core::result::Result impl aya::programs::cgroup_skb::CgroupSkb pub fn aya::programs::cgroup_skb::CgroupSkb::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::cgroup_skb::CgroupSkb::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::cgroup_skb::CgroupSkb::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::cgroup_skb::CgroupSkb pub fn aya::programs::cgroup_skb::CgroupSkb::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::cgroup_skb::CgroupSkb @@ -7294,20 +8779,22 @@ pub fn aya::programs::cgroup_skb::CgroupSkb::try_from(value: U) -> core::result: impl core::convert::TryInto for aya::programs::cgroup_skb::CgroupSkb where U: core::convert::TryFrom pub type aya::programs::cgroup_skb::CgroupSkb::Error = >::Error pub fn aya::programs::cgroup_skb::CgroupSkb::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_skb::CgroupSkb where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_skb::CgroupSkb where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_skb::CgroupSkb::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_skb::CgroupSkb where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_skb::CgroupSkb where T: ?core::marker::Sized pub fn aya::programs::cgroup_skb::CgroupSkb::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_skb::CgroupSkb where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_skb::CgroupSkb where T: ?core::marker::Sized pub fn aya::programs::cgroup_skb::CgroupSkb::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_skb::CgroupSkb pub fn aya::programs::cgroup_skb::CgroupSkb::from(t: T) -> T pub struct aya::programs::CgroupSock impl aya::programs::cgroup_sock::CgroupSock -pub fn aya::programs::cgroup_sock::CgroupSock::attach(&mut self, cgroup: T) -> core::result::Result -pub fn aya::programs::cgroup_sock::CgroupSock::detach(&mut self, link_id: aya::programs::cgroup_sock::CgroupSockLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub const aya::programs::cgroup_sock::CgroupSock::PROGRAM_TYPE: aya::programs::ProgramType +pub fn aya::programs::cgroup_sock::CgroupSock::attach(&mut self, cgroup: T, mode: aya::programs::links::CgroupAttachMode) -> core::result::Result pub fn aya::programs::cgroup_sock::CgroupSock::from_pin>(path: P, attach_type: aya_obj::programs::cgroup_sock::CgroupSockAttachType) -> core::result::Result pub fn aya::programs::cgroup_sock::CgroupSock::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::cgroup_sock::CgroupSock +pub fn aya::programs::cgroup_sock::CgroupSock::detach(&mut self, link_id: aya::programs::cgroup_sock::CgroupSockLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::cgroup_sock::CgroupSock::take_link(&mut self, link_id: aya::programs::cgroup_sock::CgroupSockLinkId) -> core::result::Result impl aya::programs::cgroup_sock::CgroupSock pub fn aya::programs::cgroup_sock::CgroupSock::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> @@ -7315,7 +8802,7 @@ impl aya::programs::cgroup_sock::CgroupSock pub fn aya::programs::cgroup_sock::CgroupSock::info(&self) -> core::result::Result impl aya::programs::cgroup_sock::CgroupSock pub fn aya::programs::cgroup_sock::CgroupSock::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::cgroup_sock::CgroupSock::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::cgroup_sock::CgroupSock::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::cgroup_sock::CgroupSock pub fn aya::programs::cgroup_sock::CgroupSock::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::cgroup_sock::CgroupSock @@ -7342,20 +8829,22 @@ pub fn aya::programs::cgroup_sock::CgroupSock::try_from(value: U) -> core::resul impl core::convert::TryInto for aya::programs::cgroup_sock::CgroupSock where U: core::convert::TryFrom pub type aya::programs::cgroup_sock::CgroupSock::Error = >::Error pub fn aya::programs::cgroup_sock::CgroupSock::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_sock::CgroupSock where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_sock::CgroupSock where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_sock::CgroupSock::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_sock::CgroupSock where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_sock::CgroupSock where T: ?core::marker::Sized pub fn aya::programs::cgroup_sock::CgroupSock::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_sock::CgroupSock where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_sock::CgroupSock where T: ?core::marker::Sized pub fn aya::programs::cgroup_sock::CgroupSock::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_sock::CgroupSock pub fn aya::programs::cgroup_sock::CgroupSock::from(t: T) -> T pub struct aya::programs::CgroupSockAddr impl aya::programs::cgroup_sock_addr::CgroupSockAddr -pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::attach(&mut self, cgroup: T) -> core::result::Result -pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::detach(&mut self, link_id: aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub const aya::programs::cgroup_sock_addr::CgroupSockAddr::PROGRAM_TYPE: aya::programs::ProgramType +pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::attach(&mut self, cgroup: T, mode: aya::programs::links::CgroupAttachMode) -> core::result::Result pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::from_pin>(path: P, attach_type: aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType) -> core::result::Result pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::cgroup_sock_addr::CgroupSockAddr +pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::detach(&mut self, link_id: aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::take_link(&mut self, link_id: aya::programs::cgroup_sock_addr::CgroupSockAddrLinkId) -> core::result::Result impl aya::programs::cgroup_sock_addr::CgroupSockAddr pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> @@ -7363,7 +8852,7 @@ impl aya::programs::cgroup_sock_addr::CgroupSockAddr pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::info(&self) -> core::result::Result impl aya::programs::cgroup_sock_addr::CgroupSockAddr pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::cgroup_sock_addr::CgroupSockAddr pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::cgroup_sock_addr::CgroupSockAddr @@ -7390,28 +8879,32 @@ pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::try_from(value: U) -> co impl core::convert::TryInto for aya::programs::cgroup_sock_addr::CgroupSockAddr where U: core::convert::TryFrom pub type aya::programs::cgroup_sock_addr::CgroupSockAddr::Error = >::Error pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_sock_addr::CgroupSockAddr where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_sock_addr::CgroupSockAddr where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_sock_addr::CgroupSockAddr where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_sock_addr::CgroupSockAddr where T: ?core::marker::Sized pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_sock_addr::CgroupSockAddr where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_sock_addr::CgroupSockAddr where T: ?core::marker::Sized pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_sock_addr::CgroupSockAddr pub fn aya::programs::cgroup_sock_addr::CgroupSockAddr::from(t: T) -> T pub struct aya::programs::CgroupSockopt impl aya::programs::cgroup_sockopt::CgroupSockopt -pub fn aya::programs::cgroup_sockopt::CgroupSockopt::attach(&mut self, cgroup: T) -> core::result::Result -pub fn aya::programs::cgroup_sockopt::CgroupSockopt::detach(&mut self, link_id: aya::programs::cgroup_sockopt::CgroupSockoptLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub const aya::programs::cgroup_sockopt::CgroupSockopt::PROGRAM_TYPE: aya::programs::ProgramType +pub fn aya::programs::cgroup_sockopt::CgroupSockopt::attach(&mut self, cgroup: T, mode: aya::programs::links::CgroupAttachMode) -> core::result::Result pub fn aya::programs::cgroup_sockopt::CgroupSockopt::from_pin>(path: P, attach_type: aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType) -> core::result::Result pub fn aya::programs::cgroup_sockopt::CgroupSockopt::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::cgroup_sockopt::CgroupSockopt +pub fn aya::programs::cgroup_sockopt::CgroupSockopt::detach(&mut self, link_id: aya::programs::cgroup_sockopt::CgroupSockoptLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::cgroup_sockopt::CgroupSockopt::take_link(&mut self, link_id: aya::programs::cgroup_sockopt::CgroupSockoptLinkId) -> core::result::Result impl aya::programs::cgroup_sockopt::CgroupSockopt pub fn aya::programs::cgroup_sockopt::CgroupSockopt::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::cgroup_sockopt::CgroupSockopt +pub fn aya::programs::cgroup_sockopt::CgroupSockopt::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>, attach_type: aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType) -> core::result::Result +impl aya::programs::cgroup_sockopt::CgroupSockopt pub fn aya::programs::cgroup_sockopt::CgroupSockopt::info(&self) -> core::result::Result impl aya::programs::cgroup_sockopt::CgroupSockopt pub fn aya::programs::cgroup_sockopt::CgroupSockopt::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::cgroup_sockopt::CgroupSockopt::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::cgroup_sockopt::CgroupSockopt::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::cgroup_sockopt::CgroupSockopt pub fn aya::programs::cgroup_sockopt::CgroupSockopt::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::cgroup_sockopt::CgroupSockopt @@ -7438,29 +8931,33 @@ pub fn aya::programs::cgroup_sockopt::CgroupSockopt::try_from(value: U) -> core: impl core::convert::TryInto for aya::programs::cgroup_sockopt::CgroupSockopt where U: core::convert::TryFrom pub type aya::programs::cgroup_sockopt::CgroupSockopt::Error = >::Error pub fn aya::programs::cgroup_sockopt::CgroupSockopt::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_sockopt::CgroupSockopt where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_sockopt::CgroupSockopt where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_sockopt::CgroupSockopt::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_sockopt::CgroupSockopt where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_sockopt::CgroupSockopt where T: ?core::marker::Sized pub fn aya::programs::cgroup_sockopt::CgroupSockopt::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_sockopt::CgroupSockopt where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_sockopt::CgroupSockopt where T: ?core::marker::Sized pub fn aya::programs::cgroup_sockopt::CgroupSockopt::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_sockopt::CgroupSockopt pub fn aya::programs::cgroup_sockopt::CgroupSockopt::from(t: T) -> T pub struct aya::programs::CgroupSysctl impl aya::programs::cgroup_sysctl::CgroupSysctl -pub fn aya::programs::cgroup_sysctl::CgroupSysctl::attach(&mut self, cgroup: T) -> core::result::Result -pub fn aya::programs::cgroup_sysctl::CgroupSysctl::detach(&mut self, link_id: aya::programs::cgroup_sysctl::CgroupSysctlLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub const aya::programs::cgroup_sysctl::CgroupSysctl::PROGRAM_TYPE: aya::programs::ProgramType +pub fn aya::programs::cgroup_sysctl::CgroupSysctl::attach(&mut self, cgroup: T, mode: aya::programs::links::CgroupAttachMode) -> core::result::Result pub fn aya::programs::cgroup_sysctl::CgroupSysctl::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::cgroup_sysctl::CgroupSysctl +pub fn aya::programs::cgroup_sysctl::CgroupSysctl::detach(&mut self, link_id: aya::programs::cgroup_sysctl::CgroupSysctlLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::cgroup_sysctl::CgroupSysctl::take_link(&mut self, link_id: aya::programs::cgroup_sysctl::CgroupSysctlLinkId) -> core::result::Result impl aya::programs::cgroup_sysctl::CgroupSysctl pub fn aya::programs::cgroup_sysctl::CgroupSysctl::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::cgroup_sysctl::CgroupSysctl pub fn aya::programs::cgroup_sysctl::CgroupSysctl::from_pin>(path: P) -> core::result::Result impl aya::programs::cgroup_sysctl::CgroupSysctl +pub fn aya::programs::cgroup_sysctl::CgroupSysctl::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::cgroup_sysctl::CgroupSysctl pub fn aya::programs::cgroup_sysctl::CgroupSysctl::info(&self) -> core::result::Result impl aya::programs::cgroup_sysctl::CgroupSysctl pub fn aya::programs::cgroup_sysctl::CgroupSysctl::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::cgroup_sysctl::CgroupSysctl::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::cgroup_sysctl::CgroupSysctl::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::cgroup_sysctl::CgroupSysctl pub fn aya::programs::cgroup_sysctl::CgroupSysctl::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::cgroup_sysctl::CgroupSysctl @@ -7487,30 +8984,34 @@ pub fn aya::programs::cgroup_sysctl::CgroupSysctl::try_from(value: U) -> core::r impl core::convert::TryInto for aya::programs::cgroup_sysctl::CgroupSysctl where U: core::convert::TryFrom pub type aya::programs::cgroup_sysctl::CgroupSysctl::Error = >::Error pub fn aya::programs::cgroup_sysctl::CgroupSysctl::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::cgroup_sysctl::CgroupSysctl where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::cgroup_sysctl::CgroupSysctl where T: 'static + ?core::marker::Sized pub fn aya::programs::cgroup_sysctl::CgroupSysctl::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::cgroup_sysctl::CgroupSysctl where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::cgroup_sysctl::CgroupSysctl where T: ?core::marker::Sized pub fn aya::programs::cgroup_sysctl::CgroupSysctl::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::cgroup_sysctl::CgroupSysctl where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::cgroup_sysctl::CgroupSysctl where T: ?core::marker::Sized pub fn aya::programs::cgroup_sysctl::CgroupSysctl::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::cgroup_sysctl::CgroupSysctl pub fn aya::programs::cgroup_sysctl::CgroupSysctl::from(t: T) -> T pub struct aya::programs::Extension impl aya::programs::extension::Extension +pub const aya::programs::extension::Extension::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::extension::Extension::attach(&mut self) -> core::result::Result pub fn aya::programs::extension::Extension::attach_to_program(&mut self, program: &aya::programs::ProgramFd, func_name: &str) -> core::result::Result -pub fn aya::programs::extension::Extension::detach(&mut self, link_id: aya::programs::extension::ExtensionLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::extension::Extension::load(&mut self, program: aya::programs::ProgramFd, func_name: &str) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::extension::Extension +pub fn aya::programs::extension::Extension::detach(&mut self, link_id: aya::programs::extension::ExtensionLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::extension::Extension::take_link(&mut self, link_id: aya::programs::extension::ExtensionLinkId) -> core::result::Result impl aya::programs::extension::Extension pub fn aya::programs::extension::Extension::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::extension::Extension pub fn aya::programs::extension::Extension::from_pin>(path: P) -> core::result::Result impl aya::programs::extension::Extension +pub fn aya::programs::extension::Extension::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::extension::Extension pub fn aya::programs::extension::Extension::info(&self) -> core::result::Result impl aya::programs::extension::Extension pub fn aya::programs::extension::Extension::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::extension::Extension::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::extension::Extension::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::extension::Extension pub fn aya::programs::extension::Extension::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::extension::Extension @@ -7537,29 +9038,33 @@ pub fn aya::programs::extension::Extension::try_from(value: U) -> core::result:: impl core::convert::TryInto for aya::programs::extension::Extension where U: core::convert::TryFrom pub type aya::programs::extension::Extension::Error = >::Error pub fn aya::programs::extension::Extension::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::extension::Extension where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::extension::Extension where T: 'static + ?core::marker::Sized pub fn aya::programs::extension::Extension::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::extension::Extension where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::extension::Extension where T: ?core::marker::Sized pub fn aya::programs::extension::Extension::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::extension::Extension where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::extension::Extension where T: ?core::marker::Sized pub fn aya::programs::extension::Extension::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::extension::Extension pub fn aya::programs::extension::Extension::from(t: T) -> T pub struct aya::programs::FEntry impl aya::programs::fentry::FEntry +pub const aya::programs::fentry::FEntry::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::fentry::FEntry::attach(&mut self) -> core::result::Result -pub fn aya::programs::fentry::FEntry::detach(&mut self, link_id: aya::programs::fentry::FEntryLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::fentry::FEntry::load(&mut self, fn_name: &str, btf: &aya_obj::btf::btf::Btf) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::fentry::FEntry +pub fn aya::programs::fentry::FEntry::detach(&mut self, link_id: aya::programs::fentry::FEntryLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::fentry::FEntry::take_link(&mut self, link_id: aya::programs::fentry::FEntryLinkId) -> core::result::Result impl aya::programs::fentry::FEntry pub fn aya::programs::fentry::FEntry::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::fentry::FEntry pub fn aya::programs::fentry::FEntry::from_pin>(path: P) -> core::result::Result impl aya::programs::fentry::FEntry +pub unsafe fn aya::programs::fentry::FEntry::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::fentry::FEntry pub fn aya::programs::fentry::FEntry::info(&self) -> core::result::Result impl aya::programs::fentry::FEntry pub fn aya::programs::fentry::FEntry::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::fentry::FEntry::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::fentry::FEntry::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::fentry::FEntry pub fn aya::programs::fentry::FEntry::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::fentry::FEntry @@ -7586,29 +9091,33 @@ pub fn aya::programs::fentry::FEntry::try_from(value: U) -> core::result::Result impl core::convert::TryInto for aya::programs::fentry::FEntry where U: core::convert::TryFrom pub type aya::programs::fentry::FEntry::Error = >::Error pub fn aya::programs::fentry::FEntry::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::fentry::FEntry where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::fentry::FEntry where T: 'static + ?core::marker::Sized pub fn aya::programs::fentry::FEntry::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::fentry::FEntry where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::fentry::FEntry where T: ?core::marker::Sized pub fn aya::programs::fentry::FEntry::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::fentry::FEntry where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::fentry::FEntry where T: ?core::marker::Sized pub fn aya::programs::fentry::FEntry::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::fentry::FEntry pub fn aya::programs::fentry::FEntry::from(t: T) -> T pub struct aya::programs::FExit impl aya::programs::fexit::FExit +pub const aya::programs::fexit::FExit::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::fexit::FExit::attach(&mut self) -> core::result::Result -pub fn aya::programs::fexit::FExit::detach(&mut self, link_id: aya::programs::fexit::FExitLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::fexit::FExit::load(&mut self, fn_name: &str, btf: &aya_obj::btf::btf::Btf) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::fexit::FExit +pub fn aya::programs::fexit::FExit::detach(&mut self, link_id: aya::programs::fexit::FExitLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::fexit::FExit::take_link(&mut self, link_id: aya::programs::fexit::FExitLinkId) -> core::result::Result impl aya::programs::fexit::FExit pub fn aya::programs::fexit::FExit::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::fexit::FExit pub fn aya::programs::fexit::FExit::from_pin>(path: P) -> core::result::Result impl aya::programs::fexit::FExit +pub unsafe fn aya::programs::fexit::FExit::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::fexit::FExit pub fn aya::programs::fexit::FExit::info(&self) -> core::result::Result impl aya::programs::fexit::FExit pub fn aya::programs::fexit::FExit::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::fexit::FExit::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::fexit::FExit::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::fexit::FExit pub fn aya::programs::fexit::FExit::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::fexit::FExit @@ -7635,29 +9144,137 @@ pub fn aya::programs::fexit::FExit::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::programs::fexit::FExit where U: core::convert::TryFrom pub type aya::programs::fexit::FExit::Error = >::Error pub fn aya::programs::fexit::FExit::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::fexit::FExit where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::fexit::FExit where T: 'static + ?core::marker::Sized pub fn aya::programs::fexit::FExit::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::fexit::FExit where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::fexit::FExit where T: ?core::marker::Sized pub fn aya::programs::fexit::FExit::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::fexit::FExit where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::fexit::FExit where T: ?core::marker::Sized pub fn aya::programs::fexit::FExit::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::fexit::FExit pub fn aya::programs::fexit::FExit::from(t: T) -> T +pub struct aya::programs::FlowDissector +impl aya::programs::flow_dissector::FlowDissector +pub const aya::programs::flow_dissector::FlowDissector::PROGRAM_TYPE: aya::programs::ProgramType +pub fn aya::programs::flow_dissector::FlowDissector::attach(&mut self, netns: T) -> core::result::Result +pub fn aya::programs::flow_dissector::FlowDissector::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::flow_dissector::FlowDissector +pub fn aya::programs::flow_dissector::FlowDissector::detach(&mut self, link_id: aya::programs::flow_dissector::FlowDissectorLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub fn aya::programs::flow_dissector::FlowDissector::take_link(&mut self, link_id: aya::programs::flow_dissector::FlowDissectorLinkId) -> core::result::Result +impl aya::programs::flow_dissector::FlowDissector +pub fn aya::programs::flow_dissector::FlowDissector::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> +impl aya::programs::flow_dissector::FlowDissector +pub fn aya::programs::flow_dissector::FlowDissector::from_pin>(path: P) -> core::result::Result +impl aya::programs::flow_dissector::FlowDissector +pub fn aya::programs::flow_dissector::FlowDissector::info(&self) -> core::result::Result +impl aya::programs::flow_dissector::FlowDissector +pub fn aya::programs::flow_dissector::FlowDissector::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::programs::flow_dissector::FlowDissector::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> +impl aya::programs::flow_dissector::FlowDissector +pub fn aya::programs::flow_dissector::FlowDissector::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl core::fmt::Debug for aya::programs::flow_dissector::FlowDissector +pub fn aya::programs::flow_dissector::FlowDissector::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::ops::drop::Drop for aya::programs::flow_dissector::FlowDissector +pub fn aya::programs::flow_dissector::FlowDissector::drop(&mut self) +impl<'a> core::convert::TryFrom<&'a aya::programs::Program> for &'a aya::programs::flow_dissector::FlowDissector +pub type &'a aya::programs::flow_dissector::FlowDissector::Error = aya::programs::ProgramError +pub fn &'a aya::programs::flow_dissector::FlowDissector::try_from(program: &'a aya::programs::Program) -> core::result::Result<&'a aya::programs::flow_dissector::FlowDissector, aya::programs::ProgramError> +impl<'a> core::convert::TryFrom<&'a mut aya::programs::Program> for &'a mut aya::programs::flow_dissector::FlowDissector +pub type &'a mut aya::programs::flow_dissector::FlowDissector::Error = aya::programs::ProgramError +pub fn &'a mut aya::programs::flow_dissector::FlowDissector::try_from(program: &'a mut aya::programs::Program) -> core::result::Result<&'a mut aya::programs::flow_dissector::FlowDissector, aya::programs::ProgramError> +impl core::marker::Freeze for aya::programs::flow_dissector::FlowDissector +impl core::marker::Send for aya::programs::flow_dissector::FlowDissector +impl core::marker::Sync for aya::programs::flow_dissector::FlowDissector +impl core::marker::Unpin for aya::programs::flow_dissector::FlowDissector +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::flow_dissector::FlowDissector +impl core::panic::unwind_safe::UnwindSafe for aya::programs::flow_dissector::FlowDissector +impl core::convert::Into for aya::programs::flow_dissector::FlowDissector where U: core::convert::From +pub fn aya::programs::flow_dissector::FlowDissector::into(self) -> U +impl core::convert::TryFrom for aya::programs::flow_dissector::FlowDissector where U: core::convert::Into +pub type aya::programs::flow_dissector::FlowDissector::Error = core::convert::Infallible +pub fn aya::programs::flow_dissector::FlowDissector::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::flow_dissector::FlowDissector where U: core::convert::TryFrom +pub type aya::programs::flow_dissector::FlowDissector::Error = >::Error +pub fn aya::programs::flow_dissector::FlowDissector::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya::programs::flow_dissector::FlowDissector where T: 'static + ?core::marker::Sized +pub fn aya::programs::flow_dissector::FlowDissector::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::flow_dissector::FlowDissector where T: ?core::marker::Sized +pub fn aya::programs::flow_dissector::FlowDissector::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::flow_dissector::FlowDissector where T: ?core::marker::Sized +pub fn aya::programs::flow_dissector::FlowDissector::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::programs::flow_dissector::FlowDissector +pub fn aya::programs::flow_dissector::FlowDissector::from(t: T) -> T +pub struct aya::programs::Iter +impl aya::programs::iter::Iter +pub const aya::programs::iter::Iter::PROGRAM_TYPE: aya::programs::ProgramType +pub fn aya::programs::iter::Iter::attach(&mut self) -> core::result::Result +pub fn aya::programs::iter::Iter::load(&mut self, iter_type: &str, btf: &aya_obj::btf::btf::Btf) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::iter::Iter +pub fn aya::programs::iter::Iter::detach(&mut self, link_id: aya::programs::iter::IterLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub fn aya::programs::iter::Iter::take_link(&mut self, link_id: aya::programs::iter::IterLinkId) -> core::result::Result +impl aya::programs::iter::Iter +pub fn aya::programs::iter::Iter::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> +impl aya::programs::iter::Iter +pub fn aya::programs::iter::Iter::from_pin>(path: P) -> core::result::Result +impl aya::programs::iter::Iter +pub fn aya::programs::iter::Iter::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::iter::Iter +pub fn aya::programs::iter::Iter::info(&self) -> core::result::Result +impl aya::programs::iter::Iter +pub fn aya::programs::iter::Iter::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::programs::iter::Iter::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> +impl aya::programs::iter::Iter +pub fn aya::programs::iter::Iter::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl core::fmt::Debug for aya::programs::iter::Iter +pub fn aya::programs::iter::Iter::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::ops::drop::Drop for aya::programs::iter::Iter +pub fn aya::programs::iter::Iter::drop(&mut self) +impl<'a> core::convert::TryFrom<&'a aya::programs::Program> for &'a aya::programs::iter::Iter +pub type &'a aya::programs::iter::Iter::Error = aya::programs::ProgramError +pub fn &'a aya::programs::iter::Iter::try_from(program: &'a aya::programs::Program) -> core::result::Result<&'a aya::programs::iter::Iter, aya::programs::ProgramError> +impl<'a> core::convert::TryFrom<&'a mut aya::programs::Program> for &'a mut aya::programs::iter::Iter +pub type &'a mut aya::programs::iter::Iter::Error = aya::programs::ProgramError +pub fn &'a mut aya::programs::iter::Iter::try_from(program: &'a mut aya::programs::Program) -> core::result::Result<&'a mut aya::programs::iter::Iter, aya::programs::ProgramError> +impl core::marker::Freeze for aya::programs::iter::Iter +impl core::marker::Send for aya::programs::iter::Iter +impl core::marker::Sync for aya::programs::iter::Iter +impl core::marker::Unpin for aya::programs::iter::Iter +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::iter::Iter +impl core::panic::unwind_safe::UnwindSafe for aya::programs::iter::Iter +impl core::convert::Into for aya::programs::iter::Iter where U: core::convert::From +pub fn aya::programs::iter::Iter::into(self) -> U +impl core::convert::TryFrom for aya::programs::iter::Iter where U: core::convert::Into +pub type aya::programs::iter::Iter::Error = core::convert::Infallible +pub fn aya::programs::iter::Iter::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::iter::Iter where U: core::convert::TryFrom +pub type aya::programs::iter::Iter::Error = >::Error +pub fn aya::programs::iter::Iter::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya::programs::iter::Iter where T: 'static + ?core::marker::Sized +pub fn aya::programs::iter::Iter::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::iter::Iter where T: ?core::marker::Sized +pub fn aya::programs::iter::Iter::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::iter::Iter where T: ?core::marker::Sized +pub fn aya::programs::iter::Iter::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::programs::iter::Iter +pub fn aya::programs::iter::Iter::from(t: T) -> T pub struct aya::programs::KProbe impl aya::programs::kprobe::KProbe +pub const aya::programs::kprobe::KProbe::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::kprobe::KProbe::attach>(&mut self, fn_name: T, offset: u64) -> core::result::Result -pub fn aya::programs::kprobe::KProbe::detach(&mut self, link_id: aya::programs::kprobe::KProbeLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::kprobe::KProbe::from_pin>(path: P, kind: aya::programs::ProbeKind) -> core::result::Result pub fn aya::programs::kprobe::KProbe::kind(&self) -> aya::programs::ProbeKind pub fn aya::programs::kprobe::KProbe::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::kprobe::KProbe +pub fn aya::programs::kprobe::KProbe::detach(&mut self, link_id: aya::programs::kprobe::KProbeLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::kprobe::KProbe::take_link(&mut self, link_id: aya::programs::kprobe::KProbeLinkId) -> core::result::Result impl aya::programs::kprobe::KProbe pub fn aya::programs::kprobe::KProbe::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::kprobe::KProbe +pub unsafe fn aya::programs::kprobe::KProbe::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>, kind: aya::programs::ProbeKind) -> core::result::Result +impl aya::programs::kprobe::KProbe pub fn aya::programs::kprobe::KProbe::info(&self) -> core::result::Result impl aya::programs::kprobe::KProbe pub fn aya::programs::kprobe::KProbe::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::kprobe::KProbe::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::kprobe::KProbe::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::kprobe::KProbe pub fn aya::programs::kprobe::KProbe::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::kprobe::KProbe @@ -7684,16 +9301,53 @@ pub fn aya::programs::kprobe::KProbe::try_from(value: U) -> core::result::Result impl core::convert::TryInto for aya::programs::kprobe::KProbe where U: core::convert::TryFrom pub type aya::programs::kprobe::KProbe::Error = >::Error pub fn aya::programs::kprobe::KProbe::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::kprobe::KProbe where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::kprobe::KProbe where T: 'static + ?core::marker::Sized pub fn aya::programs::kprobe::KProbe::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::kprobe::KProbe where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::kprobe::KProbe where T: ?core::marker::Sized pub fn aya::programs::kprobe::KProbe::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::kprobe::KProbe where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::kprobe::KProbe where T: ?core::marker::Sized pub fn aya::programs::kprobe::KProbe::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::kprobe::KProbe pub fn aya::programs::kprobe::KProbe::from(t: T) -> T +pub struct aya::programs::LinkOrder +impl aya::programs::links::LinkOrder +pub fn aya::programs::links::LinkOrder::after_link(link: &L) -> core::result::Result +pub fn aya::programs::links::LinkOrder::after_program(program: &P) -> core::result::Result +pub fn aya::programs::links::LinkOrder::after_program_id(id: aya::programs::ProgramId) -> Self +pub fn aya::programs::links::LinkOrder::before_link(link: &L) -> core::result::Result +pub fn aya::programs::links::LinkOrder::before_program(program: &P) -> core::result::Result +pub fn aya::programs::links::LinkOrder::before_program_id(id: aya::programs::ProgramId) -> Self +pub fn aya::programs::links::LinkOrder::first() -> Self +pub fn aya::programs::links::LinkOrder::last() -> Self +impl core::default::Default for aya::programs::links::LinkOrder +pub fn aya::programs::links::LinkOrder::default() -> Self +impl core::fmt::Debug for aya::programs::links::LinkOrder +pub fn aya::programs::links::LinkOrder::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Freeze for aya::programs::links::LinkOrder +impl core::marker::Send for aya::programs::links::LinkOrder +impl core::marker::Sync for aya::programs::links::LinkOrder +impl core::marker::Unpin for aya::programs::links::LinkOrder +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::links::LinkOrder +impl core::panic::unwind_safe::UnwindSafe for aya::programs::links::LinkOrder +impl core::convert::Into for aya::programs::links::LinkOrder where U: core::convert::From +pub fn aya::programs::links::LinkOrder::into(self) -> U +impl core::convert::TryFrom for aya::programs::links::LinkOrder where U: core::convert::Into +pub type aya::programs::links::LinkOrder::Error = core::convert::Infallible +pub fn aya::programs::links::LinkOrder::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::links::LinkOrder where U: core::convert::TryFrom +pub type aya::programs::links::LinkOrder::Error = >::Error +pub fn aya::programs::links::LinkOrder::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya::programs::links::LinkOrder where T: 'static + ?core::marker::Sized +pub fn aya::programs::links::LinkOrder::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::links::LinkOrder where T: ?core::marker::Sized +pub fn aya::programs::links::LinkOrder::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::links::LinkOrder where T: ?core::marker::Sized +pub fn aya::programs::links::LinkOrder::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::programs::links::LinkOrder +pub fn aya::programs::links::LinkOrder::from(t: T) -> T pub struct aya::programs::LircMode2 impl aya::programs::lirc_mode2::LircMode2 +pub const aya::programs::lirc_mode2::LircMode2::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::lirc_mode2::LircMode2::attach(&mut self, lircdev: T) -> core::result::Result pub fn aya::programs::lirc_mode2::LircMode2::detach(&mut self, link_id: aya::programs::lirc_mode2::LircLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::lirc_mode2::LircMode2::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> @@ -7704,10 +9358,12 @@ pub fn aya::programs::lirc_mode2::LircMode2::fd(&self) -> core::result::Result<& impl aya::programs::lirc_mode2::LircMode2 pub fn aya::programs::lirc_mode2::LircMode2::from_pin>(path: P) -> core::result::Result impl aya::programs::lirc_mode2::LircMode2 +pub fn aya::programs::lirc_mode2::LircMode2::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::lirc_mode2::LircMode2 pub fn aya::programs::lirc_mode2::LircMode2::info(&self) -> core::result::Result impl aya::programs::lirc_mode2::LircMode2 pub fn aya::programs::lirc_mode2::LircMode2::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::lirc_mode2::LircMode2::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::lirc_mode2::LircMode2::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::lirc_mode2::LircMode2 pub fn aya::programs::lirc_mode2::LircMode2::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::lirc_mode2::LircMode2 @@ -7734,29 +9390,33 @@ pub fn aya::programs::lirc_mode2::LircMode2::try_from(value: U) -> core::result: impl core::convert::TryInto for aya::programs::lirc_mode2::LircMode2 where U: core::convert::TryFrom pub type aya::programs::lirc_mode2::LircMode2::Error = >::Error pub fn aya::programs::lirc_mode2::LircMode2::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::lirc_mode2::LircMode2 where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::lirc_mode2::LircMode2 where T: 'static + ?core::marker::Sized pub fn aya::programs::lirc_mode2::LircMode2::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::lirc_mode2::LircMode2 where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::lirc_mode2::LircMode2 where T: ?core::marker::Sized pub fn aya::programs::lirc_mode2::LircMode2::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::lirc_mode2::LircMode2 where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::lirc_mode2::LircMode2 where T: ?core::marker::Sized pub fn aya::programs::lirc_mode2::LircMode2::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::lirc_mode2::LircMode2 pub fn aya::programs::lirc_mode2::LircMode2::from(t: T) -> T pub struct aya::programs::Lsm impl aya::programs::lsm::Lsm +pub const aya::programs::lsm::Lsm::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::lsm::Lsm::attach(&mut self) -> core::result::Result -pub fn aya::programs::lsm::Lsm::detach(&mut self, link_id: aya::programs::lsm::LsmLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::lsm::Lsm::load(&mut self, lsm_hook_name: &str, btf: &aya_obj::btf::btf::Btf) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::lsm::Lsm +pub fn aya::programs::lsm::Lsm::detach(&mut self, link_id: aya::programs::lsm::LsmLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::lsm::Lsm::take_link(&mut self, link_id: aya::programs::lsm::LsmLinkId) -> core::result::Result impl aya::programs::lsm::Lsm pub fn aya::programs::lsm::Lsm::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::lsm::Lsm pub fn aya::programs::lsm::Lsm::from_pin>(path: P) -> core::result::Result impl aya::programs::lsm::Lsm +pub fn aya::programs::lsm::Lsm::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::lsm::Lsm pub fn aya::programs::lsm::Lsm::info(&self) -> core::result::Result impl aya::programs::lsm::Lsm pub fn aya::programs::lsm::Lsm::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::lsm::Lsm::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::lsm::Lsm::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::lsm::Lsm pub fn aya::programs::lsm::Lsm::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::lsm::Lsm @@ -7783,29 +9443,82 @@ pub fn aya::programs::lsm::Lsm::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::programs::lsm::Lsm where U: core::convert::TryFrom pub type aya::programs::lsm::Lsm::Error = >::Error pub fn aya::programs::lsm::Lsm::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::lsm::Lsm where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::lsm::Lsm where T: 'static + ?core::marker::Sized pub fn aya::programs::lsm::Lsm::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::lsm::Lsm where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::lsm::Lsm where T: ?core::marker::Sized pub fn aya::programs::lsm::Lsm::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::lsm::Lsm where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::lsm::Lsm where T: ?core::marker::Sized pub fn aya::programs::lsm::Lsm::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::lsm::Lsm pub fn aya::programs::lsm::Lsm::from(t: T) -> T +pub struct aya::programs::LsmCgroup +impl aya::programs::lsm_cgroup::LsmCgroup +pub fn aya::programs::lsm_cgroup::LsmCgroup::attach(&mut self, cgroup: T) -> core::result::Result +pub fn aya::programs::lsm_cgroup::LsmCgroup::from_pin>(path: P) -> core::result::Result +pub fn aya::programs::lsm_cgroup::LsmCgroup::load(&mut self, lsm_hook_name: &str, btf: &aya_obj::btf::btf::Btf) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::lsm_cgroup::LsmCgroup +pub fn aya::programs::lsm_cgroup::LsmCgroup::detach(&mut self, link_id: aya::programs::lsm_cgroup::LsmLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub fn aya::programs::lsm_cgroup::LsmCgroup::take_link(&mut self, link_id: aya::programs::lsm_cgroup::LsmLinkId) -> core::result::Result +impl aya::programs::lsm_cgroup::LsmCgroup +pub fn aya::programs::lsm_cgroup::LsmCgroup::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> +impl aya::programs::lsm_cgroup::LsmCgroup +pub fn aya::programs::lsm_cgroup::LsmCgroup::info(&self) -> core::result::Result +impl aya::programs::lsm_cgroup::LsmCgroup +pub fn aya::programs::lsm_cgroup::LsmCgroup::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::programs::lsm_cgroup::LsmCgroup::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> +impl aya::programs::lsm_cgroup::LsmCgroup +pub fn aya::programs::lsm_cgroup::LsmCgroup::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl core::fmt::Debug for aya::programs::lsm_cgroup::LsmCgroup +pub fn aya::programs::lsm_cgroup::LsmCgroup::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::ops::drop::Drop for aya::programs::lsm_cgroup::LsmCgroup +pub fn aya::programs::lsm_cgroup::LsmCgroup::drop(&mut self) +impl<'a> core::convert::TryFrom<&'a aya::programs::Program> for &'a aya::programs::lsm_cgroup::LsmCgroup +pub type &'a aya::programs::lsm_cgroup::LsmCgroup::Error = aya::programs::ProgramError +pub fn &'a aya::programs::lsm_cgroup::LsmCgroup::try_from(program: &'a aya::programs::Program) -> core::result::Result<&'a aya::programs::lsm_cgroup::LsmCgroup, aya::programs::ProgramError> +impl<'a> core::convert::TryFrom<&'a mut aya::programs::Program> for &'a mut aya::programs::lsm_cgroup::LsmCgroup +pub type &'a mut aya::programs::lsm_cgroup::LsmCgroup::Error = aya::programs::ProgramError +pub fn &'a mut aya::programs::lsm_cgroup::LsmCgroup::try_from(program: &'a mut aya::programs::Program) -> core::result::Result<&'a mut aya::programs::lsm_cgroup::LsmCgroup, aya::programs::ProgramError> +impl core::marker::Freeze for aya::programs::lsm_cgroup::LsmCgroup +impl core::marker::Send for aya::programs::lsm_cgroup::LsmCgroup +impl core::marker::Sync for aya::programs::lsm_cgroup::LsmCgroup +impl core::marker::Unpin for aya::programs::lsm_cgroup::LsmCgroup +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::lsm_cgroup::LsmCgroup +impl core::panic::unwind_safe::UnwindSafe for aya::programs::lsm_cgroup::LsmCgroup +impl core::convert::Into for aya::programs::lsm_cgroup::LsmCgroup where U: core::convert::From +pub fn aya::programs::lsm_cgroup::LsmCgroup::into(self) -> U +impl core::convert::TryFrom for aya::programs::lsm_cgroup::LsmCgroup where U: core::convert::Into +pub type aya::programs::lsm_cgroup::LsmCgroup::Error = core::convert::Infallible +pub fn aya::programs::lsm_cgroup::LsmCgroup::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::lsm_cgroup::LsmCgroup where U: core::convert::TryFrom +pub type aya::programs::lsm_cgroup::LsmCgroup::Error = >::Error +pub fn aya::programs::lsm_cgroup::LsmCgroup::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya::programs::lsm_cgroup::LsmCgroup where T: 'static + ?core::marker::Sized +pub fn aya::programs::lsm_cgroup::LsmCgroup::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::lsm_cgroup::LsmCgroup where T: ?core::marker::Sized +pub fn aya::programs::lsm_cgroup::LsmCgroup::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::lsm_cgroup::LsmCgroup where T: ?core::marker::Sized +pub fn aya::programs::lsm_cgroup::LsmCgroup::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::programs::lsm_cgroup::LsmCgroup +pub fn aya::programs::lsm_cgroup::LsmCgroup::from(t: T) -> T pub struct aya::programs::PerfEvent impl aya::programs::perf_event::PerfEvent -pub fn aya::programs::perf_event::PerfEvent::attach(&mut self, perf_type: aya::programs::perf_event::PerfTypeId, config: u64, scope: aya::programs::perf_event::PerfEventScope, sample_policy: aya::programs::perf_event::SamplePolicy, inherit: bool) -> core::result::Result -pub fn aya::programs::perf_event::PerfEvent::detach(&mut self, link_id: aya::programs::perf_event::PerfEventLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub const aya::programs::perf_event::PerfEvent::PROGRAM_TYPE: aya::programs::ProgramType +pub fn aya::programs::perf_event::PerfEvent::attach(&mut self, config: aya::programs::perf_event::PerfEventConfig, scope: aya::programs::perf_event::PerfEventScope, sample_policy: aya::programs::perf_event::SamplePolicy, inherit: bool) -> core::result::Result pub fn aya::programs::perf_event::PerfEvent::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::perf_event::PerfEvent +pub fn aya::programs::perf_event::PerfEvent::detach(&mut self, link_id: aya::programs::perf_event::PerfEventLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::perf_event::PerfEvent::take_link(&mut self, link_id: aya::programs::perf_event::PerfEventLinkId) -> core::result::Result impl aya::programs::perf_event::PerfEvent pub fn aya::programs::perf_event::PerfEvent::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::perf_event::PerfEvent pub fn aya::programs::perf_event::PerfEvent::from_pin>(path: P) -> core::result::Result impl aya::programs::perf_event::PerfEvent +pub fn aya::programs::perf_event::PerfEvent::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::perf_event::PerfEvent pub fn aya::programs::perf_event::PerfEvent::info(&self) -> core::result::Result impl aya::programs::perf_event::PerfEvent pub fn aya::programs::perf_event::PerfEvent::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::perf_event::PerfEvent::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::perf_event::PerfEvent::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::perf_event::PerfEvent pub fn aya::programs::perf_event::PerfEvent::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::perf_event::PerfEvent @@ -7832,11 +9545,11 @@ pub fn aya::programs::perf_event::PerfEvent::try_from(value: U) -> core::result: impl core::convert::TryInto for aya::programs::perf_event::PerfEvent where U: core::convert::TryFrom pub type aya::programs::perf_event::PerfEvent::Error = >::Error pub fn aya::programs::perf_event::PerfEvent::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::perf_event::PerfEvent where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::perf_event::PerfEvent where T: 'static + ?core::marker::Sized pub fn aya::programs::perf_event::PerfEvent::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::perf_event::PerfEvent where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::perf_event::PerfEvent where T: ?core::marker::Sized pub fn aya::programs::perf_event::PerfEvent::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::perf_event::PerfEvent where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::perf_event::PerfEvent where T: ?core::marker::Sized pub fn aya::programs::perf_event::PerfEvent::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::perf_event::PerfEvent pub fn aya::programs::perf_event::PerfEvent::from(t: T) -> T @@ -7861,31 +9574,59 @@ pub fn aya::programs::ProgramFd::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::programs::ProgramFd where U: core::convert::TryFrom pub type aya::programs::ProgramFd::Error = >::Error pub fn aya::programs::ProgramFd::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::ProgramFd where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::ProgramFd where T: 'static + ?core::marker::Sized pub fn aya::programs::ProgramFd::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::ProgramFd where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::ProgramFd where T: ?core::marker::Sized pub fn aya::programs::ProgramFd::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::ProgramFd where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::ProgramFd where T: ?core::marker::Sized pub fn aya::programs::ProgramFd::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::ProgramFd pub fn aya::programs::ProgramFd::from(t: T) -> T +pub struct aya::programs::ProgramId(_) +impl aya::programs::ProgramId +pub unsafe fn aya::programs::ProgramId::new(id: u32) -> Self +impl core::marker::Freeze for aya::programs::ProgramId +impl core::marker::Send for aya::programs::ProgramId +impl core::marker::Sync for aya::programs::ProgramId +impl core::marker::Unpin for aya::programs::ProgramId +impl core::panic::unwind_safe::RefUnwindSafe for aya::programs::ProgramId +impl core::panic::unwind_safe::UnwindSafe for aya::programs::ProgramId +impl core::convert::Into for aya::programs::ProgramId where U: core::convert::From +pub fn aya::programs::ProgramId::into(self) -> U +impl core::convert::TryFrom for aya::programs::ProgramId where U: core::convert::Into +pub type aya::programs::ProgramId::Error = core::convert::Infallible +pub fn aya::programs::ProgramId::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::programs::ProgramId where U: core::convert::TryFrom +pub type aya::programs::ProgramId::Error = >::Error +pub fn aya::programs::ProgramId::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya::programs::ProgramId where T: 'static + ?core::marker::Sized +pub fn aya::programs::ProgramId::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::programs::ProgramId where T: ?core::marker::Sized +pub fn aya::programs::ProgramId::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::programs::ProgramId where T: ?core::marker::Sized +pub fn aya::programs::ProgramId::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::programs::ProgramId +pub fn aya::programs::ProgramId::from(t: T) -> T pub struct aya::programs::ProgramInfo(_) impl aya::programs::ProgramInfo -pub fn aya::programs::ProgramInfo::btf_id(&self) -> core::option::Option +pub fn aya::programs::ProgramInfo::btf_id(&self) -> core::option::Option +pub fn aya::programs::ProgramInfo::created_by_uid(&self) -> core::option::Option pub fn aya::programs::ProgramInfo::fd(&self) -> core::result::Result pub fn aya::programs::ProgramInfo::from_pin>(path: P) -> core::result::Result -pub fn aya::programs::ProgramInfo::gpl_compatible(&self) -> bool +pub fn aya::programs::ProgramInfo::gpl_compatible(&self) -> core::option::Option pub fn aya::programs::ProgramInfo::id(&self) -> u32 -pub fn aya::programs::ProgramInfo::loaded_at(&self) -> std::time::SystemTime -pub fn aya::programs::ProgramInfo::map_ids(&self) -> core::result::Result, aya::programs::ProgramError> +pub fn aya::programs::ProgramInfo::loaded_at(&self) -> core::option::Option +pub fn aya::programs::ProgramInfo::map_ids(&self) -> core::result::Result>, aya::programs::ProgramError> pub fn aya::programs::ProgramInfo::memory_locked(&self) -> core::result::Result pub fn aya::programs::ProgramInfo::name(&self) -> &[u8] pub fn aya::programs::ProgramInfo::name_as_str(&self) -> core::option::Option<&str> -pub fn aya::programs::ProgramInfo::program_type(&self) -> u32 +pub fn aya::programs::ProgramInfo::program_type(&self) -> aya_obj::generated::linux_bindings_x86_64::bpf_prog_type +pub fn aya::programs::ProgramInfo::run_count(&self) -> u64 +pub fn aya::programs::ProgramInfo::run_time(&self) -> core::time::Duration pub fn aya::programs::ProgramInfo::size_jitted(&self) -> u32 -pub fn aya::programs::ProgramInfo::size_translated(&self) -> u32 +pub fn aya::programs::ProgramInfo::size_translated(&self) -> core::option::Option pub fn aya::programs::ProgramInfo::tag(&self) -> u64 -pub fn aya::programs::ProgramInfo::verified_instruction_count(&self) -> u32 +pub fn aya::programs::ProgramInfo::verified_instruction_count(&self) -> core::option::Option impl core::fmt::Debug for aya::programs::ProgramInfo pub fn aya::programs::ProgramInfo::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result impl core::marker::Freeze for aya::programs::ProgramInfo @@ -7902,29 +9643,33 @@ pub fn aya::programs::ProgramInfo::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::programs::ProgramInfo where U: core::convert::TryFrom pub type aya::programs::ProgramInfo::Error = >::Error pub fn aya::programs::ProgramInfo::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::ProgramInfo where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::ProgramInfo where T: 'static + ?core::marker::Sized pub fn aya::programs::ProgramInfo::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::ProgramInfo where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::ProgramInfo where T: ?core::marker::Sized pub fn aya::programs::ProgramInfo::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::ProgramInfo where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::ProgramInfo where T: ?core::marker::Sized pub fn aya::programs::ProgramInfo::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::ProgramInfo pub fn aya::programs::ProgramInfo::from(t: T) -> T pub struct aya::programs::RawTracePoint impl aya::programs::raw_trace_point::RawTracePoint +pub const aya::programs::raw_trace_point::RawTracePoint::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::raw_trace_point::RawTracePoint::attach(&mut self, tp_name: &str) -> core::result::Result -pub fn aya::programs::raw_trace_point::RawTracePoint::detach(&mut self, link_id: aya::programs::raw_trace_point::RawTracePointLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::raw_trace_point::RawTracePoint::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::raw_trace_point::RawTracePoint +pub fn aya::programs::raw_trace_point::RawTracePoint::detach(&mut self, link_id: aya::programs::raw_trace_point::RawTracePointLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::raw_trace_point::RawTracePoint::take_link(&mut self, link_id: aya::programs::raw_trace_point::RawTracePointLinkId) -> core::result::Result impl aya::programs::raw_trace_point::RawTracePoint pub fn aya::programs::raw_trace_point::RawTracePoint::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::raw_trace_point::RawTracePoint pub fn aya::programs::raw_trace_point::RawTracePoint::from_pin>(path: P) -> core::result::Result impl aya::programs::raw_trace_point::RawTracePoint +pub fn aya::programs::raw_trace_point::RawTracePoint::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::raw_trace_point::RawTracePoint pub fn aya::programs::raw_trace_point::RawTracePoint::info(&self) -> core::result::Result impl aya::programs::raw_trace_point::RawTracePoint pub fn aya::programs::raw_trace_point::RawTracePoint::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::raw_trace_point::RawTracePoint::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::raw_trace_point::RawTracePoint::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::raw_trace_point::RawTracePoint pub fn aya::programs::raw_trace_point::RawTracePoint::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::raw_trace_point::RawTracePoint @@ -7951,32 +9696,39 @@ pub fn aya::programs::raw_trace_point::RawTracePoint::try_from(value: U) -> core impl core::convert::TryInto for aya::programs::raw_trace_point::RawTracePoint where U: core::convert::TryFrom pub type aya::programs::raw_trace_point::RawTracePoint::Error = >::Error pub fn aya::programs::raw_trace_point::RawTracePoint::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::raw_trace_point::RawTracePoint where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::raw_trace_point::RawTracePoint where T: 'static + ?core::marker::Sized pub fn aya::programs::raw_trace_point::RawTracePoint::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::raw_trace_point::RawTracePoint where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::raw_trace_point::RawTracePoint where T: ?core::marker::Sized pub fn aya::programs::raw_trace_point::RawTracePoint::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::raw_trace_point::RawTracePoint where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::raw_trace_point::RawTracePoint where T: ?core::marker::Sized pub fn aya::programs::raw_trace_point::RawTracePoint::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::raw_trace_point::RawTracePoint pub fn aya::programs::raw_trace_point::RawTracePoint::from(t: T) -> T pub struct aya::programs::SchedClassifier impl aya::programs::tc::SchedClassifier +pub const aya::programs::tc::SchedClassifier::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::tc::SchedClassifier::attach(&mut self, interface: &str, attach_type: aya::programs::tc::TcAttachType) -> core::result::Result pub fn aya::programs::tc::SchedClassifier::attach_to_link(&mut self, link: aya::programs::tc::SchedClassifierLink) -> core::result::Result -pub fn aya::programs::tc::SchedClassifier::attach_with_options(&mut self, interface: &str, attach_type: aya::programs::tc::TcAttachType, options: aya::programs::tc::TcOptions) -> core::result::Result -pub fn aya::programs::tc::SchedClassifier::detach(&mut self, link_id: aya::programs::tc::SchedClassifierLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub fn aya::programs::tc::SchedClassifier::attach_with_options(&mut self, interface: &str, attach_type: aya::programs::tc::TcAttachType, options: aya::programs::tc::TcAttachOptions) -> core::result::Result pub fn aya::programs::tc::SchedClassifier::from_pin>(path: P) -> core::result::Result pub fn aya::programs::tc::SchedClassifier::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +pub fn aya::programs::tc::SchedClassifier::query_tcx(interface: &str, attach_type: aya::programs::tc::TcAttachType) -> core::result::Result<(u64, alloc::vec::Vec), aya::programs::ProgramError> +impl aya::programs::tc::SchedClassifier +pub fn aya::programs::tc::SchedClassifier::detach(&mut self, link_id: aya::programs::tc::SchedClassifierLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::tc::SchedClassifier::take_link(&mut self, link_id: aya::programs::tc::SchedClassifierLinkId) -> core::result::Result impl aya::programs::tc::SchedClassifier pub fn aya::programs::tc::SchedClassifier::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::tc::SchedClassifier +pub fn aya::programs::tc::SchedClassifier::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::tc::SchedClassifier pub fn aya::programs::tc::SchedClassifier::info(&self) -> core::result::Result impl aya::programs::tc::SchedClassifier pub fn aya::programs::tc::SchedClassifier::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::tc::SchedClassifier::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::tc::SchedClassifier::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::tc::SchedClassifier pub fn aya::programs::tc::SchedClassifier::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::MultiProgram for aya::programs::tc::SchedClassifier +pub fn aya::programs::tc::SchedClassifier::fd(&self) -> core::result::Result, aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::tc::SchedClassifier pub fn aya::programs::tc::SchedClassifier::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result impl core::ops::drop::Drop for aya::programs::tc::SchedClassifier @@ -8001,29 +9753,33 @@ pub fn aya::programs::tc::SchedClassifier::try_from(value: U) -> core::result::R impl core::convert::TryInto for aya::programs::tc::SchedClassifier where U: core::convert::TryFrom pub type aya::programs::tc::SchedClassifier::Error = >::Error pub fn aya::programs::tc::SchedClassifier::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::tc::SchedClassifier where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::tc::SchedClassifier where T: 'static + ?core::marker::Sized pub fn aya::programs::tc::SchedClassifier::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::tc::SchedClassifier where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::tc::SchedClassifier where T: ?core::marker::Sized pub fn aya::programs::tc::SchedClassifier::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::tc::SchedClassifier where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::tc::SchedClassifier where T: ?core::marker::Sized pub fn aya::programs::tc::SchedClassifier::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::tc::SchedClassifier pub fn aya::programs::tc::SchedClassifier::from(t: T) -> T pub struct aya::programs::SkLookup impl aya::programs::sk_lookup::SkLookup +pub const aya::programs::sk_lookup::SkLookup::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::sk_lookup::SkLookup::attach(&mut self, netns: T) -> core::result::Result -pub fn aya::programs::sk_lookup::SkLookup::detach(&mut self, link_id: aya::programs::sk_lookup::SkLookupLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::sk_lookup::SkLookup::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::sk_lookup::SkLookup +pub fn aya::programs::sk_lookup::SkLookup::detach(&mut self, link_id: aya::programs::sk_lookup::SkLookupLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::sk_lookup::SkLookup::take_link(&mut self, link_id: aya::programs::sk_lookup::SkLookupLinkId) -> core::result::Result impl aya::programs::sk_lookup::SkLookup pub fn aya::programs::sk_lookup::SkLookup::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::sk_lookup::SkLookup pub fn aya::programs::sk_lookup::SkLookup::from_pin>(path: P) -> core::result::Result impl aya::programs::sk_lookup::SkLookup +pub fn aya::programs::sk_lookup::SkLookup::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::sk_lookup::SkLookup pub fn aya::programs::sk_lookup::SkLookup::info(&self) -> core::result::Result impl aya::programs::sk_lookup::SkLookup pub fn aya::programs::sk_lookup::SkLookup::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::sk_lookup::SkLookup::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::sk_lookup::SkLookup::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::sk_lookup::SkLookup pub fn aya::programs::sk_lookup::SkLookup::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::sk_lookup::SkLookup @@ -8050,29 +9806,33 @@ pub fn aya::programs::sk_lookup::SkLookup::try_from(value: U) -> core::result::R impl core::convert::TryInto for aya::programs::sk_lookup::SkLookup where U: core::convert::TryFrom pub type aya::programs::sk_lookup::SkLookup::Error = >::Error pub fn aya::programs::sk_lookup::SkLookup::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::sk_lookup::SkLookup where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::sk_lookup::SkLookup where T: 'static + ?core::marker::Sized pub fn aya::programs::sk_lookup::SkLookup::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::sk_lookup::SkLookup where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::sk_lookup::SkLookup where T: ?core::marker::Sized pub fn aya::programs::sk_lookup::SkLookup::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::sk_lookup::SkLookup where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::sk_lookup::SkLookup where T: ?core::marker::Sized pub fn aya::programs::sk_lookup::SkLookup::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::sk_lookup::SkLookup pub fn aya::programs::sk_lookup::SkLookup::from(t: T) -> T pub struct aya::programs::SkMsg impl aya::programs::sk_msg::SkMsg +pub const aya::programs::sk_msg::SkMsg::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::sk_msg::SkMsg::attach(&mut self, map: &aya::maps::sock::SockMapFd) -> core::result::Result -pub fn aya::programs::sk_msg::SkMsg::detach(&mut self, link_id: aya::programs::sk_msg::SkMsgLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::sk_msg::SkMsg::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::sk_msg::SkMsg +pub fn aya::programs::sk_msg::SkMsg::detach(&mut self, link_id: aya::programs::sk_msg::SkMsgLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::sk_msg::SkMsg::take_link(&mut self, link_id: aya::programs::sk_msg::SkMsgLinkId) -> core::result::Result impl aya::programs::sk_msg::SkMsg pub fn aya::programs::sk_msg::SkMsg::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::sk_msg::SkMsg pub fn aya::programs::sk_msg::SkMsg::from_pin>(path: P) -> core::result::Result impl aya::programs::sk_msg::SkMsg +pub fn aya::programs::sk_msg::SkMsg::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::sk_msg::SkMsg pub fn aya::programs::sk_msg::SkMsg::info(&self) -> core::result::Result impl aya::programs::sk_msg::SkMsg pub fn aya::programs::sk_msg::SkMsg::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::sk_msg::SkMsg::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::sk_msg::SkMsg::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::sk_msg::SkMsg pub fn aya::programs::sk_msg::SkMsg::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::sk_msg::SkMsg @@ -8099,28 +9859,32 @@ pub fn aya::programs::sk_msg::SkMsg::try_from(value: U) -> core::result::Result< impl core::convert::TryInto for aya::programs::sk_msg::SkMsg where U: core::convert::TryFrom pub type aya::programs::sk_msg::SkMsg::Error = >::Error pub fn aya::programs::sk_msg::SkMsg::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::sk_msg::SkMsg where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::sk_msg::SkMsg where T: 'static + ?core::marker::Sized pub fn aya::programs::sk_msg::SkMsg::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::sk_msg::SkMsg where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::sk_msg::SkMsg where T: ?core::marker::Sized pub fn aya::programs::sk_msg::SkMsg::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::sk_msg::SkMsg where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::sk_msg::SkMsg where T: ?core::marker::Sized pub fn aya::programs::sk_msg::SkMsg::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::sk_msg::SkMsg pub fn aya::programs::sk_msg::SkMsg::from(t: T) -> T pub struct aya::programs::SkSkb impl aya::programs::sk_skb::SkSkb +pub const aya::programs::sk_skb::SkSkb::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::sk_skb::SkSkb::attach(&mut self, map: &aya::maps::sock::SockMapFd) -> core::result::Result -pub fn aya::programs::sk_skb::SkSkb::detach(&mut self, link_id: aya::programs::sk_skb::SkSkbLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::sk_skb::SkSkb::from_pin>(path: P, kind: aya::programs::sk_skb::SkSkbKind) -> core::result::Result pub fn aya::programs::sk_skb::SkSkb::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::sk_skb::SkSkb +pub fn aya::programs::sk_skb::SkSkb::detach(&mut self, link_id: aya::programs::sk_skb::SkSkbLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::sk_skb::SkSkb::take_link(&mut self, link_id: aya::programs::sk_skb::SkSkbLinkId) -> core::result::Result impl aya::programs::sk_skb::SkSkb pub fn aya::programs::sk_skb::SkSkb::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::sk_skb::SkSkb +pub fn aya::programs::sk_skb::SkSkb::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>, kind: aya::programs::sk_skb::SkSkbKind) -> core::result::Result +impl aya::programs::sk_skb::SkSkb pub fn aya::programs::sk_skb::SkSkb::info(&self) -> core::result::Result impl aya::programs::sk_skb::SkSkb pub fn aya::programs::sk_skb::SkSkb::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::sk_skb::SkSkb::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::sk_skb::SkSkb::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::sk_skb::SkSkb pub fn aya::programs::sk_skb::SkSkb::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::sk_skb::SkSkb @@ -8147,29 +9911,33 @@ pub fn aya::programs::sk_skb::SkSkb::try_from(value: U) -> core::result::Result< impl core::convert::TryInto for aya::programs::sk_skb::SkSkb where U: core::convert::TryFrom pub type aya::programs::sk_skb::SkSkb::Error = >::Error pub fn aya::programs::sk_skb::SkSkb::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::sk_skb::SkSkb where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::sk_skb::SkSkb where T: 'static + ?core::marker::Sized pub fn aya::programs::sk_skb::SkSkb::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::sk_skb::SkSkb where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::sk_skb::SkSkb where T: ?core::marker::Sized pub fn aya::programs::sk_skb::SkSkb::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::sk_skb::SkSkb where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::sk_skb::SkSkb where T: ?core::marker::Sized pub fn aya::programs::sk_skb::SkSkb::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::sk_skb::SkSkb pub fn aya::programs::sk_skb::SkSkb::from(t: T) -> T pub struct aya::programs::SockOps impl aya::programs::sock_ops::SockOps -pub fn aya::programs::sock_ops::SockOps::attach(&mut self, cgroup: T) -> core::result::Result -pub fn aya::programs::sock_ops::SockOps::detach(&mut self, link_id: aya::programs::sock_ops::SockOpsLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub const aya::programs::sock_ops::SockOps::PROGRAM_TYPE: aya::programs::ProgramType +pub fn aya::programs::sock_ops::SockOps::attach(&mut self, cgroup: T, mode: aya::programs::links::CgroupAttachMode) -> core::result::Result pub fn aya::programs::sock_ops::SockOps::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::sock_ops::SockOps +pub fn aya::programs::sock_ops::SockOps::detach(&mut self, link_id: aya::programs::sock_ops::SockOpsLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::sock_ops::SockOps::take_link(&mut self, link_id: aya::programs::sock_ops::SockOpsLinkId) -> core::result::Result impl aya::programs::sock_ops::SockOps pub fn aya::programs::sock_ops::SockOps::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::sock_ops::SockOps pub fn aya::programs::sock_ops::SockOps::from_pin>(path: P) -> core::result::Result impl aya::programs::sock_ops::SockOps +pub fn aya::programs::sock_ops::SockOps::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::sock_ops::SockOps pub fn aya::programs::sock_ops::SockOps::info(&self) -> core::result::Result impl aya::programs::sock_ops::SockOps pub fn aya::programs::sock_ops::SockOps::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::sock_ops::SockOps::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::sock_ops::SockOps::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::sock_ops::SockOps pub fn aya::programs::sock_ops::SockOps::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::sock_ops::SockOps @@ -8196,16 +9964,17 @@ pub fn aya::programs::sock_ops::SockOps::try_from(value: U) -> core::result::Res impl core::convert::TryInto for aya::programs::sock_ops::SockOps where U: core::convert::TryFrom pub type aya::programs::sock_ops::SockOps::Error = >::Error pub fn aya::programs::sock_ops::SockOps::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::sock_ops::SockOps where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::sock_ops::SockOps where T: 'static + ?core::marker::Sized pub fn aya::programs::sock_ops::SockOps::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::sock_ops::SockOps where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::sock_ops::SockOps where T: ?core::marker::Sized pub fn aya::programs::sock_ops::SockOps::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::sock_ops::SockOps where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::sock_ops::SockOps where T: ?core::marker::Sized pub fn aya::programs::sock_ops::SockOps::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::sock_ops::SockOps pub fn aya::programs::sock_ops::SockOps::from(t: T) -> T pub struct aya::programs::SocketFilter impl aya::programs::socket_filter::SocketFilter +pub const aya::programs::socket_filter::SocketFilter::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::socket_filter::SocketFilter::attach(&mut self, socket: T) -> core::result::Result pub fn aya::programs::socket_filter::SocketFilter::detach(&mut self, link_id: aya::programs::socket_filter::SocketFilterLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::socket_filter::SocketFilter::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> @@ -8218,7 +9987,7 @@ impl aya::programs::socket_filter::SocketFilter pub fn aya::programs::socket_filter::SocketFilter::info(&self) -> core::result::Result impl aya::programs::socket_filter::SocketFilter pub fn aya::programs::socket_filter::SocketFilter::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::socket_filter::SocketFilter::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::socket_filter::SocketFilter::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::socket_filter::SocketFilter pub fn aya::programs::socket_filter::SocketFilter::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::socket_filter::SocketFilter @@ -8245,29 +10014,33 @@ pub fn aya::programs::socket_filter::SocketFilter::try_from(value: U) -> core::r impl core::convert::TryInto for aya::programs::socket_filter::SocketFilter where U: core::convert::TryFrom pub type aya::programs::socket_filter::SocketFilter::Error = >::Error pub fn aya::programs::socket_filter::SocketFilter::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::socket_filter::SocketFilter where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::socket_filter::SocketFilter where T: 'static + ?core::marker::Sized pub fn aya::programs::socket_filter::SocketFilter::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::socket_filter::SocketFilter where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::socket_filter::SocketFilter where T: ?core::marker::Sized pub fn aya::programs::socket_filter::SocketFilter::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::socket_filter::SocketFilter where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::socket_filter::SocketFilter where T: ?core::marker::Sized pub fn aya::programs::socket_filter::SocketFilter::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::socket_filter::SocketFilter pub fn aya::programs::socket_filter::SocketFilter::from(t: T) -> T pub struct aya::programs::TracePoint impl aya::programs::trace_point::TracePoint +pub const aya::programs::trace_point::TracePoint::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::trace_point::TracePoint::attach(&mut self, category: &str, name: &str) -> core::result::Result -pub fn aya::programs::trace_point::TracePoint::detach(&mut self, link_id: aya::programs::trace_point::TracePointLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::trace_point::TracePoint::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::trace_point::TracePoint +pub fn aya::programs::trace_point::TracePoint::detach(&mut self, link_id: aya::programs::trace_point::TracePointLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::trace_point::TracePoint::take_link(&mut self, link_id: aya::programs::trace_point::TracePointLinkId) -> core::result::Result impl aya::programs::trace_point::TracePoint pub fn aya::programs::trace_point::TracePoint::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::trace_point::TracePoint pub fn aya::programs::trace_point::TracePoint::from_pin>(path: P) -> core::result::Result impl aya::programs::trace_point::TracePoint +pub fn aya::programs::trace_point::TracePoint::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>) -> core::result::Result +impl aya::programs::trace_point::TracePoint pub fn aya::programs::trace_point::TracePoint::info(&self) -> core::result::Result impl aya::programs::trace_point::TracePoint pub fn aya::programs::trace_point::TracePoint::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::trace_point::TracePoint::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::trace_point::TracePoint::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::trace_point::TracePoint pub fn aya::programs::trace_point::TracePoint::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::trace_point::TracePoint @@ -8294,29 +10067,33 @@ pub fn aya::programs::trace_point::TracePoint::try_from(value: U) -> core::resul impl core::convert::TryInto for aya::programs::trace_point::TracePoint where U: core::convert::TryFrom pub type aya::programs::trace_point::TracePoint::Error = >::Error pub fn aya::programs::trace_point::TracePoint::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::trace_point::TracePoint where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::trace_point::TracePoint where T: 'static + ?core::marker::Sized pub fn aya::programs::trace_point::TracePoint::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::trace_point::TracePoint where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::trace_point::TracePoint where T: ?core::marker::Sized pub fn aya::programs::trace_point::TracePoint::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::trace_point::TracePoint where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::trace_point::TracePoint where T: ?core::marker::Sized pub fn aya::programs::trace_point::TracePoint::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::trace_point::TracePoint pub fn aya::programs::trace_point::TracePoint::from(t: T) -> T pub struct aya::programs::UProbe impl aya::programs::uprobe::UProbe -pub fn aya::programs::uprobe::UProbe::attach>(&mut self, fn_name: core::option::Option<&str>, offset: u64, target: T, pid: core::option::Option) -> core::result::Result -pub fn aya::programs::uprobe::UProbe::detach(&mut self, link_id: aya::programs::uprobe::UProbeLinkId) -> core::result::Result<(), aya::programs::ProgramError> +pub const aya::programs::uprobe::UProbe::PROGRAM_TYPE: aya::programs::ProgramType +pub fn aya::programs::uprobe::UProbe::attach<'loc, T: core::convert::AsRef, Loc: core::convert::Into>>(&mut self, location: Loc, target: T, pid: core::option::Option, cookie: core::option::Option) -> core::result::Result pub fn aya::programs::uprobe::UProbe::from_pin>(path: P, kind: aya::programs::ProbeKind) -> core::result::Result pub fn aya::programs::uprobe::UProbe::kind(&self) -> aya::programs::ProbeKind pub fn aya::programs::uprobe::UProbe::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::uprobe::UProbe +pub fn aya::programs::uprobe::UProbe::detach(&mut self, link_id: aya::programs::uprobe::UProbeLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::uprobe::UProbe::take_link(&mut self, link_id: aya::programs::uprobe::UProbeLinkId) -> core::result::Result impl aya::programs::uprobe::UProbe pub fn aya::programs::uprobe::UProbe::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::uprobe::UProbe +pub unsafe fn aya::programs::uprobe::UProbe::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>, kind: aya::programs::ProbeKind) -> core::result::Result +impl aya::programs::uprobe::UProbe pub fn aya::programs::uprobe::UProbe::info(&self) -> core::result::Result impl aya::programs::uprobe::UProbe pub fn aya::programs::uprobe::UProbe::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::uprobe::UProbe::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::uprobe::UProbe::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::uprobe::UProbe pub fn aya::programs::uprobe::UProbe::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::uprobe::UProbe @@ -8343,30 +10120,34 @@ pub fn aya::programs::uprobe::UProbe::try_from(value: U) -> core::result::Result impl core::convert::TryInto for aya::programs::uprobe::UProbe where U: core::convert::TryFrom pub type aya::programs::uprobe::UProbe::Error = >::Error pub fn aya::programs::uprobe::UProbe::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::uprobe::UProbe where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::uprobe::UProbe where T: 'static + ?core::marker::Sized pub fn aya::programs::uprobe::UProbe::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::uprobe::UProbe where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::uprobe::UProbe where T: ?core::marker::Sized pub fn aya::programs::uprobe::UProbe::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::uprobe::UProbe where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::uprobe::UProbe where T: ?core::marker::Sized pub fn aya::programs::uprobe::UProbe::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::uprobe::UProbe pub fn aya::programs::uprobe::UProbe::from(t: T) -> T pub struct aya::programs::Xdp impl aya::programs::xdp::Xdp +pub const aya::programs::xdp::Xdp::PROGRAM_TYPE: aya::programs::ProgramType pub fn aya::programs::xdp::Xdp::attach(&mut self, interface: &str, flags: aya::programs::xdp::XdpFlags) -> core::result::Result pub fn aya::programs::xdp::Xdp::attach_to_if_index(&mut self, if_index: u32, flags: aya::programs::xdp::XdpFlags) -> core::result::Result pub fn aya::programs::xdp::Xdp::attach_to_link(&mut self, link: aya::programs::xdp::XdpLink) -> core::result::Result -pub fn aya::programs::xdp::Xdp::detach(&mut self, link_id: aya::programs::xdp::XdpLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::xdp::Xdp::from_pin>(path: P, attach_type: aya_obj::programs::xdp::XdpAttachType) -> core::result::Result pub fn aya::programs::xdp::Xdp::load(&mut self) -> core::result::Result<(), aya::programs::ProgramError> +impl aya::programs::xdp::Xdp +pub fn aya::programs::xdp::Xdp::detach(&mut self, link_id: aya::programs::xdp::XdpLinkId) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::xdp::Xdp::take_link(&mut self, link_id: aya::programs::xdp::XdpLinkId) -> core::result::Result impl aya::programs::xdp::Xdp pub fn aya::programs::xdp::Xdp::fd(&self) -> core::result::Result<&aya::programs::ProgramFd, aya::programs::ProgramError> impl aya::programs::xdp::Xdp +pub fn aya::programs::xdp::Xdp::from_program_info(info: aya::programs::ProgramInfo, name: alloc::borrow::Cow<'static, str>, attach_type: aya_obj::programs::xdp::XdpAttachType) -> core::result::Result +impl aya::programs::xdp::Xdp pub fn aya::programs::xdp::Xdp::info(&self) -> core::result::Result impl aya::programs::xdp::Xdp pub fn aya::programs::xdp::Xdp::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> -pub fn aya::programs::xdp::Xdp::unpin(self) -> core::result::Result<(), std::io::error::Error> +pub fn aya::programs::xdp::Xdp::unpin(&mut self) -> core::result::Result<(), std::io::error::Error> impl aya::programs::xdp::Xdp pub fn aya::programs::xdp::Xdp::unload(&mut self) -> core::result::Result<(), aya::programs::ProgramError> impl core::fmt::Debug for aya::programs::xdp::Xdp @@ -8393,11 +10174,11 @@ pub fn aya::programs::xdp::Xdp::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::programs::xdp::Xdp where U: core::convert::TryFrom pub type aya::programs::xdp::Xdp::Error = >::Error pub fn aya::programs::xdp::Xdp::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::programs::xdp::Xdp where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::xdp::Xdp where T: 'static + ?core::marker::Sized pub fn aya::programs::xdp::Xdp::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::xdp::Xdp where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::xdp::Xdp where T: ?core::marker::Sized pub fn aya::programs::xdp::Xdp::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::xdp::Xdp where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::xdp::Xdp where T: ?core::marker::Sized pub fn aya::programs::xdp::Xdp::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::programs::xdp::Xdp pub fn aya::programs::xdp::Xdp::from(t: T) -> T @@ -8504,16 +10285,18 @@ impl alloc::borrow::ToOwned for aya::programs::xdp::XdpFlags where T: core::c pub type aya::programs::xdp::XdpFlags::Owned = T pub fn aya::programs::xdp::XdpFlags::clone_into(&self, target: &mut T) pub fn aya::programs::xdp::XdpFlags::to_owned(&self) -> T -impl core::any::Any for aya::programs::xdp::XdpFlags where T: 'static + core::marker::Sized +impl core::any::Any for aya::programs::xdp::XdpFlags where T: 'static + ?core::marker::Sized pub fn aya::programs::xdp::XdpFlags::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::programs::xdp::XdpFlags where T: core::marker::Sized +impl core::borrow::Borrow for aya::programs::xdp::XdpFlags where T: ?core::marker::Sized pub fn aya::programs::xdp::XdpFlags::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::programs::xdp::XdpFlags where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::programs::xdp::XdpFlags where T: ?core::marker::Sized pub fn aya::programs::xdp::XdpFlags::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::programs::xdp::XdpFlags where T: core::clone::Clone +pub unsafe fn aya::programs::xdp::XdpFlags::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya::programs::xdp::XdpFlags pub fn aya::programs::xdp::XdpFlags::from(t: T) -> T -pub trait aya::programs::Link: core::fmt::Debug + 'static -pub type aya::programs::Link::Id: core::fmt::Debug + core::hash::Hash + core::cmp::Eq + core::cmp::PartialEq +pub trait aya::programs::Link: core::fmt::Debug + core::cmp::Eq + core::hash::Hash + 'static +pub type aya::programs::Link::Id: core::fmt::Debug + core::cmp::Eq + core::hash::Hash + equivalent::Equivalent pub fn aya::programs::Link::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::Link::id(&self) -> Self::Id impl aya::programs::links::Link for aya::programs::cgroup_device::CgroupDeviceLink @@ -8552,6 +10335,14 @@ impl aya::programs::links::Link for aya::programs::fexit::FExitLink pub type aya::programs::fexit::FExitLink::Id = aya::programs::fexit::FExitLinkId pub fn aya::programs::fexit::FExitLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::fexit::FExitLink::id(&self) -> Self::Id +impl aya::programs::links::Link for aya::programs::flow_dissector::FlowDissectorLink +pub type aya::programs::flow_dissector::FlowDissectorLink::Id = aya::programs::flow_dissector::FlowDissectorLinkId +pub fn aya::programs::flow_dissector::FlowDissectorLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> +pub fn aya::programs::flow_dissector::FlowDissectorLink::id(&self) -> Self::Id +impl aya::programs::links::Link for aya::programs::iter::IterLink +pub type aya::programs::iter::IterLink::Id = aya::programs::iter::IterLinkId +pub fn aya::programs::iter::IterLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> +pub fn aya::programs::iter::IterLink::id(&self) -> Self::Id impl aya::programs::links::Link for aya::programs::kprobe::KProbeLink pub type aya::programs::kprobe::KProbeLink::Id = aya::programs::kprobe::KProbeLinkId pub fn aya::programs::kprobe::KProbeLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> @@ -8572,6 +10363,10 @@ impl aya::programs::links::Link for aya::programs::lsm::LsmLink pub type aya::programs::lsm::LsmLink::Id = aya::programs::lsm::LsmLinkId pub fn aya::programs::lsm::LsmLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::lsm::LsmLink::id(&self) -> Self::Id +impl aya::programs::links::Link for aya::programs::lsm_cgroup::LsmLink +pub type aya::programs::lsm_cgroup::LsmLink::Id = aya::programs::lsm_cgroup::LsmLinkId +pub fn aya::programs::lsm_cgroup::LsmLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> +pub fn aya::programs::lsm_cgroup::LsmLink::id(&self) -> Self::Id impl aya::programs::links::Link for aya::programs::perf_attach::PerfLink pub type aya::programs::perf_attach::PerfLink::Id = aya::programs::perf_attach::PerfLinkId pub fn aya::programs::perf_attach::PerfLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> @@ -8624,7 +10419,98 @@ impl aya::programs::links::Link for aya::programs::xdp::XdpLink pub type aya::programs::xdp::XdpLink::Id = aya::programs::xdp::XdpLinkId pub fn aya::programs::xdp::XdpLink::detach(self) -> core::result::Result<(), aya::programs::ProgramError> pub fn aya::programs::xdp::XdpLink::id(&self) -> Self::Id +pub trait aya::programs::MultiProgLink +pub fn aya::programs::MultiProgLink::fd(&self) -> core::result::Result, aya::programs::links::LinkError> +impl aya::programs::MultiProgLink for aya::programs::tc::SchedClassifierLink +pub fn aya::programs::tc::SchedClassifierLink::fd(&self) -> core::result::Result, aya::programs::links::LinkError> +pub trait aya::programs::MultiProgram +pub fn aya::programs::MultiProgram::fd(&self) -> core::result::Result, aya::programs::ProgramError> +impl aya::programs::MultiProgram for aya::programs::tc::SchedClassifier +pub fn aya::programs::tc::SchedClassifier::fd(&self) -> core::result::Result, aya::programs::ProgramError> +pub fn aya::programs::loaded_links() -> impl core::iter::traits::iterator::Iterator> pub fn aya::programs::loaded_programs() -> impl core::iter::traits::iterator::Iterator> +pub mod aya::sys +#[non_exhaustive] pub enum aya::sys::Stats +pub aya::sys::Stats::RunTime +impl core::clone::Clone for aya::sys::Stats +pub fn aya::sys::Stats::clone(&self) -> aya::sys::Stats +impl core::convert::From for aya_obj::generated::linux_bindings_x86_64::bpf_stats_type +pub fn aya_obj::generated::linux_bindings_x86_64::bpf_stats_type::from(value: aya::sys::Stats) -> Self +impl core::fmt::Debug for aya::sys::Stats +pub fn aya::sys::Stats::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Copy for aya::sys::Stats +impl core::marker::Freeze for aya::sys::Stats +impl core::marker::Send for aya::sys::Stats +impl core::marker::Sync for aya::sys::Stats +impl core::marker::Unpin for aya::sys::Stats +impl core::panic::unwind_safe::RefUnwindSafe for aya::sys::Stats +impl core::panic::unwind_safe::UnwindSafe for aya::sys::Stats +impl core::convert::Into for aya::sys::Stats where U: core::convert::From +pub fn aya::sys::Stats::into(self) -> U +impl core::convert::TryFrom for aya::sys::Stats where U: core::convert::Into +pub type aya::sys::Stats::Error = core::convert::Infallible +pub fn aya::sys::Stats::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::sys::Stats where U: core::convert::TryFrom +pub type aya::sys::Stats::Error = >::Error +pub fn aya::sys::Stats::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya::sys::Stats where T: core::clone::Clone +pub type aya::sys::Stats::Owned = T +pub fn aya::sys::Stats::clone_into(&self, target: &mut T) +pub fn aya::sys::Stats::to_owned(&self) -> T +impl core::any::Any for aya::sys::Stats where T: 'static + ?core::marker::Sized +pub fn aya::sys::Stats::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::sys::Stats where T: ?core::marker::Sized +pub fn aya::sys::Stats::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::sys::Stats where T: ?core::marker::Sized +pub fn aya::sys::Stats::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::sys::Stats where T: core::clone::Clone +pub unsafe fn aya::sys::Stats::clone_to_uninit(&self, dest: *mut u8) +impl core::convert::From for aya::sys::Stats +pub fn aya::sys::Stats::from(t: T) -> T +pub struct aya::sys::SyscallError +pub aya::sys::SyscallError::call: &'static str +pub aya::sys::SyscallError::io_error: std::io::error::Error +impl core::convert::From for aya::maps::MapError +pub fn aya::maps::MapError::from(source: aya::sys::SyscallError) -> Self +impl core::convert::From for aya::pin::PinError +pub fn aya::pin::PinError::from(source: aya::sys::SyscallError) -> Self +impl core::convert::From for aya::programs::ProgramError +pub fn aya::programs::ProgramError::from(source: aya::sys::SyscallError) -> Self +impl core::convert::From for aya::programs::links::LinkError +pub fn aya::programs::links::LinkError::from(source: aya::sys::SyscallError) -> Self +impl core::error::Error for aya::sys::SyscallError +pub fn aya::sys::SyscallError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)> +impl core::fmt::Debug for aya::sys::SyscallError +pub fn aya::sys::SyscallError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::fmt::Display for aya::sys::SyscallError +pub fn aya::sys::SyscallError::fmt(&self, __formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::marker::Freeze for aya::sys::SyscallError +impl core::marker::Send for aya::sys::SyscallError +impl core::marker::Sync for aya::sys::SyscallError +impl core::marker::Unpin for aya::sys::SyscallError +impl !core::panic::unwind_safe::RefUnwindSafe for aya::sys::SyscallError +impl !core::panic::unwind_safe::UnwindSafe for aya::sys::SyscallError +impl core::convert::Into for aya::sys::SyscallError where U: core::convert::From +pub fn aya::sys::SyscallError::into(self) -> U +impl core::convert::TryFrom for aya::sys::SyscallError where U: core::convert::Into +pub type aya::sys::SyscallError::Error = core::convert::Infallible +pub fn aya::sys::SyscallError::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya::sys::SyscallError where U: core::convert::TryFrom +pub type aya::sys::SyscallError::Error = >::Error +pub fn aya::sys::SyscallError::try_into(self) -> core::result::Result>::Error> +impl alloc::string::ToString for aya::sys::SyscallError where T: core::fmt::Display + ?core::marker::Sized +pub fn aya::sys::SyscallError::to_string(&self) -> alloc::string::String +impl core::any::Any for aya::sys::SyscallError where T: 'static + ?core::marker::Sized +pub fn aya::sys::SyscallError::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya::sys::SyscallError where T: ?core::marker::Sized +pub fn aya::sys::SyscallError::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya::sys::SyscallError where T: ?core::marker::Sized +pub fn aya::sys::SyscallError::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya::sys::SyscallError +pub fn aya::sys::SyscallError::from(t: T) -> T +pub fn aya::sys::enable_stats(stats_type: aya::sys::Stats) -> core::result::Result +pub fn aya::sys::is_map_supported(map_type: aya::maps::MapType) -> core::result::Result +pub fn aya::sys::is_program_supported(program_type: aya::programs::ProgramType) -> core::result::Result pub mod aya::util pub struct aya::util::KernelVersion impl aya::util::KernelVersion @@ -8640,6 +10526,8 @@ impl core::cmp::PartialOrd for aya::util::KernelVersion pub fn aya::util::KernelVersion::partial_cmp(&self, other: &aya::util::KernelVersion) -> core::option::Option impl core::fmt::Debug for aya::util::KernelVersion pub fn aya::util::KernelVersion::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::fmt::Display for aya::util::KernelVersion +pub fn aya::util::KernelVersion::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result impl core::marker::Copy for aya::util::KernelVersion impl core::marker::StructuralPartialEq for aya::util::KernelVersion impl core::marker::Freeze for aya::util::KernelVersion @@ -8648,9 +10536,7 @@ impl core::marker::Sync for aya::util::KernelVersion impl core::marker::Unpin for aya::util::KernelVersion impl core::panic::unwind_safe::RefUnwindSafe for aya::util::KernelVersion impl core::panic::unwind_safe::UnwindSafe for aya::util::KernelVersion -impl equivalent::Equivalent for aya::util::KernelVersion where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized -pub fn aya::util::KernelVersion::equivalent(&self, key: &K) -> bool -impl hashbrown::Equivalent for aya::util::KernelVersion where Q: core::cmp::Eq + core::marker::Sized, K: core::borrow::Borrow + core::marker::Sized +impl equivalent::Equivalent for aya::util::KernelVersion where Q: core::cmp::Eq + ?core::marker::Sized, K: core::borrow::Borrow + ?core::marker::Sized pub fn aya::util::KernelVersion::equivalent(&self, key: &K) -> bool impl core::convert::Into for aya::util::KernelVersion where U: core::convert::From pub fn aya::util::KernelVersion::into(self) -> U @@ -8664,17 +10550,21 @@ impl alloc::borrow::ToOwned for aya::util::KernelVersion where T: core::clone pub type aya::util::KernelVersion::Owned = T pub fn aya::util::KernelVersion::clone_into(&self, target: &mut T) pub fn aya::util::KernelVersion::to_owned(&self) -> T -impl core::any::Any for aya::util::KernelVersion where T: 'static + core::marker::Sized +impl alloc::string::ToString for aya::util::KernelVersion where T: core::fmt::Display + ?core::marker::Sized +pub fn aya::util::KernelVersion::to_string(&self) -> alloc::string::String +impl core::any::Any for aya::util::KernelVersion where T: 'static + ?core::marker::Sized pub fn aya::util::KernelVersion::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::util::KernelVersion where T: core::marker::Sized +impl core::borrow::Borrow for aya::util::KernelVersion where T: ?core::marker::Sized pub fn aya::util::KernelVersion::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::util::KernelVersion where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::util::KernelVersion where T: ?core::marker::Sized pub fn aya::util::KernelVersion::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::util::KernelVersion where T: core::clone::Clone +pub unsafe fn aya::util::KernelVersion::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya::util::KernelVersion pub fn aya::util::KernelVersion::from(t: T) -> T pub fn aya::util::kernel_symbols() -> core::result::Result, std::io::error::Error> -pub fn aya::util::nr_cpus() -> core::result::Result -pub fn aya::util::online_cpus() -> core::result::Result, std::io::error::Error> +pub fn aya::util::nr_cpus() -> core::result::Result +pub fn aya::util::online_cpus() -> core::result::Result, (&'static str, std::io::error::Error)> pub fn aya::util::syscall_prefix() -> core::result::Result<&'static str, std::io::error::Error> pub macro aya::include_bytes_aligned! pub enum aya::EbpfError @@ -8722,13 +10612,13 @@ pub fn aya::EbpfError::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::EbpfError where U: core::convert::TryFrom pub type aya::EbpfError::Error = >::Error pub fn aya::EbpfError::try_into(self) -> core::result::Result>::Error> -impl alloc::string::ToString for aya::EbpfError where T: core::fmt::Display + core::marker::Sized +impl alloc::string::ToString for aya::EbpfError where T: core::fmt::Display + ?core::marker::Sized pub fn aya::EbpfError::to_string(&self) -> alloc::string::String -impl core::any::Any for aya::EbpfError where T: 'static + core::marker::Sized +impl core::any::Any for aya::EbpfError where T: 'static + ?core::marker::Sized pub fn aya::EbpfError::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::EbpfError where T: core::marker::Sized +impl core::borrow::Borrow for aya::EbpfError where T: ?core::marker::Sized pub fn aya::EbpfError::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::EbpfError where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::EbpfError where T: ?core::marker::Sized pub fn aya::EbpfError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::EbpfError pub fn aya::EbpfError::from(t: T) -> T @@ -8739,6 +10629,7 @@ pub fn aya::Ebpf::load_file>(path: P) - pub fn aya::Ebpf::map(&self, name: &str) -> core::option::Option<&aya::maps::Map> pub fn aya::Ebpf::map_mut(&mut self, name: &str) -> core::option::Option<&mut aya::maps::Map> pub fn aya::Ebpf::maps(&self) -> impl core::iter::traits::iterator::Iterator +pub fn aya::Ebpf::maps_disjoint_mut(&mut self, names: [&str; N]) -> [core::option::Option<&mut aya::maps::Map>; N] pub fn aya::Ebpf::maps_mut(&mut self) -> impl core::iter::traits::iterator::Iterator pub fn aya::Ebpf::program(&self, name: &str) -> core::option::Option<&aya::programs::Program> pub fn aya::Ebpf::program_mut(&mut self, name: &str) -> core::option::Option<&mut aya::programs::Program> @@ -8761,11 +10652,11 @@ pub fn aya::Ebpf::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::Ebpf where U: core::convert::TryFrom pub type aya::Ebpf::Error = >::Error pub fn aya::Ebpf::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::Ebpf where T: 'static + core::marker::Sized +impl core::any::Any for aya::Ebpf where T: 'static + ?core::marker::Sized pub fn aya::Ebpf::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::Ebpf where T: core::marker::Sized +impl core::borrow::Borrow for aya::Ebpf where T: ?core::marker::Sized pub fn aya::Ebpf::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::Ebpf where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::Ebpf where T: ?core::marker::Sized pub fn aya::Ebpf::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::Ebpf pub fn aya::Ebpf::from(t: T) -> T @@ -8773,11 +10664,14 @@ pub struct aya::EbpfLoader<'a> impl<'a> aya::EbpfLoader<'a> pub fn aya::EbpfLoader<'a>::allow_unsupported_maps(&mut self) -> &mut Self pub fn aya::EbpfLoader<'a>::btf(&mut self, btf: core::option::Option<&'a aya_obj::btf::btf::Btf>) -> &mut Self +pub fn aya::EbpfLoader<'a>::default_map_pin_directory>(&mut self, path: P) -> &mut Self pub fn aya::EbpfLoader<'a>::extension(&mut self, name: &'a str) -> &mut Self pub fn aya::EbpfLoader<'a>::load(&mut self, data: &[u8]) -> core::result::Result pub fn aya::EbpfLoader<'a>::load_file>(&mut self, path: P) -> core::result::Result -pub fn aya::EbpfLoader<'a>::map_pin_path>(&mut self, path: P) -> &mut Self +pub fn aya::EbpfLoader<'a>::map_max_entries(&mut self, name: &'a str, size: u32) -> &mut Self +pub fn aya::EbpfLoader<'a>::map_pin_path>>(&mut self, name: &'a str, path: P) -> &mut Self pub fn aya::EbpfLoader<'a>::new() -> Self +pub fn aya::EbpfLoader<'a>::override_global>>(&mut self, name: &'a str, value: T, must_exist: bool) -> &mut Self pub fn aya::EbpfLoader<'a>::set_global>>(&mut self, name: &'a str, value: T, must_exist: bool) -> &mut Self pub fn aya::EbpfLoader<'a>::set_max_entries(&mut self, name: &'a str, size: u32) -> &mut Self pub fn aya::EbpfLoader<'a>::verifier_log_level(&mut self, level: aya::VerifierLogLevel) -> &mut Self @@ -8799,11 +10693,11 @@ pub fn aya::EbpfLoader<'a>::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::EbpfLoader<'a> where U: core::convert::TryFrom pub type aya::EbpfLoader<'a>::Error = >::Error pub fn aya::EbpfLoader<'a>::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::EbpfLoader<'a> where T: 'static + core::marker::Sized +impl core::any::Any for aya::EbpfLoader<'a> where T: 'static + ?core::marker::Sized pub fn aya::EbpfLoader<'a>::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::EbpfLoader<'a> where T: core::marker::Sized +impl core::borrow::Borrow for aya::EbpfLoader<'a> where T: ?core::marker::Sized pub fn aya::EbpfLoader<'a>::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::EbpfLoader<'a> where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::EbpfLoader<'a> where T: ?core::marker::Sized pub fn aya::EbpfLoader<'a>::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::EbpfLoader<'a> pub fn aya::EbpfLoader<'a>::from(t: T) -> T @@ -8826,11 +10720,11 @@ pub fn aya::GlobalData<'a>::try_from(value: U) -> core::result::Result core::convert::TryInto for aya::GlobalData<'a> where U: core::convert::TryFrom pub type aya::GlobalData<'a>::Error = >::Error pub fn aya::GlobalData<'a>::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for aya::GlobalData<'a> where T: 'static + core::marker::Sized +impl core::any::Any for aya::GlobalData<'a> where T: 'static + ?core::marker::Sized pub fn aya::GlobalData<'a>::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::GlobalData<'a> where T: core::marker::Sized +impl core::borrow::Borrow for aya::GlobalData<'a> where T: ?core::marker::Sized pub fn aya::GlobalData<'a>::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::GlobalData<'a> where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::GlobalData<'a> where T: ?core::marker::Sized pub fn aya::GlobalData<'a>::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::GlobalData<'a> pub fn aya::GlobalData<'a>::from(t: T) -> T @@ -8936,12 +10830,14 @@ impl alloc::borrow::ToOwned for aya::VerifierLogLevel where T: core::clone::C pub type aya::VerifierLogLevel::Owned = T pub fn aya::VerifierLogLevel::clone_into(&self, target: &mut T) pub fn aya::VerifierLogLevel::to_owned(&self) -> T -impl core::any::Any for aya::VerifierLogLevel where T: 'static + core::marker::Sized +impl core::any::Any for aya::VerifierLogLevel where T: 'static + ?core::marker::Sized pub fn aya::VerifierLogLevel::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for aya::VerifierLogLevel where T: core::marker::Sized +impl core::borrow::Borrow for aya::VerifierLogLevel where T: ?core::marker::Sized pub fn aya::VerifierLogLevel::borrow(&self) -> &T -impl core::borrow::BorrowMut for aya::VerifierLogLevel where T: core::marker::Sized +impl core::borrow::BorrowMut for aya::VerifierLogLevel where T: ?core::marker::Sized pub fn aya::VerifierLogLevel::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya::VerifierLogLevel where T: core::clone::Clone +pub unsafe fn aya::VerifierLogLevel::clone_to_uninit(&self, dest: *mut u8) impl core::convert::From for aya::VerifierLogLevel pub fn aya::VerifierLogLevel::from(t: T) -> T pub unsafe trait aya::Pod: core::marker::Copy + 'static @@ -8952,6 +10848,7 @@ impl aya::Pod for i16 impl aya::Pod for i32 impl aya::Pod for i64 impl aya::Pod for i8 +impl aya::Pod for libc::unix::linux_like::linux::nlattr impl aya::Pod for u128 impl aya::Pod for u16 impl aya::Pod for u32 @@ -8960,7 +10857,6 @@ impl aya::Pod for u8 impl aya::Pod for aya::maps::lpm_trie::Key impl aya::Pod for [T; N] pub fn aya::features() -> &'static aya_obj::obj::Features -pub fn aya::loaded_programs() -> impl core::iter::traits::iterator::Iterator> pub type aya::Bpf = aya::Ebpf pub type aya::BpfError = aya::EbpfError pub type aya::BpfLoader<'a> = aya::EbpfLoader<'a> diff --git a/xtask/src/codegen/aya.rs b/xtask/src/codegen/aya.rs index be447bd5..b8330e83 100644 --- a/xtask/src/codegen/aya.rs +++ b/xtask/src/codegen/aya.rs @@ -1,37 +1,26 @@ -use std::path::{Path, PathBuf}; +use std::{ + fs::create_dir_all, + path::{Path, PathBuf}, +}; -use anyhow::anyhow; -use aya_tool::{bindgen, write_to_file}; +use anyhow::{Context as _, Result}; +use aya_tool::bindgen; use crate::codegen::{Architecture, SysrootOptions}; -pub fn codegen(opts: &SysrootOptions, libbpf_dir: &Path) -> Result<(), anyhow::Error> { +pub(crate) fn codegen(opts: &SysrootOptions, libbpf_dir: &Path) -> Result<()> { codegen_internal_btf_bindings(libbpf_dir)?; codegen_bindings(opts, libbpf_dir) } -fn codegen_internal_btf_bindings(libbpf_dir: &Path) -> Result<(), anyhow::Error> { +fn codegen_internal_btf_bindings(libbpf_dir: &Path) -> Result<()> { let dir = PathBuf::from("aya-obj"); let generated = dir.join("src/generated"); let mut bindgen = bindgen::user_builder() - .clang_arg(format!( - "-I{}", - libbpf_dir - .join("include/uapi") - .canonicalize() - .unwrap() - .to_string_lossy() - )) - .clang_arg(format!( - "-I{}", - libbpf_dir - .join("include") - .canonicalize() - .unwrap() - .to_string_lossy() - )) - .header(libbpf_dir.join("src/libbpf_internal.h").to_string_lossy()) + .clang_args(["-I", libbpf_dir.join("include/uapi").to_str().unwrap()]) + .clang_args(["-I", libbpf_dir.join("include").to_str().unwrap()]) + .header(libbpf_dir.join("src/libbpf_internal.h").to_str().unwrap()) .constified_enum_module("bpf_core_relo_kind"); let types = ["bpf_core_relo", "btf_ext_header"]; @@ -40,133 +29,152 @@ fn codegen_internal_btf_bindings(libbpf_dir: &Path) -> Result<(), anyhow::Error> bindgen = bindgen.allowlist_type(x); } - let bindings = bindgen - .generate() - .map_err(|op| anyhow!("bindgen failed - {op}"))? - .to_string(); + let bindings = bindgen.generate().context("bindgen failed")?; // write the bindings, with the original helpers removed - write_to_file(generated.join("btf_internal_bindings.rs"), &bindings)?; + bindings.write_to_file(generated.join("btf_internal_bindings.rs"))?; Ok(()) } -fn codegen_bindings(opts: &SysrootOptions, libbpf_dir: &Path) -> Result<(), anyhow::Error> { +fn codegen_bindings(opts: &SysrootOptions, libbpf_dir: &Path) -> Result<()> { let SysrootOptions { - x86_64_sysroot, aarch64_sysroot, armv7_sysroot, + loongarch64_sysroot, + mips_sysroot, + powerpc64_sysroot, riscv64_sysroot, + s390x_sysroot, + x86_64_sysroot, } = opts; - let types = [ - // BPF - "BPF_TYPES", - "bpf_cmd", - "bpf_insn", - "bpf_attr", - "bpf_map_type", - "bpf_prog_type", - "bpf_attach_type", - "bpf_prog_info", - "bpf_map_info", - "bpf_link_info", - "bpf_link_type", - "bpf_btf_info", - "bpf_func_info", - "bpf_line_info", - "bpf_lpm_trie_key", - "bpf_cpumap_val", - "bpf_devmap_val", - // BTF - "btf_header", - "btf_ext_info", - "btf_ext_info_sec", - "btf_type", - "btf_enum", - "btf_array", - "btf_member", - "btf_param", - "btf_var", - "btf_var_secinfo", - "btf_func_linkage", - "btf_decl_tag", - // PERF - "perf_event_attr", - "perf_sw_ids", - "perf_hw_id", - "perf_hw_cache_id", - "perf_hw_cache_op_id", - "perf_hw_cache_op_result_id", - "perf_event_sample_format", - "perf_event_mmap_page", - "perf_event_header", - "perf_type_id", - "perf_event_type", - // NETLINK - "ifinfomsg", - "tcmsg", - ]; - - let vars = [ - // BPF - "BPF_PSEUDO_.*", - "BPF_ALU", - "BPF_ALU64", - "BPF_LDX", - "BPF_ST", - "BPF_STX", - "BPF_LD", - "BPF_K", - "BPF_DW", - "BPF_W", - "BPF_H", - "BPF_B", - "BPF_F_.*", - "BPF_JMP", - "BPF_CALL", - "SO_ATTACH_BPF", - "SO_DETACH_BPF", - // BTF - "BTF_INT_.*", - "BTF_KIND_.*", - "BTF_VAR_.*", - // PERF - "PERF_FLAG_.*", - "PERF_EVENT_.*", - "PERF_MAX_.*", - // see linux_wrapper.h, these are to workaround the IOC macros - "AYA_PERF_EVENT_.*", - // NETLINK - "NLMSG_ALIGNTO", - "IFLA_XDP_FD", - "TCA_KIND", - "TCA_OPTIONS", - "TCA_BPF_FD", - "TCA_BPF_NAME", - "TCA_BPF_FLAGS", - "TCA_BPF_FLAG_ACT_DIRECT", - "XDP_FLAGS_.*", - "TC_H_MAJ_MASK", - "TC_H_MIN_MASK", - "TC_H_UNSPEC", - "TC_H_ROOT", - "TC_H_INGRESS", - "TC_H_CLSACT", - "TC_H_MIN_PRIORITY", - "TC_H_MIN_INGRESS", - "TC_H_MIN_EGRESS", - // Ringbuf - "BPF_RINGBUF_.*", - ]; - let dir = PathBuf::from("aya-obj"); let generated = dir.join("src/generated"); + create_dir_all(&generated)?; let builder = || { - bindgen::user_builder() - .header(dir.join("include/linux_wrapper.h").to_string_lossy()) - .clang_args(&["-I", &*libbpf_dir.join("include/uapi").to_string_lossy()]) - .clang_args(&["-I", &*libbpf_dir.join("include").to_string_lossy()]) + let mut bindgen = bindgen::user_builder() + .header(dir.join("include/linux_wrapper.h").to_str().unwrap()) + .clang_args(["-I", libbpf_dir.join("include/uapi").to_str().unwrap()]) + .clang_args(["-I", libbpf_dir.join("include").to_str().unwrap()]) + // BPF_F_LINK is defined twice. Once in an anonymous enum + // which bindgen will constify, and once via #define macro + // which generates a duplicate const. + .blocklist_var("BPF_F_LINK") + .constified_enum("BPF_F_.*") + .constified_enum("BTF_KIND_.*") + .constified_enum("BTF_VAR_.*") + .constified_enum("IFLA_.*") + .constified_enum("TCA_.*") + .constified_enum("BPF_RINGBUF_.*") + // NETFILTER + .constified_enum("NFPROTO_.*"); + + let types = [ + // BPF + "bpf_cmd", + "bpf_insn", + "bpf_attr", + "bpf_map_type", + "bpf_prog_type", + "bpf_attach_type", + "bpf_prog_info", + "bpf_map_info", + "bpf_link_info", + "bpf_link_type", + "bpf_btf_info", + "bpf_func_id", + "bpf_func_info", + "bpf_line_info", + "bpf_lpm_trie_key", + "bpf_cpumap_val", + "bpf_devmap_val", + "bpf_stats_type", + "bpf_perf_event_type", + "bpf_task_fd_type", + // BTF + "btf_header", + "btf_ext_info", + "btf_ext_info_sec", + "btf_type", + "btf_enum", + "btf_array", + "btf_member", + "btf_param", + "btf_var", + "btf_var_secinfo", + "btf_func_linkage", + "btf_decl_tag", + // PERF + "perf_event_attr", + "perf_sw_ids", + "perf_hw_id", + "perf_hw_cache_id", + "perf_hw_cache_op_id", + "perf_hw_cache_op_result_id", + "perf_event_sample_format", + "perf_event_mmap_page", + "perf_event_header", + "perf_type_id", + "perf_event_type", + // NETLINK + "ifinfomsg", + "tcmsg", + "nlmsgerr_attrs", + // ITER + "bpf_cgroup_iter_order", + // NETFILTER + "nf_inet_hooks", + ]; + + let vars = [ + // BPF + "BPF_PSEUDO_.*", + "BPF_.*", + "SO_ATTACH_BPF", + "SO_DETACH_BPF", + // BTF + "BTF_INT_.*", + "BTF_KIND_.*", + "BTF_VAR_.*", + // PERF + "PERF_FLAG_.*", + "PERF_EVENT_.*", + "PERF_MAX_.*", + // NETLINK + "NLMSG_ALIGNTO", + "IFLA_XDP_FD", + "TCA_KIND", + "TCA_OPTIONS", + "TCA_BPF_FD", + "TCA_BPF_NAME", + "TCA_BPF_FLAGS", + "TCA_BPF_FLAG_ACT_DIRECT", + "XDP_FLAGS_.*", + "TC_H_MAJ_MASK", + "TC_H_MIN_MASK", + "TC_H_UNSPEC", + "TC_H_ROOT", + "TC_H_INGRESS", + "TC_H_CLSACT", + "TC_H_MIN_PRIORITY", + "TC_H_MIN_INGRESS", + "TC_H_MIN_EGRESS", + // Ringbuf + "BPF_RINGBUF_.*", + // NETFILTER + "NFPROTO_.*", + ]; + + for x in &types { + bindgen = bindgen.allowlist_type(x); + } + + for x in &vars { + bindgen = bindgen.allowlist_var(x); + } + + bindgen }; for arch in Architecture::supported() { @@ -174,56 +182,27 @@ fn codegen_bindings(opts: &SysrootOptions, libbpf_dir: &Path) -> Result<(), anyh // Set target triple. This will set the right flags (which you can see // running clang -target=X -E - -dM "x86_64-unknown-linux-gnu", - Architecture::ARMv7 => "armv7-unknown-linux-gnu", - Architecture::AArch64 => "aarch64-unknown-linux-gnu", - Architecture::RISCV64 => "riscv64-unknown-linux-gnu", - }; + let target = arch.target(); bindgen = bindgen.clang_args(&["-target", target]); // Set the sysroot. This is needed to ensure that the correct arch // specific headers are imported. let sysroot = match arch { - Architecture::X86_64 => x86_64_sysroot, - Architecture::ARMv7 => armv7_sysroot, Architecture::AArch64 => aarch64_sysroot, + Architecture::ARMv7 => armv7_sysroot, + Architecture::LoongArch64 => loongarch64_sysroot, + Architecture::Mips => mips_sysroot, + Architecture::PowerPC64 => powerpc64_sysroot, Architecture::RISCV64 => riscv64_sysroot, + Architecture::S390X => s390x_sysroot, + Architecture::X86_64 => x86_64_sysroot, }; - bindgen = bindgen.clang_args(&["-I", &*sysroot.to_string_lossy()]); - - for x in &types { - bindgen = bindgen.allowlist_type(x); - } - for x in &vars { - bindgen = bindgen - .allowlist_var(x) - .constified_enum("BPF_F_.*") - .constified_enum("BTF_KIND_.*") - .constified_enum("BTF_VAR_.*") - .constified_enum("IFLA_.*") - .constified_enum("TCA_.*") - .constified_enum("BPF_RINGBUF_.*"); - } - - for x in &types { - bindgen = bindgen.allowlist_type(x); - } - - for x in &vars { - bindgen = bindgen.allowlist_var(x); - } + bindgen = bindgen.clang_args(["-I", sysroot.to_str().unwrap()]); - let bindings = bindgen - .generate() - .map_err(|op| anyhow!("bindgen failed - {op}"))? - .to_string(); + let bindings = bindgen.generate().context("bindgen failed")?; // write the bindings, with the original helpers removed - write_to_file( - generated.join(format!("linux_bindings_{arch}.rs")), - &bindings.to_string(), - )?; + bindings.write_to_file(generated.join(format!("linux_bindings_{arch}.rs")))?; } Ok(()) diff --git a/xtask/src/codegen/aya_ebpf_bindings.rs b/xtask/src/codegen/aya_ebpf_bindings.rs index ced98b15..1d816f59 100644 --- a/xtask/src/codegen/aya_ebpf_bindings.rs +++ b/xtask/src/codegen/aya_ebpf_bindings.rs @@ -1,35 +1,56 @@ -use std::path::{Path, PathBuf}; +use std::{ + fs::{File, create_dir_all}, + path::{Path, PathBuf}, +}; -use anyhow::anyhow; -use aya_tool::{bindgen, write_to_file_fmt}; +use anyhow::{Context as _, Result}; +use aya_tool::bindgen; use proc_macro2::TokenStream; -use quote::ToTokens; -use syn::{parse_str, Item}; +use quote::ToTokens as _; +use syn::{Item, parse_str}; +use xtask::{exec, install_libbpf_headers_cmd}; use crate::codegen::{ - helpers::{expand_helpers, extract_helpers}, Architecture, SysrootOptions, + helpers::{expand_helpers, extract_helpers}, }; -pub fn codegen(opts: &SysrootOptions, libbpf_dir: &Path) -> Result<(), anyhow::Error> { +pub(crate) fn codegen(opts: &SysrootOptions, libbpf_dir: &Path) -> Result<()> { let SysrootOptions { - x86_64_sysroot, aarch64_sysroot, armv7_sysroot, + loongarch64_sysroot, + mips_sysroot, + powerpc64_sysroot, riscv64_sysroot, + s390x_sysroot, + x86_64_sysroot, } = opts; + let tmp_dir = tempfile::tempdir().context("tempdir failed")?; + let libbpf_headers_dir = tmp_dir.path().join("libbpf_headers"); + + let mut cmd = install_libbpf_headers_cmd(libbpf_dir, &libbpf_headers_dir); + exec(&mut cmd)?; + let dir = PathBuf::from("ebpf/aya-ebpf-bindings"); let builder = || { let mut bindgen = bindgen::bpf_builder() - .header(&*dir.join("include/bindings.h").to_string_lossy()) + .header(dir.join("include/bindings.h").to_str().unwrap()) + .clang_args(["-I", libbpf_dir.join("include/uapi").to_str().unwrap()]) + .clang_args(["-I", libbpf_dir.join("include").to_str().unwrap()]) + .clang_args(["-I", libbpf_headers_dir.to_str().unwrap()]) // aya-tool uses aya_ebpf::cty. We can't use that here since aya-bpf // depends on aya-ebpf-bindings so it would create a circular dep. .ctypes_prefix("::aya_ebpf_cty") - .clang_args(&["-I", &*libbpf_dir.join("include/uapi").to_string_lossy()]) - .clang_args(&["-I", &*libbpf_dir.join("include").to_string_lossy()]) - .clang_args(&["-I", &*libbpf_dir.join("src").to_string_lossy()]) + // we define our own version which is compatible with both libbpf + // and iproute2. + .blocklist_type("bpf_map_def") + // BPF_F_LINK is defined twice. Once in an anonymous enum + // which bindgen will constify, and once via #define macro + // which generates a duplicate const. + .blocklist_var("BPF_F_LINK") // open aya-ebpf-bindings/.../bindings.rs and look for mod // _bindgen, those are anonymous enums .constified_enum("BPF_F_.*") @@ -52,6 +73,7 @@ pub fn codegen(opts: &SysrootOptions, libbpf_dir: &Path) -> Result<(), anyhow::E "user_pt_regs", "user_regs_struct", "xdp_action", + "tcx_action_base", ]; let vars = ["BPF_.*", "bpf_.*", "TC_ACT_.*", "SOL_SOCKET", "SO_.*"]; @@ -59,10 +81,6 @@ pub fn codegen(opts: &SysrootOptions, libbpf_dir: &Path) -> Result<(), anyhow::E bindgen = bindgen.allowlist_type(x); } - // we define our own version which is compatible with both libbpf and - // iproute2 - bindgen = bindgen.blocklist_type("bpf_map_def"); - for x in &vars { bindgen = bindgen.allowlist_var(x); } @@ -75,30 +93,28 @@ pub fn codegen(opts: &SysrootOptions, libbpf_dir: &Path) -> Result<(), anyhow::E // Set target triple. This will set the right flags (which you can see // running clang -target=X -E - -dM "x86_64-unknown-linux-gnu", - Architecture::ARMv7 => "armv7-unknown-linux-gnu", - Architecture::AArch64 => "aarch64-unknown-linux-gnu", - Architecture::RISCV64 => "riscv64-unknown-linux-gnu", - }; - bindgen = bindgen.clang_args(&["-target", target]); + let target = arch.target(); + bindgen = bindgen.clang_args(["-target", target]); // Set the sysroot. This is needed to ensure that the correct arch // specific headers are imported. let sysroot = match arch { - Architecture::X86_64 => x86_64_sysroot, - Architecture::ARMv7 => armv7_sysroot, Architecture::AArch64 => aarch64_sysroot, + Architecture::ARMv7 => armv7_sysroot, + Architecture::LoongArch64 => loongarch64_sysroot, + Architecture::Mips => mips_sysroot, + Architecture::PowerPC64 => powerpc64_sysroot, Architecture::RISCV64 => riscv64_sysroot, + Architecture::S390X => s390x_sysroot, + Architecture::X86_64 => x86_64_sysroot, }; - bindgen = bindgen.clang_args(&["-I", &*sysroot.to_string_lossy()]); + bindgen = bindgen.clang_args(["-I", sysroot.to_str().unwrap()]); - let bindings = bindgen - .generate() - .map_err(|op| anyhow!("bindgen failed - {op}"))? - .to_string(); + let bindings = bindgen.generate().context("bindgen failed")?; + let bindings = bindings.to_string(); let mut tree = parse_str::(&bindings).unwrap(); + let (indexes, helpers) = extract_helpers(&tree.items); let helpers = expand_helpers(&helpers); for index in indexes { @@ -106,17 +122,26 @@ pub fn codegen(opts: &SysrootOptions, libbpf_dir: &Path) -> Result<(), anyhow::E } let generated = dir.join("src").join(arch.to_string()); - // write the bindings, with the original helpers removed - write_to_file_fmt( - generated.join("bindings.rs"), - &tree.to_token_stream().to_string(), - )?; + create_dir_all(&generated)?; + // write the bindings, with the original helpers removed + // // write the new helpers as expanded by expand_helpers() - write_to_file_fmt( - generated.join("helpers.rs"), - &format!("use super::bindings::*; {helpers}"), - )?; + for (path, code) in [ + ( + generated.join("bindings.rs"), + &tree.to_token_stream().to_string(), + ), + ( + generated.join("helpers.rs"), + &format!("use super::bindings::*; {helpers}"), + ), + ] { + use std::io::Write as _; + + let mut file = File::create(path)?; + file.write_all(code.as_bytes())?; + } } Ok(()) diff --git a/xtask/src/codegen/helpers.rs b/xtask/src/codegen/helpers.rs index 54c502b6..47243ebb 100644 --- a/xtask/src/codegen/helpers.rs +++ b/xtask/src/codegen/helpers.rs @@ -1,12 +1,12 @@ use proc_macro2::TokenStream; -use quote::{quote, TokenStreamExt}; +use quote::{TokenStreamExt as _, quote}; use syn::{ - punctuated::Punctuated, AngleBracketedGenericArguments, BareFnArg, ForeignItem, - ForeignItemStatic, GenericArgument, Ident, Item, Path, PathArguments, ReturnType, Token, Type, - TypeBareFn, TypePath, + AngleBracketedGenericArguments, BareFnArg, ForeignItem, ForeignItemStatic, GenericArgument, + Ident, Item, Path, PathArguments, ReturnType, Token, Type, TypeBareFn, TypePath, + punctuated::Punctuated, }; -pub fn extract_helpers(items: &[Item]) -> (Vec, Vec>) { +pub(crate) fn extract_helpers(items: &[Item]) -> (Vec, Vec>) { let mut helpers = Vec::new(); let mut indexes = Vec::new(); for (item_index, item) in items.iter().enumerate() { @@ -29,7 +29,7 @@ pub fn extract_helpers(items: &[Item]) -> (Vec, Vec>) { (indexes, helpers) } -pub fn helper_from_item(item: &ForeignItemStatic, call_index: usize) -> Option> { +pub(crate) fn helper_from_item(item: &ForeignItemStatic, call_index: usize) -> Option> { if let Type::Path(TypePath { path: Path { segments, .. }, .. @@ -55,7 +55,7 @@ pub fn helper_from_item(item: &ForeignItemStatic, call_index: usize) -> Option]) -> TokenStream { +pub(crate) fn expand_helpers(helpers: &[Helper<'_>]) -> TokenStream { let mut tokens = TokenStream::new(); tokens.append_all( helpers @@ -67,7 +67,7 @@ pub fn expand_helpers(helpers: &[Helper<'_>]) -> TokenStream { tokens } -pub fn expand_helper(helper: &Helper<'_>) -> TokenStream { +pub(crate) fn expand_helper(helper: &Helper<'_>) -> TokenStream { let Helper { ident, ty, @@ -91,7 +91,7 @@ pub fn expand_helper(helper: &Helper<'_>) -> TokenStream { helper } -pub struct Helper<'a> { +pub(crate) struct Helper<'a> { ident: &'a Ident, ty: &'a Type, inputs: &'a Punctuated, diff --git a/xtask/src/codegen/mod.rs b/xtask/src/codegen/mod.rs index 4c279684..aaeff28c 100644 --- a/xtask/src/codegen/mod.rs +++ b/xtask/src/codegen/mod.rs @@ -4,27 +4,49 @@ mod helpers; use std::path::{Path, PathBuf}; +use anyhow::{Context as _, Result}; use clap::Parser; const SUPPORTED_ARCHS: &[Architecture] = &[ + Architecture::Mips, Architecture::X86_64, Architecture::ARMv7, Architecture::AArch64, Architecture::RISCV64, + Architecture::PowerPC64, + Architecture::S390X, + Architecture::LoongArch64, ]; #[derive(Debug, Copy, Clone)] -pub enum Architecture { +pub(crate) enum Architecture { X86_64, ARMv7, AArch64, RISCV64, + PowerPC64, + S390X, + Mips, + LoongArch64, } impl Architecture { - pub fn supported() -> &'static [Architecture] { + pub(crate) fn supported() -> &'static [Self] { SUPPORTED_ARCHS } + + pub(crate) fn target(&self) -> &'static str { + match self { + Self::AArch64 => "aarch64-unknown-linux-gnu", + Self::ARMv7 => "armv7-unknown-linux-gnu", + Self::LoongArch64 => "loongarch64-unknown-linux-gnu", + Self::Mips => "mips-unknown-linux-gnu", + Self::PowerPC64 => "powerpc64le-unknown-linux-gnu", + Self::RISCV64 => "riscv64-unknown-linux-gnu", + Self::S390X => "s390x-unknown-linux-gnu", + Self::X86_64 => "x86_64-unknown-linux-gnu", + } + } } impl std::str::FromStr for Architecture { @@ -32,10 +54,14 @@ impl std::str::FromStr for Architecture { fn from_str(s: &str) -> Result { Ok(match s { - "x86_64" => Architecture::X86_64, - "armv7" => Architecture::ARMv7, - "aarch64" => Architecture::AArch64, - "riscv64" => Architecture::RISCV64, + "aarch64" => Self::AArch64, + "armv7" => Self::ARMv7, + "loongarch64" => Self::LoongArch64, + "mips" => Self::Mips, + "powerpc64" => Self::PowerPC64, + "riscv64" => Self::RISCV64, + "s390x" => Self::S390X, + "x86_64" => Self::X86_64, _ => return Err("invalid architecture"), }) } @@ -44,10 +70,14 @@ impl std::str::FromStr for Architecture { impl std::fmt::Display for Architecture { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.write_str(match self { - Architecture::X86_64 => "x86_64", - Architecture::ARMv7 => "armv7", - Architecture::AArch64 => "aarch64", - Architecture::RISCV64 => "riscv64", + Self::AArch64 => "aarch64", + Self::ARMv7 => "armv7", + Self::LoongArch64 => "loongarch64", + Self::Mips => "mips", + Self::PowerPC64 => "powerpc64", + Self::RISCV64 => "riscv64", + Self::S390X => "s390x", + Self::X86_64 => "x86_64", }) } } @@ -55,50 +85,66 @@ impl std::fmt::Display for Architecture { // sysroot options. Default to ubuntu headers installed by the // libc6-dev-{arm64,armel}-cross packages. #[derive(Parser)] -pub struct SysrootOptions { - #[arg(long, default_value = "/usr/include/x86_64-linux-gnu", action)] - x86_64_sysroot: PathBuf, - +pub(crate) struct SysrootOptions { #[arg(long, default_value = "/usr/aarch64-linux-gnu/include", action)] aarch64_sysroot: PathBuf, #[arg(long, default_value = "/usr/arm-linux-gnueabi/include", action)] armv7_sysroot: PathBuf, + #[arg(long, default_value = "/usr/loongarch64-linux-gnu/include", action)] + loongarch64_sysroot: PathBuf, + + #[arg(long, default_value = "/usr/mips-linux-gnu/include", action)] + mips_sysroot: PathBuf, + + #[arg(long, default_value = "/usr/powerpc64le-linux-gnu/include", action)] + powerpc64_sysroot: PathBuf, + #[arg(long, default_value = "/usr/riscv64-linux-gnu/include", action)] riscv64_sysroot: PathBuf, + + #[arg(long, default_value = "/usr/s390x-linux-gnu/include", action)] + s390x_sysroot: PathBuf, + + #[arg(long, default_value = "/usr/include/x86_64-linux-gnu", action)] + x86_64_sysroot: PathBuf, } #[derive(Parser)] -pub struct Options { - #[command(flatten)] +pub(crate) struct Options { + #[clap(flatten)] sysroot_options: SysrootOptions, - #[command(subcommand)] - command: Option, + #[clap(subcommand)] + command: Option, } #[derive(clap::Subcommand)] -enum Command { +enum Target { #[command(name = "aya")] Aya, #[command(name = "aya-ebpf-bindings")] AyaEbpfBindings, } -pub fn codegen(opts: Options, libbpf_dir: &Path) -> Result<(), anyhow::Error> { +pub(crate) fn codegen(opts: Options, libbpf_dir: &Path) -> Result<()> { let Options { sysroot_options, command, } = opts; + match command { Some(command) => match command { - Command::Aya => aya::codegen(&sysroot_options, libbpf_dir), - Command::AyaEbpfBindings => aya_ebpf_bindings::codegen(&sysroot_options, libbpf_dir), + Target::Aya => aya::codegen(&sysroot_options, libbpf_dir).context("aya"), + Target::AyaEbpfBindings => aya_ebpf_bindings::codegen(&sysroot_options, libbpf_dir) + .context("aya_ebpf_bindings"), }, None => { - aya::codegen(&sysroot_options, libbpf_dir)?; + aya::codegen(&sysroot_options, libbpf_dir).context("aya")?; aya_ebpf_bindings::codegen(&sysroot_options, libbpf_dir) + .context("aya_ebpf_bindings")?; + Ok(()) } } } diff --git a/xtask/src/docs.rs b/xtask/src/docs.rs index df4f7170..e5db1315 100644 --- a/xtask/src/docs.rs +++ b/xtask/src/docs.rs @@ -5,7 +5,7 @@ use cargo_metadata::Metadata; use indoc::{indoc, writedoc}; use xtask::exec; -pub fn docs(metadata: Metadata) -> Result<()> { +pub(crate) fn docs(metadata: Metadata) -> Result<()> { const PACKAGE_TO_DESCRIPTION: &[(&str, &str)] = &[ ("aya", "User-space BPF program loading and manipulation"), ( diff --git a/xtask/src/lib.rs b/xtask/src/lib.rs index 47c6c56c..b74fa420 100644 --- a/xtask/src/lib.rs +++ b/xtask/src/lib.rs @@ -1,6 +1,8 @@ -use std::process::Command; +#![expect(unused_crate_dependencies, reason = "used in bin")] -use anyhow::{bail, Context as _, Result}; +use std::{ffi::OsString, path::Path, process::Command}; + +use anyhow::{Context as _, Result, bail}; pub const AYA_BUILD_INTEGRATION_BPF: &str = "AYA_BUILD_INTEGRATION_BPF"; pub const LIBBPF_DIR: &str = "xtask/libbpf"; @@ -15,6 +17,24 @@ pub fn exec(cmd: &mut Command) -> Result<()> { Ok(()) } +/// Returns a [`Command`]` that Installs the libbpf headers files from the `source_dir` to the +/// `headers_dir`. +pub fn install_libbpf_headers_cmd( + source_dir: impl AsRef, + headers_dir: impl AsRef, +) -> Command { + let mut includedir = OsString::new(); + includedir.push("INCLUDEDIR="); + includedir.push(headers_dir.as_ref().as_os_str()); + + let mut cmd = Command::new("make"); + cmd.arg("-C") + .arg(source_dir.as_ref().join("src")) + .arg(includedir) + .arg("install_headers"); + cmd +} + #[derive(Debug)] pub struct Errors(Vec); @@ -34,7 +54,7 @@ where if i != 0 { writeln!(f)?; } - write!(f, "{:?}", error)?; + write!(f, "{error:?}")?; } Ok(()) } diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 9060f16e..99c48c0e 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -3,12 +3,12 @@ mod docs; mod public_api; mod run; -use std::process::Command; +use std::process::{Command, Output}; -use anyhow::{Context as _, Result}; +use anyhow::{Context as _, Result, bail}; use cargo_metadata::{Metadata, MetadataCommand}; use clap::Parser; -use xtask::{exec, LIBBPF_DIR}; +use xtask::{LIBBPF_DIR, exec}; #[derive(Parser)] pub struct XtaskOptions { @@ -33,12 +33,29 @@ fn main() -> Result<()> { .context("failed to run cargo metadata")?; let Metadata { workspace_root, .. } = &metadata; - // Initialize the submodules. - exec(Command::new("git").arg("-C").arg(workspace_root).args([ - "submodule", - "update", - "--init", - ]))?; + let mut libbpf_submodule_status = Command::new("git"); + let output = libbpf_submodule_status + .arg("-C") + .arg(workspace_root) + .arg("submodule") + .arg("status") + .arg(LIBBPF_DIR) + .output() + .with_context(|| format!("failed to run {libbpf_submodule_status:?}"))?; + let Output { status, .. } = &output; + if !status.success() { + bail!("{libbpf_submodule_status:?} failed: {output:?}") + } + let Output { stdout, .. } = output; + if !stdout.starts_with(b" ") { + // Initialize the submodules. + exec(Command::new("git").arg("-C").arg(workspace_root).args([ + "submodule", + "update", + "--init", + ]))?; + } + let libbpf_dir = workspace_root.join(LIBBPF_DIR); let libbpf_dir = libbpf_dir.as_std_path(); diff --git a/xtask/src/public_api.rs b/xtask/src/public_api.rs index ac11ee18..bdb73145 100644 --- a/xtask/src/public_api.rs +++ b/xtask/src/public_api.rs @@ -1,29 +1,29 @@ use std::{ fmt::Write as _, - fs::{read_to_string, File}, + fs::{File, read_to_string}, io::Write as _, path::Path, }; -use anyhow::{bail, Context as _, Result}; +use anyhow::{Context as _, Result, bail}; use cargo_metadata::{Metadata, Package, Target}; use clap::Parser; -use dialoguer::{theme::ColorfulTheme, Confirm}; -use diff::{lines, Result as Diff}; +use dialoguer::{Confirm, theme::ColorfulTheme}; +use diff::{Result as Diff, lines}; use xtask::Errors; #[derive(Debug, Parser)] -pub struct Options { +pub(crate) struct Options { /// Bless new API changes. #[clap(long)] pub bless: bool, - /// Bless new API changes. + /// Build for the target triple. #[clap(long)] pub target: Option, } -pub fn public_api(options: Options, metadata: Metadata) -> Result<()> { +pub(crate) fn public_api(options: Options, metadata: Metadata) -> Result<()> { let toolchain = "nightly"; let Options { bless, target } = options; @@ -56,16 +56,13 @@ pub fn public_api(options: Options, metadata: Metadata) -> Result<()> { if matches!(publish, Some(publish) if publish.is_empty()) { Ok(()) } else { - let target = target.as_ref().and_then(|target| { - let proc_macro = targets.iter().any(|Target { kind, .. }| { - kind.iter().any(|kind| kind == "proc-macro") - }); - (!proc_macro).then_some(target) - }); + let target = (!targets.iter().any(Target::is_proc_macro)) + .then(|| target.clone()) + .flatten(); let diff = check_package_api( &name, toolchain, - target.cloned(), + target, bless, workspace_root.as_std_path(), ) @@ -80,9 +77,14 @@ pub fn public_api(options: Options, metadata: Metadata) -> Result<()> { } }, ) - .filter_map(|result| match result { - Ok(()) => None, - Err(err) => Some(err), + .filter_map(|result| { + // TODO(https://github.com/rust-lang/rust-clippy/issues/14112): Remove this allowance + // when the lint behaves more sensibly. + #[expect(clippy::manual_ok_err)] + match result { + Ok(()) => None, + Err(err) => Some(err), + } }) .collect(); @@ -115,8 +117,7 @@ fn check_package_api( } let rustdoc_json = builder.build().with_context(|| { format!( - "rustdoc_json::Builder::default().toolchain({}).package({}).build()", - toolchain, package + "rustdoc_json::Builder::default().toolchain({toolchain}).package({package}).build()" ) })?; @@ -132,7 +133,7 @@ fn check_package_api( if bless { let mut output = File::create(&path).with_context(|| format!("error creating {}", path.display()))?; - write!(&mut output, "{}", public_api) + write!(&mut output, "{public_api}") .with_context(|| format!("error writing {}", path.display()))?; } let current_api = @@ -143,8 +144,8 @@ fn check_package_api( .fold(String::new(), |mut buf, diff| { match diff { Diff::Both(..) => (), - Diff::Right(line) => writeln!(&mut buf, "-{}", line).unwrap(), - Diff::Left(line) => writeln!(&mut buf, "+{}", line).unwrap(), + Diff::Right(line) => writeln!(&mut buf, "-{line}").unwrap(), + Diff::Left(line) => writeln!(&mut buf, "+{line}").unwrap(), }; buf })) diff --git a/xtask/src/run.rs b/xtask/src/run.rs index 8bba7a53..a5da361f 100644 --- a/xtask/src/run.rs +++ b/xtask/src/run.rs @@ -1,19 +1,22 @@ use std::{ - env::consts::{ARCH, OS}, ffi::OsString, fmt::Write as _, - fs::{copy, create_dir_all, OpenOptions}, - io::{BufRead as _, BufReader, ErrorKind, Write as _}, - path::{Path, PathBuf}, + fs::{self, File, OpenOptions}, + io::{BufRead as _, BufReader, Write as _}, + ops::Deref as _, + path::{self, Path, PathBuf}, process::{Child, ChildStdin, Command, Output, Stdio}, sync::{Arc, Mutex}, thread, }; -use anyhow::{anyhow, bail, Context as _, Result}; +use anyhow::{Context as _, Result, anyhow, bail}; use cargo_metadata::{Artifact, CompilerMessage, Message, Target}; use clap::Parser; -use xtask::{exec, Errors, AYA_BUILD_INTEGRATION_BPF}; +use walkdir::WalkDir; +use xtask::{AYA_BUILD_INTEGRATION_BPF, Errors}; + +const GEN_INIT_CPIO_PATCH: &str = include_str!("../patches/gen_init_cpio.c.macos.diff"); #[derive(Parser)] enum Environment { @@ -25,25 +28,24 @@ enum Environment { }, /// Runs the integration tests in a VM. VM { - /// The kernel images to use. - /// - /// You can download some images with: - /// - /// wget --accept-regex '.*/linux-image-[0-9\.-]+-cloud-.*-unsigned*' \ - /// --recursive ftp://ftp.us.debian.org/debian/pool/main/l/linux/ - /// - /// You can then extract them with: + /// The cache directory in which to store intermediate artifacts. + #[clap(long)] + cache_dir: PathBuf, + + /// The Github API token to use if network requests to Github are made. /// - /// find . -name '*.deb' -print0 \ - /// | xargs -0 -I {} sh -c "dpkg --fsys-tarfile {} \ - /// | tar --wildcards --extract '*vmlinuz*' --file -" + /// This may be required if Github rate limits are exceeded. + #[clap(long)] + github_api_token: Option, + + /// Debian kernel archives (.deb) to boot in the VM. #[clap(required = true)] - kernel_image: Vec, + kernel_archives: Vec, }, } #[derive(Parser)] -pub struct Options { +pub(crate) struct Options { #[clap(subcommand)] environment: Environment, /// Arguments to pass to your application. @@ -51,30 +53,29 @@ pub struct Options { run_args: Vec, } -pub fn build(target: Option<&str>, f: F) -> Result> +pub(crate) fn build(target: Option<&str>, f: F) -> Result> where F: FnOnce(&mut Command) -> &mut Command, { - // Always use rust-lld and -Zbuild-std in case we're cross-compiling. - let mut cmd = Command::new("cargo"); - cmd.args(["build", "--message-format=json"]); + // Always use rust-lld in case we're cross-compiling. + let mut cargo = Command::new("cargo"); + cargo.args(["build", "--message-format=json"]); if let Some(target) = target { - let config = format!("target.{target}.linker = \"rust-lld\""); - cmd.args(["--target", target, "--config", &config]); + cargo.args(["--target", target]); } - f(&mut cmd); + f(&mut cargo); - let mut child = cmd + let mut cargo_child = cargo .stdout(Stdio::piped()) .spawn() - .with_context(|| format!("failed to spawn {cmd:?}"))?; - let Child { stdout, .. } = &mut child; + .with_context(|| format!("failed to spawn {cargo:?}"))?; + let Child { stdout, .. } = &mut cargo_child; let stdout = stdout.take().unwrap(); let stdout = BufReader::new(stdout); let mut executables = Vec::new(); for message in Message::parse_stream(stdout) { - #[allow(clippy::collapsible_match)] + #[expect(clippy::collapsible_match)] match message.context("valid JSON")? { Message::CompilerArtifact(Artifact { executable, @@ -86,8 +87,8 @@ where } } Message::CompilerMessage(CompilerMessage { message, .. }) => { - for line in message.rendered.unwrap_or_default().split('\n') { - println!("cargo:warning={line}"); + if let Some(rendered) = message.rendered { + print!("{rendered}"); } } Message::TextLine(line) => { @@ -97,17 +98,97 @@ where } } - let status = child + let status = cargo_child .wait() - .with_context(|| format!("failed to wait for {cmd:?}"))?; + .with_context(|| format!("failed to wait for {cargo:?}"))?; if status.code() != Some(0) { - bail!("{cmd:?} failed: {status:?}") + bail!("{cargo:?} failed: {status:?}") } Ok(executables) } +enum Disposition { + Skip, + Unpack(T), +} + +fn with_deb(archive: &Path, dest: &Path, mut state: S, mut select: F) -> Result +where + F: for<'state> FnMut( + &'state mut S, + &Path, + tar::EntryType, + ) -> Disposition>>, +{ + fs::create_dir_all(dest).with_context(|| format!("failed to create {}", dest.display()))?; + + let archive_reader = File::open(archive) + .with_context(|| format!("failed to open the deb package {}", archive.display()))?; + let mut archive_reader = ar::Archive::new(archive_reader); + // `ar` entries are borrowed from the reader, so the reader + // cannot implement `Iterator` (because `Iterator::Item` is not + // a GAT). + // + // https://github.com/mdsteele/rust-ar/issues/15 + let mut data_tar_xz_entries = 0; + let start = std::time::Instant::now(); + while let Some(entry) = archive_reader.next_entry() { + let entry = entry.with_context(|| format!("({}).next_entry()", archive.display()))?; + const DATA_TAR_XZ: &str = "data.tar.xz"; + if entry.header().identifier() != DATA_TAR_XZ.as_bytes() { + continue; + } + data_tar_xz_entries += 1; + let entry_reader = xz2::read::XzDecoder::new(entry); + let mut entry_reader = tar::Archive::new(entry_reader); + let entries = entry_reader + .entries() + .with_context(|| format!("({}/{DATA_TAR_XZ}).entries()", archive.display()))?; + for (i, entry) in entries.enumerate() { + let mut entry = entry + .with_context(|| format!("({}/{DATA_TAR_XZ}).entries()[{i}]", archive.display()))?; + let path = entry.path().with_context(|| { + format!( + "({}/{DATA_TAR_XZ}).entries()[{i}].path()", + archive.display() + ) + })?; + let entry_type = entry.header().entry_type(); + let selected = match select(&mut state, path.as_ref(), entry_type) { + Disposition::Skip => continue, + Disposition::Unpack(selected) => selected, + }; + if let Some(selected) = selected { + println!( + "{}[{}] in {:?}", + archive.display(), + path.display(), + start.elapsed() + ); + selected.push(dest.join(path)); + } + let unpacked = entry.unpack_in(dest).with_context(|| { + format!( + "({}/{DATA_TAR_XZ})[{i}].unpack_in({})", + archive.display(), + dest.display(), + ) + })?; + assert!( + unpacked, + "({}/{DATA_TAR_XZ})[{i}].unpack_in({})", + archive.display(), + dest.display(), + ); + } + } + println!("{} in {:?}", archive.display(), start.elapsed()); + assert_eq!(data_tar_xz_entries, 1); + Ok(state) +} + /// Build and run the project. -pub fn run(opts: Options) -> Result<()> { +pub(crate) fn run(opts: Options) -> Result<()> { let Options { environment, run_args, @@ -149,7 +230,11 @@ pub fn run(opts: Options) -> Result<()> { for (profile, binaries) in binaries { for (name, binary) in binaries { let mut cmd = Command::new(runner); - let cmd = cmd.args(args.iter()).arg(binary).args(run_args.clone()); + cmd.args(args.iter()) + .arg(binary) + .args(run_args.clone()) + .env("RUST_BACKTRACE", "1") + .env("RUST_LOG", "debug"); println!("{profile}:{name} running {cmd:?}"); @@ -168,76 +253,209 @@ pub fn run(opts: Options) -> Result<()> { Err(anyhow!("failures:\n{}", failures)) } } - Environment::VM { kernel_image } => { + Environment::VM { + cache_dir, + github_api_token, + kernel_archives, + } => { // The user has asked us to run the tests on a VM. This is involved; strap in. // // We need tools to build the initramfs; we use gen_init_cpio from the Linux repository, // taking care to cache it. // - // Then we iterate the kernel images, using the `file` program to guess the target + // We iterate the kernel images, using the `file` program to guess the target // architecture. We then build the init program and our test binaries for that // architecture, and use gen_init_cpio to build an initramfs containing the test - // binaries. We're almost ready to run the VM. + // binaries. We're ready to run the VM. // - // We consult our OS, our architecture, and the target architecture to determine if - // hardware acceleration is available, and then start QEMU with the provided kernel - // image and the initramfs we built. + // We start QEMU with the provided kernel image and the initramfs we built. // // We consume the output of QEMU, looking for the output of our init program. This is // the only way to distinguish success from failure. We batch up the errors across all - // VM images and report to the user. The end. - let cache_dir = Path::new("test/.tmp"); - create_dir_all(cache_dir).context("failed to create cache dir")?; + // VM images and report to the user. + // + // The end. + + fs::create_dir_all(&cache_dir).context("failed to create cache dir")?; + let gen_init_cpio = cache_dir.join("gen_init_cpio"); - if !gen_init_cpio - .try_exists() - .context("failed to check existence of gen_init_cpio")? { + let dest_path = cache_dir.join("gen_init_cpio.c"); + let etag_path = cache_dir.join("gen_init_cpio.etag"); + let dest_path_exists = dest_path.try_exists().with_context(|| { + format!("failed to check existence of {}", dest_path.display()) + })?; + let etag_path_exists = etag_path.try_exists().with_context(|| { + format!("failed to check existence of {}", etag_path.display()) + })?; + if dest_path_exists != etag_path_exists { + println!( + "({}).exists()={} != ({})={} (mismatch)", + dest_path.display(), + dest_path_exists, + etag_path.display(), + etag_path_exists, + ) + } + + // Currently unused. Can be used for authenticated requests if needed in the future. + drop(github_api_token); + let mut curl = Command::new("curl"); curl.args([ "-sfSL", "https://raw.githubusercontent.com/torvalds/linux/master/usr/gen_init_cpio.c", - ]); - let mut curl_child = curl - .stdout(Stdio::piped()) + "--output", + ]) + .arg(&dest_path); + for arg in ["--etag-compare", "--etag-save"] { + curl.arg(arg).arg(&etag_path); + } + + let output = curl + .output() + .with_context(|| format!("failed to run {curl:?}"))?; + let Output { status, .. } = &output; + if status.code() != Some(0) { + if dest_path_exists { + println!( + "{curl:?} failed ({status:?}); using cached {}", + dest_path.display() + ); + } else { + bail!("{curl:?} failed: {output:?}") + } + } + + let mut patch = Command::new("patch"); + patch + .current_dir(&cache_dir) + .args(["--quiet", "--forward", "--output", "-"]) + .stdin(Stdio::piped()) + .stdout(Stdio::piped()); + let mut patch_child = patch .spawn() - .with_context(|| format!("failed to spawn {curl:?}"))?; - let Child { stdout, .. } = &mut curl_child; - let curl_stdout = stdout.take().unwrap(); + .with_context(|| format!("failed to spawn {patch:?}"))?; + + let Child { stdin, stdout, .. } = &mut patch_child; + let mut stdin = stdin.take().unwrap(); + stdin + .write_all(GEN_INIT_CPIO_PATCH.as_bytes()) + .with_context(|| format!("failed to write to {patch:?} stdin"))?; + drop(stdin); // Must explicitly close to signal EOF. + let stdout = stdout.take().unwrap(); let mut clang = Command::new("clang"); - let clang = exec( - clang - .args(["-g", "-O2", "-x", "c", "-", "-o"]) - .arg(&gen_init_cpio) - .stdin(curl_stdout), - ); + clang + .args(["-g", "-O2", "-x", "c", "-", "-o"]) + .arg(&gen_init_cpio) + .stdin(stdout); + let clang_child = clang + .spawn() + .with_context(|| format!("failed to spawn {clang:?}"))?; - let output = curl_child + let output = patch_child .wait_with_output() - .with_context(|| format!("failed to wait for {curl:?}"))?; + .with_context(|| format!("failed to wait for {patch:?}"))?; let Output { status, .. } = &output; if status.code() != Some(0) { - bail!("{curl:?} failed: {output:?}") + bail!("{patch:?} failed: {output:?}") } - // Check the result of clang *after* checking curl; in case the download failed, - // only curl's output will be useful. - clang?; + let output = clang_child + .wait_with_output() + .with_context(|| format!("failed to wait for {clang:?}"))?; + let Output { status, .. } = &output; + if status.code() != Some(0) { + bail!("{clang:?} failed: {output:?}") + } } + let extraction_root = tempfile::tempdir().context("tempdir failed")?; let mut errors = Vec::new(); - for kernel_image in kernel_image { + for (index, archive) in kernel_archives.iter().enumerate() { + let (kernel_images, configs, modules_dirs) = with_deb( + archive, + &extraction_root + .path() + .join(format!("kernel-archive-{index}")), + (Vec::new(), Vec::new(), Vec::new()), + |(kernel_images, configs, modules_dirs), path, entry_type| { + if let Some(path) = ["./lib/modules/", "./usr/lib/modules/"] + .into_iter() + .find_map(|modules_dir| { + // TODO(https://github.com/rust-lang/rust-clippy/issues/14112): Remove this + // allowance when the lint behaves more sensibly. + #[expect(clippy::manual_ok_err)] + match path.strip_prefix(modules_dir) { + Ok(path) => Some(path), + Err(path::StripPrefixError { .. }) => None, + } + }) + { + return Disposition::Unpack( + (path.iter().count() == 1).then_some(modules_dirs), + ); + } + if !entry_type.is_file() { + return Disposition::Skip; + } + let name = match path.strip_prefix("./boot/") { + Ok(path) => { + if let Some(path::Component::Normal(name)) = + path.components().next() + { + name + } else { + return Disposition::Skip; + } + } + Err(path::StripPrefixError { .. }) => return Disposition::Skip, + }; + let name = name.as_encoded_bytes(); + if name.starts_with(b"vmlinuz-") { + Disposition::Unpack(Some(kernel_images)) + } else if name.starts_with(b"config-") { + Disposition::Unpack(Some(configs)) + } else { + Disposition::Skip + } + }, + )?; + let kernel_image = match kernel_images.as_slice() { + [kernel_image] => kernel_image, + [] => bail!("no kernel images in {}", archive.display()), + kernel_images => bail!( + "multiple kernel images in {}: {:?}", + archive.display(), + kernel_images + ), + }; + let config = match configs.as_slice() { + [config] => config, + [] => bail!("no configs in {}", archive.display()), + configs => bail!("multiple configs in {}: {:?}", archive.display(), configs), + }; + let modules_dir = match modules_dirs.as_slice() { + [modules_dir] => modules_dir, + [] => bail!("no modules directories in {}", archive.display()), + modules_dirs => bail!( + "multiple modules directories in {}: {:?}", + archive.display(), + modules_dirs + ), + }; + // Guess the guest architecture. - let mut cmd = Command::new("file"); - let output = cmd + let mut file = Command::new("file"); + let output = file .arg("--brief") - .arg(&kernel_image) + .arg(kernel_image) .output() - .with_context(|| format!("failed to run {cmd:?}"))?; + .with_context(|| format!("failed to run {file:?}"))?; let Output { status, .. } = &output; if status.code() != Some(0) { - bail!("{cmd:?} failed: {output:?}") + bail!("{file:?} failed: {output:?}") } let Output { stdout, .. } = output; @@ -248,38 +466,28 @@ pub fn run(opts: Options) -> Result<()> { // - Linux kernel x86 boot executable bzImage, version 6.1.0-10-cloud-amd64 [..] let stdout = String::from_utf8(stdout) - .with_context(|| format!("invalid UTF-8 in {cmd:?} stdout"))?; + .with_context(|| format!("invalid UTF-8 in {file:?} stdout"))?; let (_, stdout) = stdout .split_once("Linux kernel") - .ok_or_else(|| anyhow!("failed to parse {cmd:?} stdout: {stdout}"))?; + .ok_or_else(|| anyhow!("failed to parse {file:?} stdout: {stdout}"))?; let (guest_arch, _) = stdout .split_once("boot executable") - .ok_or_else(|| anyhow!("failed to parse {cmd:?} stdout: {stdout}"))?; + .ok_or_else(|| anyhow!("failed to parse {file:?} stdout: {stdout}"))?; let guest_arch = guest_arch.trim(); - let (guest_arch, machine, cpu) = match guest_arch { - "ARM64" => ("aarch64", Some("virt"), Some("cortex-a57")), - "x86" => ("x86_64", Some("q35"), Some("qemu64")), - guest_arch => (guest_arch, None, None), + let (guest_arch, machine, cpu, console) = match guest_arch { + "ARM64" => ("aarch64", Some("virt"), Some("max"), "ttyAMA0"), + "x86" => ("x86_64", None, Some("host"), "ttyS0"), + guest_arch => (guest_arch, None, None, "ttyS0"), }; let target = format!("{guest_arch}-unknown-linux-musl"); - // Build our init program. The contract is that it will run anything it finds in /bin. - let init = build(Some(&target), |cmd| { - cmd.args(["--package", "init", "--profile", "release"]) - }) - .context("building init program failed")?; - - let init = match &*init { - [(name, init)] => { - if name != "init" { - bail!("expected init program to be named init, found {name}") - } - init - } - init => bail!("expected exactly one init program, found {init:?}"), - }; + let test_distro_args = + ["--package", "test-distro", "--release", "--features", "xz2"]; + let test_distro: Vec<(String, PathBuf)> = + build(Some(&target), |cmd| cmd.args(test_distro_args)) + .context("building test-distro package failed")?; let binaries = binaries(Some(&target))?; @@ -302,44 +510,110 @@ pub fn run(opts: Options) -> Result<()> { .spawn() .with_context(|| format!("failed to spawn {gen_init_cpio:?}"))?; let Child { stdin, .. } = &mut gen_init_cpio_child; - let mut stdin = stdin.take().unwrap(); - + let stdin = Arc::new(stdin.take().unwrap()); use std::os::unix::ffi::OsStrExt as _; - // Send input into gen_init_cpio which looks something like + // Send input into gen_init_cpio for directories // - // file /init path-to-init 0755 0 0 - // dir /bin 0755 0 0 - // file /bin/foo path-to-foo 0755 0 0 - // file /bin/bar path-to-bar 0755 0 0 - - for bytes in [ - "file /init ".as_bytes(), - init.as_os_str().as_bytes(), - " 0755 0 0\n".as_bytes(), - "dir /bin 0755 0 0\n".as_bytes(), - ] { - stdin.write_all(bytes).expect("write"); + // dir /bin 755 0 0 + let write_dir = |out_path: &Path| { + for bytes in [ + "dir ".as_bytes(), + out_path.as_os_str().as_bytes(), + " ".as_bytes(), + "755 0 0\n".as_bytes(), + ] { + stdin.deref().write_all(bytes).expect("write"); + } + }; + + // Send input into gen_init_cpio for files + // + // file /init path-to-init 755 0 0 + let write_file = |out_path: &Path, in_path: &Path, mode: &str| { + for bytes in [ + "file ".as_bytes(), + out_path.as_os_str().as_bytes(), + " ".as_bytes(), + in_path.as_os_str().as_bytes(), + " ".as_bytes(), + mode.as_bytes(), + "\n".as_bytes(), + ] { + stdin.deref().write_all(bytes).expect("write"); + } + }; + + write_dir(Path::new("/bin")); + write_dir(Path::new("/sbin")); + write_dir(Path::new("/boot")); + write_dir(Path::new("/lib")); + write_dir(Path::new("/lib/modules")); + + write_file(Path::new("/boot/config"), config, "644 0 0"); + if let Some(name) = config.file_name() { + write_file(&Path::new("/boot").join(name), config, "644 0 0"); + } + + test_distro.iter().for_each(|(name, path)| { + if name == "init" { + write_file(Path::new("/init"), path, "755 0 0"); + } else { + write_file(&Path::new("/sbin").join(name), path, "755 0 0"); + } + }); + + // At this point we need to make a slight detour! + // Preparing the `modules.alias` file inside the VM as part of + // `/init` is slow. It's faster to prepare it here. + let mut cargo = Command::new("cargo"); + let output = cargo + .arg("run") + .args(test_distro_args) + .args(["--bin", "depmod", "--", "-b"]) + .arg(modules_dir) + .output() + .with_context(|| format!("failed to run {cargo:?}"))?; + let Output { status, .. } = &output; + if status.code() != Some(0) { + bail!("{cargo:?} failed: {output:?}") + } + + // Now our modules.alias file is built, we can recursively + // walk the modules directory and add all the files to the + // initramfs. + for entry in WalkDir::new(modules_dir) { + let entry = entry.context("read_dir failed")?; + let path = entry.path(); + let metadata = entry.metadata().context("metadata failed")?; + let out_path = Path::new("/lib/modules").join( + path.strip_prefix(modules_dir).with_context(|| { + format!( + "strip prefix {} failed for {}", + path.display(), + modules_dir.display() + ) + })?, + ); + if metadata.file_type().is_dir() { + write_dir(&out_path); + } else if metadata.file_type().is_file() { + write_file(&out_path, path, "644 0 0"); + } } for (profile, binaries) in binaries { for (name, binary) in binaries { - let name = format!("{}-{}", profile, name); + let name = format!("{profile}-{name}"); let path = tmp_dir.path().join(&name); - copy(&binary, &path).with_context(|| { + fs::copy(&binary, &path).with_context(|| { format!("copy({}, {}) failed", binary.display(), path.display()) })?; - for bytes in [ - "file /bin/".as_bytes(), - name.as_bytes(), - " ".as_bytes(), - path.as_os_str().as_bytes(), - " 0755 0 0\n".as_bytes(), - ] { - stdin.write_all(bytes).expect("write"); - } + let out_path = Path::new("/bin").join(&name); + write_file(&out_path, &path, "755 0 0"); } } + // Must explicitly close to signal EOF. drop(stdin); @@ -355,32 +629,13 @@ pub fn run(opts: Options) -> Result<()> { if let Some(machine) = machine { qemu.args(["-machine", machine]); } - if guest_arch == ARCH { - match OS { - "linux" => { - const KVM: &str = "/dev/kvm"; - match OpenOptions::new().read(true).write(true).open(KVM) { - Ok(_file) => { - qemu.args(["-accel", "kvm"]); - } - Err(error) => match error.kind() { - ErrorKind::NotFound | ErrorKind::PermissionDenied => {} - _kind => { - return Err(error) - .with_context(|| format!("failed to open {KVM}")); - } - }, - } - } - "macos" => { - qemu.args(["-accel", "hvf"]); - } - os => bail!("unsupported OS: {os}"), - } - } else if let Some(cpu) = cpu { + if let Some(cpu) = cpu { qemu.args(["-cpu", cpu]); } - let console = OsString::from("ttyS0"); + for accel in ["kvm", "hvf", "tcg"] { + qemu.args(["-accel", accel]); + } + let console = OsString::from(console); let mut kernel_args = std::iter::once(("console", &console)) .chain(run_args.clone().map(|run_arg| ("init.arg", run_arg))) .enumerate() @@ -399,52 +654,13 @@ pub fn run(opts: Options) -> Result<()> { // // Heed the advice and boot with noapic. We don't know why this happens. kernel_args.push(" noapic"); - qemu.args(["-no-reboot", "-nographic", "-m", "512M", "-smp", "2"]) + qemu.args(["-no-reboot", "-nographic", "-m", "1024M", "-smp", "2"]) .arg("-append") .arg(kernel_args) .arg("-kernel") - .arg(&kernel_image) + .arg(kernel_image) .arg("-initrd") .arg(&initrd_image); - if guest_arch == "aarch64" { - match OS { - "linux" => { - let mut cmd = Command::new("locate"); - let output = cmd - .arg("QEMU_EFI.fd") - .output() - .with_context(|| format!("failed to run {cmd:?}"))?; - let Output { status, .. } = &output; - if status.code() != Some(0) { - bail!("{qemu:?} failed: {output:?}") - } - let Output { stdout, .. } = output; - let bios = String::from_utf8(stdout) - .with_context(|| format!("failed to parse output of {cmd:?}"))?; - qemu.args(["-bios", bios.trim()]); - } - "macos" => { - let mut cmd = Command::new("brew"); - let output = cmd - .args(["list", "qemu", "-1", "-v"]) - .output() - .with_context(|| format!("failed to run {cmd:?}"))?; - let Output { status, .. } = &output; - if status.code() != Some(0) { - bail!("{qemu:?} failed: {output:?}") - } - let Output { stdout, .. } = output; - let output = String::from_utf8(stdout) - .with_context(|| format!("failed to parse output of {cmd:?}"))?; - const NAME: &str = "edk2-aarch64-code.fd"; - let bios = output.lines().find(|line| line.contains(NAME)).ok_or_else( - || anyhow!("failed to find {NAME} in output of {cmd:?}: {output}"), - )?; - qemu.args(["-bios", bios.trim()]); - } - os => bail!("unsupported OS: {os}"), - }; - } let mut qemu_child = qemu .stdin(Stdio::piped()) .stdout(Stdio::piped()) @@ -498,7 +714,7 @@ pub fn run(opts: Options) -> Result<()> { .spawn(move || { for line in stderr.lines() { let line = line.context("failed to read line from stderr")?; - eprintln!("{}", line); + eprintln!("{line}"); terminate_if_kernel_hang(&line, &stdin)?; } anyhow::Ok(()) @@ -509,7 +725,7 @@ pub fn run(opts: Options) -> Result<()> { let mut outcome = None; for line in stdout.lines() { let line = line.context("failed to read line from stdout")?; - println!("{}", line); + println!("{line}"); terminate_if_kernel_hang(&line, &stdin)?; // The init program will print "init: success" or "init: failure" to indicate // the outcome of running the binaries it found in /bin.