Commit Graph

42 Commits

Author SHA1 Message Date
Tomas Kukosa dcae7d303f new field type FT_OID for OBJECT IDENTIFIERs
svn path=/trunk/; revision=16652
2005-12-02 13:16:58 +00:00
Jörg Mayer 23486b484e Fix lots of warnings of type:
ftypes.c:257: warning: passing argument 1 of 'logfunc' discards
                        qualifiers from pointer target type
by changing 'char*' -> 'const char*'

svn path=/trunk/; revision=15009
2005-07-23 06:19:08 +00:00
Tomas Kukosa bab34b522b new field type FT_GUID
svn path=/trunk/; revision=14845
2005-07-04 13:04:53 +00:00
Lars Roland ea67e4cfab Add functions to the old and the new plugin api for the MATE Plugin.
svn path=/trunk/; revision=12715
2004-12-11 00:13:27 +00:00
Jörg Mayer 54e0e363a9 Get rid of warnings about shadowed variables (code was ok)
svn path=/trunk/; revision=12171
2004-10-01 12:31:52 +00:00
Guy Harris c68f62210f Add "tvb_get_ntoh64()" and "tvb_get_letoh64()" routines to fetch 64-bit
integers.

Make FT_INT64 and FT_UINT64 add numerical values, rather than byte-array
values, to the protocol tree, and add routines to add specified 64-bit
integer values to the protocol tree.

Use those routines in the RSVP dissector.

svn path=/trunk/; revision=11796
2004-08-22 00:31:58 +00:00
Guy Harris 8a8b883450 Set the svn:eol-style property on all text files to "native", so that
they have LF at the end of the line on UN*X and CR/LF on Windows;
hopefully this means that if a CR/LF version is checked in on Windows,
the CRs will be stripped so that they show up only when checked out on
Windows, not on UN*X.

svn path=/trunk/; revision=11400
2004-07-18 00:24:25 +00:00
Guy Harris 003ecf68bb Instead of using pointer casts in the slab allocator stuff, add a
"SLAB_ITEM_TYPE_DEFINE()" macro to define a union of the type of object
for the slab and a pointer to an object of that union type, and use that
type for items on the slab allocator free lists; that *should* avoid
having the compiler think two pointers to an item being added to or
removed from the free list don't point to the same object just because
they have different types.

svn path=/trunk/; revision=11306
2004-07-04 02:29:43 +00:00
Guy Harris 456c6cab66 Make the "SLAB_ALLOC()" and "SLAB_FREE()" macros take the type of the
object being allocated, rather than the name of the free list, as an
argument (with the name of the free list constructed from the name of
the type), and add macros to define and declare the free list, also
taking the type of the object being allocated.

svn path=/trunk/; revision=11305
2004-07-04 00:28:11 +00:00
Ronnie Sahlberg 9c880121eb from tomas k
updates to the asn2eth compiler and a new regenerated h235 dissector

svn path=/trunk/; revision=11231
2004-06-24 21:50:05 +00:00
Guy Harris 15af0f656f From Lars Roland: add support for building a libethereal.dll with MSVC:
add a config.nmake option to control whether to build
	libethereal.dll or not;

	remove "./wiretap" from PATH to prevent problems due to
	wrongly-loaded files;

	build dissector.lib with MSVC;

	move "print.c" and "ps.c" to the dissector helpers, as "print.c"
	imports variables from packet-frame.c and packet-data.c, which
	are in libethereal;

	move "g711.c" out of the dissector helpers, as they're used only
	by Ethereal in a tap, not in Tethereal or in any dissector;

	add a .def file for libethereal;

	arrange to declare global variables exported from libethereal
	with "__declspec(dllimport)" when building programs that import
	those variables;

	update the NSIS installer.

Make the "configure" script define ETH_VAR_IMPORT as "extern".

svn path=/trunk/; revision=10834
2004-05-09 10:03:41 +00:00
Olivier Biot 1791f84919 First attempt at "bitwise AND" display filter operator.
Document how a display operator can be added.

svn path=/trunk/; revision=10250
2004-02-27 12:00:32 +00:00
Jörg Mayer 4023150e25 signed/unsigend warning fixes
svn path=/trunk/; revision=9931
2004-02-01 02:35:30 +00:00
Jörg Mayer 111f977cfa Remove the cast again and do the proper fix (add right type to union)
svn path=/trunk/; revision=9844
2004-01-25 17:22:57 +00:00
Gerald Combs 45c2823020 Make the _pcre_tuple_t struct internal.
svn path=/trunk/; revision=9233
2003-12-10 21:12:02 +00:00
Olivier Biot 0f18533b75 Internal PCRE field type for efficient RE parsing in dfilters.
svn path=/trunk/; revision=9224
2003-12-09 23:02:40 +00:00
Gilbert Ramirez 55a6251e7c From Olivier Biot
New "matches" operater in display filter language. Uses PCRE.

