summaryrefslogtreecommitdiffstats
path: root/src/usr/mbox/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/mbox/plugins')
-rw-r--r--src/usr/mbox/plugins/MBOX_COMP_ID_Parse.C27
-rw-r--r--src/usr/mbox/plugins/makefile44
-rw-r--r--src/usr/mbox/plugins/mboxParse.C28
-rw-r--r--src/usr/mbox/plugins/mboxUdParser.H103
-rw-r--r--src/usr/mbox/plugins/mboxUdParserFactory.H50
5 files changed, 180 insertions, 72 deletions
diff --git a/src/usr/mbox/plugins/MBOX_COMP_ID_Parse.C b/src/usr/mbox/plugins/MBOX_COMP_ID_Parse.C
new file mode 100644
index 000000000..d0dc05bdd
--- /dev/null
+++ b/src/usr/mbox/plugins/MBOX_COMP_ID_Parse.C
@@ -0,0 +1,27 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/mbox/plugins/HBMBOX_COMP_ID_Parse.C $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2012,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+#include "errludparser.H"
+#include "mboxUdParserFactory.H"
+
+ERRL_MAKE_UD_PARSER(MBOX::UserDetailsParserFactory, hbfw::MBOX_COMP_ID)
+
diff --git a/src/usr/mbox/plugins/makefile b/src/usr/mbox/plugins/makefile
deleted file mode 100644
index 02560b76f..000000000
--- a/src/usr/mbox/plugins/makefile
+++ /dev/null
@@ -1,44 +0,0 @@
-# IBM_PROLOG_BEGIN_TAG
-# This is an automatically generated prolog.
-#
-# $Source: src/usr/mbox/plugins/makefile $
-#
-# IBM CONFIDENTIAL
-#
-# COPYRIGHT International Business Machines Corp. 2012
-#
-# p1
-#
-# Object Code Only (OCO) source materials
-# Licensed Internal Code Source Materials
-# IBM HostBoot Licensed Internal Code
-#
-# The source code for this program is not published or other-
-# wise divested of its trade secrets, irrespective of what has
-# been deposited with the U.S. Copyright Office.
-#
-# Origin: 30
-#
-# IBM_PROLOG_END_TAG
-.include "../plugins.mk"
-
-MY_PLUGIN = libB-1100
-MY_OBJS = mboxParse.o
-
-.if ( $(CONTEXT) == "x86.nfp" )
-
-LIBRARIES = ${MY_PLUGIN}.a
-EXPLIBS = ${MY_PLUGIN}.a
-${MY_PLUGIN}.a_OFILES = ${MY_OBJS}
-
-.else
-
-BUILD_SHARED_OBJS =
-SHARED_LIBRARIES EXPSHLIBS = ${MY_PLUGIN}.so
-${MY_PLUGIN}.so_EXTRA_LIBS = libbase.so
-${MY_PLUGIN}.so_SHLDFLAGS += ${SHLDFLAGS} -Wl,-soname,${.TARGET}
-${MY_PLUGIN}.so_OFILES = ${MY_OBJS}
-
-.endif
-
-.include <${RULES_MK}>
diff --git a/src/usr/mbox/plugins/mboxParse.C b/src/usr/mbox/plugins/mboxParse.C
deleted file mode 100644
index d0654e671..000000000
--- a/src/usr/mbox/plugins/mboxParse.C
+++ /dev/null
@@ -1,28 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG
- * This is an automatically generated prolog.
- *
- * $Source: src/usr/mbox/plugins/mboxParse.C $
- *
- * IBM CONFIDENTIAL
- *
- * COPYRIGHT International Business Machines Corp. 2012
- *
- * p1
- *
- * Object Code Only (OCO) source materials
- * Licensed Internal Code Source Materials
- * IBM HostBoot Licensed Internal Code
- *
- * The source code for this program is not published or other-
- * wise divested of its trade secrets, irrespective of what has
- * been deposited with the U.S. Copyright Office.
- *
- * Origin: 30
- *
- * IBM_PROLOG_END_TAG
- */
-#include <errl/errludparser.H>
-#include <mbox/mboxUdParserFactory.H>
-
-ERRL_MAKE_UD_PARSER(MBOX::UserDetailsParserFactory, HBMBOX_COMP_ID)
-
diff --git a/src/usr/mbox/plugins/mboxUdParser.H b/src/usr/mbox/plugins/mboxUdParser.H
new file mode 100644
index 000000000..38f10297d
--- /dev/null
+++ b/src/usr/mbox/plugins/mboxUdParser.H
@@ -0,0 +1,103 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/mbox/plugins/mboxUdParser.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2012,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+#if !defined(_MBOXUDPARSER)
+#define _MBOXUDPARSER
+
+#include "errluserdetails.H"
+
+namespace MBOX
+{
+ /**
+ * Parses mbox message user detail in an error log
+ */
+ class UserDetailsParserMboxMsg : public ERRORLOG::ErrlUserDetailsParser
+ {
+ public:
+
+ /**
+ * Constructor
+ */
+ UserDetailsParserMboxMsg() {}
+
+ /**
+ * Destructor
+ */
+ virtual ~UserDetailsParserMboxMsg() {}
+
+ /**
+ * Parses a mbox msg in an error log.
+ *
+ * @param[in] i_version Version of the data
+ * @param[in] i_parse ErrlUsrParser object for the output info
+ * @param[in] i_pBuffer Pointer to the buffer containing detail data
+ * @param[in] i_buflen Length of the buffer
+ */
+ virtual void parse(errlver_t i_version,
+ ErrlUsrParser & i_parser,
+ void * i_pBuffer,
+ const uint32_t i_buflen) const
+ {
+ uint32_t * b32 = static_cast<uint32_t *>(i_pBuffer);
+ uint64_t * b64 = reinterpret_cast<uint64_t *>(b32 + 4);
+
+ uint32_t msg_id = ntohl(*b32);
+ uint32_t msg_q_id = ntohl(*(b32+1));
+ uint32_t msg_type = ntohl(*(b32+2));
+ uint32_t msg_flag = ntohl(*(b32+3));
+ uint64_t msg_dta0 = ntohll(*(b64));
+ uint64_t msg_dta1 = ntohll(*(b64+1));
+ uint64_t msg_extd = ntohll(*(b64+2));
+
+ i_parser.PrintNumber("MBOX message id","0x%08x",msg_id);
+ i_parser.PrintNumber("MBOX queue id","0x%08x",msg_q_id);
+ i_parser.PrintNumber("MBOX message type","0x%08x",msg_type);
+ if(msg_flag & 0x80000000)
+ {
+ i_parser.PrintString(NULL, "MBOX mesage is synchronous");
+ }
+ else
+ {
+ i_parser.PrintString(NULL, "MBOX message is asynchronous");
+ }
+
+ i_parser.PrintNumber("MBOX data[0]","0x%016lx",msg_dta0);
+ i_parser.PrintNumber("MBOX data[1]","0x%016lx",msg_dta1);
+ i_parser.PrintNumber("MBOX Extra data pointer","0x%016lx",msg_extd);
+
+
+ if(msg_extd != 0 && i_buflen > 40)
+ {
+ i_parser.PrintString(NULL, "MBOX extra data:");
+
+ uint8_t * b08 = reinterpret_cast<uint8_t *>(b64 + 3);
+ size_t len = i_buflen - 40;
+
+ i_parser.PrintHexDump(b08,len);
+
+ }
+ }
+ };
+}
+
+#endif
+
diff --git a/src/usr/mbox/plugins/mboxUdParserFactory.H b/src/usr/mbox/plugins/mboxUdParserFactory.H
new file mode 100644
index 000000000..a75d5c3c2
--- /dev/null
+++ b/src/usr/mbox/plugins/mboxUdParserFactory.H
@@ -0,0 +1,50 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/mbox/plugins/mboxUdParserFactory.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2012,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+#if !defined(_MBOXUDPARSERFACTORY_H)
+#define _MBOXUDPARSERFACTORY_H
+
+#include "errludparserfactory.H"
+#include "mboxUdParser.H"
+
+namespace MBOX
+{
+ class UserDetailsParserFactory
+ : public ERRORLOG::ErrlUserDetailsParserFactory
+ {
+ public:
+ UserDetailsParserFactory()
+ {
+ registerParser<MBOX::UserDetailsParserMboxMsg>
+ (MBOX_UDT_MBOXMSG_DATA);
+ }
+
+ private:
+
+ UserDetailsParserFactory(const UserDetailsParserFactory &);
+ UserDetailsParserFactory & operator=
+ (const UserDetailsParserFactory &);
+ };
+};
+
+#endif
+
OpenPOWER on IntegriCloud