Commit Graph

378 Commits

Author SHA1 Message Date
Anders Broman ace0603d8f From Evan Huus: Fix memory leaks in wslua_pinfo.c https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7202
svn path=/trunk/; revision=42279
2012-04-27 05:47:42 +00:00
Jeff Morriss 75c3c92f19 Add a "-build" argument to checkAPIs.pl. Use that argument when building
from makefiles (and thus from the buildbot).

The intention is to be able to tell when a human is running the tool so we
can provide more code-review guidance.

As a starter, enable the "too many proto_tree_add_text() calls" check when
a human is running the tool.

svn path=/trunk/; revision=41943
2012-04-04 20:46:49 +00:00
Jeff Morriss 2d829b392f Line-wrap an extremely long comment. Remove trailing white space.
svn path=/trunk/; revision=41552
2012-03-15 02:33:52 +00:00
Guy Harris cd9fe7e242 Convert 4-space tabs to spaces.
svn path=/trunk/; revision=41441
2012-03-08 20:00:49 +00:00
Bill Meier 605dea0486 CVARSDLL hasn't been used (is undefined) for a while....
svn path=/trunk/; revision=41180
2012-02-24 16:23:38 +00:00
Jeff Morriss ea02598924 Fix the rest of of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6764 :
The Lua API does not have FT_*, it has ftypes.*, so use that in the
documentation.  Also, list out each ft so the user knows what the available
options are.

svn path=/trunk/; revision=41035
2012-02-16 03:00:52 +00:00
Jeff Morriss 38550ff3ce Fix part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6764 :
The Lua API does not have BASE_*, it has base.*, so use that.  Also, list out
each base so the user knows what the available options are.

svn path=/trunk/; revision=41024
2012-02-14 03:37:19 +00:00
Jeff Morriss d92857dd6b As suggested in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6763 :
Give an example of a Pref.range's default value.

svn path=/trunk/; revision=41023
2012-02-14 03:24:19 +00:00
Anders Broman 84370fffcb Add *.sbr files to the clean target.
svn path=/trunk/; revision=40762
2012-01-29 20:21:30 +00:00
Guy Harris 6f59700722 Fix usage of g_ascii_strdown() and g_ascii_strup() - they do *not*
modify the string in place, they return a g_mallocated modified version
of the string passed into them.

svn path=/trunk/; revision=40727
2012-01-25 23:03:33 +00:00
Jeff Morriss e36b1c6daf Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6738 :
size_t is sometimes an integer and sometimes a long.  To avoid compiler
warnings when formatting it, cast it to a long.

svn path=/trunk/; revision=40682
2012-01-24 02:42:01 +00:00
Alexis La Goutte 3712c6f6d1 Fix some Dereference of null pointer Warning found by Clang
svn path=/trunk/; revision=40456
2012-01-13 16:16:41 +00:00
Chris Maynard 647c5c0b27 packet_info's in_error_pkt is now a bitfield like in_gre_pkt.
svn path=/trunk/; revision=39764
2011-11-08 18:39:11 +00:00
Stig Bjørlykke 43c34aaf8e Do not return from within a TRY/CATCH/ENDTRY because this will make the
except stack invalid, and will lead to a crash.

In this case it was when calling a dissector from a table in a Lua script.

svn path=/trunk/; revision=39748
2011-11-07 07:41:03 +00:00
Stig Bjørlykke 0352ac8e8f From Robert G. Jakabosky via bug 5575:
Fix memory errors in Lua dissectors.
- Free Tvb when created from ByteArray.
- Free TvbRange correctly.
- Free string from get_persconffile_path and get_datafile_path.
- Some code cleanup.

svn path=/trunk/; revision=39744
2011-11-06 17:39:13 +00:00
Stig Bjørlykke e48b5f02e0 No need to ep_strdup a string to lua_pushstring.
svn path=/trunk/; revision=39684
2011-10-31 08:38:49 +00:00
Stig Bjørlykke 5a466a5246 Don't ep_strdup the protocol name when register a dissector, because
this name will be collected when loading a capture file and the name
will be gone.

svn path=/trunk/; revision=39681
2011-10-30 21:32:27 +00:00
Stig Bjørlykke 447de1178d Allow signed integers displayed as BASE_HEX_DEC.
svn path=/trunk/; revision=39571
2011-10-25 19:04:10 +00:00
Stig Bjørlykke 2d62e550b7 Added another Lua warning:
- FT_FRAMENUM can not have a bitmask.

