Commit Graph

48155 Commits

Author SHA1 Message Date
Pascal Quantin 9ef54f5ea2 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9035 :
Indicate the right direction in info column

svn path=/trunk/; revision=51333
2013-08-13 08:19:41 +00:00
Guy Harris 890093e0e4 Wrap in "extern "C"" for the benefit of C++ code including it.
svn path=/trunk/; revision=51332
2013-08-13 07:58:06 +00:00
Anders Broman 1e9644c204 From Javier Godoy:
Dissect additional OSD-2 service actions (CREATE/REMOVE PARTITION, GET/SET ATTRIBUTES, QUERY).

This patch adds support for some OSD-2 service actions, following the approach described in bug 8832.

The implemented service actions are:   
 - CREATE PARTITION
 - REMOVE PARTITION
 - REMOVE COLLECTION
 - GET ATTRIBUTES
 - SET ATTRIBUTES
 - QUERY
  
The following service action codes was #defined
 - OSD_2_REMOVE_PARTITION	0x888c
	
The following trees were added 
 - ett_osd2_query_criteria_entry

The following fields were added:	
 - hf_scsi_osd2_remove_scope (REMOVE PARTITION)
 - hf_scsi_osd2_immed_tr (QUERY)
 - hf_scsi_osd2_matches_collection_object_id (QUERY)
 - hf_scsi_osd2_query_type (query list CDB continuation descriptor)
 - hf_scsi_osd2_query_entry_length (query list CDB continuation descriptor)
 - hf_scsi_osd2_query_attributes_page (query list CDB continuation descriptor)
 - hf_scsi_osd2_query_attribute_number (query list CDB continuation descriptor)
 - hf_scsi_osd2_query_minimum_attribute_value_length (query list CDB continuation descriptor)*
 - hf_scsi_osd2_query_maximum_attribute_value_length (query list CDB continuation descriptor)*
 * (dissection of the attribute value in query descriptors is not implemented yet)
 
The following value_string arrays were added:
 - scsi_osd2_remove_scope_val (OSD2r4 Table 143)
 - scsi_osd2_query_type_vals (OSD2r4 Table 75)
 
The following value_string arrays were updated:		
 - scsi_osd_svcaction_vals
 - scsi_osd2_object_descriptor_format_val
 
The following functions were added:	 
 - dissect_osd2_query
 - dissect_osd2_query_list_descriptor (dissect CDB continuation descriptor type 0x0002)
 
The following expert_info fields were added:
 - ei_osd2_query_values_equal (PI_PROTOCOL,PI_NOTE) - the minimum and maximum attribute values are equal in a query descriptor entry
  
Changes in dissect_osd2_cdb_continuation:
 - Dissect case 0x0002 
 
Changes in dissect_osd_*
 - Initialize extra_data->osd2
 - Dissect OSD-2 specific fields
 - Call dissect_osd_cdb_continuation_length / dissect_osd_cdb_continuation  (if osd2)
 - Version-specific increment of offset after dissecting capability/security_parameters

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9029

svn path=/trunk/; revision=51331
2013-08-13 05:29:04 +00:00
Anders Broman 4daf984804 From Yaniv Kaul:
small addition to SCSI dissection (media rotation speed analysis)

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9030

svn path=/trunk/; revision=51330
2013-08-13 05:19:48 +00:00
Evan Huus a2b2885daf Create the dissector hash table in only one place, and specify that its values
should be freed when it is destroyed. This requires splitting packet_init in
two: the hash table which must be created before protocol registration, and the
caching of common protocol handles, which must happen after registration.

svn path=/trunk/; revision=51329
2013-08-13 03:11:28 +00:00
Evan Huus 14b098baf7 When freeing the preferences of a module, also free the preferences of its
submodule.

svn path=/trunk/; revision=51328
2013-08-13 02:56:55 +00:00
Evan Huus f528d4ecbc Only rescan packets if we have packets to rescan. Fixes at least the surface
problem in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9033

The underlying scoping issues may not be fully resolved yet.

svn path=/trunk/; revision=51327
2013-08-13 02:18:04 +00:00
Evan Huus 7292140b9c Fix name resolution tests:
- if we find a name during lookup, return it even if it's not a dummy
- read personal hosts after global hosts so that they take precedence

Neither of these problems appear to be new - the recent work did not change this
logic, so I have no idea how come name resolution wasn't failing before, but I
guess the old hash table was weirder than I thought...

svn path=/trunk/; revision=51326
2013-08-13 01:41:51 +00:00
Evan Huus 616324c21e Be sure to initialize the jumbo flag when creating a new chunk header by
splitting an existing chunk. Thanks to Jeff for catching this one.

