dsp: base: Rework {un,}pack_pldm_header() error handling

The current preference is that library APIs return negative errno values
to signal implementation errors. That doesn't jive with existing stable
APIs returning PLDM completion codes, so provide a means to translate
between the two.

The first users are the {un,}pack_pldm_header() functions.

Change-Id: I7b7cb97a1d8b96ec0fec1c0a5fbd8503da834d86
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/src/dsp/base.h b/src/dsp/base.h
new file mode 100644
index 0000000..0e2c1a0
--- /dev/null
+++ b/src/dsp/base.h
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
+#ifndef LIBPLDM_SRC_DSP_BASE_H
+#define LIBPLDM_SRC_DSP_BASE_H
+
+/* Internal functions */
+
+#include <libpldm/base.h>
+
+int pack_pldm_header_errno(const struct pldm_header_info *hdr,
+			   struct pldm_msg_hdr *msg);
+
+int unpack_pldm_header_errno(const struct pldm_msg_hdr *msg,
+			     struct pldm_header_info *hdr);
+
+#endif