svn path=/trunk/; revision=39563
2011-10-25 11:20:54 +00:00
Stig Bjørlykke 943c8b97ed Added Lua error messages when:
- Adding a INT64/UINT64 field with a value string (currently unsupported).
- Trying to display a signed integer as hexadecimal.

svn path=/trunk/; revision=39562
2011-10-25 11:13:11 +00:00
Stig Bjørlykke 4b930ccb33 Duplicate Lua strings we put into the private_table.
svn path=/trunk/; revision=39468
2011-10-19 15:32:49 +00:00
Stig Bjørlykke 82e0b65038 Added a private hash table to transport string values between dissectors.
This works between C and Lua.

In C the pinfo.private_table pointer must be initialized using
g_hash_table_new (g_str_hash, g_str_equal);

In Lua the values are available using pinfo.private.<key>, and the
table is created automatically on first usage.  It's possible to use
this datatypes: nil, boolean, number and string, but every value
is converted to string so numbers must be converted using tonumber()
on usage.  Boolean is either nil or an empty string.

svn path=/trunk/; revision=39461
2011-10-18 17:46:00 +00:00
Stig Bjørlykke 424463e083 Use PINFO_GET_BOOLEAN for visited.
svn path=/trunk/; revision=39458
2011-10-18 10:17:19 +00:00
Stig Bjørlykke 022929724b Added some Lua pinfo fields:
ethertype, fragmented, in_error_pkt, match_uint and match_string.

svn path=/trunk/; revision=39407
2011-10-13 19:39:35 +00:00
Stig Bjørlykke 72cdab4c31 From Alex Vallee via bug 6346:
Added Lua TvbRange unicode string methods.

svn path=/trunk/; revision=39225
2011-10-02 17:02:10 +00:00
Stig Bjørlykke 3e75b436a0 Added register action for loading Lua plugins.
Removed an unused argument to wslua_init().

svn path=/trunk/; revision=39214
2011-10-02 13:39:35 +00:00
Stig Bjørlykke c6eb911c93 Do case insensitive search for lua scripts to load.
Skip files starting with . also on windows, as the home directory
may be mounted from a server with a proper filesystem.

svn path=/trunk/; revision=38737
2011-08-25 19:01:05 +00:00
Stig Bjørlykke f7956e0e1d Add a method to fetch protocol description.
svn path=/trunk/; revision=38736
2011-08-25 18:52:54 +00:00
Stig Bjørlykke 67149a7874 Add some NSTime methods: add, sub and unm.
svn path=/trunk/; revision=38648
2011-08-21 18:06:53 +00:00
Stig Bjørlykke 9c7e12c572 Introduce NSTime Lua object to handle nstime_t.
This object can be used to retreive other absolute and relative time fields,
create and modify nstime_t values and put generated time values in the tree.

Also added ProtoField.absolute_time and ProtoField.relative_time.

svn path=/trunk/; revision=38616
2011-08-19 08:36:02 +00:00
Jeff Morriss 23c5165169 Clarify that Tvb_reported_length_remaining may return -1
svn path=/trunk/; revision=38485
2011-08-11 13:45:42 +00:00
Jeff Morriss fa4d32113c From Alexander Stein via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6175 :
The attached patch adds the method reported_length_remaining to tvb.

svn path=/trunk/; revision=38464
2011-08-11 00:49:43 +00:00
Jeff Morriss 4ee1d732fb Add a Tvb_reported_len Lua API; this may help satisfy bug 6175.
svn path=/trunk/; revision=38461
2011-08-10 21:45:53 +00:00
Gerald Combs b9d13c328d Load console.lua and dtd-gen.lua from an explicit path.
svn path=/trunk/; revision=38414
2011-08-08 19:10:19 +00:00
Jörg Mayer c15ff441c6 Replace deprecated glib functions.
In order to compile the whole project with -DG_DISABLE_DEPRECATED
the mate plugin needs to replace its usage of GMemChunk.
All other places should be clean.

svn path=/trunk/; revision=38392
2011-08-07 18:15:45 +00:00
Anders Broman 2f05cf4dcf From Michael Mann:
Added ability to display UTC time or UTC time with date.  I liked having the
difference between UTC and local time, not just setting local=UTC.

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

