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
common.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 _CCNB_PARSER_COMMON_H_
22 #define _CCNB_PARSER_COMMON_H_
23 
24 #include "ns3/ndn-common.h"
25 
26 #ifndef NDN_NAMESPACE_BEGIN
27 #error "dafaq"
28 #endif
29 
30 NDN_NAMESPACE_BEGIN;
31 
32 namespace wire {
33 
34 namespace CcnbParser {
35 
36 // forward declarations
37 class Block;
38 class Blob;
39 class Udata;
40 class Tag;
41 class Attr;
42 class Dtag;
43 class Dattr;
44 class Ext;
45 
46 
51 
57 enum ccn_tt {
58  CCN_EXT,
59  CCN_TAG,
60  CCN_DTAG,
61  CCN_ATTR,
62  CCN_DATTR,
63  CCN_BLOB,
64  CCN_UDATA,
65  CCN_NO_TOKEN
66 };
67 
69 enum {CCN_CLOSE = 0};
70 
76 enum ccn_dtag {
77  CCN_DTAG_Any = 13,
78  CCN_DTAG_Name = 14,
79  CCN_DTAG_Component = 15,
80  CCN_DTAG_Certificate = 16,
81  CCN_DTAG_Collection = 17,
82  CCN_DTAG_CompleteName = 18,
83  CCN_DTAG_Content = 19,
84  CCN_DTAG_SignedInfo = 20,
85  CCN_DTAG_ContentDigest = 21,
86  CCN_DTAG_ContentHash = 22,
87  CCN_DTAG_Count = 24,
88  CCN_DTAG_Header = 25,
89  CCN_DTAG_Interest = 26, /* 20090915 */
90  CCN_DTAG_Key = 27,
91  CCN_DTAG_KeyLocator = 28,
92  CCN_DTAG_KeyName = 29,
93  CCN_DTAG_Length = 30,
94  CCN_DTAG_Link = 31,
95  CCN_DTAG_LinkAuthenticator = 32,
96  CCN_DTAG_NameComponentCount = 33, /* DeprecatedInInterest */
97  CCN_DTAG_RootDigest = 36,
98  CCN_DTAG_Signature = 37,
99  CCN_DTAG_Start = 38,
100  CCN_DTAG_Timestamp = 39,
101  CCN_DTAG_Type = 40,
102  CCN_DTAG_Nonce = 41,
103  CCN_DTAG_Scope = 42,
104  CCN_DTAG_Exclude = 43,
105  CCN_DTAG_Bloom = 44,
106  CCN_DTAG_BloomSeed = 45,
107  CCN_DTAG_AnswerOriginKind = 47,
108  CCN_DTAG_InterestLifetime = 48,
109  CCN_DTAG_Witness = 53,
110  CCN_DTAG_SignatureBits = 54,
111  CCN_DTAG_DigestAlgorithm = 55,
112  CCN_DTAG_BlockSize = 56,
113  CCN_DTAG_FreshnessSeconds = 58,
114  CCN_DTAG_FinalBlockID = 59,
115  CCN_DTAG_PublisherPublicKeyDigest = 60,
116  CCN_DTAG_PublisherCertificateDigest = 61,
117  CCN_DTAG_PublisherIssuerKeyDigest = 62,
118  CCN_DTAG_PublisherIssuerCertificateDigest = 63,
119  CCN_DTAG_Data = 64, /* 20090915 */
120  CCN_DTAG_WrappedKey = 65,
121  CCN_DTAG_WrappingKeyIdentifier = 66,
122  CCN_DTAG_WrapAlgorithm = 67,
123  CCN_DTAG_KeyAlgorithm = 68,
124  CCN_DTAG_Label = 69,
125  CCN_DTAG_EncryptedKey = 70,
126  CCN_DTAG_EncryptedNonceKey = 71,
127  CCN_DTAG_WrappingKeyName = 72,
128  CCN_DTAG_Action = 73,
129  CCN_DTAG_FaceID = 74,
130  CCN_DTAG_IPProto = 75,
131  CCN_DTAG_Host = 76,
132  CCN_DTAG_Port = 77,
133  CCN_DTAG_MulticastInterface = 78,
134  CCN_DTAG_ForwardingFlags = 79,
135  CCN_DTAG_FaceInstance = 80,
136  CCN_DTAG_ForwardingEntry = 81,
137  CCN_DTAG_MulticastTTL = 82,
138  CCN_DTAG_MinSuffixComponents = 83,
139  CCN_DTAG_MaxSuffixComponents = 84,
140  CCN_DTAG_ChildSelector = 85,
141  CCN_DTAG_RepositoryInfo = 86,
142  CCN_DTAG_Version = 87,
143  CCN_DTAG_RepositoryVersion = 88,
144  CCN_DTAG_GlobalPrefix = 89,
145  CCN_DTAG_LocalName = 90,
146  CCN_DTAG_Policy = 91,
147  CCN_DTAG_Namespace = 92,
148  CCN_DTAG_GlobalPrefixName = 93,
149  CCN_DTAG_PolicyVersion = 94,
150  CCN_DTAG_KeyValueSet = 95,
151  CCN_DTAG_KeyValuePair = 96,
152  CCN_DTAG_IntegerValue = 97,
153  CCN_DTAG_DecimalValue = 98,
154  CCN_DTAG_StringValue = 99,
155  CCN_DTAG_BinaryValue = 100,
156  CCN_DTAG_NameValue = 101,
157  CCN_DTAG_Entry = 102,
158  CCN_DTAG_ACL = 103,
159  CCN_DTAG_ParameterizedName = 104,
160  CCN_DTAG_Prefix = 105,
161  CCN_DTAG_Suffix = 106,
162  CCN_DTAG_Root = 107,
163  CCN_DTAG_ProfileName = 108,
164  CCN_DTAG_Parameters = 109,
165  CCN_DTAG_InfoString = 110,
166  CCN_DTAG_StatusResponse = 112,
167  CCN_DTAG_StatusCode = 113,
168  CCN_DTAG_StatusText = 114,
169  CCN_DTAG_Nack = 200,
170  CCN_DTAG_SequenceNumber = 256,
171  CCN_DTAG_CCNProtocolDataUnit = 17702112
172 };
173 
174 } // CcnbParser
175 } // wire
176 
177 NDN_NAMESPACE_END
178 
179 #endif // _CCNB_PARSER_COMMON_H_
Exception thrown if there is a parsing error.
Definition: common.h:50
Class representing a general-use binary blob.
Definition: blob.h:26