| .. | .. | 
|---|
| 8 | 8 | * and the first 5.5 bytes of the IPv6 addresses are not the same (in this | 
|---|
| 9 | 9 | * example that means both hosts are not the same datacenter). | 
|---|
| 10 | 10 | * | 
|---|
| 11 |  | - * Use load_sock_ops to load this BPF program. | 
|---|
|  | 11 | + * Use "bpftool cgroup attach $cg sock_ops $prog" to load this BPF program. | 
|---|
| 12 | 12 | */ | 
|---|
| 13 | 13 |  | 
|---|
| 14 | 14 | #include <uapi/linux/bpf.h> | 
|---|
| .. | .. | 
|---|
| 16 | 16 | #include <uapi/linux/if_packet.h> | 
|---|
| 17 | 17 | #include <uapi/linux/ip.h> | 
|---|
| 18 | 18 | #include <linux/socket.h> | 
|---|
| 19 |  | -#include "bpf_helpers.h" | 
|---|
| 20 |  | -#include "bpf_endian.h" | 
|---|
|  | 19 | +#include <bpf/bpf_helpers.h> | 
|---|
|  | 20 | +#include <bpf/bpf_endian.h> | 
|---|
| 21 | 21 |  | 
|---|
| 22 | 22 | #define DEBUG 1 | 
|---|
| 23 |  | - | 
|---|
| 24 |  | -#define bpf_printk(fmt, ...)					\ | 
|---|
| 25 |  | -({								\ | 
|---|
| 26 |  | -	       char ____fmt[] = fmt;				\ | 
|---|
| 27 |  | -	       bpf_trace_printk(____fmt, sizeof(____fmt),	\ | 
|---|
| 28 |  | -				##__VA_ARGS__);			\ | 
|---|
| 29 |  | -}) | 
|---|
| 30 | 23 |  | 
|---|
| 31 | 24 | SEC("sockops") | 
|---|
| 32 | 25 | int bpf_rwnd(struct bpf_sock_ops *skops) | 
|---|