gprs_gb: Add NS CodecPort + Emulation; Add NS selftests
diff --git a/gprs_gb/BSSGP_Helper.cc b/gprs_gb/BSSGP_Helper.cc
index 4665dcd..376cade 100644
--- a/gprs_gb/BSSGP_Helper.cc
+++ b/gprs_gb/BSSGP_Helper.cc
@@ -169,6 +169,8 @@
 	return prefix + compact_tlv_part(tlv_part_in);
 }
 
+#define NS_PDUT_NS_UNITDATA	0x00
+
 /* expand all the variable-length "length" fields of a NS message (Osmocom TvLV) into statlc TL16V format */
 OCTETSTRING f__NS__expand__len(OCTETSTRING const &in)
 {
@@ -177,6 +179,9 @@
 	uint8_t pdu_type = in_ptr[0];
 	uint8_t static_hdr_len = 1;
 
+	if (pdu_type == NS_PDUT_NS_UNITDATA)
+		return in;
+
 	if (in_len < static_hdr_len)
 		TTCN_error("NS message is shorter (%u bytes) than minimum header length (%u bytes) for msg_type 0x%02x",
 				in_len, static_hdr_len, pdu_type);
@@ -195,6 +200,9 @@
 	uint8_t pdu_type = in_ptr[0];
 	uint8_t static_hdr_len = 1;
 
+	if (pdu_type == NS_PDUT_NS_UNITDATA)
+		return in;
+
 	if (in_len < static_hdr_len)
 		TTCN_error("NS message is shorter (%u bytes) than minimum header length (%u bytes) for msg_type 0x%02x",
 				in_len, static_hdr_len, pdu_type);