Commit Graph

12 Commits

Author SHA1 Message Date
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
Guy Harris c5dfcc49e7 Doug Nazar's patch to dissect substring filters.
svn path=/trunk/; revision=1949
2000-05-12 08:04:29 +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 42107e8614 Move calls to "dissector_add()" out of the register routines for TCP and
UDP and into the handoff registration routines for the protocols in
question.

Make the dissectors for those protocols static if they're not called
outside the dissector's source file.

Get rid of header files if all they did was declare dissectors that are
now static; remove declarations of now-static dissectors from header
files that do more than just declare the dissector.

svn path=/trunk/; revision=1823
2000-04-08 07:07:42 +00:00
Guy Harris a03f3029af Add in an include of "snprintf.h" on platforms where it's necessary.
svn path=/trunk/; revision=1805
2000-04-06 03:59:28 +00:00
Guy Harris 560819cad2 Another update from Doug Nazar.
svn path=/trunk/; revision=1778
2000-04-03 09:00:31 +00:00
Guy Harris 9e47031a4a Improvements from Doug Nazar.
One of those improvements adds an "exit now" after we've filled in the
protocol and info columns if we're not building a protocol tree,
obviating the need for the "parse only the first request in the sequence
if we're not building a protocol tree" code I stuck in, so remove the
latter code.

svn path=/trunk/; revision=1775
2000-04-03 07:48:55 +00:00
Guy Harris 413b0b3f19 Put in the beginnings of checks for ASN.1 dissection errors.
The "present" choice in the type Filter is, in LDAP V2,
AttributeType, and, in LDAP V3, it's AttributeDescription.  Both of
those are just LDAPString, which is, in turn, OCTET STRING, so it should
be required to have the primitive representation (unless and until we
add support for the constructed representation of octet strings - but
RFC 1777, the LDAP V2 spec, says

   (2)  Bitstrings and octet strings and all character string types
        will be encoded in the primitive form only.

and RFC 2251, the LDAP V3 spec, says

   (2) OCTET STRING values will be encoded in the primitive form only.

so we shouldn't ever see it with the constructed representation), and be
parsed with "asn1_octet_string_value_decode()", as, by that point, we've
already dissected the ASN.1 id and length.

Put the bind authorization type into the protocol tree before switching
on the type, so that it goes in even if it's not something we yet
dissect, and actually pass it as an argument to "proto_tree_add_item()"
(alas, "proto_tree_add_item()" is a varargs function, so this error
couldn't have been detected by the compiler).

When not constructing a protocol tree, quit "dissect_ldap()" after
dissecting the first operation - we don't need to dissect the others.

svn path=/trunk/; revision=1768
2000-03-31 10:22:24 +00:00
Guy Harris 72a70000db Updates from Doug Nazar.
svn path=/trunk/; revision=1760
2000-03-29 09:25:21 +00:00
Guy Harris 67d2ea7af0 Doug Nazar's LDAP dissector.
svn path=/trunk/; revision=1756
2000-03-28 07:12:36 +00:00
Guy Harris 7a943b7810 Fix Gerald's e-mail address.
svn path=/trunk/; revision=1437
2000-01-07 22:05:43 +00:00
Nathan Neulinger 0599f44d09 added ldap dissector placeholder, just does request/response for now, until I have a chance to figure out ASN.1
svn path=/trunk/; revision=1254
1999-12-09 04:06:54 +00:00