Section 1 · User commands

udev-hid-bpf.1

Package: udev-hid-bpf

udev-hid-bpf

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
COMMANDS
SEE ALSO


NAME

udev−hid−bpf - loader tool for HID eBPF programs

SYNOPSIS

udev−hid−bpf [−−help|−−version] <command> [args]

DESCRIPTION

udev−hid−bpf is a loader and general utility tool for HID eBPF programs. Typically it is invoked by udev to load and unload HID eBPF programs that match a given device but it provides commands to ease development of new eBPF programs and install specific eBPF programs that are not installed by default.

OPTIONS

−−helpPrint help and exit

−−verbose

Enable verbose output for the given command

−−version

Print version and exit

COMMANDS

add [−−bpfdir /path/to/directory] device [/path/to/program.bpf.o]

Invoked by udev when a device is added. This command loads all matching HID eBPF programs for this device or if a program is given just that one program. The list of matching eBPF programs is stored in the udev hwdb.

The set of directories to search for eBPF programs is built-in but can be adjusted with the −−bpfdir option.

The device must be specified as a syspath.

remove device

Invoked by udev when a device is remove. This command removes all HID eBPF programs for this device.

The device must be specified as a syspath.

list−bpf−programs [−−bpfdir /path/to/directory]

List available HID eBPF programs in the (built-in) default lookup directories or the given directory.

list−devices

List available HID devices.

inspect path/to/program.bpf.o

Inspect the given eBPF program.

install [options] path/to/program.bpf.o

Install the given eBPF program into /etc/udev-hid-bpf with a corresponding udev rule in /etc/udev/rules.d. This command should be used for testing a single eBPF program or where a full install of udev−hid−bpf is not suitable.

The following options are available for the −−install command:

−−dry-run

Do everything except actually creating directories and installing target files

−−install-exe

Also install the udev−hid−bpf executable in $prefix/bin. If the executable already exists at that path this option does nothing.

−−force

Overwrite existing files with the same name

−−prefix /usr/local

Install into the given prefix. Defaults to the built-in prefix.

SEE ALSO

udev−hid−bpf’s online documentation https://libevdev.pages.freedesktop.org/udev-hid-bpf/