core: Support transport control commands

This change introduces a control message request handler for MCTP
bindings. If a handler is provided, transport control messages will be
forwarded to the handler, otherwise they will be forwarded to the
default handler.

Change-Id: I62266d6bf2d512ec97759c0b8a3477c5e433d609
Signed-off-by: Wiktor Gołgowski <wiktor.golgowski@linux.intel.com>
[AJ: Split out general control message handler, formatting]
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/Makefile.am b/Makefile.am
index c93d452..75535d4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,8 @@
 
 lib_LTLIBRARIES = libmctp.la
 libmctp_la_SOURCES = core.c alloc.c log.c \
-		     libmctp-alloc.h libmctp-log.h
+		     libmctp-alloc.h libmctp-log.h \
+		     libmctp-cmds.h
 include_HEADERS = libmctp.h
 
 if LIBMCTP_BINDING_serial
@@ -40,7 +41,7 @@
 TESTS = $(check_PROGRAMS)
 
 check_PROGRAMS = tests/test_eid tests/test_seq tests/test_bridge \
-		 tests/test_astlpc tests/test_serial
+		 tests/test_astlpc tests/test_serial tests/test_cmds
 # We set a global LDADD here, as there's no way to specify it for all
 # tests. This means other targets' LDADDs need to be overridden.
 LDADD = tests/libtest-utils.a libmctp.la