-
Run
uname -r
to find your kernel's version number. It may return something like this:5.4.0-47-generic
-
Run
sudo apt install linux-source-$KERNEL_VERSION
to grab the kernel code.$KERNEL_VERSION
should be theX.X.X
part of the version returned byuname -r
, e.g.sudo apt install linux-source-5.4.0
.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Simple function to parse a C enum definition. E.g. Given a string like: | |
* A = 0, | |
* B, | |
* C = B, | |
* D | |
* | |
* Returns a map like: {"A": 0, "B": 1, "C": 1, "D": 2} | |
* | |
* @param str The enum definition string to parse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function transpose(str, offset) { | |
let nstr = ''; | |
for (var i = 0; i < str.length; i++) { | |
const cc = str.charCodeAt(i); | |
nstr += String.fromCharCode(cc + offset); | |
} | |
return nstr; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install Wireshark | |
$ rvictl -s UUID | |
Monitor rvi0 |