lp: add CongestionMark field and tag
refs #3797
Change-Id: I6ac6663c874abde1df2102af81fc03567ad87029
diff --git a/src/lp/fields.hpp b/src/lp/fields.hpp
index ff9db28..7d898d0 100644
--- a/src/lp/fields.hpp
+++ b/src/lp/fields.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2013-2015 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -68,6 +68,11 @@
tlv::IncomingFaceId> IncomingFaceIdField;
BOOST_CONCEPT_ASSERT((Field<IncomingFaceIdField>));
+typedef detail::FieldDecl<field_location_tags::Header,
+ uint64_t,
+ tlv::CongestionMark> CongestionMarkField;
+BOOST_CONCEPT_ASSERT((Field<CongestionMarkField>));
+
/**
* The value of the wire encoded field is the data between the provided iterators. During
* encoding, the data is copied from the Buffer into the wire buffer.
@@ -88,7 +93,8 @@
NackField,
NextHopFaceIdField,
CachePolicyField,
- IncomingFaceIdField
+ IncomingFaceIdField,
+ CongestionMarkField
> FieldSet;
} // namespace lp
diff --git a/src/lp/tags.hpp b/src/lp/tags.hpp
index c7fcefe..5e2b3d6 100644
--- a/src/lp/tags.hpp
+++ b/src/lp/tags.hpp
@@ -49,6 +49,13 @@
*/
typedef SimpleTag<CachePolicy, 12> CachePolicyTag;
+/** \class CongestionMarkTag
+ * \brief a packet tag for CongestionMark field
+ *
+ * This tag can be attached to Interest, Data, Nack.
+ */
+typedef SimpleTag<uint64_t, 13> CongestionMarkTag;
+
} // namespace lp
} // namespace ndn
diff --git a/src/lp/tlv.hpp b/src/lp/tlv.hpp
index 3231660..e7a5cca 100644
--- a/src/lp/tlv.hpp
+++ b/src/lp/tlv.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2013-2015 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -40,7 +40,8 @@
NextHopFaceId = 816,
CachePolicy = 820,
CachePolicyType = 821,
- IncomingFaceId = 817
+ IncomingFaceId = 817,
+ CongestionMark = 832
};
enum {