# HG changeset patch
# User Dave Page <dave.page@gleeble.com>
# Date 1428456343 14400
# Node ID bc34e2303fd6c930add5cc42db22d616d7a994b8
# Parent  9b29d7bfa230337122719b34699813bc7de84653
Add DEBUG_DATAGRAM_OVERFLOW to support ec_domain_finish datagram overflow testing

diff -r 9b29d7bfa230 -r bc34e2303fd6 master/globals.h
--- a/master/globals.h	Tue Apr 07 21:07:16 2015 -0400
+++ b/master/globals.h	Tue Apr 07 21:25:43 2015 -0400
@@ -88,8 +88,14 @@
 #define EC_ADDR_LEN 4
 
 /** Resulting maximum data size of a single datagram in a frame. */
+#ifdef DEBUG_DATAGRAM_OVERFLOW
+// Define a runt datagram which can be easily overflowed on 
+// available hardware for use when testing ec_domain_finish()
+#define EC_MAX_DATA_SIZE (128)
+#else
 #define EC_MAX_DATA_SIZE (ETH_DATA_LEN - EC_FRAME_HEADER_SIZE \
                           - EC_DATAGRAM_HEADER_SIZE - EC_DATAGRAM_FOOTER_SIZE)
+#endif // DEBUG_DATAGRAM_OVERFLOW
 
 /** Mailbox header size.  */
 #define EC_MBOX_HEADER_SIZE 6