Commit Graph

43288 Commits

Author SHA1 Message Date
Evan Huus ee5a8dd17d Do free overwritten names when registering oids. There was a comment claiming
we couldn't since the name might not be on the heap, but it looks to me like
we're always careful to put it on the heap via a g_strdup if necessary.

Fixes some minor memory leaks.

svn path=/trunk/; revision=45814
2012-10-27 21:01:41 +00:00
Evan Huus 67f2dc0876 Don't leak memory when registering duplicate preferences subtree modules. Take
wmem_permanent copies of the substrings we actually need, and g_free the
temporary tokenized copy.

svn path=/trunk/; revision=45813
2012-10-27 20:41:58 +00:00
Evan Huus b7ff007bbb There's no need to g_strdup our default prefs - setting them as literals
works just fine and doesn't leak any memory.

Use wmem_permanent_scope() for the one string we do have to copy, to ensure
it doesn't leak either.

svn path=/trunk/; revision=45812
2012-10-27 20:29:12 +00:00
Pascal Quantin 51e45c8da9 From Mike Morrin via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7911 :
Fix dissection of some GSM RR IEs which include length octet

From me:
Keep displaying those IEs as TLV to keep coherency with other TLV IEs
Fix dissection of Dynamic ARFCN Mapping

svn path=/trunk/; revision=45811
2012-10-27 17:03:12 +00:00
Evan Huus 221ae051f2 SVN properties for wmem slab files.
svn path=/trunk/; revision=45810
2012-10-27 15:36:50 +00:00
Evan Huus a02e765e00 Experimental slab allocator logic for wmem.
Thanks to Sébastien Tandel for the idea.

svn path=/trunk/; revision=45809
2012-10-27 15:35:32 +00:00
Jakub Zawadzki 418f56d093 Don't use wtap_phdr() for getting pkthdr struct after wtap_seek_read().
svn path=/trunk/; revision=45808
2012-10-27 08:32:41 +00:00
Evan Huus 0ed00c491d Update openSafety dissector with new Modbus dissector table name.
Fixes
> OOPS: dissector table "mbtcp.modbus.data" doesn't exist
> Protocol being registered is "openSAFETY"
introduced in revision 45793.

svn path=/trunk/; revision=45807
2012-10-27 02:53:29 +00:00
Evan Huus 43fadb88cb Add comment explaining the addr->hf field to column-utils for future
reference. Those lines were already starting to look like magic and
it's only been 24 hours.

svn path=/trunk/; revision=45806
2012-10-27 02:48:45 +00:00
Evan Huus b464dcd888 Create init and cleanup functions for wmem as a whole.
Call them from epan_init() and epan_cleanup().
Expose a permanent wmem scope for allocations that should only be freed when
epan is done (which is *not* necessarily when the program finishes).

svn path=/trunk/; revision=45805
2012-10-27 02:42:05 +00:00
Evan Huus 2ea364607a Make the allocator destructor part of wmem_allocator_t. This avoids two
potential bugs:
 - calling the wrong destroy function on an allocator
 - a pool allocator forgetting to call free_all on itself in the destructor

Also, fix potential typedef redefinition warning in wmem_allocator_glib.h

svn path=/trunk/; revision=45804
2012-10-27 02:29:46 +00:00
Bill Meier 84f5f91022 Fix [-Wunused-but-set-variable] warnings.
svn path=/trunk/; revision=45803
2012-10-26 21:47:02 +00:00
Bill Meier 31b1b3780c General cleanup (No changes in dissection):
- rename variables to fix all "shadowed variable" warnings;
- remove certain 'if(tree)' statements;
   (A new-style dissector) should return the same
    'bytes processed' whether or not 'tree == NULL');
- simplify code in numerous places (including removing
   redundant/repeated code);
- fix remaining uses of FALSE as 'encoding' arg;
- use consistent indentation and formatting.

ToDo: Changes to fix apparent cases of incorrect
      dissection.

svn path=/trunk/; revision=45802
2012-10-26 21:17:33 +00:00
Gerald Combs d08f111496 Minor cleanup.
svn path=/trunk/; revision=45801
2012-10-26 18:31:00 +00:00
Gerald Combs 6c92b6d86a Add an option (-P) for a minimum plugin count.
svn path=/trunk/; revision=45800
2012-10-26 16:30:48 +00:00
Bill Meier c654a52e64 (Minor) Use correct description for tvb_find_guint8().
svn path=/trunk/; revision=45799
2012-10-26 16:09:01 +00:00
Gerald Combs 04fea80bf8 From Sho Amano via bug 7914:
If the source codes are checked out using TortoiseSVN on Windows,
"nmake -f Makefile.nmake packaging_papps" fails in the middle.

