Cleanup: Use common IP overhead definitions in test and prod code
This avoid duplication. As part of this moving the overhead calculation
to the IP address class so it's easier to find and more natural to use.
Bug: webrtc:9883
Change-Id: If4d865f445bc1a302572896932966ce30294e339
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169445
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30657}
diff --git a/rtc_base/net_helper.h b/rtc_base/net_helper.h
index e42502b..9abbbde 100644
--- a/rtc_base/net_helper.h
+++ b/rtc_base/net_helper.h
@@ -21,8 +21,8 @@
extern const char SSLTCP_PROTOCOL_NAME[];
extern const char TLS_PROTOCOL_NAME[];
-// Get the network layer overhead per packet based on the IP address family.
-int GetIpOverhead(int addr_family);
+constexpr int kTcpHeaderSize = 20;
+constexpr int kUdpHeaderSize = 8;
// Get the transport layer overhead per packet based on the protocol.
int GetProtocolOverhead(const std::string& protocol);