Commit Graph

81 Commits

Author SHA1 Message Date
Bill Meier b17543e2c0 Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.
svn path=/trunk/; revision=38049
2011-07-15 19:07:25 +00:00
Jeff Morriss ec460c3e99 As suggested by Chris: use val_to_str_const() instead of match_strval() plus a
NULL-return check.

Use val_to_str_const instead of val_to_str() in a couple places where the string
is constant.

Use val_to_str() instead of blindly passing the return value from match_strval()
into a format routine (to ensure a non-NULL string pointer).

svn path=/trunk/; revision=37202
2011-05-17 17:40:26 +00:00
Jeff Morriss 7a93fdab12 Avoid passing a NULL string pointer to format routines: some libc's (e.g.,
Solaris') will seg-fault on that.

svn path=/trunk/; revision=37201
2011-05-17 16:07:24 +00:00
Bill Meier bbea8c7cf7 Don't assign to a proto_item * if the value won't be used: Coverity 978;
Use what appears to be the intended correct tree for various proto_add...: Coverity 979;
Minor indentation cleanup.

svn path=/trunk/; revision=36594
2011-04-12 17:44:22 +00:00
Gerald Combs 46865581e5 Fix Visual C++ code analysis warnings.
svn path=/trunk/; revision=36007
2011-02-19 00:05:12 +00:00
Stig Bjørlykke 84bc28bd6a Introduce "Fragment count" filter element for all protocols doing reassembly.
svn path=/trunk/; revision=35705
2011-01-30 21:01:07 +00:00
Stig Bjørlykke 18e3850d24 Switched to bitwise & instead of logical && in bit operations.
This bug was found by clang.

svn path=/trunk/; revision=35210
2010-12-17 13:01:52 +00:00
Bill Meier 2f8ab63858 Compile (over 100) dfilters only if needed rather than at every Wireshark startup;
Also: Minor whitespace cleanup.

svn path=/trunk/; revision=34747
2010-11-01 18:38:13 +00:00
Bill Meier acccf6a77c Define some fcns & vars as static...
svn path=/trunk/; revision=34459
2010-10-10 20:14:34 +00:00
Bill Meier 9c0d7c63a8 Do some constifying (based upon gcc -Wwrite-strings warnings);
Use #if 0/#endif instead of /* ... */ to comment out code..

svn path=/trunk/; revision=33176
2010-06-09 13:30:44 +00:00
Guy Harris 927b7da346 Have abs_time_to_str() and abs_time_to_str_secs() take an additional
argument indicating whether to include the time zone in the string.  If
we're constructing a display filter, don't include the time zone,
otherwise do.  Fixes bug 4756.

svn path=/trunk/; revision=32913
2010-05-21 06:33:25 +00:00
Guy Harris 500eb99cd9 Add a third date format, ABSOLUTE_TIME_DOY_UTC, to show UTC with the
date as YYYY/DDD, where DDD is a 1-origin day of year.  Move the formats
to a "time_fmt.h" file, included by the headers that use it.  Have
abs_time_to_str() and abs_time_secs_to_str() take the date format value,
rather than a Boolean "show this as UTC" flag, as an argument.  Document
the ABSOLUTE_TIME_ formats a bit better.  Use that format in the CCSDS
and VCDU dissectors, rather than having those dissectors do the
formatting themselves.

svn path=/trunk/; revision=32034
2010-02-27 19:01:27 +00:00
Stig Bjørlykke 88b72356ad Introduce "Reassembled length" filter element for all protocols doing
reassembly.

svn path=/trunk/; revision=31767
2010-02-02 16:01:52 +00:00
Guy Harris 4fde145bd2 Add an argument to abs_time_to_str() and abs_time_secs_to_str()
indicating whether the time should be shown as local time or UTC.  For
now, always pass FALSE, meaning "show as local time".

Clean up some stuff in the SNMP dissector, use abs_time_secs_to_str()
for times with one-second resolution, and update a comment in various
macros in the WSP dissector, while we're at it.

svn path=/trunk/; revision=31227
2009-12-10 22:19:29 +00:00
Bill Meier f479b75ea3 Remove #define which is no longer req'd.
svn path=/trunk/; revision=30525
2009-10-12 00:54:41 +00:00
Bill Meier 9f24b1870b Replace use of GMemChunk by se_alloc;
This fixes a major memory leak in the NCP dissector
caused by the fact that "in recent versions of GLib" (>= 2.10 ?)
g_mem_chunk_destroy doesn't actually free up the mem_chunk memory.

Note that there still appears to be one or more smaller
memory leaks somehow associated with NCP dissection.

Example:

A 40M capture file with mostly NCP frames which resulted in a memory
usage increase of about 20M each time the file was reloaded now results 
in a 400K-800K memory usage increase each time the file is reloaded.

(If NCP dissection is disabled, there is minimal memory expansion
each time the file is reloaded).


svn path=/trunk/; revision=30481
2009-10-10 21:13:16 +00:00
Bill Meier 17a2e0b460 Fix a benign no-effect bug;
Use consistent indentation.

svn path=/trunk/; revision=30480
2009-10-10 17:49:28 +00:00
Kovarththanan Rajaratnam cf8138e195 Remove check_col() guard
svn path=/trunk/; revision=30124
2009-09-24 19:50:43 +00:00
Kovarththanan Rajaratnam fa940d3366 Use PTREE_FINFO.
svn path=/trunk/; revision=29356
2009-08-09 18:05:44 +00:00
Anders Broman c91a384702 Apply some of the patches from:
http://wiki.wireshark.org/Development/Optimization

svn path=/trunk/; revision=28356
2009-05-13 19:46:11 +00:00
Guy Harris cfe974aadd The expert_item pointers and expert_status values don't need to be
static; make them auto variables.

Make sure that expert information is added outside "if (tree) { }", so
it gets added even if we're not building the protocol tree.

Clean up white space.

svn path=/trunk/; revision=28281
2009-05-05 19:33:46 +00:00
Gerald Combs 4403f89243 More size_t fixes.
svn path=/trunk/; revision=27976
2009-04-06 19:30:48 +00:00
Jaap Keuter d373860a00 Make the column check actually check the information column status.
svn path=/trunk/; revision=27223
2009-01-13 20:46:26 +00:00
Stig Bjørlykke e6a22e689e Fix some "format not a string literal and no format arguments" warnings.
svn path=/trunk/; revision=26648
2008-10-31 15:34:00 +00:00
Bill Meier 7f2978acc8 From Pavol Rusnak: Add missing break statement....
svn path=/trunk/; revision=26166
2008-09-08 16:13:39 +00:00
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