MCPcopy Create free account
hub / github.com/MemNixFS/MemNixFS / resolve_off

Function resolve_off

src/os/linux/ebpf.cpp:35–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33 bool ok = false;
34};
35Off resolve_off(const IsfSymbols& isf) {
36 Off o{};
37 auto tf = [&](u64& dst, const char* t, const char* f) {
38 try { dst = isf.field_offset(t, f); } catch (...) {}
39 };
40 tf(o.idr_idr_rt, "idr", "idr_rt");
41 tf(o.xa_xa_head, "xarray", "xa_head");
42 tf(o.xn_shift, "xa_node", "shift");
43 tf(o.xn_slots, "xa_node", "slots");
44 tf(o.prog_type, "bpf_prog", "type");
45 tf(o.prog_jited_len,"bpf_prog", "jited_len");
46 tf(o.prog_tag, "bpf_prog", "tag");
47 tf(o.prog_bpf_func, "bpf_prog", "bpf_func");
48 tf(o.prog_aux, "bpf_prog", "aux");
49 tf(o.aux_id, "bpf_prog_aux", "id");
50 tf(o.aux_name, "bpf_prog_aux", "name");
51 tf(o.aux_load_time, "bpf_prog_aux", "load_time");
52 o.ok = true;
53 return o;
54}
55
56void walk_xarray(const Engine& eng, const Off& o, VAddr entry,
57 std::vector<VAddr>& leaves, std::size_t& budget, int depth = 0)

Callers 1

enumerate_bpf_programsFunction · 0.70

Calls 1

field_offsetMethod · 0.80

Tested by

no test coverage detected