#include <stdint.h>
Go to the source code of this file.
◆ BPF_SOCK_ADDR_VERDICT_PROCEED
#define BPF_SOCK_ADDR_VERDICT_PROCEED 1 |
◆ BPF_SOCK_ADDR_VERDICT_REJECT
#define BPF_SOCK_ADDR_VERDICT_REJECT 0 |
◆ SOCK_ADDR_EXT_HELPER_FN_BASE
#define SOCK_ADDR_EXT_HELPER_FN_BASE 0xFFFF |
◆ XDP_EXT_HELPER_FN_BASE
#define XDP_EXT_HELPER_FN_BASE 0xFFFF |
◆ bind_action_t
◆ bind_hook_t
Handle an AF_INET socket bind() request.
Program type: EBPF_PROGRAM_TYPE_BIND
- Parameters
-
[in] | context | Socket metadata. |
- Return values
-
BIND_PERMIT | Permit the bind operation. |
BIND_DENY | Deny the bind operation. |
BIND_REDIRECT | Change the bind endpoint. |
◆ bind_md_t
◆ bind_operation_t
◆ bpf_sock_addr_t
Data structure used as context for BPF_PROG_TYPE_CGROUP_SOCK_ADDR program type.
◆ bpf_sock_op_type_t
◆ bpf_sock_ops_t
◆ sock_addr_hook_t
◆ sock_ops_hook_t
◆ xdp_action_t
◆ xdp_hook_t
Handle an incoming packet as early as possible.
Program type: EBPF_PROGRAM_TYPE_XDP
- Parameters
-
[in] | context | Packet metadata. |
- Return values
-
XDP_PASS | Allow the packet to pass. |
XDP_DROP | Drop the packet. |
XDP_TX | Bounce the received packet back out the same NIC it arrived on. |
◆ xdp_md_t
◆ _bind_action
Enumerator |
---|
BIND_PERMIT | Permit the bind operation.
|
BIND_DENY | Deny the bind operation.
|
BIND_REDIRECT | Change the bind endpoint.
|
◆ _bind_operation
Enumerator |
---|
BIND_OPERATION_BIND | Entry to bind.
|
BIND_OPERATION_POST_BIND | After port allocation.
|
BIND_OPERATION_UNBIND | Release port.
|
◆ _bpf_sock_op_type
Enumerator |
---|
BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB | Indicates when an active (outbound) connection is established.
|
BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB | Indicates when a passive (inbound) connection is established.
|
BPF_SOCK_OPS_CONNECTION_DELETED_CB | Indicates when a connection is deleted.
|
◆ _xdp_action
Enumerator |
---|
XDP_PASS | Allow the packet to pass.
|
XDP_DROP | Drop the packet.
|
XDP_TX | Bounce the received packet back out the same NIC it arrived on.
|
◆ ebpf_nethook_helper_id_t
Enumerator |
---|
BPF_FUNC_xdp_adjust_head | |
◆ ebpf_sock_addr_helper_id_t
Enumerator |
---|
BPF_FUNC_sock_addr_get_current_pid_tgid | |
◆ bpf_sock_addr_get_current_pid_tgid()
Get current pid and tgid (sock_addr specific only).
- Parameters
-
[in] | ctx | Pointer to bpf_sock_addr_t context. |
- Returns
- a 64-bit integer containing the current tgid and pid, and created as such:
current_task\ ->tgid << 32 | current_task\ ->pid.
◆ bpf_xdp_adjust_head()
int bpf_xdp_adjust_head |
( |
xdp_md_t * |
ctx, |
|
|
int |
delta |
|
) |
| |
Adjust XDP context data pointer.
- Parameters
-
[in] | ctx | XDP context. |
[in] | delta | Number of bytes to move the data pointer by. |
- Return values
-
0 | The operation was successful. |
<0 | A failure occurred. |