svn path=/trunk/; revision=37898
2011-07-04 21:43:34 +00:00
Stig Bjørlykke 8dd3dc1ef2 From bug 6057:
Improved set_color_filter_slot documentation.

svn path=/trunk/; revision=37813
2011-06-28 09:11:18 +00:00
Stig Bjørlykke b979f2da27 From bug 6057:
Lua API: add support to temporary color filters (10 color slots)

svn path=/trunk/; revision=37801
2011-06-27 11:07:31 +00:00
Stig Bjørlykke 4ac2487d38 From Tony Trinh via bug 6018:
Add NULL checks and fix typos in Lua error print-outs

From me:
Use the error message "GUI not available" when using GUI functions in tshark.

svn path=/trunk/; revision=37788
2011-06-25 20:47:13 +00:00
Stig Bjørlykke a4dc6c0a7d Added check for invalid chars in abbrev in ProtoField functions.
This fixes bug 5569.

svn path=/trunk/; revision=37787
2011-06-25 19:39:16 +00:00
Stig Bjørlykke 1255b45566 Remove "range" from Lua's Pref.range(), as this value shall be fetched from
the "default".

This fixes bug 5896.

svn path=/trunk/; revision=37786
2011-06-25 15:42:41 +00:00
Stig Bjørlykke 0f24c1eb09 From Tony Trinh via bug 5894:
Added argument validation to Pref.range.

svn path=/trunk/; revision=37785
2011-06-25 15:24:55 +00:00
Stig Bjørlykke b3d0f00015 From Tony Trinh via bug 5960:
Fix TvbRange:string() so that it returns a string that contains all bytes
of the range, including zeroes (instead of being truncated at first zero).

svn path=/trunk/; revision=37763
2011-06-23 11:06:34 +00:00
Stig Bjørlykke dfb3cde56b Use guint32 internally to store mask.
This may fix bug 5734.

svn path=/trunk/; revision=37762
2011-06-23 10:52:40 +00:00
Stig Bjørlykke 5934925554 Rename Tvb_new_real to ByteArray_tvb, as it's a ByteArray function.
Documentation is generated from code.

This fixes bug 5199.

svn path=/trunk/; revision=37761
2011-06-23 10:43:49 +00:00
Stig Bjørlykke 6df263d634 Rename Tvb_tvb to TvbRange_tvb, as it's a TvbRange function.
Documentation is generated from code.

This fixes bug 5006.

svn path=/trunk/; revision=37760
2011-06-23 10:28:53 +00:00
Gerald Combs 0272ec5dd3 Show the plugin paths in Help→About→Plugins. Add a "-G plugins" option
to TShark which dumps a list of plugins.

svn path=/trunk/; revision=37512
2011-06-01 21:48:17 +00:00
Jeff Morriss f3f9f2697f Make TVBs opaque for most users.
Convert TVB_RAW_OFFSET() and TVB_GET_DS_TVB() into functions.

svn path=/trunk/; revision=37422
2011-05-27 03:06:50 +00:00
Jeff Morriss fcac4a1d7d Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5930 :
with a variant of the patch submitted by Alexander Stein on the -dev list:

Allow FT_FRAMENUMs to be added (as base BASE_NONE).  My change from Alexander's
patch is to disallow BASE_NONE for non-framenum integers.

svn path=/trunk/; revision=37239
2011-05-18 15:33:07 +00:00
Guy Harris 1372515b02 More eradication of old-style function definitions.
svn path=/trunk/; revision=37216
2011-05-17 22:18:32 +00:00
Jakub Zawadzki 0edf3eafa9 Comment out dead code.
svn path=/trunk/; revision=37029
2011-05-09 12:49:39 +00:00
Gerald Combs b223e99e5a get_host_ipaddr() was returning numeric addresses in host byte order
and hostnames in network byte order. Have it return everything in
network byte order.

svn path=/trunk/; revision=36873
2011-04-26 17:13:37 +00:00
Stig Bjørlykke 43851d797d Include config.h only from .c files.
This avoids a warning building epan.c which includes both config.h and wslua.h
(duplicate defines from config.h)

svn path=/trunk/; revision=36751
2011-04-21 13:13:39 +00:00
Guy Harris c0e5dc8489 Zero is zero is zero, as Gertrude Stein didn't say.
svn path=/trunk/; revision=36639
2011-04-14 06:28:25 +00:00
Jeff Morriss a148a936b1 From Felix Kraemer: fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5694 :
This patch adds the capability to create BACnet statistics trees. 
Find the respective menu items under 'Statistics->BACnet'.
Packets can be sorted by different criteria:
- Src/Dst IP adresses
- Instance ID
- Object Type
- Service

