Skip to main content

from_bytes

Function from_bytes 

Source
pub fn from_bytes(bytes: &[u8]) -> Result<Vec<SockFilter>, String>
Expand description

Decodes a raw classic-BPF program as bubblewrap receives it on --seccomp FD.

§Arguments

  • bytes - Concatenated struct sock_filter records (8 bytes each).

§Errors

A message when the length is not a multiple of 8, empty, or too long.