diff options
author | Anders Broman <anders.broman@ericsson.com> | 2008-07-28 14:26:04 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2008-07-28 14:26:04 +0000 |
commit | ee0a994407ea851d26d926361a6f16bbcf448897 (patch) | |
tree | 1a137a889b5635211b8a2000a0386e20fc025383 /asn1/inap | |
parent | 133671c781e428751d68c13a1b576fc8c5ce8e3d (diff) | |
download | wireshark-ee0a994407ea851d26d926361a6f16bbcf448897.tar.gz |
Get rid of some unused code warnings.
svn path=/trunk/; revision=25849
Diffstat (limited to 'asn1/inap')
-rw-r--r-- | asn1/inap/Makefile.common | 6 | ||||
-rw-r--r-- | asn1/inap/inap.cnf | 202 | ||||
-rw-r--r-- | asn1/inap/packet-inap-template.c | 434 |
3 files changed, 146 insertions, 496 deletions
diff --git a/asn1/inap/Makefile.common b/asn1/inap/Makefile.common index 207552e004..b60fe1fc51 100644 --- a/asn1/inap/Makefile.common +++ b/asn1/inap/Makefile.common @@ -29,9 +29,12 @@ NEED_PACKET_PROTO_H = 1 EXPORT_FILES = $(PROTOCOL_NAME)-exp.cnf -EXT_ASN_FILE_LIST = ../ros/Remote-Operations-Information-Objects.asn +EXT_ASN_FILE_LIST_LATE = \ + ../ros/Remote-Operations-Information-Objects.asn \ + ../ros/Remote-Operations-Generic-ROS-PDUs.asn 1248_1_ASN_FILES= \ + IN-operationcodes.asn \ IN-object-identifiers.asn \ IN-common-datatypes.asn @@ -50,7 +53,6 @@ EXT_ASN_FILE_LIST = ../ros/Remote-Operations-Information-Objects.asn ASN_FILE_LIST= \ $(1248_CLASSES_ASN) \ - $(PROTOCOL_NAME).asn \ $(1248_1_ASN_FILES) \ $(1248_2_ASN_FILES) \ $(1248_3_ASN_FILES) diff --git a/asn1/inap/inap.cnf b/asn1/inap/inap.cnf index 78b1c3a01f..6bffe6af71 100644 --- a/asn1/inap/inap.cnf +++ b/asn1/inap/inap.cnf @@ -23,62 +23,32 @@ ServiceKey #.NO_EMIT +#.OMIT_ASSIGNMENT +# Removed as they are giving 'defined but not used' warnings currently. +Priority +#.END + #.TYPE_RENAME +ReturnResult/result/result ResultArgument #.FIELD_RENAME +Invoke/linkedId/present linkedIdPresent +Reject/problem/invoke invokeProblem +Reject/problem/returnError returnErrorProblem +ReturnResult/result/result resultArgument +Reject/problem/returnResult problemReturnResult + +#.OMIT_ASSIGNMENT Remote-Operations-Information-Objects +Bind +Unbind +#.END + +#.PDU_NEW +ERROR.&ParameterType +OPERATION.&ArgumentType +OPERATION.&ResultType #.PDU -INAP-Component -#InitialDPArg -#OriginationAttemptAuthorizedArg -#CollectedInformationArg -#AnalysedInformationArg -#RouteSelectFailureArg -#OCalledPartyBusyArg -#ONoAnswerArg -#OAnswerArg -#ODisconnectArg -#TermAttemptAuthorizedArg -#TBusyArg -#TNoAnswerArg -#TAnswerArg -#TDisconnectArg -#MidCallArg -#AssistRequestInstructionsArg -#EstablishTemporaryConnectionArg -#ConnectToResourceArg -#ConnectArg -#HoldCallInNetworkArg -#ReleaseCallArg -#RequestReportBCSMEventArg -#EventReportBCSMArg -#RequestNotificationChargingEventArg -#EventNotificationChargingArg -#CollectInformationArg -#AnalyseInformationArg -#SelectRouteArg -#SelectFacilityArg -#InitiateCallAttemptArg -#ResetTimerArg -#FurnishChargingInformationArg -#ApplyChargingArg -#ApplyChargingReportArg -#RequestCurrentStatusReportArg -#RequestEveryStatusChangeReportArg -#RequestFirstStatusMatchReportArg -#StatusReportArg -#CallGapArg -#ActivateServiceFilteringArg -#ServiceFilteringResponseArg - -#CallInformationReportArg -#CallInformationRequestArg -#PlayAnnouncementArg -#PromptAndCollectUserInformationArg -#SpecializedResourceReportArg -#CancelArg -#RequestCurrentStatusReportResultArg -#ReceivedInformationArg # This table creates the value_sting to name Inap operation codes and errors # in file packet-inap-table.c which is included in the template file @@ -103,6 +73,64 @@ static const value_string inap_err_code_string_vals[] = { }; #.END +# This table creates the switch() to branch on Camel operation codes and errors +# in file packet-inap-table2.c which is included in the template file +# +#.TABLE2_HDR +static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx) { + proto_item *cause; + + switch(opcode){ +#.TABLE2_BODY OPERATION.&ArgumentType + case %(&operationCode)s: /* %(_ident)s */ + offset= %(_argument_pdu)s(tvb, actx->pinfo , tree); + break; +#.TABLE2_FTR + cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob"); + proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN); + expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode); + /* todo call the asn.1 dissector */ + } + return offset; +} +#.END +#.TABLE2_HDR +static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset,asn1_ctx_t *actx) { + proto_item *cause; + + switch(opcode){ +#.TABLE2_BODY OPERATION.&ResultType + case %(&operationCode)s: /* %(_ident)s */ + offset= %(_result_pdu)s(tvb, actx->pinfo , tree); + break; +#.TABLE2_FTR + default: + cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnResultData blob"); + proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN); + expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown returnResultData %d",opcode); + } + return offset; +} +#.END +#.TABLE2_HDR +static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset,asn1_ctx_t *actx) { + proto_item *cause; + + switch(errorCode) { +#.TABLE2_BODY ERROR.&ParameterType + case %(&errorCode)s: /* %(_ident)s */ + %(_parameter_pdu)s(tvb, actx->pinfo , tree); + break; +#.TABLE2_FTR + default: + cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnErrorData blob"); + proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN); + expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown returnErrorData %d",errorCode); + } + return offset; +} +#.END + # Create a table of opcode and corresponding args and res #.TABLE11_HDR typedef struct _inap_op_t { @@ -119,18 +147,63 @@ static const inap_op_t inap_op_tab[] = { #.END #.TABLE11_HDR -typedef struct _camel_err_t { +typedef struct _inap_err_t { gint32 errcode; new_dissector_t err_pdu; -} camel_err_t; +} inap_err_t; -static const camel_err_t camel_err_tab[] = { +static const inap_err_t inap_err_tab[] = { #.TABLE11_BODY ERROR.&errorCode /* %(_name)-30s */ { %(&errorCode)4s, %(_parameter_pdu)s }, #.TABLE11_FTR }; #.END +# ROS stuff here XXX change when TCAP is redone. + +#.FN_BODY Code/local VAL_PTR = &opcode + %(DEFAULT_BODY)s + if (inap_opcode_type == INAP_OPCODE_RETURN_ERROR){ + errorCode = opcode; + if (check_col(actx->pinfo->cinfo, COL_INFO)){ + col_append_str(actx->pinfo->cinfo, COL_INFO, + val_to_str(errorCode, inap_err_code_string_vals, "Unknown INAP error (%%u)")); + col_append_str(actx->pinfo->cinfo, COL_INFO, " "); + col_set_fence(actx->pinfo->cinfo, COL_INFO); + } + }else{ + if (check_col(actx->pinfo->cinfo, COL_INFO)){ + col_append_str(actx->pinfo->cinfo, COL_INFO, + val_to_str(opcode, inap_opr_code_strings, "Unknown INAP (%%u)")); + col_append_str(actx->pinfo->cinfo, COL_INFO, " "); + col_set_fence(actx->pinfo->cinfo, COL_INFO); + } + } + +#.FN_HDR Invoke + inap_opcode_type=INAP_OPCODE_INVOKE; + +#.FN_HDR ReturnResult + inap_opcode_type=INAP_OPCODE_RETURN_RESULT; + +#.FN_HDR ReturnError + inap_opcode_type=INAP_OPCODE_RETURN_ERROR; + +#.FN_HDR Reject + inap_opcode_type=INAP_OPCODE_REJECT; + +#.FN_BODY Invoke/argument + offset = dissect_invokeData(tree, tvb, offset, actx); + +#.FN_BODY ReturnResult/result/result + offset = dissect_returnResultData(tree, tvb, offset, actx); + +#.FN_BODY ReturnError/parameter + offset = dissect_returnErrorData(tree, tvb, offset, actx); + +# END ROS + + #.FN_BODY TriggerData/triggerPar /* FIX ME */ @@ -150,28 +223,7 @@ static const camel_err_t camel_err_tab[] = { offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, NULL); -#.FN_BODY InvokeParameter - offset = dissect_invokeData(tree, tvb, offset, actx); - -#.FN_BODY ReturnResultParameter - offset = dissect_returnResultData(tree, tvb, offset, actx); -#.FN_BODY ReturnErrorParameter - offset = dissect_returnErrorData(tree, tvb, offset, actx); - -#.FN_BODY INAPLocalErrorcode VAL_PTR = &errorCode - offset = dissect_ber_integer(FALSE, actx, tree, tvb, offset, hf_index, &errorCode); - - if (check_col(actx->pinfo->cinfo, COL_INFO)){ - col_set_str(actx->pinfo->cinfo, COL_INFO, val_to_str(errorCode, inap_error_code_strings, "Unknown Inap (%u)")); - } - -#.FN_BODY INAPOperationLocalvalue - offset = dissect_ber_integer(FALSE, actx, tree, tvb, offset, hf_index, &opcode); - - if (check_col(actx->pinfo->cinfo, COL_INFO)){ - col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", val_to_str(opcode, inap_opr_code_strings, "Unknown Inap (%u)")); - } #.FN_BODY CalledPartyNumber VAL_PTR = ¶meter_tvb tvbuff_t *parameter_tvb; diff --git a/asn1/inap/packet-inap-template.c b/asn1/inap/packet-inap-template.c index 044af5bc1e..a5153b8dba 100644 --- a/asn1/inap/packet-inap-template.c +++ b/asn1/inap/packet-inap-template.c @@ -54,6 +54,9 @@ /* Initialize the protocol and registered fields */ int proto_inap = -1; +/* include constants */ +#include "packet-inap-val.h" + #include "packet-inap-hf.c" #define MAX_SSN 254 @@ -64,127 +67,20 @@ static dissector_handle_t inap_handle; /* Global variables */ static guint32 opcode=0; -static guint32 errorCode; +static guint32 errorCode=0; + +static int inap_opcode_type; +#define INAP_OPCODE_INVOKE 1 +#define INAP_OPCODE_RETURN_RESULT 2 +#define INAP_OPCODE_RETURN_ERROR 3 +#define INAP_OPCODE_REJECT 4 /* Initialize the subtree pointers */ static gint ett_inap = -1; static gint ett_inapisup_parameter = -1; #include "packet-inap-ett.c" -const value_string inap_opr_code_strings[] = { - - {0,"InitialDP"}, - {1, "OriginationAttemptAuthorized"}, - {2, "CollectedInformation"}, - {3, "AnalysedInformation"}, - {4, "RouteSelectFailure"}, - {5, "oCalledPartyBusy"}, - {6, "oNoAnswer"}, - {7, "oAnswer"}, - {8, "oDisconnect"}, - {9, "TermAttemptAuthorized"}, - {10, "tBusy"}, - {11, "tNoAnswer"}, - {12, "tAnswer"}, - {13, "tDisconnect"}, - {14, "oMidCall"}, - {15, "tMidCall"}, - {16, "AssistRequestInstructions"}, - {17,"EstablishTemporaryConnection"}, - {18, "DisconnectForwardConnection"}, - {19,"ConnectToResource"}, - {20, "Connect"}, - {21,"HoldCallInNetwork"}, - {22, "ReleaseCall"}, - {23, "RequestReportBCSMEven"}, - {23, "RequestReportBCSMEvent"}, - {24, "EventReportBCSM"}, - {25, "RequestNotificationChargingEvent"}, - {26, "EventNotificationCharging"}, - {27, "CollectInformation"}, - {28, "AnalyseInformation"}, - {29, "SelectRoute"}, - {30, "SelectFacility"}, - {31, "Continue"}, - {32, "InitiateCallAttempt"}, - {33, "ResetTimer"}, - {34, "FurnishChargingInformation"}, - {35, "ApplyCharging"}, - {36, "ApplyChargingReport"}, - {37, "RequestCurrentStatusReport"}, - {38, "RequestEveryStatusChangeReport"}, - {39, "RequestFirstStatusMatchReport"}, - {40, "StatusReport"}, - {41, "CallGap"}, - {42, "ActivateServiceFiltering"}, - {43, "ServiceFilteringResponse"}, - {44, "CallInformationReport"}, - {45, "CallInformationRequest"}, - {46, "SendChargingInformation"}, - {47, "PlayAnnouncement"}, - {48, "PromptAndCollectUserInformation"}, - {49, "SpecializedResourceReport"}, - {53, "Cancel"}, - {54, "CancelStatusReportRequest"}, - {55, "ActivityTest"}, - {80, "FacilitySelectedAndAvailable"}, - {81, "OriginationAttempt"}, - {82, "TerminationAttempt"}, - {83, "OAbandon"}, - {84, "OSuspended"}, - {85, "TSuspended"}, - {87, "AuthorizeTermination"}, - {88, "ContinueWithArgument"}, - {89, "CreateCallSegmentAssociation "}, - {90, "DisconnectLeg"}, - {91, "MergeCallSegments"}, - {92, "MoveCallSegments"}, - {93, "MoveLeg"}, - {94, "Reconnect"}, - {95, "SplitLeg"}, - {96, "EntityReleased"}, - {97, "ManageTriggerData"}, - {98, "requestReportUTSI"}, - {99,"ReceivedInformation"}, /*???????*/ - {100, "sendSTUI"}, - {101, "reportUTSI"}, - {102, "sendFacilityInformation"}, - {103, "requestReportFacilityEvent"}, - {104, "eventReportFacility"}, - {107, "promptAndReceiveMessage"}, - {108, "scriptInformation"}, - {109, "scriptEvent"}, - {110, "scriptRun"}, - {111, "scriptClose"}, - {135, "createOrRemoveTriggerData"}, - {136, "setServiceProfile"}, - {139, "srfCallGap"}, - {145, "CallFiltering"}, - {146, "monitorRouteRequest"}, - {147, "monitorRouteReport"}, - {0, NULL} -}; - -const value_string inap_error_code_strings[] = { - -{0,"cancelled"}, -{1,"cancelFailed"}, -{3,"etcFailed"}, -{4,"improperCallerResponse"}, -{6,"missingCustomerRecord"}, -{7,"missingParameter"}, -{8,"parameterOutOfRange"}, -{10,"RequestedInfoError"}, -{11,"SystemFailure"}, -{12,"TaskRefused"}, -{13,"UnavailableResource"}, -{14,"UnexpectedComponentSequence"}, -{15,"UnexpectedDataValue"}, -{16,"UnexpectedParameter"}, -{17,"UnknownLegID"}, -{18,"UnknownResource"}, -{0, NULL} -}; +#include "packet-inap-table.c" const value_string inap_general_problem_strings[] = { {0,"General Problem Unrecognized Component"}, @@ -219,310 +115,8 @@ TC-Invokable OPERATION ::= promptAndCollectUserInformation} */ -static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) { - switch(opcode){ - case 0: /*InitialDP*/ - offset=dissect_inap_InitialDPArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 1: /*1 OriginationAttemptAuthorized */ - offset=dissect_inap_OriginationAttemptAuthorizedArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 2: /*2 CollectedInformation */ - offset=dissect_inap_CollectedInformationArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 3: /*3 AnalysedInformation */ - offset=dissect_inap_AnalysedInformationArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 4: /*4 RouteSelectFailure */ - offset=dissect_inap_RouteSelectFailureArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 5: /*5 oCalledPartyBusy */ - offset=dissect_inap_OCalledPartyBusyArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 6: /*6 oNoAnswer */ - offset=dissect_inap_ONoAnswerArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 7: /*7 oAnswer */ - offset=dissect_inap_OAnswerArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 8: /*8 oDisconnect */ - offset=dissect_inap_ODisconnectArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 9: /*9 TermAttemptAuthorized */ - offset=dissect_inap_TermAttemptAuthorizedArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 10: /*10 tBusy */ - offset=dissect_inap_TBusyArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 11: /*11 tNoAnswer */ - offset=dissect_inap_TNoAnswerArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 12: /*12 tAnswer */ - offset=dissect_inap_TAnswerArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 13: /*13 tDisconnect */ - offset=dissect_inap_TDisconnectArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 14: /*14 oMidCall */ - offset=dissect_inap_MidCallArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 15: /*15 tMidCall */ - offset=dissect_inap_MidCallArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 16: /*AssistRequestInstructions*/ - offset=dissect_inap_AssistRequestInstructionsArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 17: /*EstablishTemporaryConnection*/ - offset=dissect_inap_EstablishTemporaryConnectionArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 18: /*DisconnectForwardConnections*/ - proto_tree_add_text(tree, tvb, offset, -1, "Disconnect Forward Connection"); - break; - case 19: /*ConnectToResource*/ - offset=dissect_inap_ConnectToResourceArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 20: /*Connect*/ - offset=dissect_inap_ConnectArg(FALSE, tvb, offset, actx, tree,-1); - break; - case 21: /* 21 HoldCallInNetwork */ - offset=dissect_inap_HoldCallInNetworkArg(FALSE, tvb, offset, actx, tree,-1); - break; - - case 22: /*ReleaseCall*/ - offset=dissect_inap_ReleaseCallArg(FALSE, tvb, offset, actx, tree,-1); - break; - case 23: /*InitialDP*/ - offset=dissect_inap_RequestReportBCSMEventArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 24: /*EventReportBCSM*/ - offset=dissect_inap_EventReportBCSMArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 25: /*25, "RequestNotificationChargingEvent */ - offset=dissect_inap_RequestNotificationChargingEventArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 26: /*26, "EventNotificationCharging */ - offset=dissect_inap_EventNotificationChargingArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 27: /*27, "CollectInformation */ - offset=dissect_inap_CollectInformationArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 28: /*28, "AnalyseInformation */ - offset=dissect_inap_AnalyseInformationArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 29: /*29, "SelectRoute */ - offset=dissect_inap_SelectRouteArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 30: /*30, "SelectFacility */ - offset=dissect_inap_SelectFacilityArg(FALSE, tvb, offset, actx, tree, -1); - break; - /*31, "Continue */ - case 32: /*32, InitiateCallAttempt*/ - offset=dissect_inap_InitiateCallAttemptArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 33: /*ResetTimer*/ - offset=dissect_inap_ResetTimerArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 34: /*FurnishChargingInformation*/ - offset=dissect_inap_FurnishChargingInformationArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 35: /*35, ApplyCharging */ - offset=dissect_inap_ApplyChargingArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 36: /*36, "ApplyChargingReport */ - offset=dissect_inap_ApplyChargingReportArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 37: /*37, "RequestCurrentStatusReport */ - offset=dissect_inap_RequestCurrentStatusReportArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 38:/*38, "RequestEveryStatusChangeReport */ - offset=dissect_inap_RequestEveryStatusChangeReportArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 39:/*39, "RequestFirstStatusMatchReport */ - offset=dissect_inap_RequestFirstStatusMatchReportArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 40:/*40, "StatusReport */ - offset=dissect_inap_StatusReportArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 41:/*41, "CallGap */ - offset=dissect_inap_CallGapArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 42:/*42, "ActivateServiceFiltering */ - offset=dissect_inap_ActivateServiceFilteringArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 43:/*43, "ServiceFilteringResponse */ - offset=dissect_inap_ServiceFilteringResponseArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 44: /*CallInformationReport*/ - offset=dissect_inap_CallInformationReportArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 45: /*CallInformationRequest*/ - offset=dissect_inap_CallInformationRequestArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 47: /*PlayAnnouncement*/ - offset=dissect_inap_PlayAnnouncementArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 48: /*PromptAndCollectUserInformation*/ - offset=dissect_inap_PromptAndCollectUserInformationArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 49: /* 49 SpecializedResourceReport */ - offset=dissect_inap_SpecializedResourceReportArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 53: /*Cancel*/ - offset=dissect_inap_CancelArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 80: /*FacilitySelectedAndAvailable*/ - offset = dissect_inap_FacilitySelectedAndAvailableArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 81: /*OriginationAttempt*/ - offset = dissect_inap_OriginationAttemptArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 82: /*TerminationAttempt*/ - offset = dissect_inap_TerminationAttemptArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 83: /*OAbandon*/ - offset =dissect_inap_OAbandonArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 84: /*OSuspended*/ - offset = dissect_inap_OSuspendedArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 85: /*TSuspended*/ - offset = dissect_inap_TSuspendedArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 87: /*AuthorizeTermination*/ - offset = dissect_inap_AuthorizeTerminationArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 88: /*continueWithArgument*/ - offset=dissect_inap_ContinueWithArgumentArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 89: /*CreateCallSegmentAssociation */ - offset = dissect_inap_CreateCallSegmentAssociationArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 90: /*DisconnectLeg*/ - offset = dissect_inap_DisconnectLegArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 91: /*MergeCallSegments*/ - offset = dissect_inap_MergeCallSegmentsArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 92: /*MoveCallSegments*/ - offset = dissect_inap_MoveCallSegmentsArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 93: /*MoveLeg*/ - offset = dissect_inap_MoveLegArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 94: /*Reconnect*/ - offset = dissect_inap_ReconnectArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 95: /*SplitLeg*/ - offset = dissect_inap_SplitLegArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 96: /*EntityReleased*/ - offset = dissect_inap_EntityReleasedArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 97: /*ManageTriggerData*/ - offset = dissect_inap_ManageTriggerDataArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 98: /*requestReportUTSI*/ - offset = dissect_inap_RequestReportUTSIArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 99: /* ReceivedInformation - ???????*/ - offset = dissect_inap_ReceivedInformationArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 100: /*sendSTUI*/ - offset = dissect_inap_SendSTUIArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 101: /*reportUTSI*/ - offset = dissect_inap_ReportUTSIArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 102: /*sendFacilityInformation*/ - offset = dissect_inap_SendFacilityInformationArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 103: /*requestReportFacilityEvent*/ - offset = dissect_inap_RequestReportFacilityEventArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 104: /*eventReportFacility*/ - offset = dissect_inap_EventReportFacilityArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 107: /*promptAndReceiveMessage*/ - offset = dissect_inap_PromptAndReceiveMessageArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 108: /*scriptInformation*/ - offset = dissect_inap_ScriptInformationArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 109: /*scriptEvent*/ - offset = dissect_inap_ScriptEventArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 110: /*scriptRun*/ - offset = dissect_inap_ScriptRunArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 111: /*scriptClose*/ - offset = dissect_inap_ScriptCloseArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 135: /*createOrRemoveTriggerData*/ - offset = dissect_inap_CreateOrRemoveTriggerDataArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 139: /*srfCallGap*/ - offset = dissect_inap_SRFCallGapArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 136: /*setServiceProfile*/ - offset = dissect_inap_SetServiceProfileArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 145: /*CallFiltering*/ - offset = dissect_inap_CallFilteringArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 146: /*monitorRouteRequest*/ - offset = dissect_inap_MonitorRouteRequestArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 147: /*monitorRouteReport*/ - offset = dissect_inap_MonitorRouteReportArg(FALSE, tvb, offset, actx, tree, -1); - break; - /*55 ActivityTest*/ - default: - proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob"); - /* todo call the asn.1 dissector */ - } - return offset; -} +#include "packet-inap-table2.c" -/* -TC-Returnable OPERATION ::= - {activateServiceFiltering | activityTest | requestCurrentStatusReport | - requestEveryStatusChangeReport | requestFirstStatusMatchReport | - promptAndCollectUserInformation} - - activateServiceFiltering - No arg - activityTest - No Arg - requestCurrentStatusReport - RESULT RequestCurrentStatusReportResultArg - requestEveryStatusChangeReport - No arg - requestFirstStatusMatchReport - No Arg - promptAndCollectUserInformation - RESULT ReceivedInformationArg - -*/ -static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) { - switch(opcode){ - case 37: /*requestCurrentStatusReport*/ - offset=dissect_inap_RequestCurrentStatusReportResultArg(FALSE, tvb, offset, actx, tree, -1); - break; - case 48: /*PromptAndCollectUserInformation*/ - offset=dissect_inap_ReceivedInformationArg(FALSE, tvb, offset, actx, tree, -1); - break; - default: - proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnResultData blob"); - } - return offset; -} -/* From GSMMAP TODO find out if there is ERROR parameters */ -static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx) { - proto_item *cause; - - switch(errorCode){ - default: - cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnErrorData blob"); - proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN); - expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",errorCode); - break; - } - return offset; -} static guint8 inap_pdu_type = 0; static guint8 inap_pdu_size = 0; @@ -534,6 +128,8 @@ dissect_inap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) proto_item *item=NULL; proto_tree *tree=NULL; int offset = 0; + asn1_ctx_t asn1_ctx; + asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); if (check_col(pinfo->cinfo, COL_PROTOCOL)) { @@ -549,7 +145,7 @@ dissect_inap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) /* Get the length and add 2 */ inap_pdu_size = tvb_get_guint8(tvb, offset+1)+2; opcode = 0; - dissect_INAP_Component_PDU(tvb, pinfo, tree); + offset = dissect_inap_ROS(TRUE, tvb, offset, &asn1_ctx, tree, -1); } |