From robionekenobi: packet-mq enhancement

Add new Structure dissection
 Fix some small issues
 Reformat some part of code
 use spaces instead of tabs for indentation

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9603

From me:
 Remove some trailing whitespace;
 Change a few tabs to spaces;
 Change editor-modelines tab-width, etc to 8 (altho
   not really relevant since tabs not being used).

svn path=/trunk/; revision=54489
This commit is contained in:
Bill Meier 2013-12-29 20:58:27 +00:00
parent 745c8660be
commit 756457682d
4 changed files with 992 additions and 717 deletions

View File

@ -75,6 +75,17 @@ gint32 strip_trailing_blanks(guint8* a_str, guint32 a_size)
return i;
}
DEF_VALRB(WaitIntv)
DEF_VALR1(MQCGWI_DEFAULT),
DEF_VALR1(MQWI_UNLIMITED),
DEF_VALR3(MQWI_0 ,MQWI_7FFFFFFF, ""),
DEF_VALRE;
DEF_VALRB(OutDataLen)
DEF_VALR1(MQCODL_AS_INPUT),
DEF_VALR3(MQCODL_0 ,MQCODL_7FFFFFFF, ""),
DEF_VALRE;
DEF_VALRB(ccsid)
DEF_VALR3(MQCCSI_UNDEFINED , MQCCSI_UNDEFINED, "UNDEFINED/DEFAULT/Q_MGR"),
DEF_VALR1(MQCCSI_EMBEDDED ),
@ -4776,16 +4787,16 @@ DEF_VALSE;
#if 0
DEF_VALSB(WLMIntervalUnits)
DEF_VALS1(MQTIME_UNIT_SECS),
DEF_VALS1(MQTIME_UNIT_MINS),
DEF_VALS1(MQTIME_UNIT_SECS ),
DEF_VALS1(MQTIME_UNIT_MINS ),
DEF_VALSE;
#endif
#if 0
DEF_VALSB(SelectorTypes)
DEF_VALS1(MQSELTYPE_NONE ),
DEF_VALS1(MQSELTYPE_STANDARD ),
DEF_VALS1(MQSELTYPE_EXTENDED ),
DEF_VALS1(MQSELTYPE_NONE ),
DEF_VALS1(MQSELTYPE_STANDARD ),
DEF_VALS1(MQSELTYPE_EXTENDED ),
DEF_VALSE;
#endif
@ -4798,180 +4809,179 @@ DEF_VALSE;
#if 0
DEF_VALSB(SyncpointPubSub)
DEF_VALS1(MQSYNCPOINT_YES ),
DEF_VALS1(MQSYNCPOINT_IFPER ),
DEF_VALS1(MQSYNCPOINT_YES ),
DEF_VALS1(MQSYNCPOINT_IFPER ),
DEF_VALSE;
#endif
#if 0
DEF_VALSB(SystemParameterValues)
DEF_VALS1(MQSYSP_NO ),
DEF_VALS1(MQSYSP_YES ),
DEF_VALS1(MQSYSP_EXTENDED ),
DEF_VALS1(MQSYSP_TYPE_INITIAL ),
DEF_VALS1(MQSYSP_TYPE_SET ),
DEF_VALS1(MQSYSP_TYPE_LOG_COPY ),
DEF_VALS1(MQSYSP_TYPE_LOG_STATUS ),
DEF_VALS1(MQSYSP_TYPE_ARCHIVE_TAPE ),
DEF_VALS1(MQSYSP_ALLOC_BLK ),
DEF_VALS1(MQSYSP_ALLOC_TRK ),
DEF_VALS1(MQSYSP_ALLOC_CYL ),
DEF_VALS1(MQSYSP_STATUS_BUSY ),
DEF_VALS1(MQSYSP_STATUS_PREMOUNT ),
DEF_VALS1(MQSYSP_STATUS_AVAILABLE ),
DEF_VALS1(MQSYSP_STATUS_UNKNOWN ),
DEF_VALS1(MQSYSP_STATUS_ALLOC_ARCHIVE ),
DEF_VALS1(MQSYSP_STATUS_COPYING_BSDS ),
DEF_VALS1(MQSYSP_STATUS_COPYING_LOG ),
DEF_VALS1(MQSYSP_NO ),
DEF_VALS1(MQSYSP_YES ),
DEF_VALS1(MQSYSP_EXTENDED ),
DEF_VALS1(MQSYSP_TYPE_INITIAL ),
DEF_VALS1(MQSYSP_TYPE_SET ),
DEF_VALS1(MQSYSP_TYPE_LOG_COPY ),
DEF_VALS1(MQSYSP_TYPE_LOG_STATUS ),
DEF_VALS1(MQSYSP_TYPE_ARCHIVE_TAPE ),
DEF_VALS1(MQSYSP_ALLOC_BLK ),
DEF_VALS1(MQSYSP_ALLOC_TRK ),
DEF_VALS1(MQSYSP_ALLOC_CYL ),
DEF_VALS1(MQSYSP_STATUS_BUSY ),
DEF_VALS1(MQSYSP_STATUS_PREMOUNT ),
DEF_VALS1(MQSYSP_STATUS_AVAILABLE ),
DEF_VALS1(MQSYSP_STATUS_UNKNOWN ),
DEF_VALS1(MQSYSP_STATUS_ALLOC_ARCHIVE),
DEF_VALS1(MQSYSP_STATUS_COPYING_BSDS ),
DEF_VALS1(MQSYSP_STATUS_COPYING_LOG ),
DEF_VALSE;
#endif
DEF_VALSB(DurableSubscriptions)
DEF_VALS1(MQSUB_DURABLE_AS_PARENT ),
DEF_VALS1(MQSUB_DURABLE_AS_PARENT),
DEF_VALS1(MQSUB_DURABLE_ALLOWED ),
DEF_VALS1(MQSUB_DURABLE_INHIBITED),
DEF_VALSE;
#if 0
DEF_VALSB(Durable)
DEF_VALS1(MQSUB_DURABLE_ALL ),
DEF_VALS1(MQSUB_DURABLE_YES ),
DEF_VALS1(MQSUB_DURABLE_NO ),
DEF_VALS1(MQSUB_DURABLE_ALL),
DEF_VALS1(MQSUB_DURABLE_YES),
DEF_VALS1(MQSUB_DURABLE_NO ),
DEF_VALSE;
#endif
#if 0
DEF_VALSB(SubscriptionTypes)
DEF_VALS1(MQSUBTYPE_API ),
DEF_VALS1(MQSUBTYPE_ADMIN ),
DEF_VALS1(MQSUBTYPE_PROXY ),
DEF_VALS1(MQSUBTYPE_ALL ),
DEF_VALS1(MQSUBTYPE_USER ),
DEF_VALS1(MQSUBTYPE_API ),
DEF_VALS1(MQSUBTYPE_ADMIN),
DEF_VALS1(MQSUBTYPE_PROXY),
DEF_VALS1(MQSUBTYPE_ALL ),
DEF_VALS1(MQSUBTYPE_USER ),
DEF_VALSE;
#endif
#if 0
DEF_VALSB(SubscriptionDestinationClass)
DEF_VALS1(MQDC_MANAGED ),
DEF_VALS1(MQDC_PROVIDED ),
DEF_VALS1(MQDC_MANAGED ),
DEF_VALS1(MQDC_PROVIDED),
DEF_VALSE;
#endif
#if 0
DEF_VALSB(SubscriptionRequestOnly)
DEF_VALS1(MQRU_PUBLISH_ON_REQUEST ),
DEF_VALS1(MQRU_PUBLISH_ALL ),
DEF_VALS1(MQRU_PUBLISH_ON_REQUEST),
DEF_VALS1(MQRU_PUBLISH_ALL ),
DEF_VALSE;
#endif
#if 0
DEF_VALSB(TimeUnits)
DEF_VALS1(MQTIME_UNIT_MINS ),
DEF_VALS1(MQTIME_UNIT_SECS ),
DEF_VALS1(MQTIME_UNIT_MINS),
DEF_VALS1(MQTIME_UNIT_SECS),
DEF_VALSE;
#endif
#if 0
DEF_VALSB(VariableUser)
DEF_VALS1(MQVU_ANY_USER ),
DEF_VALS1(MQVU_FIXED_USER ),
DEF_VALS1(MQVU_ANY_USER ),
DEF_VALS1(MQVU_FIXED_USER),
DEF_VALSE;
#endif
#if 0
DEF_VALSB(WildcardSchema)
DEF_VALS1(MQWS_CHAR ),
DEF_VALS1(MQWS_TOPIC ),
DEF_VALS1(MQWS_CHAR ),
DEF_VALS1(MQWS_TOPIC),
DEF_VALSE;
#endif
#if 0
DEF_VALSB(UserIDSupport)
DEF_VALS1(MQUIDSUPP_NO ),
DEF_VALS1(MQUIDSUPP_YES ),
DEF_VALS1(MQUIDSUPP_NO ),
DEF_VALS1(MQUIDSUPP_YES),
DEF_VALSE;
#endif
#if 0
DEF_VALSB(UndeliveredPubSub)
DEF_VALS1(MQUNDELIVERED_NORMAL ),
DEF_VALS1(MQUNDELIVERED_SAFE ),
DEF_VALS1(MQUNDELIVERED_DISCARD ),
DEF_VALS1(MQUNDELIVERED_KEEP ),
DEF_VALS1(MQUNDELIVERED_NORMAL ),
DEF_VALS1(MQUNDELIVERED_SAFE ),
DEF_VALS1(MQUNDELIVERED_DISCARD),
DEF_VALS1(MQUNDELIVERED_KEEP ),
DEF_VALSE;
#endif
DEF_VALSB(UOWStates)
DEF_VALS1(MQUOWST_NONE ),
DEF_VALS1(MQUOWST_ACTIVE ),
DEF_VALS1(MQUOWST_PREPARED ),
DEF_VALS1(MQUOWST_UNRESOLVED ),
DEF_VALS1(MQUOWST_NONE ),
DEF_VALS1(MQUOWST_ACTIVE ),
DEF_VALS1(MQUOWST_PREPARED ),
DEF_VALS1(MQUOWST_UNRESOLVED),
DEF_VALSE;
DEF_VALSB(UOWTypes)
DEF_VALS1(MQUOWT_Q_MGR ),
DEF_VALS1(MQUOWT_CICS ),
DEF_VALS1(MQUOWT_RRS ),
DEF_VALS1(MQUOWT_IMS ),
DEF_VALS1(MQUOWT_XA ),
DEF_VALS1(MQUOWT_Q_MGR),
DEF_VALS1(MQUOWT_CICS ),
DEF_VALS1(MQUOWT_RRS ),
DEF_VALS1(MQUOWT_IMS ),
DEF_VALS1(MQUOWT_XA ),
DEF_VALSE;
#if 0
DEF_VALSB(UsageType)
DEF_VALS1(MQIACF_USAGE_PAGESET ),
DEF_VALS1(MQIACF_USAGE_BUFFER_POOL ),
DEF_VALS1(MQIACF_USAGE_DATA_SET ),
DEF_VALS1(MQIACF_USAGE_PAGESET ),
DEF_VALS1(MQIACF_USAGE_BUFFER_POOL),
DEF_VALS1(MQIACF_USAGE_DATA_SET ),
DEF_VALSE;
#endif
#if 0
DEF_VALSB(PageSetStatus)
DEF_VALS1(MQUSAGE_PS_AVAILABLE ),
DEF_VALS1(MQUSAGE_PS_DEFINED ),
DEF_VALS1(MQUSAGE_PS_OFFLINE ),
DEF_VALS1(MQUSAGE_PS_NOT_DEFINED ),
DEF_VALS1(MQUSAGE_PS_AVAILABLE ),
DEF_VALS1(MQUSAGE_PS_DEFINED ),
DEF_VALS1(MQUSAGE_PS_OFFLINE ),
DEF_VALS1(MQUSAGE_PS_NOT_DEFINED),
DEF_VALSE;
#endif
#if 0
DEF_VALSB(ExpandType)
DEF_VALS1(MQUSAGE_EXPAND_USER ),
DEF_VALS1(MQUSAGE_EXPAND_SYSTEM ),
DEF_VALS1(MQUSAGE_EXPAND_NONE ),
DEF_VALS1(MQUSAGE_EXPAND_USER ),
DEF_VALS1(MQUSAGE_EXPAND_SYSTEM),
DEF_VALS1(MQUSAGE_EXPAND_NONE ),
DEF_VALSE;
#endif
#if 0
DEF_VALSB(DataSetType)
DEF_VALS1(MQUSAGE_DS_OLDEST_ACTIVE_UOW ),
DEF_VALS1(MQUSAGE_DS_OLDEST_PS_RECOVERY ),
DEF_VALS1(MQUSAGE_DS_OLDEST_CF_RECOVERY ),
DEF_VALS1(MQUSAGE_DS_OLDEST_ACTIVE_UOW ),
DEF_VALS1(MQUSAGE_DS_OLDEST_PS_RECOVERY),
DEF_VALS1(MQUSAGE_DS_OLDEST_CF_RECOVERY),
DEF_VALSE;
#endif
#if 0
DEF_VALSB(ActivityOperations)
DEF_VALS1(MQOPER_UNKNOWN ),
DEF_VALS1(MQOPER_BROWSE ),
DEF_VALS1(MQOPER_DISCARD ),
DEF_VALS1(MQOPER_GET ),
DEF_VALS1(MQOPER_PUT ),
DEF_VALS1(MQOPER_PUT_REPLY ),
DEF_VALS1(MQOPER_PUT_REPORT ),
DEF_VALS1(MQOPER_RECEIVE ),
DEF_VALS1(MQOPER_SEND ),
DEF_VALS1(MQOPER_TRANSFORM ),
DEF_VALS1(MQOPER_PUBLISH ),
DEF_VALS1(MQOPER_EXCLUDED_PUBLISH ),
DEF_VALS1(MQOPER_DISCARDED_PUBLISH ),
DEF_VALS1(MQOPER_UNKNOWN ),
DEF_VALS1(MQOPER_BROWSE ),
DEF_VALS1(MQOPER_DISCARD ),
DEF_VALS1(MQOPER_GET ),
DEF_VALS1(MQOPER_PUT ),
DEF_VALS1(MQOPER_PUT_REPLY ),
DEF_VALS1(MQOPER_PUT_REPORT ),
DEF_VALS1(MQOPER_RECEIVE ),
DEF_VALS1(MQOPER_SEND ),
DEF_VALS1(MQOPER_TRANSFORM ),
DEF_VALS1(MQOPER_PUBLISH ),
DEF_VALS1(MQOPER_EXCLUDED_PUBLISH ),
DEF_VALS1(MQOPER_DISCARDED_PUBLISH),
DEF_VALSE;
#endif
DEF_VALSB(ConnInfoType)
DEF_VALS1(MQIACF_CONN_INFO_ALL ),
DEF_VALS1(MQIACF_CONN_INFO_CONN ),
DEF_VALS1(MQIACF_CONN_INFO_HANDLE ),
DEF_VALS1(MQIACF_CONN_INFO_ALL ),
DEF_VALS1(MQIACF_CONN_INFO_CONN ),
DEF_VALS1(MQIACF_CONN_INFO_HANDLE),
DEF_VALSE;
#if 0
@ -4994,25 +5004,25 @@ DEF_VALSE;
#if 0
DEF_VALSB(PublishSubscribeProperties)
DEF_VALS1(MQPSPROP_NONE ),
DEF_VALS1(MQPSPROP_COMPAT ),
DEF_VALS1(MQPSPROP_RFH2 ),
DEF_VALS1(MQPSPROP_MSGPROP ),
DEF_VALS1(MQPSPROP_NONE ),
DEF_VALS1(MQPSPROP_COMPAT ),
DEF_VALS1(MQPSPROP_RFH2 ),
DEF_VALS1(MQPSPROP_MSGPROP),
DEF_VALSE;
#endif
DEF_VALSB(PubSubScope)
DEF_VALS1(MQSCOPE_ALL ),
DEF_VALS1(MQSCOPE_AS_PARENT ),
DEF_VALS1(MQSCOPE_QMGR ),
DEF_VALS1(MQSCOPE_ALL ),
DEF_VALS1(MQSCOPE_AS_PARENT),
DEF_VALS1(MQSCOPE_QMGR ),
DEF_VALSE;
#if 0
DEF_VALSB(EncryptionPolicySuiteB)
DEF_VALS1(MQ_SUITE_B_NOT_AVAILABLE ),
DEF_VALS1(MQ_SUITE_B_NONE ),
DEF_VALS1(MQ_SUITE_B_128_BIT ),
DEF_VALS1(MQ_SUITE_B_192_BIT ),
DEF_VALS1(MQ_SUITE_B_NOT_AVAILABLE),
DEF_VALS1(MQ_SUITE_B_NONE ),
DEF_VALS1(MQ_SUITE_B_128_BIT ),
DEF_VALS1(MQ_SUITE_B_192_BIT ),
DEF_VALSE;
#endif
@ -5027,9 +5037,9 @@ DEF_VALSE;
#if 0
DEF_VALSB(UseDLQueue)
DEF_VALS1(MQUSEDLQ_AS_PARENT ),
DEF_VALS1(MQUSEDLQ_NO ),
DEF_VALS1(MQUSEDLQ_YES ),
DEF_VALS1(MQUSEDLQ_AS_PARENT),
DEF_VALS1(MQUSEDLQ_NO ),
DEF_VALS1(MQUSEDLQ_YES ),
DEF_VALSE;
#endif
@ -5107,6 +5117,40 @@ DEF_VALSB(SyncpointAvailability)
DEF_VALS1(MQSP_NOT_AVAILABLE),
DEF_VALSE;
DEF_VALSBX(UOWControls)
DEF_VALS1(MQCUOWC_ONLY ),
DEF_VALS1(MQCUOWC_CONTINUE),
DEF_VALS1(MQCUOWC_FIRST ),
DEF_VALS1(MQCUOWC_MIDDLE ),
DEF_VALS1(MQCUOWC_LAST ),
DEF_VALS1(MQCUOWC_COMMIT ),
DEF_VALS1(MQCUOWC_BACKOUT ),
DEF_VALSE;
DEF_VALSBX(LinkType)
DEF_VALS1(MQCLT_PROGRAM ),
DEF_VALS1(MQCLT_TRANSACTION),
DEF_VALSE;
DEF_VALSBX(ADSDescr)
DEF_VALS1(MQCADSD_NONE ),
DEF_VALS1(MQCADSD_SEND ),
DEF_VALS1(MQCADSD_RECV ),
DEF_VALS1(MQCADSD_MSGFORMAT),
DEF_VALSE;
DEF_VALSBX(ConvTaskOpt)
DEF_VALS1(MQCCT_YES),
DEF_VALS1(MQCCT_NO ),
DEF_VALSE;
DEF_VALSBX(TaskEndStatus)
DEF_VALS1(MQCTES_NOSYNC ),
DEF_VALS1(MQCTES_COMMIT ),
DEF_VALS1(MQCTES_BACKOUT),
DEF_VALS1(MQCTES_ENDTASK),
DEF_VALSE;
DEF_VALSBX(MQCFINT_Parse)
DEF_VALS2(MQIACF_ASYNC_STATE ,GET_VALSP(AsynchronousStateValues)),
DEF_VALS2(MQIACF_CHLAUTH_TYPE ,GET_VALSP(ChlauthType)),
@ -5254,7 +5298,7 @@ DEF_VALSE;
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
* Local variables:
* c-basic-offset: 4

