hnb-test: simplify crossing message layers

Adding the Security Mode Control command would break the current scheme of
callbacks across layers. This brought to my attention that the scheme is indeed
unnecessarily complex, so simplify it.

Instead of passing callbacks, call functions directly. Add hnb-test-layers.h to
declare those functions that cross from main to rua, to ranap and back to main
and remove the callback type definitions.

Instead of copying the NAS PDU to a newly allocated msgb, pass the data and len
directly to hnb_test_nas_rx_dtap().

Instead of repeatedly checking the gsm48_hdr length, just pass the struct
gsm48_hdr* and len around and assume the basic header length has been checked.

In some places, rename 'length' to 'len' for cosmetic consistency.
diff --git a/src/tests/hnb-test-layers.h b/src/tests/hnb-test-layers.h
new file mode 100644
index 0000000..4b17461
--- /dev/null
+++ b/src/tests/hnb-test-layers.h
@@ -0,0 +1,15 @@
+#pragma once
+
+struct ANY;
+struct ranap_message_s;
+struct hnb_test;
+
+/* main calls RUA */
+void hnb_test_rua_dt_handle(struct hnb_test *hnb, struct ANY *in);
+
+/* RUA calls RANAP */
+void hnb_test_rua_dt_handle_ranap(struct hnb_test *hnb,
+				  struct ranap_message_s *ranap_msg);
+
+/* RANAP calls main with actual payload*/
+void hnb_test_nas_rx_dtap(struct hnb_test *hnb, void *data, int len);