diff options
author | Anders Broman <anders.broman@ericsson.com> | 2007-11-01 19:36:39 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2007-11-01 19:36:39 +0000 |
commit | 94927006087e484617e5c4159ca1ba5d41fcd7c5 (patch) | |
tree | b1ce12550022c858eb2b486f7b4cd318fd494ca2 /epan | |
parent | 3161b47b4924492921e2e8ab0d1b2af07330e394 (diff) |
Change:
get_oid_str_name() -> oid_resolved_from_string()
get_oid_name() -> oid_resolved_from_encoded()
svn path=/trunk/; revision=23331
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-ber.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-cdt.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-cdt.h | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-cms.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-dop.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-l2tp.c | 13 | ||||
-rw-r--r-- | epan/dissectors/packet-ldap.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-pkcs12.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-pkcs12.h | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-x411.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-x420.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-x509af.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-x509af.h | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-x509if.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-x509if.h | 2 | ||||
-rw-r--r-- | epan/proto.c | 2 |
16 files changed, 46 insertions, 33 deletions
diff --git a/epan/dissectors/packet-ber.c b/epan/dissectors/packet-ber.c index d993fda5e3..17f3039039 100644 --- a/epan/dissectors/packet-ber.c +++ b/epan/dissectors/packet-ber.c @@ -3144,7 +3144,7 @@ printf("OBJECT IDENTIFIER dissect_ber_object_identifier(%s) entered\n",name); actx->created_item = proto_tree_add_string(tree, hf_id, tvb, offset, len, str); if(actx->created_item){ /* see if we know the name of this oid */ - name = get_oid_name(tvb_get_ptr(tvb, offset, len), len); + name = oid_resolved_from_encoded(tvb_get_ptr(tvb, offset, len), len); if(name){ proto_item_append_text(actx->created_item, " (%s)", name); } diff --git a/epan/dissectors/packet-cdt.c b/epan/dissectors/packet-cdt.c index 6e13cb0c48..14659decd8 100644 --- a/epan/dissectors/packet-cdt.c +++ b/epan/dissectors/packet-cdt.c @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-cdt.c */ -/* ../../tools/asn2wrs.py -b -X -T -e -p cdt -c cdt.cnf -s packet-cdt-template cdt.asn */ +/* packet-cdt.c */ +/* ../../tools/asn2wrs.py -b -X -T -p cdt -c cdt.cnf -s packet-cdt-template cdt.asn */ /* Input file: packet-cdt-template.c */ @@ -192,7 +192,7 @@ dissect_cdt_T_contentType_OID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &obj_id); if (obj_id) { - const char *name = get_oid_str_name (obj_id); + const char *name = oid_resolved_from_string (obj_id); if (!name) { name = obj_id; @@ -249,7 +249,7 @@ dissect_cdt_CompressedContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int expert_add_info_format (actx->pinfo, tf, PI_UNDECODED, PI_ERROR, "Unable to get compressed content"); if (check_col (actx->pinfo->cinfo, COL_INFO)) - col_append_fstr (actx->pinfo->cinfo, COL_INFO, + col_append_str (actx->pinfo->cinfo, COL_INFO, "[Error: Unable to get compressed content]"); return offset; } @@ -262,7 +262,7 @@ dissect_cdt_CompressedContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int expert_add_info_format (actx->pinfo, tf, PI_UNDECODED, PI_ERROR, "Unable to uncompress content"); if (check_col (actx->pinfo->cinfo, COL_INFO)) - col_append_fstr (actx->pinfo->cinfo, COL_INFO, + col_append_str (actx->pinfo->cinfo, COL_INFO, "[Error: Unable to uncompress content]"); return offset; } diff --git a/epan/dissectors/packet-cdt.h b/epan/dissectors/packet-cdt.h index 35609dc318..a2d7fa644d 100644 --- a/epan/dissectors/packet-cdt.h +++ b/epan/dissectors/packet-cdt.h @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-cdt.h */ -/* ../../tools/asn2wrs.py -b -X -T -e -p cdt -c cdt.cnf -s packet-cdt-template cdt.asn */ +/* packet-cdt.h */ +/* ../../tools/asn2wrs.py -b -X -T -p cdt -c cdt.cnf -s packet-cdt-template cdt.asn */ /* Input file: packet-cdt-template.h */ diff --git a/epan/dissectors/packet-cms.c b/epan/dissectors/packet-cms.c index 5e90d787d7..3d3a310149 100644 --- a/epan/dissectors/packet-cms.c +++ b/epan/dissectors/packet-cms.c @@ -310,7 +310,7 @@ dissect_cms_ContentType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset if(object_identifier_id) { - name = get_oid_str_name(object_identifier_id); + name = oid_resolved_from_string(object_identifier_id); proto_item_append_text(tree, " (%s)", name ? name : object_identifier_id); } @@ -448,7 +448,7 @@ dissect_cms_T_attrType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset if(object_identifier_id) { - name = get_oid_str_name(object_identifier_id); + name = oid_resolved_from_string(object_identifier_id); proto_item_append_text(tree, " (%s)", name ? name : object_identifier_id); } @@ -1434,7 +1434,7 @@ dissect_cms_T_capability(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse if(object_identifier_id) { - name = get_oid_str_name(object_identifier_id); + name = oid_resolved_from_string(object_identifier_id); proto_item_append_text(tree, " %s", name ? name : object_identifier_id); cap_tree = tree; } diff --git a/epan/dissectors/packet-dop.c b/epan/dissectors/packet-dop.c index 616865d1d1..856a76cc82 100644 --- a/epan/dissectors/packet-dop.c +++ b/epan/dissectors/packet-dop.c @@ -358,7 +358,7 @@ static void append_oid(packet_info *pinfo, const char *oid) const char *name = NULL; if(check_col(pinfo->cinfo, COL_INFO)) { - name = get_oid_str_name(oid); + name = oid_resolved_from_string(oid); col_append_fstr(pinfo->cinfo, COL_INFO, " %s", name ? name : oid); } } diff --git a/epan/dissectors/packet-l2tp.c b/epan/dissectors/packet-l2tp.c index 432c8457cf..060874e383 100644 --- a/epan/dissectors/packet-l2tp.c +++ b/epan/dissectors/packet-l2tp.c @@ -127,6 +127,7 @@ static enum_val_t l2tpv3_cookies[] = { #define L2TPv3_PROTOCOL_IP 4 #define L2TPv3_PROTOCOL_MPLS 5 #define L2TPv3_PROTOCOL_AAL5 6 +#define L2TPv3_PROTOCOL_LAPD 7 static enum_val_t l2tpv3_protocols[] = { {"eth", "Ethernet", L2TPv3_PROTOCOL_ETH}, @@ -136,17 +137,20 @@ static enum_val_t l2tpv3_protocols[] = { {"ip", "IP", L2TPv3_PROTOCOL_IP}, {"mpls", "MPLS", L2TPv3_PROTOCOL_MPLS}, {"aal5", "AAL5", L2TPv3_PROTOCOL_AAL5}, + {"lapd", "LAPD", L2TPv3_PROTOCOL_LAPD}, {NULL, NULL, 0} }; #define L2TPv3_L2_SPECIFIC_NONE 0 #define L2TPv3_L2_SPECIFIC_DEFAULT 1 #define L2TPv3_L2_SPECIFIC_ATM 2 +#define L2TPv3_L2_SPECIFIC_LAPD 3 static enum_val_t l2tpv3_l2_specifics[] = { {"none", "None", L2TPv3_L2_SPECIFIC_NONE}, {"default", "Default L2-Specific", L2TPv3_L2_SPECIFIC_DEFAULT}, {"atm", "ATM-Specific", L2TPv3_L2_SPECIFIC_ATM}, + {"lapd", "LAPD-Specific", L2TPv3_L2_SPECIFIC_LAPD}, {NULL, NULL, 0} }; @@ -553,6 +557,7 @@ static dissector_handle_t fr_handle; static dissector_handle_t ip_handle; static dissector_handle_t mpls_handle; static dissector_handle_t llc_handle; +static dissector_handle_t lapd_handle; static dissector_handle_t data_handle; /* @@ -1403,6 +1408,10 @@ process_l2tpv3_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, case L2TPv3_L2_SPECIFIC_ATM: next_tvb = tvb_new_subset(tvb, index + l2tpv3_cookie + 4, -1, -1); break; + case L2TPv3_L2_SPECIFIC_LAPD: + proto_tree_add_text(tree, tvb, index + l2tpv3_cookie + 4, 3,"LAPD info"); + next_tvb = tvb_new_subset(tvb, index + l2tpv3_cookie+4+3, -1, -1); + break; case L2TPv3_L2_SPECIFIC_NONE: default: next_tvb = tvb_new_subset(tvb, index + l2tpv3_cookie, -1, -1); @@ -1441,6 +1450,9 @@ process_l2tpv3_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, call_dissector(llc_handle, next_tvb, pinfo, tree); } break; + case L2TPv3_PROTOCOL_LAPD: + call_dissector(lapd_handle, next_tvb, pinfo, tree); + break; default: call_dissector(data_handle, next_tvb, pinfo, tree); break; @@ -2112,6 +2124,7 @@ proto_reg_handoff_l2tp(void) ip_handle = find_dissector("ip"); mpls_handle = find_dissector("mpls"); llc_handle = find_dissector("llc"); + lapd_handle = find_dissector("lapd"); data_handle = find_dissector("data"); } diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c index 0ce93b5335..83251126dc 100644 --- a/epan/dissectors/packet-ldap.c +++ b/epan/dissectors/packet-ldap.c @@ -3491,7 +3491,7 @@ dissect_ldap_oid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) return; } - oidname=get_oid_str_name(oid); + oidname=oid_resolved_from_string(oid); if(oidname){ proto_tree_add_text(tree, tvb, 0, tvb_length(tvb), "OID: %s (%s)",oid,oidname); diff --git a/epan/dissectors/packet-pkcs12.c b/epan/dissectors/packet-pkcs12.c index a31908ee33..692d8c22ea 100644 --- a/epan/dissectors/packet-pkcs12.c +++ b/epan/dissectors/packet-pkcs12.c @@ -1,6 +1,6 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-pkcs12.c */ +/* packet-pkcs12.c */ /* ../../tools/asn2wrs.py -X -T -b -e -p pkcs12 -c pkcs12.cnf -s packet-pkcs12-template pkcs12.asn */ /* Input file: packet-pkcs12-template.c */ @@ -180,7 +180,7 @@ static void append_oid(proto_tree *tree, const char *oid) { const char *name = NULL; - name = get_oid_str_name(oid); + name = oid_resolved_from_string(oid); proto_item_append_text(tree, " (%s)", name ? name : oid); } @@ -456,7 +456,7 @@ int PBE_decrypt_data(const char *object_identifier_id _U_, tvbuff_t *encrypted_t tvb_set_free_cb(clear_tvb, g_free); name = g_string_new(""); - oidname = get_oid_str_name(object_identifier_id); + oidname = oid_resolved_from_string(object_identifier_id); g_string_sprintf(name, "Decrypted %s", oidname ? oidname : object_identifier_id); /* add it as a new source */ diff --git a/epan/dissectors/packet-pkcs12.h b/epan/dissectors/packet-pkcs12.h index 9cd17878fe..5615134603 100644 --- a/epan/dissectors/packet-pkcs12.h +++ b/epan/dissectors/packet-pkcs12.h @@ -1,6 +1,6 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-pkcs12.h */ +/* packet-pkcs12.h */ /* ../../tools/asn2wrs.py -X -T -b -e -p pkcs12 -c pkcs12.cnf -s packet-pkcs12-template pkcs12.asn */ /* Input file: packet-pkcs12-template.h */ diff --git a/epan/dissectors/packet-x411.c b/epan/dissectors/packet-x411.c index 547a9a3cfe..b0e050a559 100644 --- a/epan/dissectors/packet-x411.c +++ b/epan/dissectors/packet-x411.c @@ -2231,7 +2231,7 @@ dissect_x411_ExtendedContentType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, i if(content_type_id) { - name = get_oid_str_name(content_type_id); + name = oid_resolved_from_string(content_type_id); if(!name) name = content_type_id; @@ -2743,7 +2743,7 @@ dissect_x411_ExtensionValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of } } else if (object_identifier_id) { call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); - name = get_oid_str_name(object_identifier_id); + name = oid_resolved_from_string(object_identifier_id); proto_item_append_text(tree, " (%s)", name ? name : object_identifier_id); } diff --git a/epan/dissectors/packet-x420.c b/epan/dissectors/packet-x420.c index fc49949e05..30ef786781 100644 --- a/epan/dissectors/packet-x420.c +++ b/epan/dissectors/packet-x420.c @@ -670,7 +670,7 @@ dissect_x420_T_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_ offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &object_identifier_id); - name = get_oid_str_name(object_identifier_id); + name = oid_resolved_from_string(object_identifier_id); proto_item_append_text(tree, " (%s)", name ? name : object_identifier_id); @@ -1472,7 +1472,7 @@ dissect_x420_IPM(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, a #line 141 "x420.cnf" if(check_col(actx->pinfo->cinfo, COL_INFO)) - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " Message"); + col_append_str(actx->pinfo->cinfo, COL_INFO, " Message"); offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, IPM_sequence, hf_index, ett_x420_IPM); @@ -1744,7 +1744,7 @@ dissect_x420_IPN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, a #line 149 "x420.cnf" if(check_col(actx->pinfo->cinfo, COL_INFO)) - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " Notification"); + col_append_str(actx->pinfo->cinfo, COL_INFO, " Notification"); offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset, IPN_set, hf_index, ett_x420_IPN); @@ -3347,7 +3347,7 @@ dissect_x420(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) if (check_col(pinfo->cinfo, COL_PROTOCOL)) col_set_str(pinfo->cinfo, COL_PROTOCOL, "P22"); if (check_col(pinfo->cinfo, COL_INFO)) - col_add_str(pinfo->cinfo, COL_INFO, "InterPersonal"); + col_set_str(pinfo->cinfo, COL_INFO, "InterPersonal"); dissect_x420_InformationObject(TRUE, tvb, offset, &asn1_ctx , tree, -1); } diff --git a/epan/dissectors/packet-x509af.c b/epan/dissectors/packet-x509af.c index 2b90f12d39..9120a011dd 100644 --- a/epan/dissectors/packet-x509af.c +++ b/epan/dissectors/packet-x509af.c @@ -1,6 +1,6 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-x509af.c */ +/* packet-x509af.c */ /* ../../tools/asn2wrs.py -b -e -p x509af -c x509af.cnf -s packet-x509af-template AuthenticationFramework.asn */ /* Input file: packet-x509af-template.c */ @@ -273,7 +273,7 @@ dissect_x509af_T_algorithmId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o if(algorithm_id) { - name = get_oid_str_name(algorithm_id); + name = oid_resolved_from_string(algorithm_id); proto_item_append_text(tree, " (%s)", name ? name : algorithm_id); } @@ -496,7 +496,7 @@ dissect_x509af_T_extnId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset if(extension_id) { - name = get_oid_str_name(extension_id); + name = oid_resolved_from_string(extension_id); proto_item_append_text(tree, " (%s)", name ? name : extension_id); } @@ -1126,7 +1126,7 @@ dissect_pkix_crl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) if (check_col(pinfo->cinfo, COL_INFO)) { col_clear(pinfo->cinfo, COL_INFO); - col_add_fstr(pinfo->cinfo, COL_INFO, "Certificate Revocation List"); + col_set_str(pinfo->cinfo, COL_INFO, "Certificate Revocation List"); } diff --git a/epan/dissectors/packet-x509af.h b/epan/dissectors/packet-x509af.h index a9d6316b95..5baa6bcfca 100644 --- a/epan/dissectors/packet-x509af.h +++ b/epan/dissectors/packet-x509af.h @@ -1,6 +1,6 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-x509af.h */ +/* packet-x509af.h */ /* ../../tools/asn2wrs.py -b -e -p x509af -c x509af.cnf -s packet-x509af-template AuthenticationFramework.asn */ /* Input file: packet-x509af-template.h */ diff --git a/epan/dissectors/packet-x509if.c b/epan/dissectors/packet-x509if.c index 729d0d57a2..183c21f274 100644 --- a/epan/dissectors/packet-x509if.c +++ b/epan/dissectors/packet-x509if.c @@ -1,6 +1,6 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-x509if.c */ +/* packet-x509if.c */ /* ../../tools/asn2wrs.py -b -e -p x509if -c x509if.cnf -s packet-x509if-template InformationFramework.asn */ /* Input file: packet-x509if-template.c */ @@ -383,7 +383,7 @@ dissect_x509if_AttributeId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off if(object_identifier_id) { /* see if we can find a nice name */ - name = get_oid_str_name(object_identifier_id); + name = oid_resolved_from_string(object_identifier_id); if(!name) name = object_identifier_id; if(doing_dn) { /* append it to the RDN */ @@ -469,7 +469,7 @@ dissect_x509if_AttributeValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int if((fmt = val_to_str(ava_hf_index, fmt_vals, "")) && *fmt) { /* we have a format */ - if(!(name = get_oid_str_name(object_identifier_id))) + if(!(name = oid_resolved_from_string(object_identifier_id))) name = object_identifier_id; g_snprintf(last_ava, MAX_AVA_STR_LEN, "%s %s %s", name, fmt, value); diff --git a/epan/dissectors/packet-x509if.h b/epan/dissectors/packet-x509if.h index 331d0f61c0..2b4e3a92f2 100644 --- a/epan/dissectors/packet-x509if.h +++ b/epan/dissectors/packet-x509if.h @@ -1,6 +1,6 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-x509if.h */ +/* packet-x509if.h */ /* ../../tools/asn2wrs.py -b -e -p x509if -c x509if.cnf -s packet-x509if-template InformationFramework.asn */ /* Input file: packet-x509if-template.h */ diff --git a/epan/proto.c b/epan/proto.c index 5944f9f170..72c9aa837f 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -4075,7 +4075,7 @@ proto_item_fill_label(field_info *fi, gchar *label_str) case FT_OID: bytes = fvalue_get(&fi->value); - name = (oid_resolv_enabled()) ? get_oid_name(bytes, fvalue_length(&fi->value)) : NULL; + name = (oid_resolv_enabled()) ? oid_resolved_from_encoded(bytes, fvalue_length(&fi->value)) : NULL; if (name) { ret = g_snprintf(label_str, ITEM_LABEL_LENGTH, "%s: %s (%s)", hfinfo->name, |