Commit Graph

870 Commits

Author SHA1 Message Date
Luis Ontanon ad6eb21dd1 Expert info is going to be used in runtime.
For the sake of speed use integers instead of strings to then be converted into integers.


svn path=/trunk/; revision=17609
2006-03-13 00:31:04 +00:00
Luis Ontanon 4bafab904c This time, should be the good one!
svn path=/trunk/; revision=17607
2006-03-12 21:45:18 +00:00
Luis Ontanon f100efb165 I Hope this works
svn path=/trunk/; revision=17603
2006-03-12 18:57:38 +00:00
Luis Ontanon f4c227852c Move make-init-lua.pl and family to plugins/lua and have init.lua installed in the right place
svn path=/trunk/; revision=17602
2006-03-12 17:39:46 +00:00
Luis Ontanon 5ca4b68272 reenable TreeItem,
shiftXXX() was broken


svn path=/trunk/; revision=17599
2006-03-12 15:31:33 +00:00
Luis Ontanon 72c79c1289 Protocols are now invoked.
svn path=/trunk/; revision=17598
2006-03-12 13:03:18 +00:00
Luis Ontanon 428823b00e Remove debug code...
svn path=/trunk/; revision=17595
2006-03-11 22:26:08 +00:00
Luis Ontanon b3a173664b Protocols register OK.
svn path=/trunk/; revision=17594
2006-03-11 22:05:40 +00:00
Luis Ontanon 59ec8529e1 Mark coverity CID 117 as a false positive.
Lex code is often hard for humans to understand... neither of the error conditions found would be happening...

One was marked as error because coverity does not understand that yyterminate() breaks execution.

The other marked as an error because coverity is not able to figure out that the error appears in an actions against two different rules that will not ever match toghether.



svn path=/trunk/; revision=17584
2006-03-11 12:07:00 +00:00
Ulf Lamping 22dca0c988 ... and don't forget to include emem.h!
svn path=/trunk/; revision=17577
2006-03-11 09:09:55 +00:00
Ulf Lamping 2e2c970da9 replace g_malloc and alike by their corresponding ep_ functions
svn path=/trunk/; revision=17576
2006-03-11 09:08:18 +00:00
Ulf Lamping 60869fe1cc various code cleanup (e.g. remove unrequired length parameter), should also fix coverity id 126
svn path=/trunk/; revision=17569
2006-03-10 21:34:56 +00:00
Anders Broman 238053ead2 Add lua:s nmakefile.nmake to the distribution.
svn path=/trunk/; revision=17552
2006-03-09 16:17:52 +00:00
Ronnie Sahlberg 726471b25f coverity bug#42
dereverencing a null variable


svn path=/trunk/; revision=17548
2006-03-09 12:11:21 +00:00
Ronnie Sahlberg 3a92bf963c fix coverity bug 122
svn path=/trunk/; revision=17527
2006-03-08 10:59:05 +00:00
Luis Ontanon e83301935d Remove strhash test code from lua...
svn path=/trunk/; revision=17488
2006-03-07 04:40:57 +00:00
Luis Ontanon 6e04b0aadb - merge SubTree, ProtoTree and ProtoItem into a single TreeItem class.
- By the same token get rid of ProtoFieldArray having Proto.fields attribute been a lua "Array" containing fields.

(still untested, and probably broken)


svn path=/trunk/; revision=17486
2006-03-07 01:25:14 +00:00
Luis Ontanon 7bbd2a14f0 + retap_packets()
svn path=/trunk/; revision=17463
2006-03-05 02:03:51 +00:00
Luis Ontanon 568ad6c34e + retap_packets()
+ complete gtk TextWindow
+ fix elua_dumper
+ fix elua_proto


svn path=/trunk/; revision=17462
2006-03-05 02:01:16 +00:00
Luis Ontanon 5380cea747 - make them work as the got broken while docommenting them.
svn path=/trunk/; revision=17453
2006-03-02 22:55:14 +00:00
Luis Ontanon 31c4bb49d8 - remove some warnings from the windows compile
- some more Tap documentation


svn path=/trunk/; revision=17442
2006-03-02 00:22:39 +00:00
Gerald Combs 050525cfb5 Add Lua support by default for Win32. Fix some compilation problems.
Add Lua information to the version paragraph.

svn path=/trunk/; revision=17440
2006-03-01 21:31:07 +00:00
Luis Ontanon 8b84860a23 - Some more comments
svn path=/trunk/; revision=17415
2006-02-27 01:54:22 +00:00
Luis Ontanon 27e2c87833 The semantics of luaL_checkudata() change between 5.0 and 5.1 (the later triggers an error).
make sure isXxx() functions do not trigger an error, we want them to return not to pop the stack back to the lua caller.


svn path=/trunk/; revision=17411
2006-02-25 12:54:25 +00:00
Luis Ontanon b67337aacf - elua_proto
- add doComments
  - fix an error in DissectorTable_remove
  - reorganize DissectorTable_try

 - elua.h
   squelch some warnings

