Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 1.08 KB

BPF_PROG_GET_FD_BY_ID.md

File metadata and controls

25 lines (16 loc) · 1.08 KB
title description
Syscall command 'BPF_PROG_GET_FD_BY_ID'
This page documents the 'BPF_PROG_GET_FD_BY_ID' eBPF syscall command, including its defintion, usage, program types that can use it, and examples.

BPF Syscall BPF_PROG_GET_FD_BY_ID command

:octicons-tag-24: v4.13

This syscall command is used to get a file descriptor to an already loaded program via its unique identifier.

Return type

This command will return the file descriptor of the program (positive integer) or an error number (negative integer) if something went wrong.

Usage

This command is used to get a file descriptor to program so that you might use it in other syscall commands or map values. This mechanism is usually used by inspection tools in combination with the BPF_OBJ_GET_INFO_BY_FD.

Attributes

prog_id

This field holds the unique identifier of the program for which a file descriptor should be opened.