Commit Graph

211 Commits

Author SHA1 Message Date
Gilbert Ramirez d7e6e0e384 Add wtap-int.h. Move definitions relevant to the internal workins of wiretap
to that file, leave public definitions in wtap.h.

Rename "union pseudo_header" to "union wtap_pseudo_header".
Make the wtap_pseudo_header pointer available in packet_info struct.

svn path=/trunk/; revision=1989
2000-05-19 23:07:04 +00:00
Guy Harris f3d90d30a4 Remove the "union pseudo_header" from the "frame_data" structure;
there's no need to keep it around in memory - when the frame data is
read in when handing a frame, read in the information, if any, necessary
to reconstruct the frame header, and reconstruct it.  This saves some
memory.

This requires that the seek-and-read function be implemented inside
Wiretap, and that the Wiretap handle remain open even after we've
finished reading the file sequentially.

This also points out that we can't really do X.25-over-Ethernet
correctly, as we don't know where the direction (DTE->DCE or DCE->DTE)
flag is stored; it's not clear how the Ethernet type 0x0805 for X.25
Layer 3 is supposed to be handled in any case.  We eliminate
X.25-over-Ethernet support (until we find out what we're supposed to
do).

svn path=/trunk/; revision=1975
2000-05-18 09:09:50 +00:00
Guy Harris 4c071627ed Add a "-s" flag to editcap, to make it truncate packets to a specified
snapshot length before writing them to the output file; this may come in
handy if you are translating the file to a different format so that it
can be read by a program that can't handle packets above a certain size
(e.g., the snoop in Solaris 2.5.1 or 2.6, which reject Ethernet packets
larger than the Ethernet MTU, and thus can't handle gigabit Ethernet
captures using jumbo frames).

svn path=/trunk/; revision=1891
2000-04-27 00:31:30 +00:00
Gilbert Ramirez 73a42b360c Remove optopt and opterr, two unused variables.
svn path=/trunk/; revision=1877
2000-04-17 14:52:32 +00:00
Gilbert Ramirez ed237c129d Build tethereal and editcap on Win32.
Add RCS ID tags to Makefile.nmake's.

svn path=/trunk/; revision=1836
2000-04-12 21:52:11 +00:00
Guy Harris 7b2773fa31 Use "strchr()" rather than "index()" - the ANSI C standard specifies
"strchr()", and it, unlike "index()", is declared in <string.h>.

svn path=/trunk/; revision=1502
2000-01-17 20:21:40 +00:00
Richard Sharpe 656eb3453b Small patch to editcap to allow ranges of packets to be specified
as well as individual packets.

I needed to grab quite a few from the middle of a large capture file.

Will eventually need to sort the extract list.

svn path=/trunk/; revision=1498
2000-01-17 08:06:03 +00:00
Richard Sharpe e6c49cfe4d Another commit from a Qantas Club Lounge ... :-)
Update editcap to print out the type of capture file if -v specified and
add a -h flag.  Also fix a few compiler warnings ...

svn path=/trunk/; revision=1302
1999-12-12 21:04:29 +00:00
Guy Harris e8f5dac7d4 Use the new routines in Wiretap to make the argument to "-T" be a
symbolic name, and to list the encapsulation types in the usage message.

Note in the usage message that the default output encapsulation type is
"same as the input file" and that the default output file type is
"libpcap".

svn path=/trunk/; revision=1213
1999-12-05 01:27:14 +00:00
Guy Harris 3e084400fc It's now called "editcap", as it can read any file format Wiretap can
read, and write any format it can write; change the error messages.

Make the "-F" flag take a symbolic capture file type; use
"wtap_short_string_to_file_type()" to translate it to a WTAP_FILE_
value.

List, in the usage message, the capture file types we can write, and the
symbolic types you use on the command line to specify them.

Give it an RCS ID.

svn path=/trunk/; revision=1210
1999-12-04 21:42:56 +00:00
Richard Sharpe ad33fe84a7 Adding editcap.c. This is an example of a simple wiretap editing program.
Will need new functions in wiretap before I can do more.

Should perhaps be moved into an examples directory and have other bots added.

svn path=/trunk/; revision=1206
1999-12-04 12:53:52 +00:00