diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 1999-12-04 08:32:14 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 1999-12-04 08:32:14 +0000 |
commit | a523458070a789d76e0cc4faf65a18a9afdced7b (patch) | |
tree | 04954b5a0f08b5ad2fc7e3d49b9655f605e0a9d2 /wiretap/wtap.c | |
parent | c8bf50f50b0cb630ef8d38b551e1eb385b86c283 (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.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1200 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'wiretap/wtap.c')
-rw-r--r-- | wiretap/wtap.c | 62 |
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", |