This is because the line end of packaging\nsis\wireshark.nsi is CRLF in
this case, and ws-manifest.pl cannot handle such case.

svn path=/trunk/; revision=45798
2012-10-26 15:51:28 +00:00
Anders Broman a579e9875b Prepare to dissect 3GPP options.
svn path=/trunk/; revision=45797
2012-10-26 15:35:41 +00:00
Anders Broman b3572877da More options dissecton.
svn path=/trunk/; revision=45796
2012-10-26 13:29:02 +00:00
Pascal Quantin 1ac326467c Fix copy/paste error
svn path=/trunk/; revision=45795
2012-10-26 05:50:57 +00:00
Anders Broman 0b645cf006 Fix [-Werror=sign-compare] [-Wunused-but-set-variable]
svn path=/trunk/; revision=45794
2012-10-26 05:46:56 +00:00
Michael Mann 1fe105a5ab Improve Modbus/TCP dissector, Part 1
This is a portion of the patch supplied in bug 7902 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7902).  Breaking the functionality up into smaller chunks.

This definitively breaks the Modbus dissection into 3 dissectors:
Modbus - real protocol PDU
Modbus/TCP - Encapsulation of Modbus over TCP (with a small header before PDU)
Modbus RTU - Originally an encapsulation of Modbus over serial (with smaller header + CRC), but can also be sent over TCP.

General cleanup/refactoring (including display filter names) based on the 3 dissectors.
Also included:
1. Enhanced dissection to include preferences for register data to be dissected as UINT16, UINT32 or FLOAT
2. Dynamic port registration
3. Additional fields now filterable

svn path=/trunk/; revision=45793
2012-10-26 02:15:20 +00:00
Evan Huus 361aedec1f Create SET_ADDRESS_HF that takes an additional hf_ value that can be
used to override the filter generated from the address column.

Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7728 (again).

svn path=/trunk/; revision=45792
2012-10-26 01:59:17 +00:00
Evan Huus c6b522bc70 Revert revision 44921.
See discussion on https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7728

svn path=/trunk/; revision=45791
2012-10-26 00:42:34 +00:00
Jeff Morriss d97b4ec325 Fix problem where NTP times with the high-bit set to 0 (which RFC 2030
chapter 3 has redefined to mean years *after* 2036) were being represented as
times prior to 1968.

This has been broken since r35840 (apparently not many people see NTP
timestamps beyond 2036 :-)): apparently I over-optimized packet-ntp's code
while copying it into proto.c: that temporary variable is necessary for the
unsigned math to happen correctly before assigning the result to the (signed)
time_t.

Leave a comment in the code indicating why the temporary variable is needed.
Copy that comment to packet-ntp.c.

Fix the same problem in ntp_to_nstime(): it also did not use the temporary variable.

svn path=/trunk/; revision=45790
2012-10-25 22:26:52 +00:00
Pascal Quantin 4518ece9f9 From Umberto Corponi via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7912 :
Allow dissection of ESM messages with integrity protection and EEA0 ciphering

From me:
Tighten heuristic to check for allowed EPS bearer identity values

svn path=/trunk/; revision=45789
2012-10-25 21:37:12 +00:00
Jeff Morriss e6d6d7272a Create and start using macros for MTP3 network indicators.
pinfo has a match_uint field: use it instead of passing the SI of the message
to subdissectors in private_data.

svn path=/trunk/; revision=45788
2012-10-25 20:25:06 +00:00
Jeff Morriss 827312f886 Mark a couple of parameters as unused. Fix up indentation (replace 4-space tabs with spaces) and trailing white space.
svn path=/trunk/; revision=45787
2012-10-25 16:15:58 +00:00
Jeff Morriss 95094bf420 Fix cut-n-pasteo.
svn path=/trunk/; revision=45786
2012-10-25 16:03:38 +00:00
Anders Broman 59234a6b5e - Pretify output a bit more.
svn path=/trunk/; revision=45785
2012-10-25 15:57:05 +00:00
Jeff Morriss d407ce0d36 Create and start using macros for MTP3 network indicators.
Export the network indicator value_string and use it in M3UA.