- Makefile.nmake
  - replace the $^ macro with the targets (i.e. do what nmake was supposed to do)
  - move the doc target into the conditional part


svn path=/trunk/; revision=17406
2006-02-25 03:21:00 +00:00
Luis Ontanon eddf915e40 I changed some vanames and did not compile...
svn path=/trunk/; revision=17399
2006-02-24 08:44:49 +00:00
Luis Ontanon 48551d9d85 - More "docOMMentation" of the API
- also supress Address__ge and Address_gt because re-reading the ref manual I noticed that they are suplerfluous (Lua assumes that a > b is equivalent to b < a, which in most cases (as this) it does)

- have elua_makedoc.pl hanlde docomments in more than one line and after the line where the entity s defined.


svn path=/trunk/; revision=17382
2006-02-23 17:02:29 +00:00
Jörg Mayer e4be8f1a19 Delete docs in maintainer-clean target
svn path=/trunk/; revision=17379
2006-02-23 10:18:05 +00:00
Luis Ontanon 7cd1757c80 Forgot...
Elua functions in elua.c moved to this new file.


svn path=/trunk/; revision=17375
2006-02-22 23:58:21 +00:00
Luis Ontanon 251d769ef7 - More documentation embeded in the source code.
- Changed some Macros
- Have dump:close NULLyfing the boxed object so that no futher operations are performed on a dumper once is closed.
- Check if elua_register.h has changed and avoid overwriting it if it hasn't changed to avoid unnecessary compilations.


svn path=/trunk/; revision=17374
2006-02-22 23:55:11 +00:00
Jörg Mayer 15cae24313 elua_register.h wasn't built automatically
svn path=/trunk/; revision=17371
2006-02-22 14:19:39 +00:00
Luis Ontanon 3db1ff91a7 - rename all the c files
- have elua_makereg.pl generating the declaration and registration Macros for each module
- start of elua_makedoc.pl that should generate the Reference Manual from the code.


svn path=/trunk/; revision=17362
2006-02-21 21:52:28 +00:00
Jaap Keuter 48f6c25460 Fix for bug 756. Handle CR as part of separator as well.
svn path=/trunk/; revision=17359
2006-02-21 11:48:40 +00:00
Luis Ontanon c3c7f8a0c3 - Use lua 5.1
- Compress *_register() functions



svn path=/trunk/; revision=17354
2006-02-19 21:51:34 +00:00
Luis Ontanon accc35dd2a rename plugin.c to lua_plugin.c
svn path=/trunk/; revision=17348
2006-02-18 05:12:58 +00:00
Luis Ontanon 871381514f Add dual version
svn path=/trunk/; revision=17347
2006-02-18 05:11:29 +00:00
Luis Ontanon d9462b4a45 Prepare for lua 5.1
svn path=/trunk/; revision=17346
2006-02-18 04:03:24 +00:00
Luis Ontanon 0b2d1add6f - Make sure the right globals are set before invoking user tap caallbaccks
- Have Dumper.new_for_current() and dumper:dump_current() work.


