A Discrete-Event Network Simulator
API
packetbb.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /* vim: set ts=2 sw=2 sta expandtab ai si cin: */
3 /*
4  * Copyright (c) 2009 Drexel University
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation;
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Author: Tom Wambold <tom5760@gmail.com>
20  */
21 /* These classes implement RFC 5444 - The Generalized Mobile Ad Hoc Network
22  * (MANET) Packet/PbbMessage Format
23  * See: http://tools.ietf.org/html/rfc5444 for details */
24 
25 #ifndef PACKETBB_H
26 #define PACKETBB_H
27 
28 #include <list>
29 
30 #include "ns3/ptr.h"
31 #include "ns3/address.h"
32 #include "ns3/header.h"
33 #include "ns3/buffer.h"
34 #include "ns3/simple-ref-count.h"
35 
36 namespace ns3 {
37 
38 /* Forward declare objects */
39 class PbbMessage;
40 class PbbAddressBlock;
41 class PbbTlv;
42 class PbbAddressTlv;
43 
46  IPV4 = 3,
47  IPV6 = 15,
48 };
49 
56 {
57 public:
59  typedef std::list< Ptr<PbbTlv> >::iterator Iterator;
61  typedef std::list< Ptr<PbbTlv> >::const_iterator ConstIterator;
62 
63  PbbTlvBlock (void);
64  ~PbbTlvBlock (void);
65 
69  Iterator Begin (void);
70 
74  ConstIterator Begin (void) const;
75 
79  Iterator End (void);
80 
84  ConstIterator End (void) const;
85 
89  int Size (void) const;
90 
94  bool Empty (void) const;
95 
99  Ptr<PbbTlv> Front (void) const;
100 
104  Ptr<PbbTlv> Back (void) const;
105 
110  void PushFront (Ptr<PbbTlv> tlv);
111 
115  void PopFront (void);
116 
121  void PushBack (Ptr<PbbTlv> tlv);
122 
126  void PopBack (void);
127 
135  Iterator Insert (Iterator position, const Ptr<PbbTlv> tlv);
136 
142  Iterator Erase (Iterator position);
143 
152 
156  void Clear (void);
157 
161  uint32_t GetSerializedSize (void) const;
162 
170  void Serialize (Buffer::Iterator &start) const;
171 
180 
185  void Print (std::ostream &os) const;
186 
195  void Print (std::ostream &os, int level) const;
196 
202  bool operator== (const PbbTlvBlock &other) const;
208  bool operator!= (const PbbTlvBlock &other) const;
209 
210 private:
211  std::list< Ptr<PbbTlv> > m_tlvList;
212 };
213 
220 {
221 public:
223  typedef std::list< Ptr<PbbAddressTlv> >::iterator Iterator;
225  typedef std::list< Ptr<PbbAddressTlv> >::const_iterator ConstIterator;
226 
227  PbbAddressTlvBlock (void);
228  ~PbbAddressTlvBlock (void);
229 
233  Iterator Begin (void);
234 
238  ConstIterator Begin (void) const;
239 
243  Iterator End (void);
244 
248  ConstIterator End (void) const;
249 
253  int Size (void) const;
254 
258  bool Empty (void) const;
259 
263  Ptr<PbbAddressTlv> Front (void) const;
264 
268  Ptr<PbbAddressTlv> Back (void) const;
269 
274  void PushFront (Ptr<PbbAddressTlv> tlv);
275 
279  void PopFront (void);
280 
285  void PushBack (Ptr<PbbAddressTlv> tlv);
286 
290  void PopBack (void);
291 
299  Iterator Insert (Iterator position, const Ptr<PbbAddressTlv> tlv);
300 
306  Iterator Erase (Iterator position);
307 
318 
322  void Clear (void);
323 
327  uint32_t GetSerializedSize (void) const;
328 
336  void Serialize (Buffer::Iterator &start) const;
337 
346 
351  void Print (std::ostream &os) const;
352 
361  void Print (std::ostream &os, int level) const;
362 
368  bool operator== (const PbbAddressTlvBlock &other) const;
369 
375  bool operator!= (const PbbAddressTlvBlock &other) const;
376 
377 private:
378  std::list< Ptr<PbbAddressTlv> > m_tlvList;
379 };
380 
389 class PbbPacket : public SimpleRefCount<PbbPacket,Header>
390 {
391 public:
393  typedef std::list< Ptr<PbbTlv> >::iterator TlvIterator;
395  typedef std::list< Ptr<PbbTlv> >::const_iterator ConstTlvIterator;
397  typedef std::list< Ptr<PbbMessage> >::iterator MessageIterator;
399  typedef std::list< Ptr<PbbMessage> >::const_iterator ConstMessageIterator;
400 
401  PbbPacket (void);
402  ~PbbPacket (void);
403 
409  uint8_t GetVersion (void) const;
410 
415  void SetSequenceNumber (uint16_t number);
416 
423  uint16_t GetSequenceNumber (void) const;
424 
432  bool HasSequenceNumber (void) const;
433 
434  /* Manipulating Packet TLVs */
435 
439  TlvIterator TlvBegin (void);
440 
444  ConstTlvIterator TlvBegin (void) const;
445 
449  TlvIterator TlvEnd (void);
450 
455  ConstTlvIterator TlvEnd (void) const;
456 
460  int TlvSize (void) const;
461 
465  bool TlvEmpty (void) const;
466 
470  Ptr<PbbTlv> TlvFront (void);
471 
475  const Ptr<PbbTlv> TlvFront (void) const;
476 
480  Ptr<PbbTlv> TlvBack (void);
481 
485  const Ptr<PbbTlv> TlvBack (void) const;
486 
491  void TlvPushFront (Ptr<PbbTlv> tlv);
492 
496  void TlvPopFront (void);
497 
502  void TlvPushBack (Ptr<PbbTlv> tlv);
503 
507  void TlvPopBack (void);
508 
514  TlvIterator Erase (TlvIterator position);
515 
526 
530  void TlvClear (void);
531 
532  /* Manipulating Packet Messages */
533 
538 
542  ConstMessageIterator MessageBegin (void) const;
543 
548 
553  ConstMessageIterator MessageEnd (void) const;
554 
558  int MessageSize (void) const;
559 
563  bool MessageEmpty (void) const;
564 
569 
573  const Ptr<PbbMessage> MessageFront (void) const;
574 
579 
583  const Ptr<PbbMessage> MessageBack (void) const;
584 
589  void MessagePushFront (Ptr<PbbMessage> message);
590 
594  void MessagePopFront (void);
595 
600  void MessagePushBack (Ptr<PbbMessage> message);
601 
605  void MessagePopBack (void);
606 
613 
622 
626  void MessageClear (void);
627 
632  static TypeId GetTypeId (void);
633  virtual TypeId GetInstanceTypeId (void) const;
634 
638  virtual uint32_t GetSerializedSize (void) const;
639 
644  virtual void Serialize (Buffer::Iterator start) const;
645 
654  virtual uint32_t Deserialize (Buffer::Iterator start);
655 
660  virtual void Print (std::ostream &os) const;
661 
667  bool operator== (const PbbPacket &other) const;
668 
674  bool operator!= (const PbbPacket &other) const;
675 
676 protected:
677 
678 private:
680  std::list< Ptr<PbbMessage> > m_messageList;
681 
682  uint8_t m_version;
683 
684  bool m_hasseqnum;
685  uint16_t m_seqnum;
686 };
687 
695 class PbbMessage : public SimpleRefCount<PbbMessage>
696 {
697 public:
699  typedef std::list< Ptr<PbbTlv> >::iterator TlvIterator;
701  typedef std::list< Ptr<PbbTlv> >::const_iterator ConstTlvIterator;
703  typedef std::list< Ptr<PbbAddressBlock> >::iterator AddressBlockIterator;
705  typedef std::list< Ptr<PbbAddressBlock> >::const_iterator ConstAddressBlockIterator;
706 
707  PbbMessage ();
708  virtual ~PbbMessage ();
709 
714  void SetType (uint8_t type);
715 
719  uint8_t GetType (void) const;
720 
726 
733  Address GetOriginatorAddress (void) const;
734 
739  bool HasOriginatorAddress (void) const;
740 
745  void SetHopLimit (uint8_t hoplimit);
746 
753  uint8_t GetHopLimit (void) const;
754 
761  bool HasHopLimit (void) const;
762 
767  void SetHopCount (uint8_t hopcount);
768 
775  uint8_t GetHopCount (void) const;
776 
781  bool HasHopCount (void) const;
782 
787  void SetSequenceNumber (uint16_t seqnum);
788 
795  uint16_t GetSequenceNumber (void) const;
796 
801  bool HasSequenceNumber (void) const;
802 
803  /* Manipulating PbbMessage TLVs */
804 
809 
813  ConstTlvIterator TlvBegin () const;
814 
819  TlvIterator TlvEnd ();
820 
825  ConstTlvIterator TlvEnd () const;
826 
830  int TlvSize (void) const;
831 
835  bool TlvEmpty (void) const;
836 
840  Ptr<PbbTlv> TlvFront (void);
841 
845  const Ptr<PbbTlv> TlvFront (void) const;
846 
850  Ptr<PbbTlv> TlvBack (void);
851 
855  const Ptr<PbbTlv> TlvBack (void) const;
856 
861  void TlvPushFront (Ptr<PbbTlv> tlv);
862 
866  void TlvPopFront (void);
867 
872  void TlvPushBack (Ptr<PbbTlv> tlv);
873 
877  void TlvPopBack (void);
878 
884  TlvIterator TlvErase (TlvIterator position);
885 
896 
900  void TlvClear (void);
901 
902  /* Manipulating Address Block and Address TLV pairs */
903 
908 
913 
919 
925 
929  int AddressBlockSize (void) const;
930 
935  bool AddressBlockEmpty (void) const;
936 
941 
945  const Ptr<PbbAddressBlock> AddressBlockFront (void) const;
946 
951 
955  const Ptr<PbbAddressBlock> AddressBlockBack (void) const;
956 
962 
966  void AddressBlockPopFront (void);
967 
973 
977  void AddressBlockPopBack (void);
978 
985 
996  AddressBlockIterator last);
997 
1001  void AddressBlockClear (void);
1002 
1013 
1017  uint32_t GetSerializedSize (void) const;
1018 
1026  void Serialize (Buffer::Iterator &start) const;
1027 
1036 
1041  void Print (std::ostream &os) const;
1042 
1052  void Print (std::ostream &os, int level) const;
1053 
1059  bool operator== (const PbbMessage &other) const;
1065  bool operator!= (const PbbMessage &other) const;
1066 
1067 protected:
1076  virtual PbbAddressLength GetAddressLength (void) const = 0;
1077 
1082  virtual void SerializeOriginatorAddress (Buffer::Iterator &start) const = 0;
1093  virtual void PrintOriginatorAddress (std::ostream &os) const = 0;
1094 
1101 
1102 private:
1104  std::list< Ptr<PbbAddressBlock> > m_addressBlockList;
1105 
1106  uint8_t m_type;
1108 
1111 
1113  uint8_t m_hopLimit;
1114 
1116  uint8_t m_hopCount;
1117 
1119  uint16_t m_sequenceNumber;
1120 };
1121 
1127 class PbbMessageIpv4 : public PbbMessage {
1128 public:
1129  PbbMessageIpv4 ();
1130  virtual ~PbbMessageIpv4 ();
1131 
1132 protected:
1141  virtual PbbAddressLength GetAddressLength (void) const;
1142 
1143  virtual void SerializeOriginatorAddress (Buffer::Iterator &start) const;
1145  virtual void PrintOriginatorAddress (std::ostream &os) const;
1146 
1148 };
1149 
1155 class PbbMessageIpv6 : public PbbMessage {
1156 public:
1157  PbbMessageIpv6 ();
1158  virtual ~PbbMessageIpv6 ();
1159 
1160 protected:
1169  virtual PbbAddressLength GetAddressLength (void) const;
1170 
1171  virtual void SerializeOriginatorAddress (Buffer::Iterator &start) const;
1173  virtual void PrintOriginatorAddress (std::ostream &os) const;
1174 
1176 };
1177 
1184 class PbbAddressBlock : public SimpleRefCount<PbbAddressBlock>
1185 {
1186 public:
1188  typedef std::list< Address >::iterator AddressIterator;
1190  typedef std::list< Address >::const_iterator ConstAddressIterator;
1191 
1193  typedef std::list<uint8_t>::iterator PrefixIterator;
1195  typedef std::list<uint8_t>::const_iterator ConstPrefixIterator;
1196 
1201 
1202  PbbAddressBlock ();
1203  virtual ~PbbAddressBlock ();
1204 
1205  /* Manipulating the address block */
1206 
1211 
1215  ConstAddressIterator AddressBegin (void) const;
1216 
1220  AddressIterator AddressEnd (void);
1221 
1225  ConstAddressIterator AddressEnd (void) const;
1226 
1230  int AddressSize (void) const;
1231 
1235  bool AddressEmpty (void) const;
1236 
1240  Address AddressFront (void) const;
1241 
1245  Address AddressBack (void) const;
1246 
1252 
1256  void AddressPopFront (void);
1257 
1263 
1267  void AddressPopBack (void);
1268 
1277  const Address value);
1278 
1285 
1296 
1300  void AddressClear (void);
1301 
1302  /* Prefix methods */
1303 
1307  PrefixIterator PrefixBegin (void);
1308 
1312  ConstPrefixIterator PrefixBegin (void) const;
1313 
1317  PrefixIterator PrefixEnd (void);
1318 
1322  ConstPrefixIterator PrefixEnd (void) const;
1323 
1327  int PrefixSize (void) const;
1328 
1332  bool PrefixEmpty (void) const;
1333 
1337  uint8_t PrefixFront (void) const;
1338 
1342  uint8_t PrefixBack (void) const;
1343 
1348  void PrefixPushFront (uint8_t prefix);
1349 
1353  void PrefixPopFront (void);
1354 
1359  void PrefixPushBack (uint8_t prefix);
1360 
1364  void PrefixPopBack (void);
1365 
1373  PrefixIterator PrefixInsert (PrefixIterator position, const uint8_t value);
1374 
1381 
1392 
1396  void PrefixClear (void);
1397 
1398  /* Manipulating the TLV block */
1399 
1403  TlvIterator TlvBegin (void);
1404 
1408  ConstTlvIterator TlvBegin (void) const;
1409 
1413  TlvIterator TlvEnd (void);
1414 
1418  ConstTlvIterator TlvEnd (void) const;
1419 
1423  int TlvSize (void) const;
1424 
1428  bool TlvEmpty (void) const;
1429 
1434 
1438  const Ptr<PbbAddressTlv> TlvFront (void) const;
1439 
1443  Ptr<PbbAddressTlv> TlvBack (void);
1444 
1448  const Ptr<PbbAddressTlv> TlvBack (void) const;
1449 
1455 
1459  void TlvPopFront (void);
1460 
1466 
1470  void TlvPopBack (void);
1471 
1479  TlvIterator TlvInsert (TlvIterator position, const Ptr<PbbTlv> value);
1480 
1486  TlvIterator TlvErase (TlvIterator position);
1487 
1498 
1502  void TlvClear (void);
1503 
1507  uint32_t GetSerializedSize (void) const;
1508 
1516  void Serialize (Buffer::Iterator &start) const;
1517 
1526 
1531  void Print (std::ostream &os) const;
1532 
1542  void Print (std::ostream &os, int level) const;
1543 
1549  bool operator== (const PbbAddressBlock &other) const;
1550 
1556  bool operator!= (const PbbAddressBlock &other) const;
1557 
1558 protected:
1563  virtual uint8_t GetAddressLength (void) const = 0;
1569  virtual void SerializeAddress (uint8_t *buffer, ConstAddressIterator iter) const = 0;
1575  virtual Address DeserializeAddress (uint8_t *buffer) const = 0;
1581  virtual void PrintAddress (std::ostream &os, ConstAddressIterator iter) const = 0;
1582 
1583 private:
1588  uint8_t GetPrefixFlags (void) const;
1596  void GetHeadTail (uint8_t *head, uint8_t &headlen,
1597  uint8_t *tail, uint8_t &taillen) const;
1598 
1605  bool HasZeroTail (const uint8_t *tail, uint8_t taillen) const;
1606 
1607  std::list<Address> m_addressList;
1608  std::list<uint8_t> m_prefixList;
1610 };
1611 
1618 {
1619 public:
1621  virtual ~PbbAddressBlockIpv4 ();
1622 
1623 protected:
1628  virtual uint8_t GetAddressLength (void) const;
1629  virtual void SerializeAddress (uint8_t *buffer, ConstAddressIterator iter) const;
1630  virtual Address DeserializeAddress (uint8_t *buffer) const;
1631  virtual void PrintAddress (std::ostream &os, ConstAddressIterator iter) const;
1632 };
1633 
1640 {
1641 public:
1643  virtual ~PbbAddressBlockIpv6 ();
1644 
1645 protected:
1650  virtual uint8_t GetAddressLength (void) const;
1651  virtual void SerializeAddress (uint8_t *buffer, ConstAddressIterator iter) const;
1652  virtual Address DeserializeAddress (uint8_t *buffer) const;
1653  virtual void PrintAddress (std::ostream &os, ConstAddressIterator iter) const;
1654 };
1655 
1659 class PbbTlv : public SimpleRefCount<PbbTlv>
1660 {
1661 public:
1662  PbbTlv (void);
1663  virtual ~PbbTlv (void);
1664 
1669  void SetType (uint8_t type);
1670 
1674  uint8_t GetType (void) const;
1675 
1683  void SetTypeExt (uint8_t type);
1684 
1691  uint8_t GetTypeExt (void) const;
1692 
1700  bool HasTypeExt (void) const;
1701 
1709  void SetValue (Buffer start);
1710 
1719  void SetValue (const uint8_t * buffer, uint32_t size);
1720 
1727  Buffer GetValue (void) const;
1728 
1736  bool HasValue (void) const;
1737 
1741  uint32_t GetSerializedSize (void) const;
1742 
1750  void Serialize (Buffer::Iterator &start) const;
1751 
1760 
1765  void Print (std::ostream &os) const;
1766 
1775  void Print (std::ostream &os, int level) const;
1776 
1782  bool operator== (const PbbTlv &other) const;
1783 
1789  bool operator!= (const PbbTlv &other) const;
1790 
1791 protected:
1796  void SetIndexStart (uint8_t index);
1801  uint8_t GetIndexStart (void) const;
1806  bool HasIndexStart (void) const;
1807 
1812  void SetIndexStop (uint8_t index);
1817  uint8_t GetIndexStop (void) const;
1822  bool HasIndexStop (void) const;
1823 
1828  void SetMultivalue (bool isMultivalue);
1833  bool IsMultivalue (void) const;
1834 
1835 private:
1836  uint8_t m_type;
1837 
1839  uint8_t m_typeExt;
1840 
1842  uint8_t m_indexStart;
1843 
1845  uint8_t m_indexStop;
1846 
1848  bool m_hasValue;
1850 };
1851 
1855 class PbbAddressTlv : public PbbTlv
1856 {
1857 public:
1863  void SetIndexStart (uint8_t index);
1864 
1872  uint8_t GetIndexStart (void) const;
1873 
1881  bool HasIndexStart (void) const;
1882 
1888  void SetIndexStop (uint8_t index);
1889 
1897  uint8_t GetIndexStop (void) const;
1898 
1906  bool HasIndexStop (void) const;
1907 
1916  void SetMultivalue (bool isMultivalue);
1917 
1922  bool IsMultivalue (void) const;
1923 };
1924 
1925 } /* namespace ns3 */
1926 
1927 #endif /* PACKETBB_H */
virtual void SerializeOriginatorAddress(Buffer::Iterator &start) const
Serialize the originator address.
Definition: packetbb.cc:1744
bool operator==(const PbbAddressTlvBlock &other) const
Equality operator for PbbAddressTlvBlock.
Definition: packetbb.cc:517
bool m_hasOriginatorAddress
Originator address present.
Definition: packetbb.h:1109
bool operator!=(const PbbTlvBlock &other) const
Inequality operator for PbbTlvBlock.
Definition: packetbb.cc:297
PrefixIterator PrefixEnd(void)
Definition: packetbb.cc:1973
bool HasSequenceNumber(void) const
Tests whether or not this message has a sequence number.
Definition: packetbb.cc:1149
AddressBlockIterator AddressBlockEnd()
Definition: packetbb.cc:1293
bool m_hasHopCount
Hop count present.
Definition: packetbb.h:1115
virtual void SerializeOriginatorAddress(Buffer::Iterator &start) const
Serialize the originator address.
Definition: packetbb.cc:1800
void TlvPushBack(Ptr< PbbTlv > tlv)
Appends a packet TLV to the back of this packet.
Definition: packetbb.cc:676
void AddressBlockPushBack(Ptr< PbbAddressBlock > block)
Appends an address block to the front of this message.
Definition: packetbb.cc:1363
TlvIterator TlvBegin(void)
Definition: packetbb.cc:592
virtual uint8_t GetAddressLength(void) const
Returns address length.
Definition: packetbb.cc:2579
std::list< Ptr< PbbTlv > >::iterator Iterator
PbbTlv container iterator.
Definition: packetbb.h:59
bool operator!=(const PbbAddressBlock &other) const
Inequality operator for PbbAddressBlock.
Definition: packetbb.cc:2460
bool m_hasIndexStart
Start index present.
Definition: packetbb.h:1841
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
uint8_t PrefixBack(void) const
Definition: packetbb.cc:2008
void MessagePushFront(Ptr< PbbMessage > message)
Prepends a message to the front of this packet.
Definition: packetbb.cc:783
Ptr< PbbMessage > MessageBack(void)
Definition: packetbb.cc:769
A packet or message TLV.
Definition: packetbb.h:1659
bool operator==(const PbbTlvBlock &other) const
Equality operator for PbbTlvBlock.
Definition: packetbb.cc:276
std::list< Ptr< PbbMessage > >::const_iterator ConstMessageIterator
PbbMessage Const Iterator for PbbPacket.
Definition: packetbb.h:399
void PushFront(Ptr< PbbTlv > tlv)
Prepends a TLV to the front of this block.
Definition: packetbb.cc:132
int AddressSize(void) const
Definition: packetbb.cc:1879
int TlvSize(void) const
Definition: packetbb.cc:1186
virtual Ptr< PbbAddressBlock > AddressBlockDeserialize(Buffer::Iterator &start) const
Deserialize an address block.
Definition: packetbb.cc:1828
Buffer GetValue(void) const
Definition: packetbb.cc:2779
Address AddressFront(void) const
Definition: packetbb.cc:1893
Main PacketBB Packet object.
Definition: packetbb.h:389
void Serialize(Buffer::Iterator &start) const
Serializes this block into the specified buffer.
Definition: packetbb.cc:205
void MessagePushBack(Ptr< PbbMessage > message)
Appends a message to the back of this packet.
Definition: packetbb.cc:797
void PopFront(void)
Removes an AddressTLV from the front of this block.
Definition: packetbb.cc:380
bool HasHopCount(void) const
Tests whether or not this message has a hop count.
Definition: packetbb.cc:1126
virtual ~PbbMessageIpv6()
Definition: packetbb.cc:1787
virtual ~PbbAddressBlockIpv6()
Definition: packetbb.cc:2613
void Print(std::ostream &os) const
Pretty-prints the contents of this TLV.
Definition: packetbb.cc:2934
Concrete IPv4 specific PbbAddressBlock.
Definition: packetbb.h:1617
void PushFront(Ptr< PbbAddressTlv > tlv)
Prepends an Address TLV to the front of this block.
Definition: packetbb.cc:373
void SetSequenceNumber(uint16_t number)
Sets the sequence number of this packet.
Definition: packetbb.cc:567
Ptr< PbbAddressTlv > Front(void) const
Definition: packetbb.cc:359
bool PrefixEmpty(void) const
Definition: packetbb.cc:1994
void SetIndexStop(uint8_t index)
Set an index as stop point.
Definition: packetbb.cc:2725
virtual Address DeserializeOriginatorAddress(Buffer::Iterator &start) const =0
Deserialize the originator address.
automatically resized byte buffer
Definition: buffer.h:92
def start()
Definition: core.py:1844
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: packetbb.cc:849
void AddressBlockPopBack(void)
Removes an address block from the back of this message.
Definition: packetbb.cc:1370
void SetIndexStop(uint8_t index)
Sets the index of the last address in the associated address block that this address TLV applies to...
Definition: packetbb.cc:3053
virtual void PrintAddress(std::ostream &os, ConstAddressIterator iter) const
Print one or more addresses.
Definition: packetbb.cc:2600
TlvIterator TlvEnd()
Definition: packetbb.cc:1172
Ptr< PbbTlv > Back(void) const
Definition: packetbb.cc:125
Address GetOriginatorAddress(void) const
Definition: packetbb.cc:1072
virtual uint8_t GetAddressLength(void) const
Returns address length.
Definition: packetbb.cc:2619
void TlvPushFront(Ptr< PbbTlv > tlv)
Prepends a packet TLV to the front of this packet.
Definition: packetbb.cc:662
PbbAddressLength
Used in Messages to determine whether it contains IPv4 or IPv6 addresses.
Definition: packetbb.h:45
std::list< Address > m_addressList
Addresses container.
Definition: packetbb.h:1607
Ptr< PbbAddressBlock > AddressBlockBack(void)
Definition: packetbb.cc:1335
void PrefixPopBack(void)
Removes a prefix from the back of this block.
Definition: packetbb.cc:2036
TlvIterator TlvInsert(TlvIterator position, const Ptr< PbbTlv > value)
Inserts an address TLV at the specified position in this block.
bool TlvEmpty(void) const
Definition: packetbb.cc:627
AddressIterator AddressEnd(void)
Definition: packetbb.cc:1865
void SetMultivalue(bool isMultivalue)
Sets whether or not this address TLV is "multivalue".
Definition: packetbb.cc:3074
A message within a PbbPacket packet.
Definition: packetbb.h:695
void MessageClear(void)
Removes all messages from this packet.
Definition: packetbb.cc:826
void PushBack(Ptr< PbbTlv > tlv)
Appends a TLV to the back of this block.
Definition: packetbb.cc:146
int AddressBlockSize(void) const
Definition: packetbb.cc:1307
virtual void SerializeAddress(uint8_t *buffer, ConstAddressIterator iter) const
Serialize one or more addresses.
Definition: packetbb.cc:2586
TlvIterator TlvBegin()
Definition: packetbb.cc:1158
std::list< Ptr< PbbTlv > >::const_iterator ConstIterator
PbbTlv container const iterator.
Definition: packetbb.h:61
int PrefixSize(void) const
Definition: packetbb.cc:1987
int TlvSize(void) const
Definition: packetbb.cc:2101
uint8_t GetHopCount(void) const
Definition: packetbb.cc:1118
bool AddressBlockEmpty(void) const
Definition: packetbb.cc:1314
uint8_t m_type
Type of this TLV.
Definition: packetbb.h:1836
uint32_t GetSerializedSize(void) const
Definition: packetbb.cc:433
std::list< Ptr< PbbAddressBlock > >::const_iterator ConstAddressBlockIterator
PbbAddressBlock const iterator.
Definition: packetbb.h:705
uint8_t GetIndexStart(void) const
Get the starting point index.
Definition: packetbb.cc:2710
void SetMultivalue(bool isMultivalue)
Set the multivalue parameter.
Definition: packetbb.cc:2748
void MessagePopFront(void)
Removes a message from the front of this packet.
Definition: packetbb.cc:790
void SetSequenceNumber(uint16_t seqnum)
Sets the sequence number of this message.
Definition: packetbb.cc:1133
uint32_t GetSerializedSize(void) const
Definition: packetbb.cc:2794
void TlvPopBack(void)
Removes a message TLV from the back of this message.
Definition: packetbb.cc:1249
uint8_t PrefixFront(void) const
Definition: packetbb.cc:2001
std::list< Ptr< PbbMessage > >::iterator MessageIterator
PbbMessage Iterator for PbbPacket.
Definition: packetbb.h:397
Ptr< PbbAddressTlv > TlvFront(void)
Definition: packetbb.cc:2115
uint8_t m_type
the type for this message
Definition: packetbb.h:1106
std::list< uint8_t > m_prefixList
Prefixes container.
Definition: packetbb.h:1608
bool HasIndexStart(void) const
Checks if there is a starting index.
Definition: packetbb.cc:2718
std::list< Ptr< PbbAddressBlock > >::iterator AddressBlockIterator
PbbAddressBlock iterator.
Definition: packetbb.h:703
Ptr< PbbTlv > TlvBack(void)
Definition: packetbb.cc:648
iterator in a Buffer instance
Definition: buffer.h:98
a polymophic address class
Definition: address.h:90
virtual void PrintOriginatorAddress(std::ostream &os) const
Print the originator address.
Definition: packetbb.cc:1765
bool m_hasSequenceNumber
Sequence number present.
Definition: packetbb.h:1118
MessageIterator MessageEnd(void)
Definition: packetbb.cc:727
bool HasOriginatorAddress(void) const
Tests whether or not this message has an originator address.
Definition: packetbb.cc:1080
uint16_t m_sequenceNumber
Sequence number.
Definition: packetbb.h:1119
AddressBlockIterator AddressBlockBegin()
Definition: packetbb.cc:1279
uint8_t m_version
version
Definition: packetbb.h:682
virtual ~PbbTlv(void)
Definition: packetbb.cc:2658
virtual Address DeserializeAddress(uint8_t *buffer) const =0
Deserialize one address.
void SetType(uint8_t type)
Sets the type of this TLV.
Definition: packetbb.cc:2665
void PopBack(void)
Removes an Address TLV from the back of this block.
Definition: packetbb.cc:394
void Serialize(Buffer::Iterator &start) const
Serializes this address block into the specified buffer.
Definition: packetbb.cc:2240
uint16_t GetSequenceNumber(void) const
Definition: packetbb.cc:575
bool operator==(const PbbPacket &other) const
Equality operator for PbbPacket.
Definition: packetbb.cc:976
bool operator!=(const PbbAddressTlvBlock &other) const
Inequality operator for PbbAddressTlvBlock.
Definition: packetbb.cc:538
void Print(std::ostream &os) const
Pretty-prints the contents of this message.
Definition: packetbb.cc:1576
void AddressBlockClear(void)
Removes all address blocks from this message.
Definition: packetbb.cc:1392
uint8_t GetIndexStop(void) const
Definition: packetbb.cc:3060
Concrete IPv4 specific PbbMessage.
Definition: packetbb.h:1127
void TlvPushFront(Ptr< PbbAddressTlv > address)
Prepends an address TLV to the front of this message.
Definition: packetbb.cc:2143
virtual void Serialize(Buffer::Iterator start) const
Serializes this packet into the specified buffer.
Definition: packetbb.cc:882
int MessageSize(void) const
Definition: packetbb.cc:741
std::list< Address >::const_iterator ConstAddressIterator
Address const iterator.
Definition: packetbb.h:1190
Iterator Erase(Iterator position)
Removes the Address TLV at the specified position.
Definition: packetbb.cc:408
Address AddressBack(void) const
Definition: packetbb.cc:1900
bool MessageEmpty(void) const
Definition: packetbb.cc:748
void AddressPopFront(void)
Removes an address from the front of this block.
Definition: packetbb.cc:1914
TlvIterator TlvBegin(void)
Definition: packetbb.cc:2073
PbbTlvBlock(void)
Definition: packetbb.cc:63
std::list< Address >::iterator AddressIterator
Address iterator.
Definition: packetbb.h:1188
TlvIterator Erase(TlvIterator position)
Removes the packet TLV at the specified position.
Definition: packetbb.cc:690
void SetIndexStart(uint8_t index)
Sets the index of the first address in the associated address block that this address TLV applies to...
Definition: packetbb.cc:3032
Ptr< PbbAddressTlv > TlvBack(void)
Definition: packetbb.cc:2129
bool Empty(void) const
Definition: packetbb.cc:352
bool HasIndexStop(void) const
Tests whether or not this address TLV has a stop index.
Definition: packetbb.cc:3067
bool m_hasHopLimit
Hop limit present.
Definition: packetbb.h:1112
bool m_isMultivalue
Is multivalue.
Definition: packetbb.h:1847
void PushBack(Ptr< PbbAddressTlv > tlv)
Appends an Address TLV to the back of this block.
Definition: packetbb.cc:387
void SetType(uint8_t type)
Sets the type for this message.
Definition: packetbb.cc:1043
std::list< Ptr< PbbTlv > >::iterator TlvIterator
PbbTlv iterator for PbbPacket.
Definition: packetbb.h:393
void TlvPopBack(void)
Removes an address TLV from the back of this message.
Definition: packetbb.cc:2164
void Print(std::ostream &os) const
Pretty-prints the contents of this block.
Definition: packetbb.cc:246
uint8_t GetIndexStop(void) const
Get the stop point index.
Definition: packetbb.cc:2733
uint8_t m_hopCount
Hop count.
Definition: packetbb.h:1116
void GetHeadTail(uint8_t *head, uint8_t &headlen, uint8_t *tail, uint8_t &taillen) const
Get head and tail.
Definition: packetbb.cc:2487
void AddressPushBack(Address address)
Appends an address to the back of this block.
Definition: packetbb.cc:1921
~PbbPacket(void)
Definition: packetbb.cc:553
void TlvClear(void)
Removes all message TLVs from this block.
Definition: packetbb.cc:1270
Ptr< PbbAddressBlock > AddressBlockFront(void)
Definition: packetbb.cc:1321
int TlvSize(void) const
Definition: packetbb.cc:620
TlvIterator TlvEnd(void)
Definition: packetbb.cc:2087
PbbAddressLength m_addrSize
the address size
Definition: packetbb.h:1107
std::list< uint8_t >::const_iterator ConstPrefixIterator
Prefix const iterator.
Definition: packetbb.h:1195
bool m_hasValue
Has value.
Definition: packetbb.h:1848
bool TlvEmpty(void) const
Definition: packetbb.cc:2108
virtual void PrintAddress(std::ostream &os, ConstAddressIterator iter) const =0
Print one or more addresses.
uint8_t m_typeExt
Extended type.
Definition: packetbb.h:1839
void Deserialize(Buffer::Iterator &start)
Deserializes a block from the specified buffer.
Definition: packetbb.cc:469
std::list< Ptr< PbbTlv > >::iterator TlvIterator
PbbTlv iterator.
Definition: packetbb.h:699
void Print(std::ostream &os) const
Pretty-prints the contents of this block.
Definition: packetbb.cc:487
void Deserialize(Buffer::Iterator &start)
Deserializes a block from the specified buffer.
Definition: packetbb.cc:228
virtual Ptr< PbbAddressBlock > AddressBlockDeserialize(Buffer::Iterator &start) const =0
Deserialize an address block.
int Size(void) const
Definition: packetbb.cc:345
uint8_t GetTypeExt(void) const
Definition: packetbb.cc:2687
void Print(std::ostream &os) const
Pretty-prints the contents of this address block.
Definition: packetbb.cc:2378
~PbbTlvBlock(void)
Definition: packetbb.cc:69
void Deserialize(Buffer::Iterator &start)
Deserializes a message from the specified buffer.
Definition: packetbb.cc:1534
void TlvPopFront(void)
Removes a message TLV from the front of this message.
Definition: packetbb.cc:1235
bool operator==(const PbbAddressBlock &other) const
Equality operator for PbbAddressBlock.
Definition: packetbb.cc:2417
virtual void SerializeAddress(uint8_t *buffer, ConstAddressIterator iter) const =0
Serialize one or more addresses.
bool HasValue(void) const
Tests whether or not this TLV has a value.
Definition: packetbb.cc:2787
virtual ~PbbAddressBlock()
Definition: packetbb.cc:1843
virtual Address DeserializeOriginatorAddress(Buffer::Iterator &start) const
Deserialize the originator address.
Definition: packetbb.cc:1754
int Size(void) const
Definition: packetbb.cc:104
void Serialize(Buffer::Iterator &start) const
Serializes this message into the specified buffer.
Definition: packetbb.cc:1444
void Deserialize(Buffer::Iterator &start)
Deserializes a TLV from the specified buffer.
Definition: packetbb.cc:2889
void TlvPopBack(void)
Removes a packet TLV from the back of this block.
Definition: packetbb.cc:683
void SetHopLimit(uint8_t hoplimit)
Sets the maximum number of hops this message should travel.
Definition: packetbb.cc:1087
Concrete IPv6 specific PbbAddressBlock.
Definition: packetbb.h:1639
void PrefixPushFront(uint8_t prefix)
Prepends a prefix to the front of this block.
Definition: packetbb.cc:2015
bool operator!=(const PbbMessage &other) const
Inequality operator for PbbMessage.
Definition: packetbb.cc:1719
std::list< Ptr< PbbAddressTlv > >::iterator Iterator
PbbAddressTlv iterator for PbbAddressTlvBlock.
Definition: packetbb.h:223
Buffer m_value
Value.
Definition: packetbb.h:1849
bool IsMultivalue(void) const
Check the multivalue parameter.
Definition: packetbb.cc:2755
PbbAddressTlvBlock::Iterator TlvIterator
tlvblock iterator
Definition: packetbb.h:1198
AddressBlockIterator AddressBlockErase(AddressBlockIterator position)
Removes the address block at the specified position.
Definition: packetbb.cc:1377
bool HasHopLimit(void) const
Tests whether or not this message has a hop limit.
Definition: packetbb.cc:1103
Every class exported by the ns3 library is enclosed in the ns3 namespace.
address
Definition: first.py:37
PbbAddressTlvBlock m_addressTlvList
PbbAddressTlv container.
Definition: packetbb.h:1609
virtual ~PbbMessageIpv4()
Definition: packetbb.cc:1731
void TlvClear(void)
Removes all address TLVs from this block.
Definition: packetbb.cc:2186
bool HasSequenceNumber(void) const
Tests whether or not this packet has a sequence number.
Definition: packetbb.cc:583
bool operator!=(const PbbPacket &other) const
Inequality operator for PbbPacket.
Definition: packetbb.cc:1018
void PrefixPushBack(uint8_t prefix)
Appends a prefix to the back of this block.
Definition: packetbb.cc:2029
bool m_hasIndexStop
Stop index present.
Definition: packetbb.h:1844
virtual Address DeserializeAddress(uint8_t *buffer) const
Deserialize one address.
Definition: packetbb.cc:2633
An Address TLV.
Definition: packetbb.h:1855
std::list< Ptr< PbbAddressTlv > > m_tlvList
PbbAddressTlv container.
Definition: packetbb.h:378
void AddressBlockPopFront(void)
Removes an address block from the front of this message.
Definition: packetbb.cc:1356
Address m_originatorAddress
originator address
Definition: packetbb.h:1110
A block of packet or message TLVs (PbbTlv).
Definition: packetbb.h:55
uint8_t m_indexStart
Start index.
Definition: packetbb.h:1842
uint8_t GetHopLimit(void) const
Definition: packetbb.cc:1095
virtual void Print(std::ostream &os) const
Pretty-prints the contents of this block.
Definition: packetbb.cc:951
std::list< Ptr< PbbMessage > > m_messageList
PbbTlvBlock container.
Definition: packetbb.h:680
virtual PbbAddressLength GetAddressLength(void) const
Returns address length (IPV4 3 or IPV6 15)
Definition: packetbb.cc:1793
bool AddressEmpty(void) const
Definition: packetbb.cc:1886
uint32_t GetSerializedSize(void) const
Definition: packetbb.cc:2192
void SetIndexStart(uint8_t index)
Set an index as starting point.
Definition: packetbb.cc:2702
PbbTlv(void)
Definition: packetbb.cc:2648
void TlvPushBack(Ptr< PbbAddressTlv > address)
Appends an address TLV to the back of this message.
Definition: packetbb.cc:2157
std::list< Ptr< PbbTlv > > m_tlvList
PbbTlv container.
Definition: packetbb.h:211
PbbTlvBlock m_tlvList
PbbTlv container.
Definition: packetbb.h:679
std::list< Ptr< PbbAddressBlock > > m_addressBlockList
PbbAddressBlock container.
Definition: packetbb.h:1104
virtual ~PbbMessage()
Definition: packetbb.cc:1036
bool m_hasTypeExt
Extended type present.
Definition: packetbb.h:1838
Iterator End(void)
Definition: packetbb.cc:90
A block of Address TLVs (PbbAddressTlv).
Definition: packetbb.h:219
bool HasIndexStart(void) const
Tests whether or not this address TLV has a start index.
Definition: packetbb.cc:3046
void PopBack(void)
Removes a TLV from the back of this block.
Definition: packetbb.cc:153
uint16_t GetSequenceNumber(void) const
Definition: packetbb.cc:1141
void TlvPopFront(void)
Removes a packet TLV from the front of this packet.
Definition: packetbb.cc:669
virtual void PrintAddress(std::ostream &os, ConstAddressIterator iter) const
Print one or more addresses.
Definition: packetbb.cc:2640
uint16_t m_seqnum
Sequence number.
Definition: packetbb.h:685
PbbAddressTlvBlock::ConstIterator ConstTlvIterator
tlvblock const iterator
Definition: packetbb.h:1200
virtual ~PbbAddressBlockIpv4()
Definition: packetbb.cc:2573
virtual void PrintOriginatorAddress(std::ostream &os) const =0
Print the originator address.
PrefixIterator PrefixInsert(PrefixIterator position, const uint8_t value)
Inserts a prefix at the specified position in this block.
Definition: packetbb.cc:2043
Ptr< PbbTlv > TlvBack(void)
Definition: packetbb.cc:1214
TlvIterator TlvErase(TlvIterator position)
Removes the message TLV at the specified position.
Definition: packetbb.cc:1256
void AddressBlockPushFront(Ptr< PbbAddressBlock > block)
Prepends an address block to the front of this message.
Definition: packetbb.cc:1349
virtual Address DeserializeAddress(uint8_t *buffer) const
Deserialize one address.
Definition: packetbb.cc:2593
uint8_t GetIndexStart(void) const
Definition: packetbb.cc:3039
void MessagePopBack(void)
Removes a message from the back of this packet.
Definition: packetbb.cc:804
Ptr< PbbTlv > TlvFront(void)
Definition: packetbb.cc:1200
Iterator Insert(Iterator position, const Ptr< PbbAddressTlv > tlv)
Inserts an Address TLV at the specified position in this block.
Definition: packetbb.cc:401
TlvIterator TlvEnd(void)
Definition: packetbb.cc:606
virtual PbbAddressLength GetAddressLength(void) const =0
Returns address length (IPV4 3 or IPV6 15)
Definition: packetbb.cc:1057
void SetTypeExt(uint8_t type)
Sets the type extension of this TLV.
Definition: packetbb.cc:2679
virtual Ptr< PbbAddressBlock > AddressBlockDeserialize(Buffer::Iterator &start) const
Deserialize an address block.
Definition: packetbb.cc:1772
bool TlvEmpty(void) const
Definition: packetbb.cc:1193
virtual uint32_t GetSerializedSize(void) const
Definition: packetbb.cc:855
uint32_t GetSerializedSize(void) const
Definition: packetbb.cc:1405
AddressIterator AddressBegin(void)
Definition: packetbb.cc:1851
void AddressClear(void)
Removes all addresses from this block.
Definition: packetbb.cc:1950
virtual void SerializeOriginatorAddress(Buffer::Iterator &start) const =0
Serialize the originator address.
void SetHopCount(uint8_t hopcount)
Sets the current number of hops this message has traveled.
Definition: packetbb.cc:1110
bool HasZeroTail(const uint8_t *tail, uint8_t taillen) const
Check if the tail is empty.
Definition: packetbb.cc:2552
virtual uint8_t GetAddressLength(void) const =0
Returns address length.
Ptr< PbbTlv > TlvFront(void)
Definition: packetbb.cc:634
uint8_t GetPrefixFlags(void) const
Get the prefix flags.
Definition: packetbb.cc:2466
Ptr< PbbAddressTlv > Back(void) const
Definition: packetbb.cc:366
void PrefixPopFront(void)
Removes a prefix from the front of this block.
Definition: packetbb.cc:2022
virtual Address DeserializeOriginatorAddress(Buffer::Iterator &start) const
Deserialize the originator address.
Definition: packetbb.cc:1810
PrefixIterator PrefixErase(PrefixIterator position)
Removes the prefix at the specified position.
Definition: packetbb.cc:2050
Iterator Begin(void)
Definition: packetbb.cc:76
void SetOriginatorAddress(Address address)
Sets the address for the node that created this packet.
Definition: packetbb.cc:1064
std::list< Ptr< PbbAddressTlv > >::const_iterator ConstIterator
PbbAddressTlv const iterator for PbbAddressTlvBlock.
Definition: packetbb.h:225
uint8_t m_hopLimit
Hop limit.
Definition: packetbb.h:1113
void Deserialize(Buffer::Iterator &start)
Deserializes an address block from the specified buffer.
Definition: packetbb.cc:2324
Iterator Insert(Iterator position, const Ptr< PbbTlv > tlv)
Inserts a TLV at the specified position in this block.
Definition: packetbb.cc:160
void Serialize(Buffer::Iterator &start) const
Serializes this block into the specified buffer.
Definition: packetbb.cc:446
void TlvPopFront(void)
Removes an address TLV from the front of this message.
Definition: packetbb.cc:2150
uint8_t GetType(void) const
Definition: packetbb.cc:2672
bool operator!=(const PbbTlv &other) const
Inequality operator for PbbTlv.
Definition: packetbb.cc:3024
void Serialize(Buffer::Iterator &start) const
Serializes this TLV into the specified buffer.
Definition: packetbb.cc:2832
bool HasTypeExt(void) const
Tests whether or not this TLV has a type extension.
Definition: packetbb.cc:2695
virtual void SerializeAddress(uint8_t *buffer, ConstAddressIterator iter) const
Serialize one or more addresses.
Definition: packetbb.cc:2626
uint32_t GetSerializedSize(void) const
Definition: packetbb.cc:192
uint8_t GetType(void) const
Definition: packetbb.cc:1050
void Clear(void)
Removes all Address TLVs from this block.
Definition: packetbb.cc:422
void SetValue(Buffer start)
Sets the value of this message to the specified buffer.
Definition: packetbb.cc:2762
Iterator Begin(void)
Definition: packetbb.cc:317
bool HasIndexStop(void) const
Checks if there is a stop index.
Definition: packetbb.cc:2741
PrefixIterator PrefixBegin(void)
Definition: packetbb.cc:1959
bool m_hasseqnum
Sequence number present.
Definition: packetbb.h:684
Ptr< PbbMessage > MessageFront(void)
Definition: packetbb.cc:755
void TlvPushFront(Ptr< PbbTlv > tlv)
Prepends a message TLV to the front of this message.
Definition: packetbb.cc:1228
PbbPacket(void)
Definition: packetbb.cc:546
MessageIterator MessageBegin(void)
Definition: packetbb.cc:713
void Clear(void)
Removes all TLVs from this block.
Definition: packetbb.cc:181
Iterator End(void)
Definition: packetbb.cc:331
std::list< uint8_t >::iterator PrefixIterator
Prefix iterator.
Definition: packetbb.h:1193
Definition: first.py:1
bool operator==(const PbbMessage &other) const
Equality operator for PbbMessage.
Definition: packetbb.cc:1631
AddressIterator AddressErase(AddressIterator position)
Removes the address at the specified position.
Definition: packetbb.cc:1935
void AddressPopBack(void)
Removes an address from the back of this block.
Definition: packetbb.cc:1928
bool IsMultivalue(void) const
Tests whether or not this address TLV is "multivalue".
Definition: packetbb.cc:3081
PbbTlvBlock m_tlvList
PbbTlvBlock.
Definition: packetbb.h:1103
Concrete IPv6 specific PbbMessage class.
Definition: packetbb.h:1155
uint8_t m_indexStop
Stop index.
Definition: packetbb.h:1845
A template-based reference counting class.
bool Empty(void) const
Definition: packetbb.cc:111
a unique identifier for an interface.
Definition: type-id.h:58
Ptr< PbbTlv > Front(void) const
Definition: packetbb.cc:118
std::list< Ptr< PbbTlv > >::const_iterator ConstTlvIterator
PbbTlv const iterator for PbbPacket.
Definition: packetbb.h:395
static Ptr< PbbMessage > DeserializeMessage(Buffer::Iterator &start)
Deserializes a message, returning the correct object depending on whether it is an IPv4 message or an...
Definition: packetbb.cc:1501
An Address Block and its associated Address TLV Blocks.
Definition: packetbb.h:1184
void TlvPushBack(Ptr< PbbTlv > tlv)
Appends a message TLV to the back of this message.
Definition: packetbb.cc:1242
std::list< Ptr< PbbTlv > >::const_iterator ConstTlvIterator
PbbTlv const iterator.
Definition: packetbb.h:701
AddressIterator AddressInsert(AddressIterator position, const Address value)
Inserts an address at the specified position in this block.
virtual void PrintOriginatorAddress(std::ostream &os) const
Print the originator address.
Definition: packetbb.cc:1821
static TypeId GetTypeId(void)
Get the type ID.
Definition: packetbb.cc:838
void AddressPushFront(Address address)
Prepends an address to the front of this block.
Definition: packetbb.cc:1907
void PrefixClear(void)
Removes all prefixes from this block.
Definition: packetbb.cc:2064
virtual PbbAddressLength GetAddressLength(void) const
Returns address length (IPV4 3 or IPV6 15)
Definition: packetbb.cc:1737
bool operator==(const PbbTlv &other) const
Equality operator for PbbTlv.
Definition: packetbb.cc:2979
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserializes a packet from the specified buffer.
Definition: packetbb.cc:917
void TlvClear(void)
Removes all packet TLVs from this packet.
Definition: packetbb.cc:704
TlvIterator TlvErase(TlvIterator position)
Removes the address TLV at the specified position.
Definition: packetbb.cc:2171
Iterator Erase(Iterator position)
Removes the TLV at the specified position.
Definition: packetbb.cc:167
void PopFront(void)
Removes a TLV from the front of this block.
Definition: packetbb.cc:139
uint8_t GetVersion(void) const
Definition: packetbb.cc:560