class SocketControl

Defined at line 7186 of file fidling/gen/sdk/fidl/fuchsia.net.filter/fuchsia.net.filter/hlcpp/fuchsia/net/filter/cpp/fidl.h

Allows to attach eBPF filters to sockets API.

More than one `SocketControl` client is allowed but they cannot install

more than one filter for the same hook. Closing the client end causes

all filters installed by that client to be removed.

*Warning:* Currently this protocol should be routed only to Starnix.

Public Members

static const char[] Name_

Public Methods

void ~SocketControl ()
void AttachEbpfProgram (::fuchsia::net::filter::AttachEbpfProgramOptions AttachEbpfProgramOptions, AttachEbpfProgramCallback callback)

Attaches the specified eBPF `program` to the specified `hook`.

May fail if another program is already attached (potentially by another

`SocketControl` instance).

*Warning:* Caller must check that the specified program is compatible

with the specified `hook`.

void DetachEbpfProgram (::fuchsia::net::filter::SocketHook hook, DetachEbpfProgramCallback callback)

Detaches eBPF program from the specified `hook`.