aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-osi.c
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2013-09-11 21:37:58 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2013-09-11 21:37:58 +0000
commitf2c276ec2160e98377ba5509b95125f0414c0520 (patch)
tree600e7465631c1024b88a5633d09fb3fe24a668c7 /epan/dissectors/packet-osi.c
parent2a276b349854801be35d942ea6adc6d849d52268 (diff)
Change the name of the Cisco HDLC dissector table from chdlctype to chdlc.protocol and change the UI name to match. It is by far much more common to name the tables after the field than to pick another name.
svn path=/trunk/; revision=51958
Diffstat (limited to 'epan/dissectors/packet-osi.c')
-rw-r--r--epan/dissectors/packet-osi.c102
1 files changed, 51 insertions, 51 deletions
diff --git a/epan/dissectors/packet-osi.c b/epan/dissectors/packet-osi.c
index 1c9782540b..1e7fa8357b 100644
--- a/epan/dissectors/packet-osi.c
+++ b/epan/dissectors/packet-osi.c
@@ -200,7 +200,7 @@ check_and_get_checksum( tvbuff_t *tvb, int offset, guint len, guint checksum, in
/* In case of a CR TPDU, the value of the ISO 8073 16-bit fletcher checksum parameter shall */
/* be set to zero. */
gboolean check_atn_ec_32(
- tvbuff_t *tvb, guint tpdu_len,
+ tvbuff_t *tvb, guint tpdu_len,
guint offset_ec_32_val, /* offset ATN extended checksum value, calculated at last as part of pseudo trailer */
guint offset_iso8073_val, /* offset ISO 8073 fletcher checksum, CR only*/
guint clnp_dst_len, /* length of DST-NSAP */
@@ -213,106 +213,106 @@ gboolean check_atn_ec_32(
guint32 c1 = 0;
guint32 c2 = 0;
guint32 c3 = 0;
- guint32 sum = 0;
+ guint32 sum = 0;
/* sum across complete TPDU */
for ( i =0; i< tpdu_len; i++){
- c0 += tvb_get_guint8(tvb, i) ;
+ c0 += tvb_get_guint8(tvb, i) ;
if( ( i >= offset_ec_32_val ) && /* ignore 32 bit ATN extended checksum value */
( i < ( offset_ec_32_val + 4 ) ) ) {
c0 -= tvb_get_guint8(tvb, i);
}
-
+
if( ( offset_iso8073_val ) && /* ignore 16 bit ISO 8073 checksum, if present*/
- ( i >= offset_iso8073_val ) &&
+ ( i >= offset_iso8073_val ) &&
( i < ( offset_iso8073_val + 2 ) ) ) {
c0 -= tvb_get_guint8(tvb, i);
}
-
+
if ( c0 >= 0x000000FF )
- c0 -= 0x00000FF;
+ c0 -= 0x00000FF;
c1 += c0;
if ( c1 >= 0x000000FF )
- c1 -= 0x000000FF;
+ c1 -= 0x000000FF;
c2 += c1;
if ( c2 >= 0x000000FF )
- c2 -= 0x000000FF;
+ c2 -= 0x000000FF;
c3 += c2;
if ( c3 >= 0x000000FF )
- c3 -= 0x000000FF;
+ c3 -= 0x000000FF;
}
/* add NSAP parts of pseudo trailer */
c0 += clnp_dst_len;
if ( c0 >= 0x000000FF )
- c0 -= 0x000000FF;
+ c0 -= 0x000000FF;
c1 += c0;
if ( c1 >= 0x000000FF )
- c1 -= 0x000000FF;
+ c1 -= 0x000000FF;
c2 += c1;
if ( c2 >= 0x000000FF )
- c2 -= 0x000000FF;
+ c2 -= 0x000000FF;
c3 += c2;
if ( c3 >= 0x000000FF )
- c3 -= 0x000000FF;
+ c3 -= 0x000000FF;
for ( i =0; i< clnp_dst_len; i++){
c0 += clnp_dst[i];
if ( c0 >= 0x000000FF )
- c0 -= 0x000000FF;
+ c0 -= 0x000000FF;
c1 += c0;
if ( c1 >= 0x000000FF )
- c1 -= 0x000000FF;
+ c1 -= 0x000000FF;
c2 += c1;
if ( c2 >= 0x000000FF )
- c2 -= 0x000000FF;
+ c2 -= 0x000000FF;
c3 += c2;
if ( c3 >= 0x000000FF )
- c3 -= 0x000000FF;
+ c3 -= 0x000000FF;
}
c0 += clnp_src_len;
if ( c0 >= 0x000000FF )
- c0 -= 0x000000FF;
+ c0 -= 0x000000FF;
c1 += c0;
if ( c1 >= 0x000000FF )
- c1 -= 0x000000FF;
+ c1 -= 0x000000FF;
c2 += c1;
if ( c2 >= 0x000000FF )
- c2 -= 0x000000FF;
+ c2 -= 0x000000FF;
c3 += c2;
if ( c3 >= 0x000000FF )
- c3 -= 0x000000FF;
+ c3 -= 0x000000FF;
for ( i =0; i< clnp_src_len; i++){
c0 += clnp_src[i];
if ( c0 >= 0x000000FF )
- c0 -= 0x000000FF;
+ c0 -= 0x000000FF;
c1 += c0;
if ( c1 >= 0x000000FF )
- c1 -= 0x000000FF;
+ c1 -= 0x000000FF;
c2 += c1;
if ( c2 >= 0x000000FF )
- c2 -= 0x000000FF;
+ c2 -= 0x000000FF;
c3 += c2;
if ( c3 >= 0x000000FF )
- c3 -= 0x000000FF;
+ c3 -= 0x000000FF;
}
/* add extended checksum as last part of the pseudo trailer */
for ( i = offset_ec_32_val; i< (offset_ec_32_val+4); i++){
c0 += tvb_get_guint8(tvb, i) ;
if ( c0 >= 0x000000FF )
- c0 -= 0x00000FF;
+ c0 -= 0x00000FF;
c1 += c0;
if ( c1 >= 0x000000FF )
- c1 -= 0x000000FF;
+ c1 -= 0x000000FF;
c2 += c1;
if ( c2 >= 0x000000FF )
- c2 -= 0x000000FF;
+ c2 -= 0x000000FF;
c3 += c2;
if ( c3 >= 0x000000FF )
- c3 -= 0x000000FF;
+ c3 -= 0x000000FF;
}
-
- sum = (c3 << 24) + (c2 << 16 ) + (c1 << 8) + c0 ;
+
+ sum = (c3 << 24) + (c2 << 16 ) + (c1 << 8) + c0 ;
if(!sum)
return TRUE;
@@ -326,9 +326,9 @@ gboolean check_atn_ec_32(
/* In case of a CR TPDU, the value of the ISO 8073 16-bit fletcher checksum parameter shall */
/* be set to zero. */
/* this routine is currently *untested* because of the unavailability of samples.*/
-gboolean check_atn_ec_16(
- tvbuff_t *tvb,
- guint tpdu_len,
+gboolean check_atn_ec_16(
+ tvbuff_t *tvb,
+ guint tpdu_len,
guint offset_ec_16_val, /* offset ATN extended checksum value, calculated at last as part of pseudo trailer */
guint offset_iso8073_val, /* offset ISO 8073 fletcher checksum, CR only*/
guint clnp_dst_len, /* length of DST-NSAP */
@@ -339,7 +339,7 @@ gboolean check_atn_ec_16(
guint i = 0;
guint16 c0 = 0;
guint16 c1 = 0;
- guint16 sum = 0;
+ guint16 sum = 0;
/* sum across complete TPDU */
for ( i =0; i< tpdu_len; i++){
@@ -357,52 +357,52 @@ gboolean check_atn_ec_16(
}
if ( c0 >= 0x00FF )
- c0 -= 0x00FF;
+ c0 -= 0x00FF;
c1 += c0;
if ( c1 >= 0x00FF )
- c1 -= 0x00FF;
+ c1 -= 0x00FF;
}
/* add NSAP parts of pseudo trailer */
c0 += clnp_dst_len;
if ( c0 >= 0x00FF )
- c0 -= 0x00FF;
+ c0 -= 0x00FF;
c1 += c0;
if ( c1 >= 0x00FF )
- c1 -= 0x00FF;
+ c1 -= 0x00FF;
for ( i =0; i< clnp_dst_len; i++){
c0 += clnp_dst[i];
if ( c0 >= 0x00FF )
- c0 -= 0x00FF;
+ c0 -= 0x00FF;
c1 += c0;
if ( c1 >= 0x00FF )
- c1 -= 0x00FF;
+ c1 -= 0x00FF;
}
c0 += clnp_src_len;
if ( c0 >= 0x00FF )
- c0 -= 0x00FF;
+ c0 -= 0x00FF;
c1 += c0;
if ( c1 >= 0x00FF )
- c1 -= 0x00FF;
+ c1 -= 0x00FF;
for ( i =0; i< clnp_src_len; i++){
c0 += clnp_src[i];
if ( c0 >= 0x00FF )
- c0 -= 0x00FF;
+ c0 -= 0x00FF;
c1 += c0;
if ( c1 >= 0x00FF )
- c1 -= 0x00FF;
+ c1 -= 0x00FF;
}
/* add extended checksum as last part of the pseudo trailer */
for ( i = offset_ec_16_val; i< (offset_ec_16_val+2); i++){
c0 += tvb_get_guint8(tvb, i) ;
if ( c0 >= 0x00FF )
- c0 -= 0x00FF;
+ c0 -= 0x00FF;
c1 += c0;
if ( c1 >= 0x00FF )
- c1 -= 0x00FF;
+ c1 -= 0x00FF;
}
- sum = (c1 << 8) + c0 ;
+ sum = (c1 << 8) + c0 ;
if(!sum)
return TRUE;
@@ -508,7 +508,7 @@ proto_reg_handoff_osi(void)
dissector_add_uint("llc.dsap", SAP_OSINL4, osi_handle);
dissector_add_uint("llc.dsap", SAP_OSINL5, osi_handle);
dissector_add_uint("ppp.protocol", PPP_OSI, osi_handle);
- dissector_add_uint("chdlctype", CHDLCTYPE_OSI, osi_handle);
+ dissector_add_uint("chdlc.protocol", CHDLCTYPE_OSI, osi_handle);
dissector_add_uint("null.type", BSD_AF_ISO, osi_handle);
dissector_add_uint("gre.proto", SAP_OSINL5, osi_handle);
dissector_add_uint("ip.proto", IP_PROTO_ISOIP, osi_handle); /* ISO-TP4 ISO Transport Protocol Class 4 [RFC905,RC77] */
@@ -564,6 +564,6 @@ proto_register_osi(void)
"Whether segmented TPKT datagrams should be reassembled",
&tpkt_desegment);
-
+
}