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
This commit is contained in:
Chris Maynard 2013-09-11 21:37:58 +00:00
parent 2a276b3498
commit f2c276ec21
15 changed files with 74 additions and 73 deletions

View File

@ -345,5 +345,5 @@ proto_reg_handoff_aarp(void)
aarp_handle = create_dissector_handle(dissect_aarp, proto_aarp);
dissector_add_uint("ethertype", ETHERTYPE_AARP, aarp_handle);
dissector_add_uint("chdlctype", ETHERTYPE_AARP, aarp_handle);
dissector_add_uint("chdlc.protocol", ETHERTYPE_AARP, aarp_handle);
}

View File

@ -2445,7 +2445,7 @@ proto_reg_handoff_atalk(void)
ddp_handle = create_dissector_handle(dissect_ddp, proto_ddp);
dissector_add_uint("ethertype", ETHERTYPE_ATALK, ddp_handle);
dissector_add_uint("chdlctype", ETHERTYPE_ATALK, ddp_handle);
dissector_add_uint("chdlc.protocol", ETHERTYPE_ATALK, ddp_handle);
dissector_add_uint("ppp.protocol", PPP_AT, ddp_handle);
dissector_add_uint("null.type", BSD_AF_APPLETALK, ddp_handle);
dissector_add_uint("arcnet.protocol_id", ARCNET_PROTO_APPLETALK, ddp_handle);

View File

@ -1336,7 +1336,7 @@ proto_reg_handoff_bpdu(void)
bpdu_handle = find_dissector("bpdu");
dissector_add_uint("llc.dsap", SAP_BPDU, bpdu_handle);
dissector_add_uint("chdlctype", CHDLCTYPE_BPDU, bpdu_handle);
dissector_add_uint("chdlc.protocol", CHDLCTYPE_BPDU, bpdu_handle);
dissector_add_uint("llc.cisco_pid", 0x010b, bpdu_handle);
dissector_add_uint("llc.cisco_pid", 0x010c, bpdu_handle);
dissector_add_uint("ethertype", ETHERTYPE_STP, bpdu_handle);

View File

@ -1334,6 +1334,6 @@ proto_reg_handoff_cdp(void)
data_handle = find_dissector("data");
cdp_handle = create_dissector_handle(dissect_cdp, proto_cdp);
dissector_add_uint("llc.cisco_pid", 0x2000, cdp_handle);
dissector_add_uint("chdlctype", 0x2000, cdp_handle);
dissector_add_uint("chdlc.protocol", 0x2000, cdp_handle);
dissector_add_uint("ppp.protocol", 0x0207, cdp_handle);
}

View File

@ -223,8 +223,9 @@ proto_register_chdlc(void)
proto_register_subtree_array(ett, array_length(ett));
/* subdissector code */
subdissector_table = register_dissector_table("chdlctype",
"Cisco HDLC frame type", FT_UINT16, BASE_HEX);
subdissector_table = register_dissector_table("chdlc.protocol",
"Cisco HDLC protocol",
FT_UINT16, BASE_HEX);
register_dissector("chdlc", dissect_chdlc, proto_chdlc);
@ -364,5 +365,5 @@ proto_reg_handoff_slarp(void)
dissector_handle_t slarp_handle;
slarp_handle = create_dissector_handle(dissect_slarp, proto_slarp);
dissector_add_uint("chdlctype", CISCO_SLARP, slarp_handle);
dissector_add_uint("chdlc.protocol", CISCO_SLARP, slarp_handle);
}

View File

@ -280,6 +280,6 @@ proto_reg_handoff_dec_bpdu(void)
dec_bpdu_handle = create_dissector_handle(dissect_dec_bpdu,
proto_dec_bpdu);
dissector_add_uint("ethertype", ETHERTYPE_DEC_LB, dec_bpdu_handle);
dissector_add_uint("chdlctype", ETHERTYPE_DEC_LB, dec_bpdu_handle);
dissector_add_uint("chdlc.protocol", ETHERTYPE_DEC_LB, dec_bpdu_handle);
dissector_add_uint("ppp.protocol", PPP_DEC_LB, dec_bpdu_handle);
}

View File

@ -1491,7 +1491,7 @@ proto_reg_handoff_dec_rt(void)
dec_rt_handle = create_dissector_handle(dissect_dec_rt,
proto_dec_rt);
dissector_add_uint("ethertype", ETHERTYPE_DNA_RT, dec_rt_handle);
dissector_add_uint("chdlctype", ETHERTYPE_DNA_RT, dec_rt_handle);
dissector_add_uint("chdlc.protocol", ETHERTYPE_DNA_RT, dec_rt_handle);
dissector_add_uint("ppp.protocol", PPP_DEC4, dec_rt_handle);
/* dissector_add_uint("ppp.protocol", PPP_DECNETCP, dec_rt_handle);*/
}

View File