svn path=/trunk/; revision=51325
2013-08-12 23:35:35 +00:00
Jörg Mayer 3b5aaefce3 - Extract variables from Makefile.common.
- Apply this to asn1/c1222/

svn path=/trunk/; revision=51324
2013-08-12 22:17:06 +00:00
Guy Harris 50eb826406 If we're looking for some version of GTK+, and don't find it, fail.
That way, if somebody specifies --with-gtk[23] and that version of GTK+
isn't found, we fail with an indication that the version of GTK+ they
asked for isn't there, and if no GUI toolkit was specified, and they
didn't explicitly say "don't build Wireshark", we look for GTK+ 3 and,
if it's not found, let the user know explicitly.

svn path=/trunk/; revision=51323
2013-08-12 20:24:59 +00:00
Guy Harris bebe1200de Just check whether dladdr() is available; we check in the code whether
it succeeds, so there's no point in checking whether it succeeds in a
sample program.

svn path=/trunk/; revision=51322
2013-08-12 20:01:30 +00:00
Pascal Quantin 4b641014a2 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9031 :
SIP contact-param parsing should be stopped when finding a comma separator

svn path=/trunk/; revision=51321
2013-08-12 19:23:08 +00:00
Guy Harris 57b8c51a2e Tell a bit more of the story of dladdr()'s ability, or lack of same, to
return a path for the executable image not based on argv[0].

svn path=/trunk/; revision=51320
2013-08-12 18:51:06 +00:00
Anders Broman 1ef4ba5e32 Move initalisation of IPv4 hastable to the host_name_lookup_init() rotine.
svn path=/trunk/; revision=51319
2013-08-12 18:33:08 +00:00
Anders Broman af49292ae2 From Tommy Wu:
-         AppId is unsigned.
-         Add Relay application.

svn path=/trunk/; revision=51318
2013-08-12 18:29:42 +00:00
Alexis La Goutte 25a8c57356 Fix error when enable "debug" in wiretap/pcapng.c file
With gcc :
pcapng.c: In function 'pcapng_read_packet_block':
pcapng.c:1147:9: error: request for member 'pseudo_header' in something not a structure or union

With clang :
pcapng.c:1150:86: error: member reference type 'struct wtap_pkthdr *' is a pointer; maybe you meant to use '->'?
                       pcap_get_phdr_size(int_data.wtap_encap, &wblock->packet_header.pseudo_header));
                                                                ~~~~~~~~~~~~~~~~~~~~~^
                                                                                     ->
(Error message from clang is better...)

svn path=/trunk/; revision=51317
2013-08-12 17:46:04 +00:00
Alexis La Goutte f9da854013 Fix shorten-64-to-32 error when build with clang 3.4
mcast_stream.c:393:29: error: implicit conversion loses integer precision: 'long' to 'gint32' (aka 'int')
      [-Werror,-Wshorten-64-to-32]
        usec = buffer[cur].tv_usec - buffer[prev].tv_usec;
             ~ ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

svn path=/trunk/; revision=51316
2013-08-12 17:45:54 +00:00
Guy Harris 95785b9100 Use "command -v", required by recent POSIX, rather than "which"; I seem
to remember this being suggested relatively recently on some mailing list
(either one of the Wireshark lists or tcpdump-workers, I think).

Handle systems where /usr/X11R6/bin is a symlink to /usr/bin and where
the user running autogen.sh has /usr/X11R6/bin before /usr/bin in their
$PATH.

svn path=/trunk/; revision=51315
2013-08-12 17:16:08 +00:00
Stig Bjørlykke 1cf28c375f Double click Lua scripts in About Plugins list to open in an editor.
svn path=/trunk/; revision=51314
2013-08-12 12:59:21 +00:00
Martin Kaiser f76303cd6c coverity 280403 (logically dead code)
set first to FALSE after the first block was dissected

svn path=/trunk/; revision=51313
2013-08-12 10:15:01 +00:00
Pascal Quantin 40607cbd27 Check presence of PagingRecordList before trying to fetch the number of Paging Ids
svn path=/trunk/; revision=51312
2013-08-12 09:56:30 +00:00
Pascal Quantin 24e7b8aefd Fix copy paste error and reinitialize actx->private_data to NULL once used
svn path=/trunk/; revision=51311
2013-08-12 09:26:24 +00:00
Guy Harris 9ff00164a8 Fix a comment.
Fix calls checking the Linux version number.

svn path=/trunk/; revision=51310
2013-08-12 09:18:54 +00:00
Guy Harris 70523b5014 On some platforms, to get dladdr() you need to link with -ldl. First
try it without -ldl (in case the OS doesn't have it - not a good idea,
as it complicates the build process for cross-platform tools that might
require it on other platforms, but "not a good idea" never stopped UN*X
vendors in the past) and, if that fails, try it with -ldl.

