todb/packetfu — pull request #37 by wishdev (2013-10-04 18:46:27+00:00)
Title: Parsing speedups and spec refactor

When parsing a packet - it would seem more then the minimum amount of checks are made - for example, if a packet is a TCP packet then we need not check if a packet is an Ethernet or IP packet specifically because the fact that it is a TCP packet will result in TCP being chosen due to the higher "layer" level. So, why not sort the classes in descending layer order and then take the first class that #can_parse? the packet?

This change accomplishes just that.

It also refactors up the specs just slightly in order to not have the "fake packets" become issues now that the system checks their layer without the classes being used for parsing.

Hope I did not go too far or step on any toes.......