Alexander Afanasyev | c74a602 | 2011-08-15 20:01:35 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2005,2006,2007 INRIA |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License version 2 as |
| 7 | * published by the Free Software Foundation; |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 | * |
| 18 | * Authors: |
| 19 | */ |
| 20 | #ifndef CCNX_LOCAL_FACE_H |
| 21 | #define CCNX_LOCAL_FACE_H |
| 22 | |
| 23 | #include "ccnx-face.h" |
| 24 | |
| 25 | namespace ns3 { |
| 26 | |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 27 | /** |
Alexander Afanasyev | 56f79ea | 2011-08-17 23:54:27 -0700 | [diff] [blame] | 28 | * \ingroup ccnx-face |
| 29 | * \brief Implementation of application CCNx face |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 30 | * |
Alexander Afanasyev | 56f79ea | 2011-08-17 23:54:27 -0700 | [diff] [blame] | 31 | * This class defines basic functionality of CCNx face. Face is core |
| 32 | * component responsible for actual delivery of data packet to and |
| 33 | * from CCNx stack |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 34 | * |
Alexander Afanasyev | 56f79ea | 2011-08-17 23:54:27 -0700 | [diff] [blame] | 35 | * \see CcnxLocalFace, CcnxNetDeviceFace, CcnxIpv4Face, CcnxUdpFace |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 36 | */ |
| 37 | class CcnxLocalFace : public CcnxFace |
| 38 | { |
| 39 | public: |
Alexander Afanasyev | 56f79ea | 2011-08-17 23:54:27 -0700 | [diff] [blame] | 40 | /** |
| 41 | * \brief Interface ID |
| 42 | * |
| 43 | * \return interface ID |
| 44 | */ |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 45 | static TypeId GetTypeId (void); |
| 46 | |
Alexander Afanasyev | 56f79ea | 2011-08-17 23:54:27 -0700 | [diff] [blame] | 47 | /** |
| 48 | * \brief Default constructor |
| 49 | */ |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 50 | CcnxLocalFace (); |
| 51 | virtual ~CcnxLocalFace(); |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 52 | |
Alexander Afanasyev | 56f79ea | 2011-08-17 23:54:27 -0700 | [diff] [blame] | 53 | //////////////////////////////////////////////////////////////////// |
| 54 | // methods overloaded from CcnxFace |
| 55 | |
| 56 | virtual void RegisterProtocolHandler (ProtocolHandler handler); |
| 57 | |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 58 | virtual void Send (Ptr<Packet> p); |
| 59 | |
Alexander Afanasyev | 56f79ea | 2011-08-17 23:54:27 -0700 | [diff] [blame] | 60 | //////////////////////////////////////////////////////////////////// |
| 61 | |
| 62 | /// \todo Need methods to implement application hooks |
| 63 | |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 64 | protected: |
| 65 | virtual void DoDispose (void); |
| 66 | |
| 67 | private: |
Alexander Afanasyev | 56f79ea | 2011-08-17 23:54:27 -0700 | [diff] [blame] | 68 | CcnxLocalFace (const CcnxLocalFace &); ///< \brief Disabled copy constructor |
| 69 | CcnxLocalFace& operator= (const CcnxLocalFace &); ///< \brief Disabled copy operator |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 70 | }; |
| 71 | |
Alexander Afanasyev | 56f79ea | 2011-08-17 23:54:27 -0700 | [diff] [blame] | 72 | std::ostream& operator<< (std::ostream& os, const CcnxLocalFace &localFace); |
Alexander Afanasyev | 9825610 | 2011-08-14 01:00:02 -0700 | [diff] [blame] | 73 | |
| 74 | } // namespace ns3 |
| 75 | |
| 76 | #endif |