Commit Graph

56 Commits

Author SHA1 Message Date
Greg Morris 326e983d22 Fix for retransmission of fragmented NDS reply packets.
Fix for crash in expert file information.
Fix for malformed NDS iteration packets.
Fix indention on NDS read attribute definition verb.

svn path=/trunk/; revision=26012
2008-08-14 11:40:12 +00:00
Bill Meier f4a7b39753 Print various uints with %u ...
svn path=/trunk/; revision=25914
2008-08-04 03:46:49 +00:00
Bill Meier 8f84b18945 Fix 2 bugs:
- Misplaced } resulted in incorrect program flow in switch statement;
- Invalid input caused "Dissector bug: infinite loop";

svn path=/trunk/; revision=25913
2008-08-04 02:56:47 +00:00
Bill Meier 1fc904c6be Adjust various indentation/spacing; Do some minor reformatting
svn path=/trunk/; revision=25911
2008-08-04 02:27:20 +00:00
Anders Broman 2c4bdd2e82 From Bill Meier:
segmentation fault loading trace containing NCP packets.

svn path=/trunk/; revision=25892
2008-08-01 11:56:57 +00:00
Jeff Morriss f97023f302 Don't use proto_tree_add_uint_hidden() any more: it's deprecated.
svn path=/trunk/; revision=25807
2008-07-23 20:35:28 +00:00
Bill Meier c63145b3d9 Fix some spacing .....
svn path=/trunk/; revision=25683
2008-07-09 02:30:39 +00:00
Bill Meier d0258115a6 Fix some mis-spellings
svn path=/trunk/; revision=25682
2008-07-09 01:30:30 +00:00
Guy Harris 044e57c917 Clean up indentation.
Make build_expert_data() take the size of "buffer" as an argument, and
use that when doing g_snprintf() into the buffer, to ensure we don't
overflow the buffer.  Also, don't just assign to "buffer", as that
doesn't put anything *in* the buffer.

svn path=/trunk/; revision=25600
2008-06-25 09:10:50 +00:00
Stig Bjørlykke 9cb03a761c Rewrote to use g_strlcat and g_strlcpy.
svn path=/trunk/; revision=24522
2008-03-01 13:58:15 +00:00
Greg Morris 438c96dabb Error code 0x89a9 updated error message to be:
"Invalid Path With Junction Present"

Fix get extended volume info to register correct name with NDS EID value. (added data type of 20 to extract string value)

Fix expert data for file handles to report file handle in expert data. (Added data type of 22 to extract bytes value)

svn path=/trunk/; revision=24505
2008-02-29 15:36:51 +00:00
Jörg Mayer 7303115b86 Replace // comments
svn path=/trunk/; revision=23856
2007-12-13 11:37:03 +00:00
Gerald Combs f3fdef83d6 Don't try to overwrite read-only memory. Fixes bug 2001.
svn path=/trunk/; revision=23529
2007-11-21 17:00:24 +00:00
Gerald Combs 4105173f0e Fix a couple of integer underflows.
svn path=/trunk/; revision=23398
2007-11-08 05:54:29 +00:00
Anders Broman 1950ffc214 Apply the small performance enhancment patches for:
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster.
Replace 
- col_append_fstr() with faster  col_append_str() 
- col_add_str() with col_set_str()
when it's safe

svn path=/trunk/; revision=23252
2007-10-23 05:50:00 +00:00
Jaap Keuter 565fe87ad1 Mask error
svn path=/trunk/; revision=23219
2007-10-17 18:25:29 +00:00
Stig Bjørlykke 253eb0efb3 Check return value from ptvcursor_add in an attempt to fix bug 1886.
svn path=/trunk/; revision=23052
2007-10-02 19:02:58 +00:00
Greg Morris c8be509d6a Add eDirectory iteration verb 0x6e.
Fix eDirectory timestamps to display correctly.

svn path=/trunk/; revision=22746
2007-08-30 10:18:29 +00:00
Stephen Fisher f002ac6db5 Fix various warnings
Move packet-cops.c out of clean dissectors due to a #define conflict
in the headers of net-snmp with our config.h


svn path=/trunk/; revision=21398
2007-04-13 00:50:23 +00:00
Stephen Fisher 82b2c83149 Fix some more warnings
svn path=/trunk/; revision=21273
2007-03-29 18:09:13 +00:00
Martin Mathieson 997e5415f9 Add separate union entries to fvalue.value for signed and unsigned
32-bit numbers.  Separate signed and unsigned accessors have been
added and used where appropriate.

Definitely not for 0.99.5.