@ -944,7 +944,7 @@ proto_reg_handoff_eth(void)
eth_withoutfcs_handle = find_dissector("eth_withoutfcs");
dissector_add_uint("ethertype", ETHERTYPE_ETHBRIDGE, eth_withoutfcs_handle);
dissector_add_uint("chdlctype", ETHERTYPE_ETHBRIDGE, eth_withoutfcs_handle);
dissector_add_uint("chdlc.protocol", ETHERTYPE_ETHBRIDGE, eth_withoutfcs_handle);
dissector_add_uint("gre.proto", ETHERTYPE_ETHBRIDGE, eth_withoutfcs_handle);
dissector_add_uint("sll.ltype", LINUX_SLL_P_ETHERNET, eth_withoutfcs_handle);

View File

@ -209,7 +209,7 @@ proto_reg_handoff_idp(void)
idp_handle = create_dissector_handle(dissect_idp, proto_idp);
dissector_add_uint("ethertype", ETHERTYPE_XNS_IDP, idp_handle);
dissector_add_uint("chdlctype", ETHERTYPE_XNS_IDP, idp_handle);
dissector_add_uint("chdlc.protocol", ETHERTYPE_XNS_IDP, idp_handle);
data_handle = find_dissector("data");
}

View File

@ -2428,10 +2428,10 @@ dissect_ip_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
{
int length, tot_length;
guint8 oct, version, ihl;
/*
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Version| IHL |Type of Service| Total Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@ -2450,8 +2450,8 @@ dissect_ip_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
/*
3. IPv6 Header Format
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Version| Traffic Class | Flow Label |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@ -3062,7 +3062,7 @@ proto_reg_handoff_ip(void)
dissector_add_uint("llc.dsap", SAP_IP, ip_handle);
dissector_add_uint("ip.proto", IP_PROTO_IPIP, ip_handle);
dissector_add_uint("null.type", BSD_AF_INET, ip_handle);
dissector_add_uint("chdlctype", ETHERTYPE_IP, ip_handle);
dissector_add_uint("chdlc.protocol", ETHERTYPE_IP, ip_handle);
dissector_add_uint("osinl.excl", NLPID_IP, ip_handle);
dissector_add_uint("fr.ietf", NLPID_IP, ip_handle);
dissector_add_uint("x.25.spi", NLPID_IP, ip_handle);

View File

@ -2900,7 +2900,7 @@ proto_reg_handoff_ipv6(void)
dissector_add_uint("null.type", BSD_AF_INET6_BSD, ipv6_handle);
dissector_add_uint("null.type", BSD_AF_INET6_FREEBSD, ipv6_handle);
dissector_add_uint("null.type", BSD_AF_INET6_DARWIN, ipv6_handle);
dissector_add_uint("chdlctype", ETHERTYPE_IPv6, ipv6_handle);
dissector_add_uint("chdlc.protocol", ETHERTYPE_IPv6, ipv6_handle);
dissector_add_uint("fr.ietf", NLPID_IP6, ipv6_handle);
dissector_add_uint("osinl.excl", NLPID_IP6, ipv6_handle);
dissector_add_uint("x.25.spi", NLPID_IP6, ipv6_handle);

View File

@ -1501,7 +1501,7 @@ proto_reg_handoff_ipx(void)
ipx_handle = find_dissector("ipx");
dissector_add_uint("udp.port", UDP_PORT_IPX, ipx_handle);
dissector_add_uint("ethertype", ETHERTYPE_IPX, ipx_handle);
dissector_add_uint("chdlctype", ETHERTYPE_IPX, ipx_handle);
dissector_add_uint("chdlc.protocol", ETHERTYPE_IPX, ipx_handle);
dissector_add_uint("ppp.protocol", PPP_IPX, ipx_handle);
dissector_add_uint("llc.dsap", SAP_NETWARE1, ipx_handle);
dissector_add_uint("llc.dsap", SAP_NETWARE2, ipx_handle);

View File

@ -802,8 +802,8 @@ proto_reg_handoff_mpls(void)
mpls_handle = find_dissector("mpls");
dissector_add_uint("ethertype", ETHERTYPE_MPLS, mpls_handle);
dissector_add_uint("ethertype", ETHERTYPE_MPLS_MULTI, mpls_handle);
dissector_add_uint("chdlctype", ETHERTYPE_MPLS, mpls_handle);
dissector_add_uint("chdlctype", ETHERTYPE_MPLS_MULTI, mpls_handle);
dissector_add_uint("chdlc.protocol", ETHERTYPE_MPLS, mpls_handle);
dissector_add_uint("chdlc.protocol", ETHERTYPE_MPLS_MULTI, mpls_handle);
dissector_add_uint("gre.proto", ETHERTYPE_MPLS, mpls_handle);
dissector_add_uint("gre.proto", ETHERTYPE_MPLS_MULTI, mpls_handle);
dissector_add_uint("ip.proto", IP_PROTO_MPLS_IN_IP, mpls_handle);

View File

@ -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);
}

View File

@ -292,5 +292,5 @@ proto_reg_handoff_udld(void)
data_handle = find_dissector("data");
udld_handle = create_dissector_handle(dissect_udld, proto_udld);
dissector_add_uint("llc.cisco_pid", 0x0111, udld_handle);
dissector_add_uint("chdlctype", 0x0111, udld_handle);
dissector_add_uint("chdlc.protocol", 0x0111, udld_handle);
}