Commit Graph

57 Commits

Author SHA1 Message Date
Nathan Neulinger c7a64bbc34 add initial support for newer opcodes
svn path=/trunk/; revision=10855
2004-05-11 14:21:48 +00:00
Jörg Mayer 6f6fc13e5b Trivial signed/unsigned warning fixes
svn path=/trunk/; revision=9734
2004-01-19 18:36:32 +00:00
Guy Harris 46ce3ac2fa There might not be any AFS payload in an AFS reply; for fields in the
reply that don't come from the packet, use an offset and length of 0, so
that we don't throw an exception if the purported data at that offset
with that length doesn't exist.

svn path=/trunk/; revision=9453
2003-12-27 03:45:45 +00:00
Ronnie Sahlberg f3868672bf Update for AFS and related protocols so that time between Request and
Response is calculated in the same way as for oncrpc, dcerpc, smb...

requests where a reply has been matched will now have a
Reply In:<framenumber>
in the tree pane.
replies where the request has been seen will have
Request In:<framenumber>
Time since request:<seconds>

later tethereal and ethereal rtt stats will be implemented.

svn path=/trunk/; revision=7284
2003-03-05 09:52:22 +00:00
Guy Harris 98d422ac68 "hf_afs_bos_status" is an FT_INT32, so it can't be put into the tree
with "proto_tree_add_uint()", which "OUT_UINT()" uses; use "OUT_INT()"
instead.

svn path=/trunk/; revision=7010
2003-01-27 22:11:52 +00:00
Guy Harris b0e2e98ec8 Rename OUT_DATE to OUT_TIMESECS, as it can be used for relative time in
seconds as well as for UNIX-style date/time stamps.

FT_ABSOLUTE_TIME fields don't have a base, so use BASE_NONE.

Make hf_afs_fs_callback_expires an FT_RELATIVE_TIME, as it's a relative
time not an absolute UNIX time.

svn path=/trunk/; revision=6937
2003-01-18 02:18:39 +00:00
Guy Harris a56c79201d Arguments to hash routines are gconstpointer's; assign them to const
pointers.

The first argument to "sscanf()" is a "const char *"; don't cast const
pointers to "char *" when passing them to "sscanf()".

Assign the result of "tvb_get_ptr()" to const pointers, not non-const
pointers.

Make the "pdata" argument to various DCE routines a const pointer.

svn path=/trunk/; revision=6688
2002-11-28 03:57:50 +00:00
Gerald Combs efd65d42bf Display AFS KAUTH information, from Loic Tortay
svn path=/trunk/; revision=6360
2002-09-30 02:19:38 +00:00
Jörg Mayer 7c4176d868 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=6117
2002-08-28 21:04:11 +00:00
Jörg Mayer 173fe5aef4 Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the toplevel directory. The removal of winsock2.h will
hopefully not cause any problems under MSVC++, as those files using
struct timeval still include wtap.h, which still includes winsock2.h.

svn path=/trunk/; revision=5932
2002-08-02 23:36:07 +00:00
Guy Harris 7f22bc6e1a From Loic Tortay: fix a crash when dissecting AFS authentication
requests - the data part of the AFS authentication request
(hf_afs_kauth_data) is displayed as a string whilst declared as a binary
array in "packet-afs-register-info.h".

svn path=/trunk/; revision=5661
2002-06-13 06:43:46 +00:00
Guy Harris ae88c45ef0 From Joerg Mayer: make a pile of stuff not used outside one source file
static, and add a new "packet-data.h" to declare "proto_data".

Display escape sequences in octal in the IAPP dissector, as is now done
in the RADIUS dissector.

svn path=/trunk/; revision=5441
2002-05-10 23:20:38 +00:00
Guy Harris 1bff9074ef Note a problem with "GETSTR".
svn path=/trunk/; revision=5404
2002-05-06 01:25:45 +00:00
Guy Harris a2de5f613b From Joerg Mayer: flag unused arguments as such.
svn path=/trunk/; revision=5360
2002-05-02 10:59:37 +00:00
Nathan Neulinger 089a32b1eb rename some macros, start getting rid of redundant macros, add more vldb dissection
svn path=/trunk/; revision=4711
2002-02-08 22:36:21 +00:00
Nathan Neulinger dccf95c021 dissect flags, more vldb fixes
svn path=/trunk/; revision=4690
2002-02-03 18:12:04 +00:00
Gilbert Ramirez bd4a9c13eb Provide tvb_ensure_length_remaining(), which is like
tvb_length_remaining() except that it throws BoundsError if 'offset'
is out-of-bounds.

Allow a length argument of -1 for FT_STRING and FT_BYTES fields
in proto_tree_add_item().