svn path=/trunk/; revision=20472
2007-01-18 11:02:26 +00:00
Greg Morris a9e704bc96 Fixes and updated files:
File NCP2222.py:
1. Added NCP service type 0xffff = All types
2. Added evaluation of task states. (following bits are defined. 0=normal, 1 = TTS explicit transaction in progress, 2= TTS implicit transaction in progress, 4 = Shared file ste lock in progress)
3. Reversed the Volume Request Flags, this was backwards (s/b 0=do not return name with volume number, 1=Return name with volume number)
4. Fixed endianess of Creator ID in NetWare Information Struct.
5. File information structure incorrectly defined Current Block Being Decompressed.
6. Logical Lock Status structure incorrectly identified Task Number as a byte. It should be two bytes "word".
7. Fixed endianess of Modifier ID in NetWare Information Struct.
8. Fixed Name Space Information structure (was defined as Name Space, changed to Creator Name Space Number).
9. Fixed Semaphore Structure (Task Number was incorrectly defined as a byte, should be two bytes "word").
10. Added Task structure (Task Number, Task State)
11. Fixed Volume structure (incorrectly defined Volume Name)
12. Added VolumeWithName structure (This struct contains both volume number and volume name)
13. Added error 0x8901 - "No purgable files available"
14. Added error 0x8977 - "Buffer too small" 
15. Added error 0x899c - "No more trustees found"
16. Added error 0x89d9 - "Queue station is not a server"
17. Added NCP connection status values (0=Ok, 1=Bad service connection, 10=File server is down, 40=Broadcast Message Pending)
18. Fixed error definitions for NCP 22/50.
19. Fixed reply packet for NCP 22/52 to properly display volume information depending on reply struct, Volume or volume with name.
20. Fixed error definitions for NCP 22/52
21. Fixed NCP 23/26 reply packet to properly return internet address and display correctly.
22. Fixed NCP 23/27 Reply packet structure to properly repeat connection numbers array.
23. Fixed error definitions for NCP 23/33
24. Fixed NCP 23/114 Request (improperly defined Charge Information as a long value, s/b word)
25. Fixed NCP 23/120 Reply (Improperly defined Job Number as a long value, s/b word)
26. Fixed error definitions for NCP 23/123
27. Fixed error definitions for NCP 23/124
28. Fixed error definitions for NCP 23/131
29. Fixed error definitions for NCP 23/132
30. Fixed error definitions for NCP 23/135
31. Fixed error definitions for NCP 23/137
32. Fixed error definitions for NCP 23/138
33. Fixed NCP 23/205 Reply (User Login Allowed incorrectly defined as long value, s/b byte value)
34. Fixed NCP 23/234 Reply (Reply structure incorrectly defined based on old NCP documentation. Corrected per new docs)
35. Fixed endianess of NCP 23/237 Reply on value Number of Locks.
36. Fixed endianess of NCP 23/238 Reply on value Number of Locks.
37. Fixed error definitions for NCP 30
38. Fixed error definitions for NCP 36/6
39. Fixed error definitions for NCP 86/2
40. Fixed error definitions for NCP 86/3
41. Fixed error definitions for NCP 86/4
42. Fixed error definitions for NCP 86/5
43. Fixed error definitions for NCP 87/1
44. Fixed error definitions for NCP 87/4
45. Fixed error definitions for NCP 87/5
46. Fixed error definitions for NCP 87/10
47. Fixed error definitions for NCP 87/11
48. Fixed error definitions for NCP 87/12
49. Fixed error definitions for NCP 87/17
50. Fixed error definitions for NCP 87/18
51. Fixed NCP 87/20 Reply to properly decode multiple entries returned. This used to only dissect the first entry.
52. Fixed error definitions for NCP 87/30
53. Fixed NCP 87/33 Reply to properly utilize the request flags to dissect the reply packet NetWare Info Struct
54. Fixed error definitions for NCP 87/33
55. Fixed error definitions for NCP 88/22
56. Fixed error definitions for NCP 89/1
57. Fixed error definitions for NCP 89/10
58. Fixed NCP 89/11 Request packet structure
59. Fixed error definitions for NCP 89/11
60. Fixed NCP 89/20 Reply to properly decode multiple entries returned. This used to only dissect the first entry.
61. Fixed error definitions for NCP 104/5
62. Added undefined NCP 112
63. Fixed NCP 123/11 Reply to properly dissect FileName, Name, and copyright.
64. Fixed NCP 123/17 Reply to properly display NCP Network Address values.
65. Fixed NCP 123/24 Reply to properly display Driver Board Name, Driver Short Name, and Dirver Logical Name.
66. Fixed error definitions for NCP 123/33
67. Fixed NCP 123/60 to properly display Set Command Name and Set Command Value.
68. Fixed error definitions for NCP 123/70
69. Fixed NCP 123/71 Reply to utilize new File Information Struct
70. Fixed error definitions for NCP 123/71
71. Fixed error definitions for NCP 123/72
72. Added NCP 123/249
73. Added NCP 123/251
74. Added NCP 123/252
75. Added NCP 123/253
76. Added NCP 123/254
77. Added NCP 123/255
78. Fixed error definitions for NCP 131/1
79. Fixed error definitions for NCP 131/2
 
