aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>1999-01-07 16:15:37 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>1999-01-07 16:15:37 +0000
commit7757b2e72b9b84d1262acdd61124f450fb0199f8 (patch)
tree8602e5907bc45a8c177a131334bde39f7b60137a /file.c
parentf8046a1f2976386b093d24b69c6b934c21107dad (diff)
I removed the per-file encapsulation type from wiretap, and make all filetypes
provide a per-packet encapsulation type. this required minor modifications to ethereal. svn path=/trunk/; revision=162
Diffstat (limited to 'file.c')
-rw-r--r--file.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/file.c b/file.c
index e8cb5ae7b8..36bc5b7b80 100644
--- a/file.c
+++ b/file.c
@@ -1,7 +1,7 @@
/* file.c
* File I/O routines
*
- * $Id: file.c,v 1.17 1999/01/03 01:57:24 guy Exp $
+ * $Id: file.c,v 1.18 1999/01/07 16:15:34 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -114,7 +114,6 @@ open_cap_file(char *fname, capture_file *cf) {
/* Next, find out what type of file we're dealing with */
#ifdef WITH_WIRETAP
cf->cd_t = WTAP_FILE_UNKNOWN;
- cf->lnk_t = WTAP_ENCAP_NONE;
#else
cf->cd_t = CD_UNKNOWN;
cf->lnk_t = DLT_NULL;
@@ -185,7 +184,6 @@ open_cap_file(char *fname, capture_file *cf) {
cf->fh = wtap_file(cf->wth);
cf->cd_t = wtap_file_type(cf->wth);
cf->snap = wtap_snapshot_length(cf->wth);
- cf->lnk_t = wtap_encapsulation(cf->wth);
#endif
return 0;
@@ -325,14 +323,12 @@ pcap_dispatch_cb(u_char *user, const struct pcap_pkthdr *phdr,
fdata->cap_len = phdr->caplen;
#ifdef WITH_WIRETAP
fdata->file_off = offset;
+ fdata->lnk_t = phdr->pkt_encap;
#else
fdata->file_off = ftell(cf->fh) - phdr->caplen;
#endif
fdata->abs_secs = phdr->ts.tv_sec;
fdata->abs_usecs = phdr->ts.tv_usec;
-#ifdef WITH_WIRETAP
- fdata->lnk_t = phdr->pkt_encap;
-#endif
/* If we don't have the time stamp of the first packet, it's because this
is the first packet. Save the time stamp of this packet as the time