aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
AgeCommit message (Collapse)AuthorFilesLines
1999-10-19A fix, from Olivier, to the previous patch.Guy Harris1-3/+3
svn path=/trunk/; revision=885
1999-10-18Add Gerald Combs to the list of contributors; he added the Ascend/LucentGuy Harris1-1/+1
capture file code. Add Ashok Narayanan to the list of contributors; he added the code to read compressed files. svn path=/trunk/; revision=880
1999-10-18Olivier Abad's patches to add:Guy Harris6-6/+192
more display filters for X.25; no LCN in X.25 RESTART / DIAGNOSTIC / REGISTRATION packets; support for nettl file format (nettl is a trace tool for HP-UX). For now, it only supports traces for X.25 interfaces (tested with HP-UX 10.20). svn path=/trunk/; revision=879
1999-10-15avoid mistakingly commit dynamically generated files, like "Makefile".Jun-ichiro itojun Hagino1-0/+15
svn path=/trunk/; revision=837
1999-10-14implement ipprotostr() in ipproto.c, which basically does ipprotobynumber()Jun-ichiro itojun Hagino1-2/+8
for ip.ip_p and ip6.ip6_nxt (and other IPv6 header chain). use val_to_str() as much as possible in dissect_{ipv6,pim,ripng}(). make --disable-zlib a default for netbsd (temporary workaround). svn path=/trunk/; revision=827
1999-10-10The #defines to turn "yy{lex,error}" into names specific to theGuy Harris1-11/+2
parser/lexical analyzer in question are needed only in the ".c" files for the generated parser and lexical analyzer, and Flex and Byacc/Bison put them there; don't bother putting them in a header file, just directly declare the functions with the right names. svn path=/trunk/; revision=801
1999-10-08Move some definitions of stuff not used outside the Lucent/AscendGuy Harris3-13/+15
capture file reading code from "ascend.h" to "ascend-int.h". svn path=/trunk/; revision=788
1999-10-08Add an "ascend-int.h" file, to declare routines used by more than one ofGuy Harris4-3/+48
the files in the Lucent/Ascend capture file code. svn path=/trunk/; revision=787
1999-10-06Give it a copyright notice and RCS ID.Guy Harris1-0/+23
svn path=/trunk/; revision=775
1999-10-06Whitespace cleanup.Guy Harris1-2/+2
svn path=/trunk/; revision=773
1999-10-06Add "wtap_file_encap()", to return the encapsulation of packets in theGuy Harris3-3/+24
file (which could be WTAP_ENCAP_UNKNOWN, if we couldn't determine it, or WTAP_ENCAP_PER_PACKET, if we could determine the encapsulation of packets in the file, but they didn't all have the same encapsulation). This may be useful in the future, if we allow files to be saved in different capture file formats - we'd have to specify, when creating the capture file, the per-file encapsulation, for those formats that don't support per-packet encapsulations (we wouldn't be able to save a multi-encapsulation capture in those formats). Make the code to read "iptrace" files set the per-file packet encapsulation - set it to the type of the first packet seen, and, if any subsequent packets have a different encapsulation, set it to WTAP_ENCAP_PER_PACKET. svn path=/trunk/; revision=772
1999-10-05Make "wtap_strerror()" handle zlib errors *correctly*.Guy Harris1-10/+10
svn path=/trunk/; revision=770
1999-10-05Better handle errors from zlib:Guy Harris12-146/+157
Assign a range of Wiretap errors for zlib errors, and have "wtap_strerror()" use "zError()" to get an error message for them. Have the internal "file_error()" routine return 0 for no error and a Wiretap error code for an error. svn path=/trunk/; revision=769
1999-09-30A "time units" value of 5 means "microseconds", according to an FDDIGuy Harris1-2/+2
Sniffer trace, and printout therefrom, sent to me by Jeff Foster. (The Sniffer manuals I'd had a chance to read didn't say what the units were.) svn path=/trunk/; revision=744
1999-09-28"snoop" seems to treat "IEEE 802.3" and "Ethernet" datalink types theGuy Harris1-2/+2
same (which raises the question "so why the heck are there two types?" - note that the way you're supposed to tell Ethernet from 802.3 packets is by looking at the value of the type/length field; both of them can be transmitted on the same wire), so we'll treat them the same. svn path=/trunk/; revision=733
1999-09-24DO NOT check for "unistd.h"; due to an unfortunate botch in the wayGuy Harris1-2/+43
"zlib" was built in FreeBSD 3.2 (and possibly other 4.4-Lite-derived BSDs), if HAVE_UNISTD_H is defined before "zlib.h" is included, the declaration of "gzseek()" in "zlib.h" expands to something that doesn't match what's in the OS's "zlib". svn path=/trunk/; revision=721
1999-09-24Fix it so that it builds with "--disable-zlib".Guy Harris12-29/+30
The "fh" member of a "wtap" structure points to something constructed from the "fd" member of that structure, so that closing the stream referred to by "fh" also closes the underlying file descriptor; get rid of an unnecessary close of "wth->fd". svn path=/trunk/; revision=720
1999-09-24Many more packaging changes. Lets compilation with new gtk subdirectoryGilbert Ramirez1-1/+5
work if build tree is different than source tree. Some wiretap files had to be added to the list of deliverables. svn path=/trunk/; revision=717
1999-09-23Give it an RCS ID.Guy Harris3-0/+48
svn path=/trunk/; revision=706
1999-09-23Give it an RCS ID.Guy Harris1-0/+2
svn path=/trunk/; revision=704
1999-09-23When reading a capture file, we can detect whether it's compressed orGuy Harris2-14/+14
not, so it's OK to use "zlib" to read capture files, as it handles uncompressed files correctly. When *writing* capture files, however, we can't detect automatically whether the user wanted to write the file out as a compressed file or not, so we should *NOT* use "zlib" until we add a flag to the API specifying whether to write the file out as a compressed file or not. Furthermore, the code in Ethereal that implements the "-S" flag depends on being able to get the "FILE *" for a capture file being written, so that it can "fflush()" it. svn path=/trunk/; revision=703
1999-09-23Get rid of unused variable.Guy Harris1-2/+1
svn path=/trunk/; revision=702
1999-09-23Adds progress bar functionality back for loading files (it was changed toAshok Narayanan4-5/+22
bounce bar for compressed file support). Note that the progress bar may not grow smoothly for compressed files, but it should be reasonably accurate for files which are large enough to matter. svn path=/trunk/; revision=701
1999-09-22Fix to allow compressed file handling of Ascend capturesAshok Narayanan3-19/+30
svn path=/trunk/; revision=699
1999-09-22Oops - new file for zLib commit which I missed out.Ashok Narayanan1-0/+55
svn path=/trunk/; revision=696
1999-09-22This commit contains support for reading capture files compressed usingAshok Narayanan13-146/+179
gzip. The zLib library is used for this purpose. If zLib is not available (or it's use is disabled by the --disable-zlib option to configure), you can still compile Ethereal but it will be unable to read compressed capture files. IMPORTANT: Now all file accesses to capture files should be done through special macros. Specifically, for any use of the following functions on capture files, replace them. The arguments for the right-side functions are exactly the same as for the original stdio functions. fopen file_open fdopen filed_open fread file_read fwrite file_write fseek file_seek fclose file_close ferror file_error svn path=/trunk/; revision=695
1999-09-13Added support for Lucent/Ascend "wdd" output.Gerald Combs1-6/+8
svn path=/trunk/; revision=675
1999-09-13Add support for "wdd" trace output.Gerald Combs3-78/+230
svn path=/trunk/; revision=673
1999-09-12Some old CPP or tools that take C code in input doLaurent Deniel1-5/+5
not like #preprocessor_macros that do not start at the first column. So write: #ifdef FOO # include <dummy1.h> # define DUMMY 1 #else # include <dummy2.h> # define DUMMY 2 #endif instead of #ifdef FOO #include <dummy1.h> #define DUMMY 1 #else #include <dummy2.h> #define DUMMY 2 #endif svn path=/trunk/; revision=668
1999-09-11Added Guy's patch to use the pseudo header facility to pass up the AscendGerald Combs5-40/+58
metadata. Also added filter items for the session and task number. svn path=/trunk/; revision=664
1999-09-11Get rid of an unused variable.Guy Harris1-2/+0
svn path=/trunk/; revision=663
1999-09-11"ascend_seek()" isn't used outside "ascend.c", so make it static toGuy Harris1-2/+2
"ascend.c". svn path=/trunk/; revision=659
1999-09-11"ascend_read()" is local to "ascend.c" - declare it there, not inGuy Harris2-3/+4
"ascend.h". svn path=/trunk/; revision=657
1999-09-11Include "ascend.h" to declare "ascend_seek_read()".Guy Harris1-8/+10
"wtap_seek_read()" should return the value of "ascend_seek_read()" or "wtap_def_seek_read()". svn path=/trunk/; revision=656
1999-09-11Add in ascend.c, ascend.h, ascend-grammar.y and ascend-scanner.l. TheseGerald Combs4-0/+549
read and parse the Lucent/Ascend trace output. svn path=/trunk/; revision=653
1999-09-11Added support for Lucent/Ascend packet traces. The MAX and Pipeline routerGerald Combs6-113/+290
family has a set of debug commands that allow you to log the traffic on a WAN or dialup connection as text, e.g. RECV-iguana:241:(task: B04E12C0, time: 1975358.50) 15 octets @ 8003D634 [0000]: FF 03 00 3D C0 06 C9 96 2D 04 C1 72 00 05 B8 Created wtap_seek_read() which parses the textual data for and Ascend trace, and does a normal fseek() and fread() for any other file type. The fseek()/fread() pairs in file.c were replaced with the new function. svn path=/trunk/; revision=652
1999-09-09Put in an RCS ID (and a copyright notice and GPL notice; unfortunately,Guy Harris1-0/+24
this causes "Makefile.in" to have two GPL notices - "Makefile.in" and the "Makefile" generated from it are generated files, so maybe that's OK). svn path=/trunk/; revision=639
1999-09-02When skipping over the padding at the end of a record in a capture file,Guy Harris1-5/+28
don't seek around it - some implementations of the standard I/O library routines (e.g., the ones in Solaris 2.5.1, at least) appear not to be clever enough to handle seeks that occur within the buffer by moving the current buffer position; instead, they do a seek on the underlying file descriptor *and* appear to throw out the buffer, forcing them to do another read. Instead, read it into a buffer. svn path=/trunk/; revision=626
1999-09-01When reading packets from a capture file, don't seek around recordGuy Harris1-50/+49
header fields we don't look at - some implementations of the standard I/O library routines (e.g., the ones in Solaris 2.5.1, at least) appear not to be clever enough to handle seeks that occur within the buffer by moving the current buffer position; instead, they do a seek on the underlying file descriptor *and* appear to throw out the buffer, forcing them to do another read. Instead, read the entire record header into a structure, and pick the relevant bits out of it. Also, skip over the FCS in LAPB captures by reading it rather than seeking around it (should we put it in the pseudo-header?). svn path=/trunk/; revision=625
1999-08-31Fix, from Bert Driehuis, to the stuff that checks for BSD/OS.Guy Harris1-2/+2
svn path=/trunk/; revision=620
1999-08-31Olivier Abad's fix to the problem where some capture files appeared toGuy Harris1-0/+1
be truncated - treat a record with a data length of 0 as an end of file. svn path=/trunk/; revision=619
1999-08-31Convert the seconds value to the right byte order before using it atGuy Harris1-6/+10
all, not just before the third time you use it.... svn path=/trunk/; revision=613
1999-08-30Fixes from Olivier Abad to the code to maintain "wth->data_offset".Guy Harris1-7/+20
Use "pletohs()" and "pletohl()" to access 16-bit and 32-bit fields in the file and packet headers, as those fields are little-endian. svn path=/trunk/; revision=612
1999-08-28Keep in the "wtap" structure the current offset into the file beingGuy Harris10-25/+82
read, and maintain it ourselves as we read through the file, rather than calling "ftell()" for every packet we read - "ftell()" may involve an "lseek()" call, which could add a noticeable CPU overhead when reading a large file. svn path=/trunk/; revision=596
1999-08-24Changed #include "glib.h" to #include <glib.h>, for stylistic reasons.Gilbert Ramirez1-2/+2
svn path=/trunk/; revision=566
1999-08-24Add a new Wiretap encapsulation type WTAP_ENCAP_FDDI_BITSWAPPED, meaningGuy Harris7-20/+46
"FDDI with the MAC addresses bit-swapped"; whether the MAC addresses are bit-swapped is a property of the machine on which the capture was taken, not of the machine on which the capture is being read - right now, none of the capture file formats we read indicate whether FDDI MAC addresses are bit-swapped, but this does let us treat non-"libpcap" captures as being bit-swapped or not bit-swapped independent of the machine on which they're being read (and of the machine on which they were captured, but I have the impression they're bit-swapped on most platforms), and allows us to, if, as, and when we implement packet capture in Wiretap, mark packets in a capture file written in Wiretap-native format based on the machine on which they are captured (assuming the rule "Ultrix, Alpha, and BSD/OS are the only platforms that don't bit-swap", or some other compile-time rule, gets the right answer, or that some platform has drivers that can tell us whether the addresses are bit-swapped). (NOTE: if, for any of the capture file formats used only on one platform, FDDI MAC addresses aren't bit-swapped, the code to read that capture file format should be fixed to flag them as not bit-swapped.) Use the encapsulation type to decide whether to bit-swap addresses in "dissect_fddi()". svn path=/trunk/; revision=557
1999-08-22Modify the comments to show how much of a mess the different DLT_ valuesGuy Harris1-9/+18
on different flavors of BSD are - even worse than I thought, now that I've seen the BSD/OS <net/bpf.h>. svn path=/trunk/; revision=552
1999-08-22Fix the pcap-encapsulation-to-wiretap-encapsulation mapping table.Guy Harris3-10/+23
Have the code that opens "libpcap" files for writing check to make sure that the Wiretap encapsulation can be written to a "libpcap" file, and return -1 and supply a new WTAP_ERR_UNSUPPORTED_ENCAP error code if it can't. Handle that new error code in "wtap_strerror()". svn path=/trunk/; revision=546
1999-08-22Add a "wtap_strerror()" routine, which takes as an argument an errorGuy Harris2-2/+38
code supplied by a Wiretap routine (whether a positive UNIX "errno" code or a negative Wiretap error code), and returns an error message corresponding to it. Use that to construct the message Ethereal put up in a message box for those errors for which we don't have Ethereal put up a message of its choice. svn path=/trunk/; revision=545
1999-08-22Get rid of some cruft left in by previous checkins as placeholders.Guy Harris9-116/+155
Get rid of WTAP_ENCAP_NONE; replace it with WTAP_ENCAP_UNKNOWN, which means "I can't handle that file, it's using an encapsulation I don't support". Check for encapsulations we don't support, and return an error (as is already done in "libpcap.c"). Check for too-large packet sizes, and return an error (as is already done in "libpcap.c"). Print unsigned quantities in Wiretap messages with "%u", not "%d". svn path=/trunk/; revision=544