File packet-ncp2222.inc
1. Added new NCP preference setting to tell Wireshark to decode the NetWare information structure as new or old style.
2. Set default NCP preference settings of echo connection and echo file to FALSE.
3. Added NDS verb 2 Request Flags (0=retain old object, 1=delete old object)
4. Fixed problem where NDS fragmentation could not be reassembled on reload. (fragment array needed to be re-initialized on reload)
5. Fixed NCP service types 1111, 5555, bbbb, and 1111/LIP to reflect real type number. (Was defined as 0xf1, 0xf2, 0xf3, etc... Now defined as 0x1, 0x5, 0xb, etc)
6. Fixed function build_expert_data to parse subtree memory structures to acquire NCP request value records
7. Fix NDS attribute type Boolean to byte value and properly aligned.
8. Fixed attribute zendmSearchOrder to display properly regardless of number or order of value entries.
9. Added check of length of packet prior to attempting to defragment
10. Added for Request packets logic to abort if NCP type isn't found.
11. Added logic to store packet length and then manually decode NCP function 123 based on length.
12. Added logic to manually dissect NCP 87/20 and 89/20 reply packets.
13. NDS resolve name replies with remote entry as the specifier should not store the EID returned (0x00000000)
14. Added logic to trap and echo to expert tap when connection status flags indicate an error.
15. Added manual dissect of NCP 23/26 replies
16. Added logic to Capture the EID returned form NCP 22/51 "Get vol info".
17. Fixed NDS verb 0x2a
18. Fixed NDS verb 0x2b
 
File packet-ncp.c
1. Fix offset for packet signature. (This used to automatically set the offset to account for packet signature if it could not determine the correct NCP type. But for some failed fragment packets, retransmissions, etc, this would be wrongly identified. So first we check to see if we can read a valid type at the offset before we just automatically assume that packet signature is being used)
2. Register the new NCP preference for old/new NetWareInfoStruct.
 
File packet-ncp-int.h
1. Add extern declaration for ncp_newstyle setting.
2. Add length, req_mask, and req_mast_ext to ncp_req_hash_value structure
 
File packet-ncp-sss.c
1. Fix SecretStore request verb Write App Secrets, Client Put Data, to evaluate packet length.

svn path=/trunk/; revision=19073
2006-08-29 08:45:53 +00:00
Gerald Combs b15974d094 libethereal -> libwireshark. idl2eth -> idl2wrs. There are a _lot_ of
changes here.  It compiles OK on OS X, but hasn't been tested anywhere else.

svn path=/trunk/; revision=18260
2006-05-31 00:23:01 +00:00
Ronnie Sahlberg f0b33a4789 ethereal->wireshark updates
svn path=/trunk/; revision=18206
2006-05-22 08:14:01 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Gerald Combs 34335a2bc1 Add a null pointer check. Fixes the current Buildbot menagerie failure.
svn path=/trunk/; revision=17797
2006-04-03 14:44:56 +00:00
Anders Broman 510b805e69 From Greg Morris:
Fixes bug 830
Adds a few more expert info details.
 

svn path=/trunk/; revision=17781
2006-04-02 19:37:12 +00:00
Jaap Keuter 87212ed160 Add missing preference storage.
svn path=/trunk/; revision=17639
2006-03-15 21:22:11 +00:00
Gerald Combs fa312091ce Throw an exception if we have an invalid offset. Fixes bug 585.
svn path=/trunk/; revision=16780
2005-12-13 17:00:03 +00:00
Anders Broman 9d646e76dc From Greg Morris:
ncp2222.py.diff
Fixed decoding of NCP 89,10 reply packet. Fixes malformed packet.
 
packet-ncp.c.diff
Adds NCP protocol preference options for enabling/disabling the echoing of data to the expert table.
Expert: EID to Name Lookups
Expert: NCP Connections
Expert: NCP Errors
Expert: Server Information
 
