Bugzilla – Bug 909
IPv6 extension refactoring
Last modified: 2010-11-04 22:37:20 UTC
This is a summary (and reminder tracker issue) of IPv6 extension refactoring started by Faker, mainly to get rid of PeekData calls. This is partly done; repo is at: http://code.nsnam.org/fmoatamr/ns-3-ipv6/ Summary from Faker: The basic idea of the new IPv6 extension development is to simplify the extension implementation by making it as intuitive as possible. The architecture is simple: IPv6Header2 |__IPv6Extension2 |__IPv6Option2 |__Data I will explain the process of de-serializing a packet. The IPv6Header will only read the header data and according to the NextHeader present in the header it will read the extension type. It will create the specific extension type and the Ipv6Extension2 will read the ipv6 extension data, return the nextheader and read the next extension type or protocol, and so on, until all extensions are created. The extensions are created, put in the list and we will call deserialize method on each one of them. The deserialize of each extension will deserialize the common header and will call the method DoDeserialize specific to each extension. The extensions have the specific knowledge to deserialize their data. Some of them will contain a list of options, and will deserialize those options by using the Ipv6Option2 class and its children. This class have the same architecture, it deserializes the common data to all options and then calls the specific deserialization method on each specific option. As for now, the development status of ipv-6 extension is as following: in folder src/node/ - ipv6-header2.cc/h: Contains the ipv6 header of the packet. The main difference with the implemented one is that is contains a list of extensions and two methods to add an extension and to find and return an extension in the list. - ipv6-header2-test.cc: tests the serialization/deserialization of an ipv6 packet with extensions and options in folder src/internet-stack/ - ipv6-extension2.cc/h: This file contains the Ipv6Extension2 class and its children. The header of the extension is read by this class and the internal data of each specific extension should be read by the child extension. Children are: Ipv6ExtensionHopByHop2, Ipv6ExtensionDestination2, Ipv6ExtensionFragment2, Ipv6ExtensionRouting2, Ipv6ExtensionESP2 and Ipv6ExtensionAH2 Only IPv6ExtensionHopByHop2 is implemented and it reads the options contained in it, it contains a vector of options for serialization and de-serialization. Inside this class, you have a method to add an option to hop by hop extension and a FindOption method that will return the option if it is found in the extension list. - ipv6-option2.cc/h: Contains the class Ipv6Option2 and its children. For now the header of the options is read but the behaviour of the different options are not implemented yet. The child classes are: Ipv6Option2Pad1, Ipv6Option2Padn, Ipv6Option2Jumbogram and Ipv6Option2RouterAlert. The skeleton of these classes are written but they need to be implemented.
fixed in ns-3.9