title | description |
---|---|
Helper Function 'bpf_redirect_peer' |
This page documents the 'bpf_redirect_peer' eBPF helper function, including its defintion, usage, program types that can use it, and examples. |
Copyright (c) 2015 The Libbpf Authors. All rights reserved.
Redirect the packet to another net device of index ifindex. This helper is somewhat similar to bpf_redirect(), except that the redirection happens to the ifindex' peer device and the netns switch takes place from ingress to ingress without going through the CPU's backlog queue.
The flags argument is reserved and must be 0. The helper is currently only supported for tc BPF program types at the ingress hook and for veth and netkit target device types. The peer device must reside in a different network namespace.
The helper returns TC_ACT_REDIRECT on success or TC_ACT_SHOT on error.
#!c static long (* const bpf_redirect_peer)(__u32 ifindex, __u64 flags) = (void *) 155;
!!! example "Docs could be improved" This part of the docs is incomplete, contributions are very welcome
This helper call can be used in the following program types:
!!! example "Docs could be improved" This part of the docs is incomplete, contributions are very welcome