The "file types" we have are actually combinations of types and

subtypes, e.g. Network Monitor version 1 and Network Monitor version 2
are separate "file types", even though they both come from Network
Monitor.

Rename various functions, #defines, and variables appropriately.

svn path=/trunk/; revision=53166
daniel/osmux
Guy Harris 2013-11-08 09:53:01 +00:00
parent 5cec175b07
commit 853da2eb9b
72 changed files with 518 additions and 511 deletions

View File

@ -469,7 +469,7 @@ print_stats(const gchar *filename, capture_info *cf_info)
gchar *size_string;
/* Build printable strings for various stats */
file_type_string = wtap_file_type_string(cf_info->file_type);
file_type_string = wtap_file_type_subtype_string(cf_info->file_type);
file_encap_string = wtap_encap_string(cf_info->file_encap);
start_time_t = (time_t)cf_info->start_time;
stop_time_t = (time_t)cf_info->stop_time;
@ -644,7 +644,7 @@ print_stats_table(const gchar *filename, capture_info *cf_info)
time_t stop_time_t;
/* Build printable strings for various stats */
file_type_string = wtap_file_type_string(cf_info->file_type);
file_type_string = wtap_file_type_subtype_string(cf_info->file_type);
file_encap_string = wtap_encap_string(cf_info->file_encap);
start_time_t = (time_t)cf_info->start_time;
stop_time_t = (time_t)cf_info->stop_time;
@ -941,7 +941,7 @@ process_cap_file(wtap *wth, const char *filename)
cf_info.filesize = size;
/* File Type */
cf_info.file_type = wtap_file_type(wth);
cf_info.file_type = wtap_file_type_subtype(wth);
cf_info.iscompressed = wtap_iscompressed(wth);
/* File Encapsulation */

View File

