Convert asn1 template files proto_tree_add_item() 'encoding' arg for field types...
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 15 Oct 2011 19:48:19 +0000 (19:48 +0000)
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 15 Oct 2011 19:48:19 +0000 (19:48 +0000)
 1. If there's no character encoding (ENC_ASCII, ...) specified
    then use ENC_ASCII.
 2. Always use ENC_NA
    (replacing any existing True/1/FALSE/0
    /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39428 f5534014-38df-0310-8fa8-9805f1628bb7

asn1/ansi_map/packet-ansi_map-template.c
asn1/ftam/packet-ftam-template.c
asn1/snmp/packet-snmp-template.c
epan/dissectors/packet-ansi_map.c
epan/dissectors/packet-ftam.c
epan/dissectors/packet-snmp.c

index 468e0de0ad9bf83d8087e3ca13e659cb3d002f61..60e5d2d78f5ed212ec1e61e68ac62f00be259d20 100644 (file)
@@ -771,7 +771,7 @@ dissect_ansi_map_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
             if(octet_len == 0)
                 return;
             offset++;
-            proto_tree_add_item(subtree, hf_ansi_map_ia5_digits, tvb, offset, -1, FALSE);
+            proto_tree_add_item(subtree, hf_ansi_map_ia5_digits, tvb, offset, -1, ENC_ASCII|ENC_NA);
             proto_item_append_text(actx->created_item, " - %s", tvb_get_ephemeral_string(tvb,offset,tvb_length_remaining(tvb,offset)));
             break;
         case 3:
@@ -804,7 +804,7 @@ dissect_ansi_map_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
             break;
         case 2:
             /* IA5 Coding */
-            proto_tree_add_item(subtree, hf_ansi_map_ia5_digits, tvb, offset, -1, FALSE);
+            proto_tree_add_item(subtree, hf_ansi_map_ia5_digits, tvb, offset, -1, ENC_ASCII|ENC_NA);
             proto_item_append_text(actx->created_item, " - %s", tvb_get_ephemeral_string(tvb,offset,tvb_length_remaining(tvb,offset)));
             break;
         case 3:
index 73b22c52201f50c8cf19312cd622fd54aaa14bf8..1da197da53f6e7faac2b0e9b9f4b3f20df1797fc 100644 (file)
@@ -68,7 +68,7 @@ static gint ett_ftam = -1;
 static void
 dissect_ftam_unstructured_text(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
 {
-       proto_tree_add_item (parent_tree, hf_ftam_unstructured_text, tvb, 0, tvb_length_remaining(tvb, 0), ENC_BIG_ENDIAN); 
+       proto_tree_add_item (parent_tree, hf_ftam_unstructured_text, tvb, 0, tvb_length_remaining(tvb, 0), ENC_ASCII|ENC_NA); 
 }
 
 /*
index 8439b1ca7bb3e9ceb96146e33ae62d0de1b1b6ca..d4ab5e99a0cdb6cd367e45354286fc0b15ae7013 100644 (file)
@@ -1019,7 +1019,7 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
       case SNMP_ENGINEID_FORMAT_TEXT:
        /* max. 27-byte string, administratively assigned */
        if (len_remain<=27) {
-         proto_tree_add_item(tree, hf_snmp_engineid_text, tvb, offset, len_remain, ENC_BIG_ENDIAN);
+         proto_tree_add_item(tree, hf_snmp_engineid_text, tvb, offset, len_remain, ENC_ASCII|ENC_NA);
          offset+=len_remain;
          len_remain=0;
        }
index 3e587d55d9d73b91c4ed5ebd0525a81cebbd5546..460f5c6e71c16110bdc108a95bc43f380cde82f2 100644 (file)
@@ -1559,7 +1559,7 @@ dissect_ansi_map_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
             if(octet_len == 0)
                 return;
             offset++;
-            proto_tree_add_item(subtree, hf_ansi_map_ia5_digits, tvb, offset, -1, FALSE);
+            proto_tree_add_item(subtree, hf_ansi_map_ia5_digits, tvb, offset, -1, ENC_ASCII|ENC_NA);
             proto_item_append_text(actx->created_item, " - %s", tvb_get_ephemeral_string(tvb,offset,tvb_length_remaining(tvb,offset)));
             break;
         case 3:
@@ -1592,7 +1592,7 @@ dissect_ansi_map_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
             break;
         case 2:
             /* IA5 Coding */
-            proto_tree_add_item(subtree, hf_ansi_map_ia5_digits, tvb, offset, -1, FALSE);
+            proto_tree_add_item(subtree, hf_ansi_map_ia5_digits, tvb, offset, -1, ENC_ASCII|ENC_NA);
             proto_item_append_text(actx->created_item, " - %s", tvb_get_ephemeral_string(tvb,offset,tvb_length_remaining(tvb,offset)));
             break;
         case 3:
index 6085babdf6d3d6b2c45fc5aca31ac19a442c4e7b..600f8fde7245ec81d6908057eecd9605f35d215b 100644 (file)
@@ -4753,7 +4753,7 @@ dissect_ftam_PDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, a
 static void
 dissect_ftam_unstructured_text(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
 {
-       proto_tree_add_item (parent_tree, hf_ftam_unstructured_text, tvb, 0, tvb_length_remaining(tvb, 0), ENC_BIG_ENDIAN); 
+       proto_tree_add_item (parent_tree, hf_ftam_unstructured_text, tvb, 0, tvb_length_remaining(tvb, 0), ENC_ASCII|ENC_NA); 
 }
 
 /*
index 2eaf8b6e28a0c96b60415ced53346a24c3d1447a..926ec8ea39bb931a151596fc2095519782e76604 100644 (file)
@@ -1121,7 +1121,7 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
       case SNMP_ENGINEID_FORMAT_TEXT:
        /* max. 27-byte string, administratively assigned */
        if (len_remain<=27) {
-         proto_tree_add_item(tree, hf_snmp_engineid_text, tvb, offset, len_remain, ENC_BIG_ENDIAN);
+         proto_tree_add_item(tree, hf_snmp_engineid_text, tvb, offset, len_remain, ENC_ASCII|ENC_NA);
          offset+=len_remain;
          len_remain=0;
        }