X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FMainpage.dox;h=bfb112053048731753a2c108ef5a7bf62adc00da;hb=5d62f84a80b2c72cc0aa5cabc3ddad752e87fcc8;hp=2b25b406fe2d471e9b58f473bc0e203594eb8a93;hpb=ac6a813d9d99f7add4e13aff7a4bcd314d5604a6;p=senf.git diff --git a/Packets/Mainpage.dox b/Packets/Mainpage.dox index 2b25b40..bfb1120 100644 --- a/Packets/Mainpage.dox +++ b/Packets/Mainpage.dox @@ -72,6 +72,34 @@ ethernet header). Together with it's support classes (especially senf::PacketRegistryMixin) this class greatly simplifies implementing the needed table lookups. + + \todo The Packet Libarary really needs a refactoring of the public + interfaface ... + + \idea Add the Handle-Body idiom to the mix with a PacketRef (or + HeaderRef or InterpreterRef or whatever class). This would + have members for all the API defined in Packet now. \c + operator-> would return a parser object to interpret the + data. This would make awayy with the inheritance relationship + ... + + \idea Templating the parsers on the iterator type does not + introduce additional coupling (because of the inlining) but + looking at it after the fact it looks like severe overdesign + and it does introduce some problems (e.g. rebind and all this + entails). If we just implement all parsers for + Packet::byte_iterator they are no tmplates any more which + should simplify things a log. + + \idea we need some better and automatic checking on data access + especially after data has changed. Idea 1: give the parser the + end iterator as additional member. Enforce, that all parsers + must ultimately be based on ParseInt and have ParseInt check + against end() at construction time. Idea 2: add a dirty flag + to the interpreters. Set this flag whenever the packet is + changed and recall check() in operator-> of the PacketRef + object if the packet is dirty. Maybe we need both and make + them tunable. */