Snaipe / wssdl

Wireshark-Specific Dissector Language
GNU General Public License v3.0
198 stars 11 forks source link

Implement :repeat() #2

Open Snaipe opened 8 years ago

Snaipe commented 8 years ago

the repeat method would allow one to repeat a field N times (or until a passed callback returns true)

Usage:

array = wssdl.packet {
    data_len : u32();
    data_array : u32():repeat(data_len);
}
-- Describe null-terminated strings
stringz = wssdl.packet {
    str : u8():repeat(function (e) return e != 0 end);
}
ghost commented 7 years ago

Any progress on this?

Snaipe commented 7 years ago

It's being worked on, but I have limited time these weeks. The main problem for the feature is that, while I can repeat the parsing process of one primitive field, this becomes much more complicated when the field is a compound type, as wssdl still have to be able to process repeat-until-constant-sequence definitions.

tan-wei commented 5 years ago

So any progress now? Feel interesting about the project.