[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: NILifiying user variables
- From: LEGO <luis.ontanon@...>
- Date: Wed, 8 Feb 2006 13:34:50 +0100
Hello,
I'm in the process to embed Lua into ethereal http://www.ethereal.com.
Now, I have a problem.
While scanning a packet a "packet_buffer" object is passed to the
user's dissection function. In ethereal the lifetime of this object is
that of the packet been currently analyzed. The pointer to the
underlying C object is not going to be valid after the function has
returned. If an user (the lua function) saves a copy of this variable
in a global that variable will surely be unusable.
This variables are accessed very often while analyzing packets so
having to either copy them or create and destroy a container that
keeps track o the frame number they come from would sensibly slow down
operation.
What I wondered is whether there is a (relatively fast) way I can make
sure that these variables are either not copied into global variables
(while still giving access to the global environment) or that these
refernces are nil-ified after the dissection/inspection of the current
packet has been done.
Thanks,
Luis
--
This information is top security. When you have read it, destroy yourself.
-- Marshall McLuhan