A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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;
1144  virtual Address DeserializeOriginatorAddress (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;
1172  virtual Address DeserializeOriginatorAddress (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 
1759  void Deserialize (Buffer::Iterator &start);
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 */
bool m_hasOriginatorAddress
Originator address present.
Definition: packetbb.h:1109
PrefixIterator PrefixEnd(void)
Definition: packetbb.cc:1972
AddressBlockIterator AddressBlockEnd()
Definition: packetbb.cc:1292
bool m_hasHopCount
Hop count present.
Definition: packetbb.h:1115
void Print(std::ostream &os) const
Pretty-prints the contents of this message.
Definition: packetbb.cc:1575
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:1362
TlvIterator TlvBegin(void)
Definition: packetbb.cc:592
std::list< Ptr< PbbTlv > >::iterator Iterator
PbbTlv container iterator.
Definition: packetbb.h:59
bool m_hasIndexStart
Start index present.
Definition: packetbb.h:1841
smart pointer class similar to boost::intrusive_ptr
Definition: ptr.h:60
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
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
uint16_t GetSequenceNumber(void) const
Definition: packetbb.cc:1140
int Size(void) const
Definition: packetbb.cc:104
Main PacketBB Packet object.
Definition: packetbb.h:389
virtual Address DeserializeOriginatorAddress(Buffer::Iterator &start) const
Deserialize the originator address.
Definition: packetbb.cc:1753
bool HasIndexStart(void) const
Checks if there is a starting index.
Definition: packetbb.cc:2717
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
uint32_t GetSerializedSize(void) const
Definition: packetbb.cc:2793
virtual ~PbbMessageIpv6()
Definition: packetbb.cc:1786
bool IsMultivalue(void) const
Check the multivalue parameter.
Definition: packetbb.cc:2754
virtual ~PbbAddressBlockIpv6()
Definition: packetbb.cc:2612
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
bool HasSequenceNumber(void) const
Tests whether or not this message has a sequence number.
Definition: packetbb.cc:1148
void SetIndexStop(uint8_t index)
Set an index as stop point.
Definition: packetbb.cc:2724
int TlvSize(void) const
Definition: packetbb.cc:2100
virtual Address DeserializeOriginatorAddress(Buffer::Iterator &start) const =0
Deserialize the originator address.
automatically resized byte buffer
Definition: buffer.h:92
int PrefixSize(void) const
Definition: packetbb.cc:1986
void AddressBlockPopBack(void)
Removes an address block from the back of this message.
Definition: packetbb.cc:1369
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:3052
TlvIterator TlvEnd()
Definition: packetbb.cc:1171
bool TlvEmpty(void) const
Definition: packetbb.cc:627
void TlvPushFront(Ptr< PbbTlv > tlv)
Prepends a packet TLV to the front of this packet.
Definition: packetbb.cc:662
virtual void SerializeOriginatorAddress(Buffer::Iterator &start) const
Serialize the originator address.
Definition: packetbb.cc:1743
PbbAddressLength
Used in Messages to determine whether it contains IPv4 or IPv6 addresses.
Definition: packetbb.h:45
std::list< Address > m_addressList
Addreses container.
Definition: packetbb.h:1607
Ptr< PbbAddressBlock > AddressBlockBack(void)
Definition: packetbb.cc:1334
void PrefixPopBack(void)
Removes a prefix from the back of this block.
Definition: packetbb.cc:2035
TlvIterator TlvInsert(TlvIterator position, const Ptr< PbbTlv > value)
Inserts an address TLV at the specified position in this block.
bool HasTypeExt(void) const
Tests whether or not this TLV has a type extension.
Definition: packetbb.cc:2694
AddressIterator AddressEnd(void)
Definition: packetbb.cc:1864
void SetMultivalue(bool isMultivalue)
Sets whether or not this address TLV is "multivalue".
Definition: packetbb.cc:3073
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
TlvIterator TlvBegin()
Definition: packetbb.cc:1157
std::list< Ptr< PbbTlv > >::const_iterator ConstIterator
PbbTlv container const iterator.
Definition: packetbb.h:61
Ptr< PbbAddressTlv > Back(void) const
Definition: packetbb.cc:366
bool operator!=(const PbbAddressBlock &other) const
Inequality operator for PbbAddressBlock.
Definition: packetbb.cc:2459
void Print(std::ostream &os) const
Pretty-prints the contents of this block.
Definition: packetbb.cc:487
uint8_t m_type
Type of this TLV.
Definition: packetbb.h:1836
bool HasIndexStart(void) const
Tests whether or not this address TLV has a start index.
Definition: packetbb.cc:3045
bool HasIndexStop(void) const
Tests whether or not this address TLV has a stop index.
Definition: packetbb.cc:3066
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:2709
void SetMultivalue(bool isMultivalue)
Set the multivalue parameter.
Definition: packetbb.cc:2747
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:1132
void TlvPopBack(void)
Removes a message TLV from the back of this message.
Definition: packetbb.cc:1248
uint8_t GetIndexStart(void) const
Definition: packetbb.cc:3038
std::list< Ptr< PbbMessage > >::iterator MessageIterator
PbbMessage Iterator for PbbPacket.
Definition: packetbb.h:397
Ptr< PbbAddressTlv > TlvFront(void)
Definition: packetbb.cc:2114
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
std::list< Ptr< PbbAddressBlock > >::iterator AddressBlockIterator
PbbAddressBlock iterator.
Definition: packetbb.h:703
bool IsMultivalue(void) const
Tests whether or not this address TLV is "multivalue".
Definition: packetbb.cc:3080
Ptr< PbbTlv > TlvBack(void)
Definition: packetbb.cc:648
iterator in a Buffer instance
Definition: buffer.h:98
a polymophic address class
Definition: address.h:86
virtual void PrintAddress(std::ostream &os, ConstAddressIterator iter) const
Print one or more addresses.
Definition: packetbb.cc:2639
bool m_hasSequenceNumber
Sequence number present.
Definition: packetbb.h:1118
MessageIterator MessageEnd(void)
Definition: packetbb.cc:727
uint16_t m_sequenceNumber
Sequence number.
Definition: packetbb.h:1119
AddressBlockIterator AddressBlockBegin()
Definition: packetbb.cc:1278
uint8_t m_version
version
Definition: packetbb.h:682
virtual ~PbbTlv(void)
Definition: packetbb.cc:2657
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:2664
void PopBack(void)
Removes an Address TLV from the back of this block.
Definition: packetbb.cc:394
bool TlvEmpty(void) const
Definition: packetbb.cc:2107
bool AddressEmpty(void) const
Definition: packetbb.cc:1885
void AddressBlockClear(void)
Removes all address blocks from this message.
Definition: packetbb.cc:1391
Address GetOriginatorAddress(void) const
Definition: packetbb.cc:1071
uint8_t GetTypeExt(void) const
Definition: packetbb.cc:2686
virtual PbbAddressLength GetAddressLength(void) const
Returns address length (IPV4 3 or IPV6 15)
Definition: packetbb.cc:1792
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:2142
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
virtual void SerializeAddress(uint8_t *buffer, ConstAddressIterator iter) const
Serialize one or more addresses.
Definition: packetbb.cc:2585
bool operator!=(const PbbTlv &other) const
Inequality operator for PbbTlv.
Definition: packetbb.cc:3023
void AddressPopFront(void)
Removes an address from the front of this block.
Definition: packetbb.cc:1913
TlvIterator TlvBegin(void)
Definition: packetbb.cc:2072
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
bool operator==(const PbbMessage &other) const
Equality operator for PbbMessage.
Definition: packetbb.cc:1630
virtual void PrintAddress(std::ostream &os, ConstAddressIterator iter) const
Print one or more addresses.
Definition: packetbb.cc:2599
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:3031
bool operator!=(const PbbPacket &other) const
Inequality operator for PbbPacket.
Definition: packetbb.cc:1017
Ptr< PbbAddressTlv > TlvBack(void)
Definition: packetbb.cc:2128
uint8_t GetVersion(void) const
Definition: packetbb.cc:560
virtual uint8_t GetAddressLength(void) const
Returns address length.
Definition: packetbb.cc:2578
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:1042
std::list< Ptr< PbbTlv > >::iterator TlvIterator
PbbTlv iterator for PbbPacket.
Definition: packetbb.h:393
void Serialize(Buffer::Iterator &start) const
Serializes this message into the specified buffer.
Definition: packetbb.cc:1443
void TlvPopBack(void)
Removes an address TLV from the back of this message.
Definition: packetbb.cc:2163
uint8_t m_hopCount
Hop count.
Definition: packetbb.h:1116
virtual Ptr< PbbAddressBlock > AddressBlockDeserialize(Buffer::Iterator &start) const
Deserialize an address block.
Definition: packetbb.cc:1827
uint16_t GetSequenceNumber(void) const
Definition: packetbb.cc:575
int MessageSize(void) const
Definition: packetbb.cc:741
void AddressPushBack(Address address)
Appends an address to the back of this block.
Definition: packetbb.cc:1920
Address AddressFront(void) const
Definition: packetbb.cc:1892
~PbbPacket(void)
Definition: packetbb.cc:553
void TlvClear(void)
Removes all message TLVs from this block.
Definition: packetbb.cc:1269
Ptr< PbbAddressBlock > AddressBlockFront(void)
Definition: packetbb.cc:1320
bool TlvEmpty(void) const
Definition: packetbb.cc:1192
TlvIterator TlvEnd(void)
Definition: packetbb.cc:2086
uint8_t PrefixBack(void) const
Definition: packetbb.cc:2007
PbbAddressLength m_addrSize
the address size
Definition: packetbb.h:1107
Ptr< PbbTlv > Front(void) const
Definition: packetbb.cc:118
bool operator==(const PbbTlvBlock &other) const
Equality operator for PbbTlvBlock.
Definition: packetbb.cc:276
std::list< uint8_t >::const_iterator ConstPrefixIterator
Prefix const iterator.
Definition: packetbb.h:1195
bool HasHopCount(void) const
Tests whether or not this message has a hop count.
Definition: packetbb.cc:1125
bool m_hasValue
Has value.
Definition: packetbb.h:1848
virtual void PrintAddress(std::ostream &os, ConstAddressIterator iter) const =0
Print one or more addresses.
uint8_t GetType(void) const
Definition: packetbb.cc:2671
bool Empty(void) const
Definition: packetbb.cc:352
uint8_t m_typeExt
Extended type.
Definition: packetbb.h:1839
Ptr< PbbTlv > Back(void) const
Definition: packetbb.cc:125
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
uint32_t GetSerializedSize(void) const
Definition: packetbb.cc:192
int AddressBlockSize(void) const
Definition: packetbb.cc:1306
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.
virtual uint32_t GetSerializedSize(void) const
Definition: packetbb.cc:854
virtual PbbAddressLength GetAddressLength(void) const
Returns address length (IPV4 3 or IPV6 15)
Definition: packetbb.cc:1736
~PbbTlvBlock(void)
Definition: packetbb.cc:69
void Deserialize(Buffer::Iterator &start)
Deserializes a message from the specified buffer.
Definition: packetbb.cc:1533
void TlvPopFront(void)
Removes a message TLV from the front of this message.
Definition: packetbb.cc:1234
bool HasValue(void) const
Tests whether or not this TLV has a value.
Definition: packetbb.cc:2786
virtual void SerializeOriginatorAddress(Buffer::Iterator &start) const
Serialize the originator address.
Definition: packetbb.cc:1799
virtual void SerializeAddress(uint8_t *buffer, ConstAddressIterator iter) const =0
Serialize one or more addresses.
virtual ~PbbAddressBlock()
Definition: packetbb.cc:1842
void Deserialize(Buffer::Iterator &start)
Deserializes a TLV from the specified buffer.
Definition: packetbb.cc:2888
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:1086
bool HasOriginatorAddress(void) const
Tests whether or not this message has an originator address.
Definition: packetbb.cc:1079
Concrete IPv6 specific PbbAddressBlock.
Definition: packetbb.h:1639
uint8_t PrefixFront(void) const
Definition: packetbb.cc:2000
void PrefixPushFront(uint8_t prefix)
Prepends a prefix to the front of this block.
Definition: packetbb.cc:2014
std::list< Ptr< PbbAddressTlv > >::iterator Iterator
PbbAddressTlv iterator for PbbAddressTlvBlock.
Definition: packetbb.h:223
Buffer m_value
Value.
Definition: packetbb.h:1849
PbbAddressTlvBlock::Iterator TlvIterator
tlvblock iterator
Definition: packetbb.h:1198
bool HasHopLimit(void) const
Tests whether or not this message has a hop limit.
Definition: packetbb.cc:1102
AddressBlockIterator AddressBlockErase(AddressBlockIterator position)
Removes the address block at the specified position.
Definition: packetbb.cc:1376
void Serialize(Buffer::Iterator &start) const
Serializes this address block into the specified buffer.
Definition: packetbb.cc:2239
void Print(std::ostream &os) const
Pretty-prints the contents of this TLV.
Definition: packetbb.cc:2933
int Size(void) const
Definition: packetbb.cc:345
virtual void PrintOriginatorAddress(std::ostream &os) const
Print the originator address.
Definition: packetbb.cc:1764
void Print(std::ostream &os) const
Pretty-prints the contents of this address block.
Definition: packetbb.cc:2377
int TlvSize(void) const
Definition: packetbb.cc:620
PbbAddressTlvBlock m_addressTlvList
PbbAddressTlv container.
Definition: packetbb.h:1609
virtual ~PbbMessageIpv4()
Definition: packetbb.cc:1730
void TlvClear(void)
Removes all address TLVs from this block.
Definition: packetbb.cc:2185
bool operator==(const PbbPacket &other) const
Equality operator for PbbPacket.
Definition: packetbb.cc:975
uint32_t GetSerializedSize(void) const
Definition: packetbb.cc:433
void PrefixPushBack(uint8_t prefix)
Appends a prefix to the back of this block.
Definition: packetbb.cc:2028
bool m_hasIndexStop
Stop index present.
Definition: packetbb.h:1844
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:1355
bool operator!=(const PbbTlvBlock &other) const
Inequality operator for PbbTlvBlock.
Definition: packetbb.cc:297
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 GetType(void) const
Definition: packetbb.cc:1049
bool MessageEmpty(void) const
Definition: packetbb.cc:748
uint8_t GetIndexStop(void) const
Definition: packetbb.cc:3059
std::list< Ptr< PbbMessage > > m_messageList
PbbTlvBlock container.
Definition: packetbb.h:680
void Print(std::ostream &os) const
Pretty-prints the contents of this block.
Definition: packetbb.cc:246
void SetIndexStart(uint8_t index)
Set an index as starting point.
Definition: packetbb.cc:2701
PbbTlv(void)
Definition: packetbb.cc:2647
void TlvPushBack(Ptr< PbbAddressTlv > address)
Appends an address TLV to the back of this message.
Definition: packetbb.cc:2156
std::list< Ptr< PbbTlv > > m_tlvList
PbbTlv container.
Definition: packetbb.h:211
PbbTlvBlock m_tlvList
PbbTlv container.
Definition: packetbb.h:679
int AddressSize(void) const
Definition: packetbb.cc:1878
std::list< Ptr< PbbAddressBlock > > m_addressBlockList
PbbAddressBlock container.
Definition: packetbb.h:1104
bool Empty(void) const
Definition: packetbb.cc:111
virtual ~PbbMessage()
Definition: packetbb.cc:1035
bool m_hasTypeExt
Extended type present.
Definition: packetbb.h:1838
Iterator End(void)
Definition: packetbb.cc:90
bool operator!=(const PbbAddressTlvBlock &other) const
Inequality operator for PbbAddressTlvBlock.
Definition: packetbb.cc:538
A block of Address TLVs (PbbAddressTlv).
Definition: packetbb.h:219
uint8_t GetHopCount(void) const
Definition: packetbb.cc:1117
bool HasSequenceNumber(void) const
Tests whether or not this packet has a sequence number.
Definition: packetbb.cc:583
void PopBack(void)
Removes a TLV from the back of this block.
Definition: packetbb.cc:153
void TlvPopFront(void)
Removes a packet TLV from the front of this packet.
Definition: packetbb.cc:669
bool operator==(const PbbTlv &other) const
Equality operator for PbbTlv.
Definition: packetbb.cc:2978
uint8_t GetHopLimit(void) const
Definition: packetbb.cc:1094
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:2572
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:2042
Ptr< PbbTlv > TlvBack(void)
Definition: packetbb.cc:1213
TlvIterator TlvErase(TlvIterator position)
Removes the message TLV at the specified position.
Definition: packetbb.cc:1255
uint32_t GetSerializedSize(void) const
Definition: packetbb.cc:1404
void AddressBlockPushFront(Ptr< PbbAddressBlock > block)
Prepends an address block to the front of this message.
Definition: packetbb.cc:1348
void MessagePopBack(void)
Removes a message from the back of this packet.
Definition: packetbb.cc:804
Ptr< PbbTlv > TlvFront(void)
Definition: packetbb.cc:1199
virtual void SerializeAddress(uint8_t *buffer, ConstAddressIterator iter) const
Serialize one or more addresses.
Definition: packetbb.cc:2625
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:1056
void SetTypeExt(uint8_t type)
Sets the type extension of this TLV.
Definition: packetbb.cc:2678
AddressIterator AddressBegin(void)
Definition: packetbb.cc:1850
int TlvSize(void) const
Definition: packetbb.cc:1185
void AddressClear(void)
Removes all addresses from this block.
Definition: packetbb.cc:1949
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:1109
virtual uint8_t GetAddressLength(void) const =0
Returns address length.
Ptr< PbbTlv > TlvFront(void)
Definition: packetbb.cc:634
bool operator!=(const PbbMessage &other) const
Inequality operator for PbbMessage.
Definition: packetbb.cc:1718
void PrefixPopFront(void)
Removes a prefix from the front of this block.
Definition: packetbb.cc:2021
Address AddressBack(void) const
Definition: packetbb.cc:1899
PrefixIterator PrefixErase(PrefixIterator position)
Removes the prefix at the specified position.
Definition: packetbb.cc:2049
void Serialize(Buffer::Iterator &start) const
Serializes this block into the specified buffer.
Definition: packetbb.cc:205
Iterator Begin(void)
Definition: packetbb.cc:76
void SetOriginatorAddress(Address address)
Sets the address for the node that created this packet.
Definition: packetbb.cc:1063
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
uint32_t GetSerializedSize(void) const
Definition: packetbb.cc:2191
void Deserialize(Buffer::Iterator &start)
Deserializes an address block from the specified buffer.
Definition: packetbb.cc:2323
Iterator Insert(Iterator position, const Ptr< PbbTlv > tlv)
Inserts a TLV at the specified position in this block.
Definition: packetbb.cc:160
void TlvPopFront(void)
Removes an address TLV from the front of this message.
Definition: packetbb.cc:2149
virtual Address DeserializeOriginatorAddress(Buffer::Iterator &start) const
Deserialize the originator address.
Definition: packetbb.cc:1809
uint8_t GetPrefixFlags(void) const
Get the prefix flags.
Definition: packetbb.cc:2465
bool HasZeroTail(const uint8_t *tail, uint8_t taillen) const
Check if the tail is empty.
Definition: packetbb.cc:2551
Buffer GetValue(void) const
Definition: packetbb.cc:2778
uint8_t GetIndexStop(void) const
Get the stop point index.
Definition: packetbb.cc:2732
tuple address
Definition: first.py:37
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:2761
Iterator Begin(void)
Definition: packetbb.cc:317
PrefixIterator PrefixBegin(void)
Definition: packetbb.cc:1958
virtual void Print(std::ostream &os) const
Pretty-prints the contents of this block.
Definition: packetbb.cc:950
bool m_hasseqnum
Sequence number present.
Definition: packetbb.h:684
Ptr< PbbMessage > MessageFront(void)
Definition: packetbb.cc:755
virtual Ptr< PbbAddressBlock > AddressBlockDeserialize(Buffer::Iterator &start) const
Deserialize an address block.
Definition: packetbb.cc:1771
void TlvPushFront(Ptr< PbbTlv > tlv)
Prepends a message TLV to the front of this message.
Definition: packetbb.cc:1227
PbbPacket(void)
Definition: packetbb.cc:546
MessageIterator MessageBegin(void)
Definition: packetbb.cc:713
bool HasIndexStop(void) const
Checks if there is a stop index.
Definition: packetbb.cc:2740
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
virtual Address DeserializeAddress(uint8_t *buffer) const
Deserialize one address.
Definition: packetbb.cc:2592
AddressIterator AddressErase(AddressIterator position)
Removes the address at the specified position.
Definition: packetbb.cc:1934
void AddressPopBack(void)
Removes an address from the back of this block.
Definition: packetbb.cc:1927
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.
void Serialize(Buffer::Iterator &start) const
Serializes this block into the specified buffer.
Definition: packetbb.cc:446
a unique identifier for an interface.
Definition: type-id.h:49
virtual void Serialize(Buffer::Iterator start) const
Serializes this packet into the specified buffer.
Definition: packetbb.cc:881
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:1500
bool AddressBlockEmpty(void) const
Definition: packetbb.cc:1313
void GetHeadTail(uint8_t *head, uint8_t &headlen, uint8_t *tail, uint8_t &taillen) const
Get head and tail.
Definition: packetbb.cc:2486
An Address Block and its associated Address TLV Blocks.
Definition: packetbb.h:1184
virtual void PrintOriginatorAddress(std::ostream &os) const
Print the originator address.
Definition: packetbb.cc:1820
bool operator==(const PbbAddressTlvBlock &other) const
Equality operator for PbbAddressTlvBlock.
Definition: packetbb.cc:517
void Serialize(Buffer::Iterator &start) const
Serializes this TLV into the specified buffer.
Definition: packetbb.cc:2831
void TlvPushBack(Ptr< PbbTlv > tlv)
Appends a message TLV to the back of this message.
Definition: packetbb.cc:1241
virtual TypeId GetInstanceTypeId(void) const
Definition: packetbb.cc:848
bool operator==(const PbbAddressBlock &other) const
Equality operator for PbbAddressBlock.
Definition: packetbb.cc:2416
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 uint8_t GetAddressLength(void) const
Returns address length.
Definition: packetbb.cc:2618
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:1906
void PrefixClear(void)
Removes all prefixes from this block.
Definition: packetbb.cc:2063
bool PrefixEmpty(void) const
Definition: packetbb.cc:1993
Ptr< PbbAddressTlv > Front(void) const
Definition: packetbb.cc:359
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserializes a packet from the specified buffer.
Definition: packetbb.cc:916
void TlvClear(void)
Removes all packet TLVs from this packet.
Definition: packetbb.cc:704
virtual Address DeserializeAddress(uint8_t *buffer) const
Deserialize one address.
Definition: packetbb.cc:2632
TlvIterator TlvErase(TlvIterator position)
Removes the address TLV at the specified position.
Definition: packetbb.cc:2170
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