diff options
author | Lawrence Brakmo <brakmo@fb.com> | 2017-06-30 20:02:47 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-07-01 16:15:14 -0700 |
commit | 9872a4bde31b0b055448e9ac1f4c9ee62d978766 (patch) | |
tree | d335c073d98d9a96983b1e0b5a341957c8dc982d /include/uapi | |
parent | 8c4b4c7e9ff0447995750d9329949fa082520269 (diff) | |
download | linux-9872a4bde31b0b055448e9ac1f4c9ee62d978766.tar.bz2 |
bpf: Add TCP connection BPF callbacks
Added callbacks to BPF SOCK_OPS type program before an active
connection is intialized and after a passive or active connection is
established.
The following patch demostrates how they can be used to set send and
receive buffer sizes.
Signed-off-by: Lawrence Brakmo <brakmo@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/linux/bpf.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index dd43b22758d6..2405fe304c98 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -767,6 +767,17 @@ enum { * window (in packets) or -1 if default * value should be used */ + BPF_SOCK_OPS_TCP_CONNECT_CB, /* Calls BPF program right before an + * active connection is initialized + */ + BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB, /* Calls BPF program when an + * active connection is + * established + */ + BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB, /* Calls BPF program when a + * passive connection is + * established + */ }; #endif /* _UAPI__LINUX_BPF_H__ */ |