svn path=/trunk/; revision=51309
2013-08-12 09:09:32 +00:00
Guy Harris f568d56df2 Add in a bunch of UNIX-platform-specific ways of getting executable path
information supplied by the kernel; sadly, we can't trust dladdr() to
use those mechanisms, so we try this first.

Expand the comment about finding the application bundle path given the
executable image path.

svn path=/trunk/; revision=51308
2013-08-12 08:28:34 +00:00
Guy Harris 829a4f213a Add a comment discussing the layout of application bundles and the
directories we should - and perhaps should *not* - set up.

svn path=/trunk/; revision=51307
2013-08-12 01:20:20 +00:00
Guy Harris 237c5a7b60 If we weren't started with special privileges, try to figure out if
we're running from inside an OS X app bundle and, if we are, save the
pathname of the top-level bundle directory and use it to get the
pathnames of global data files, plugins, and Python modules.

This obviates the need to set special environment variables for them in
the launcher scripts, so get rid of the commands to do that.

The @rpathification of binaries also obviates the need for the
commented-out setting of DYLD_LIBRARY_PATH, so get rid of that as well.

svn path=/trunk/; revision=51306
2013-08-12 00:59:34 +00:00
Evan Huus bf0f0ec4d9 Reorder and group chunk header flags. Reduces the bit-twiddling needed by the
compiler and provides a surprising (if fairly small) performance win.

svn path=/trunk/; revision=51305
2013-08-11 23:49:56 +00:00
Evan Huus dc46cb0f29 Split jumbo_free and jumbo_realloc into their own functions for readability and
consistency (they are called just once and will be inlined by any reasonable
compiler).

Also add some comments, fix some spacing etc. No functional changes.

svn path=/trunk/; revision=51304
2013-08-11 22:32:46 +00:00
Evan Huus 6eef00ac05 Move the null check outside the function call. Simpler, and more efficient for
compilers that decide not to inline.

svn path=/trunk/; revision=51303
2013-08-11 22:20:35 +00:00
Evan Huus 497e53ee06 Little optimization: move two statements inside an if block.
svn path=/trunk/; revision=51302
2013-08-11 19:33:30 +00:00
Anders Broman 93c9c4b0ff Use g_hashtable for IPv4 name resolution.
svn path=/trunk/; revision=51301
2013-08-11 19:02:26 +00:00
Evan Huus f9834195ed Don't let a valgrind-output-parsing error hide the fact that it was an error of
some sort: if we don't recognize valgrind's output then something somewhere went
wrong and we should be informed.

svn path=/trunk/; revision=51300
2013-08-11 17:48:49 +00:00
Evan Huus 36ff6f2c25 Add support for allocating more than will fit in a single block, through the use
of a jumbo flag in the chunk header.

svn path=/trunk/; revision=51299
2013-08-11 17:18:19 +00:00
Evan Huus 959ee8f5c0 Instead of using a glib slist to track the list of blocks, embed a short
doubly-linked list at the head of each block. This was intended as a step
towards supporting allocations bigger than the usual block size, but also shows
up as a 2% performance improvement in the speed test, so win-win.

svn path=/trunk/; revision=51298
2013-08-11 16:06:07 +00:00
Evan Huus 3bac7e845b Small optimization: the master-list and recycler cases are different enough that
doing all the safety checks was unnecessarily slow. Do only the appropriate
checks for each case.

svn path=/trunk/; revision=51296
2013-08-11 14:20:00 +00:00
Gerald Combs f2b6745b2a [Automatic manuf, services and enterprise-numbers update for 2013-08-11]
svn path=/trunk/; revision=51294
2013-08-11 14:03:40 +00:00
Evan Huus 9fdf6f28e4 Split some asserts so it is more clear what the problem is when they are
triggered.

svn path=/trunk/; revision=51293
2013-08-11 13:44:11 +00:00
Evan Huus 83d31621fb Free a few hash tables in packet.c when we shutdown.
svn path=/trunk/; revision=51292
2013-08-11 13:42:12 +00:00
Evan Huus 1176e2f3d7 Modelines and consistent indentation.
Also tweak some ifdefs of function signatures. The multiple braces were
confusing my folder and my indenter, so ifdef *only* the changed parameters and
leave the bracing alone. This has the benefit of being a bit clearer too, I
think.

svn path=/trunk/; revision=51291
2013-08-11 00:50:51 +00:00
Evan Huus f75302817b Fix 130KB of leaked memory exposed (or caused?) by the conversion to glib hash
tables.