packet-ncp2222.inc.diff
Adds decoding of ZEN attribute values
zendmSearchType
zendmSearchOrder
Fixes blank name stored in EID to Name table if tuned name was returned in resolve name reply packet
Adds capability of reading hf values from NCP tree for exporting specific NCP info to expert table
Adds support for new NCP protocol preference options
Adds expert options for EID to Name Lookups, NCP connections, and Server Information
Change nwconnection from 16bit value to 32bit
 
Packet-ncp-int.h.diff
Fix function prototypes to match new 32bit nwconnection
Add global variables to allow for new NCP protocol preference options

svn path=/trunk/; revision=16575
2005-11-24 05:55:18 +00:00
Guy Harris 3bd8fdbca1 Get rid of an unused variable.
svn path=/trunk/; revision=16357
2005-10-29 21:43:00 +00:00
Guy Harris 3e0e3011e2 Don't run "process_ptvc_record()" on replies unless we're building a
protocol tree.

svn path=/trunk/; revision=16326
2005-10-26 23:10:20 +00:00
Guy Harris de27c8a831 Add a comment.
svn path=/trunk/; revision=16324
2005-10-26 20:21:28 +00:00
Guy Harris 36a2d54f78 Put the code to handle NDS ping replies and NDS replies into routines of
their own.

Do the tapping as early as possible, so it's done even if exceptions are
thrown - and do it regardless of whether the tree argument is null or
not, because a tap might be run without generating protocol trees.

Generate the expert info regardless of whether the tree arugment is null
or not, as that's also used with taps.

svn path=/trunk/; revision=16303
2005-10-25 06:20:46 +00:00
Guy Harris cd7fae828c Add #defines for NDS tag values, and use them in the definition of
nds_tags[] and in switch statements.  (Also, catch a case where we
didn't use NDS_PTYPE_ values.)

Use the existing #defines for MVTYPE_ values.

Make the handling of NDS_PTYPE_{IP,UDP,TCP} in one case match the
handling of the other cases (don't advance "ioffset", as it's advanced
by the length of the item).

When checking whether an NDS reply has a completion code, don't check
the fragment size, check the reassembled packet size.

Fix the handling of referrals in one case.

svn path=/trunk/; revision=16291
2005-10-24 02:49:32 +00:00
Guy Harris 8e35fd8078 Add #defines of NDS protocol types, and use them in the value_string and
switch statements.

Add some sanity checking for ptvcursor_advance calls.

proto_tree_add_item() works fine for IPv4 addresses; use it for them. 
(tvb_get_letohl() doesn't work fine for them, even though it appears to
do so on little-endian machines.)

Only set the "visible" flag on the protocol tree when we're sure we have
one, so that it gets set even if we create a temporary tree.

Catch exceptions when dissecting requests, and compute and save the
results of conditional tests before rethrowing the exception, so the
results get saved even if the dissection gets an exception.

svn path=/trunk/; revision=16288
2005-10-22 06:25:14 +00:00
Guy Harris f225f8819e At least on Tiger, multiple definitions of an external don't work.
svn path=/trunk/; revision=16272
2005-10-19 19:40:55 +00:00
Gilbert Ramirez ab3f0deefc From Greg Morris:
makefile.common.diff - epan directory
1. Adds new packet-ncp-sss.c and packet-ncp-sss.h for new Secret Store dissector
 
New Novell Secret Store Services dissector
packet-ncp-sss.c
packet-ncp-sss.h
 
ncp2222.py.diff
1. Adds a number of return values
2. Adds 64bit file size support
3. Add NCP 89,xx NCP's for UTF8 support
4. Fixes a number of field values for proper dissection
5. Adds support for Secret Store dissector
 
packet-ncp2222.inc.diff
1. Skwelches some compiler warnings
2. Redo of fix for bug 535 which original fix broke dissection of NDS verb 5
3. Adds support for Secret Store dissector
4. Adds expert data
5. Adds tap for service response time
6. Fixes dissection of stream attribute
7. Fixes defragmentation problem with more then 10 fragments
8. Fixes NDS dissection if reply buffer was less then 7
 
packet-ncp.c.diff
1. Adds tap data
2. Adds expert data
3. Fixes calculation for NCP connection number
4. Fixes malformed packet for destroy service connection
 
packet-ncp.c.diff
1. Adds tap data


svn path=/trunk/; revision=16266
2005-10-19 14:28:26 +00:00
Gerald Combs 2544a95b7f Break out of an infinite loop. Fixes bug 535. Remove an unused
function (which had a buffer overflow!)  Initialize a variable flagged
by Valgrind.

svn path=/trunk/; revision=16247
2005-10-16 20:40:27 +00:00
Ulf Lamping 6f43fbb2f0 EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry!
I've done more than a day to change the timestamp resolution from microseconds to nanoseconds. As I really don't want to loose those changes, I'm going to check in the changes I've done so far. Hopefully someone else will give me a helping hand with the things left ...

What's done: I've changed the timestamp resolution from usec to nsec in almost any place in the sources. I've changed parts of the implementation in nstime.s/.h and a lot of places elsewhere.

As I don't understand the editcap source (well, I'm maybe just too tired right now), hopefully someone else might be able to fix this soon.