svn path=/trunk/; revision=45784
2012-10-25 15:34:57 +00:00
Anders Broman ae4115bcdb - Dissect more options.
- Correct a Timestamp bug.
- Try to pretify the options dissection.

svn path=/trunk/; revision=45783
2012-10-25 12:54:37 +00:00
Anders Broman 2c38e9b1dc Add application/ccmp+xml
svn path=/trunk/; revision=45782
2012-10-25 10:16:09 +00:00
Evan Huus e6639e035e Don't use g_slist_free_full() it needs a more recent GLIB than we officially
require.

svn path=/trunk/; revision=45781
2012-10-24 22:14:32 +00:00
Martin Kaiser bbe9e06964 fix compliation on Win64
svn path=/trunk/; revision=45780
2012-10-24 21:45:50 +00:00
Martin Kaiser 92f9319d33 add Alexander Koeppe's ftp contribution
svn path=/trunk/; revision=45779
2012-10-24 21:02:08 +00:00
Martin Kaiser b60c69dc14 From Alexander Koeppe
parse EPSV response

from me
- no expert info under if(tree)
- use hf_ftp_epsv_port instead of hf_ftp_pasv_port
- don't use isdigit(), this is C99
- use temporary variable for IPv4 address

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

svn path=/trunk/; revision=45778
2012-10-24 20:59:27 +00:00
Chris Maynard a753eaaea0 Use tvb_reported_length to skip past all the bytes in the tvb.
svn path=/trunk/; revision=45777
2012-10-24 20:31:09 +00:00
Chris Maynard a121a30f7c tabs -> spaces, indentation fixups.
tvb_length_remaining -> tvb_reported_length_remaining.
Check return value of tvb_reported_length_remaining > 0.
Use tvb_reported_length to skip past all the bytes in the tvb.

svn path=/trunk/; revision=45776
2012-10-24 19:32:59 +00:00
Chris Maynard 6a4eed57f2 To indicate that all bytes in the tvb were consumed, just return tvb_reported_length().
svn path=/trunk/; revision=45775
2012-10-24 19:13:54 +00:00
Chris Maynard 2e701abf3a tvb_length_remaining() -> tvb_reported_length_remaining(). To indicate that all bytes in the tvb were consumed, just use tvb_reported_length().
svn path=/trunk/; revision=45774
2012-10-24 18:59:34 +00:00
Chris Maynard 58a6e4b253 Use tvb_reported_length() to skip past all bytes in the tvb.
svn path=/trunk/; revision=45773
2012-10-24 18:52:06 +00:00
Chris Maynard cacea3f59b No need to increment offset past bytes in tvb; just return instead.
svn path=/trunk/; revision=45772
2012-10-24 18:42:11 +00:00
Guy Harris 1340194a62 wmem_allocator_t is defined in wmem_core.h; redefining it elsewhere will
cause errors.

svn path=/trunk/; revision=45771
2012-10-24 18:38:55 +00:00
Chris Maynard bc8e520439 Allow <interval> to be successfully sscanf'd no matter the locale for the
decimal symbol.  Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2880 (again).

#BACKPORT(1.8)

svn path=/trunk/; revision=45770
2012-10-24 17:46:16 +00:00
Chris Maynard b8e5c94167 List -z compare,... in the statistics documentation. Maybe someone who actually knows how to use it could elaborate?
svn path=/trunk/; revision=45769
2012-10-24 17:24:50 +00:00
Pascal Quantin 6d99fb6a9f Add dissection of ENVELOPE 3GPP SMS-PP Download
svn path=/trunk/; revision=45768
2012-10-24 16:05:50 +00:00
Alexis La Goutte f7c19facb7 Add Modelines info for new common ui source file(s)
svn path=/trunk/; revision=45767
2012-10-24 15:52:45 +00:00
Alexis La Goutte 7b3055b74b Fix indent and add Modelines info for new common ui source file(s)
svn path=/trunk/; revision=45766
2012-10-24 15:52:35 +00:00
Alexis La Goutte 14f2efec2b Fix indent and add Modelines info for new common ui source file(s)
svn path=/trunk/; revision=45765
2012-10-24 15:52:26 +00:00