Refactoring the ICMP message parsing
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@intra2net.com>
Fri, 8 Apr 2011 13:25:27 +0000 (15:25 +0200)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@intra2net.com>
Fri, 8 Apr 2011 13:54:22 +0000 (15:54 +0200)
commit8670f5f2c37e978b5a346424baa09f4a9c8c411e
tree006ab8f0c1e36b9d46e7118517fe7083c2e8fd63
parent283eac85b0d3d05d87f94ad8c557ab04f49a222f
Refactoring the ICMP message parsing
- IcmpType enum separated from the IcmpHeader class, thus it has its own header without requiring to add the IcmpHeader's header file
- the IcmpHeader class delegates the parsing polymorphically to specialized IcmpMessage classes  (i.e. allowing the parsing of Destination unreachable messages)
- IcmpHeader class does not requires the Payload member variable anymore, once it delegates the parsing to IcmpMessage classes
16 files changed:
src/CMakeLists.txt
src/icmp/icmpdestinationunreachablemessage.cpp [new file with mode: 0644]
src/icmp/icmpdestinationunreachablemessage.h [new file with mode: 0644]
src/icmp/icmpechoreplymessage.cpp [new file with mode: 0644]
src/icmp/icmpechoreplymessage.h [new file with mode: 0644]
src/icmp/icmpechorequestmessage.cpp [new file with mode: 0644]
src/icmp/icmpechorequestmessage.h [new file with mode: 0644]
src/icmp/icmpgenericmessage.cpp [new file with mode: 0644]
src/icmp/icmpgenericmessage.h [new file with mode: 0644]
src/icmp/icmpheader.cpp
src/icmp/icmpheader.h
src/icmp/icmpmessage.cpp [new file with mode: 0644]
src/icmp/icmpmessage.h [new file with mode: 0644]
src/icmp/icmppacket.cpp
src/icmp/icmppacket.h
src/icmp/icmptype.h [new file with mode: 0644]