From cbd70793b710abe4e92e960f23c3286f7270dd65 Mon Sep 17 00:00:00 2001
From: Tom Rondeau <tom@trondeau.com>
Date: Thu, 24 Sep 2015 21:59:36 -0400
Subject: fec: Adds MTU parameter to async and tagged stream blocks.

The maximum transmission unit (MTU, in bytes) sets up the encoders and
decoders with enough internal buffer space to accommodate frames of
varying sizes up to the MTU. Proections placed to make sure incoming
tagged streams and PDUs don't exceed this.

This also fixes a bug in the tagged stream encoder and decoder blocks
to properly use calculate_output_stream_length.
---
 gr-fec/lib/async_decoder_impl.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'gr-fec/lib/async_decoder_impl.h')

diff --git a/gr-fec/lib/async_decoder_impl.h b/gr-fec/lib/async_decoder_impl.h
index 53dc84fbe3..abbe55e105 100644
--- a/gr-fec/lib/async_decoder_impl.h
+++ b/gr-fec/lib/async_decoder_impl.h
@@ -43,6 +43,7 @@ namespace gr {
 
       bool d_packed;
       bool d_rev_pack;
+      int d_mtu;
 
       size_t d_max_bits_in;
       float *d_tmp_f32;
@@ -54,7 +55,8 @@ namespace gr {
 
     public:
       async_decoder_impl(generic_decoder::sptr my_decoder,
-                         bool packed=false, bool rev_pack=true);
+                         bool packed=false, bool rev_pack=true,
+                         int mtu=1500);
       ~async_decoder_impl();
 
       int general_work(int noutput_items,
-- 
cgit v1.2.3