summaryrefslogtreecommitdiff
path: root/asn1/h248/h248.cnf
diff options
context:
space:
mode:
authorLuis Ontanon <luis.ontanon@gmail.com>2005-12-03 11:43:19 +0000
committerLuis Ontanon <luis.ontanon@gmail.com>2005-12-03 11:43:19 +0000
commite622f903f91c091c0ec52cfdfb6e5c2645bb6bbb (patch)
treea47f8fec5c3817f1f671c9c30abde9b5489ca985 /asn1/h248/h248.cnf
parent7efbafb6e5962180e48f33b6c5247f576b33792e (diff)
downloadwireshark-e622f903f91c091c0ec52cfdfb6e5c2645bb6bbb.tar.gz
Rewrite of the analisys and summary code.
Analysis code is still not working so it is disabled. svn path=/trunk/; revision=16658
Diffstat (limited to 'asn1/h248/h248.cnf')
-rw-r--r--asn1/h248/h248.cnf191
1 files changed, 97 insertions, 94 deletions
diff --git a/asn1/h248/h248.cnf b/asn1/h248/h248.cnf
index 8134fab593..8b28acf7b0 100644
--- a/asn1/h248/h248.cnf
+++ b/asn1/h248/h248.cnf
@@ -69,163 +69,166 @@ ServiceChangeRequest/terminationID terminationIDList
ServiceChangeReply/terminationID terminationIDList
-#.FN_BODY TransactionRequest/transactionId
- offset = dissect_h248_trx_id(implicit_tag, pinfo, tree, tvb, offset);
-#.END
-
-#.FN_FTR TransactionRequest
- expert_add_info_format(pinfo, proto_tree_get_parent(tree), PI_RESPONSE_CODE, PI_CHAT, "TransactionRequest");
+#.FN_HDR Message
+ msg = h248_msg(pinfo,TVB_RAW_OFFSET(tvb));
#.END
-#.FN_FTR TransactionReply
- expert_add_info_format(pinfo, proto_tree_get_parent(tree), PI_RESPONSE_CODE, PI_CHAT, "TransactionReply");
+#.FN_FTR Message
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, h248_msg_to_str(msg));
+
+ if (keep_persistent_data)
+ analyze_h248_msg(msg);
#.END
-#.FN_FTR TransactionResponseAck
- expert_add_info_format(pinfo, proto_tree_get_parent(tree), PI_RESPONSE_CODE, PI_CHAT, "TransactionResponseAck");
-#.END
-
-#.FN_HDR TransactionPending
- h248_cmdmsg = ep_alloc0(sizeof(h248_cmdmsg_info_t));
- h248_cmdmsg->cmd_type = H248_CMD_NONE;
- h248_cmdmsg->msg_type = H248_TRX_PENDING;
-#.END
-
-#.FN_FTR TransactionPending
- expert_add_info_format(pinfo, proto_tree_get_parent(tree), PI_RESPONSE_CODE, PI_WARN, "TransactionPending");
-
- h248_cmdmsg->transaction_id = transaction_id;
-
- if (check_col(pinfo->cinfo, COL_INFO)) col_set_str(pinfo->cinfo, COL_INFO, cmd_str(h248_cmdmsg));
-
- if (keep_persistent_data) {
- analyze_h248_cmd(pinfo,h248_cmdmsg);
- analysis_tree(pinfo, tvb, h248_tree, h248_cmdmsg);
- }
+#.FN_BODY TransactionRequest/transactionId
+ guint32 trx_id = 0;
+ offset = dissect_h248_trx_id(implicit_tag, pinfo, tree, tvb, offset, &trx_id);
+ trx = h248_trx(msg,trx_id,H248_TRX_REQUEST);
#.END
#.FN_BODY TransactionPending/transactionId
- offset = dissect_h248_trx_id(implicit_tag, pinfo, tree, tvb, offset);
+ guint32 trx_id = 0;
+ offset = dissect_h248_trx_id(implicit_tag, pinfo, tree, tvb, offset, &trx_id);
+ trx = h248_trx(msg,trx_id,H248_TRX_PENDING);
#.END
#.FN_BODY TransactionReply/transactionId
- offset = dissect_h248_trx_id(implicit_tag, pinfo, tree, tvb, offset);
+ guint32 trx_id = 0;
+ offset = dissect_h248_trx_id(implicit_tag, pinfo, tree, tvb, offset, &trx_id);
+ trx = h248_trx(msg,trx_id,H248_TRX_REPLY);
#.END
#.FN_BODY TransactionResponseAck/transactionId
- offset = dissect_h248_trx_id(implicit_tag, pinfo, tree, tvb, offset);
+ guint32 trx_id = 0;
+ offset = dissect_h248_trx_id(implicit_tag, pinfo, tree, tvb, offset, &trx_id);
+ trx = h248_trx(msg,trx_id,H248_TRX_ACK);
#.END
-#.FN_HDR Command
- h248_cmdmsg = ep_alloc0(sizeof(h248_cmdmsg_info_t));
- h248_cmdmsg->offset = offset;
- h248_cmdmsg->transaction_id = transaction_id;
- h248_cmdmsg->context_id = context_id;
- h248_cmdmsg->cmd_type = H248_CMD_NONE;
- h248_cmdmsg->msg_type = H248_TRX_REQUEST;
- h248_cmdmsg->term_is_wildcard = FALSE;
-#.END
-
-#.FN_FTR Command
- if (check_col(pinfo->cinfo, COL_INFO)) col_set_str(pinfo->cinfo, COL_INFO, cmd_str(h248_cmdmsg));
-
- if (keep_persistent_data) {
- analyze_h248_cmd(pinfo,h248_cmdmsg);
- analysis_tree(pinfo, tvb, h248_tree, h248_cmdmsg);
- }
+#.FN_BODY ActionRequest/contextId
+ guint32 ctx_id = 0;
+ offset = dissect_h248_ctx_id(implicit_tag, pinfo, tree, tvb, offset, &ctx_id);
+ ctx = h248_ctx(msg,trx,ctx_id);
#.END
-#.FN_HDR CommandReply
- h248_cmdmsg = ep_alloc0(sizeof(h248_cmdmsg_info_t));
- h248_cmdmsg->offset = offset;
- h248_cmdmsg->transaction_id = transaction_id;
- h248_cmdmsg->context_id = context_id;
- h248_cmdmsg->cmd_type = H248_CMD_NONE;
- h248_cmdmsg->msg_type = H248_TRX_REPLY;
- h248_cmdmsg->term_is_wildcard = FALSE;
+#.FN_BODY ActionReply/contextId
+ guint32 ctx_id;
+ offset = dissect_h248_ctx_id(implicit_tag, pinfo, tree, tvb, offset, &ctx_id);
+ ctx = h248_ctx(msg,trx,ctx_id);
+ cmd = NULL;
#.END
-#.FN_FTR CommandReply
- if (check_col(pinfo->cinfo, COL_INFO)) col_set_str(pinfo->cinfo, COL_INFO, cmd_str(h248_cmdmsg));
- if (keep_persistent_data) {
- analyze_h248_cmd(pinfo,h248_cmdmsg);
- analysis_tree(pinfo, tvb, h248_tree, h248_cmdmsg);
- }
+#.FN_FTR ActionReply
+ if (!cmd)
+ cmd = h248_cmd(msg,trx,ctx,H248_CMD_REPLY,offset);
#.END
-#.FN_BODY ActionRequest/contextId
- offset = dissect_h248_ctx_id(implicit_tag, pinfo, tree, tvb, offset);
+#.FN_HDR Command/addReq
+ cmd = h248_cmd(msg,trx,ctx,H248_CMD_ADD_REQ,offset);
#.END
-#.FN_BODY ActionReply/contextId
- offset = dissect_h248_ctx_id(implicit_tag, pinfo, tree, tvb, offset);
+#.FN_FTR Command/addReq
+ cmd = NULL;
#.END
-#.FN_HDR Command/addReq
- h248_cmdmsg->cmd_type = H248_CMD_ADD;
+#.FN_HDR Command/moveReq
+ cmd = h248_cmd(msg,trx,ctx,H248_CMD_MOVE_REQ,offset);
#.END
-#.FN_HDR Command/moveReq
- h248_cmdmsg->cmd_type = H248_CMD_MOVE;
+#.FN_FTR Command/moveReq
+ cmd = NULL;
#.END
#.FN_HDR Command/modReq
- h248_cmdmsg->cmd_type = H248_CMD_MOD;
+ cmd = h248_cmd(msg,trx,ctx,H248_CMD_MOD_REQ,offset);
+#.END
+#.FN_FTR Command/modReq
+ cmd = NULL;
#.END
#.FN_HDR Command/subtractReq
- h248_cmdmsg->cmd_type = H248_CMD_SUB;
+ cmd = h248_cmd(msg,trx,ctx,H248_CMD_SUB_REQ,offset);
+#.END
+#.FN_FTR Command/subtractReq
+ cmd = NULL;
#.END
#.FN_HDR Command/auditCapRequest
- h248_cmdmsg->cmd_type = H248_CMD_AUDITCAP;
+ cmd = h248_cmd(msg,trx,ctx,H248_CMD_AUDITCAP_REQ,offset);
+#.END
+#.FN_FTR Command/auditCapRequest
+ cmd = NULL;
#.END
#.FN_HDR Command/auditValueRequest
- h248_cmdmsg->cmd_type = H248_CMD_AUDITVAL;
+ cmd = h248_cmd(msg,trx,ctx,H248_CMD_AUDITVAL_REQ,offset);
+#.END
+#.FN_FTR Command/auditValueRequest
+ cmd = NULL;
#.END
#.FN_HDR Command/notifyReq
- h248_cmdmsg->cmd_type = H248_CMD_NOTIFY;
+ cmd = h248_cmd(msg,trx,ctx,H248_CMD_NOTIFY_REQ,offset);
+#.END
+#.FN_FTR Command/notifyReq
+ cmd = NULL;
#.END
#.FN_HDR Command/ServiceChangeRequest
- h248_cmdmsg->cmd_type = H248_CMD_SVCCHG;
+ cmd = h248_cmd(msg,trx,ctx,H248_CMD_SVCCHG_REQ,offset);
+#.END
+#.FN_FTR Command/ServiceChangeRequest
+ cmd = NULL;
+#.END
+
+#.FN_HDR ContextRequest/topologyReq
+ cmd = h248_cmd(msg,trx,ctx,H248_CMD_TOPOLOGY_REQ,offset);
+#.END
+#.FN_FTR ContextRequest/topologyReq
+ cmd = NULL;
+#.END
+
+#.FN_HDR ActionRequest/contextAttrAuditReq
+ cmd = h248_cmd(msg,trx,ctx,H248_CMD_CTX_ATTR_AUDIT_REQ,offset);
+#.END
+#.FN_FTR ActionRequest/contextAttrAuditReq
+ cmd = NULL;
#.END
#.FN_HDR CommandReply/addReply
- h248_cmdmsg->cmd_type = H248_CMD_ADD;
+ cmd = h248_cmd(msg,trx,ctx,H248_CMD_ADD_REPLY,offset);
#.END
#.FN_HDR CommandReply/moveReply
- h248_cmdmsg->cmd_type = H248_CMD_MOVE;
+ cmd = h248_cmd(msg,trx,ctx,H248_CMD_MOVE_REPLY,offset);
#.END
#.FN_HDR CommandReply/modReply
- h248_cmdmsg->cmd_type = H248_CMD_MOD;
+ cmd = h248_cmd(msg,trx,ctx,H248_CMD_MOD_REPLY,offset);
#.END
#.FN_HDR CommandReply/subtractReply
- h248_cmdmsg->cmd_type = H248_CMD_SUB;
+ cmd = h248_cmd(msg,trx,ctx,H248_CMD_SUB_REPLY,offset);
#.END
#.FN_HDR CommandReply/notifyReply
- h248_cmdmsg->cmd_type = H248_CMD_NOTIFY;
+ cmd = h248_cmd(msg,trx,ctx,H248_CMD_NOTIFY_REPLY,offset);
#.END
#.FN_HDR CommandReply/ServiceChangeReply
- h248_cmdmsg->cmd_type = H248_CMD_SVCCHG;
+ cmd = h248_cmd(msg,trx,ctx,H248_CMD_SVCCHG_REPLY,offset);
#.END
#.FN_HDR CommandReply/auditCapReply
- h248_cmdmsg->cmd_type = H248_CMD_AUDITCAP;
+ cmd = h248_cmd(msg,trx,ctx,H248_CMD_AUDITCAP_REPLY,offset);
#.END
#.FN_HDR CommandReply/auditValueReply
- h248_cmdmsg->cmd_type = H248_CMD_AUDITVAL;
+ cmd = h248_cmd(msg,trx,ctx,H248_CMD_AUDITVAL_REPLY,offset);
#.END
+
#.FN_BODY WildcardField
tvbuff_t* new_tvb;
offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,&new_tvb);
@@ -233,17 +236,18 @@ ServiceChangeReply/terminationID terminationIDList
proto_tree_add_item(tree,hf_h248_term_wild_type,new_tvb,0,1,FALSE);
proto_tree_add_item(tree,hf_h248_term_wild_level,new_tvb,0,1,FALSE);
proto_tree_add_item(tree,hf_h248_term_wild_position,new_tvb,0,1,FALSE);
-
- h248_cmdmsg->term_is_wildcard = TRUE;
#.END
#.FN_BODY ErrorDescriptor/errorCode
- guint32 val;
-
- val = 0;
- offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_h248_error_code, &val);
- h248_cmdmsg->error_code = val;
+ offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_h248_error_code, &error_code);
expert_add_info_format(pinfo, get_ber_last_created_item(), PI_RESPONSE_CODE, PI_WARN, "Errored Command");
+
+ if (cmd) {
+ h248_cmd_set_error(cmd,error_code);
+ } else {
+ h248_trx_set_error(trx,error_code);
+ }
+
return offset;
#.END
@@ -251,12 +255,11 @@ ServiceChangeReply/terminationID terminationIDList
tvbuff_t* new_tvb;
offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, &new_tvb);
- h248_cmdmsg->term_id = bytes_to_str(tvb_get_ptr(tvb,0,tvb->length),tvb->length);
+ h248_cmd_add_str(cmd,bytes_to_str(tvb_get_ptr(tvb,0,tvb->length),tvb->length));
if (new_tvb && h248_term_handle) {
call_dissector(h248_term_handle, new_tvb, pinfo, tree);
}
-
#.END
#.TYPE_ATTR