aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/wtap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>1999-12-04 08:32:14 +0000
committerGuy Harris <guy@alum.mit.edu>1999-12-04 08:32:14 +0000
commit3b935744025f3f4fc3e1d7e6f30850f267fc04ce (patch)
tree04954b5a0f08b5ad2fc7e3d49b9655f605e0a9d2 /wiretap/wtap.c
parentc5447af40a29b86c35bcca65bd1c1da9e3b9de51 (diff)
Add some infrastructure for the use of Ethereal, so it can make a list
of all the file types in which a file can be saved. Giving each dumpable file type a routine that checks whether a file of a given file type and encapsulation can be written lets us hoist some checks into common code from out of the open routines. If the "dump close" routine for a dump stream is NULL, have that mean that there's no action that needs to be taken on a close by the code to handle that file type; some file types don't need that, as they can be written purely sequentially. svn path=/trunk/; revision=1200
Diffstat (limited to 'wiretap/wtap.c')
-rw-r--r--wiretap/wtap.c62
1 files changed, 1 insertions, 61 deletions
diff --git a/wiretap/wtap.c b/wiretap/wtap.c
index c141bb9693..85afa247d4 100644
--- a/wiretap/wtap.c
+++ b/wiretap/wtap.c
@@ -1,6 +1,6 @@
/* wtap.c
*
- * $Id: wtap.c,v 1.31 1999/11/26 17:57:14 gram Exp $
+ * $Id: wtap.c,v 1.32 1999/12/04 08:32:13 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@verdict.uthscsa.edu>
@@ -57,66 +57,6 @@ int wtap_file_encap(wtap *wth)
return wth->file_encap;
}
-const char *wtap_file_type_string(wtap *wth)
-{
- switch (wth->file_type) {
- case WTAP_FILE_WTAP:
- return "wiretap";
-
- case WTAP_FILE_PCAP:
- return "pcap";
-
- case WTAP_FILE_PCAP_MODIFIED:
- return "pcap-modified";
-
- case WTAP_FILE_LANALYZER:
- return "Novell LANalyzer";
-
- case WTAP_FILE_NGSNIFFER:
- return "Network Associates Sniffer (DOS-based)";
-
- case WTAP_FILE_SNOOP:
- return "snoop";
-
- case WTAP_FILE_IPTRACE_1_0:
- return "AIX iptrace 1.0";
-
- case WTAP_FILE_IPTRACE_2_0:
- return "AIX iptrace 2.0";
-
- case WTAP_FILE_NETMON_1_x:
- return "Microsoft Network Monitor 1.x";
-
- case WTAP_FILE_NETMON_2_x:
- return "Microsoft Network Monitor 2.x";
-
- case WTAP_FILE_NETXRAY_1_0:
- return "Cinco Networks NetXRay";
-
- case WTAP_FILE_NETXRAY_1_1:
- return "Network Associates Sniffer (Windows-based) 1.1";
-
- case WTAP_FILE_NETXRAY_2_001:
- return "Network Associates Sniffer (Windows-based) 2.001";
-
- case WTAP_FILE_RADCOM:
- return "RADCOM WAN/LAN analyzer";
-
- case WTAP_FILE_ASCEND:
- return "Lucent/Ascend access server trace";
-
- case WTAP_FILE_NETTL:
- return "HP-UX nettl trace";
-
- case WTAP_FILE_TOSHIBA:
- return "Toshiba Compact ISDN Router snoop trace";
-
- default:
- g_error("Unknown capture file type %d", wth->file_type);
- return NULL;
- }
-}
-
static const char *wtap_errlist[] = {
"The file isn't a plain file",
"The file isn't a capture file in a known format",