aboutgitcodebugslistschat
path: root/util.h
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-10-05 19:27:04 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-10-05 20:02:03 +0200
commitd4d61480b6883d462a2c3c99eaf315259e78c984 (patch)
tree099527a3fb68fcabe3953c55d67de9484ce9309b /util.h
parenteef4e82903311c73a5da3030da7eee790ce783a5 (diff)
downloadpasst-d4d61480b6883d462a2c3c99eaf315259e78c984.tar
passt-d4d61480b6883d462a2c3c99eaf315259e78c984.tar.gz
passt-d4d61480b6883d462a2c3c99eaf315259e78c984.tar.bz2
passt-d4d61480b6883d462a2c3c99eaf315259e78c984.tar.lz
passt-d4d61480b6883d462a2c3c99eaf315259e78c984.tar.xz
passt-d4d61480b6883d462a2c3c99eaf315259e78c984.tar.zst
passt-d4d61480b6883d462a2c3c99eaf315259e78c984.zip
tcp, tap: Turn tcp_probe_mem() into sock_probe_mem(), use for AF_UNIX socket too
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'util.h')
-rw-r--r--util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/util.h b/util.h
index 7efde7b..fdb0ef0 100644
--- a/util.h
+++ b/util.h
@@ -116,6 +116,10 @@ void debug(const char *format, ...);
.daddr = IN6ADDR_ANY_INIT, \
}
+#define RCVBUF_BIG (2 * 1024 * 1024)
+#define SNDBUF_BIG (4 * 1024 * 1024)
+#define SNDBUF_SMALL (128 * 1024)
+
#include <linux/ipv6.h>
#include <net/if.h>
#include <linux/ip.h>
@@ -133,6 +137,7 @@ struct ctx;
char *ipv6_l4hdr(struct ipv6hdr *ip6h, uint8_t *proto);
int sock_l4(struct ctx *c, int af, uint8_t proto, uint16_t port,
enum bind_type bind_addr, uint32_t data);
+void sock_probe_mem(struct ctx *c);
int timespec_diff_ms(struct timespec *a, struct timespec *b);
void bitmap_set(uint8_t *map, int bit);
void bitmap_clear(uint8_t *map, int bit);