Liking cljdoc? Tell your friends :D

clj-ebpf.helpers

BPF helper function metadata and utilities.

Helper metadata is loaded from resources/bpf-helpers.edn, which allows easy extension and customization without code changes.

Usage:

  • (get-helper-info :map-lookup-elem) - Get metadata for a helper
  • (get-helper-id :ktime-get-ns) - Get helper function ID
  • (helpers-by-category :network) - Get all network helpers
  • (available-helpers :xdp "5.8") - Get helpers for program type and kernel
BPF helper function metadata and utilities.

Helper metadata is loaded from resources/bpf-helpers.edn, which allows
easy extension and customization without code changes.

Usage:
- (get-helper-info :map-lookup-elem) - Get metadata for a helper
- (get-helper-id :ktime-get-ns) - Get helper function ID
- (helpers-by-category :network) - Get all network helpers
- (available-helpers :xdp "5.8") - Get helpers for program type and kernel
raw docstring

all-helpersclj

(all-helpers)

Get all helpers including custom ones

Get all helpers including custom ones
sourceraw docstring

available-helpersclj

(available-helpers prog-type)
(available-helpers prog-type kernel-version)

Get helpers compatible with program type and kernel version

Get helpers compatible with program type and kernel version
sourceraw docstring

clear-custom-helpers!clj

(clear-custom-helpers!)

Remove all custom helpers

Remove all custom helpers
sourceraw docstring

get-helper-by-idclj

(get-helper-by-id id)

Look up helper by numeric ID

Look up helper by numeric ID
sourceraw docstring

get-helper-by-nameclj

(get-helper-by-name name)

Look up helper by C function name

Look up helper by C function name
sourceraw docstring

get-helper-idclj

(get-helper-id helper-key)

Get helper function ID by keyword

Get helper function ID by keyword
sourceraw docstring

get-helper-infoclj

(get-helper-info helper-key)

Get metadata for a helper function by keyword. Checks custom helpers first, then built-in helpers.

Get metadata for a helper function by keyword.
Checks custom helpers first, then built-in helpers.
sourceraw docstring

helper-compatible?clj

(helper-compatible? helper-key prog-type kernel-version)

Check if helper is compatible with program type and kernel version

Check if helper is compatible with program type and kernel version
sourceraw docstring

helper-metadataclj

Complete registry of BPF helper functions with metadata. Loaded from resources/bpf-helpers.edn at runtime.

Complete registry of BPF helper functions with metadata.
Loaded from resources/bpf-helpers.edn at runtime.
sourceraw docstring

helper-statsclj

(helper-stats)

Get statistics about available helpers

Get statistics about available helpers
sourceraw docstring

helpers-by-categoryclj

(helpers-by-category category)

Get all helpers in a category

Get all helpers in a category
sourceraw docstring

helpers-since-kernelclj

(helpers-since-kernel kernel-version)

Get helpers introduced in or after a specific kernel version

Get helpers introduced in or after a specific kernel version
sourceraw docstring

helpers-until-kernelclj

(helpers-until-kernel kernel-version)

Get helpers available up to a specific kernel version

Get helpers available up to a specific kernel version
sourceraw docstring

list-categoriesclj

(list-categories)

List all helper categories

List all helper categories
sourceraw docstring

list-helpersclj

(list-helpers)
(list-helpers category)

List all helpers, optionally filtered by category

List all helpers, optionally filtered by category
sourceraw docstring

list-helpers-for-programclj

(list-helpers-for-program prog-type kernel-version)

List helpers available for a specific program type and kernel version

List helpers available for a specific program type and kernel version
sourceraw docstring

(print-helper-info helper-key)

Print formatted helper information

Print formatted helper information
sourceraw docstring

(print-helper-stats)

Print helper statistics

Print helper statistics
sourceraw docstring

register-custom-helper!clj

(register-custom-helper! helper-key helper-info)

Register a custom helper function.

Example: (register-custom-helper! :my-helper {:id 1000 :name "my_custom_helper" :signature {:return :long :args [:ctx-ptr :arg1]} :min-kernel "5.15" :prog-types :all :category :custom :description "My custom helper function"})

Register a custom helper function.

Example:
(register-custom-helper! :my-helper
  {:id 1000
   :name "my_custom_helper"
   :signature {:return :long :args [:ctx-ptr :arg1]}
   :min-kernel "5.15"
   :prog-types :all
   :category :custom
   :description "My custom helper function"})
sourceraw docstring

reload-helpers!clj

(reload-helpers!)

Reload helper metadata from resource file. Useful for development or after adding custom helpers.

Reload helper metadata from resource file.
Useful for development or after adding custom helpers.
sourceraw docstring

search-helpersclj

(search-helpers query)

Search helpers by name or description. Returns helpers where query matches name or description (case-insensitive).

Search helpers by name or description.
Returns helpers where query matches name or description (case-insensitive).
sourceraw docstring

unregister-custom-helper!clj

(unregister-custom-helper! helper-key)

Remove a custom helper

Remove a custom helper
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close