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 | |
| 27 | class NetDevice; |
| 28 | class Packet; |
| 29 | class Node; |
| 30 | |
| 31 | /** |
| 32 | * \brief The Ccnx representation of a network interface |
| 33 | * |
| 34 | * This class roughly corresponds to the struct in_device |
| 35 | * of Linux; the main purpose is to provide address-family |
| 36 | * specific information (addresses) about an interface. |
| 37 | * |
| 38 | * By default, Ccnx interface are created in the "down" state |
| 39 | * no IP addresses. Before becoming useable, the user must |
| 40 | * add an address of some type and invoke Setup on them. |
| 41 | */ |
| 42 | class CcnxLocalFace : public CcnxFace |
| 43 | { |
| 44 | public: |
| 45 | static TypeId GetTypeId (void); |
| 46 | |
| 47 | CcnxLocalFace (); |
| 48 | virtual ~CcnxLocalFace(); |
| 49 | |
| 50 | // Create (); |
| 51 | |
| 52 | // Create (Name::Components); |
| 53 | |
| 54 | // typedef callback ? |
| 55 | |
| 56 | /** |
| 57 | * \param p packet to send |
| 58 | */ |
| 59 | virtual void Send (Ptr<Packet> p); |
| 60 | |
| 61 | protected: |
| 62 | virtual void DoDispose (void); |
| 63 | |
| 64 | private: |
| 65 | /** disabled for LocalFace **/ |
| 66 | virtual Ptr<NetDevice> GetDevice (void) const; |
| 67 | virtual void SetDevice (Ptr<NetDevice> device); |
| 68 | }; |
| 69 | |
| 70 | std::ostream& operator<< (std::ostream& os, CcnxLocalFace const& localFace); |
| 71 | |
| 72 | } // namespace ns3 |
| 73 | |
| 74 | #endif |