Commit Graph

218 Commits

Author SHA1 Message Date
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Balint Reczey 0e9ed5ecf0 Move wslua_plugin_list to epan/plugins.c, that should fix the Solaris builds finally.
svn path=/trunk/; revision=35167
2010-12-10 10:37:03 +00:00
Balint Reczey 07cf00cd11 Drop init_wslua.h from EXTRA_DIST
svn path=/trunk/; revision=35164
2010-12-09 15:47:23 +00:00
Balint Reczey 2118fd723c Always provide wslua_plugin_list, even if we don't have Lua configured.
svn path=/trunk/; revision=35163
2010-12-09 15:20:14 +00:00
Stig Bjørlykke 61d99fff9a From Regis Cridlig via bug 5326:
The Lua text string passed to column:set(text) by a dissector will eventually
be reclaimed. This causes the column to display incorrect characters.

svn path=/trunk/; revision=34618
2010-10-22 06:47:00 +00:00
Jeff Morriss 9f3acc1e25 Aw, man, I knew this code was parsed, but I missed the docbook part. Revert 34598 and 34599.
svn path=/trunk/; revision=34602
2010-10-21 12:41:15 +00:00
Jeff Morriss 383df3dfe5 Make the indentation consistent.
Pull function names to column 0 - except when necessary for autoregistration.
Put function comments before the function.
For readability, put the macros for functions before the function too.
Put class functions before the class.

svn path=/trunk/; revision=34599
2010-10-21 02:50:27 +00:00
Jeff Morriss f3648fc66d Fix up indentation to get it consistent and other minor cleanup issues.
svn path=/trunk/; revision=34598
2010-10-21 00:54:58 +00:00
Jeff Morriss 30ab866b25 From Holger Freyther via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5320 :
Doing a Dumper:close() and then forcing the dumper to be garbage collected will
cause a segfault.

The code attempts to handle the GC that could follow but fails to do it
properly. Assigning Dumper dp = NULL will only have an affect within the scope
of this method... Assumingly this should be a *dp = NULL.

svn path=/trunk/; revision=34597
2010-10-21 00:37:40 +00:00
Anders Broman a009cc0605 Doxygen changes.
svn path=/trunk/; revision=33990
2010-08-29 10:47:38 +00:00
Anders Broman a96e6b2047 Doxygen changes.
svn path=/trunk/; revision=33981
2010-08-28 19:27:19 +00:00
Stig Bjørlykke 30875d714c Do not load lua-scripts starting with '.'
svn path=/trunk/; revision=33793
2010-08-13 11:18:44 +00:00
Stig Bjørlykke 92312f16e9 Declare error as volatile to avoid warning on opensolaris:
variable 'error' might be clobbered by `longjmp' or `vfork'

svn path=/trunk/; revision=33754
2010-08-10 07:43:05 +00:00
Stig Bjørlykke b0c0ebcc20 Fix the check for disable_lua.
svn path=/trunk/; revision=33252
2010-06-18 15:25:41 +00:00
Stig Bjørlykke ba69712a63 Enable Lua by default.
svn path=/trunk/; revision=33243
2010-06-17 16:38:05 +00:00
Jeff Morriss d888a1a53a Fix the Windows build
svn path=/trunk/; revision=33010
2010-05-28 13:09:12 +00:00
Jörg Mayer e37e3ba26a Remaining fixes for
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4788
- Compile the python code directly into epan - don't link it in as
  a static lib.
- Call make-init-lua.pl with the top level directory instead of the
  current directory. Change make-init-lua.pl accordingly.

svn path=/trunk/; revision=33009
2010-05-28 11:48:29 +00:00
Jörg Mayer f7fd044835 Fix for the LUA part of bug
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4788

- Don't build the wslua stuff as a (static) library, build the
  stuff directly into epan instead.

The wspython remains to be done.

svn path=/trunk/; revision=32992
2010-05-27 10:49:33 +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
Jeff Morriss 54082c6ed0 Add Cmake stuff to the source distribution so more people can try it out.
svn path=/trunk/; revision=32807
2010-05-14 16:27:03 +00:00
Anders Broman 96e9317c66 From Tamas Regos:
WSLUA improvement.

The existing ProtoField.bool looks like the following:
ProtoField.bool(abbr, [name], [desc])

But checking any protocol dissector with bool protofield, it can be seen that
in C code we have more options than thru the WSLUA interface.

E.g.: {&hf_gtp_qos_sig_ind,{"Signalling Indication", "gtp.sig_ind", FT_BOOLEAN,
8, TFS(&gtp_sig_ind), GTP_EXT_QOS_SIG_IND_MASK, NULL, HFILL}},

So I've extended ProtoField.bool to have more options like this:
ProtoField.bool(abbr, [name], [bitfield], [true_false_string], [mask], [desc])

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

svn path=/trunk/; revision=32771
2010-05-12 10:31:41 +00:00
Anders Broman 0107015266 From Tamas Regos:
Whitspace changes

svn path=/trunk/; revision=32770
2010-05-12 08:08:01 +00:00
Stig Bjørlykke 1c73f4eece From Tamas Regos via bug 4699:
Added get_version() Lua function to get Wireshark version.

svn path=/trunk/; revision=32521
2010-04-20 06:24:30 +00:00
Jaap Keuter b1ddbed608 Fix for bug 4695:
Modify ProtoField_tostring() to ProtoField__tostring() 
and clean up description.

svn path=/trunk/; revision=32517
2010-04-19 18:48:12 +00:00
Stig Bjørlykke d1d432bd10 From Didier Gautheron via bug 4622:
Double and float are BASE_NONE not BASE_DEC.

svn path=/trunk/; revision=32320
2010-03-28 19:02:52 +00:00
Jörg Mayer 96779de920 cmake changes:
- Add checking for linker flags
- Install plugins with the name including the Wireshark version.
  This will make it easier to find matching plugin versions if
  files get just copied over.


svn path=/trunk/; revision=32231
2010-03-18 10:27:17 +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 0991ef8cae Handle FT_PROTOCOL as ByteArray when used in a Field extractor.
svn path=/trunk/; revision=31951
2010-02-22 19:22:28 +00:00
Bill Meier 9c4e559887 Fix various gcc -Wshadow warnings.
svn path=/trunk/; revision=31716
2010-01-28 15:39:15 +00:00
Anders Broman 440c3f9261 From Didier Gautheron:
check_col.diff
Remove redundant calls to check_col() if it guards only one columns function with one parameter after the column type.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4394

svn path=/trunk/; revision=31519
2010-01-13 20:32:01 +00:00
Stig Bjørlykke 6defe828fc Made more generic concat meta method for TvbRange, Int64 and UInt64.
This way we can concat more objects in one line.

svn path=/trunk/; revision=31461
2010-01-07 12:40:23 +00:00
Stig Bjørlykke 703aa03948 Added concat meta method for TvbRange, Int64 and UInt64.
svn path=/trunk/; revision=31458
2010-01-06 22:14:25 +00:00
Stig Bjørlykke c5fac7edc4 Fix some documentation typos.
svn path=/trunk/; revision=31453
2010-01-06 10:13:56 +00:00
Stig Bjørlykke e619752c58 Added signed integer TvbRange methods.
svn path=/trunk/; revision=31452
2010-01-05 20:25:04 +00:00
Stig Bjørlykke a5c2c6fb0d Use correct method names in TvbRange error messages.
svn path=/trunk/; revision=31450
2010-01-05 16:07:21 +00:00
Stig Bjørlykke 31e116d74a Use correct field types for signed integer.
svn path=/trunk/; revision=31449
2010-01-05 15:37:45 +00:00
Stig Bjørlykke e472e2cca9 Use correct length for FT_STRINGZ when adding the item to the tree.
svn path=/trunk/; revision=31401
2010-01-01 18:49:38 +00:00
Stig Bjørlykke 3988c9b848 Add missing stringz tvbrange method.
This fixes bug 2244.

svn path=/trunk/; revision=31398
2010-01-01 15:57:14 +00:00
Stig Bjørlykke ac8fdfe571 From babi via bug 4352:
* wslua doesnt null-terminate a char array properly after one strncpy call
* packet-smb-sidsnooping (disabled now but someone might enable it again)
  has a potential overflow crash (i think?)

svn path=/trunk/; revision=31392
2009-12-30 14:24:10 +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
Stig Bjørlykke 4ec2ef9bf3 Give a warning for illegal preference name.
svn path=/trunk/; revision=31050
2009-11-22 22:13:11 +00:00
Jörg Mayer 9ee31d1d0e cmake will now honor -Werror if configured (default: on)
svn path=/trunk/; revision=30852
2009-11-07 10:07:00 +00:00
Stig Bjørlykke 3dd1312d74 Load lua scripts from subdirectories in the plugins folders.
svn path=/trunk/; revision=30683
2009-10-24 13:36:16 +00:00
Stig Bjørlykke 81807b3e9b Added init_wslua.h
svn path=/trunk/; revision=30676
2009-10-23 18:00:57 +00:00
Stig Bjørlykke 3a5c9ec3b2 Load lua scripts in the plugins directory, both global and personal.
List loaded lua scripts in Help->About->Plugins.

svn path=/trunk/; revision=30675
2009-10-23 17:52:18 +00:00
Stig Bjørlykke cf5f0407a6 Removed unused function tap_draw_cb_error_handler().
svn path=/trunk/; revision=30518
2009-10-11 16:41:33 +00:00
Stig Bjørlykke ca0379ca2a Make more functions static.
svn path=/trunk/; revision=30517
2009-10-11 16:27:37 +00:00
Stig Bjørlykke aae65704aa From Beth via bug 4049:
Add support for FT_BOOLEAN fields to FieldInfo and TreeItem.

svn path=/trunk/; revision=30249
2009-10-02 16:51:31 +00:00
Stig Bjørlykke 806df926b7 Removed fetching an unused variable. Leaving as a comment
for documentation purpose.

svn path=/trunk/; revision=30240
2009-10-01 17:25:24 +00:00
Stig Bjørlykke 9fd1f3d487 Removed redundant prototype of Tvb_range().
svn path=/trunk/; revision=30239
2009-10-01 17:24:29 +00:00