#ifndef SETPERFCOUNT_HH #define SETPERFCOUNT_HH #include "elements/linuxmodule/perfcountuser.hh" /* * =c * SetPerfCount(TYPE) * =s counters * stores Pentium Pro performance metric in annotation * =d * * Stores information about the Pentium Pro performance metric TYPE in each * packet. In combination with PerfCountAccum, this lets you measure how the * metric changes over the packet's lifetime. * * =n * * A packet has room for either exactly one cycle count or exactly one * performance metric. * * Valid performance metric names are C, C, * C, C, C, C, * C, C, C, C, C, * C, and C. * * =a PerfCountAccum, SetCycleCount, CycleCountAccum */ class SetPerfCount : public PerfCountUser { public: SetPerfCount(); ~SetPerfCount(); const char *class_name() const { return "SetPerfCount"; } void *cast(const char *); const char *port_count() const { return PORTS_1_1; } const char *processing() const { return AGNOSTIC; } int configure(Vector &, ErrorHandler *); inline void smaction(Packet *); void push(int, Packet *p); Packet *pull(int); private: int _which; }; #endif