2011 | OriginalPaper | Buchkapitel
References for Run-time Aggregate Selection with Strong Typing
verfasst von : Ralph Duncan, Peder Jungck, Kenneth Ross, Dwight Mulcahy
Erschienen in: packetC Programming
Verlag: Apress
Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.
Wählen Sie Textabschnitte aus um mit Künstlicher Intelligenz passenden Patente zu finden. powered by
Markieren Sie Textabschnitte, um KI-gestützt weitere passende Inhalte zu finden. powered by
Network packet processing often involves having the results of a database match or packet content search select the next program operation. Our packetC[1] language provides specialized aggregate data types,
databases
[2] for masked matching and
searchsets
[3] for packet payload search terms. It is common to chain operations on these types, so that the result of one operation selects the specific aggregate to use for the next operation. packetC offers a reference data type to support this kind of chaining. A packetC
reference
provides an abstract way to refer to one of the extended data type aggregates in source code. At runtime the reference construct’s value will indicate a particular aggregate of the relevant type. Thus, this construct is a classic
reference
in the computer science sense of a mechanism for indirect variable access. Unlike a C++ reference our construct must be assignable to support chaining that is driven by runtime results. Unlike a C-style pointer our reference must have strong typing, since runtime recovery from an illegal reference value (indicating a nonexistent or inappropriate aggregate) is not practical in this unforgiving, high-speed domain. The paper illustrates practical applications and shows that compressed code from using references does not cause performance penalties.