//=========================================================================== // $Name: $ // $Id: ArtsIpPath.hh,v 1.1.1.1 2000/03/29 22:53:56 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 _ARTSIPPATH_HH_ #define _ARTSIPPATH_HH_ extern "C" { #include #include "caida_t.h" } #include #include "Arts.hh" #include "ArtsIpPathEntry.hh" //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // class ArtsIpPath : public Arts //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // This class abstracts an ARTS IP path data object. //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ class ArtsIpPath : public Arts { public: //------------------------------------------------------------------------- // ArtsIpPath(ipv4addr_t src, ipv4addr_t dst) //......................................................................... // constructor accepting a source and destination IP address //------------------------------------------------------------------------- ArtsIpPath(ipv4addr_t src, ipv4addr_t dst); //------------------------------------------------------------------------- // ArtsIpPath(const ArtsIpPath & artsIpPath) //......................................................................... // //------------------------------------------------------------------------- ArtsIpPath(const ArtsIpPath & artsIpPath); //------------------------------------------------------------------------- // ArtsIpPath() //......................................................................... // default constructor //------------------------------------------------------------------------- ArtsIpPath(); //------------------------------------------------------------------------- // ~ArtsIpPath() //......................................................................... // destructor //------------------------------------------------------------------------- ~ArtsIpPath(); //------------------------------------------------------------------------- // inline ipv4addr_t Src() const //......................................................................... // Returns the source address of the IP path. //------------------------------------------------------------------------- inline ipv4addr_t Src() const { return(this->IpPathData()->Src()); } //------------------------------------------------------------------------- // inline ipv4addr_t Dst() const //......................................................................... // Returns the destinatino address of the IP path. //------------------------------------------------------------------------- inline ipv4addr_t Dst() const { return(this->IpPathData()->Dst()); } //------------------------------------------------------------------------- // inline const struct timeval & Rtt() const //......................................................................... // Returns the round-trip time from the source to the destination and // back. //------------------------------------------------------------------------- inline const struct timeval & Rtt() const { return(this->IpPathData()->Rtt()); } //------------------------------------------------------------------------- // const struct timeval & Rtt(const struct timeval & rtt) //......................................................................... // Sets and returns the round-trip time from the source to the // destination and back. //------------------------------------------------------------------------- const struct timeval & Rtt(const struct timeval & rtt) { return(this->IpPathData()->Rtt(rtt)); } //------------------------------------------------------------------------- // uint8_t HopDistance() const //......................................................................... // Returns the hop distance from the source to the destination. //------------------------------------------------------------------------- uint8_t HopDistance() const { return(this->IpPathData()->HopDistance()); } //------------------------------------------------------------------------- // uint8_t HopDistance(uint8_t hopDistance) //......................................................................... // Sets and returns the hop distance from the source to the destination. //------------------------------------------------------------------------- uint8_t HopDistance(uint8_t hopDistance) { return(this->IpPathData()->HopDistance(hopDistance)); } //------------------------------------------------------------------------- // void AddHop(ipv4addr_t ipAddr, uint8_t hopNum) //......................................................................... // Appends a hop to the path. Assigns an IP address of ipAddr and // a hop number of hopNum to the new hop. Note we *always* tack the // new hop on the end of the path, and do *not* use hopNum to determine // the location. //------------------------------------------------------------------------- void AddHop(ipv4addr_t ipAddr, uint8_t hopNum) { this->IpPathData()->AddHop(ipAddr,hopNum); return; } }; #endif /* _ARTSIPPATH_HH_ */