Age | Commit message (Collapse) | Author | Files | Lines |
|
structure to the "packet_info" structure; only stuff that's permanently
stored with each frame should be in the "frame_data" structure, and the
"column_info" structure is not guaranteed to hold the column values for
that frame at all times - it was only in the "frame_data" structure so
that it could be passed to dissectors, and, as all dissectors are now
passed a pointer to a "packet_info" structure, it could just as well be
put in the "packet_info" structure.
That saves memory, by shrinking the "frame_data" structure (there's one
of those per frame), and also lets us clean up the code a bit.
svn path=/trunk/; revision=4370
|
|
take a dissector handle as an argument, rather than a pointer to a
dissector function and a protocol ID. Associate dissector handles with
dissector table entries.
svn path=/trunk/; revision=4308
|
|
Tim Newsham.
Add in missing item for WTAP_ENCAP_CISCO_IOS in the Wiretap
encapsulation type table.
svn path=/trunk/; revision=4290
|
|
which also takes a handle as an argument and thus doesn't call
dissect_data directly.
svn path=/trunk/; revision=4270
|
|
svn path=/trunk/; revision=4269
|
|
of packet data captured.
Make the "BYTES_ARE_IN_FRAME()" macro take a "captured length of the
packet" argument.
Add some length checks to capture routines.
svn path=/trunk/; revision=4235
|
|
room, it might return -1 in some versions of glibc; check for that, and
quit if that happens.
It might also return the number of characters that would've been printed
had there been enough room; this means that a loop that does
n += snprintf (buf + n, BUF_LENGTH - n, ...);
may end up making "n" bigger than BUF_LENGTH, and "snprintf()" might not
sanely handle being passed a negative length, so if "n" isn't less than
the total length of the string buffer, don't add stuff to it.
svn path=/trunk/; revision=3952
|
|
8-bit value), and the raw data of an SSID parameter is the
interpretation, so the buffer into which we put the interpretation must
be at least 256 bytes long; it's an array of size SHORT_STR, so boost
SHORT_STR to 256.
svn path=/trunk/; revision=3951
|
|
with both source and destination addresses - one instance with the
source address, and one instance with the destination address - to allow
display filtering that checks both the source and destination address
against a single value (as the other 802.x dissectors, and the FDDI
dissector, do).
svn path=/trunk/; revision=3785
|
|
frames (with a length field rather than a type field, but with no 802.2
header in the payload), and just stick the payload into an 802.11 frame.
I've seen captures that show frames of that sort.
This means we have to do the same check for Netware 802.3 - or, if you
will, "Netware 802.11" - that we do in the Ethernet dissector, i.e.
checking for 0xffff as the first four bytes of the payload and, if we
find it, treating it as an IPX frame.
svn path=/trunk/; revision=3759
|
|
Don't bother doing the WEP processing and child-tvbuff construction for
frames other than management and data frames, as they have no payload to
be WEP-encrypted or dissected.
svn path=/trunk/; revision=3600
|
|
that you can open up that protocol without opening up the 802.11 MAC
header; this can save some screen real estate.
Make the tree item for all the WEP parameters a text item, rather than a
"string" field with a null string pointer, as "strings" with null string
pointers give the filtering code gastric distress.
Dissect the WEP initialization vector as an FT_UINT24 (as it's a 3-byte
field), and dissect the key ID as part of an FT_UINT8 (as it's in an
8-bit byte).
After dissecting the frame control field, dissect the rest of the header
in one switch statement, and then:
handle WEP-encrypted frames with common code for all frame
types;
handle the payload of other frames.
(If we can supply the relevant keys to Ethereal, we could perhaps add
code to decrypt the WEP payload and then dissect the decrypted payload
the same way we dissect un-encrypted payloads.)
svn path=/trunk/; revision=3599
|
|
#defining all the bits in the flags field, and using those #defines in
the macros to test the flag fields, the macros fot the data address
types, the value_string table for the data frame to/from DS
combinations, and the bitfields for the flag bits.
svn path=/trunk/; revision=3598
|
|
Make routines not used outside this module static.
Make "find_header_length()" return the correct value for management and
control frames.
svn path=/trunk/; revision=3590
|
|
integral value from a packet - "tvb_get_letohs()" can do that just fine.
Don't use "tvb_get_ptr()", casting the result to a "guint16 *", and
dereferencing that pointer, either: that doesn't handle byte order
correctly, and it may fail if the pointer isn't aligned on a 2-byte
boundary.
For that matter, don't just use "tvb_get_ptr()" and dereference the
result to get an 8-bit quantity.
Use "proto_tree_add_item()" in many places where it's possible.
Reuse the results of "tvb_get_ptr()" calls when possible.
Show the fragment number and sequence number in decimal - they're just
ordinals.
Fix the blurb for the sequence number field.
svn path=/trunk/; revision=3589
|
|
Give the type field values names, rather than just showing them as 0, 1,
and 2.
svn path=/trunk/; revision=3588
|
|
and put it under the top-level 802.11 protocol item, so you don't have
to open the frame control field to see it.
Rename the variable for it, and the value_string array for it, to
indicate that it's made out of the type and subtype fields.
svn path=/trunk/; revision=3587
|
|
instead of having four identical copies of that code in switch
statements, just handle all four of them with the same case.
svn path=/trunk/; revision=3586
|
|
for all Association Request frames, or all frames except for
Clear-to-send frames, or....
Compute the composed frame type early in the dissection process, and set
the Info column as soon as you've done that, rather than doing it in the
later switch statement.
svn path=/trunk/; revision=3585
|
|
protocol tree; not only is putting it at the top level a little weird,
it upsets the heck out of the protocol-statistics code, causing it to
abort. Put the fixed and tagged parameters under the top-level entry
for 802.11 (where one of the fixed-parameters entries already was).
Call the top-level item just "IEEE 802.11", not "IEEE 802.11 Header", as
it includes management-frame information.
svn path=/trunk/; revision=3584
|
|
svn path=/trunk/; revision=3583
|
|
interpretation of the address fields, in DATA_ADDR_T{1,2,3,4} format.
Clean up a bunch of other macros to enclose their argument in
parentheses.
Clean up "find_header_length()" - it only needs to take the frame
control field of the frame as an argument, and should just check whether
"COOK_ADDR_SELECTOR()" returns DATA_ADDR_T4.
"tofrom_ds" is a value_string table, not a true_false_string table, so
wrap it in "VALS()", not "TFS()".
Don't fetch the header length in N different places in the main
dissector - just fetch it once and use it throughout.
svn path=/trunk/; revision=3582
|
|
Joerg Mayer.
svn path=/trunk/; revision=3578
|
|
"header_field_info" structure, including the ones that are later set by
the routines to register fields.
svn path=/trunk/; revision=3561
|
|
Supply "true" and "false" strings for the Order flag bit.
svn path=/trunk/; revision=3538
|
|
standard fashion, for data and managment packets, and set the columns
correctly for other packets (as we currently put address types in the
address columns; if we don't do so, we could just set the addresses in
the standard fashion for those packets as well).
svn path=/trunk/; revision=3536
|
|
Don't bother doing multiple "tvb_get_letohs()" to get the frame control
field - we fetched it once, just use the value we fetched.
Call sub-dissectors *regardless* of whether a protocol tree is being
built or not - dissectors should always do so.
svn path=/trunk/; revision=3524
|
|
svn path=/trunk/; revision=3494
|
|
Don't use "pinfo->captured_len" to check the length of the packet -
that's the length of the *entire* frame, not the length of the portion
that belongs to the 802.11 dissector (there are currently no dissectors
for protocols in which 802.11 is encapsulated, so it doesn't currently
make a difference, but dissectors should use "tvb_length()" and so on to
get that information for the tvbuff they were handed).
svn path=/trunk/; revision=3483
|
|
people don't blindly insert the old address into new dissectors, which
is probably how it got into the dissectors being fixed here.
svn path=/trunk/; revision=3348
|
|
"etypes.h".
svn path=/trunk/; revision=3314
|
|
"tvb_get_ptr()".
Display a "(B)" flag for supported rates that are in the BSSBasicRate
Set.
svn path=/trunk/; revision=3129
|
|
usages of tvb_get_ptr(). packet-ieee80211.c still has one bad usage,
in which it *does* modify the tvbuff's data.
svn path=/trunk/; revision=3128
|
|
Correct number of addresses shown in dataframes.
Duration ID changed to "Association ID" in power-save polls
Added sequence and fragment numbers.
Corrected representation of frame-control flags.
Added dissection of data frames with piggybacked CF-Ack, Poll but no
data.
Cleaned up code a bit (mostly empty lines)...
svn path=/trunk/; revision=2964
|
|
Also, print unsigned quantities with %u, not %d.
svn path=/trunk/; revision=2936
|
|
"pinfo->current_proto", in dissectors always called through dissector
tables and handles.
Make the IEEE 802.11 dissector static, as it's not called externally.
Clear the Info column in the Linux cooked capture and 802.1q VLAN
dissectors, before extracting anything from the packet, so that if an
exception is thrown, the Info column doesn't reflect the previous
protocol.
Don't extract the encapsulated protocol in the VLAN dissector until you
use it, so that if the frame contains the VLAN ID but not the
encapsulated protocol, we at least put the VLAN ID into the protocol
tree.
svn path=/trunk/; revision=2927
|
|
little-endian, so "capture_ieee80211()" should use "pletohs()", not
"pntohs()", to fetch it.
Also, "pletohs()" takes a *pointer* to the object to be fetched as an
argument.
svn path=/trunk/; revision=2863
|
|
"{old_}heur_dissector_add()", "{old_}conv_dissector_add()", and
"register_dissector()", so that an entry in those tables has associated
with it the protocol index of the protocol the dissector handles (or -1,
if there is no protocol index for it).
This is for future use in a number of places.
(Arguably, "proto_register_protocol()" should take a dissector pointer
as an argument, but
1) it'd have to handle both regular and heuristic dissectors;
2) making it take either a "dissector_t" or a union of that and
a "heur_dissector_t" introduces some painful header-file
interdependencies
so I'm punting on that for now. As with other Ethereal internal APIs,
these APIs are subject to change in the future, at least until Ethereal
1.0 comes out....)
svn path=/trunk/; revision=2849
|
|
static, and have other dissectors call them through handles.
svn path=/trunk/; revision=2816
|
|
protocols, in addition to adding structures to the list of filterable
fields. Give it an extra argument that specifies a "short name" for the
protocol, for use in such places as
pinfo->current_proto;
the dialog box for constructing filters;
the preferences tab for the protocol;
and so on (although we're not yet using it in all those places).
Make the preference name that appears in the preferences file and the
command line for the DIAMETER protocol "diameter", not "Diameter"; the
convention is that the name in question be all-lower-case.
Make some routines and variables that aren't exported static.
Update a comment in the ICP dissector to make it clear that the
dissector won't see fragments other than the first fragment of a
fragmented datagram.
svn path=/trunk/; revision=2810
|
|
svn path=/trunk/; revision=2732
|
|
"proto_reg_handoff_wlan()", to match "proto_register_wlan()".
Call it "IEEE 802.11 wireless LAN", not "Wireless ethernet" - that makes
it clearer what type of wireless LAN it is (which *isn't* Ethernet at
the MAC layer, although I suspect many of the drivers make it look like
Ethernet to the rest of the system).
svn path=/trunk/; revision=2717
|
|
dissect_fddi_not_bitswapped() and dissect_fddi_bitswapped(), both of which
use the standard 3-argument tvbuffified-dissector argument list.
Add a dissector table called "wtap_encap" which is used to call dissectors
from dissect_frame(). The switch() statement from this top-level dissector
is removed.
The link-layer dissectors register themselves with the "wtap_encap"
dissector table. The dissectors are now static where possible.
svn path=/trunk/; revision=2708
|
|
can be put, and a pointer to the string for the column, which might or
might not point to that buffer.
Add a routine "col_set_str()", which sets the string for the column to
the string passed to it as an argument; it should only be handed a
static string (a string constant would be ideal). It doesn't do any
copying, so it's faster than "col_add_str()".
Make the routines that append to columns check whether the pointer to
the string for the column points to the buffer for the column and, if
not, copy the string for the column to the buffer for the column so that
you can append to it (so you can use "col_set_str()" and then use
"col_append_str()" or "col_append_fstr()").
Convert a bunch of "col_add_str()" calls that take a string constant as
an argument to "col_set_str()" calls.
Convert some "col_add_fstr()" calls that take a string constant as the
only argument - i.e., the format string doesn't have any "%" slots into
which to put strings for subsequent arguments to "col_set_str()" calls
(those calls are just like "col_add_str()" calls).
Replace an END_OF_FRAME reference in a tvbuffified dissector with a
"tvb_length(tvb)" call.
svn path=/trunk/; revision=2670
|
|
declare it, and define a "BIT_SWAP" macro that uses it, in
"epan/bitswap.h".
Use that macro to bit-swap bytes in the IEEE 802.11 dissector, rather
than the macro that was used (said macro used GCCisms and didn't compile
on Windows).
Make an "init_plugin()" routine to enable a plugin and call its init
routine, and call it from "check_plugin_status()" and
"plugins_enable_cb()", rather than having very similar code in two
places; "patable" is now part of libethereal, and, at least on Windows,
attempts to refer to it from "libui" failed. Make "patable" static to
"epan/plugins.c". (This may still not work, as now "libui" is calling a
routine in "libethereal"; if that fails, perhaps it's time to get rid of
the "enable/disable plugins" stuff completely, as new-style plugins, at
least, register themselves as protocols and should be controllable from
the "Edit->Protocols" window just as built-in dissectors are.)
svn path=/trunk/; revision=2649
|
|
Add in stuff for a bunch of libpcap formats either in libpcap 0.5.2 or
in the current CVS version; we don't implement all of them in
Ethereal/Wiretap (those are "#if 0"ed out), but we do implement the IEEE
802.11 stuff (which isn't yet in libpcap or tcpdump, but the CVS version
of libpcap *does* reserve 105 as the encapsulation type number for
802.11).
svn path=/trunk/; revision=2646
|