Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 1.4 KB

bpf_xdp_load_bytes.md

File metadata and controls

43 lines (28 loc) · 1.4 KB
title description
Helper Function 'bpf_xdp_load_bytes'
This page documents the 'bpf_xdp_load_bytes' eBPF helper function, including its defintion, usage, program types that can use it, and examples.

Helper function bpf_xdp_load_bytes

:octicons-tag-24: v5.18

Definition

Copyright (c) 2015 The Libbpf Authors. All rights reserved.

This helper is provided as an easy way to load data from a xdp buffer. It can be used to load len bytes from offset from the frame associated to xdp_md, into the buffer pointed by buf.

Returns

0 on success, or a negative error in case of failure.

#!c static long (* const bpf_xdp_load_bytes)(struct xdp_md *xdp_md, __u32 offset, void *buf, __u32 len) = (void *) 189;

Usage

!!! example "Docs could be improved" This part of the docs is incomplete, contributions are very welcome

Program types

This helper call can be used in the following program types:

Example

!!! example "Docs could be improved" This part of the docs is incomplete, contributions are very welcome