If a "matches" operator is found in a dfilter
while libpcre has not been used to build the binary, then an
exception is thrown after using dfilter_fail() to set an apporporiate
error message.

svn path=/trunk/; revision=9182
2003-12-06 16:35:20 +00:00
Guy Harris dcd98ae8d3 The "ptr_u" unions no longer have a "next" pointer - they now just have
one member - or have one that's not used, so get rid of those unions.

svn path=/trunk/; revision=9151
2003-12-03 09:28:26 +00:00
Guy Harris ed2ae2d8d3 Instead of requiring slab-allocated structures to have a "next" pointer,
when adding them to the free list, cast the pointer to the structure to
a pointer to a "freed_item_t" which contains the "next" pointer.

This reduces the memory requirement for some of those structures, and
leaves us free to slab-allocate structures that have a "next" pointer
for other reasons.

svn path=/trunk/; revision=9150
2003-12-03 08:53:37 +00:00
Guy Harris bd9f96738c From Didier Gautheron: put an "fvalue_t" structure into a "field_info"
structure, rather than separately allocating "fvalue_t"s and having the
"field_info" structure point to them - this appears to speed up protocol
tree construction a bit.

svn path=/trunk/; revision=9146
2003-12-02 21:15:49 +00:00
Ronnie Sahlberg 266b5a4b2e Use the LSAB_ALLOC and SLAB_FREE macros to allocate/free fvalue_t data
svn path=/trunk/; revision=9140
2003-12-02 09:47:23 +00:00
Ronnie Sahlberg 4f84e65c50 fvalue_free() is one of the most called functions.
This function is also very small, so small that teh overhead for the actual function call and return is likely to be a significant part
of its execution time.

change it into a macro and make it thus slightly faster by eliminating the function call overhead.

svn path=/trunk/; revision=9083
2003-11-25 13:20:36 +00:00
Ronnie Sahlberg 0bf28e51af Change the handling of temporary allocation of fvalue_t structures to be faster.
Use a similar technique as was used in epan/proto.c to speed up the field_info
allocation/deallocation routines

svn path=/trunk/; revision=9082
2003-11-25 08:50:38 +00:00
Gilbert Ramirez 52338a3baf Add a "contains" operator for byte-strings, strings, and tvbuffs (protocols).
The search uses a naive approach; more work is required to add a
Boyer-Moore Search algorithm.

svn path=/trunk/; revision=8280
2003-08-27 15:23:11 +00:00
Gilbert Ramirez 086774b71f Add to the fundamental types passed between the scanner and the parser.
Besides "STRING", there is now "UNPARSED_STRING", where the distinction
is that "STRING" was a double-quoted string and "UNPARSED_STRING" is just
a sequence of characters that the scanner didn't know how to scan/parse,
so it's up to the Ftype to parse it.

This gives us more flexibility and prepares the dfilter parsing engine
for the upcoming addition of the "contains" operator.

In the process of doing this, I also re-did the double-quoted string
support in the scanner, so that instead of the naively-simple support we
used to have, double-quoted strings now can have embedded dobule-quotes,
embedded octal sequences, and embedded hexadecimal sequences:
    "\""    embedded double-quote
    "\110"  embedded octal
    "\x48"  embedded hex

Enhance the dfilter unit test script to be able to run a single collection
of tests instead of having to run all of them all the time.

svn path=/trunk/; revision=8083
2003-07-25 03:44:05 +00:00
Gilbert Ramirez 6823d063ee Expand the ability of fvalue_to_string_repr, and modify more FT_* types
to provide that method.

svn path=/trunk/; revision=7849
2003-06-11 21:24:54 +00:00
Gilbert Ramirez 9615c4ef25 Provide a way for ftype modules to provide a string representation
of their value. Provide such a method for FT_BYTES, FT_UINT_BYTES,
and FT_ETHER. Have proto_alloc_dfilter_string() use the new methods.

This is part of a movement of ftype-related code out of proto.c and
into the ftype code. The immediate effect is that generated display
filters for long byte sequences don't incorrectly have trailing periods
("...") to indicate continuation.

svn path=/trunk/; revision=7100
2003-02-08 04:22:37 +00:00
Guy Harris a97b83a7f4 Add a new field type FT_FRAMENUM; an FT_FRAMENUM is a 32-bit unsigned
frame number, which is always decimal.  If you select an FT_FRAMENUM
field, there are menu items that let you go to the frame whose frame
number appears in that field.

Add FT_FRAMENUM fields for the ONC RPC "matching request is in this
frame" and "matching reply is in this frame" protocol tree items.

svn path=/trunk/; revision=6802
2002-12-19 02:58:53 +00:00
Jörg Mayer 48be4e530d Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6116
2002-08-28 20:41:00 +00:00
Guy Harris 6e56c25c9d From Ulf Lamping: add a new FT_FLOAT type, for single-precision
floating-point numbers, and display all the significant digits for both
single-precision and double-precision floating-point numbers in the
protocol tree, not just what "%g" does (6 digits).

