Displaying 2 results from an estimated 2 matches for "load_byt".
Did you mean:
load_byte
2018 Sep 25
2
bpf compilation using clang
...proto = load_half(skb, nhoff + offsetof(struct vlan_hdr,
h_vlan_encapsulated_proto));
nhoff += sizeof(struct vlan_hdr);
}
if (likely(proto == ETH_P_IP)) {
struct ipv4_l3_l4_tuple v4_tuple = {
.src_addr = IPv4(load_byte(skb, nhoff +
offsetof(struct iphdr, saddr)),
load_byte(skb, nhoff +
offsetof(struct iphdr, saddr) + 1),
load_byte(skb, nhoff +
offsetof(struct iphdr, saddr) + 2),
load_byte(sk...
2018 Sep 13
4
bpf compilation using clang
Hi all,
I am trying to insert instructions into the bpf using the bpf syscall,
the instructions were generated using the following command line:
clang -I ~/Builds/bpf_rss/iproute2/include -Wall -target bpf -O2
-emit-llvm -c upstream/qemu/hw/net/rss_tap_bpf_program.c -o - | llc
-march=bpf -filetype=obj -o tap_bpf_program.o
and then were translated to bpf instructions using the BPFCparser tool