//=========================================================================== // @(#) $Name: $ // @(#) $Id: ArtsPortTableAggregator.hh,v 1.1.1.1 2000/03/29 22:53:59 kkeys Exp $ //=========================================================================== // CAIDA Copyright Notice // // By accessing this software, arts++, you are duly informed // of and agree to be bound by the conditions described below in this // notice: // // This software product, arts++, is developed by Daniel W. McRobb, and // copyrighted(C) 1998 by the University of California, San Diego // (UCSD), with all rights reserved. UCSD administers the CAIDA grant, // NCR-9711092, under which part of this code was developed. // // There is no charge for arts++ software. You can redistribute it // and/or modify it under the terms of the GNU General Public License, // v. 2 dated June 1991 which is incorporated by reference herein. // arts++ is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS, OF // MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that the use // of it will not infringe on any third party's intellectual property // rights. // // You should have received a copy of the GNU GPL along with arts++. // Copies can also be obtained from: // // http://www.gnu.org/copyleft/gpl.html // // or by writing to: // // University of California, San Diego // // SDSC/CAIDA // 9500 Gilman Dr., MS-0505 // La Jolla, CA 92093 - 0505 USA // // Or contact: // // info@caida.org //=========================================================================== #ifndef _ARTSPORTTABLEAGGREGATOR_HH_ #define _ARTSPORTTABLEAGGREGATOR_HH_ #include #include #include "ArtsPortTable.hh" //--------------------------------------------------------------------------- // class ArtsPortTableAggregator //--------------------------------------------------------------------------- // This class is used to aggregate port table objects in the time // domain. //--------------------------------------------------------------------------- class ArtsPortTableAggregator { public: //------------------------------------------------------------------------- // ArtsPortTableAggregator(const Arts & arts) //......................................................................... // //------------------------------------------------------------------------- ArtsPortTableAggregator(const Arts & arts); //------------------------------------------------------------------------- // void Add(const Arts & arts) //......................................................................... // //------------------------------------------------------------------------- void Add(const Arts & arts); //------------------------------------------------------------------------- // ArtsPortTable *ConvertToArtsPortTable() const //......................................................................... // //------------------------------------------------------------------------- ArtsPortTable *ConvertToArtsPortTable() const; private: typedef struct { uint64_t inPkts; uint64_t inBytes; uint64_t outPkts; uint64_t outBytes; } counter_t; ArtsHeader _header; vector _attributes; map > _portCounters; }; #endif // _ARTSPORTTABLEAGGREGATOR_HH_