From ec869593f66dc84b6f03d00f857d291382bb670c Mon Sep 17 00:00:00 2001 From: Trolli Schmittlauch Date: Tue, 12 May 2020 09:00:33 +0200 Subject: [PATCH] notes about message length and MTUs --- Hash2Pub/src/Hash2Pub/ASN1Coding.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Hash2Pub/src/Hash2Pub/ASN1Coding.hs b/Hash2Pub/src/Hash2Pub/ASN1Coding.hs index 7bafda5..c2524ed 100644 --- a/Hash2Pub/src/Hash2Pub/ASN1Coding.hs +++ b/Hash2Pub/src/Hash2Pub/ASN1Coding.hs @@ -28,6 +28,9 @@ import Debug.Trace -- Only some kinds of payloads can be split, and only to a limited number of parts. -- This function only deals with potentially large payload types and passes the -- rest as-is. +-- +-- The common IPv6 path MTU is 1280 bytes. When substracting 40 bytes TCP header (minimum) and 8 bytes UDP header, that gives remaining 1232 bytes for the payload. +-- Leaving room for IPv6 header extensions, 1200 bytes appear to be a good default. splitPayload :: Int -- number of parts to split payload into -> ActionPayload -- payload to be split -> [ActionPayload] -- list of smaller payloads