aboutsummaryrefslogtreecommitdiffstats
path: root/proto.h
Commit message (Collapse)AuthorAgeFilesLines
* Removed from the display filter/proto_tree code the assumption thatGilbert Ramirez1999-08-291-8/+23
| | | | | | | | | | | | | | | a protocol occurs only once in a packet. Because of encapsulation (IP within IP), a protocol can occur more than once. I don't have a packet trace showing such a packet, but the code should handle it now. The one thing that it cannot do, though, is differentiate the levels. It might be nice to say: ip{1}.src == 192.168.1.1 && ipx{2}.dst == 10.0.0.1 In the dfilter grammar I had left IPXNET variables out of the list of variables that could be checked for existence. Now you can check for the existence of ipx.srcnet and ipx.dstnet. Hurrah. svn path=/trunk/; revision=608
* Introduces a new global gboolean variable: proto_tree_is_visible.Gilbert Ramirez1999-08-261-2/+18
| | | | | | | | This is set before calling dissect_packet() to let the proto_tree routines whether or not it needs to go through the trouble of formatting strings. The use of this dramatically decreases the number of calls to vsnprintf. svn path=/trunk/; revision=583
* The dfilter yacc grammar now keeps track of every GNode that it allocates.Gilbert Ramirez1999-08-261-1/+6
| | | | | | | | | | | | After a bad parse, instead of leaking this memory, the memory used for those GNodes is now freed. Added some memory-freeing "cleanup" routines for the dfilter and proto_tree modules, which are called right before ethereal exits. Maybe once we get a complete set of cleanup routines, we'll be able to better check if memory is leaking. svn path=/trunk/; revision=582
* Removed unneeded 'color' field from header_field_info.Gilbert Ramirez1999-08-141-2/+1
| | | | svn path=/trunk/; revision=482
* Changed the display filter scanner from GLIB's GScanner to lex. The codeGilbert Ramirez1999-08-011-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as it standed depends on your lex being flex, but that only matters if you're a developer. The distribution will include the dfilter-scanner.c file, so that if the user doesn't modify dfilter-scanner.l, he won't need flex to re-create the *.c file. The new lex scanner gives me better syntax checking for ether addresses. I thought I could get by using GScanner, but it simply wasn't powerful enough. All operands have English-like abbreviations and C-like syntax: and, && ; or, || ; eq, == ; ne, != ; , etc. I removed the ETHER_VENDOR type in favor of letting the user use the [x:y] notation: ether.src[0:3] == 0:6:29 instead of ether.srcvendor == 00:06:29 I implemented the IPXNET field type; it had been there before, but was not implemented. I chose to make it use integer values rather than byte ranges, since an IPX Network is 4 bytes. So a display filter looks like this: ipx.srcnet == 0xc0a82c00 rather than this: ipx.srcnet == c0:a8:2c:00 I can supposrt the byte-range type IPXNET in the future, very trivially. I still have more work to do on the parser though. It needs to check ranges when extracting byte ranges ([x:y]) from packets. And I need to get rid of those reduce/reduce errors from yacc! svn path=/trunk/; revision=414
* Modified the proto_register_field_array usage again. Thanks to Guy'sGilbert Ramirez1999-07-151-11/+10
| | | | | | | | | | | | | | | | | | | suggestion, this new method using a static array should use less memory and be faster. It also has a nice side-effect of making the source-code more readble, IMHO. Changed the print routines to look for protocol proto_data instead of looking at the text label as they did before, hoping that the data hex dump field item starts with "Data (". Added the -G keyword to ethereal to make it dump a glossary of display filter keywords to stdout and exit. This data is then formatted with the doc/dfilter2pod perl program to pod format, which is combined with doc/ethereal.pod.template to create doc/ethereal.pod, from which the ethereal manpage is created. This way we can keep the manpage up-to-date with a list of fields that can be filtered on. svn path=/trunk/; revision=364
* Added support for compiling on win32 with Visual C and 'nmake'. It compiles,Gilbert Ramirez1999-07-131-1/+8
| | | | | | | | | | | | but does not link. Perhaps someone who understands the MS tools can help out. I made it link a few months ago, but with different version of glib/gtk+. I can't remember how I made it link. Most of the compatibility issues were resolved with adding #ifdef HAVE_UNISTD_H the the source code. Please be sure to add this to all future code. svn path=/trunk/; revision=359
* "const"ifty some function arguments and structure members, and "#if 0"Guy Harris1999-07-071-4/+4
| | | | | | | out the declaration of a variable used only by "#if 0"ed out code, to eliminate some compiler warnings. svn path=/trunk/; revision=344
* Created a new protocol tree implementation and a new display filterGilbert Ramirez1999-07-071-0/+165
mechanism that is built into ethereal. Wiretap is now used to read all file formats. Libpcap is used only for capturing. svn path=/trunk/; revision=342