From me:
- Don't use C++/C99-style comments.
- Name variables for tick_stat_node() don't need to be static.
- Change updateBacnetInfoValue() to require 'data' to be ep_ allocated.  Change
  the couple of calls that did not send in ep_ allocated data to do so.
- Change one or two functions to be static.
- Do not use (memory-unsafe) g_sprintf().
- Use ep_strconcat() instead of leaking memory with g_strconcat().
- Put back one if(tree) that doesn't appear to do any harm.
- Remove variable declarations and #includes from the header file.

svn path=/trunk/; revision=36468
2011-04-05 02:18:28 +00:00
Jaap Keuter 1048f71f5d From David Carne:
col_set_str simply stores the pointer passed to it, and luaL_checkstring
returns a temporary pointer. Changing col_set_str to col_add_str in
Columns_newindex seems to fix the issue.

svn path=/trunk/; revision=35795
2011-02-03 23:17:31 +00:00
Bill Meier d3efa3ed9f A bit of Windows makefiles rework and cleanup:
- Define macros for certain CFLAGS in config.nmake iso of having defs in each makefile;
  a. -DHAVE_CONFIG_H and -D_U_="" are now part of a macro named STANDARD_CFLAGS;
  b. -WX has been replaced by WARNINGS_ARE_ERRORS (defined as -WX in config.nmake)
      (This allows disabling "Warnings as Errors" by just changing config.nmake)
  c. CVARSDLL definitions (not usage) have been removed from the various makefiles.
     XXX: It appears the usage of CVARSDLL can also be removed (not yet done) since:
     -DWIN32 and -DNULL=0 do not appear to be needed (any more);
     -D_MT and _D_DLL  are not needed since /MP causes these definitions.
  d. Define a macro WARNINGS_CFLAGS with additional specific compiler (level4) warnings to be enabled.
     E.G., 4295: array is too small to include a terminating null character
- config.nmake: reformat some long lines for readability;
- plugins\Makefile.nmake: clean-deps does nothing: remove it (and usage in top-level makefile);
- dissectors/Makefile.nmake: test to enable packet-rrc.obj target needs to include MSVC2010 ...

svn path=/trunk/; revision=35747
2011-02-02 01:19:53 +00:00
Jaap Keuter 70d55366ae Add a Manual entry to the Lua menu.
svn path=/trunk/; revision=35729
2011-01-31 21:13:20 +00:00
Bill Meier 79e8fdf14f Put back a 'return' statement so GCC doesn't generate a warning...
svn path=/trunk/; revision=35716
2011-01-31 04:23:46 +00:00
Bill Meier 8a07e469f3 Fix a number of msvc level 4 "Unreachable code" warnings by removing unneeded
return statements.

svn path=/trunk/; revision=35709
2011-01-30 22:32:25 +00:00
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
Stig Bjørlykke 70b264328c Made lua_load_script() static.
svn path=/trunk/; revision=30236
2009-10-01 14:47:57 +00:00
Stig Bjørlykke e37ca89f05 Cast a pointer to avoid a warning.
svn path=/trunk/; revision=30230
2009-10-01 11:20:33 +00:00
Stig Bjørlykke 47df714a09 Avoid a possible dereference of null pointer.
svn path=/trunk/; revision=30205
2009-09-29 20:48:41 +00:00
Stig Bjørlykke 155651b404 Move luaopen_bit() to wslua.h
svn path=/trunk/; revision=30193
2009-09-29 11:27:26 +00:00
Jörg Mayer 53acec3427 wslua now builds, links and installs.
Enable it by default.

svn path=/trunk/; revision=30142
2009-09-25 14:53:56 +00:00
Jörg Mayer cf326e0304 More fixes for OSX - might work now :-)
svn path=/trunk/; revision=30093
2009-09-23 15:56:44 +00:00
Anders Broman 159904bdc4 From Diego:
proto_item_set_len is missing from Lua API.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3994

