MCPcopy Create free account
hub / github.com/F-Stack/f-stack / kread

Function kread

tools/netstat/main.c:836–850  ·  view source on GitHub ↗

* Read kernel memory, return 0 on success. */

Source from the content-addressed store, hash-verified

834 * Read kernel memory, return 0 on success.
835 */
836int
837kread(u_long addr, void *buf, size_t size)
838{
839
840 if (kvmd_init() < 0)
841 return (-1);
842
843 if (!buf)
844 return (0);
845 if (kvm_read(kvmd, addr, buf, size) != (ssize_t)size) {
846 xo_warnx("%s", kvm_geterr(kvmd));
847 return (-1);
848 }
849 return (0);
850}
851
852/*
853 * Read single counter(9).

Callers 13

mroute6prFunction · 0.70
netisr_load_kvm_stringFunction · 0.70
netisr_load_kvm_configFunction · 0.70
netisr_load_kvm_protoFunction · 0.70
rt_statsFunction · 0.70
print_mfcFunction · 0.70
mrouteprFunction · 0.70
pcblist_kvmFunction · 0.70
sotoxsocketFunction · 0.70
main.cFile · 0.70
kread_countersFunction · 0.70

Calls 2

kvmd_initFunction · 0.85
xo_warnxFunction · 0.85

Tested by

no test coverage detected