svn path=/trunk/; revision=17336
2006-02-17 16:16:42 +00:00
Luis Ontanon d238e5ef1e - avoid the user been flooded with report_error windows if there's an error in a tap callback
- fix args of Dumper:new_for_current
- add a semicolon after LUA_CLASS_DECLARE(PseudoHeader,PSEUDOHEADER) that caused an error (Lesson: Even if trivial one should test changes, there's always a typo arround the corner)


svn path=/trunk/; revision=17329
2006-02-17 05:16:06 +00:00
Luis Ontanon bafca77aad - pass the tvb too to tap packet callbacks
- Dumper (an interface to Wiretap dumpers)


svn path=/trunk/; revision=17328
2006-02-17 02:50:23 +00:00
Luis Ontanon 1b096ab156 Have Field extractors being defined while reading the body of the script instead that during initialization.
Change their semantics too:

ip_src_f = Field("ip.src")

function tap.packet(pinfo)
	ip_src = ip_src()
end


svn path=/trunk/; revision=17315
2006-02-16 00:54:56 +00:00
Luis Ontanon 0646b11758 Protect The tree and The tvb from being used outside their scope
svn path=/trunk/; revision=17307
2006-02-15 02:10:07 +00:00
Luis Ontanon 2d7b55d808 - protect proto_items and proto_trees from being used out of their scope
- fix the severity variables



svn path=/trunk/; revision=17306
2006-02-15 02:00:18 +00:00
Luis Ontanon 86ea89f2aa - protect column, columns and pinfo from dereferencing invalid data saved by the user.
- columns live for less than a packet's time, use ep_alloc not g_malloc
- tvbranges are ephemeral too

doc/ is to remain as a placeholder for upcoming docs.

lualib/ is to be deleted (if needed it should go in trunk) but it appears that once I added if I do not check it in I cannot delete it.


svn path=/trunk/; revision=17305
2006-02-15 01:21:51 +00:00
Gerald Combs 844ec9f7a1 mgcp-plugin -> plugin-mgcp.
svn path=/trunk/; revision=17304
2006-02-14 18:52:58 +00:00
Jörg Mayer e10101b774 Experiment with a somewhat generic packet-to-plugin wrapper
svn path=/trunk/; revision=17300
2006-02-14 14:51:18 +00:00
Luis Ontanon 0980473a80 - fix a sure crash after an error in lua code lua_tap_draw.
- make sure no reference to a Tvb in lua is used after the lua dissector has returned.


svn path=/trunk/; revision=17296
2006-02-14 01:29:55 +00:00
Luis Ontanon 184349063f - disable print
- add a log facility to lua (so far just prints to stderr)
- add settings to disable lua even if installed, to load or not to load user scripts when superuser
- create a default /usr/local/share/ethereal/init.lua that blocks all the io/system calls when running as superuser



svn path=/trunk/; revision=17290
2006-02-13 22:13:31 +00:00
Luis Ontanon 9fd26b71ef * DissectorTable.add does not allow to add lua protocols that don't have a dissector.
* ProtoFiled.uint checks the base to be a valid value to avoid an assertion in proto.c while registering the field array
* save one lua table lookup by using a reference to the dissectors table instead of looking for it by name
* set data_hanlde's value to avoid a crash while invoking it.
* make the TvbRange of Tree:add_item really optional. 


svn path=/trunk/; revision=17220
2006-02-08 23:26:52 +00:00
Jörg Mayer 2d668534a9 Include glib.h, so FALSE is defined when compiling statically.
svn path=/trunk/; revision=17218
2006-02-08 17:04:21 +00:00
Luis Ontanon afa7c90487 Changed how files are loaded.
load $ETH/init.lua if it exists
if we are not runninig on special privileges
  load $USER/init.lua
  and then all the files given with cmd line option -X lua_script:file.lua 


svn path=/trunk/; revision=17210
2006-02-08 00:02:15 +00:00
Lars Roland 5f1e470cc2 changes to build lua plugin with MSVC6:
- nmake makefile for lua plugin added.
- declare variables at the beginning of a function.
- proto_reg_handoff_lua was removed, remove remaining calls, too.
- missing functions to libethereal.def added.

add lua plugin to installer, if available.

svn path=/trunk/; revision=17196
2006-02-07 09:12:43 +00:00
Luis Ontanon 5bf6a2939f init_routines was moved back to globals.
svn path=/trunk/; revision=17192
2006-02-07 03:47:13 +00:00
Luis Ontanon 5a2013cdfc I Noticed a crash when registering a tap with filter during handoff (that's when I had lua starting) trying to see if I could move dfilter_init() before protocol registration I discovered register_final_registration_routine() neat!
Lua protocols won't need a handoff routine anymore!!


svn path=/trunk/; revision=17191
2006-02-07 03:06:02 +00:00
Luis Ontanon 1352ce5fe6 + gui_enabled()
* make  the gui routines call-able since the first line of the script


svn path=/trunk/; revision=17190
2006-02-06 23:58:07 +00:00
Jörg Mayer 76ef87393c svn eol-style and keywords
svn path=/trunk/; revision=17183
2006-02-06 12:21:31 +00:00
Luis Ontanon 41a8855e1b Lua uses the simple dialog
svn path=/trunk/; revision=17173
2006-02-06 01:29:05 +00:00
Luis Ontanon 3ed65a40e4 Add an example of tap,text window and menu usage
svn path=/trunk/; revision=17167
2006-02-05 20:07:19 +00:00
Luis Ontanon 2427624d5a * move all the tap functions to lua_tap
* change the way taps work (docs coming)
* add an at_close method to the textwindow that allows the user to set a callback function to be called when the window is closed


svn path=/trunk/; revision=17166
2006-02-05 20:06:05 +00:00
Luis Ontanon 174291f7f7 Allow lua to register menu items
svn path=/trunk/; revision=17162
2006-02-05 04:02:52 +00:00
Luis Ontanon 246dc75d35 Propset eol-style and Id for all
lua_gui.h has a licence


svn path=/trunk/; revision=17152
2006-02-04 20:34:16 +00:00
Luis Ontanon fedb9b5c92 Give lua a minimal gui.
svn path=/trunk/; revision=17150
2006-02-04 20:00:58 +00:00
Luis Ontanon 1434f575d5 * packet-lua.h
* add a shiftC() function to every class for extracting values from the stack
   
* lua_pinfo.c
   * fix pinfo.dst pinfo.dl_dst pinfo.dl_src pinfo.net_dst pinfo.net_src
   
* lua_tree.c
   * ProtoTree_add_item_any() changed to use TvbRanges, a more handy way to give it optional arguments 

* lua_tvb.c
   * get ByteArray up and running
   * create TvbRange class and use it to access the tvb (this class takes care of checking bounds so that exceptions are not thrown)



svn path=/trunk/; revision=17146
2006-02-03 21:25:26 +00:00
Anders Broman e5e25269c9 From Eric Hultin:
This patch adds support for dissection of the DCC packet as defined in 
CableLab's (http://www.cablelabs.com/) DOCSIS Radio Frequency Interface 
(RFI) specification. The latest version of this specification is currently 
available at 
http://www.cablemodem.com/specifications/specifications20.html . Packet 
formats for DCC are defined in sections 8.3.20 (DCC-REQ), 8.3.21 
(DCC-RSP), and 8.3.22 (DCC-ACK) of the RFI specifications (referencing 
version CM-SP-RFIv2.0-I10-051209). In addition, this patch adds support 
for the DCD packet as defined in the DOCSIS Set-Top Gateway (DSG) 
Specification. The latest version of this specification is currently 
available at http://www.cablemodem.com/specifications/gateway.html . The 
format of the DCD packet is defined in section 5.3.1 of the DSG 
specification (referencing version CM-SP-DSG-I06-051209).

svn path=/trunk/; revision=17138
2006-02-01 05:44:20 +00:00
Luis Ontanon c8dd927e0c It was hard.. but at the end I won (or at least i believe so...).
After install hello_world.lua works.


svn path=/trunk/; revision=17137
2006-01-31 22:22:05 +00:00
Jörg Mayer 133a10823e Warning fixes: no ';' at the end of functions.
svn path=/trunk/; revision=17124
2006-01-29 23:48:43 +00:00
Luis Ontanon 3b08aa956c * packet-lua.h
* add an isXxx() declaration
   
* packet-lua.c
   * move the dissectors, handoffs and inits tables to the registry
   
* lua_proto.c
   * new_protocol is now called Protocol
   * move the dissectors, handoffs and inits tables to the registry



svn path=/trunk/; revision=17117
2006-01-29 03:13:26 +00:00
Luis Ontanon ef78577292 * lua_pinfo.c
* Address' gt, ge, eq, le and lt operators
   
* lua_proto.c
   * DissectorTable:remove and DissectorTable:add
      - can take either Proto or Dissector as third argument
   
* lua_tree.c
   * make sure we have a lua_etts array on which to add etts
   * ProtoItem:add_subtree() if no ett is given don't fail use the default one.
   



svn path=/trunk/; revision=17111
2006-01-28 21:09:59 +00:00
Luis Ontanon 31aa31f626 * packet-lua.h
* SubTreeType (ett) was renamed as SubTree 

* lua_tap.c
   - change the way the taps register (still to be finished so I won't comment)
   
* lua_tree.c
   * SubTree(ett) moved here, now it autoregisters all subtrees created at once. The user neither does need to create a SubTreeArray(eliminated) anymore nor to register it.

* lua_proto.c
   * SubTree moved out from here its "global" variables are used by lua_tree.c .
   * SubTreeArray was eliminated (now ett's "autoregister")
   * Created usertypes for
      - Pref a preference
      - Prefs all preferences of one protocol
      So far they are transparent to the user.
   * Proto has become a pseudo-table instead of a method based (registration in nicer)

* packet-lua.c
  * runtime errors go where they are meant to:
    - errors in dissector code go to the tree (a-la malformed)
    - errors in registration/handoff/init use reporte_failure()
  * no more Lua code to be compiled at runtime


svn path=/trunk/; revision=17110
2006-01-28 03:15:45 +00:00
Luis Ontanon 263caacb94 * we need not to register the interesting fields via a tap its registration should be transparent to the user.
- as of now I'm using a "boring" tap  (NULL packet_cb)  with a filter containing all the registered ones

* Lua code in init_lua() is not to be compiled anymore (I did)


svn path=/trunk/; revision=17108
2006-01-26 23:06:48 +00:00
Luis Ontanon 094840aa97 * lua_tree.c
* protect proto_item_add_* calls with a TRY CATCH to avoid the Lua state getting corrupted
   * new ProtoItem:add_expert_info() call

 * lua_proto.c
   * protect call_dissector() and dissector_try_*() calls with TRY CATCH to avoid the Lua state getting corrupted
   * ValueString makes no sense, get rid of it we'll use Lua's associative arrays instead

 * lua_tvb.c
   * while creating a tvb from a ByteArray copy the ByteArray's data and set the tvb's free_cb
   * check bounds before calling tvb_*() to avoid a longjmp breaking Lua
   * do not leak the string in Tvb_tostring()
   * new Tvb:get_ipv4() call
   * new Tvb:get_eth() call

 * packet-lua.[ch]
   * export lua_tvb and lua_malformed to other modules being the current tvb and the protocol_id of malformed
   * convert some Lua to C
   * do not register ValueString (eliminated)




svn path=/trunk/; revision=17106
2006-01-26 20:20:55 +00:00
Luis Ontanon 9c10169b97 two bugs less
svn path=/trunk/; revision=17104
2006-01-25 22:49:58 +00:00
Luis Ontanon 3cbb83e490 One step at a time
several fixes and additions


svn path=/trunk/; revision=17103
2006-01-25 22:39:07 +00:00
Luis Ontanon 0b9c8e5263 Avoid crashing when given an object of the wrong usertype
format_time()
format_date()
report_failure()


svn path=/trunk/; revision=17097
2006-01-25 02:08:10 +00:00
Luis Ontanon a91b4fb0c5 an Address class, changed the names of some classes, modified pinfo to be a table
pinfo.src = Address.ip("www.xxx.com")
pinfo.col.info = "A special packet"
if (pinfo.src_port == 2) then pinfo.col.protocol = "STRANGE" end


svn path=/trunk/; revision=17096
2006-01-24 23:22:52 +00:00
Luis Ontanon 9639355926 it wasn't a goo idea,
sorry



svn path=/trunk/; revision=17095
2006-01-24 23:18:09 +00:00
Luis Ontanon 1ff8c4272f Add register_postdissector() to the API.
Dissectors registered with register_postdissector() will be called after all other dissectors have been called.

Use it to register mate.


svn path=/trunk/; revision=17089
2006-01-24 00:26:57 +00:00
Luis Ontanon da9e0c6831 I forgot the Licence!
set svn:keywords Id on source


svn path=/trunk/; revision=17088
2006-01-24 00:04:53 +00:00
Luis Ontanon b8e53a60b3 Use .la instead of .so as dependency in Makefiles
Fix svn:ignore


svn path=/trunk/; revision=17087
2006-01-23 23:55:13 +00:00
Luis Ontanon dbb4f8ff0a Add lua-5.0.2
Split packet-lua.c
Changes aren't tested.
It should compile ok.
Makefile.nmake still missing.


svn path=/trunk/; revision=17086
2006-01-23 23:31:05 +00:00
Luis Ontanon 5ccce794e6 Another iteration, new things aren't tested yet.
Update README, to have a description of the classes



svn path=/trunk/; revision=17067
2006-01-21 14:54:57 +00:00
Jörg Mayer 4ab485600c Add the commit message as README
svn propset svn:keywords Id *
svn propset svn:eol-style native *

Todo: svn propset svn:ignore .
  Because I don't know what to ignore

svn path=/trunk/; revision=17059
2006-01-20 09:09:26 +00:00
Luis Ontanon 3facb43c07 Starts to work so I check it in.
This is an interface to the Lua programming language.

http://www.lua.org

I've already wrote a simple dissector that calls another dissectors.

soon It will be able to register a tap and do something more.

I did not checkin changes to the Makefiles so in order to use it you must change the makefiles.

Other than that to get it to work you need to download lua-5.0.2.tar.gz into the plugin directory, uncompress it, cd to it and call make.

the interface is buggy and far from finished, time will help on this.



svn path=/trunk/; revision=17057
2006-01-20 00:06:20 +00:00
Jörg Mayer f9a57f08d1 Bill Meier:
Spelling fixes.

svn path=/trunk/; revision=16956
2006-01-05 13:01:08 +00:00
Luis Ontanon d265d85d92 we are opening the file for writing....
svn path=/trunk/; revision=16784
2005-12-13 22:08:37 +00:00
Luis Ontanon 088ffa504e - add Debug and Default declarations.
- supress unwanted console printouts.


svn path=/trunk/; revision=16769
2005-12-12 23:23:32 +00:00
Luis Ontanon 5883ff951b Avoid to crash if we are given an unexistent field.
svn path=/trunk/; revision=16762
2005-12-12 01:32:31 +00:00
Luis Ontanon 98373635b3 Done is not needed anymore;
in Pdus transforms go before Criteria (because they are evaluated before)


svn path=/trunk/; revision=16761
2005-12-12 01:27:51 +00:00
Luis Ontanon f7b48054f9 Cleanup the grammar.
svn path=/trunk/; revision=16759
2005-12-11 23:22:14 +00:00
Jörg Mayer c2eaf1bc74 Fix ...$ to : $
svn path=/trunk/; revision=16750
2005-12-09 16:51:56 +00:00
Jörg Mayer eff40f65db Trivial warning fixes
svn path=/trunk/; revision=16561
2005-11-22 12:51:14 +00:00
Ulf Lamping eefbb60770 minor enhancements
svn path=/trunk/; revision=16485
2005-11-12 09:39:24 +00:00
Guy Harris db9fba20b4 Use <wiretap/file_util.h> to include "file_util.h"; otherwise, the
include fails as we don't do -Iwiretap.

If we have it, include <sys/stat.h> in epan/filesystem.c - we need it
for stat() and the macros and structures it uses.

svn path=/trunk/; revision=16410
2005-11-07 02:47:09 +00:00
Ulf Lamping c3187174bf replace *a lot* of file related calls by their GLib counterparts. This is necessary for the switch to GTK 2.6 (at least on WIN32).
to do this, I've added file_util.h to wiretap (would file_compat.h be a better name?), and provide compat_macros like eth_open() instead of open(). While at it, move other file related things there, like #include <io.h>, definition of O_BINARY and alike, so it's all in one place.

deleted related things from config.h.win32

As of these massive changes, I'm almost certain that this will break the Unix build. I'll keep an eye on the buildbot so hopefully everything is working again soon.

svn path=/trunk/; revision=16403
2005-11-06 22:43:25 +00:00
Ulf Lamping e90ebfad09 minor enhancement (raised plugin version to 0.1.2):
PN-DCP: dissection of "DHCP/DHCP client identifier" suboption was added

svn path=/trunk/; revision=16377
2005-11-02 19:33:46 +00:00
Guy Harris cbce856e9e When printing the code for a display filter:
print register numbers as unsigned (they're guint32);

	when printing a PUT_FVALUE instruction, show the value as well
	as the type of the value.

That requires that a bunch of types get to_repr methods; add them for
PCRE (FTREPR_DFILTER-only - show the regular expression as text),
tvbuffs (FTREPR_DFILTER_only - show the data as a hex string), integral
types, string types other than FT_STRING, and FT_IPv6.

That means we can use fvalue_to_string_repr() for FT_IPXNET and FT_IPv6
in proto_construct_dfilter_string(), and that we don't need to handle
integer and floating types specially in MATE.

Fix some problems with the PCRE execution code for tvbuff types.

svn path=/trunk/; revision=16369
2005-10-31 02:42:22 +00:00
Anders Broman e8065e3fde From Peter Johansson
Correct a typo.

svn path=/trunk/; revision=16254
2005-10-17 18:20:25 +00:00
Gerald Combs a3be85a307 Fix a typo found by Guy.
svn path=/trunk/; revision=16241
2005-10-16 03:50:58 +00:00
Jörg Mayer 758686491e Add Makefile.in to maintainer-clean
svn path=/trunk/; revision=16171
2005-10-09 07:28:32 +00:00
Luis Ontanon 0c679169a5 From Richard van der Hoff:
fix to bugs 508-510

by me:
  Make sure that fixed size arrays aren't not overflown.


svn path=/trunk/; revision=16155
2005-10-07 20:45:17 +00:00
Guy Harris 984850153d Don't call "g_assert()" in dissectors - call "DISSECTOR_ASSERT()".
svn path=/trunk/; revision=16151
2005-10-07 07:37:51 +00:00
Anders Broman 7d2f4603c1 Build the h223 plugin
svn path=/trunk/; revision=16140
2005-10-06 06:56:08 +00:00
Anders Broman fad1888a60 Grr.. yet another missing file
svn path=/trunk/; revision=16120
2005-10-04 19:54:50 +00:00
Anders Broman cebc712e26 Add two missing files.
svn path=/trunk/; revision=16119
2005-10-04 19:51:31 +00:00
Anders Broman 5188438889 First check in of yhe h223 plugin, not part of the build script yet.
svn path=/trunk/; revision=16089
2005-10-03 19:00:52 +00:00
Anders Broman 1478e10d0c First check in of yhe h223 plugin, not part of the build script yet.
svn path=/trunk/; revision=16088
2005-10-03 18:59:41 +00:00
Anders Broman 7c65cc96c2 First check in of yhe h223 plugin, not part of the build script yet.
svn path=/trunk/; revision=16087
2005-10-03 18:54:41 +00:00
Anders Broman 90ef999a26 First check in of yhe h223 plugin, not part of the build script yet.
svn path=/trunk/; revision=16086
2005-10-03 18:54:13 +00:00
Anders Broman 7eb52d23f2 First check in of yhe h223 plugin, not part of the build script yet.
svn path=/trunk/; revision=16085
2005-10-03 18:53:52 +00:00
Anders Broman 7a8d4525fa First check in of yhe h223 plugin, not part of the build script yet.
svn path=/trunk/; revision=16084
2005-10-03 18:53:28 +00:00
Anders Broman c8c0804443 First check in of yhe h223 plugin, not part of the build script yet.
svn path=/trunk/; revision=16083
2005-10-03 18:51:54 +00:00
Luis Ontanon 154d8ae087 one step further...
TPG now uses the ignore feature of tvbparse
 named sub_rules can have cardinality

epan/tvbparse.c:
   do not crash on zero cardinality


svn path=/trunk/; revision=16065
2005-10-01 15:19:36 +00:00
Luis Ontanon 99104fe179 match changes to tpg infrastructure.
svn path=/trunk/; revision=16063
2005-10-01 10:41:00 +00:00
Luis Ontanon 5c852882d0 this struct moved to tvbparse.c
svn path=/trunk/; revision=16058
2005-09-29 20:38:41 +00:00
Luis Ontanon 8ee088f9cd at this point this makes a good parser for http headers...
svn path=/trunk/; revision=16053
2005-09-29 20:05:24 +00:00
Ulf Lamping 9a42ef9536 fix #480: Change defaults for all reassembling settings to ON
I've changed all settings I could find to TRUE. It might be reasonable to change some protocol settings back to FALSE, if reassembling fails very often.

svn path=/trunk/; revision=16048
2005-09-28 22:15:38 +00:00
Luis Ontanon 217b73a0b1 update tpg
tvbparse:
     - for tvbparse_until spend the target token even if it isn't included


svn path=/trunk/; revision=16032
2005-09-28 01:06:39 +00:00
Luis Ontanon ec0f669770 A "working" example of TPG...
svn path=/trunk/; revision=16030
2005-09-27 22:06:36 +00:00
Gerald Combs 5135bf2ad5 Don't write before the beginning of a buffer. Add an item to the
release notes.

svn path=/trunk/; revision=16003
2005-09-25 22:19:57 +00:00
Luis Ontanon 0f2e45a47a delete the xml plugin
svn path=/trunk/; revision=15989
2005-09-24 16:37:48 +00:00
Guy Harris d90a1a4ac6 Make the private variables for various lexical analyzers static, so
that we don't have all the lexical analyzers in libethereal share them
(note that they're already static in radius_dict.l, so they weren't
sharing with any other lexical analyzer), and so that OS X 10.3.9's
run-time linker doesn't get upset at finding them defined in libethereal
and the MATE plugin.

Fix up indentation.

svn path=/trunk/; revision=15961
2005-09-22 18:39:25 +00:00
Gerald Combs 65c802eed9 Move a comment to the right place.
svn path=/trunk/; revision=15932
2005-09-21 15:54:09 +00:00
Anders Broman 4148750110 Fix bug #343 Parsing Problem - TransactionResponseAck (MEGACO).
svn path=/trunk/; revision=15902
2005-09-20 18:45:21 +00:00
Guy Harris b7b80d94be Move a pile of protocol-related headers from the top-level source
directory to the epan directory.  Some of them should perhaps ultimately
be moved to epan/dissectors, if they pertain only to stuff exported by a
particular dissector.

Fix Gerald's e-mail address in files we're moving.

svn path=/trunk/; revision=15844
2005-09-17 00:02:31 +00:00
Guy Harris 25c4bc9379 Replace tvb_memcpy() calls that extract IPv4 addresses into a guint32,
and that extract IPv6 addresses into a "struct e_in6_addr", with
tvb_get_ipv4() and tvb_get_ipv6() calls - except for some that we
remove, by using proto_tree_add_item(), rather than replacing.

Have epan/tvbuff.h include epan/ipv6-utils.h, to define "struct
e_in6_addr" (not necessary to declare the tvbuff routines, but including
it there means "struct e_in6_addr" is guaranteed to be defined before
those declarations, so we don't get compiler complaints if we define it
*after* those declarations).

svn path=/trunk/; revision=15758
2005-09-11 21:25:37 +00:00
Luis Ontanon 3dece7b495 Let's migrate the xml dissector...
svn path=/trunk/; revision=15729
2005-09-08 21:18:58 +00:00
Gerald Combs adce5ed6a5 Set "COPYCMD=/Y" and remove the "/Y" from each XCOPY command in order
to fix compilation under Windows NT.  This should fix bug 403.

The changes were made using "find . -name Makefile.nmake | xargs perl
-pi.bak -e 's: /y::i'".  They appear to work under XP, but if anything
broke I blame Larry Wall.

svn path=/trunk/; revision=15710
2005-09-07 13:26:23 +00:00
Gerald Combs 00f087b2f0 In doc/Makefile.nmake, use the "install-deps" target from the root
Makefile.nmake instead of doing our own XCOPYing.  Use the "clean-deps"
target when we're done instead of leaving DLLs lying around.

Normalize the use of underscores vs hyphens in the "clean-deps" target.

svn path=/trunk/; revision=15704
2005-09-06 18:41:25 +00:00
Gerald Combs 621cf58ac5 In RTnet, make sure we don't pass a null handle to call_dissector(). Add
an entry about this to the release notes.  Fixes a recent buildbot crash.

svn path=/trunk/; revision=15673
2005-09-02 19:54:16 +00:00
Ronnie Sahlberg b177f170eb convert to g_snprintf()
also make range_convert_range() return an emem allocated string


svn path=/trunk/; revision=15660
2005-09-01 19:05:00 +00:00
Ulf Lamping 6fec98fa52 fix probable copy and paste error, as the xml dissector should be named xml and not mate
svn path=/trunk/; revision=15646
2005-08-31 23:52:40 +00:00
Anders Broman 18a57250b7 Parlay re-generated with the updated idl2eth generator.
svn path=/trunk/; revision=15644
2005-08-31 20:25:48 +00:00
Ulf Lamping 6f43fbb2f0 EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry!
I've done more than a day to change the timestamp resolution from microseconds to nanoseconds. As I really don't want to loose those changes, I'm going to check in the changes I've done so far. Hopefully someone else will give me a helping hand with the things left ...

What's done: I've changed the timestamp resolution from usec to nsec in almost any place in the sources. I've changed parts of the implementation in nstime.s/.h and a lot of places elsewhere.

As I don't understand the editcap source (well, I'm maybe just too tired right now), hopefully someone else might be able to fix this soon.

Doing all those changes, we get native nanosecond timestamp resolution in Ethereal. After fixing all the remaining issues, I'll take a look how to display this in a convenient way...

As I've also changed the wiretap timestamp resolution from usec to nsec we might want to change the wiretap version number...

svn path=/trunk/; revision=15520
2005-08-24 21:31:56 +00:00
Jörg Mayer 96adc5f4a1 - Include the .h files in their .c files.
- Remove epan/dissectors/packet-sna.h, it isn't used anywhere.

svn path=/trunk/; revision=15475
2005-08-20 16:19:22 +00:00
Ulf Lamping 495eb1b788 snprintf -> g_snprintf
svn path=/trunk/; revision=15398
2005-08-17 23:10:28 +00:00
Gerald Combs 072a1bbfa6 ep_tvb_get_string() -> tvb_get_ephemeral_string().
svn path=/trunk/; revision=15277
2005-08-10 15:58:26 +00:00
Gerald Combs 42137a0331 Make sure we initialize our iap_conv struct _before_ we go digging
into a tvbuff.  This keeps us from leaving junk data behind if we
throw an exception.

svn path=/trunk/; revision=15267
2005-08-09 14:38:11 +00:00
Guy Harris badd56fbfd The "proto" argument to "conversation_get_proto_data()" and
"conversation_add_proto_data()" is supposed to be a protocol ID, as
returned by "proto_register_protocol()".  In addition, there are two
different types of protocol data being attached to a conversation; use
different protocol IDs for them, so we don't misinterpret an
"iap_conversation_t" as a "lmp_conversation_t" or vice versa.

svn path=/trunk/; revision=15265
2005-08-09 00:03:45 +00:00
Ulf Lamping 0dc9fb3d4a various code cleanup:
-use g_snprintf instead of sprintf and snprintf
-use g_strdup_printf where appropriate
-remove #include "snprintf.h" (as only g_snprintf should be used)
-replace some more alloc/realloc/calloc/free with their glib pendants

svn path=/trunk/; revision=15264
2005-08-08 18:50:39 +00:00
Guy Harris 46d485405e Make a variable whose value might be trashed by setjmp/longjmp
"volatile" to avoid that.

svn path=/trunk/; revision=15240
2005-08-06 10:29:20 +00:00
Ulf Lamping dc7beaa1cd fix a comment typo
svn path=/trunk/; revision=15233
2005-08-06 00:06:14 +00:00
Guy Harris b945c5bd2a Squelch a warning about "state" being used uninitialized.
svn path=/trunk/; revision=15230
2005-08-05 23:17:15 +00:00
Jörg Mayer 4e1f4b18ab More char -> const char warning fixes.
Removed (very few) casts that only change the warning message
  but don't remove it (with gcc-4).

svn path=/trunk/; revision=15227
2005-08-05 20:59:08 +00:00
Anders Broman 6f022ad796 From Thomas Steffen:
Fix a copy-paste error in the prefs. code

svn path=/trunk/; revision=15225
2005-08-05 19:32:26 +00:00
Guy Harris 3d1dfa4f67 Put in comments explaining why we're removing some generated files with
"make distclean", even though they come with the distribution, and
make the one in plugins/xml/Makefile.nmake match the one in some other
files.

svn path=/trunk/; revision=15214
2005-08-04 22:22:53 +00:00
Gerald Combs c214405e41 Clean up after ourselves so that we pass "distcheck" again.
svn path=/trunk/; revision=15194
2005-08-02 15:25:41 +00:00
Jörg Mayer a0f94c125f Last set of trivial fixes for "no previous declaration" warnings.
svn path=/trunk/; revision=15191
2005-08-02 08:30:33 +00:00
Jörg Mayer 4f693dfae2 Some warning fixes for "no previous declaration"
Remove svn:executable
Add svn:eol-style native
Add svn:keywords Id


svn path=/trunk/; revision=15179
2005-08-02 05:39:45 +00:00
Gerald Combs 6bcaec9a12 Make sure "lemon" exists before we try to use it. This can happen if we
run "make dist" before running "make".

svn path=/trunk/; revision=15167
2005-08-01 21:09:34 +00:00
Luis Ontanon 440cf5767f fix another leak of tap data
svn path=/trunk/; revision=15113
2005-07-27 01:32:31 +00:00