svn path=/trunk/; revision=29837
2009-09-10 06:37:04 +00:00
Jörg Mayer ca6b1e2b21 CMAKE: Get most of of missing *build* pieces into place
svn path=/trunk/; revision=29819
2009-09-09 13:20:33 +00:00
Kovarththanan Rajaratnam bc845e056c Custom column deprecation:
We fill out the COL_DSTIDX column by using 'pinfo->dst_idx'. This member is only set by the MDS Header dissector based on 'mdshdr.dstidx'. So remove COL_DSTIDX and migrate to 'mdshdr.dstidx' custom column.

svn path=/trunk/; revision=29795
2009-09-08 14:29:08 +00:00
Kovarththanan Rajaratnam 62af6eff84 Custom column deprecation:
We fill out the COL_SRCIDX column by using 'pinfo->src_idx'. This member is only set by the MDS Header dissector based on 'mdshdr.srcidx'. So remove COL_SRCIDX and migrate to 'mdshdr.srcidx' custom column.

svn path=/trunk/; revision=29794
2009-09-08 14:26:09 +00:00
Kovarththanan Rajaratnam 2cf14900d2 Custom column deprecation:
We fill out the COL_RXID column by using 'pinfo->rxid'. This member is only set by the Fibre Channel dissector based on 'fc.rx_id'. So remove COL_RXID and migrate to 'fc.rx_id' custom column.

svn path=/trunk/; revision=29793
2009-09-08 14:21:14 +00:00
Kovarththanan Rajaratnam cdfeebdd26 Custom column deprecation:
We fill out the COL_OXID column by using 'pinfo->oxid'. This member is only set by the Fibre Channel dissector based on 'fc.ox_id'. So remove COL_OXID and migrate to 'fc.ox_id' custom column.

svn path=/trunk/; revision=29792
2009-09-08 14:17:36 +00:00
Kovarththanan Rajaratnam 00670c55c6 Custom columfication:
* Deprecate COL_HPUX_DEVID (HP-UX Device ID). Use nettl.devid

svn path=/trunk/; revision=29517
2009-08-23 10:25:51 +00:00
Kovarththanan Rajaratnam 205129d25c Custom columfication:
* Deprecate COL_HPUX_SUBSYS (HP-UX Nettl Subsystem). Use nettl.subsys

svn path=/trunk/; revision=29516
2009-08-23 10:20:42 +00:00
Kovarththanan Rajaratnam 56369978ae Custom columfication:
* Deprecate COL_CIRCUIT_ID (Circuit ID). Use iax2.call

svn path=/trunk/; revision=29515
2009-08-23 09:52:57 +00:00
Kovarththanan Rajaratnam 7d44262406 This patch introduces packet_add_new_data_source() which effectively deprecates add_new_data_source(). This is based on the following observation:
1) The tvb + name (aka. data_source) is only used when the protocol tree is visible

The current implementation of add_new_data_source() doesn't take this into account and simply allocates a data_source regardless. This is what packet_add_new_data_source() tries to rectify.

A couple of dissectors have already been switched over to the new packet_add_new_data_source(). Many are still missing. Help appreciated!

svn path=/trunk/; revision=29427
2009-08-15 06:38:10 +00:00
Anders Broman 67d6f5976e Move th /MP flag setting to LOCAL_CFLAGS set in configure.nmake
for MSVC variant 2008 only. As suggested by Bill Meier.

svn path=/trunk/; revision=29114
2009-07-16 08:27:18 +00:00
Anders Broman 91caa01090 Add /MP flag to make use of multi cores.
svn path=/trunk/; revision=29104
2009-07-15 20:55:31 +00:00
Balint Reczey a909a692de Minor documentation fix
svn path=/trunk/; revision=29021
2009-07-08 14:20:59 +00:00
Stig Bjørlykke 862c77e4df Default to NULL for description.
Avoid duplicate name/blurb.

svn path=/trunk/; revision=29016
2009-07-08 10:41:17 +00:00
Stig Bjørlykke ae2411fdd5 Added missing lua_bitop.obj.
svn path=/trunk/; revision=28764
2009-06-17 01:16:13 +00:00
Stig Bjørlykke 9b0aa6912f Added Lua BitOp, made by Mike Pall.
svn path=/trunk/; revision=28758
2009-06-16 05:26:46 +00:00
Stig Bjørlykke 6f338b5661 Update Lua menu defines and put Lua functions in Tools.
svn path=/trunk/; revision=28700
2009-06-11 13:08:06 +00:00
Stig Bjørlykke 3677441868 Enable Lua tcp tap userdata.
svn path=/trunk/; revision=28673
2009-06-09 14:51:00 +00:00
Stig Bjørlykke ce27db3c58 Fixed some indents.
svn path=/trunk/; revision=28669
2009-06-08 19:59:31 +00:00
Stig Bjørlykke 1dab48dbba Added a missing check for expired TreeItem.
Fixed some indents.

