NS-3 based Named Data Networking (NDN) simulator
ndnSIM: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
ndn-header-helper.h
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
2 /*
3  * Copyright (c) 2011 University of California, Los Angeles
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  * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
19  */
20 
21 #ifndef _NDN_HEADER_HELPER_H_
22 #define _NDN_HEADER_HELPER_H_
23 
24 #include "ns3/ptr.h"
25 
26 namespace ns3 {
27 
28 class Header;
29 class Packet;
30 
31 namespace ndn {
32 
33 class Name;
34 typedef Name NameComponents;
35 
49 {
50 public:
54  enum Type {INTEREST_CCNB, CONTENT_OBJECT_CCNB,
55  INTEREST_NDNSIM, CONTENT_OBJECT_NDNSIM};
56 
92  static Type
93  GetNdnHeaderType (Ptr<const Packet> packet);
94 };
95 
100 
101 } // namespace ndn
102 } // namespace ns3
103 
104 #endif // _NDN_HEADER_HELPER_H_
Type
enum for Ndn packet types
static Type GetNdnHeaderType(Ptr< const Packet > packet)
Packet ::= Version PacketType (Interest | Data)
Class implementing functionality to detect Ndn packet type and create the corresponding object...
Exception thrown if NDN stack receives unrecognized message type.