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
This commit is contained in:
Luis Ontanon 2006-01-20 00:06:20 +00:00
parent b3d0b97635
commit 3facb43c07
3 changed files with 2080 additions and 0 deletions

58
plugins/lua/Makefile.am Normal file
View File

@ -0,0 +1,58 @@
# Makefile.am
#
# $Id: $
#
# Ethereal - Network traffic analyzer
# By Gerald Combs <gerald@ethereal.com>
# Copyright 1998 Gerald Combs
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
INCLUDES = -I$(top_srcdir) -I./lua-5.0.2/include
plugindir = @plugindir@
plugin_LTLIBRARIES = work.la
work_la_SOURCES = \
packet-lua.c \
plugin.c
work_la_LDFLAGS = -module -avoid-version
work_la_LIBADD = @PLUGIN_LIBS@
# Libs must be cleared, or else libtool won't create a shared module.
# If your module needs to be linked against any particular libraries,
# add them here.
LIBS = -L./lua-5.0.2/lib -llua -llualib
CLEANFILES = \
*~
DISTCLEANFILES = \
dummy
MAINTAINERCLEANFILES = \
Makefile.in
EXTRA_DIST = \
dummy
dummy:
touch dummy

1977
plugins/lua/packet-lua.c Normal file

File diff suppressed because it is too large Load Diff

45
plugins/lua/plugin.c Normal file
View File

@ -0,0 +1,45 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifndef ENABLE_STATIC
#ifdef PACKAGE
#undef PACKAGE
#endif
/* Name of package */
#define PACKAGE "lua_plugin"
#ifdef VERSION
#undef VERSION
#endif
/* Version number of package */
#define VERSION "0.0.0"
#include <gmodule.h>
#endif
void proto_register_lua(void);
void proto_reg_handoff_lua(void);
static gboolean initialized = FALSE;
#ifndef ENABLE_STATIC
G_MODULE_EXPORT const gchar version[] = VERSION;
G_MODULE_EXPORT void plugin_register(void) {
if (! initialized ) {
proto_register_lua();
initialized = 1;
}
}
G_MODULE_EXPORT void plugin_reg_handoff(void)
{
proto_reg_handoff_lua();
}
#endif