Skip to content

Instantly share code, notes, and snippets.

#include <linux/if_ether.h>
void *data = (void*)(long)skb->data;
if (eth->h_proto == bpf_htons(ETH_P_ARP)){
char *test = (char*)(data+ETH_HLEN);
bpf_printk("its %d",*test);
}
{
"cniVersion": "0.3.1",
"name": "ciliyium",
"type": "ciliyium",
"podcidr": "10.240.2.0/24",
"gateway": "10.240.2.1",
"peer_net": "10.240.1.0/24",
"peer_ip": "172.18.0.2"
}
@liyihuang
liyihuang / gist:72d97c79cbc7d1e726de538985261a20
Created March 26, 2024 14:15
pwru with a HTTP connection
(⎈|N/A:default)~ more /etc/os-release
PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"