svn path=/trunk/; revision=28668
2009-06-08 19:45:53 +00:00
Gerald Combs 38f2c5e9c6 Move init.lua from MAINTAINERCLEANFILES to DISTCLEANFILES.
svn path=/trunk/; revision=28666
2009-06-08 19:02:49 +00:00
Stig Bjørlykke 72d53268ba Allocate correct lengths for int64 and uint64.
svn path=/trunk/; revision=28657
2009-06-08 08:15:29 +00:00
Stig Bjørlykke 08797664b3 From Sam Roberts:
Added TvbRange:range()

From me:
Added TvbRange:bitfield()
Fixed some indents.

svn path=/trunk/; revision=28656
2009-06-08 08:14:36 +00:00
Stig Bjørlykke b7207572ac Changed g_strdup_printf -> ep_strdup_printf.
Use correct modifier for converting gint64 and guint64 to string.
Added __gc for Int64 and UInt64.
Fixed some indents.

svn path=/trunk/; revision=28655
2009-06-08 08:02:15 +00:00
Guy Harris cf91fdf16b Have tap listeners specify whether the "packet" routine requires
a protocol tree;

	the column values.

This includes stats-tree listeners.

Have the routines to build the packet list, and to retap packets, honor
those requirements.  This means that cf_retap_packets() no longer needs
an argument to specify whether to construct the column values or not, so
get rid of that argument.

This also means that there's no need for a tap to have a fake filter
to ensure that the protocol tree will be built, so don't set up a fake
"frame" filter.

While we're at it, clean up some cases where "no filter" was represented
as a null string rather than a null pointer.

Have a routine to return an indication of the number of tap listeners
with filters; use that rather than the global num_tap_filters.

Clean up some indentation and some gboolean vs. gint items.

svn path=/trunk/; revision=28645
2009-06-05 22:42:47 +00:00
Stig Bjørlykke 3531e85a00 Changed expert infos from PI_DEBUG to PI_UNDECODED for Lua errors.
svn path=/trunk/; revision=28637
2009-06-04 14:23:30 +00:00
Stig Bjørlykke b66fa033ce From Sam Roberts:
The value_string_from_table()'s use of the lua stack is not balanced,
if a table is iterated, it pops one more time than it should.

svn path=/trunk/; revision=28633
2009-06-04 08:21:51 +00:00
Stig Bjørlykke b801934940 Rename e_ip to ws_ip (from packet-ip.h change).
svn path=/trunk/; revision=28427
2009-05-20 17:56:22 +00:00
Stig Bjørlykke 65eed611a8 Fix a typo in a comment.
svn path=/trunk/; revision=28327
2009-05-10 16:02:57 +00:00
Stig Bjørlykke b0cb4d22e9 Enable Lua wlan taps.
svn path=/trunk/; revision=28326
2009-05-10 16:02:35 +00:00
Stig Bjørlykke 27a22f674f Postpone marking objects as expired until the whole frame is completed.
We can have a case where one Lua dissector calls another Lua dissector,
so we can't mark all objects when only one dissector is completed.

This fixes comment #37 and #39 in bug 2453.

svn path=/trunk/; revision=28325
2009-05-10 15:56:57 +00:00
Stig Bjørlykke 3dc9b64560 Adjusted arguments used in Lua Pref.statictext()
Update Lua documentation:
- Fixed Pref.enum, Pref.range and Pref.statictext
- Fixed the equivalent comment for pinfo.cols
- Do not have a comment star (*) in the documentation
- Be consistent and start all sentences with a capital letter

svn path=/trunk/; revision=28304
2009-05-08 16:40:38 +00:00
Stig Bjørlykke 62f60df6b4 From Jakub Zawadzki (bug 3331):
g_free() is NULL safe, so we don't need check against it.

svn path=/trunk/; revision=27718
2009-03-13 22:06:48 +00:00
Bill Meier 8c685a67e7 Rename a variable ('free') so checkAPIs doesn't incorrectly flag it.
svn path=/trunk/; revision=27627
2009-03-06 22:49:27 +00:00