All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
congestion-mark-lite.hpp
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
22 #ifndef NDN_CONGESTION_MARK_LITE_HPP
23 #define NDN_CONGESTION_MARK_LITE_HPP
24 
25 #include "../../c/lp/congestion-mark-types.h"
26 
27 namespace ndn {
28 
29 class LpPacketLite;
30 
37 public:
42 
47  uint64_t
48  getCongestionMark() const { return congestionMark; }
49 
54  void
55  setCongestionMark(uint64_t congestionMark) { this->congestionMark = congestionMark; }
56 
63  static const CongestionMarkLite*
64  getFirstHeader(const LpPacketLite& lpPacket);
65 
72  static CongestionMarkLite&
74  {
75  return *(CongestionMarkLite*)&congestionMark;
76  }
77 
78  static const CongestionMarkLite&
80  {
81  return *(CongestionMarkLite*)&congestionMark;
82  }
83 };
84 
85 }
86 
87 #endif
uint64_t getCongestionMark() const
Get the congestion mark value.
Definition: congestion-mark-lite.hpp:48
Definition: lp-packet-lite.hpp:95
Copyright (C) 2018 Regents of the University of California.
Definition: congestion-mark-types.h:33
static CongestionMarkLite & downCast(ndn_CongestionMark &congestionMark)
Downcast the reference to the ndn_CongestionMark struct to an CongestionMarkLite. ...
Definition: congestion-mark-lite.hpp:73
void setCongestionMark(uint64_t congestionMark)
Set the congestion mark value.
Definition: congestion-mark-lite.hpp:55
uint64_t congestionMark
0 if not specified.
Definition: congestion-mark-types.h:34
CongestionMarkLite represents the congestion mark header field in an NDNLPv2 packet.
Definition: congestion-mark-lite.hpp:36
CongestionMarkLite()
Create a CongestionMarkLite where all the values are unspecified.
Definition: congestion-mark-lite.cpp:28
static const CongestionMarkLite * getFirstHeader(const LpPacketLite &lpPacket)
Get the first header field in lpPacket which is a CongestionMarkLite.
Definition: congestion-mark-lite.cpp:34