Searched refs:new_ip (Results 1 – 2 of 2) sorted by relevance
/samples/bpf/ |
A D | tcbpf1_kern.c | 37 static inline void set_tcp_ip_src(struct __sk_buff *skb, __u32 new_ip) in set_tcp_ip_src() argument 41 bpf_l4_csum_replace(skb, TCP_CSUM_OFF, old_ip, new_ip, IS_PSEUDO | sizeof(new_ip)); in set_tcp_ip_src() 42 bpf_l3_csum_replace(skb, IP_CSUM_OFF, old_ip, new_ip, sizeof(new_ip)); 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()
|
A D | test_lwt_bpf.c | 85 uint32_t new_ip, int rw_daddr) in rewrite() argument 112 ret = bpf_l4_csum_replace(skb, off, old_ip, new_ip, in rewrite() 113 flags | sizeof(new_ip)); in rewrite() 120 ret = bpf_l3_csum_replace(skb, IP_CSUM_OFF, old_ip, new_ip, sizeof(new_ip)); in rewrite() 127 ret = bpf_skb_store_bytes(skb, IP_DST_OFF, &new_ip, sizeof(new_ip), 0); in rewrite() 129 ret = bpf_skb_store_bytes(skb, IP_SRC_OFF, &new_ip, sizeof(new_ip), 0); in rewrite() 143 uint32_t old_ip, new_ip = 0x3fea8c0; in do_test_rewrite() local 153 printk("out: rewriting from %x to %x", old_ip, new_ip); in do_test_rewrite() 154 return rewrite(skb, old_ip, new_ip, 1); in do_test_rewrite()
|
Completed in 19 milliseconds