From 610bfc6bc99bc83680d190ebc69359a05fc7f605 Mon Sep 17 00:00:00 2001 From: Martin Hundebøll Date: Thu, 23 May 2013 16:53:02 +0200 Subject: batman-adv: Receive fragmented packets and merge MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fragments arriving at their destination are buffered for later merge. Merged packets are passed to the main receive function as had they never been fragmented. Fragments are forwarded without merging if the MTU of the outgoing interface is smaller than the size of the merged packet. Signed-off-by: Martin Hundebøll Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli --- net/batman-adv/main.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'net/batman-adv/main.h') diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h index e11c2ec7a739..6a74a4225326 100644 --- a/net/batman-adv/main.h +++ b/net/batman-adv/main.h @@ -131,6 +131,15 @@ enum batadv_uev_type { #define BATADV_GW_THRESHOLD 50 +/* Number of fragment chains for each orig_node */ +#define BATADV_FRAG_BUFFER_COUNT 8 +/* Maximum number of fragments for one packet */ +#define BATADV_FRAG_MAX_FRAGMENTS 16 +/* Maxumim size of each fragment */ +#define BATADV_FRAG_MAX_FRAG_SIZE 1400 +/* Time to keep fragments while waiting for rest of the fragments */ +#define BATADV_FRAG_TIMEOUT 10000 + #define BATADV_DAT_CANDIDATE_NOT_FOUND 0 #define BATADV_DAT_CANDIDATE_ORIG 1 -- cgit v1.2.3-59-g8ed1b