@ -132,7 +132,7 @@ cf_open_error_message(int err, gchar *err_info, gboolean for_writing,
/* Seen only when opening a capture file for writing. */
g_snprintf(errmsg_errno, sizeof(errmsg_errno),
"The file \"%%s\" is a pipe, and %s capture files can't be "
"written to a pipe.", wtap_file_type_string(file_type));
"written to a pipe.", wtap_file_type_subtype_string(file_type));
errmsg = errmsg_errno;
break;
@ -220,7 +220,7 @@ gboolean capture_info_new_file(const char *new_filename)
info_data.wtap = wtap_open_offline(new_filename, &err, &err_info, FALSE);
if (!info_data.wtap) {
err_msg = g_strdup_printf(cf_open_error_message(err, err_info, FALSE, WTAP_FILE_PCAP),
err_msg = g_strdup_printf(cf_open_error_message(err, err_info, FALSE, WTAP_FILE_TYPE_SUBTYPE_UNKNOWN),
new_filename);
g_warning("capture_info_new_file: %d (%s)", err, err_msg);
g_free (err_msg);

View File

@ -157,9 +157,9 @@ static struct select_item selectfrm[MAX_SELECTIONS];
static int max_selected = -1;
static int keep_em = 0;
#ifdef PCAP_NG_DEFAULT
static int out_file_type = WTAP_FILE_PCAPNG; /* default to pcapng */
static int out_file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_PCAPNG; /* default to pcapng */
#else
static int out_file_type = WTAP_FILE_PCAP; /* default to pcap */
static int out_file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_PCAP; /* default to pcap */
#endif
static int out_frame_type = -2; /* Leave frame type alone */
static int verbose = 0; /* Not so verbose */
@ -810,12 +810,12 @@ list_capture_types(void) {
struct string_elem *captypes;
GSList *list = NULL;
captypes = g_new(struct string_elem,WTAP_NUM_FILE_TYPES);
captypes = g_new(struct string_elem,WTAP_NUM_FILE_TYPES_SUBTYPES);
fprintf(stderr, "editcap: The available capture file types for the \"-F\" flag are:\n");
for (i = 0; i < WTAP_NUM_FILE_TYPES; i++) {
for (i = 0; i < WTAP_NUM_FILE_TYPES_SUBTYPES; i++) {
if (wtap_dump_can_open(i)) {
captypes[i].sstr = wtap_file_type_short_string(i);
captypes[i].lstr = wtap_file_type_string(i);
captypes[i].sstr = wtap_file_type_subtype_short_string(i);
captypes[i].lstr = wtap_file_type_subtype_string(i);
list = g_slist_insert_sorted(list, &captypes[i], string_compare);
}
}
@ -1037,8 +1037,8 @@ main(int argc, char *argv[])
break;
case 'F':
out_file_type = wtap_short_string_to_file_type(optarg);
if (out_file_type < 0) {
out_file_type_subtype = wtap_short_string_to_file_type_subtype(optarg);
if (out_file_type_subtype < 0) {
fprintf(stderr, "editcap: \"%s\" isn't a valid capture file type\n\n",
optarg);
list_capture_types();
@ -1176,7 +1176,7 @@ main(int argc, char *argv[])
if (verbose) {
fprintf(stderr, "File %s is a %s capture file.\n", argv[optind],
wtap_file_type_string(wtap_file_type(wth)));
wtap_file_type_subtype_string(wtap_file_type_subtype(wth)));
}
shb_hdr = wtap_file_get_shb_info(wth);
@ -1228,7 +1228,7 @@ main(int argc, char *argv[])
shb_hdr->shb_user_appl = appname;
}
pdh = wtap_dump_open_ng(filename, out_file_type, out_frame_type,
pdh = wtap_dump_open_ng(filename, out_file_type_subtype, out_frame_type,
snaplen ? MIN(snaplen, wtap_snapshot_length(wth)) : wtap_snapshot_length(wth),
FALSE /* compressed */, shb_hdr, idb_inf, &err);
@ -1259,7 +1259,7 @@ main(int argc, char *argv[])
if (verbose)
fprintf(stderr, "Continuing writing in file %s\n", filename);
pdh = wtap_dump_open_ng(filename, out_file_type, out_frame_type,
pdh = wtap_dump_open_ng(filename, out_file_type_subtype, out_frame_type,
snaplen ? MIN(snaplen, wtap_snapshot_length(wth)) : wtap_snapshot_length(wth),
FALSE /* compressed */, shb_hdr, idb_inf, &err);
@ -1287,7 +1287,7 @@ main(int argc, char *argv[])
if (verbose)
fprintf(stderr, "Continuing writing in file %s\n", filename);
pdh = wtap_dump_open_ng(filename, out_file_type, out_frame_type,
pdh = wtap_dump_open_ng(filename, out_file_type_subtype, out_frame_type,
snaplen ? MIN(snaplen, wtap_snapshot_length(wth)) : wtap_snapshot_length(wth),
FALSE /* compressed */, shb_hdr, idb_inf, &err);
if (pdh == NULL) {
@ -1482,7 +1482,7 @@ main(int argc, char *argv[])
int real_data_start = 0;
/* Protect non-protocol data */
if (wtap_file_type(wth) == WTAP_FILE_CATAPULT_DCT2000)
if (wtap_file_type_subtype(wth) == WTAP_FILE_TYPE_SUBTYPE_CATAPULT_DCT2000)
real_data_start = find_dct2000_real_data(buf);
for (i = real_data_start; i < (int) phdr->caplen; i++) {
@ -1576,7 +1576,7 @@ main(int argc, char *argv[])
g_free (filename);
filename = g_strdup(argv[optind+1]);
pdh = wtap_dump_open_ng(filename, out_file_type, out_frame_type,
pdh = wtap_dump_open_ng(filename, out_file_type_subtype, out_frame_type,
snaplen ? MIN(snaplen, wtap_snapshot_length(wth)): wtap_snapshot_length(wth),
FALSE /* compressed */, shb_hdr, idb_inf, &err);
if (pdh == NULL) {

View File

@ -207,7 +207,7 @@ WSLUA_CONSTRUCTOR Dumper_new(lua_State* L) {
#define WSLUA_OPTARG_Dumper_new_ENCAP 3 /* The encapsulation to be used in the file to be created */
Dumper d;
const char* fname = luaL_checkstring(L,WSLUA_ARG_Dumper_new_FILENAME);
int filetype = luaL_optint(L,WSLUA_OPTARG_Dumper_new_FILETYPE,WTAP_FILE_PCAP);
int filetype = luaL_optint(L,WSLUA_OPTARG_Dumper_new_FILETYPE,WTAP_FILE_TYPE_SUBTYPE_PCAP);
int encap = luaL_optint(L,WSLUA_OPTARG_Dumper_new_ENCAP,WTAP_ENCAP_ETHERNET);
int err = 0;
const char* filename;
@ -223,12 +223,12 @@ WSLUA_CONSTRUCTOR Dumper_new(lua_State* L) {
switch (err) {
case WTAP_ERR_UNSUPPORTED_FILE_TYPE:
luaL_error(L,"Files of file type %s cannot be written",
wtap_file_type_string(filetype));
wtap_file_type_subtype_string(filetype));
break;
case WTAP_ERR_UNSUPPORTED_ENCAP:
luaL_error(L,"Files of file type %s don't support encapsulation %s",
wtap_file_type_string(filetype),
wtap_file_type_subtype_string(filetype),
wtap_encap_short_string(encap));
break;
@ -338,7 +338,7 @@ WSLUA_METHOD Dumper_new_for_current(lua_State* L) {
#define WSLUA_OPTARG_Dumper_new_for_current_FILETYPE 2 /* The file type. Defaults to pcap. */
Dumper d;
const char* fname = luaL_checkstring(L,1);
int filetype = luaL_optint(L,WSLUA_OPTARG_Dumper_new_for_current_FILETYPE,WTAP_FILE_PCAP);
int filetype = luaL_optint(L,WSLUA_OPTARG_Dumper_new_for_current_FILETYPE,WTAP_FILE_TYPE_SUBTYPE_PCAP);
int encap;
int err = 0;
const char* filename;
@ -358,12 +358,12 @@ WSLUA_METHOD Dumper_new_for_current(lua_State* L) {
switch (err) {
case WTAP_ERR_UNSUPPORTED_FILE_TYPE:
luaL_error(L,"Files of file type %s cannot be written",
wtap_file_type_string(filetype));
wtap_file_type_subtype_string(filetype));
break;
case WTAP_ERR_UNSUPPORTED_ENCAP:
luaL_error(L,"Files of file type %s don't support encapsulation %s",
wtap_file_type_string(filetype),
wtap_file_type_subtype_string(filetype),
wtap_encap_short_string(encap));
break;

23
file.c
View File

@ -376,7 +376,7 @@ cf_open(capture_file *cf, const char *fname, gboolean is_tempfile, int *err)
cf->computed_elapsed = 0;
cf->cd_t = wtap_file_type(cf->wth);
cf->cd_t = wtap_file_type_subtype(cf->wth);
cf->linktypes = g_array_sized_new(FALSE, FALSE, (guint) sizeof(int), 1);
cf->count = 0;
cf->packet_comment_count = 0;
@ -409,7 +409,7 @@ cf_open(capture_file *cf, const char *fname, gboolean is_tempfile, int *err)
packet_list_queue_draw();
cf_callback_invoke(cf_cb_file_opened, cf);
if (cf->cd_t == WTAP_FILE_BER) {
if (cf->cd_t == WTAP_FILE_TYPE_SUBTYPE_BER) {
/* tell the BER dissector the file name */
ber_set_filename(cf->filename);
}
@ -1349,7 +1349,7 @@ cf_merge_files(char **out_filenamep, int in_file_count,
* We need something similar when merging pcapng files possibly with an option to say
* the same interface(s) used in all in files. SHBs comments should be merged together.
*/
if ((selected_frame_type == WTAP_ENCAP_PER_PACKET)&&(file_type == WTAP_FILE_PCAP)) {
if ((selected_frame_type == WTAP_ENCAP_PER_PACKET)&&(file_type == WTAP_FILE_TYPE_SUBTYPE_PCAP)) {
/* Write output in pcapng format */
wtapng_section_t *shb_hdr;
wtapng_iface_descriptions_t *idb_inf, *idb_inf_merge_file;
@ -1362,7 +1362,7 @@ cf_merge_files(char **out_filenamep, int in_file_count,
comment_gstr = g_string_new("");
g_string_append_printf(comment_gstr, "%s \n",shb_hdr->opt_comment);
g_string_append_printf(comment_gstr, "File created by merging: \n");
file_type = WTAP_FILE_PCAPNG;
file_type = WTAP_FILE_TYPE_SUBTYPE_PCAPNG;
for (i = 0; i < in_file_count; i++) {
g_string_append_printf(comment_gstr, "File%d: %s \n",i+1,in_files[i].filename);
@ -1523,9 +1523,10 @@ cf_merge_files(char **out_filenamep, int in_file_count,
break;
}
/* If we have WTAP_ENCAP_PER_PACKETend the infiles are of type WTAP_FILE_PCAP
* we need to set the interface id in the paket header = the interface index we used
* in the IDBs interface description for this file(encapsulation type).
/* If we have WTAP_ENCAP_PER_PACKET and the infiles are of type
* WTAP_FILE_TYPE_SUBTYPE_PCAP, we need to set the interface id
* in the paket header = the interface index we used in the IDBs
* interface description for this file(encapsulation type).
*/
if (fake_interface_ids) {
struct wtap_pkthdr *phdr;
@ -1623,7 +1624,7 @@ cf_merge_files(char **out_filenamep, int in_file_count,
simple_error_message_box(
"Frame %u of \"%s\" has a network type that can't be saved in a \"%s\" file.",
in_file->packet_num, display_basename,
wtap_file_type_string(file_type));
wtap_file_type_subtype_string(file_type));
g_free(display_basename);
break;
@ -4144,7 +4145,7 @@ save_packet(capture_file *cf _U_, frame_data *fdata,
*/
simple_error_message_box(
"Frame %u has a network type that can't be saved in a \"%s\" file.",
fdata->num, wtap_file_type_string(args->file_type));
fdata->num, wtap_file_type_subtype_string(args->file_type));
break;
default:
@ -4322,7 +4323,7 @@ rescan_file(capture_file *cf, const char *fname, gboolean is_tempfile, int *err)
/* No user changes yet. */
cf->unsaved_changes = FALSE;
cf->cd_t = wtap_file_type(cf->wth);
cf->cd_t = wtap_file_type_subtype(cf->wth);
cf->linktypes = g_array_sized_new(FALSE, FALSE, (guint) sizeof(int), 1);
cf->snap = wtap_snapshot_length(cf->wth);
@ -4986,7 +4987,7 @@ cf_open_failure_alert_box(const char *filename, int err, gchar *err_info,
simple_error_message_box(
"The file \"%s\" is a pipe, and %s capture files can't be "
"written to a pipe.",
display_basename, wtap_file_type_string(file_type));
display_basename, wtap_file_type_subtype_string(file_type));
break;
case WTAP_ERR_UNSUPPORTED_FILE_TYPE:

View File

@ -165,13 +165,13 @@ list_capture_types(void) {
struct string_elem *captypes;
GSList *list = NULL;
captypes = g_new(struct string_elem,WTAP_NUM_FILE_TYPES);
captypes = g_new(struct string_elem,WTAP_NUM_FILE_TYPES_SUBTYPES);
fprintf(stderr, "mergecap: The available capture file types for the \"-F\" flag are:\n");
for (i = 0; i < WTAP_NUM_FILE_TYPES; i++) {
for (i = 0; i < WTAP_NUM_FILE_TYPES_SUBTYPES; i++) {
if (wtap_dump_can_open(i)) {
captypes[i].sstr = wtap_file_type_short_string(i);
captypes[i].lstr = wtap_file_type_string(i);
captypes[i].sstr = wtap_file_type_subtype_short_string(i);
captypes[i].lstr = wtap_file_type_subtype_string(i);
list = g_slist_insert_sorted(list, &captypes[i], string_compare);
}
}
@ -209,9 +209,9 @@ main(int argc, char *argv[])
int in_file_count = 0;
guint snaplen = 0;
#ifdef PCAP_NG_DEFAULT
int file_type = WTAP_FILE_PCAPNG; /* default to pcap format */
int file_type = WTAP_FILE_TYPE_SUBTYPE_PCAPNG; /* default to pcap format */
#else
int file_type = WTAP_FILE_PCAP; /* default to pcapng format */
int file_type = WTAP_FILE_TYPE_SUBTYPE_PCAP; /* default to pcapng format */
#endif
int frame_type = -2;
int out_fd;
@ -240,7 +240,7 @@ main(int argc, char *argv[])
break;
case 'F':
file_type = wtap_short_string_to_file_type(optarg);
file_type = wtap_short_string_to_file_type_subtype(optarg);
if (file_type < 0) {
fprintf(stderr, "mergecap: \"%s\" isn't a valid capture file type\n",
optarg);
@ -326,7 +326,7 @@ main(int argc, char *argv[])
if (verbose) {
for (i = 0; i < in_file_count; i++)
fprintf(stderr, "mergecap: %s is type %s.\n", argv[optind + i],
wtap_file_type_string(wtap_file_type(in_files[i].wth)));
wtap_file_type_subtype_string(wtap_file_type_subtype(in_files[i].wth)));
}
if (snaplen == 0) {
@ -389,7 +389,7 @@ main(int argc, char *argv[])
}
/* prepare the outfile */
if(file_type == WTAP_FILE_PCAPNG ){
if(file_type == WTAP_FILE_TYPE_SUBTYPE_PCAPNG ){
wtapng_section_t *shb_hdr;
GString *comment_gstr;

View File

@ -552,7 +552,7 @@ main(int argc, char **argv)
example = find_example(produce_type);
dump = wtap_dump_open(produce_filename, WTAP_FILE_PCAP,
dump = wtap_dump_open(produce_filename, WTAP_FILE_TYPE_SUBTYPE_PCAP,
example->sample_wtap_encap, produce_max_bytes, FALSE /* compressed */, &err);
if (!dump) {
fprintf(stderr,

View File

@ -1674,7 +1674,7 @@ raw_cf_open(capture_file *cf, const char *fname)
/* No user changes yet. */
cf->unsaved_changes = FALSE;
cf->cd_t = WTAP_FILE_UNKNOWN;
cf->cd_t = WTAP_FILE_TYPE_SUBTYPE_UNKNOWN;
cf->count = 0;
cf->drops_known = FALSE;
cf->drops = 0;

View File

@ -226,13 +226,13 @@ int main(int argc, char *argv[])
}
exit(1);
}
DEBUG_PRINT("file_type is %u\n", wtap_file_type(wth));
DEBUG_PRINT("file_type_subtype is %u\n", wtap_file_type_subtype(wth));
shb_hdr = wtap_file_get_shb_info(wth);
idb_inf = wtap_file_get_idb_info(wth);
/* Open outfile (same filetype/encap as input file) */
pdh = wtap_dump_open_ng(outfile, wtap_file_type(wth), wtap_file_encap(wth),
pdh = wtap_dump_open_ng(outfile, wtap_file_type_subtype(wth), wtap_file_encap(wth),
65535, FALSE, shb_hdr, idb_inf, &err);
g_free(idb_inf);
if (pdh == NULL) {

View File

@ -221,13 +221,13 @@ list_capture_types(void) {
struct string_elem *captypes;
GSList *list = NULL;
captypes = g_new(struct string_elem, WTAP_NUM_FILE_TYPES);
captypes = g_new(struct string_elem, WTAP_NUM_FILE_TYPES_SUBTYPES);
fprintf(stderr, "tshark: The available capture file types for the \"-F\" flag are:\n");
for (i = 0; i < WTAP_NUM_FILE_TYPES; i++) {
for (i = 0; i < WTAP_NUM_FILE_TYPES_SUBTYPES; i++) {
if (wtap_dump_can_open(i)) {
captypes[i].sstr = wtap_file_type_short_string(i);
captypes[i].lstr = wtap_file_type_string(i);
captypes[i].sstr = wtap_file_type_subtype_short_string(i);
captypes[i].lstr = wtap_file_type_subtype_string(i);
list = g_slist_insert_sorted(list, &captypes[i], string_compare);
}
}
@ -915,9 +915,9 @@ main(int argc, char *argv[])
#endif
gboolean quiet = FALSE;
#ifdef PCAP_NG_DEFAULT
volatile int out_file_type = WTAP_FILE_PCAPNG;
volatile int out_file_type = WTAP_FILE_TYPE_SUBTYPE_PCAPNG;
#else
volatile int out_file_type = WTAP_FILE_PCAP;
volatile int out_file_type = WTAP_FILE_TYPE_SUBTYPE_PCAP;
#endif
volatile gboolean out_file_name_res = FALSE;
gchar *volatile cf_name = NULL;
@ -1314,7 +1314,7 @@ main(int argc, char *argv[])
}
break;
case 'F':
out_file_type = wtap_short_string_to_file_type(optarg);
out_file_type = wtap_short_string_to_file_type_subtype(optarg);
if (out_file_type < 0) {
cmdarg_err("\"%s\" isn't a valid capture file type", optarg);
list_capture_types();
@ -1735,11 +1735,13 @@ main(int argc, char *argv[])
/* They specified a "-w" flag, so we'll be saving to a capture file. */
/* When capturing, we only support writing pcap or pcap-ng format. */
if (out_file_type != WTAP_FILE_PCAP && out_file_type != WTAP_FILE_PCAPNG) {
if (out_file_type != WTAP_FILE_TYPE_SUBTYPE_PCAP &&
out_file_type != WTAP_FILE_TYPE_SUBTYPE_PCAPNG) {
cmdarg_err("Live captures can only be saved in libpcap format.");
return 1;
}
if (global_capture_opts.capture_comment && out_file_type != WTAP_FILE_PCAPNG) {
if (global_capture_opts.capture_comment &&
out_file_type != WTAP_FILE_TYPE_SUBTYPE_PCAPNG) {
cmdarg_err("A capture comment can only be written to a pcapng file.");
return 1;
}
@ -2997,7 +2999,8 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type,
shb_hdr->shb_user_appl = appname;
}
if (linktype != WTAP_ENCAP_PER_PACKET && out_file_type == WTAP_FILE_PCAP)
if (linktype != WTAP_ENCAP_PER_PACKET &&
out_file_type == WTAP_FILE_TYPE_SUBTYPE_PCAP)
pdh = wtap_dump_open(save_file, out_file_type, linktype,
snapshot_length, FALSE /* compressed */, &err);
else
@ -3018,7 +3021,7 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type,
case WTAP_ERR_UNSUPPORTED_ENCAP:
case WTAP_ERR_ENCAP_PER_PACKET_UNSUPPORTED:
cmdarg_err("The capture file being read can't be written as a "
"\"%s\" file.", wtap_file_type_short_string(out_file_type));
"\"%s\" file.", wtap_file_type_subtype_short_string(out_file_type));
break;
case WTAP_ERR_CANT_OPEN:
@ -3054,7 +3057,7 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type,
if (pdh && out_file_name_res) {
if (!wtap_dump_set_addrinfo_list(pdh, get_addrinfo_list())) {
cmdarg_err("The file format \"%s\" doesn't support name resolution information.",
wtap_file_type_short_string(out_file_type));
wtap_file_type_subtype_short_string(out_file_type));
}
}
@ -3155,7 +3158,7 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type,
fprintf(stderr,
"Frame %u of \"%s\" has a network type that can't be saved in a \"%s\" file.\n",
framenum, cf->filename,
wtap_file_type_short_string(out_file_type));
wtap_file_type_subtype_short_string(out_file_type));
break;
default:
@ -3219,7 +3222,7 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type,
fprintf(stderr,
"Frame %u of \"%s\" has a network type that can't be saved in a \"%s\" file.\n",
framenum, cf->filename,
wtap_file_type_short_string(out_file_type));
wtap_file_type_subtype_short_string(out_file_type));
break;
default:
@ -3886,7 +3889,7 @@ cf_open(capture_file *cf, const char *fname, gboolean is_tempfile, int *err)
/* No user changes yet. */
cf->unsaved_changes = FALSE;
cf->cd_t = wtap_file_type(cf->wth);
cf->cd_t = wtap_file_type_subtype(cf->wth);
cf->count = 0;
cf->drops_known = FALSE;
cf->drops = 0;
@ -4024,7 +4027,7 @@ cf_open_error_message(int err, gchar *err_info, gboolean for_writing,
/* Seen only when opening a capture file for writing. */
g_snprintf(errmsg_errno, sizeof(errmsg_errno),
"The file \"%%s\" is a pipe, and \"%s\" capture files can't be "
"written to a pipe.", wtap_file_type_short_string(file_type));
"written to a pipe.", wtap_file_type_subtype_short_string(file_type));
errmsg = errmsg_errno;
break;
@ -4037,7 +4040,7 @@ cf_open_error_message(int err, gchar *err_info, gboolean for_writing,
if (for_writing) {
g_snprintf(errmsg_errno, sizeof(errmsg_errno),
"TShark can't save this capture as a \"%s\" file.",
wtap_file_type_short_string(file_type));
wtap_file_type_subtype_short_string(file_type));
} else {
g_snprintf(errmsg_errno, sizeof(errmsg_errno),
"The file \"%%s\" is a capture for a network type that TShark doesn't support.\n"
@ -4051,7 +4054,7 @@ cf_open_error_message(int err, gchar *err_info, gboolean for_writing,
if (for_writing) {
g_snprintf(errmsg_errno, sizeof(errmsg_errno),
"TShark can't save this capture as a \"%s\" file.",
wtap_file_type_short_string(file_type));
wtap_file_type_subtype_short_string(file_type));
errmsg = errmsg_errno;
} else
errmsg = "The file \"%s\" is a capture for a network type that TShark doesn't support.";

View File

@ -162,7 +162,7 @@ preview_set_filename(GtkWidget *prev, const gchar *cf_name)
gtk_label_set_text(GTK_LABEL(label), string_buff);
/* type */
g_strlcpy(string_buff, wtap_file_type_string(wtap_file_type(wth)), PREVIEW_STR_MAX);
g_strlcpy(string_buff, wtap_file_type_subtype_string(wtap_file_type_subtype(wth)), PREVIEW_STR_MAX);
label = (GtkWidget *)g_object_get_data(G_OBJECT(prev), PREVIEW_FORMAT_KEY);
gtk_label_set_text(GTK_LABEL(label), string_buff);
@ -1483,7 +1483,7 @@ set_file_type_list(GtkWidget *combo_box, capture_file *cf,
gboolean must_support_all_comments)
{
guint32 required_comment_types;
GArray *savable_file_types;
GArray *savable_file_types_subtypes;
guint i;
int ft;
int default_ft = -1;
@ -1495,22 +1495,23 @@ set_file_type_list(GtkWidget *combo_box, capture_file *cf,
required_comment_types = 0; /* none of them */
/* What types of file can we save this file as? */
savable_file_types = wtap_get_savable_file_types(cf->cd_t, cf->linktypes,
required_comment_types);
savable_file_types_subtypes = wtap_get_savable_file_types_subtypes(cf->cd_t,
cf->linktypes,
required_comment_types);
if (savable_file_types != NULL) {
if (savable_file_types_subtypes != NULL) {
/* OK, we have at least one file type we can save this file as.
(If we didn't, we shouldn't have gotten here in the first
place.) Add them all to the combo box. */
for (i = 0; i < savable_file_types->len; i++) {
ft = g_array_index(savable_file_types, int, i);
for (i = 0; i < savable_file_types_subtypes->len; i++) {
ft = g_array_index(savable_file_types_subtypes, int, i);
if (default_ft == -1)
default_ft = ft; /* first file type is the default */
ws_combo_box_append_text_and_pointer(GTK_COMBO_BOX(combo_box),
wtap_file_type_string(ft),
wtap_file_type_subtype_string(ft),
GINT_TO_POINTER(ft));
}
g_array_free(savable_file_types, TRUE);
g_array_free(savable_file_types_subtypes, TRUE);
}
return default_ft;

View File

@ -215,7 +215,7 @@ dnd_open_file_cmd(gchar *cf_names_freeme)
/* merge the files in chronological order */
tmpname = NULL;
if (cf_merge_files(&tmpname, in_file_count, in_filenames,
WTAP_FILE_PCAP, FALSE) == CF_OK) {
WTAP_FILE_TYPE_SUBTYPE_PCAP, FALSE) == CF_OK) {
/* Merge succeeded; close the currently-open file and try
to open the merged capture file. */
cf_close(&cfile);

View File

@ -180,7 +180,7 @@ exp_pdu_file_open(exp_pdu_t *exp_pdu_tap_data)
g_array_append_val(idb_inf->interface_data, int_data);
exp_pdu_tap_data->wdh = wtap_dump_fdopen_ng(import_file_fd, WTAP_FILE_PCAPNG, WTAP_ENCAP_WIRESHARK_UPPER_PDU, WTAP_MAX_PACKET_SIZE, FALSE, shb_hdr, idb_inf, &err);
exp_pdu_tap_data->wdh = wtap_dump_fdopen_ng(import_file_fd, WTAP_FILE_TYPE_SUBTYPE_PCAPNG, WTAP_ENCAP_WIRESHARK_UPPER_PDU, WTAP_MAX_PACKET_SIZE, FALSE, shb_hdr, idb_inf, &err);
if (exp_pdu_tap_data->wdh == NULL) {
open_failure_alert_box(capfile_name, err, TRUE);
goto end;

View File

@ -516,7 +516,7 @@ file_import_open(text_import_info_t *info)
g_array_append_val(idb_inf->interface_data, int_data);
info->wdh = wtap_dump_fdopen_ng(import_file_fd, WTAP_FILE_PCAPNG, info->encapsulation, info->max_frame_length, FALSE, shb_hdr, idb_inf, &err);
info->wdh = wtap_dump_fdopen_ng(import_file_fd, WTAP_FILE_TYPE_SUBTYPE_PCAPNG, info->encapsulation, info->max_frame_length, FALSE, shb_hdr, idb_inf, &err);
if (info->wdh == NULL) {
open_failure_alert_box(capfile_name, err, TRUE);
fclose(info->import_text_file);

View File

@ -114,7 +114,7 @@ void gsm_map_stat_gtk_sum_cb(GtkAction *action _U_, gpointer user_data _U_)
add_string_to_box(string_buff, file_box);
/* format */
g_snprintf(string_buff, SUM_STR_MAX, "Format: %s", wtap_file_type_string(summary.file_type));
g_snprintf(string_buff, SUM_STR_MAX, "Format: %s", wtap_file_type_subtype_string(summary.file_type));
add_string_to_box(string_buff, file_box);
if (summary.has_snap) {

View File

@ -316,7 +316,7 @@ mtp3_sum_gtk_sum_cb(GtkAction *action _U_, gpointer user_data _U_)
add_string_to_box(string_buff, file_box);
/* format */
file_type = wtap_file_type_string(summary.file_type);
file_type = wtap_file_type_subtype_string(summary.file_type);
g_snprintf(string_buff, SUM_STR_MAX, "Format: %s", (file_type ? file_type : "N/A"));
add_string_to_box(string_buff, file_box);

View File

@ -269,7 +269,7 @@ summary_open_cb(GtkWidget *w _U_, gpointer d _U_)
/* format */
g_snprintf(string_buff, SUM_STR_MAX, "%s%s",
wtap_file_type_string(summary.file_type),
wtap_file_type_subtype_string(summary.file_type),
summary.iscompressed? " (gzip compressed)" : "");
add_string_to_grid(grid, &row, "Format:", string_buff);
@ -716,7 +716,7 @@ summary_to_texbuff(GtkTextBuffer *buffer)
/* format */
g_snprintf(string_buff, SUM_STR_MAX, INDENT "Format: %s%s",
wtap_file_type_string(summary.file_type),
wtap_file_type_subtype_string(summary.file_type),
summary.iscompressed? " (gzip compressed)\n" : "\n");
gtk_text_buffer_insert_at_cursor (buffer, string_buff, -1);

View File

@ -334,7 +334,7 @@ QString CaptureFileDialog::fileType(int ft, bool extension_globs)
QString filter;
GSList *extensions_list;
filter = wtap_file_type_string(ft);
filter = wtap_file_type_subtype_string(ft);
if (!extension_globs) {
return filter;
@ -672,7 +672,7 @@ int CaptureFileDialog::merge(QString &file_name) {
QStringList CaptureFileDialog::buildFileSaveAsTypeList(bool must_support_all_comments) {
QStringList filters;
guint32 required_comment_types;
GArray *savable_file_types;
GArray *savable_file_types_subtypes;
guint i;
type_hash_.clear();
@ -684,25 +684,25 @@ QStringList CaptureFileDialog::buildFileSaveAsTypeList(bool must_support_all_com
required_comment_types = 0; /* none of them */
/* What types of file can we save this file as? */
savable_file_types = wtap_get_savable_file_types(cap_file_->cd_t,
cap_file_->linktypes,
required_comment_types);
savable_file_types_subtypes = wtap_get_savable_file_types_subtypes(cap_file_->cd_t,
cap_file_->linktypes,
required_comment_types);
if (savable_file_types != NULL) {
if (savable_file_types_subtypes != NULL) {
QString file_type;
int ft;
/* OK, we have at least one file type we can save this file as.
(If we didn't, we shouldn't have gotten here in the first
place.) Add them all to the combo box. */
for (i = 0; i < savable_file_types->len; i++) {
ft = g_array_index(savable_file_types, int, i);
for (i = 0; i < savable_file_types_subtypes->len; i++) {
ft = g_array_index(savable_file_types_subtypes, int, i);
if (default_ft_ < 1)
default_ft_ = ft; /* first file type is the default */
file_type = fileType(ft);
filters << file_type;
type_hash_[file_type] = ft;
}
g_array_free(savable_file_types, TRUE);
g_array_free(savable_file_types_subtypes, TRUE);
}
return filters;
@ -777,7 +777,7 @@ void CaptureFileDialog::preview(const QString & path)
}
// Format
preview_format_.setText(QString::fromUtf8(wtap_file_type_string(wtap_file_type(wth))));
preview_format_.setText(QString::fromUtf8(wtap_file_type_subtype_string(wtap_file_type_subtype(wth))));
// Size
preview_size_.setText(QString(tr("%1 bytes")).arg(wtap_file_size(wth, &err)));

View File

@ -122,7 +122,7 @@ void ImportTextDialog::convertTextFile() {
import_file_fd = create_tempfile(&tmpname, "import");
capfile_name_.append(tmpname);
import_info_.wdh = wtap_dump_fdopen(import_file_fd, WTAP_FILE_PCAP, import_info_.encapsulation, import_info_.max_frame_length, FALSE, &err);
import_info_.wdh = wtap_dump_fdopen(import_file_fd, WTAP_FILE_TYPE_SUBTYPE_PCAP, import_info_.encapsulation, import_info_.max_frame_length, FALSE, &err);
qDebug() << capfile_name_ << ":" << import_info_.wdh << import_info_.encapsulation << import_info_.max_frame_length;
if (import_info_.wdh == NULL) {
open_failure_alert_box(capfile_name_.toUtf8().constData(), err, TRUE);

View File

@ -134,7 +134,7 @@ QString SummaryDialog::SummaryToString()
out << "\t" << tr("Name:\t\t%1\n").arg(summary_.filename);
out << "\t" << tr("Length:\t\t%1 bytes\n").arg(summary_.file_length);
out << "\t" << tr("Format:\t\t%1%2\n")
.arg(wtap_file_type_string(summary_.file_type))
.arg(wtap_file_type_subtype_string(summary_.file_type))
.arg(summary_.iscompressed? tr(" (gzip compressed)") : "");
out << "\t" << tr("Encapsulation:\t\t%1\n").arg(ui->lEncapsulation->text());
@ -281,7 +281,7 @@ void SummaryDialog::UpdateValues()
ui->lLength->setText(QString(tr("%1 bytes (%2 Mbytes)")).arg((ulong)summary_.file_length).arg((float)summary_.file_length/1048576));
/* format */
ui->lFormat->setText(QString("%1%2").arg(wtap_file_type_string(summary_.file_type), summary_.iscompressed? tr(" (gzip compressed)") : ""));
ui->lFormat->setText(QString("%1%2").arg(wtap_file_type_subtype_string(summary_.file_type), summary_.iscompressed? tr(" (gzip compressed)") : ""));
/* encapsulation */
if (summary_.file_encap_type == WTAP_ENCAP_PER_PACKET)

View File

@ -183,7 +183,7 @@ int _5views_open(wtap *wth, int *err, gchar **err_info)
}
/* This is a 5views capture file */
wth->file_type = WTAP_FILE_5VIEWS;
wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_5VIEWS;
wth->subtype_read = _5views_read;
wth->subtype_seek_read = _5views_seek_read;
wth->file_encap = encap;

View File

@ -152,7 +152,7 @@ int aethra_open(wtap *wth, int *err, gchar **err_info)
*err = WTAP_ERR_SHORT_READ;
return -1;
}
wth->file_type = WTAP_FILE_AETHRA;
wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_AETHRA;
aethra = (aethra_t *)g_malloc(sizeof(aethra_t));
wth->priv = (void *)aethra;
wth->subtype_read = aethra_read;

View File

@ -182,7 +182,7 @@ int ascend_open(wtap *wth, int *err, gchar **err_info)
return 0;
}
wth->file_type = WTAP_FILE_ASCEND;
wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_ASCEND;
switch(wth->phdr.pseudo_header.ascend.type) {
case ASCEND_PFX_ISDN_X:

View File

@ -176,7 +176,7 @@ int ber_open(wtap *wth, int *err, gchar **err_info)
if (file_seek(wth->fh, 0, SEEK_SET, err) == -1)
return -1;
wth->file_type = WTAP_FILE_BER;
wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_BER;
wth->file_encap = WTAP_ENCAP_BER;
wth->snapshot_length = 0;

View File

@ -148,7 +148,7 @@ int btsnoop_open(wtap *wth, int *err, gchar **err_info)
wth->file_encap = file_encap;
wth->snapshot_length = 0; /* not available in header */
wth->tsprecision = WTAP_FILE_TSPREC_USEC;
wth->file_type = WTAP_FILE_BTSNOOP;
wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_BTSNOOP;
return 1;
}
@ -381,9 +381,9 @@ gboolean btsnoop_dump_open_h1(wtap_dumper *wdh, int *err)
wdh->subtype_close = NULL;
/* Write the file header. */
switch (wdh->file_type) {
switch (wdh->file_type_subtype) {
case WTAP_FILE_BTSNOOP:
case WTAP_FILE_TYPE_SUBTYPE_BTSNOOP:
wdh->tsprecision = WTAP_FILE_TSPREC_USEC;
break;
@ -423,9 +423,9 @@ gboolean btsnoop_dump_open_h4(wtap_dumper *wdh, int *err)
wdh->subtype_close = NULL;
/* Write the file header. */
switch (wdh->file_type) {
switch (wdh->file_type_subtype) {
case WTAP_FILE_BTSNOOP:
case WTAP_FILE_TYPE_SUBTYPE_BTSNOOP:
wdh->tsprecision = WTAP_FILE_TSPREC_USEC;
break;

View File

@ -356,7 +356,7 @@ int camins_open(wtap *wth, int *err, gchar **err_info _U_)
wth->subtype_read = camins_read;
wth->subtype_seek_read = camins_seek_read;
wth->file_type = WTAP_FILE_CAMINS;
wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_CAMINS;
*err = 0;
return 1;

View File

@ -252,7 +252,7 @@ catapult_dct2000_open(wtap *wth, int *err, gchar **err_info)
/* File is for us. Fill in details so packets can be read */
/* Set our file type */
wth->file_type = WTAP_FILE_CATAPULT_DCT2000;
wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_CATAPULT_DCT2000;
/* Use our own encapsulation to send all packets to our stub dissector */
wth->file_encap = WTAP_ENCAP_CATAPULT_DCT2000;

View File

@ -124,7 +124,7 @@ int commview_open(wtap *wth, int *err, gchar **err_info)
wth->subtype_read = commview_read;
wth->subtype_seek_read = commview_seek_read;
wth->file_type = WTAP_FILE_COMMVIEW;
wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_COMMVIEW;
wth->file_encap = WTAP_ENCAP_PER_PACKET;
wth->tsprecision = WTAP_FILE_TSPREC_USEC;

View File

@ -279,7 +279,7 @@ int cosine_open(wtap *wth, int *err, gchar **err_info)
return -1;
wth->file_encap = WTAP_ENCAP_COSINE;
wth->file_type = WTAP_FILE_COSINE;
wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_COSINE;
wth->snapshot_length = 0; /* not known */
wth->subtype_read = cosine_read;
wth->subtype_seek_read = cosine_seek_read;

View File

@ -137,7 +137,7 @@ int csids_open(wtap *wth, int *err, gchar **err_info)
wth->priv = (void *)csids;
csids->byteswapped = byteswap;
wth->file_encap = WTAP_ENCAP_RAW_IP;
wth->file_type = WTAP_FILE_CSIDS;
wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_CSIDS;
wth->snapshot_length = 0; /* not known */
wth->subtype_read = csids_read;
wth->subtype_seek_read = csids_seek_read;

View File

@ -127,7 +127,7 @@ int daintree_sna_open(wtap *wth, int *err, gchar **err_info)
wth->subtype_seek_read = daintree_sna_seek_read;
/* set up for file type */
wth->file_type = WTAP_FILE_DAINTREE_SNA;
wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_DAINTREE_SNA;
wth->file_encap = WTAP_ENCAP_IEEE802_15_4_NOFCS;
wth->tsprecision = WTAP_FILE_TSPREC_USEC;
wth->snapshot_length = 0; /* not available in header */

View File

@ -189,7 +189,7 @@ int dbs_etherwatch_open(wtap *wth, int *err, gchar **err_info)
}
wth->file_encap = WTAP_ENCAP_ETHERNET;
wth->file_type = WTAP_FILE_DBS_ETHERWATCH;
wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_DBS_ETHERWATCH;
wth->snapshot_length = 0; /* not known */
wth->subtype_read = dbs_etherwatch_read;
wth->subtype_seek_read = dbs_etherwatch_seek_read;

View File

@ -180,7 +180,7 @@ int dct3trace_open(wtap *wth, int *err, gchar **err_info)
}
wth->file_encap = WTAP_ENCAP_GSM_UM;
wth->file_type = WTAP_FILE_DCT3TRACE;
wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_DCT3TRACE;
wth->snapshot_length = 0; /* not known */
wth->subtype_read = dct3trace_read;
wth->subtype_seek_read = dct3trace_seek_read;

View File

@ -265,7 +265,7 @@ extern int erf_open(wtap *wth, int *err, gchar **err_info)
}
/* This is an ERF file */
wth->file_type = WTAP_FILE_ERF;
wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_ERF;
wth->snapshot_length = 0; /* not available in header, only in frame */
/*
@ -702,8 +702,8 @@ int erf_dump_open(wtap_dumper *wdh, int *err)
wdh->subtype_write = erf_dump;
wdh->subtype_close = NULL;
switch(wdh->file_type){
case WTAP_FILE_ERF:
switch(wdh->file_type_subtype){
case WTAP_FILE_TYPE_SUBTYPE_ERF:
wdh->tsprecision = WTAP_FILE_TSPREC_NSEC;
break;
default:

View File

@ -142,7 +142,7 @@ int eyesdn_open(wtap *wth, int *err, gchar **err_info)
return 0;
wth->file_encap = WTAP_ENCAP_PER_PACKET;
wth->file_type = WTAP_FILE_EYESDN;
wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_EYESDN;
wth->snapshot_length = 0; /* not known */
wth->subtype_read = eyesdn_read;
wth->subtype_seek_read = eyesdn_seek_read;

View File

@ -603,7 +603,7 @@ success:
wth->frame_buffer = (struct Buffer *)g_malloc(sizeof(struct Buffer));
buffer_init(wth->frame_buffer, 1500);
if(wth->file_type == WTAP_FILE_PCAP){
if(wth->file_type_subtype == WTAP_FILE_TYPE_SUBTYPE_PCAP){
wtapng_if_descr_t descr;
@ -694,300 +694,300 @@ wtap_fdreopen(wtap *wth, const char *filename, int *err)
}
/* Table of the file types we know about.
Entries must be sorted by WTAP_FILE_xxx values in ascending order */
static const struct file_type_info dump_open_table_base[] = {
/* WTAP_FILE_UNKNOWN (only used internally for initialization) */
Entries must be sorted by WTAP_FILE_TYPE_SUBTYPE_xxx values in ascending order */
static const struct file_type_subtype_info dump_open_table_base[] = {
/* WTAP_FILE_TYPE_SUBTYPE_UNKNOWN (only used internally for initialization) */
{ NULL, NULL, NULL, NULL,
FALSE, FALSE, 0,
NULL, NULL },
/* WTAP_FILE_PCAP */
/* WTAP_FILE_TYPE_SUBTYPE_PCAP */
/* Gianluca Varenni suggests that we add "deprecated" to the description. */
{ "Wireshark/tcpdump/... - pcap", "pcap", "pcap", "cap;dmp",
FALSE, FALSE, 0,
libpcap_dump_can_write_encap, libpcap_dump_open },
/* WTAP_FILE_PCAPNG */
/* WTAP_FILE_TYPE_SUBTYPE_PCAPNG */
{ "Wireshark/... - pcapng", "pcapng", "pcapng", "ntar",
FALSE, TRUE, WTAP_COMMENT_PER_SECTION|WTAP_COMMENT_PER_INTERFACE|WTAP_COMMENT_PER_PACKET,
pcapng_dump_can_write_encap, pcapng_dump_open },
/* WTAP_FILE_PCAP_NSEC */
/* WTAP_FILE_TYPE_SUBTYPE_PCAP_NSEC */
{ "Wireshark - nanosecond libpcap", "nseclibpcap", "pcap", "cap;dmp",
FALSE, FALSE, 0,
libpcap_dump_can_write_encap, libpcap_dump_open },
/* WTAP_FILE_PCAP_AIX */
/* WTAP_FILE_TYPE_SUBTYPE_PCAP_AIX */
{ "AIX tcpdump - libpcap", "aixlibpcap", "pcap", "cap;dmp",
FALSE, FALSE, 0,
NULL, NULL },
/* WTAP_FILE_PCAP_SS991029 */
/* WTAP_FILE_TYPE_SUBTYPE_PCAP_SS991029 */
{ "Modified tcpdump - libpcap", "modlibpcap", "pcap", "cap;dmp",
FALSE, FALSE, 0,
libpcap_dump_can_write_encap, libpcap_dump_open },
/* WTAP_FILE_PCAP_NOKIA */
/* WTAP_FILE_TYPE_SUBTYPE_PCAP_NOKIA */
{ "Nokia tcpdump - libpcap ", "nokialibpcap", "pcap", "cap;dmp",
FALSE, FALSE, 0,
libpcap_dump_can_write_encap, libpcap_dump_open },
/* WTAP_FILE_PCAP_SS990417 */
/* WTAP_FILE_TYPE_SUBTYPE_PCAP_SS990417 */
{ "RedHat 6.1 tcpdump - libpcap", "rh6_1libpcap", "pcap", "cap;dmp",
FALSE, FALSE, 0,
libpcap_dump_can_write_encap, libpcap_dump_open },
/* WTAP_FILE_PCAP_SS990915 */
/* WTAP_FILE_TYPE_SUBTYPE_PCAP_SS990915 */
{ "SuSE 6.3 tcpdump - libpcap", "suse6_3libpcap", "pcap", "cap;dmp",
FALSE, FALSE, 0,
libpcap_dump_can_write_encap, libpcap_dump_open },
/* WTAP_FILE_5VIEWS */
/* WTAP_FILE_TYPE_SUBTYPE_5VIEWS */
{ "InfoVista 5View capture", "5views", "5vw", NULL,
TRUE, FALSE, 0,
_5views_dump_can_write_encap, _5views_dump_open },
/* WTAP_FILE_IPTRACE_1_0 */
/* WTAP_FILE_TYPE_SUBTYPE_IPTRACE_1_0 */
{ "AIX iptrace 1.0", "iptrace_1", NULL, NULL,
FALSE, FALSE, 0,
NULL, NULL },
/* WTAP_FILE_IPTRACE_2_0 */
/* WTAP_FILE_TYPE_SUBTYPE_IPTRACE_2_0 */
{ "AIX iptrace 2.0", "iptrace_2", NULL, NULL,
FALSE, FALSE, 0,
NULL, NULL },
/* WTAP_FILE_BER */
/* WTAP_FILE_TYPE_SUBTYPE_BER */
{ "ASN.1 Basic Encoding Rules", "ber", NULL, NULL,
FALSE, FALSE, 0,
NULL, NULL },
/* WTAP_FILE_HCIDUMP */
/* WTAP_FILE_TYPE_SUBTYPE_HCIDUMP */
{ "Bluetooth HCI dump", "hcidump", NULL, NULL,
FALSE, FALSE, 0,
NULL, NULL },
/* WTAP_FILE_CATAPULT_DCT2000 */
/* WTAP_FILE_TYPE_SUBTYPE_CATAPULT_DCT2000 */
{ "Catapult DCT2000 trace (.out format)", "dct2000", "out", NULL,
FALSE, FALSE, 0,
catapult_dct2000_dump_can_write_encap, catapult_dct2000_dump_open },
/* WTAP_FILE_NETXRAY_OLD */
/* WTAP_FILE_TYPE_SUBTYPE_NETXRAY_OLD */
{ "Cinco Networks NetXRay 1.x", "netxray1", "cap", NULL,
TRUE, FALSE, 0,
NULL, NULL },
/* WTAP_FILE_NETXRAY_1_0 */
/* WTAP_FILE_TYPE_SUBTYPE_NETXRAY_1_0 */
{ "Cinco Networks NetXRay 2.0 or later", "netxray2", "cap", NULL,
TRUE, FALSE, 0,
NULL, NULL },
/* WTAP_FILE_COSINE */
/* WTAP_FILE_TYPE_SUBTYPE_COSINE */
{ "CoSine IPSX L2 capture", "cosine", "txt", NULL,
FALSE, FALSE, 0,
NULL, NULL },
/* WTAP_FILE_CSIDS */
/* WTAP_FILE_TYPE_SUBTYPE_CSIDS */
{ "CSIDS IPLog", "csids", NULL, NULL,
FALSE, FALSE, 0,
NULL, NULL },
/* WTAP_FILE_DBS_ETHERWATCH */
/* WTAP_FILE_TYPE_SUBTYPE_DBS_ETHERWATCH */
{ "DBS Etherwatch (VMS)", "etherwatch", "txt", NULL,
FALSE, FALSE, 0,
NULL, NULL},
/* WTAP_FILE_ERF */
/* WTAP_FILE_TYPE_SUBTYPE_ERF */
{ "Endace ERF capture", "erf", "erf", NULL,
FALSE, FALSE, 0,
erf_dump_can_write_encap, erf_dump_open },
/* WTAP_FILE_EYESDN */
/* WTAP_FILE_TYPE_SUBTYPE_EYESDN */
{ "EyeSDN USB S0/E1 ISDN trace format", "eyesdn", "trc", NULL,
FALSE, FALSE, 0,
eyesdn_dump_can_write_encap, eyesdn_dump_open },
/* WTAP_FILE_NETTL */
/* WTAP_FILE_TYPE_SUBTYPE_NETTL */
{ "HP-UX nettl trace", "nettl", "trc0", "trc1",
FALSE, FALSE, 0,
nettl_dump_can_write_encap, nettl_dump_open },
/* WTAP_FILE_ISERIES */