Rename WTAP_ERR_REC_TYPE_UNSUPPORTED to WTAP_ERR_UNWRITABLE_REC_TYPE.
authorGuy Harris <guy@alum.mit.edu>
Thu, 18 Dec 2014 00:31:49 +0000 (16:31 -0800)
committerGuy Harris <guy@alum.mit.edu>
Thu, 18 Dec 2014 00:32:14 +0000 (00:32 +0000)
That indicates that it's a problem specific to *writing* capture files;
we've already converted some errors to that style, and added a new one
in that style.

Change-Id: I8268316fd8b1a9e301bf09ae970b4b1fbcb35c9d
Reviewed-on: https://code.wireshark.org/review/5826
Reviewed-by: Guy Harris <guy@alum.mit.edu>
26 files changed:
editcap.c
file.c
mergecap.c
tshark.c
wiretap/5views.c
wiretap/btsnoop.c
wiretap/catapult_dct2000.c
wiretap/commview.c
wiretap/erf.c
wiretap/eyesdn.c
wiretap/k12.c
wiretap/lanalyzer.c
wiretap/libpcap.c
wiretap/logcat.c
wiretap/logcat_text.c
wiretap/netmon.c
wiretap/netscaler.c
wiretap/nettl.c
wiretap/network_instruments.c
wiretap/netxray.c
wiretap/ngsniffer.c
wiretap/pcapng.c
wiretap/snoop.c
wiretap/visual.c
wiretap/wtap.c
wiretap/wtap.h

index aa1a2750482ae8476a560d84a34ccb641a1d34d7..04db36f674a3514bffe16b34a66121ee7022b2f4 100644 (file)
--- a/editcap.c
+++ b/editcap.c
@@ -1667,7 +1667,7 @@ main(int argc, char *argv[])
                                 wtap_file_type_subtype_string(out_file_type_subtype));
                         break;
 
-                    case WTAP_ERR_REC_TYPE_UNSUPPORTED:
+                    case WTAP_ERR_UNWRITABLE_REC_TYPE:
                         /*
                          * This is a problem with the particular record we're
                          * writing and the file type and subtype we're
diff --git a/file.c b/file.c
index 160c31de5e7c958056d81eb5101885c14b834328..597d19942a392b9f4074e8becc024e90b21c3adc 100644 (file)
--- a/file.c
+++ b/file.c
@@ -1599,7 +1599,7 @@ cf_merge_files(char **out_filenamep, int in_file_count,
         g_free(display_basename);
         break;
 
-      case WTAP_ERR_REC_TYPE_UNSUPPORTED:
+      case WTAP_ERR_UNWRITABLE_REC_TYPE:
         /*
          * This is a problem with the particular record we're writing and
          * the file type and subtype we're writing; note that, and report
@@ -4203,7 +4203,7 @@ save_record(capture_file *cf, frame_data *fdata,
                       fdata->num, wtap_file_type_subtype_string(args->file_type));
         break;
 
-      case WTAP_ERR_REC_TYPE_UNSUPPORTED:
+      case WTAP_ERR_UNWRITABLE_REC_TYPE:
         /*
          * This is a problem with the particular record we're writing and
          * the file type and subtype we're writing; note that, and report
index 433d44584d8a4bf81911a7ff55276489f1c856ea..cdf2cbe1bcc8f667c3a7e6766048720712ce2725 100644 (file)
@@ -583,7 +583,7 @@ main(int argc, char *argv[])
               wtap_file_type_subtype_string(file_type));
       break;
 
-    case WTAP_ERR_REC_TYPE_UNSUPPORTED:
+    case WTAP_ERR_UNWRITABLE_REC_TYPE:
       /*
        * This is a problem with the particular record we're writing and
        * the file type and subtype we're wwriting; note that, and
index 617ab1b8d854a15d0ed292cacad73304a308ed55..ef20604340c08d294c8d9c5fe644cb5bcef75f3e 100644 (file)
--- a/tshark.c
+++ b/tshark.c
@@ -3272,7 +3272,7 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type,
                         wtap_file_type_subtype_short_string(out_file_type));
                 break;
 
-              case WTAP_ERR_REC_TYPE_UNSUPPORTED:
+              case WTAP_ERR_UNWRITABLE_REC_TYPE:
                 /*
                  * This is a problem with the particular record we're writing
                  * and the file type and subtype we're writing; note that,
@@ -3381,7 +3381,7 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type,
                       wtap_file_type_subtype_short_string(out_file_type));
               break;
 
-            case WTAP_ERR_REC_TYPE_UNSUPPORTED:
+            case WTAP_ERR_UNWRITABLE_REC_TYPE:
               /*
                * This is a problem with the particular record we're writing
                * and the file type and subtype we're writing; note that,
index 67de759c1d8f76f0ed43bb658f65c2781927f990..287181f1a49a594b903957e04eb02672480c3b19 100644 (file)
@@ -358,7 +358,7 @@ static gboolean _5views_dump(wtap_dumper *wdh,
 
        /* We can only write packet records. */
        if (phdr->rec_type != REC_TYPE_PACKET) {
-               *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+               *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
                return FALSE;
        }
 
