#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 |
◆ 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
◆ _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.
|
◆ ebpf_sock_addr_helper_id_t
Enumerator |
---|
BPF_FUNC_sock_addr_get_current_pid_tgid | |
BPF_FUNC_sock_addr_set_redirect_context | |
◆ bpf_sock_addr_get_current_pid_tgid()
Get current pid and tgid (sock_addr specific only).
- Deprecated:
- Use bpf_get_current_pid_tgid instead.
- 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_sock_addr_set_redirect_context()
int bpf_sock_addr_set_redirect_context |
( |
bpf_sock_addr_t * |
ctx, |
|
|
void * |
data, |
|
|
uint32_t |
data_size |
|
) |
| |
Set a context for consumption by a user-mode application (sock_addr specific only). This function is not supported for the recv_accept hooks.
- Parameters
-
[in] | ctx | Pointer to bpf_sock_addr_t context. |
[in] | data | Pointer to data to store. |
[in] | data_size | The size of the data to store. |
- Return values
-
0 | The operation was successful. |
<0 | A failure occurred. |