Displaying 2 results from an estimated 2 matches for "v4_tupl".
Did you mean:
v4_tuple
2018 Sep 25
2
bpf compilation using clang
...n_hdr);
}
if (proto == ETH_P_8021Q) {
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)...
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