Commit Graph

25 Commits

Author SHA1 Message Date
Guy Harris 7e5234d842 From Greg Morris: don't add zero-length items to the tree, add some
missing alignment adjustments, fix a call to "address_item()" to set the
offset to its return value rather than adding its return value to the
offset, handle an object type of 2 (counted list of objects) in an event
handling profile, advance the offset past length values after processing
the length value.

Fix some additional "address_item()" calls, and put the aforementioned
length values into the protocol tree.

svn path=/trunk/; revision=8730
2003-10-17 22:59:18 +00:00
Guy Harris d5a4e68262 From Greg Morris: fix reassembly not to use global variables, and to use
the SPX EOM flag as a "last fragment" indication.

svn path=/trunk/; revision=8255
2003-08-25 21:59:18 +00:00
Gilbert Ramirez c91b8e713f Fix signed/unsigned comparison warnings.
svn path=/trunk/; revision=8084
2003-07-25 04:11:51 +00:00
Guy Harris c7c20a6724 Don't use fields in the packet for subtree items - create a separate
subtree item.

Have "ndps_string()" take a buffer pointer and length as arguments, and
fill in the supplied buffer if the buffer pointer is non-null.  Have it
do bounds checking in any case.  Use that to set the text of a server
info item, and also remove a level from the tree for server info.