Change some dissectors to either use -1 for the length argument in
calls to proto_tree_add_item(), or call tvb_ensure_length_remaining()
instead of tvb_length_remaining(), or to check the return-value
of tvb_length_remaining(). Changes to more dissectors are necessary,
but will follow later.

svn path=/trunk/; revision=4656
2002-02-01 04:34:17 +00:00
Guy Harris eb2d6593dc Replace a bunch of "tvb_length()" and "tvb_length_remaining()" calls in
arguments to "proto_tree_add_text()", and to "proto_tree_add_XXX()" calls
that add FT_NONE or FT_PROTO items to the protocol tree, with -1.

Replace some calls to "tvb_length()" or "tvb_length_remaining()" with
calls to "tvb_reported_length()" and "tvb_reported_length_remaining()",
as those give the actual length of the data in the packet, not just the
data that happened to be captured.

svn path=/trunk/; revision=4605
2002-01-24 09:20:54 +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
Nathan Neulinger f808c9f0de get-entry-by-name-u updates
svn path=/trunk/; revision=4570
2002-01-18 21:46:51 +00:00
Nathan Neulinger 805aa64c89 slight improvements to afs parsing, bulkstatus still needs work
svn path=/trunk/; revision=4569
2002-01-18 21:30:05 +00:00
Guy Harris 23319ff023 Move the pointer to the "column_info" structure in the "frame_data"
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
2001-12-10 00:26:21 +00:00
Guy Harris 0c13da5c70 Rename the "private" member of the "packet_info" structure to
"private_data", to keep C++ compilers from getting heartburn.

svn path=/trunk/; revision=4130
2001-11-03 00:58:52 +00:00
Guy Harris 3388bde488 Instead of having a single datum attached to a conversation, have a list
of protocol-id-plus-datum pairs, so that multiple protocols can attach
information to the same conversation.

Dissectors that attach information to a conversation should not assume
that if they find a conversation it has one of its data attached to it;
the conversation might've been created by another dissector.

svn path=/trunk/; revision=3901
2001-09-03 10:33:12 +00:00
Guy Harris ddfdc5bfb1 Replace the protocol-specific data in the "packet_info" structure with a
"void *" that a dissector can set to point to such a structure; that
means that the stuff in the epan directory doesn't have to know anything
about the protocol-specific private data one dissector passes to
another, and that structure doesn't have to be changed if a dissector
wants to pass some new type of data to another dissector.

svn path=/trunk/; revision=3818
2001-08-04 04:04:35 +00:00
Guy Harris b9222c0011 Various signed vs. unsigned fixes, from Joerg Mayer.
svn path=/trunk/; revision=3560
2001-06-18 01:49:17 +00:00
Guy Harris fe4dc960d3 Call the AFS dissector through a handle.
Update Gerald's e-mail address.

svn path=/trunk/; revision=3458
2001-05-27 05:00:17 +00:00
Guy Harris d2ef0cf51a RX and AFS dissectors tvbuffified, and bugs fixed, by Ronnie Sahlberg.
svn path=/trunk/; revision=3454
2001-05-27 01:48:25 +00:00
Nathan Neulinger e453b3e5de simplistic check for encrypted data
svn path=/trunk/; revision=3248
2001-04-02 19:10:06 +00:00
Nathan Neulinger 6f5497ef8a misc afs/rx updates - more dissection, etc.
svn path=/trunk/; revision=3190
2001-03-26 15:27:55 +00:00
Nathan Neulinger 848fa23499 Misc ubik/afs updates to correct a SEGV and add some more
dissection. Will be more coming, but wanted to commit these before I headed
home.

svn path=/trunk/; revision=3172
2001-03-23 21:42:37 +00:00
Guy Harris 0e7c1de08a Have "proto_register_protocol()" build a list of data structures for
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
2001-01-03 06:56:03 +00:00
Uwe Girlich d27c24579a Small code optimization to make it possible to compile on ReliantUNIX.
svn path=/trunk/; revision=2723
2000-11-30 14:09:14 +00:00
Gerald Combs 2c456a433a Fix buffer overruns:
- packet-afs.c: dissect_acl() didn't restrict the size of a string read
    with sscanf().  An exploit has been released.

  - packet-nbns.c: When passed an illegal name, get_nbns_name() would
    overrun nbname with an error message.  This isn't exploitable AFAIK,
    but it could result in a crash.

  - packet-ntp.c: dissect_ntp() wasn't checking the length of the
    reference clock's host name.  This is most likely exploitable.
    This fix simply lops off the end of the host name if it's too long.
    We should probably add an ellipsis (...) as we have done in other
    places in the code.

