Home
last modified time | relevance | path

Searched refs:IP_SRC_OFF (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/samples/bpf/
H A Dtcbpf1_kern.c33 #define IP_SRC_OFF (ETH_HLEN + offsetof(struct iphdr, saddr)) macro
39 __u32 old_ip = _htonl(load_word(skb, IP_SRC_OFF)); in set_tcp_ip_src()
43 bpf_skb_store_bytes(skb, IP_SRC_OFF, &new_ip, sizeof(new_ip), 0); in set_tcp_ip_src()
H A Dtest_lwt_bpf.c78 #define IP_SRC_OFF offsetof(struct iphdr, saddr) macro
129 ret = bpf_skb_store_bytes(skb, IP_SRC_OFF, &new_ip, sizeof(new_ip), 0); in rewrite()