/samples/bpf/ |
D | tcp_clamp_kern.c | 26 int bpf_clamp(struct bpf_sock_ops *skops) in bpf_clamp() argument 37 if (bpf_ntohl(skops->remote_port) != 55601 && skops->local_port != 55601) { in bpf_clamp() 38 skops->reply = -1; in bpf_clamp() 42 op = (int) skops->op; in bpf_clamp() 52 if (skops->family == AF_INET6 && in bpf_clamp() 53 skops->local_ip6[0] == skops->remote_ip6[0] && in bpf_clamp() 54 (bpf_ntohl(skops->local_ip6[1]) & 0xfff00000) == in bpf_clamp() 55 (bpf_ntohl(skops->remote_ip6[1]) & 0xfff00000)) { in bpf_clamp() 62 rv = bpf_setsockopt(skops, SOL_SOCKET, SO_SNDBUF, in bpf_clamp() 64 rv += bpf_setsockopt(skops, SOL_SOCKET, in bpf_clamp() [all …]
|
D | tcp_cong_kern.c | 25 int bpf_cong(struct bpf_sock_ops *skops) in bpf_cong() argument 34 if (bpf_ntohl(skops->remote_port) != 55601 && in bpf_cong() 35 skops->local_port != 55601) { in bpf_cong() 36 skops->reply = -1; in bpf_cong() 40 op = (int) skops->op; in bpf_cong() 50 if (skops->family == AF_INET6 && in bpf_cong() 51 skops->local_ip6[0] == skops->remote_ip6[0] && in bpf_cong() 52 (bpf_ntohl(skops->local_ip6[1]) & 0xfff00000) == in bpf_cong() 53 (bpf_ntohl(skops->remote_ip6[1]) & 0xfff00000)) { in bpf_cong() 59 rv = bpf_setsockopt(skops, SOL_TCP, TCP_CONGESTION, in bpf_cong() [all …]
|
D | tcp_synrto_kern.c | 25 int bpf_synrto(struct bpf_sock_ops *skops) in bpf_synrto() argument 33 if (bpf_ntohl(skops->remote_port) != 55601 && in bpf_synrto() 34 skops->local_port != 55601) { in bpf_synrto() 35 skops->reply = -1; in bpf_synrto() 39 op = (int) skops->op; in bpf_synrto() 47 skops->family == AF_INET6) { in bpf_synrto() 53 if (skops->local_ip6[0] == skops->remote_ip6[0] && in bpf_synrto() 54 (bpf_ntohl(skops->local_ip6[1]) & 0xfff00000) == in bpf_synrto() 55 (bpf_ntohl(skops->remote_ip6[1]) & 0xfff00000)) in bpf_synrto() 61 skops->reply = rv; in bpf_synrto()
|
D | tcp_rwnd_kern.c | 25 int bpf_rwnd(struct bpf_sock_ops *skops) in bpf_rwnd() argument 33 if (bpf_ntohl(skops->remote_port) != in bpf_rwnd() 34 55601 && skops->local_port != 55601) { in bpf_rwnd() 35 skops->reply = -1; in bpf_rwnd() 39 op = (int) skops->op; in bpf_rwnd() 47 skops->family == AF_INET6) { in bpf_rwnd() 53 if (skops->local_ip6[0] != skops->remote_ip6[0] || in bpf_rwnd() 54 (bpf_ntohl(skops->local_ip6[1]) & 0xfffff000) != in bpf_rwnd() 55 (bpf_ntohl(skops->remote_ip6[1]) & 0xfffff000)) in bpf_rwnd() 61 skops->reply = rv; in bpf_rwnd()
|
D | tcp_iw_kern.c | 26 int bpf_iw(struct bpf_sock_ops *skops) in bpf_iw() argument 37 if (bpf_ntohl(skops->remote_port) != 55601 && in bpf_iw() 38 skops->local_port != 55601) { in bpf_iw() 39 skops->reply = -1; in bpf_iw() 43 op = (int) skops->op; in bpf_iw() 58 rv = bpf_setsockopt(skops, SOL_SOCKET, SO_SNDBUF, &bufsize, in bpf_iw() 60 rv += bpf_setsockopt(skops, SOL_SOCKET, SO_RCVBUF, in bpf_iw() 64 rv = bpf_setsockopt(skops, SOL_TCP, TCP_BPF_IW, &iw, in bpf_iw() 69 rv = bpf_setsockopt(skops, SOL_SOCKET, SO_SNDBUF, &bufsize, in bpf_iw() 71 rv += bpf_setsockopt(skops, SOL_SOCKET, SO_RCVBUF, in bpf_iw() [all …]
|
D | tcp_bufs_kern.c | 26 int bpf_bufs(struct bpf_sock_ops *skops) in bpf_bufs() argument 36 if (bpf_ntohl(skops->remote_port) != 55601 && in bpf_bufs() 37 skops->local_port != 55601) { in bpf_bufs() 38 skops->reply = -1; in bpf_bufs() 42 op = (int) skops->op; in bpf_bufs() 57 rv = bpf_setsockopt(skops, SOL_SOCKET, SO_SNDBUF, &bufsize, in bpf_bufs() 59 rv += bpf_setsockopt(skops, SOL_SOCKET, SO_RCVBUF, in bpf_bufs() 67 rv = bpf_setsockopt(skops, SOL_SOCKET, SO_SNDBUF, &bufsize, in bpf_bufs() 69 rv += bpf_setsockopt(skops, SOL_SOCKET, SO_RCVBUF, in bpf_bufs() 78 skops->reply = rv; in bpf_bufs()
|
D | tcp_basertt_kern.c | 25 int bpf_basertt(struct bpf_sock_ops *skops) in bpf_basertt() argument 32 op = (int) skops->op; in bpf_basertt() 42 if (skops->family == AF_INET6 && in bpf_basertt() 43 skops->local_ip6[0] == skops->remote_ip6[0] && in bpf_basertt() 44 (bpf_ntohl(skops->local_ip6[1]) & 0xfff00000) == in bpf_basertt() 45 (bpf_ntohl(skops->remote_ip6[1]) & 0xfff00000)) { in bpf_basertt() 48 n = bpf_getsockopt(skops, SOL_TCP, TCP_CONGESTION, in bpf_basertt() 68 skops->reply = rv; in bpf_basertt()
|
D | tcp_tos_reflect_kern.c | 24 int bpf_basertt(struct bpf_sock_ops *skops) in bpf_basertt() argument 35 op = (int) skops->op; in bpf_basertt() 42 rv = bpf_setsockopt(skops, SOL_TCP, TCP_SAVE_SYN, in bpf_basertt() 46 if (skops->family == AF_INET) in bpf_basertt() 50 rv = bpf_getsockopt(skops, SOL_TCP, TCP_SAVED_SYN, in bpf_basertt() 53 if (skops->family == AF_INET) { in bpf_basertt() 57 bpf_setsockopt(skops, SOL_IP, IP_TOS, in bpf_basertt() 64 bpf_setsockopt(skops, SOL_IPV6, in bpf_basertt() 77 skops->reply = rv; in bpf_basertt()
|