svn path=/trunk/; revision=51290
2013-08-11 00:35:22 +00:00
Guy Harris 84239c0c06 Initialize float variables with float constants, not double constants,
and assign float constants, not double constants, to float variables. 
Floating-point constants are double by default; you have to add "f" to
the end to make them float.

This squelches 64-bit-to-32-bit warnings.

svn path=/trunk/; revision=51289
2013-08-10 21:34:15 +00:00
Alexis La Goutte 05739c8f15 RPKI-RTR is not a asn1 dissector...
svn path=/trunk/; revision=51288
2013-08-10 21:32:48 +00:00
Alexis La Goutte f12a5fb7ae Update .gitignore
Add :
packaging/macosx/Wireshark_package.pmdoc/index.xml
and lib(wireshark/wiretap/wsutil).so.*

svn path=/trunk/; revision=51287
2013-08-10 21:32:40 +00:00
Alexis La Goutte 7db2d358ec Fix (-W)header-guard error found by clang 3.4
./frame_tvbuff.h:25:9: error: '__FRAME_TVBUFF__' is used as a header guard here,
      followed by #define of a different macro [-Werror,-Wheader-guard]
#ifndef __FRAME_TVBUFF__
        ^~~~~~~~~~~~~~~~
./frame_tvbuff.h:26:9: note: '__FRAME_TVBUFF_H__' is defined here; did you mean
      '__FRAME_TVBUFF__'?
#define __FRAME_TVBUFF_H__
        ^~~~~~~~~~~~~~~~~~
        __FRAME_TVBUFF__

svn path=/trunk/; revision=51286
2013-08-10 21:32:32 +00:00
Alexis La Goutte d2c0e56d94 Fix (-W)header-guard error found by clang 3.4
./packet-ldp.h:26:9: error: '__PACKET_LDP_H_' is used as a header guard here,
      followed by #define of a different macro [-Werror,-Wheader-guard]
#ifndef __PACKET_LDP_H_
        ^~~~~~~~~~~~~~~
./packet-ldp.h:27:9: note: '__PACKET_LDP_H__' is defined here; did you mean
      '__PACKET_LDP_H_'?
#define __PACKET_LDP_H__
        ^~~~~~~~~~~~~~~~
        __PACKET_LDP_H_

svn path=/trunk/; revision=51285
2013-08-10 21:32:24 +00:00
Alexis La Goutte d5fed8b085 Fix (-W)header-guard error found by clang 3.4
./packet-idp.h:25:9: error: '__PACKET_IDP_H__' is used as a header guard here,
      followed by #define of a different macro [-Werror,-Wheader-guard]
#ifndef __PACKET_IDP_H__
        ^~~~~~~~~~~~~~~~
./packet-idp.h:26:9: note: '__PACKET_IPX_H__' is defined here; did you mean
      '__PACKET_IDP_H__'?
#define __PACKET_IPX_H__
        ^~~~~~~~~~~~~~~~
        __PACKET_IDP_H__

svn path=/trunk/; revision=51284
2013-08-10 21:32:16 +00:00
Alexis La Goutte 857f89a681 Fix (-W)header-guard error found by clang 3.4
../../epan/dissectors/packet-mpeg-sect.h:26:9: error: '__PACKET_MPEG_SECT_H_' is
      used as a header guard here, followed by #define of a different macro
      [-Werror,-Wheader-guard]
#ifndef __PACKET_MPEG_SECT_H_
        ^~~~~~~~~~~~~~~~~~~~~
../../epan/dissectors/packet-mpeg-sect.h:27:9: note: '__PACKET_MPEG_SECT_H__' is
      defined here; did you mean '__PACKET_MPEG_SECT_H_'?
#define __PACKET_MPEG_SECT_H__
        ^~~~~~~~~~~~~~~~~~~~~~
        __PACKET_MPEG_SECT_H_

svn path=/trunk/; revision=51283
2013-08-10 21:32:08 +00:00
Alexis La Goutte 4398ffa647 Fix (-W)header-guard error found by clang 3.4
./packet-osi-options.h:26:9: error: '_PACKET_OSI_OPTION_H' is used as a header
      guard here, followed by #define of a different macro
      [-Werror,-Wheader-guard]
#ifndef _PACKET_OSI_OPTION_H
        ^~~~~~~~~~~~~~~~~~~~
./packet-osi-options.h:27:9: note: '_PACKET_OSI_OPTIONS_H' is defined here; did
      you mean '_PACKET_OSI_OPTION_H'?
#define _PACKET_OSI_OPTIONS_H
        ^~~~~~~~~~~~~~~~~~~~~
        _PACKET_OSI_OPTION_H

svn path=/trunk/; revision=51282
2013-08-10 21:31:59 +00:00