in tvbuff terminology). This is implemented for TVBUFF_REAL and TVBUFF_SUBSET
so far; support for TVBUFF_COMPOSITE is coming soon.
Throw either ReportedBoundsError or BoundsError.
A ReportedBoundsError is reported as "Malformed Frame" since the protocol
stated that a certain number of bytes should be available but they weren't.
A BoundsError is reported as a "Short Frame" since the snaplen was too short.
Register proto_short (BoundsError) and proto_malformed (ReportedBounds)
so searches can be made on "short" and "malformed".
svn path=/trunk/; revision=1965
Modify ethernet dissector to catch BoundsError if the attempt to
create next_tvb with the length specified in the ethernet header throws
an exception. In that case, next_tv is created with as many bytes as
are available in the frame.
Both dissect_tr() and dissect_eth() now have TRY blocks, which means
I had to fiddle with 'volatile' and 'static' storage options to get
things right (at least according to gcc).
svn path=/trunk/; revision=1962
selected before we started re-colorizing or re-filtering the display, as
when the first row is added to the clist, that may be selected and thus
made the current frame.
This means that we can't find the row corresponding to the
previously-selected frame, if any, by checking as each packet is
colorized/filtered and see whether its "frame_data" structure is equal
to "cf->current_frame", as that'll always say that the first frame in
the display is the selected frame.
Instead, we recored the value of "cf->current_frame" before we do
anything to the clist, have "add_packet_to_packet_list()" return either
the row number of the frame (if it passed the filter and thus was added
to the clist) or -1 (if it didn't pass the filter and thus wasn't added
to the clist), and, after "add_packet_to_packet_list()", if the current
frame is the one that was the selected row, remember its row number (if
any), and, when we're finished colorizing/filtering the display, make
that row the current row if it's not -1 (-1 means that the selected row
didn't pass the filter).
Also, don't do that until after we've thawed the clist, as the vertical
adjustment for the clist doesn't reflect reality until then, and
attempting to go to a given row won't work right until the vertical
adjustment for the clist reflects reality.
Shove all the code to set the selected and focus rows, and to make said
row visible, into a routine, so the "Find Frame" and "Go To Frame" code
can use it as well.
svn path=/trunk/; revision=1959
spec (which covers some of what this file dissects).
Dissect the share type in NetShareEnum replies as a type value (using
values from said spec), not just as a number.
svn path=/trunk/; revision=1958
to little-endian shorts - and to convert host-byte-order longs to
little-endian shorts (if the host-byte-order long will fit into a short,
"htoles()" does the right thing; if it doesn't, there is no right thing
to do - perhaps we should return a wiretap error, although, at least at
present, it's unlikely that we'll have packets bigger than 65535 bytes,
so it's unlikely that the values won't fit into a short).
svn path=/trunk/; revision=1953
Tethereal was dying on me because err was initialized to some random value.
It was this section of code that would exit even if wtap_loop was successful
(returned TRUE) because err was never initialized or set to anything.
err = load_cap_file(&cf, out_file_type);
if (err != 0) {
dissect_cleanup();
exit(2);
}
<BIGGER sheepish grin>
Fixed even more errors in LLC dissector. I had inadvertantly used the
wrong tvbuff_t* when calling dissect_data_tvb(). There is no way we are going
to be successful in this tvbuff conversion w/o regression testing. I'm
working on setting up a simple Makefile for regression testing tonight.
That's why I'm finding so many bugs in my LLC conversion.
</BIGGER sheepish grin>
svn path=/trunk/; revision=1946
Fix error in my conversion to tvbuff routines.
Because offset was calculated based on next_tvb, which already knew to
skip 8 bytes, I don't have to use "offset+8" in calls to the next non-tvbuff
dissectors.
</sheepish grin>
svn path=/trunk/; revision=1945
Non-tvbuff dissectors create a tvbuff when calling dissect_llc()
Changed name of current_proto to match string in COL_PROTO ("FDDI" instead of "fddi")
Changed short text to be: [Short Frame: %s] where %s is current_proto.
svn path=/trunk/; revision=1943
Add exceptions routines.
Convert proto_tree_add_*() routines to require tvbuff_t* argument.
Convert all dissectors to pass NULL argument ("NullTVB" macro == NULL) as
the tvbuff_t* argument to proto_tree_add_*() routines.
dissect_packet() creates a tvbuff_t, wraps the next dissect call in
a TRY block, will print "Short Frame" on the proto_tree if a BoundsError
exception is caught.
The FDDI dissector is converted to use tvbuff's.
svn path=/trunk/; revision=1939
only the dissector source files, not the header files; that way you
don't feed the header files to "make-reg-dotc", as "make-reg-dotc" won't
find any registration routines there so there's no point in feeding
header files to it.
Doing so means that we can make "DISSECTOR_OBJECTS" in "Makefile.nmake"
by doing
DISSECTOR_OBJECTS = $(DISSECTOR_SOURCES:.c=.obj)
rather than separately enumerating the object files, as Nmake supports
System V "make"-style substitution.
This should let users who change "DISSECTOR_SOURCES" in one of those
files just copy it to the other file.
svn path=/trunk/; revision=1938
display to be sorted by the value in that column (and to reverse the sort
order the next time you click on that column).
Use "F<>" rather than "B<>" for file names in the Ethereal man page.
svn path=/trunk/; revision=1931
pointer is NULL - so that, instead of doing nothing if the user selects
"Edit->Preferences" when there's already a "Preferences" dialog box
open, we raise and de-iconify that window.
Connect the preferences dialog box and any file selection dialog box
opened from its Print tab, so that:
if the preferences dialog box goes away, so does the file
selection dialog box (as it no longer has a text widget into
which it can stuff the selected file name);
if the "File:" button is clicked when there's already a file
selection dialog box open, we just reactivate that existing
dialog box rather than popping up a new one.
Catch the ESC key in the file selection dialog box popped up for the
"File:" button in the Print tab of the Preferences dialog box, and make
it cancel the file selection dialog box.
svn path=/trunk/; revision=1922
"File->Open", "File->Save As", and the "File:" buttons in the Capture
Preferences and Print dialog boxes, and make it cancel the file
selection dialog box.
svn path=/trunk/; revision=1921
mnemonics.
Give the button, in the "Display Options" dialog box, that controls
whether name resolution is enabled or not the same label ("Enable name
resolution") as the equivalent button in the "Capture Preferencs" dialog
box.
svn path=/trunk/; revision=1920
box it has open, so that:
if the capture preferences dialog box goes away, so does the
file selection dialog box (as it no longer has a text widget
into which it can stuff the selected file name);
if the "File:" button is clicked when there's already a file
selection dialog box open, we just reactivate that existing
dialog box rather than popping up a new one.
svn path=/trunk/; revision=1919
pointer is NULL - so that, instead of doing nothing if the user selects
"File->print" when there's already a "Print" dialog box open, we raise
and de-iconify that window.
Connect the print dialog box and any file selection dialog box it has
open, so that:
if the print dialog box goes away, so does the filter dialog box
(as it no longer has a text widget into which it can stuff the
selected file name);
if the "File:" button is clicked when there's already a file
selection dialog box open, we just reactivate that existing
dialog box rather than popping up a new one.
svn path=/trunk/; revision=1918
the pointer is NULL - so that, instead of doing nothing if the user
selects "Display->Options" when there's already a "Display Options"
dialog box open, we raise and de-iconify that window.
Register a "destroy" callback for the "Display Options" window, so that
no matter how it's destroyed, even if it's destroyed by a window manager
close button rather than by clicking the "OK" or "Cancel" button, we
note that fact by clearing the pointer to the current "Display Options"
window, so that if the user then selects "Display->Options", we know
that we need to pop a new "Display Options" window up.
svn path=/trunk/; revision=1917
that contain an "_" preceding a letter, indicating that the letter is to
be underlined in the label, and that if the key for that letter is
pressed (either with Alt or without it) in the dialog box to which the
button belongs, and the widget with the input focus doesn't do anything
with that button, the button is sent the "clicked" signal.
Attach mnemonics to the buttons in the "Display->Options" dialog box.
svn path=/trunk/; revision=1915