The current implementation doesn't allow inheriting twice from class PacketBase.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
- Now easy to know the protocol name and iterate protocols.
- find_protocol doesn't handle the case the same protocols are stacked.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
- we need to serialize in reverse order since some need to know
payload.
- TCP and UDP need the previous protocol info (IP) to calculate the
checksum.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
As discussed on the mailing list, there is no good packet library
(parses and builds various protocol packets). dpkt isn't flexible
enough (can't nicely handle stacked protocols such as vlan, mpls,
gre). NOX's one is nice but released under GPL3.
So we need our own packet library.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>