View File

@ -103,7 +103,12 @@ static guint32 dissect_mqpcf_getDigits(guint uCnt)
{
return (guint) log10(uCnt) + 1;
}
/*
* Here we get a special value_string, that return another value_string
* pointer instead of string value. This let us use the try_val_to_str
* to get val_to_str value from the value of a parameter on a more
* easier way than using switch cases
*/
static guint8 *dissect_mqpcf_parm_getintval(guint uPrm, guint uVal)
{
value_string *pVs;
@ -652,49 +657,49 @@ void proto_register_mqpcf(void)
expert_module_t *expert_mqpcf;
static hf_register_info hf[] =
{
{ &hf_mqpcf_cfh_type , { "Type.....", "mqpcf.cfh.type", FT_UINT32, BASE_DEC, VALS(&GET_VALSV(mqcft)), 0x0, "CFH type", HFILL }},
{ &hf_mqpcf_cfh_length , { "Length...", "mqpcf.cfh.length", FT_UINT32, BASE_DEC, NULL, 0x0, "CFH length", HFILL }},
{ &hf_mqpcf_cfh_version , { "Version..", "mqpcf.cfh.version", FT_UINT32, BASE_DEC, NULL, 0x0, "CFH version", HFILL }},
{ &hf_mqpcf_cfh_command , { "Command..", "mqpcf.cfh.command", FT_UINT32, BASE_DEC, VALS(&GET_VALSV(mqcmd)), 0x0, "CFH command", HFILL }},
{ &hf_mqpcf_cfh_MsgSeqNbr, { "MsgSeqNbr", "mqpcf.cfh.MsgSeqNbr", FT_UINT32, BASE_DEC, NULL, 0x0, "CFH message sequence number", HFILL }},
{ &hf_mqpcf_cfh_control , { "Control..", "mqpcf.cfh.control", FT_UINT32, BASE_DEC, NULL, 0x0, "CFH control", HFILL }},
{ &hf_mqpcf_cfh_compcode , { "CompCode.", "mqpcf.cfh.compcode", FT_UINT32, BASE_DEC, VALS(&GET_VALSV(mqcc)), 0x0, "CFH completion code", HFILL }},
{ &hf_mqpcf_cfh_reason , { "ReasCode.", "mqpcf.cfh.reasoncode", FT_UINT32, BASE_DEC, VALS(&GET_VALSV(mqrc)), 0x0, "CFH reason code", HFILL }},
{ &hf_mqpcf_cfh_ParmCount, { "ParmCount", "mqpcf.cfh.ParmCount", FT_UINT32, BASE_DEC, NULL, 0x0, "CFH parameter count", HFILL }},
{
{ &hf_mqpcf_cfh_type , { "Type.....", "mqpcf.cfh.type" , FT_UINT32, BASE_DEC, VALS(&GET_VALSV(mqcft)), 0x0, "CFH type", HFILL }},
{ &hf_mqpcf_cfh_length , { "Length...", "mqpcf.cfh.length" , FT_UINT32, BASE_DEC, NULL, 0x0, "CFH length", HFILL }},
{ &hf_mqpcf_cfh_version , { "Version..", "mqpcf.cfh.version" , FT_UINT32, BASE_DEC, NULL, 0x0, "CFH version", HFILL }},
{ &hf_mqpcf_cfh_command , { "Command..", "mqpcf.cfh.command" , FT_UINT32, BASE_DEC, VALS(&GET_VALSV(mqcmd)), 0x0, "CFH command", HFILL }},
{ &hf_mqpcf_cfh_MsgSeqNbr, { "MsgSeqNbr", "mqpcf.cfh.MsgSeqNbr" , FT_UINT32, BASE_DEC, NULL, 0x0, "CFH message sequence number", HFILL }},
{ &hf_mqpcf_cfh_control , { "Control..", "mqpcf.cfh.control" , FT_UINT32, BASE_DEC, NULL, 0x0, "CFH control", HFILL }},
{ &hf_mqpcf_cfh_compcode , { "CompCode.", "mqpcf.cfh.compcode" , FT_UINT32, BASE_DEC, VALS(&GET_VALSV(mqcc)), 0x0, "CFH completion code", HFILL }},
{ &hf_mqpcf_cfh_reason , { "ReasCode.", "mqpcf.cfh.reasoncode", FT_UINT32, BASE_DEC, VALS(&GET_VALSV(mqrc)), 0x0, "CFH reason code", HFILL }},
{ &hf_mqpcf_cfh_ParmCount, { "ParmCount", "mqpcf.cfh.ParmCount" , FT_UINT32, BASE_DEC, NULL, 0x0, "CFH parameter count", HFILL }},
{ &hf_mq_pcf_prmtyp , { "ParmTyp..", "mqpcf.parm.type", FT_UINT32, BASE_DEC, VALS(&GET_VALSV(PrmTyp)), 0x0, "MQPCF parameter type", HFILL }},
{ &hf_mq_pcf_prmlen , { "ParmLen..", "mqpcf.parm.len", FT_UINT32, BASE_DEC, NULL, 0x0, "MQPCF parameter length", HFILL }},
{ &hf_mq_pcf_prmid , { "ParmID...", "mqpcf.parm.id", FT_UINT32, BASE_DEC, VALS(&GET_VALSV(PrmId)), 0x0, "MQPCF parameter id", HFILL }},
{ &hf_mq_pcf_prmidnovals , { "ParmID...", "mqpcf.parm.idNoVals", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, "MQPCF parameter id No Vals", HFILL }},
{ &hf_mq_pcf_filterop , { "FilterOP.", "mqpcf.filter.op", FT_UINT32, BASE_DEC, VALS(&GET_VALSV(FilterOP)), 0x0, "MQPCF Filter operator", HFILL }},
{ &hf_mq_pcf_prmccsid , { "ParmCCSID", "mqpcf.parm.ccsid", FT_UINT32, BASE_DEC | BASE_RANGE_STRING, RVALS(&GET_VALRV(ccsid)), 0x0, "MQPCF parameter ccsid", HFILL }},
{ &hf_mq_pcf_prmstrlen , { "ParmStrLn", "mqpcf.parm.strlen", FT_UINT32, BASE_DEC, NULL, 0x0, "MQPCF parameter strlen", HFILL }},
{ &hf_mq_pcf_prmcount , { "ParmCount", "mqpcf.parm.count", FT_UINT32, BASE_DEC, NULL, 0x0, "MQPCF parameter count", HFILL }},
{ &hf_mq_pcf_prmunused , { "ParmUnuse", "mqpcf.parm.unused", FT_UINT32, BASE_DEC, NULL, 0x0, "MQPCF parameter unused", HFILL }},
{ &hf_mq_pcf_string , { "String...", "mqpcf.parm.string", FT_STRINGZ, BASE_NONE, NULL, 0x0, "MQPCF parameter string", HFILL }},
{ &hf_mq_pcf_stringlist , { "StrList..", "mqpcf.parm.stringlist", FT_STRINGZ, BASE_NONE, NULL, 0x0, "MQPCF parameter string list", HFILL }},
{ &hf_mq_pcf_int , { "Integer..", "mqpcf.parm.int", FT_INT32, BASE_DEC, NULL, 0x0, "MQPCF parameter int", HFILL }},
{ &hf_mq_pcf_intlist , { "IntList..", "mqpcf.parm.intlist", FT_INT32, BASE_DEC, NULL, 0x0, "MQPCF parameter int list", HFILL }},
{ &hf_mq_pcf_bytestring , { "ByteStr..", "mqpcf.parm.bytestring", FT_BYTES, BASE_NONE, NULL, 0x0, "MQPCF parameter byte string", HFILL }},
{ &hf_mq_pcf_int64 , { "Int64....", "mqpcf.parm.int64", FT_INT64, BASE_DEC, NULL, 0x0, "MQPCF parameter int64", HFILL }},
{ &hf_mq_pcf_int64list , { "Int64List", "mqpcf.parm.int64list", FT_INT64, BASE_DEC, NULL, 0x0, "MQPCF parameter int64 list", HFILL }},
};
{ &hf_mq_pcf_prmtyp , { "ParmTyp..", "mqpcf.parm.type" , FT_UINT32 , BASE_DEC, VALS(&GET_VALSV(PrmTyp)), 0x0, "MQPCF parameter type", HFILL }},
{ &hf_mq_pcf_prmlen , { "ParmLen..", "mqpcf.parm.len" , FT_UINT32 , BASE_DEC, NULL, 0x0, "MQPCF parameter length", HFILL }},
{ &hf_mq_pcf_prmid , { "ParmID...", "mqpcf.parm.id" , FT_UINT32 , BASE_DEC, VALS(&GET_VALSV(PrmId)), 0x0, "MQPCF parameter id", HFILL }},
{ &hf_mq_pcf_prmidnovals , { "ParmID...", "mqpcf.parm.idNoVals" , FT_UINT32 , BASE_HEX_DEC, NULL, 0x0, "MQPCF parameter id No Vals", HFILL }},
{ &hf_mq_pcf_filterop , { "FilterOP.", "mqpcf.filter.op" , FT_UINT32 , BASE_DEC, VALS(&GET_VALSV(FilterOP)), 0x0, "MQPCF Filter operator", HFILL }},
{ &hf_mq_pcf_prmccsid , { "ParmCCSID", "mqpcf.parm.ccsid" , FT_UINT32 , BASE_DEC | BASE_RANGE_STRING, RVALS(&GET_VALRV(ccsid)), 0x0, "MQPCF parameter ccsid", HFILL }},
{ &hf_mq_pcf_prmstrlen , { "ParmStrLn", "mqpcf.parm.strlen" , FT_UINT32 , BASE_DEC, NULL, 0x0, "MQPCF parameter strlen", HFILL }},
{ &hf_mq_pcf_prmcount , { "ParmCount", "mqpcf.parm.count" , FT_UINT32 , BASE_DEC, NULL, 0x0, "MQPCF parameter count", HFILL }},
{ &hf_mq_pcf_prmunused , { "ParmUnuse", "mqpcf.parm.unused" , FT_UINT32 , BASE_DEC, NULL, 0x0, "MQPCF parameter unused", HFILL }},
{ &hf_mq_pcf_string , { "String...", "mqpcf.parm.string" , FT_STRINGZ, BASE_NONE, NULL, 0x0, "MQPCF parameter string", HFILL }},
{ &hf_mq_pcf_stringlist , { "StrList..", "mqpcf.parm.stringlist", FT_STRINGZ, BASE_NONE, NULL, 0x0, "MQPCF parameter string list", HFILL }},
{ &hf_mq_pcf_int , { "Integer..", "mqpcf.parm.int" , FT_INT32 , BASE_DEC, NULL, 0x0, "MQPCF parameter int", HFILL }},
{ &hf_mq_pcf_intlist , { "IntList..", "mqpcf.parm.intlist" , FT_INT32 , BASE_DEC, NULL, 0x0, "MQPCF parameter int list", HFILL }},
{ &hf_mq_pcf_bytestring , { "ByteStr..", "mqpcf.parm.bytestring", FT_BYTES , BASE_NONE, NULL, 0x0, "MQPCF parameter byte string", HFILL }},
{ &hf_mq_pcf_int64 , { "Int64....", "mqpcf.parm.int64" , FT_INT64 , BASE_DEC, NULL, 0x0, "MQPCF parameter int64", HFILL }},
{ &hf_mq_pcf_int64list , { "Int64List", "mqpcf.parm.int64list" , FT_INT64 , BASE_DEC, NULL, 0x0, "MQPCF parameter int64 list", HFILL }},
};
static gint *ett[] =
{
&ett_mqpcf,
&ett_mqpcf_prm,
&ett_mqpcf_cfh,
};
{
&ett_mqpcf,
&ett_mqpcf_prm,
&ett_mqpcf_cfh,
};
static ei_register_info ei[] =
{
{ &ei_mq_pcf_prmln0, { "mqpcf.parm.len0", PI_MALFORMED, PI_ERROR, "MQPCF Parameter length is 0", EXPFILL }},
{ &ei_mq_pcf_MaxInt, { "mqpcf.parm.IntList", PI_UNDECODED, PI_WARN, "MQPCF Parameter Integer list exhausted", EXPFILL }},
{ &ei_mq_pcf_MaxStr, { "mqpcf.parm.StrList", PI_UNDECODED, PI_WARN, "MQPCF Parameter String list exhausted", EXPFILL }},
{ &ei_mq_pcf_MaxI64, { "mqpcf.parm.Int64List", PI_UNDECODED, PI_WARN, "MQPCF Parameter Int64 list exhausted", EXPFILL }},
{ &ei_mq_pcf_MaxPrm, { "mqpcf.parm.MaxPrm", PI_UNDECODED, PI_WARN, "MQPCF Max number of parameter exhausted", EXPFILL }},
{ &ei_mq_pcf_PrmCnt, { "mqpcf.parm.PrmCnt", PI_UNDECODED, PI_WARN, "MQPCF Unkn Parm Cnt Length invalid", EXPFILL }},
};
{
{ &ei_mq_pcf_prmln0, { "mqpcf.parm.len0" , PI_MALFORMED, PI_ERROR, "MQPCF Parameter length is 0", EXPFILL }},
{ &ei_mq_pcf_MaxInt, { "mqpcf.parm.IntList" , PI_UNDECODED, PI_WARN , "MQPCF Parameter Integer list exhausted", EXPFILL }},
{ &ei_mq_pcf_MaxStr, { "mqpcf.parm.StrList" , PI_UNDECODED, PI_WARN , "MQPCF Parameter String list exhausted", EXPFILL }},
{ &ei_mq_pcf_MaxI64, { "mqpcf.parm.Int64List", PI_UNDECODED, PI_WARN , "MQPCF Parameter Int64 list exhausted", EXPFILL }},
{ &ei_mq_pcf_MaxPrm, { "mqpcf.parm.MaxPrm" , PI_UNDECODED, PI_WARN , "MQPCF Max number of parameter exhausted", EXPFILL }},
{ &ei_mq_pcf_PrmCnt, { "mqpcf.parm.PrmCnt" , PI_UNDECODED, PI_WARN , "MQPCF Unkn Parm Cnt Length invalid", EXPFILL }},
};
module_t *mq_pcf_module;
@ -707,15 +712,15 @@ void proto_register_mqpcf(void)
mq_pcf_module = prefs_register_protocol(proto_mqpcf, NULL);
prefs_register_uint_preference(mq_pcf_module, "maxprm",
"Set the maximun number of parameter in the PCF to decode",
"When dissecting PCF there can be a lot of parameters."
" You can limit the number of parameter decoded, before it continue with the next PCF.",
10, &mq_pcf_maxprm);
"Set the maximun number of parameter in the PCF to decode",
"When dissecting PCF there can be a lot of parameters."
" You can limit the number of parameter decoded, before it continue with the next PCF.",
10, &mq_pcf_maxprm);
prefs_register_uint_preference(mq_pcf_module, "maxlst",
"Set the maximun number of Parameter List that are displayed",
"When dissecting a parameter of a PCFm, if it is a StringList, IntegerList or Integer64 List, "
" You can limit the number of element displayed, before it continue with the next Parameter.",
10, &mq_pcf_maxlst);
"Set the maximun number of Parameter List that are displayed",
"When dissecting a parameter of a PCFm, if it is a StringList, IntegerList or Integer64 List, "
" You can limit the number of element displayed, before it continue with the next Parameter.",
10, &mq_pcf_maxlst);
}
@ -725,7 +730,7 @@ void proto_reg_handoff_mqpcf(void)
}
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
* Local variables:
* c-basic-offset: 4