Show various item counts and structure sizes in the protocol tree.
(This also, in some cases, fixes the offset for subsequent items, as not
only was the item count not put into the protocol tree, the offset
wasn't advanced past the item count.)

Instead of putting an item into the tree with "proto_tree_add_item()",
advancing the offset past it, and fetching the item's value with a
backed-off offset, just fetch the value first and put it into the tree
with the appropriate "proto_tree_add_XXX" call.  Use switch statements
if the value is being compared against more than one constant.

Don't use a length of 0 in subtree items; use a length of -1, and then
set the length when the subtree is complete, so that if you click on the
subtree item it highlights all the bytes in the subtree.

Fix some "proto_tree_add_uint()" calls that were supposed to be
"proto_tree_add_item()" calls.

In a "Create job" operation, the alignment after the "Doc Content" item
had an extra 2 bytes added if it was non-zero; that seems a bit odd (if
no alignment is required, the stuff after that item is aligned on a
4-byte boundary, but if alignment is required, the stuff after that
items is aligned 2 bytes *off of* a 4-byte boundary), and caused at
least one capture to be misdissected.

Fix some cases where a counted list was inside a counted list, and the
inner count wasn't being fetched *or* used for the inner list.

Display counts in decimal, not hex.

Remove the question mark from the name of a Boolean preference; other
Boolean preferences don't have them, and it looks odd with a colon after
it - that's what the GUI code puts there.  If Boolean preferences should
have a question mark, it should be put there by the GUI code, instead of
a colon.

svn path=/trunk/; revision=7778
2003-06-04 08:38:09 +00:00
Guy Harris f61152a7da From Greg Morris:
1. Add definitions for Novell defined Object ID's
2. Cleanup displayed information
3. Object ID's no longer displayed by default. To enable then set
   option in the NDPS preferences to "Display NDPS Details"
4. Value Syntax no longer displayed by default. To enable then set
   option in the NDPS preferences to "Display NDPS Details"
5. Utilize SPX End of Message within NDPS/SPX Fragment packets
6. Numerous Bug fixes
7. Add Print Program Function 0x23 (Add Event Profile 2)
8. Add Print Program Function 0x24 (List Event Profiles 2)
9. Create consolidation functions to elliminate redundant code
10. Remove some unused variable definitions

svn path=/trunk/; revision=7519
2003-04-21 23:06:39 +00:00
Guy Harris d359286841 Add a pointer to an hf_ value for a "reassembled_in" field (which can be
null) to the "fragment_items" structure, and don't pass that value into
"process_reassembled_data()", just have it use the value in the
"fragment_items" structure passed to it.

Make "process_reassembled_data()" capable of handling reassembly done by
"fragment_add_seq_check()", and use it in the ATP and 802.11 dissectors;
give them "reassembled_in" fields.  Make "process_reassembled_data()"
handle only the case of a completed reassembly (fd_head != NULL) so that
we can use it in those dissectors without gunking the code up too much.

svn path=/trunk/; revision=7513
2003-04-20 11:36:16 +00:00
Guy Harris 5311e02789 Make the individual flag bits in the Connection Control field of the SPX
header be filterable fields.

Don't hand retransmitted SPX frames to subdissectors - just show the
payload as a retransmission of the original frame.

Instead of handing a retransmission indicator to SPX subdissectors, hand
them a structure containing the datastream type (under the assumption
that it's data for the protocol running atop SPX, and that the dissector
for that protocol might use it) and the state of the end-of-message bit
(under the assumption that it's data for the protocol running atop SPX).

svn path=/trunk/; revision=7433
2003-04-09 22:33:19 +00:00
Guy Harris 0cb78e6508 Instead of using passing the SPX hash value to subdissectors, attach to
frames that are retransmissions a data structure containing the frame
number of the original frame, and pass that to subdissectors (or, if not
present, pass NULL).

That means we can free the hash values when we're done with the first
pass through the packets.

svn path=/trunk/; revision=7432
2003-04-09 20:45:04 +00:00
Guy Harris 9be967086f Fix some spelling/punctuation/capitalization/etc. errors.
svn path=/trunk/; revision=7426
2003-04-09 08:51:18 +00:00
Guy Harris 9442f5bc7d Don't create a protocol tree or do anything to the columns before
calling "tcp_dissect_pdus()", so that if we don't have the final segment
of a multi-segment packet, we don't change the columns or put in an
empty protocol tree item for NDPS.

Rename "ndps.desegment_ndps" to "ndps.desegment_tcp" - the "ndps." is
sufficient to indicate that it's for desegmenting NDPS, but we now have
a flag for desegmenting NDPS-over-SPX, so we should indicate that the
other flag is for desegmenting NDPS-over-TCP.

svn path=/trunk/; revision=7425
2003-04-09 08:43:53 +00:00
Guy Harris 3cbd0466f6 When dissecting a reply, don't put the frame number of the corresponding
request into the protocol tree if we haven't seen the request.

svn path=/trunk/; revision=7421
2003-04-08 03:00:32 +00:00
Guy Harris 28b442512f "ndps_req_hash_cleanup()" doesn't need to do anything (the data
structure it frees has no pointers to anything), so eliminate it.

The XID argument to "dissect_ndps_request()" isn't used, so eliminate
it.

svn path=/trunk/; revision=7420
2003-04-08 02:45:05 +00:00
Guy Harris 2bae84302d Get rid of unused "ddp_dissector_table" variable.
For replies, correctly put the frame number of the corresponding request
into the protocol tree; don't put it in as if it were the XID.  That
means we don't need to pass the XID as an argument to
"dissect_ndps_reply()".

svn path=/trunk/; revision=7419
2003-04-08 02:35:12 +00:00
Guy Harris 072e149f3c Move the definition of the structure constructed for each SPX
transmission (and shared by all retransmissions), and passed to SPX
subdissectors, to "packet-ipx.h", and use the same structure in the SPX
dissector and the NDPS dissector.

Set up conversations and those structures without checking whether we've
seen the packet before or not; just check whether we find the
conversation before creating a new one, and check whether we find a
structure for the packet before creating a new one.  Pass it to the
subdissector regardless of whether we've seen the packet before or not,
and check it in the NDPS dissector regardless of whether we've seen it
before or not.

Don't store a "retransmission" flag in the structure - the initial
transmission and the retransmissions all share a single data structure,
but they don't all have the same value for the "retransmission" flag,
and you can tell whether a packet is a retransmission or not by
comparing its frame number with the frame number from the structure; if
they're different, it's a retransmission.

svn path=/trunk/; revision=7418
2003-04-08 02:00:54 +00:00
Guy Harris 2d61e4ca47 From Greg Morris: update the introductory comment, add defragmentation
support, fix various bugs, and finish up the NDPS decodes.

svn path=/trunk/; revision=7417
2003-04-08 00:56:17 +00:00
Guy Harris 59932f2722 Don't cast away constness, and fix variable and structure member
qualifiers as necessary to ensure that we don't have to.

"strcmp()", "strcasecmp()", and "memcmp()" don't return booleans; don't
test their results as if they did.

Use "guint8", not "guchar", for a pointer to (one or more) 8-bit bytes.

Update Michael Tuexen's e-mail address.

svn path=/trunk/; revision=6726
2002-12-02 23:43:30 +00:00
Guy Harris 6ba1ee899b Add support for desegmentation of NDPS-over-TCP.
svn path=/trunk/; revision=6468
2002-10-22 08:09:57 +00:00
Guy Harris 252667a153 Get rid of extra blanks at ends of program names (they're not needed; in
fact, they cause an extra blank to appear).

Turn "get_string()" into a routine that fetches the length of a string,
fetches the string, puts the string into the tree with the offset of the
length as the starting offset, and returns the new offset.

Make routines that return offsets return an "int", as packet offset
variables are "int"s.

Fix up a bunch of "proto_tree_add_uint()" calls, including presumably
properly updating the offset after the call.

Clean up the handling of qualified names, integer-or-OID types, and even
objects a bit.

Put octet strings into the protocol tree with the offset of the length
as the starting offset.

Fix up the record length variable to be decimal, and just use
"proto_tree_add_uint()" to put it into the tree.

In at least one capture I've seen, there are only two bytes after the
NDPS tree field in a Bind PA request, not 4, even if the NDPS tree name
isn't an empty string.

FT_BYTES and FT_BOOLEAN don't have a base for display, so use BASE_NONE.

Fix the field for address bytes to have the right name (it's not just
the length, it's the length *and* the bytes).

svn path=/trunk/; revision=6467
2002-10-22 07:50:07 +00:00
Guy Harris 173b01f830 Do a full dissection of NDPS packets regardless of whether we're
building a protocol tree or not - we need to do that in order to set
various state variables and to set the columns.

svn path=/trunk/; revision=6466
2002-10-22 06:09:06 +00:00
Guy Harris c9900e6390 From Greg Morris:
Various NDS dissector enhancements including NDS verb 0x07, and
	proper ping flags for NDS ping version 10 request.

	Updated error codes for several NCP reply packets.

	NDPS enhancements.

svn path=/trunk/; revision=6463
2002-10-21 18:56:52 +00:00
Guy Harris e0e7122674 Add a new port type, PT_IPX, for IPX socket numbers; set "pinfo->ptype",
"pinfo->srcport", and "pinfo->destport" appropriately in the IPX
dissector.  Add support for PT_IPX port types in display columns.

Have an "spx.socket" dissector table, similar to the "ipx.socket"
dissector table, and have the SPX dissector use that, with the IPX
socket numbers from "pinfo->srcport" and "pinfo->destport", so that
dissectors for protocols that run atop SPX can register with particular
socket numbers.  (Think of it as similar to what would have been the
case had the IP header had 16-bit source and destination port numbers,
and had TCP and UDP used those port numbers rather than having port
numbers in their headers.)  Also, have the SPX dissector dissect
subprotocols regardless of whether we're building a protocol tree or not.

Use the dissector handle for the IPX message dissector for both IPX
socket numbers; there's no need to create separate handles for both
registrations.

Have NDPS register as a subdissector of the SPX dissector, using
"spx.socket", and get rid of the duplicate SPX dissection in the NDPS
dissector.

Make the NDPS dissector set the columns regardless of whether a protocol
tree is being built, and clean up the dissector (fixing some bugs).

Get rid of unneeded includes in "packet-ndps.c".

svn path=/trunk/; revision=6424
2002-10-15 04:31:00 +00:00
Jörg Mayer 6f032efe5c Backout previous patch - the warning was left intentionally
svn path=/trunk/; revision=6396
2002-10-10 02:18:41 +00:00
Jörg Mayer 0792646ea8 Silence an unjustified warning
svn path=/trunk/; revision=6395
2002-10-10 01:53:34 +00:00
Guy Harris f3d86bdc37 Fix some compiler warnings.
Don't put the SPX connection control information into the Info column
unless we're running atop SPX.  (XXX - if we're running atop SPX, the
SPX dissector has already pruned off the SPX header, so we shouldn't be
acting as if we had an SPX header at which to look.)

svn path=/trunk/; revision=6379
2002-10-08 19:15:24 +00:00
Jörg Mayer 37c599b47d Dissector for Novell Distributed Print Services by Greg Morris.
NDPS runs on top of SPX and TCP.

svn path=/trunk/; revision=6323
2002-09-23 17:14:54 +00:00