Add classic BPF library

This library contains:
- The global constants as used by C code.
- An Insn struct that implements can generate all the BPF instructions.
- A simple BPF virtual machine implementation that can be used for
  testing programs. This has complete code-coverage and has been
  extensively fuzzed.
This commit is contained in:
Stephen Gregoratto 2022-01-22 18:14:07 +11:00
parent 63ee6e6625
commit b7c7fba5b4
2 changed files with 1009 additions and 0 deletions

View File

@ -9,6 +9,7 @@ pub const os = struct {
pub const net = struct {
pub const ip = @import("x/net/ip.zig");
pub const tcp = @import("x/net/tcp.zig");
pub const bpf = @import("x/net/bpf.zig");
};
test {

1008
lib/std/x/net/bpf.zig Normal file

File diff suppressed because it is too large Load Diff