aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/h225
diff options
context:
space:
mode:
authorTomas Kukosa <tomas.kukosa@siemens.com>2006-05-22 11:49:50 +0000
committerTomas Kukosa <tomas.kukosa@siemens.com>2006-05-22 11:49:50 +0000
commitfbd2a3fe3e6829304daba4ada278246f343e5f4b (patch)
treed9fe17598a0585424c3b54245fdde78750e764b8 /asn1/h225
parent18ffc28bb1811b808c853ac2f649e5b1e3ba8306 (diff)
- fix bugs in dissect_per_octet_string() introduced with unaligned variant
- step to new ASN.1 API - pass asn_ctx_t* through PER dissectors instead of packet_info* - PER ALIGNED/UNALIGNED flag moved to asn_ctx_t - PER created tree item pointer moved to asn_ctx_t - add nbap into PER dissectors in asn1/Makefile.nmake - use add_oid_str_name() instead of register_ber_oid_name() in H.225 and H.245 - export asn_ctx_init from library - PER dissectors regenerated svn path=/trunk/; revision=18209
Diffstat (limited to 'asn1/h225')
-rw-r--r--asn1/h225/h225-exp.cnf4
-rw-r--r--asn1/h225/h225.cnf28
-rw-r--r--asn1/h225/packet-h225-template.c16
-rw-r--r--asn1/h225/packet-h225-template.h1
4 files changed, 26 insertions, 23 deletions
diff --git a/asn1/h225/h225-exp.cnf b/asn1/h225/h225-exp.cnf
index 5210c7a6c3..116eb23c5b 100644
--- a/asn1/h225/h225-exp.cnf
+++ b/asn1/h225/h225-exp.cnf
@@ -1,7 +1,7 @@
# Do not modify this file.
-# It is created automatically by the ASN.1 to Ethereal dissector compiler
+# It is created automatically by the ASN.1 to Wireshark dissector compiler
# .\h225-exp.cnf
-# ../../tools/asn2eth.py -e -p h225 -c h225.cnf -s packet-h225-template h225.asn
+# ../../tools/asn2wrs.py -e -p h225 -c h225.cnf -s packet-h225-template h225.asn
#.MODULE
H323-MESSAGES h225
diff --git a/asn1/h225/h225.cnf b/asn1/h225/h225.cnf
index ea8db64420..e48aa35fd0 100644
--- a/asn1/h225/h225.cnf
+++ b/asn1/h225/h225.cnf
@@ -138,8 +138,8 @@ CallIdentifier/guid guid
contains_faststart = FALSE;
%(DEFAULT_BODY)s
- if (check_col(pinfo->cinfo, COL_INFO)){
- col_append_fstr(pinfo->cinfo, COL_INFO, "CS: %%s ",
+ if (check_col(%(ACTX)s->pinfo->cinfo, COL_INFO)){
+ col_append_fstr(%(ACTX)s->pinfo->cinfo, COL_INFO, "CS: %%s ",
val_to_str(message_body_val, T_h323_message_body_vals, "<unknown>"));
}
@@ -150,13 +150,13 @@ CallIdentifier/guid guid
if (contains_faststart == TRUE )
{
- if (check_col(pinfo->cinfo, COL_INFO))
+ if (check_col(%(ACTX)s->pinfo->cinfo, COL_INFO))
{
- col_append_str(pinfo->cinfo, COL_INFO, "OpenLogicalChannel " );
+ col_append_str(%(ACTX)s->pinfo->cinfo, COL_INFO, "OpenLogicalChannel " );
}
}
- col_set_fence(pinfo->cinfo,COL_INFO);
+ col_set_fence(%(ACTX)s->pinfo->cinfo,COL_INFO);
#.END
#----------------------------------------------------------------------------------------
@@ -166,7 +166,7 @@ CallIdentifier/guid guid
%(DEFAULT_BODY)s
if (value_tvb && tvb_length(value_tvb)) {
- dissect_h245_OpenLogicalChannelCodec(value_tvb, pinfo, tree, codec_str);
+ dissect_h245_OpenLogicalChannelCodec(value_tvb, %(ACTX)s->pinfo, tree, codec_str);
}
/* Add to packet info */
@@ -180,8 +180,8 @@ CallIdentifier/guid guid
guint32 rasmessage_value;
%(DEFAULT_BODY)s
- if (check_col(pinfo->cinfo, COL_INFO)){
- col_add_fstr(pinfo->cinfo, COL_INFO, "RAS: %%s ",
+ if (check_col(%(ACTX)s->pinfo->cinfo, COL_INFO)){
+ col_add_fstr(%(ACTX)s->pinfo->cinfo, COL_INFO, "RAS: %%s ",
val_to_str(rasmessage_value, RasMessage_vals, "<unknown>"));
}
@@ -327,7 +327,7 @@ CallIdentifier/guid guid
h225_pi->h245_address = ipv4_address;
h225_pi->h245_port = ipv4_port;
- if((!pinfo->fd->flags.visited) && ipv4_address!=0 && ipv4_port!=0 && h245_handle){
+ if((!actx->pinfo->fd->flags.visited) && ipv4_address!=0 && ipv4_port!=0 && h245_handle){
address src_addr;
conversation_t *conv=NULL;
@@ -335,9 +335,9 @@ CallIdentifier/guid guid
src_addr.len=4;
src_addr.data=(const guint8 *)&ipv4_address;
- conv=find_conversation(pinfo->fd->num, &src_addr, &src_addr, PT_TCP, ipv4_port, ipv4_port, NO_ADDR_B|NO_PORT_B);
+ conv=find_conversation(actx->pinfo->fd->num, &src_addr, &src_addr, PT_TCP, ipv4_port, ipv4_port, NO_ADDR_B|NO_PORT_B);
if(!conv){
- conv=conversation_new(pinfo->fd->num, &src_addr, &src_addr, PT_TCP, ipv4_port, ipv4_port, NO_ADDR2|NO_PORT2);
+ conv=conversation_new(actx->pinfo->fd->num, &src_addr, &src_addr, PT_TCP, ipv4_port, ipv4_port, NO_ADDR2|NO_PORT2);
conversation_set_dissector(conv, h245_handle);
}
}
@@ -445,7 +445,7 @@ ReleaseCompleteReason VAL_PTR = &value
#.FN_BODY CallIdentifier/guid
tvbuff_t *guid_tvb;
- offset = dissect_per_octet_string(tvb,offset,pinfo,tree,hf_index,GUID_LEN,GUID_LEN,&guid_tvb);
+ offset = dissect_per_octet_string(tvb,offset,%(ACTX)s,tree,hf_index,GUID_LEN,GUID_LEN,&guid_tvb);
tvb_memcpy(guid_tvb,(guint8 *)&h225_pi->guid,0,GUID_LEN);
#.END
#----------------------------------------------------------------------------------------
@@ -456,7 +456,7 @@ ReleaseCompleteReason VAL_PTR = &value
%(DEFAULT_BODY)s
if (h4501_tvb && tvb_length(h4501_tvb)) {
- call_dissector(h4501_handle, h4501_tvb, pinfo, tree);
+ call_dissector(h4501_handle, h4501_tvb, %(ACTX)s->pinfo, tree);
}
#.END
#----------------------------------------------------------------------------------------
@@ -525,7 +525,7 @@ H221NonStandard/manufacturerCode VAL_PTR = &manufacturerCode
%(DEFAULT_BODY)s
if (next_tvb && tvb_length(next_tvb)) {
- call_dissector((nsp_handle)?nsp_handle:data_handle, next_tvb, pinfo, tree);
+ call_dissector((nsp_handle)?nsp_handle:data_handle, next_tvb, %(ACTX)s->pinfo, tree);
}
#.END
diff --git a/asn1/h225/packet-h225-template.c b/asn1/h225/packet-h225-template.c
index 0a34bd9a0a..edf47f6b81 100644
--- a/asn1/h225/packet-h225-template.c
+++ b/asn1/h225/packet-h225-template.c
@@ -44,13 +44,13 @@
#include <string.h>
#include <epan/prefs.h>
+#include <epan/oid_resolv.h>
#include "tap.h"
#include "packet-tpkt.h"
#include "packet-per.h"
#include "packet-h225.h"
#include <epan/t35.h>
#include <epan/h225-persistentdata.h>
-#include "packet-ber.h"
#include "packet-h235.h"
#include "packet-h245.h"
#include "packet-q931.h"
@@ -203,6 +203,7 @@ dissect_h225_H323UserInformation(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
proto_item *it;
proto_tree *tr;
int offset = 0;
+ asn_ctx_t asn_ctx;
pi_current++;
if(pi_current==5){
@@ -227,8 +228,8 @@ dissect_h225_H323UserInformation(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
it=proto_tree_add_protocol_format(tree, proto_h225, tvb, 0, tvb_length(tvb), PSNAME" CS");
tr=proto_item_add_subtree(it, ett_h225);
- per_aligment_type_callback(TRUE);
- offset = dissect_h225_H323_UserInformation(tvb, offset,pinfo, tr, hf_h225_H323_UserInformation);
+ asn_ctx_init(&asn_ctx, ASN_ENC_PER, TRUE, pinfo);
+ offset = dissect_h225_H323_UserInformation(tvb, offset, &asn_ctx, tr, hf_h225_H323_UserInformation);
if (h245_list.count && check_col(pinfo->cinfo, COL_PROTOCOL)){
col_append_str(pinfo->cinfo, COL_PROTOCOL, "/");
@@ -247,6 +248,7 @@ dissect_h225_h225_RasMessage(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
proto_item *it;
proto_tree *tr;
guint32 offset=0;
+ asn_ctx_t asn_ctx;
pi_current++;
if(pi_current==5){
@@ -265,8 +267,8 @@ dissect_h225_h225_RasMessage(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
it=proto_tree_add_protocol_format(tree, proto_h225, tvb, offset, tvb_length(tvb), PSNAME" RAS");
tr=proto_item_add_subtree(it, ett_h225);
- per_aligment_type_callback(TRUE);
- offset = dissect_h225_RasMessage(tvb, 0, pinfo,tr, hf_h225_RasMessage );
+ asn_ctx_init(&asn_ctx, ASN_ENC_PER, TRUE, pinfo);
+ offset = dissect_h225_RasMessage(tvb, 0, &asn_ctx, tr, hf_h225_RasMessage );
ras_call_matching(tvb, pinfo, tr, h225_pi);
@@ -345,8 +347,8 @@ void proto_register_h225(void) {
register_init_routine(&h225_init_routine);
h225_tap = register_tap("h225");
- register_ber_oid_name("0.0.8.2250.0.2","itu-t(0) recommendation(0) h(8) h225-0(2250) version(0) 2");
- register_ber_oid_name("0.0.8.2250.0.4","itu-t(0) recommendation(0) h(8) h225-0(2250) version(0) 4");
+ add_oid_str_name("0.0.8.2250.0.2","itu-t(0) recommendation(0) h(8) h225-0(2250) version(0) 2");
+ add_oid_str_name("0.0.8.2250.0.4","itu-t(0) recommendation(0) h(8) h225-0(2250) version(0) 4");
}
diff --git a/asn1/h225/packet-h225-template.h b/asn1/h225/packet-h225-template.h
index ce5c22181a..6b70f70cb4 100644
--- a/asn1/h225/packet-h225-template.h
+++ b/asn1/h225/packet-h225-template.h
@@ -76,6 +76,7 @@ typedef struct _h225_packet_info {
* libethereal.dll, we need a special declaration.
*/
+#include "packet-per.h"
#include "packet-h225-exp.h"