All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
congestion-mark.hpp
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
22 #ifndef NDN_CONGESTION_MARK_HPP
23 #define NDN_CONGESTION_MARK_HPP
24 
25 #include <ndn-cpp/common.hpp>
26 #include <ndn-cpp/lite/lp/congestion-mark-lite.hpp>
27 #include <ndn-cpp/lp-packet-header-field.hpp>
28 
29 namespace ndn {
30 
31 class LpPacket;
32 
39 public:
44  : congestionMark_(0)
45  {
46  }
47 
51  virtual ~CongestionMark();
52 
57  uint64_t
58  getCongestionMark() const { return congestionMark_; }
59 
66  static ptr_lib::shared_ptr<CongestionMark>
67  getFirstHeader(LpPacket& lpPacket);
68 
74  void
75  set(const CongestionMarkLite& congestionMarkLite);
76 
77 private:
78  uint64_t congestionMark_;
79 };
80 
81 }
82 
83 #endif
CongestionMark represents the congestion mark header field in an NDNLPv2 packet.
Definition: congestion-mark.hpp:38
virtual ~CongestionMark()
Override the virtual destructor.
Definition: congestion-mark.cpp:27
void set(const CongestionMarkLite &congestionMarkLite)
Clear this CongestionMark, and set the values by copying from congestionMarkLite. ...
Definition: congestion-mark.cpp:43
CongestionMarkLite represents the congestion mark header field in an NDNLPv2 packet.
Definition: congestion-mark-lite.hpp:36
An LpPacket represents an NDNLPv2 packet including header fields an an optional fragment.
Definition: lp-packet.hpp:39
static ptr_lib::shared_ptr< CongestionMark > getFirstHeader(LpPacket &lpPacket)
Get the first header field in lpPacket which is an CongestionMark.
Definition: congestion-mark.cpp:30
CongestionMark()
Create a CongestionMark where all the values are unspecified.
Definition: congestion-mark.hpp:43
This is a base class for LP packet header fields like NetworkNack.
Definition: lp-packet-header-field.hpp:31
uint64_t getCongestionMark() const
Get the congestion mark value.
Definition: congestion-mark.hpp:58