Searched refs:IP_SRC_OFF (Results 1 – 2 of 2) sorted by relevance
/kernel/linux/linux-5.10/samples/bpf/ |
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()
|
D | test_lwt_bpf.c | 86 #define IP_SRC_OFF offsetof(struct iphdr, saddr) macro 137 ret = bpf_skb_store_bytes(skb, IP_SRC_OFF, &new_ip, sizeof(new_ip), 0); in rewrite()
|