Skip to content

Commit

Permalink
Moved to BPF
Browse files Browse the repository at this point in the history
  • Loading branch information
Pix committed Jul 5, 2023
1 parent e5b2a48 commit 8577824
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions pcap.odin
Original file line number Diff line number Diff line change
Expand Up @@ -400,19 +400,3 @@ foreign libpcap {

get_option_int :: proc(po: ^pcap_options, pon: pcap_option_name) -> _c.int ---
}

// TODO: Move to its own file, might as well one to one the entire library
@(default_calling_convention = "c")
foreign _ {
@(link_name = "bpf_filter")
bpf_filter :: proc(pc: ^bpf_insn, pkt: [^]byte, wirelen: _c.uint32_t, buflen: _c.uint32_t) -> _c.uint32_t ---

@(link_name = "bpf_validate")
bpf_validate :: proc(fcode: ^bpf_insn, flen: _c.int) -> _c.int ---

@(link_name = "bpf_image")
bpf_image :: proc(pc: ^bpf_insn, arg: _c.int) -> cstring ---

@(link_name = "bpf_dump")
bpf_dump :: proc(p: ^bpf_program, arg: _c.int) ---
}

0 comments on commit 8577824

Please sign in to comment.