diff options
author | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-05-10 05:58:06 +0000 |
---|---|---|
committer | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-05-10 05:58:06 +0000 |
commit | 0983cdddfe7844a73605f4af93a4f10cc91acb12 (patch) | |
tree | b3e79fcb536234a1a187ec34369c27ca927e30bc | |
parent | 6ea19d513b0192d0cee94ddbd1bde229dd942514 (diff) |
Preparations to be able to handle unaligned PER.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18119 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r-- | asn1/Makefile.nmake | 2 | ||||
-rw-r--r-- | asn1/h225/packet-h225-template.c | 2 | ||||
-rw-r--r-- | asn1/h245/packet-h245-template.c | 1 | ||||
-rw-r--r-- | asn1/ranap/packet-ranap-template.c | 1 | ||||
-rw-r--r-- | asn1/rnsap/packet-rnsap-template.c | 3 | ||||
-rw-r--r-- | asn1/ulp/ulp.cnf | 1 | ||||
-rw-r--r-- | epan/dissectors/packet-h225.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-h225.h | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-h235.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-h235.h | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-h245.c | 5 | ||||
-rw-r--r-- | epan/dissectors/packet-per.c | 9 | ||||
-rw-r--r-- | epan/dissectors/packet-per.h | 1 | ||||
-rw-r--r-- | epan/dissectors/packet-ranap.c | 5 | ||||
-rw-r--r-- | epan/dissectors/packet-rnsap.c | 9 | ||||
-rw-r--r-- | epan/dissectors/packet-ulp.c | 5 |
16 files changed, 42 insertions, 20 deletions
diff --git a/asn1/Makefile.nmake b/asn1/Makefile.nmake index b1363ec8d9..55d3a98d8b 100644 --- a/asn1/Makefile.nmake +++ b/asn1/Makefile.nmake @@ -252,6 +252,7 @@ ber: \ gnm \ gsmmap \ gsm_ss \ + h248 \ inap \ ldap \ logotype-cert-extn \ @@ -288,7 +289,6 @@ per: \ h225 \ h235 \ h245 \ - h248 \ h450 \ ranap \ rnsap \ diff --git a/asn1/h225/packet-h225-template.c b/asn1/h225/packet-h225-template.c index f9a342f554..f817d984af 100644 --- a/asn1/h225/packet-h225-template.c +++ b/asn1/h225/packet-h225-template.c @@ -227,6 +227,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)){ @@ -264,6 +265,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); diff --git a/asn1/h245/packet-h245-template.c b/asn1/h245/packet-h245-template.c index 2275e0f4da..3d5350dbad 100644 --- a/asn1/h245/packet-h245-template.c +++ b/asn1/h245/packet-h245-template.c @@ -317,6 +317,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; diff --git a/asn1/ranap/packet-ranap-template.c b/asn1/ranap/packet-ranap-template.c index 31ba244d48..f5ace88f1f 100644 --- a/asn1/ranap/packet-ranap-template.c +++ b/asn1/ranap/packet-ranap-template.c @@ -1075,6 +1075,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); } diff --git a/asn1/rnsap/packet-rnsap-template.c b/asn1/rnsap/packet-rnsap-template.c index 574f978fcd..d8f095b589 100644 --- a/asn1/rnsap/packet-rnsap-template.c +++ b/asn1/rnsap/packet-rnsap-template.c @@ -2282,7 +2282,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); } diff --git a/asn1/ulp/ulp.cnf b/asn1/ulp/ulp.cnf index 2b854ee0c1..970fb08e48 100644 --- a/asn1/ulp/ulp.cnf +++ b/asn1/ulp/ulp.cnf @@ -15,6 +15,7 @@ ULP-PDU if (check_col(pinfo->cinfo, COL_INFO)) col_clear(pinfo->cinfo, COL_INFO); + per_aligment_type_callback(FALSE); %(DEFAULT_BODY)s #.FN_BODY StatusCode 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); |