svn path=/trunk/; revision=2671
2000-11-19 16:58:57 +00:00
Guy Harris 252d55d80f For each column, have both a buffer into which strings for that column
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
2000-11-19 08:54:37 +00:00
Nathan Neulinger 019109a764 more decoding of afs bos traffic
svn path=/trunk/; revision=2556
2000-11-03 22:11:36 +00:00
Nathan Neulinger c63dddfcd3 finished up afs fs requests, more macros implemented
svn path=/trunk/; revision=2555
2000-11-03 19:27:11 +00:00
Nathan Neulinger 2cdf2ad90d finished up structure for fs replies, though macros still need implemented
svn path=/trunk/; revision=2554
2000-11-03 18:37:24 +00:00
Nathan Neulinger 83547932cf Split into a separate files. Started adding a bunch more decoding of
structures. Renamed decoding macros to get them more consistent and in
line with AFS data types wherever possible.

svn path=/trunk/; revision=2553
2000-11-03 17:32:51 +00:00
Nathan Neulinger 273583bd0b added backup,rmtsys,update opcodes
svn path=/trunk/; revision=2551
2000-11-02 18:45:15 +00:00
Nathan Neulinger 7130cde9ad more cleanup of opcodes
svn path=/trunk/; revision=2550
2000-11-02 16:59:29 +00:00
Nathan Neulinger 8fb7675c59 added entry, fixed couple of typos
svn path=/trunk/; revision=2549
2000-11-02 16:15:53 +00:00
Guy Harris a922ced0f1 Make the routines used for the hash table static - they're not used
outside "packet-afs.c".

svn path=/trunk/; revision=2531
2000-10-23 04:26:55 +00:00
Guy Harris 563f86ee5e Support for conversations with "wildcard" destination addresses, from
Jeff Foster.

svn path=/trunk/; revision=2523
2000-10-21 05:52:28 +00:00
Laurent Deniel cc36f0b931 Add the "Edit:Protocols..." feature which currently only implements
the following:

It is now possible to enable/disable a particular protocol decoding
(i.e. the protocol dissector is void or not). When a protocol
is disabled, it is displayed as Data and of course, all linked
sub-protocols are disabled as well.

Disabling a protocol could be interesting:

- in case of buggy dissectors
- in case of wrong heuristics
- for performance reasons
- to decode the data as another protocol (TODO)

Currently (if I am not wrong), all dissectors but NFS can be disabled
(and dissectors that do not register protocols :-)

I do not like the way the RPC sub-dissectors are disabled (in the
sub-dissectors) since this could be done in the RPC dissector itself,
knowing the sub-protocol hfinfo entry (this is why, I've not modified
the NFS one yet).

Two functions are added in proto.c :

gboolean proto_is_protocol_enabled(int n);
void proto_set_decoding(int n, gboolean enabled);

and two MACROs which can be used in dissectors:

OLD_CHECK_DISPLAY_AS_DATA(index, pd, offset, fd, tree)
CHECK_DISPLAY_AS_DATA(index, tvb, pinfo, tree)

See also the XXX in proto_dlg.c and proto.c around the new functions.

svn path=/trunk/; revision=2267
2000-08-13 14:09:15 +00:00
Guy Harris 480eaea7d4 Fix the display of volume names.
svn path=/trunk/; revision=2083
2000-06-21 04:41:30 +00:00
Guy Harris 283ce59938 Add routines for adding items to a protocol tree that take arguments of
a particular type, rather than taking a varargs list, along the lines of
the "proto_tree_add_XXX_format()" routines.

Replace most calls to "proto_tree_add_item()" and
"proto_tree_add_item_hidden()" with calls to those routines.

Rename "proto_tree_add_item()" and "proto_tree_add_item_hidden()" to
"proto_tree_add_item_old()" and "proto_tree_add_item_hidden_old()", and
add new "proto_tree_add_item()" and "proto_tree_add_item_hidden()"
routines that don't take the item to be added as an argument - instead,
they fetch the argument from the packet whose tvbuff was handed to them,
from the offset handed to them.

svn path=/trunk/; revision=2031
2000-05-31 05:09:07 +00:00
Gilbert Ramirez 292e38e2c6 Add tvbuff class.
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
2000-05-11 08:18:09 +00:00
Guy Harris 7063b3ae25 Fix up a bunch of places where a pointer into the packet buffer was cast
to a type requiring 2-byte or better alignment and was then
dereferenced; doing that requires that the code generated by your
compiler not trap if it makes an unaligned reference, and on most RISC
processors the code generated by the compiler *will* trap on an
unaligned reference by default.

svn path=/trunk/; revision=1480
2000-01-15 04:17:37 +00:00
Guy Harris 7a943b7810 Fix Gerald's e-mail address.
svn path=/trunk/; revision=1437
2000-01-07 22:05:43 +00:00