Searched refs:IP_SRC_OFF (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/samples/bpf/ |
H A D | tcbpf1_kern.c | 33 #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 D | test_lwt_bpf.c | 78 #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()
|