aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
AgeCommit message (Collapse)AuthorFilesLines
2000-04-29Graham Bloice's changes to, on Win32 using Microsoft's "nmake":Guy Harris1-2/+2
build "register.c" in the top-level Makefile; set path in "config.nmake" to include the Cygwin directory for tools - those tools are needed to build "register.c"; remove constructed source files, and some additional object files, when doing "nmake clean". svn path=/trunk/; revision=1896
2000-04-15Get rid of the "start" field in the private data for RADCOM, i4btrace,Guy Harris4-40/+12
and nettl captures - a "start" field is used for capture files where the time stamps on packets are relative to some initial time stamp, e.g. the time the capture started, but those file formats use absolute time stamps, so no "start" field is needed. Make the "this is an HP-UX 11.x nettl capture" flag a member of the private data structure for a nettl capture, rather than a global - it's per-capture-file state. Once the "start" field is removed from the RADCOM private data structure, there's nothing left, so eliminate the private data structure. svn path=/trunk/; revision=1863
2000-04-12Build tethereal and editcap on Win32.Gilbert Ramirez1-0/+3
Add RCS ID tags to Makefile.nmake's. svn path=/trunk/; revision=1836
2000-04-08Declare, in "wtap.h", Richard's new "wtap_read()" function.Guy Harris1-1/+2
svn path=/trunk/; revision=1820
2000-04-08Some stuff, like libdencode, needs a wiretap routine that allowsRichard Sharpe1-1/+6
them to simply read through the capture file ... svn path=/trunk/; revision=1819
2000-04-06Use the "-o" flag, rather than using the "-t" flag and redirecting theGuy Harris1-1/+1
standard output, in the rules to get Flex to produce scanner code; that way, if Flex fails to run for some reason, we don't leave around a zero-length or otherwise incorrect "XXX-scanner.c" file that might keep a subsequent make from thinking it has to generate that file. svn path=/trunk/; revision=1808
2000-04-04The Win32 port of libpcap requires that programs with which it's builtGuy Harris1-1/+3
be built as multi-threaded programs; add "/MT" to the list of compiler flags. Add "clean" rules in subdirectories, and run subdirectory "nmake -f Makefile.nmake clean" when "nmake -f Makefile.nmake clean" is done in the top-level directory, so that "nmake -f Makefile.nmake clean" cleans everything up. svn path=/trunk/; revision=1791
2000-03-30Jochen Friedrich <jochen@nwe.de>Gilbert Ramirez1-2/+2
protocol type 0x0c in AIX iptrace is used for the IBM SP switch devices. Encoding is RAW IP... svn path=/trunk/; revision=1767
2000-03-29Use the "-o" flag, rather than using the "-t" flag and redirecting theGuy Harris1-2/+2
standard output, in the rules to get Flex to produce scanner code; that way, if Flex fails to run for some reason, we don't leave around a zero-length or otherwise incorrect "XXX-scanner.c" file that might keep a subsequent make from thinking it has to generate that file. svn path=/trunk/; revision=1763
2000-03-22Make the previous checkin actually compile on big-endian machines.Guy Harris1-1/+4
svn path=/trunk/; revision=1742
2000-03-22Byte-swap the frame table on big-endian machines.Guy Harris1-9/+24
Free it as soon as we're at the end of the sequential pass through the file; that way, if we keep the capture file open with Wiretap even after that's done (as I may do as part of some stuff I'm working on), we at least aren't hanging on to the frame table memory after that point. svn path=/trunk/; revision=1741
2000-03-22In a Network Monitor capture file, get the starting offsets of framesGuy Harris11-86/+124
from the frame table - Network Monitor 2.x, at least, doesn't always write frame N+1 right after frame N. To do that, we need to mallocate a big array to hold the frame table, and free it when we close the capture file; this requires that we have capture-file-type-specific close routines as well as capture-file-type-specific read routines - we let it the pointer to that routine be null if it's not needed. Given that, we might as well get rid of the switch statement in "wtap_close()", in favor of using capture-file-type-specific close routines, as per the comment before that switch statement. svn path=/trunk/; revision=1740
2000-03-14Sigh. OpenBSD defines "HAVE_UNISTD_H" in the Makefile for zlib, so,Guy Harris1-11/+28
unlike FreeBSD and older versions of NetBSD, which give "gzseek()" and "gztell()" signatures with "long" file-offset arguments, and thus, on some versions, requires that "HAVE_UNISTD_H" *not* be defined before including "zlib.h" if you want the functions declared with a signature that matches what's actually in the library, it requires that it *be* defined before including "zlib.h" if you want the functions declared with a signature that matches what's actually in the library. svn path=/trunk/; revision=1719
2000-03-04Fix for reading toshiba trace files that were created by using theGilbert Ramirez1-11/+23
"save session" feature in many Windows-based telnet apps. CRT, by VanDyke, in particular, will put in newlines at 80 columns. svn path=/trunk/; revision=1692
2000-03-01The frame header in HP-UX 11 trace files is 4 octets longer (than HP-UX 9Olivier Abad1-3/+52
and 10 files). Add OS version detection to handle this. svn path=/trunk/; revision=1675
2000-02-19Note that one can probably symbolically request that nettl log incomingGuy Harris1-1/+5
and outgoing PDUs, rather than specifying a numerical mask with pduin and pduout (0x30000000). svn path=/trunk/; revision=1649
2000-02-19If we see a file with an unknown network type, report the type in aGuy Harris1-1/+3
"g_message()" message, as other capture-file readers do. svn path=/trunk/; revision=1648
2000-02-19Use WTAP_ERR_UNSUPPORTED_ENCAP for all attempts to open or read aGuy Harris8-17/+17
capture file for an unsupported link-layer encapsulation type (as the nettl reader does), and report it correctly if it occurs on an open or read attempt rather than a save attempt. svn path=/trunk/; revision=1647
2000-02-17Add support for raw IP nettl captures.Olivier Abad3-50/+173
Update the nettl section in wiretap/README, and give sample commands to make captures on HP-UX. svn path=/trunk/; revision=1642
2000-02-15Create a header file for every packet-*.c file. Prune the packet.h file.Gilbert Ramirez1-1/+6
This change allows you to add a new packet-*.c file and not cause a recompilation of everything that #include's packet.h Add the plugin_api.[ch] files ot the plugins/Makefile.am packaging list. Add #define YY_NO_UNPUT 1 to the lex source so that the yyunput symbol is not defined, squelching a compiler complaint when compiling the generated C file. svn path=/trunk/; revision=1637
2000-02-12Get rid of the check for NetBSD in the Wiretap "configure.in"; weGuy Harris1-6/+5
eliminated the check in the top-level "configure.in", and leaving it in the Wiretap one means that, on NetBSD, Ethereal gets built with zlib support if zlib is present, but Wiretap doesn't - now they both get built with zlib support. Thanks to Itojun for catching this one. Put into the Wiretap "configure.in" code to note that, if the test for "gzgets()" in zlib fails, we're disabling compressed capture file support, as is done in the top-level "configure.in". svn path=/trunk/; revision=1625
2000-02-09Update Makefiles for win32. Move local configuration to config.nmake,Gilbert Ramirez1-5/+13
have top-level Makefile.nmake call Makefile.nmake's in subdirectories. Build plugins, and build generated source (lex, yacc). The only thing we can't build is register.c; I need to re-work the top-level Makefile.nmake because it lists object files, not C files, which make-reg-dotc needs. svn path=/trunk/; revision=1608
2000-02-03Change from Ed Meaney - write capture files in binary, rather than ASCIIGuy Harris1-3/+3
("w" and "wb" are the same on UNIX, but not on Win32). svn path=/trunk/; revision=1598
2000-01-29Support for NetXray 3.03 (the program version, not file version) PPPGilbert Ramirez1-2/+2
traces. The trace we got from Tom Poe (tomp@intrex.net) contains PPP data which NetXRay has transformed into looking like Ethernet frames. The hardware addresses are the bytes for the ASCII reprsentation of "SRC" and "DEST", with null pad bytes at the end. Interesting. svn path=/trunk/; revision=1576
2000-01-26Always declare, and define, "file_seek()" to return a "long", as it'sGuy Harris2-14/+13
supposed to look like "ftell()". If you don't have zlib, just define "file_seek" as an alias for "fseek", rather than defining it as a routine. svn path=/trunk/; revision=1571
2000-01-25"gztell()" is also affected by the libz mess on platforms where "off_t"Guy Harris2-5/+11
is bigger than a "long"; this is itojun's fix for that, turning "file_tell()" into a wrapper function in "file_wrappers.c", just like "file_seek()". svn path=/trunk/; revision=1554
2000-01-24Added the O_BINARY flag to open() for win32.Gilbert Ramirez1-2/+7
Ethereal on win32 now correctly reads trace files. svn path=/trunk/; revision=1538
2000-01-22Fix files that had Gilbert's old e-mail address or that didn't have myGuy Harris30-60/+60
forwarding e-mail address. svn path=/trunk/; revision=1522
2000-01-20The headers of HP-UX 9.04 and HP-UX 10.20 nettl files seem to be different.Olivier Abad1-7/+11
Check for both "magic numbers". svn path=/trunk/; revision=1512
2000-01-15Merge in the final code to make Ethereal run on Win32, compiledGilbert Ramirez2-19/+11
with MSVC 6.0 and 'nmake', the make tool that comes with MSVC. It compiles, links, and runs. It doesn't run correctly. There's a problem when reading files. I'm getting short reads. I'm not linking in zlib or libsnmp because it first needs to be debugged. I changed the plugin code to use gmodule instead of libltdl, but the Unix build still links ethereal against libltdl. I'll fix that tonight; sorry about leaving it in such a sad state, but I wanted to check in this code before I left work on a Friday night. Ethereal still works, but the building is less than optimal. svn path=/trunk/; revision=1479
2000-01-13Add "file_wrappers.c" to the list of things to compile with MicrosoftGuy Harris1-0/+1
Visual C{++}. svn path=/trunk/; revision=1467
2000-01-13Fix "ascend-scanner.l" to include "file_wrappers.h" rather than theGuy Harris2-13/+15
defunct "file.h". Make "file_wrappers.c" include "wtap.h", so that the WTAP_ERR_ZLIB_ values are defined. svn path=/trunk/; revision=1464
2000-01-13We are obliged to define HAVE_UNISTD_H in "config.h"; to avoid theGuy Harris18-114/+167
hideous problem on FreeBSD 3.[23] (and perhaps other BSDs) if HAVE_UNISTD_H is defined before "zlib.h" is included, turn "file_seek()" into a subroutine defined in a file that *undefines* HAVE_UNISTD_H before including "zlib.h", so that the *only* call to "gzseek()" is made from a file that does not have HAVE_UNISTD_H defined when it includes "zlib.h". Move "file_error()" to that file while you're at it, so it holds all the wrappers that hide the presence or absence of zlib from routines to read capture files. Turn "file.h", which declared those wrapper functions as well as wrapper macros, into "file_wrapper.h" - it belongs with the "file_wrapper.c" file that defines the wrapper functions, not with "file.c" which handles higher-layer file access functions. Remove the comment in "configure.in" that explained why defining HAVE_UNISTD_H was a bad idea, as we're not obliged to define it and work around the problem. (The comment in "file_wrapper.c" explains the workaround.) svn path=/trunk/; revision=1463
2000-01-10Some initial changes for win32 support, but not all.Gilbert Ramirez6-10/+28
Added lots of #ifdef HAVE_*_H wrappers. Added some #defines in config.h.win32 Check for more headers in configure.in Added prototype for inet_aton() in inet_v6defs.h. Changed "BYTE" token (i.e., #define) in ascend-gramamr.y because it conflicts with a windows definition. Use HEXBYTE instead. svn path=/trunk/; revision=1448
2000-01-09Add to some comments notes on the meaning of DLT types 15 and 16 onGuy Harris1-3/+15
Linux systems with the isdn4linux patches; they help make DLT types even less useful than they were after the various flavors of BSD proceeded to add their own types past 14, with no coordination whatosever, so that they overlapped, rendering it impossible to read a libpcap capture file without knowing what particular OS generated it. svn path=/trunk/; revision=1442
2000-01-01Add relative timestamps. The Toshiba ISDN router has the same problemGilbert Ramirez1-3/+3
as the Ascend routers; those little buggers don't remember time very well. The only timestamp available in the trace is relative to the beginning of the trace. So, right now I'm just using this relative timestamp as the absoulte time. All my times are in 1969 (my timezone is GMT - 6), but all I care about for now is the relative time, which is preserved even if the absolute time is in the wrong decade. svn path=/trunk/; revision=1404
1999-12-15Pull in some additional non-definitions, to make it match the currentGuy Harris1-3/+17
"config.h" on my machine. (Should YYTEXT_POINTER be defined?) svn path=/trunk/; revision=1346
1999-12-15Bring it somewhat up to date.Guy Harris1-2/+16
svn path=/trunk/; revision=1345
1999-12-15Handle i4btrace captures if they're from a machine with the oppositeGuy Harris3-19/+62
byte order from the machine that's reading them. svn path=/trunk/; revision=1338
1999-12-15One field in the NetXRay header appears to be the number of frames inGuy Harris4-93/+82
the capture; set it to that when writing the capture. Support Token Ring and FDDI captures (as per the network type in the file header appearing to be either the NDIS network type, or the NDIS network type minus 1 - I forget whether Ethernet has an NDIS type of 0 or 1). Don't write the file header twice, keeping a static copy of it around, as Wiretap code isn't supposed to keep any static data around; instead, write it only when we're done writing out all the records (as we do on Network Monitor captures). Compute the time stamps when writing the file. Give Windows Sniffer 1.1-format a short name, so "editcap" doesn't dump core or print "(null)" in its usage message. WTAP_ENCAP_NULL isn't supported by NetMon; don't write it. svn path=/trunk/; revision=1336
1999-12-14more work on netxray, still not sniffer compatible thoughNathan Neulinger2-16/+49
svn path=/trunk/; revision=1333
1999-12-14Changed the meaning of the 0x80 bit in "fs" in a frame2 record (from DTEOlivier Abad1-3/+4
instead of from DCE). I can now open a RADCOM X.25 capture in ethereal, save it as sniffer, and read it with a sniffer. The frame directions are correct. (BTW, the snifconv.exe tool provided by RADCOM doesn't work with X.25 captures). svn path=/trunk/; revision=1331
1999-12-14Include <string.h> to declare "memset()".Guy Harris1-1/+2
svn path=/trunk/; revision=1321
1999-12-14Added support for writing netxray version 1.1 dumps.Nathan Neulinger4-5/+160
It's very basic, and doesn't write out the timestamps currently. It also only handles WTAP_ENCAP_ETHERNET, although it can probably do the others, but I don't have a good way to test them. This code has not yet been tested against a Sniffer Pro, although wiretap can read the files just fine. svn path=/trunk/; revision=1318
1999-12-12Put the "." in "V.120".Guy Harris1-2/+2
svn path=/trunk/; revision=1305
1999-12-12Added Bert Driehuis <driehuis@playbeing.org>'s I4B wiretap moduleGilbert Ramirez7-8/+307
and V.120 decoder. svn path=/trunk/; revision=1304
1999-12-12Add short names (for "editcap" command lines and the like) for theGuy Harris1-3/+3
Kuznetsov "libpcap" format and the early Kuznetsov format Red Hat 6.1 uses. svn path=/trunk/; revision=1303
1999-12-11Put in a private data structure hanging off the "wtap_dumper" structureGuy Harris2-11/+23
the "this is the first frame" flag, and the time stamp of the first frame, used when writing Sniffer files, so that more than one could be open at a time (Wiretap doesn't forbid that) and so that they're initialized when you start writing a capture. svn path=/trunk/; revision=1292
1999-12-11Correct timestamp calculation in ngsniffer_dumpOlivier Abad1-30/+45
svn path=/trunk/; revision=1291
1999-12-11Provide different file types for "modified" and Red Hat 6.1 "libpcap"Guy Harris3-32/+98
files (the former have a different per-packet header, and a different magic number, from the standard "libpcap"; the latter have the same per-packet header as "modified" "libpcap" files, but the same magic number as standard "libpcap" files, sigh). Support writing "libpcap" captures in all three formats (so that, for example, people running Ethereal on RH 6.1 can write out captures that the "tcpdump" that comes with RH 6.1 can read, although that's not the default format we save in - there's no way to tell whether you're running on RH 6.1, as far as I know; "uname()" just tells you, on Linux systems, that the kernel is Linux 2.x, and what "x" is, it doesn't say what the *rest* of the system is). Fix the table in "file.c" to use Olivier's code for writing Sniffer files. svn path=/trunk/; revision=1288