30 | | * creating arbitrary protocol data in Floodlight Ethernet class. You need to add your class and Ethertype to the !etherTypeClassMap !HashMap, or else it won't be parsed and casted properly. This implies that your class needs to implement IPacket. The best way to do this by extending the provided abstract !BasePacket class. |
| 30 | * creating arbitrary protocol data in Floodlight Ethernet class. You need to |
| 31 | |
| 32 | 1. Have a zero-argument constructor, and |
| 33 | 2. add your class and Ethertype to the !etherTypeClassMap !HashMap |
| 34 | |
| 35 | the former is needed for the payload to be de-serialized properly, as class Ethernet calls getInstance() on the class being used as payload. The latter, or else it won't be parsed and casted properly. In addition point 2. implies that your class needs to implement IPacket. The best way to do this is by extending the provided abstract !BasePacket class. |