aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2006-05-10 05:58:06 +0000
committerAnders Broman <anders.broman@ericsson.com>2006-05-10 05:58:06 +0000
commit102bb4be54f5ccd8536509bd2ffe99bd90612742 (patch)
treeb3e79fcb536234a1a187ec34369c27ca927e30bc /epan
parent535731ccecc4e517e39562f0373ae56ce5782011 (diff)
Preparations to be able to handle unaligned PER.
svn path=/trunk/; revision=18119
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-h225.c8
-rw-r--r--epan/dissectors/packet-h225.h2
-rw-r--r--epan/dissectors/packet-h235.c4
-rw-r--r--epan/dissectors/packet-h235.h4
-rw-r--r--epan/dissectors/packet-h245.c5
-rw-r--r--epan/dissectors/packet-per.c9
-rw-r--r--epan/dissectors/packet-per.h1
-rw-r--r--epan/dissectors/packet-ranap.c5
-rw-r--r--epan/dissectors/packet-rnsap.c9
-rw-r--r--epan/dissectors/packet-ulp.c5
10 files changed, 34 insertions, 18 deletions
diff --git a/epan/dissectors/packet-h225.c b/epan/dissectors/packet-h225.c
index d44488088f..76b6278af5 100644
--- a/epan/dissectors/packet-h225.c
+++ b/epan/dissectors/packet-h225.c
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
-/* ./packet-h225.c */
+/* .\packet-h225.c */
/* ../../tools/asn2eth.py -X -e -p h225 -c h225.cnf -s packet-h225-template h225.asn */
/* Input file: packet-h225-template.c */
@@ -9439,6 +9439,7 @@ 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);
if (h245_list.count && check_col(pinfo->cinfo, COL_PROTOCOL)){
@@ -9476,6 +9477,7 @@ 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 );
ras_call_matching(tvb, pinfo, tr, h225_pi);
@@ -12504,7 +12506,7 @@ void proto_register_h225(void) {
"ServiceControlResponse/result/notAvailable", HFILL }},
/*--- End of included file: packet-h225-hfarr.c ---*/
-#line 307 "packet-h225-template.c"
+#line 309 "packet-h225-template.c"
};
/* List of subtrees */
@@ -12746,7 +12748,7 @@ void proto_register_h225(void) {
&ett_h225_T_result,
/*--- End of included file: packet-h225-ettarr.c ---*/
-#line 313 "packet-h225-template.c"
+#line 315 "packet-h225-template.c"
};
module_t *h225_module;
diff --git a/epan/dissectors/packet-h225.h b/epan/dissectors/packet-h225.h
index 903f4a543d..ded9f5200a 100644
--- a/epan/dissectors/packet-h225.h
+++ b/epan/dissectors/packet-h225.h
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
-/* ./packet-h225.h */
+/* .\packet-h225.h */
/* ../../tools/asn2eth.py -X -e -p h225 -c h225.cnf -s packet-h225-template h225.asn */
/* Input file: packet-h225-template.h */
diff --git a/epan/dissectors/packet-h235.c b/epan/dissectors/packet-h235.c
index 6990741f10..9270104658 100644
--- a/epan/dissectors/packet-h235.c
+++ b/epan/dissectors/packet-h235.c
@@ -1,7 +1,7 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
-/* ./packet-h235.c */
-/* ../../tools/asn2eth.py -X -p h235 -c h235.cnf -s packet-h235-template H235-SECURITY-MESSAGES.asn */
+/* .\packet-h235.c */
+/* ../../tools/asn2eth.py -X -e -p h235 -c h235.cnf -s packet-h235-template H235-SECURITY-MESSAGES.asn */
/* Input file: packet-h235-template.c */
diff --git a/epan/dissectors/packet-h235.h b/epan/dissectors/packet-h235.h
index 6edbb73f79..5631e74760 100644
--- a/epan/dissectors/packet-h235.h
+++ b/epan/dissectors/packet-h235.h
@@ -1,7 +1,7 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
-/* ./packet-h235.h */
-/* ../../tools/asn2eth.py -X -p h235 -c h235.cnf -s packet-h235-template H235-SECURITY-MESSAGES.asn */
+/* .\packet-h235.h */
+/* ../../tools/asn2eth.py -X -e -p h235 -c h235.cnf -s packet-h235-template H235-SECURITY-MESSAGES.asn */
/* Input file: packet-h235-template.h */
diff --git a/epan/dissectors/packet-h245.c b/epan/dissectors/packet-h245.c
index 046b407650..44538a919d 100644
--- a/epan/dissectors/packet-h245.c
+++ b/epan/dissectors/packet-h245.c
@@ -17478,6 +17478,7 @@ dissect_h245_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
CLEANUP_PUSH(reset_h245_pi, NULL);
h245_pi=ep_alloc(sizeof(h245_packet_info));
init_h245_packet_info(h245_pi);
+ per_aligment_type_callback(TRUE);
offset = dissect_h245_MultimediaSystemControlMessage(tvb, offset, pinfo ,tr, hf_h245_pdu_type);
tap_queue_packet(h245dg_tap, pinfo, h245_pi);
offset = (offset+0x07) & 0xfffffff8;
@@ -22909,7 +22910,7 @@ void proto_register_h245(void) {
"Rtp/expirationTime", HFILL }},
/*--- End of included file: packet-h245-hfarr.c ---*/
-#line 351 "packet-h245-template.c"
+#line 352 "packet-h245-template.c"
};
/* List of subtrees */
@@ -23392,7 +23393,7 @@ void proto_register_h245(void) {
&ett_h245_MobileMultilinkReconfigurationIndication,
/*--- End of included file: packet-h245-ettarr.c ---*/
-#line 357 "packet-h245-template.c"
+#line 358 "packet-h245-template.c"
};
module_t *h245_module;
diff --git a/epan/dissectors/packet-per.c b/epan/dissectors/packet-per.c
index bd76bfb448..840b89e105 100644
--- a/epan/dissectors/packet-per.c
+++ b/epan/dissectors/packet-per.c
@@ -98,6 +98,15 @@ static const true_false_string tfs_optional_field_bit = {
""
};
+gboolean is_per_byte_aligned = TRUE;
+
+void
+per_aligment_type_callback(gboolean byte_aligned){
+
+ is_per_byte_aligned = byte_aligned;
+
+}
+
#define BYTE_ALIGN_OFFSET(offset) \
if(offset&0x07){ \
offset=(offset&0xfffffff8)+8; \
diff --git a/epan/dissectors/packet-per.h b/epan/dissectors/packet-per.h
index af03c1d3cf..5a25919b5b 100644
--- a/epan/dissectors/packet-per.h
+++ b/epan/dissectors/packet-per.h
@@ -67,6 +67,7 @@ typedef struct _per_sequence_t {
per_callback func;
} per_sequence_t;
+extern void per_aligment_type_callback(gboolean byte_aligned);
extern guint32 dissect_per_length_determinant(tvbuff_t *tvb, guint32 offset, packet_info *pinfo, proto_tree *tree, int hf_index, guint32 *length);
diff --git a/epan/dissectors/packet-ranap.c b/epan/dissectors/packet-ranap.c
index ab2a3dfca7..0ca8a3196f 100644
--- a/epan/dissectors/packet-ranap.c
+++ b/epan/dissectors/packet-ranap.c
@@ -10748,6 +10748,7 @@ dissect_ranap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ranap_item = proto_tree_add_item(tree, proto_ranap, tvb, 0, -1, FALSE);
ranap_tree = proto_item_add_subtree(ranap_item, ett_ranap);
+ per_aligment_type_callback(TRUE);
offset = dissect_ranap_RANAP_PDU(tvb, offset, pinfo, ranap_tree, hf_ranap_RANAP_PDU);
}
@@ -12883,7 +12884,7 @@ void proto_register_ranap(void) {
"PrivateIE-Field/value", HFILL }},
/*--- End of included file: packet-ranap-hfarr.c ---*/
-#line 1149 "packet-ranap-template.c"
+#line 1150 "packet-ranap-template.c"
};
/* List of subtrees */
@@ -13152,7 +13153,7 @@ void proto_register_ranap(void) {
&ett_ranap_PrivateIE_Field,
/*--- End of included file: packet-ranap-ettarr.c ---*/
-#line 1156 "packet-ranap-template.c"
+#line 1157 "packet-ranap-template.c"
};
/* Register protocol */
diff --git a/epan/dissectors/packet-rnsap.c b/epan/dissectors/packet-rnsap.c
index 0678ba3e7e..99d14ac4d8 100644
--- a/epan/dissectors/packet-rnsap.c
+++ b/epan/dissectors/packet-rnsap.c
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
-/* ./packet-rnsap.c */
+/* .\packet-rnsap.c */
/* ../../tools/asn2eth.py -X -e -p rnsap -c rnsap.cnf -s packet-rnsap-template rnsap.asn */
/* Input file: packet-rnsap-template.c */
@@ -31976,7 +31976,8 @@ dissect_rnsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* create the rnsap protocol tree */
rnsap_item = proto_tree_add_item(tree, proto_rnsap, tvb, 0, -1, FALSE);
rnsap_tree = proto_item_add_subtree(rnsap_item, ett_rnsap);
-
+
+ per_aligment_type_callback(TRUE);
dissect_RNSAP_PDU_PDU(tvb, pinfo, rnsap_tree);
}
@@ -38884,7 +38885,7 @@ void proto_register_rnsap(void) {
"PrivateIE-Field/privateIEvalue", HFILL }},
/*--- End of included file: packet-rnsap-hfarr.c ---*/
-#line 2317 "packet-rnsap-template.c"
+#line 2318 "packet-rnsap-template.c"
};
/* List of subtrees */
@@ -39747,7 +39748,7 @@ void proto_register_rnsap(void) {
&ett_rnsap_PrivateIE_Field,
/*--- End of included file: packet-rnsap-ettarr.c ---*/
-#line 2327 "packet-rnsap-template.c"
+#line 2328 "packet-rnsap-template.c"
};
diff --git a/epan/dissectors/packet-ulp.c b/epan/dissectors/packet-ulp.c
index 603a658dc0..a44567bbfd 100644
--- a/epan/dissectors/packet-ulp.c
+++ b/epan/dissectors/packet-ulp.c
@@ -2421,7 +2421,7 @@ static const value_string ulp_StatusCode_vals[] = {
static int
dissect_ulp_StatusCode(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 22 "ulp.cnf"
+#line 23 "ulp.cnf"
offset = dissect_per_enumerated(tvb, offset, pinfo, tree, hf_index,
19, NULL, NULL, TRUE, 0, StatusCode_value_map);
@@ -2580,7 +2580,7 @@ static const per_choice_t UlpMessage_choice[] = {
static int
dissect_ulp_UlpMessage(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 28 "ulp.cnf"
+#line 29 "ulp.cnf"
guint32 UlpMessage;
@@ -2621,6 +2621,7 @@ dissect_ulp_ULP_PDU(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tre
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
+ per_aligment_type_callback(FALSE);
offset = dissect_per_sequence(tvb, offset, pinfo, tree, hf_index,
ett_ulp_ULP_PDU, ULP_PDU_sequence);