Doing all those changes, we get native nanosecond timestamp resolution in Ethereal. After fixing all the remaining issues, I'll take a look how to display this in a convenient way...

As I've also changed the wiretap timestamp resolution from usec to nsec we might want to change the wiretap version number...

svn path=/trunk/; revision=15520
2005-08-24 21:31:56 +00:00
Jörg Mayer 69dcb66cd9 More char -> const char warning fixes
svn path=/trunk/; revision=15218
2005-08-05 00:23:22 +00:00
Jörg Mayer eab0aeb4bb More char -> const char fixes
Declare some functions static

svn path=/trunk/; revision=15158
2005-07-30 16:34:38 +00:00
Guy Harris ab797734dd Get rid of the private "my_match_strval()" routine in many dissectors;
add a "match_strval_idx()" routine that does the same thing, and have
"match_strval()" call it.

Make those routines, and "val_to_str()", return a "const" pointer. 
Update dissectors as necessary to squelch compiler warnings produced by
that.

Use "val_to_str()" rather than using "match_strval()" and then, if the
result is null, substituting a specific string.  Clean up some other
"match_strval()"/"val_to_str()" usages.

Add a null pointer check in the NDPS dissector's "attribute_value()"
routine, as it's not clear that "global_attribute_name" won't be null at
that point.

Make some global variables in the AFS4INT dissector local.

Make some routines not used outside the module they're in static.

Make some tables "static const".

Clean up white space.

Fix Gerald's address in some files.

svn path=/trunk/; revision=14786
2005-06-26 19:56:52 +00:00
Gerald Combs 3a6c9ab134 Fix a format string vulneratility in the AFP dissector identified
by iDEFENSE.  Add constant format strings to proto_item_append_text()
in a bunch of other dissectors.  Copy a comment from proto.c to proto.h.

svn path=/trunk/; revision=14713
2005-06-20 19:35:58 +00:00
Gerald Combs b94621701c From Steve Grubb:
Fix bounds checking in lemon.c.  Fix up an if/else block in
packet-dcerpc-samr.c.  Fix hex printing in packet-gtp.c.


Fix other problems discovered by Steve:

Fix a bounds check in packet-isis-lsp.c.  Also, fix netmask printing
on non-little-endian machines.  Add a comment about adding a netmask
routine to to_str.c.  Add bounds checks to packet-ncp2222.inc.


All of these apply to bug 217.

svn path=/trunk/; revision=14627
2005-06-14 18:18:05 +00:00
Ulf Lamping fdb5b1af02 just to get things straight: a dissector should *never* do any g_assert() calls!
in a simple approach, I've replaced all g_assert() and g_assert_not_reached() calls by their exception throwing counterparts DISSECTOR_ASSERT() and DISSECTOR_ASSERT_NOT_REACHED()

this will replace application crash by showing a dissector bug, which is the desired behaviour

there were some g_assert calls in the protocol registering functions, which might not be acting as expected now, but to be able to simply search for g_assert in the future I've replaced that calls too

one g_assert remained, the one when someone throws an unknown exception "into" packet_frame.c, but IMHO this one should remain.

svn path=/trunk/; revision=14608
2005-06-10 18:28:22 +00:00
Ulf Lamping b88fc96be7 fix call to show_fragment_seq_tree() reported by buildbot
svn path=/trunk/; revision=14532
2005-06-02 22:11:22 +00:00
Gerald Combs c7dfef6321 Break out of another large-but-not-infinite loop. Fixes bug 143.
svn path=/trunk/; revision=14229
2005-04-29 14:25:07 +00:00
Gerald Combs e3a76369d1 Break out of a really large (but not infinite) loop.
svn path=/trunk/; revision=14226
2005-04-29 00:16:22 +00:00
Gerald Combs e1a597eccf Add some tvb_ensure_bytes_exist() calls. Fixes bug 101.
svn path=/trunk/; revision=14192
2005-04-26 20:55:26 +00:00