X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FMainpage.dox;h=44ba81f4586e3a3216f0505e10efe4e3f93747d7;hb=9a988902090d28007578e93bffd809f6bd913155;hp=2b25b406fe2d471e9b58f473bc0e203594eb8a93;hpb=ac6a813d9d99f7add4e13aff7a4bcd314d5604a6;p=senf.git diff --git a/Packets/Mainpage.dox b/Packets/Mainpage.dox index 2b25b40..44ba81f 100644 --- a/Packets/Mainpage.dox +++ b/Packets/Mainpage.dox @@ -64,7 +64,7 @@ \section stuff Other Utilities The pkf also comprises some additional utilities to support the - development of packet classes. + development of packet classes. The senf::PacketRegistry implements a registry of packets keyed by an arbitrary type. The registry is used to find a packet @@ -72,12 +72,43 @@ 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. */ // Local Variables: // mode: c++ +// fill-column: 100 +// c-file-style: "senf" +// indent-tabs-mode: nil +// ispell-local-dictionary: "american" // mode: flyspell // mode: auto-fill -// ispell-local-dictionary: "american" // End: