aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ndps.c
AgeCommit message (Collapse)AuthorFilesLines
2003-10-17From Greg Morris: don't add zero-length items to the tree, add someGuy Harris1-53/+225
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-08-25From Greg Morris: fix reassembly not to use global variables, and to useGuy Harris1-83/+101
the SPX EOM flag as a "last fragment" indication. svn path=/trunk/; revision=8255
2003-07-25Fix signed/unsigned comparison warnings.Gilbert Ramirez1-5/+11
svn path=/trunk/; revision=8084
2003-06-04Don't use fields in the packet for subtree items - create a separateGuy Harris1-701/+1325
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-04-21From Greg Morris:Guy Harris1-2587/+1510
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-20Add a pointer to an hf_ value for a "reassembled_in" field (which can beGuy Harris1-1/+2
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-09Make the individual flag bits in the Connection Control field of the SPXGuy Harris1-11/+2
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-09Instead of using passing the SPX hash value to subdissectors, attach toGuy Harris1-3/+3
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-09Fix some spelling/punctuation/capitalization/etc. errors.Guy Harris1-12/+12
svn path=/trunk/; revision=7426
2003-04-09Don't create a protocol tree or do anything to the columns beforeGuy Harris1-31/+32
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-08When dissecting a reply, don't put the frame number of the correspondingGuy Harris1-6/+5
request into the protocol tree if we haven't seen the request. svn path=/trunk/; revision=7421
2003-04-08"ndps_req_hash_cleanup()" doesn't need to do anything (the dataGuy Harris1-15/+5
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-08Get rid of unused "ddp_dissector_table" variable.Guy Harris1-14/+16
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-08Move the definition of the structure constructed for each SPXGuy Harris1-7/+5
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-08From Greg Morris: update the introductory comment, add defragmentationGuy Harris1-973/+7030
support, fix various bugs, and finish up the NDPS decodes. svn path=/trunk/; revision=7417
2002-12-02Don't cast away constness, and fix variable and structure memberGuy Harris1-6/+6
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-10-22Add support for desegmentation of NDPS-over-TCP.Guy Harris1-12/+59
svn path=/trunk/; revision=6468
2002-10-22Get rid of extra blanks at ends of program names (they're not needed; inGuy Harris1-479/+234
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-22Do a full dissection of NDPS packets regardless of whether we'reGuy Harris1-98/+98
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-21From Greg Morris:Guy Harris1-138/+2658
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-15Add a new port type, PT_IPX, for IPX socket numbers; set "pinfo->ptype",Guy Harris1-294/+160
"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-10Backout previous patch - the warning was left intentionallyJörg Mayer1-2/+2
svn path=/trunk/; revision=6396
2002-10-10Silence an unjustified warningJörg Mayer1-2/+2
svn path=/trunk/; revision=6395
2002-10-08Fix some compiler warnings.Guy Harris1-40/+40
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-09-23Dissector for Novell Distributed Print Services by Greg Morris.Jörg Mayer1-0/+916
NDPS runs on top of SPX and TCP. svn path=/trunk/; revision=6323