File diff suppressed because it is too large Load Diff

View File

@ -30,7 +30,12 @@
#define GET_VALSV(A) mq_##A##_vals
#define DEF_VALSX(A) extern const value_string GET_VALSV(A)[]
/* XXX WTF: this is broken it's used to cast value_string array to char * */
/* XXX WTF: this is broken it's used to cast value_string array to char
* This Macro is used to cast a value_string to a const gchar *
* Used in value_string MQCFINT_Parse, because this value_string
* don't return a string for a specific value, but a value_string
* that can be used in another call to try_val_to_str
*/
#define GET_VALSP(F) (const gchar *)GET_VALSV(F)
#define DEF_VALSB(A) static const value_string GET_VALSV(A)[] = \
{
@ -56,29 +61,29 @@
typedef struct _mq_ccsid_t
{
guint32 encod;
guint32 ccsid;
guint32 encod;
guint32 ccsid;
} mq_ccsid_t;
typedef struct _mq_parm_t
{
guint32 mq_strucID ;
guint32 mq_int_enc ;
guint32 mq_str_enc ;
guint8 mq_ctlf1 ;
guint8 mq_ctlf2 ;
guint8 mq_opcode ;
mq_ccsid_t mq_tsh_ccsid;
mq_ccsid_t mq_id_ccsid;
mq_ccsid_t mq_md_ccsid;
mq_ccsid_t mq_dlh_ccsid;
mq_ccsid_t mq_head_ccsid;
mq_ccsid_t mq_msgreq_ccsid;
mq_ccsid_t mq_cur_ccsid;
guint8 mq_format[8];
gint32 iOfsEnc; /* Offset to Message encoding */
gint32 iOfsCcs; /* Offset to Message character set */
gint32 iOfsFmt; /* Offset to Message format */
guint32 mq_strucID ;
guint32 mq_int_enc ;
guint32 mq_str_enc ;
guint8 mq_ctlf1 ;
guint8 mq_ctlf2 ;
guint8 mq_opcode ;
mq_ccsid_t mq_tsh_ccsid;
mq_ccsid_t mq_id_ccsid;
mq_ccsid_t mq_md_ccsid;
mq_ccsid_t mq_dlh_ccsid;
mq_ccsid_t mq_head_ccsid;
mq_ccsid_t mq_msgreq_ccsid;
mq_ccsid_t mq_cur_ccsid;
guint8 mq_format[8];
gint32 iOfsEnc; /* Offset to Message encoding */
gint32 iOfsCcs; /* Offset to Message character set */
gint32 iOfsFmt; /* Offset to Message format */
} mq_parm_t;
#define MQ_MQCA_XR_VERSION2 2120
@ -189,6 +194,8 @@ typedef struct _mq_parm_t
/* Output Data Length */
#define MQ_MQCODL_AS_INPUT (-1)
#define MQ_MQCODL_0 0
#define MQ_MQCODL_7FFFFFFF 0x7FFFFFFF
/* ADS Descriptors */
#define MQ_MQCADSD_NONE 0x00000000
@ -325,14 +332,16 @@ typedef struct _mq_parm_t
#define MQ_MQGMO_PROPERTIES_AS_Q_DEF 0x00000000
#define MQ_MQGMO_NONE 0x00000000
#define MQ_MQGMO_BROWSE_HANDLE ( MQ_MQGMO_BROWSE_FIRST \
| MQ_MQGMO_UNMARKED_BROWSE_MSG \
| MQ_MQGMO_MARK_BROWSE_HANDLE )
| MQ_MQGMO_UNMARKED_BROWSE_MSG \
| MQ_MQGMO_MARK_BROWSE_HANDLE )
#define MQ_MQGMO_BROWSE_CO_OP ( MQ_MQGMO_BROWSE_FIRST \
| MQ_MQGMO_UNMARKED_BROWSE_MSG \
| MQ:MQGMO_MARK_BROWSE_CO_OP )
| MQ_MQGMO_UNMARKED_BROWSE_MSG \
| MQ:MQGMO_MARK_BROWSE_CO_OP )
/* Wait Interval */
#define MQ_MQWI_UNLIMITED (-1)
#define MQ_MQWI_0 0
#define MQ_MQWI_7FFFFFFF 0x7FFFFFFF
/* Signal Values */
#define MQ_MQEC_MSG_ARRIVED 2
@ -536,17 +545,17 @@ typedef struct _mq_parm_t
/* Encodings for Multicast */
#define MQ_MQENC_NORMAL ( MQ_MQENC_FLOAT_IEEE_NORMAL \
| MQ_MQENC_DECIMAL_NORMAL \
| MQ_MQENC_INTEGER_NORMAL )
| MQ_MQENC_DECIMAL_NORMAL \
| MQ_MQENC_INTEGER_NORMAL )
#define MQ_MQENC_REVERSED ( MQ_MQENC_FLOAT_IEEE_REVERSED \
| MQ_MQENC_DECIMAL_REVERSED \
| MQ_MQENC_INTEGER_REVERSED )
| MQ_MQENC_DECIMAL_REVERSED \
| MQ_MQENC_INTEGER_REVERSED )
#define MQ_MQENC_S390 ( MQ_MQENC_FLOAT_S390 \
| MQ_MQENC_DECIMAL_NORMAL \
| MQ_MQENC_INTEGER_NORMAL )
| MQ_MQENC_DECIMAL_NORMAL \
| MQ_MQENC_INTEGER_NORMAL )
#define MQ_MQENC_TNS ( MQ_MQENC_FLOAT_TNS \
| MQ_MQENC_DECIMAL_NORMAL \
| MQ_MQENC_INTEGER_NORMAL )
| MQ_MQENC_DECIMAL_NORMAL \
| MQ_MQENC_INTEGER_NORMAL )
#define MQ_MQENC_AS_PUBLISHED (-1)
/* Coded Character Set Identifiers */
@ -2427,17 +2436,17 @@ typedef struct _mq_parm_t
/* Inquire on all properties - "%" */
#define MQ_MQPROP_INQUIRE_ALL (MQPTR)(char*)"%",\
0,\
0,\
1,\
MQCCSI_APPL
0,\
0,\
1,\
MQCCSI_APPL
/* Inquire on all 'usr' properties - "usr.%" */
#define MQ_MQPROP_INQUIRE_ALL_USR (MQPTR)(char*)"usr.%",\
0,\
0,\
5,\
MQCCSI_APPL
0,\
0,\
5,\
MQCCSI_APPL
/****************************************************************/
/* Values Related to MQOPEN Function */
@ -4838,20 +4847,27 @@ DEF_VALSX(objtype);
DEF_VALSX(PrmTyp);
DEF_VALSX(PrmId);
DEF_VALSX(FilterOP);
DEF_VALSX(UOWControls);
DEF_VALSX(LinkType);
DEF_VALSX(ADSDescr);
DEF_VALSX(ConvTaskOpt);
DEF_VALSX(TaskEndStatus);
DEF_VALSX(MQCFINT_Parse);
DEF_VALRX(ccsid);
DEF_VALRX(WaitIntv);
DEF_VALRX(OutDataLen);
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
* Local variables:
* c-basic-offset: 4
* tab-width: 4
* indent-tabs-mode: t
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=4 tabstop=4 noexpandtab:
* :indentSize=4:tabSize=4:noTabs=false:
* vi: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/