Put in comments explaining how the length of filter strings is computed,
and fix some of the computations.

svn path=/trunk/; revision=6081
2002-08-24 19:45:28 +00:00
Jörg Mayer 3105ee542f Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the epan/ directory but leave winsock2.h in inet_pton.c
and inet_ntop.c for now (can't estimate the consequences).

svn path=/trunk/; revision=5928
2002-08-02 21:29:45 +00:00
Guy Harris 73ef5a2753 WinPcap 2.3's <pcap.h> includes <packet32.h>, and WinPcap 2.3's
<packet32.h> includes <winsock2.h>; we include that rather than
<winsock.h>, to avoid errors due to conflicting declarations in
<winsock.h> and <winsock2.h>.

svn path=/trunk/; revision=5742
2002-06-23 10:32:36 +00:00
Gilbert Ramirez 41cc7f0707 Merge the work in Novell_NCP_branch into the mainline code.
A little work still needs to be done on the new NCP dissector -- make
some of the COL_INFO texts more useful, handle a Unicode issue, and
modify some of the cases that use "request conditions".
But the NCP dissector as it stands is very usable now.

Note: I didn't merge in the PROTO_LENGTH_UNTIL_END macro... I wanted
to think about the various possible macros and review an email conversation
I had with Guy on the subject.

svn path=/trunk/; revision=5432
2002-05-09 23:50:34 +00:00
Gilbert Ramirez e36aa9657d Comment-out FT_UCS2_LE, and remove the already commented-out FT_TEXT_ONLY.
svn path=/trunk/; revision=4738
2002-02-15 09:01:21 +00:00
Guy Harris ee5ca25d31 Include files from the "epan" directory and subdirectories thereof with
"epan/..." pathnames, so as to avoid collisions with header files in any
of the directories in which we look (e.g., "proto.h", as some other
package has its own "proto.h" file which it installs in the top-level
include directory).

Don't add "-I" flags to search "epan", as that's no longer necessary
(and we want includes of "epan" headers to fail if the "epan/" is left
out, so that we don't re-introduce includes lacking "epan/").

svn path=/trunk/; revision=4586
2002-01-21 07:37:49 +00:00
Guy Harris 5511e79593 Add support for 64-bit signed integers in "int-64bit.[ch]", add an
FT_INT64 type, and make the Diameter dissector use it.

Handle the 64-bit integer types in the display filter semantics checks.

svn path=/trunk/; revision=4125
2001-11-02 10:09:51 +00:00
Guy Harris d82c74d757 From Ronnie Sahlberg: FT_UINT64 support, code to handle 64-bit integers
without requiring compiler support for them, and updates to the
Diameter, L2TP, NFS, and NLM dissectors to use it and to the ONC RPC
dissector to allow ONC RPC subdissectors to use it.

svn path=/trunk/; revision=4099
2001-10-29 21:13:13 +00:00
Guy Harris 07c2ce1bad Get rid of no-longer-necessary includes of <sys/time.h>.
svn path=/trunk/; revision=3936
2001-09-14 07:23:34 +00:00
Guy Harris 1d42c94b05 Make the resolution for time values be nanoseconds rather than
microseconds.

Fix some "signed vs. unsigned" comparison warnings.

svn path=/trunk/; revision=3934
2001-09-14 07:10:13 +00:00
Richard Sharpe 8e23078d1b Add FT_UCS2_LE as a field type in prep for adding unicode handling proto_tree
routines.

svn path=/trunk/; revision=3843
2001-08-12 11:46:23 +00:00
Gilbert Ramirez 2a50f8af4f Add Ed Warnicke's drange code to the new dfilter system.
Not supported yet: [i-j] (offset-offset)
Supported:
	[i]	index
	[i:j]	offset:length
	[:j]	0:offset
	[i:]	offset:end
	[x,y]	concatenation of slices

svn path=/trunk/; revision=3080
2001-02-27 19:23:30 +00:00
Gilbert Ramirez 8f1fff2e6a Create a more modular type system for the FT_* types. Put them
into epan/ftypes.

Re-write display filter routines using Lemon parser instead of yacc.
Besides using a different tool, the new grammar is much simpler, while
the display filter engine itself is more powerful and more easily extended.

Add dftest executable, to test display filter "bytecode" generation.
Add option to "configure" to build dftest or randpkt, both of which are not
built by default.

Implement Ed Warnicke's ideas about dranges in the new display filter and
ftype code.

Remove type FT_TEXT_ONLY in favor of FT_NONE, and have protocols registered
as FT_PROTOCOL. Thus, FT_NONE is used only for simple labels in the proto tree,
while FT_PROTOCOL is used for protocols. This was necessary for being
able to make byte slices (ranges) out of protocols, like "frame[0:3]"

Win32 Makefile.nmake's will be added tonight.

svn path=/trunk/; revision=2967
2001-02-01 20:21:25 +00:00