index ee6231e3b21d59c74b257ba4cdd831b26e0148a6..8c3212cc5177b72b237c392a7c62206beb6eb916 100644 (file)
@@ -320,7 +320,7 @@ static gboolean btsnoop_dump_h1(wtap_dumper *wdh,
 
     /* We can only write packet records. */
     if (phdr->rec_type != REC_TYPE_PACKET) {
-        *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+        *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
         return FALSE;
     }
 
@@ -365,7 +365,7 @@ static gboolean btsnoop_dump_h4(wtap_dumper *wdh,
 
     /* We can only write packet records. */
     if (phdr->rec_type != REC_TYPE_PACKET) {
-        *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+        *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
         return FALSE;
     }
 
index 59ed3958df196da361e907e9909f7d321ce70d3b..90439b9a8b9ed3f6c1a398a1580c95c51c6abb1f 100644 (file)
@@ -606,7 +606,7 @@ catapult_dct2000_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr,
 
     /* We can only write packet records. */
     if (phdr->rec_type != REC_TYPE_PACKET) {
-        *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+        *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
         return FALSE;
     }
 
index 6c410f950e8a33614bca72597dfe106c38c68a74..d2d178a250536cc63ae1c4b2c8e3233f12c6cf2a 100644 (file)
@@ -321,7 +321,7 @@ static gboolean commview_dump(wtap_dumper *wdh,
 
        /* We can only write packet records. */
        if (phdr->rec_type != REC_TYPE_PACKET) {
-               *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+               *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
                return FALSE;
        }
 
index acf06057f61c686ac2452feea366937e95e8b956..bbd20b906bbf43968b58fb162eb1fa434af9b5a6 100644 (file)
@@ -606,7 +606,7 @@ static gboolean erf_dump(
 
   /* We can only write packet records. */
   if (phdr->rec_type != REC_TYPE_PACKET) {
-    *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+    *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
     return FALSE;
   }
 
index 25e046edd6eadf2310ce117f9519afc28610a60d..ac8f2f879d327afba651018054d0cbb0adc3266a 100644 (file)
@@ -407,7 +407,7 @@ static gboolean eyesdn_dump(wtap_dumper *wdh,
 
        /* We can only write packet records. */
        if (phdr->rec_type != REC_TYPE_PACKET) {
-               *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+               *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
                return FALSE;
        }
 
index af1f4d84cabaf0f849d8fef734a27075a7e00943..611026829eb91deb0396d5a41e0070ec962647e1 100644 (file)
@@ -1271,7 +1271,7 @@ static gboolean k12_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr,
 
     /* We can only write packet records. */
     if (phdr->rec_type != REC_TYPE_PACKET) {
-        *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+        *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
         return FALSE;
     }
 
index 26655cdb12d7a1563350616938233178a672731d..ae535d31c66ce65bd37ce3de1f3fb74eea9b3715 100644 (file)
@@ -638,7 +638,7 @@ static gboolean lanalyzer_dump(wtap_dumper *wdh,
 
       /* We can only write packet records. */
       if (phdr->rec_type != REC_TYPE_PACKET) {
-            *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+            *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
             return FALSE;
             }
 
index 0aebcc30c73dbe5b29f5da8fc78db2985df26d42..19712f1ee5acfa96269ebef8f6b6dd1dcee8a002 100644 (file)
@@ -900,7 +900,7 @@ static gboolean libpcap_dump(wtap_dumper *wdh,
 
        /* We can only write packet records. */
        if (phdr->rec_type != REC_TYPE_PACKET) {
-               *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+               *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
                return FALSE;
        }
 
index de11a429589433360347f3334c70dd1969383a54..69b05c80dd16e0fa149c24b7a0ebe83832cf51ad 100644 (file)
@@ -318,7 +318,7 @@ static gboolean logcat_binary_dump(wtap_dumper *wdh,
 
     /* We can only write packet records. */
     if (phdr->rec_type != REC_TYPE_PACKET) {
-        *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+        *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
         return FALSE;
     }
 
index c7bad0d7cfc4f498f96c062a218e2250d92a5b84..cbeede293fad4469031e2edbe99ea4f44a744ccb 100644 (file)
@@ -428,7 +428,7 @@ static gboolean logcat_text_dump_text(wtap_dumper *wdh,
 
     /* We can only write packet records. */
     if (phdr->rec_type != REC_TYPE_PACKET) {
-        *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+        *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
         return FALSE;
     }
 
index a8648493daa60d46d7ac1ca0e624cfc7501c2c56..3bb57763a7a5d6008872d842d390b07c592bad53 100644 (file)
@@ -1010,7 +1010,7 @@ static gboolean netmon_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr,
 
        /* We can only write packet records. */
        if (phdr->rec_type != REC_TYPE_PACKET) {
-               *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+               *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
                return FALSE;
        }
 
index e8a0eb5ae5c5d353226298ad1bd4abc44f647014..ad2840bf827ace35596a0b9cfa49ef6c8b940c8c 100644 (file)
@@ -1790,7 +1790,7 @@ static gboolean nstrace_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr,
 
     /* We can only write packet records. */
     if (phdr->rec_type != REC_TYPE_PACKET) {
-        *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+        *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
         return FALSE;
     }
 
index cb885661f9cbcfe35e12143c8eac7a32a127d299..8c93af940d309e10a5ba18b850690836495abf6e 100644 (file)
@@ -690,7 +690,7 @@ static gboolean nettl_dump(wtap_dumper *wdh,
 
         /* We can only write packet records. */
         if (phdr->rec_type != REC_TYPE_PACKET) {
-                *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+                *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
                 return FALSE;
         }
 
index bf96b30cf8ba5f4dd95ac72f6204cbac52478f3a..8c3753427e3ded7ec3600809b9d847e58c7dee6b 100644 (file)
@@ -676,7 +676,7 @@ static gboolean observer_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr,
 
     /* We can only write packet records. */
     if (phdr->rec_type != REC_TYPE_PACKET) {
-        *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+        *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
         return FALSE;
     }
 
index 69136373e08ee8643c6356a6423a903e52670388..69b39a3faf1e10d01bb1c1a8ed69d66a447e37ee 100644 (file)
@@ -1737,7 +1737,7 @@ netxray_dump_1_1(wtap_dumper *wdh,
 
        /* We can only write packet records. */
        if (phdr->rec_type != REC_TYPE_PACKET) {
-               *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+               *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
                return FALSE;
        }
 
@@ -1916,7 +1916,7 @@ netxray_dump_2_0(wtap_dumper *wdh,
 
        /* We can only write packet records. */
        if (phdr->rec_type != REC_TYPE_PACKET) {
-               *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+               *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
                return FALSE;
        }
 
index 60ad2e113e24d26023d899423efebf9d1111e8c2..2eda7663e81f5673bf53239ce1cd8e434babbd2d 100644 (file)
@@ -2010,7 +2010,7 @@ ngsniffer_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr,
 
        /* We can only write packet records. */
        if (phdr->rec_type != REC_TYPE_PACKET) {
-               *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+               *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
                return FALSE;
        }
 
index 5ad679091a12a3f9352bd0139b705443e1c64f8b..98e5e1e47b7ee23dac8c11e7072d8adfa018c119 100644 (file)
@@ -3729,14 +3729,14 @@ static gboolean pcapng_dump(wtap_dumper *wdh,
 #endif
             {
                 /* No. */
-                *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+                *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
                 return FALSE;
             }
             break;
 
         default:
             /* We don't support writing this record type. */
-            *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+            *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
             return FALSE;
     }
 
index 67816b438c5ecf26ea5d03966e32b721a6640977..bba1b29411f13c31074e631c4726f1a0662d1702 100644 (file)
@@ -825,7 +825,7 @@ static gboolean snoop_dump(wtap_dumper *wdh,
 
        /* We can only write packet records. */
        if (phdr->rec_type != REC_TYPE_PACKET) {
-               *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+               *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
                return FALSE;
        }
 
index 01b353446bd535f4035f601f0ac7a8fb3b443e07..3bb8043e868c29519d090f675d2a9bb4b11e5a7a 100644 (file)
@@ -653,7 +653,7 @@ static gboolean visual_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr,
 
     /* We can only write packet records. */
     if (phdr->rec_type != REC_TYPE_PACKET) {
-        *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+        *err = WTAP_ERR_UNWRITABLE_REC_TYPE;
         return FALSE;
     }
 
index 40cabd0821b11d30259986786d3fa6de109e8a4b..731ab26091028a67c51a3992ed490bc24f1c86f6 100644 (file)
@@ -882,7 +882,7 @@ static const char *wtap_errlist[] = {
        /* WTAP_ERR_CHECK_WSLUA */
        NULL,
 
-       /* WTAP_ERR_REC_TYPE_UNSUPPORTED */
+       /* WTAP_ERR_UNWRITABLE_REC_TYPE */
        "That record type cannot be written in that format",
 
        /* WTAP_ERR_UNWRITABLE_REC_DATA */
index 5e707a24db6fccbfde85dfd82630118c4c9572f4..e27ee772b0878a3e3e874d7b9b1692ae711a4165 100644 (file)
@@ -1736,7 +1736,7 @@ int wtap_register_encap_type(const char* name, const char* short_name);
     /** Not really an error: the file type being checked is from a Lua
         plugin, so that the code will call wslua_can_write_encap() instead if it gets this */
 
-#define WTAP_ERR_REC_TYPE_UNSUPPORTED         -24
+#define WTAP_ERR_UNWRITABLE_REC_TYPE          -24
     /** Specified record type can't be written to that file type */
 
 #define WTAP_ERR_UNWRITABLE_REC_DATA          -25