aboutgitcodebugslistschat
path: root/util.h
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2024-04-15 19:01:37 +0200
committerStefano Brivio <sbrivio@redhat.com>2024-04-19 11:21:09 +0200
commit95601237ef82c28413d686ea20b68edd43c5fe1b (patch)
tree84c0197b1d48d4d5b6049bd500054593a2936b63 /util.h
parent27f1c762b15adc175b091f1244f8f1fb75781a2e (diff)
downloadpasst-95601237ef82c28413d686ea20b68edd43c5fe1b.tar
passt-95601237ef82c28413d686ea20b68edd43c5fe1b.tar.gz
passt-95601237ef82c28413d686ea20b68edd43c5fe1b.tar.bz2
passt-95601237ef82c28413d686ea20b68edd43c5fe1b.tar.lz
passt-95601237ef82c28413d686ea20b68edd43c5fe1b.tar.xz
passt-95601237ef82c28413d686ea20b68edd43c5fe1b.tar.zst
passt-95601237ef82c28413d686ea20b68edd43c5fe1b.zip
tcp: Replace TCP buffer structure by an iovec array
To be able to provide pointers to TCP headers and IP headers without worrying about alignment in the structure, split the structure into several arrays and point to each part of the frame using an iovec array. Using iovec also allows us to simply ignore the first entry when the vnet length header is not needed. Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'util.h')
-rw-r--r--util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/util.h b/util.h
index ef01001..264423b 100644
--- a/util.h
+++ b/util.h
@@ -32,6 +32,9 @@
#ifndef ETH_MIN_MTU
#define ETH_MIN_MTU 68
#endif
+#ifndef IP_MAX_MTU
+#define IP_MAX_MTU USHRT_MAX
+#endif
#ifndef MIN
#define MIN(x, y) (((x) < (y)) ? (x) : (y))