Kernel Procedure Names
Kernel Procedure names follow a standard structure that makes them easily visible in C/C++ code, avoids naming conflicts with non-Riverbed procedures or variables, and serves as an aid to recall procedure names and purposes. The naming structure has a few simple rules:
- Names begin with the prefix
op_, which serves to identify KPs as being provided by the Riverbed Simulation Kernel. - The second word in a KP name is the package name (in lower case letters), which is usually an abbreviated name of the object that the package manipulates (e.g., “pk” for packet and “stat” for statistic).
- The third word in a name may be a sub-package name, which provides a further categorization of the KP. For example, the “nfd” in
op_pk_nfd_set()indicates that this KP is used with named fields in formatted packets. - Typically, KPs perform operations on objects. In KP names, the object always appears before the action. For instance, the name fragments
attr_setandsubq_flushplace objects (attribute and subqueue) before actions (set and flush).