This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

[closed] how to access data in such table?

0

Hi, I'm writing a program with lua. I have data that organized in the following way: t= {i1{p1{,,,},p2{,,,},...pm{,,,}},i2{p1{,,,},p2{,,,},...pm{,,,}},...,in{p1{,,,},p2{,,,},...pm{,,,}}} (inner tables) In another way each group of data is indexed by two variables i&p,I am sure that the data is kept correctly but I want a way to print the data from their tables because I won't know the values of i and p to iterate over them or even the numbers n & m any body know how to do this with lua?

asked 17 Feb '12, 19:24

Leena's gravatar image

Leena
51171821
accept rate: 0%

closed 25 Feb '12, 17:07

helloworld's gravatar image

helloworld
3.1k42041

Unfortunately off topic. You've asked a general Lua programming question as opposed to a Wireshark Lua question. Skilled Lua developers at stackoverflow are waiting to answer your question. :-)

(17 Feb '12, 22:15) helloworld

the program process data that coming from wireshark, the i is a source ip address and p is the port number and the data in the innermost table are destination ips

(17 Feb '12, 22:31) Leena

Ok, I see, but it's still off topic unless the data can only be printed with the help of Wireshark Lua, which isn't true in your case because the source IP is just a string, and the port number is just an integer. (Hint: you're looking to dump a Lua table...it's rather trivial to do...just Google it)

(17 Feb '12, 22:45) helloworld

The question has been closed for the following reason “http://stackoverflow.com/questions/9339268/how-to-access-data-in-such-table" by helloworld 25 Feb ‘12, 17:07