A message within a PbbPacket packet. More...
#include <packetbb.h>


Public Types | |
|
typedef std::list< Ptr< PbbTlv > >::iterator | TlvIterator |
|
typedef std::list< Ptr< PbbTlv > >::const_iterator | ConstTlvIterator |
|
typedef std::list< Ptr < PbbAddressBlock > >::iterator | AddressBlockIterator |
|
typedef std::list< Ptr < PbbAddressBlock > >::const_iterator | ConstAddressBlockIterator |
Public Member Functions | |
| void | SetType (uint8_t type) |
| Sets the type for this message. | |
| uint8_t | GetType (void) const |
| void | SetOriginatorAddress (Address address) |
| Sets the address for the node that created this packet. | |
| Address | GetOriginatorAddress (void) const |
| bool | HasOriginatorAddress (void) const |
| Tests whether or not this message has an originator address. | |
| void | SetHopLimit (uint8_t hoplimit) |
| Sets the maximum number of hops this message should travel. | |
| uint8_t | GetHopLimit (void) const |
| bool | HasHopLimit (void) const |
| Tests whether or not this message has a hop limit. | |
| void | SetHopCount (uint8_t hopcount) |
| Sets the current number of hops this message has traveled. | |
| uint8_t | GetHopCount (void) const |
| bool | HasHopCount (void) const |
| Tests whether or not this message has a hop count. | |
| void | SetSequenceNumber (uint16_t seqnum) |
| Sets the sequence number of this message. | |
| uint16_t | GetSequenceNumber (void) const |
| bool | HasSequenceNumber (void) const |
| Tests whether or not this message has a sequence number. | |
| TlvIterator | TlvBegin () |
| ConstTlvIterator | TlvBegin () const |
| TlvIterator | TlvEnd () |
| ConstTlvIterator | TlvEnd () const |
| int | TlvSize (void) const |
| bool | TlvEmpty (void) const |
| Ptr< PbbTlv > | TlvFront (void) |
| const Ptr< PbbTlv > | TlvFront (void) const |
| Ptr< PbbTlv > | TlvBack (void) |
| const Ptr< PbbTlv > | TlvBack (void) const |
| void | TlvPushFront (Ptr< PbbTlv > tlv) |
| Prepends a message TLV to the front of this message. | |
| void | TlvPopFront (void) |
| Removes a message TLV from the front of this message. | |
| void | TlvPushBack (Ptr< PbbTlv > tlv) |
| Appends a message TLV to the back of this message. | |
| void | TlvPopBack (void) |
| Removes a message TLV from the back of this message. | |
| TlvIterator | TlvErase (TlvIterator position) |
| Removes the message TLV at the specified position. | |
| TlvIterator | TlvErase (TlvIterator first, TlvIterator last) |
| Removes all message TLVs from [first, last) (includes first, not includes last). | |
| void | TlvClear (void) |
| Removes all message TLVs from this block. | |
| AddressBlockIterator | AddressBlockBegin () |
| ConstAddressBlockIterator | AddressBlockBegin () const |
| AddressBlockIterator | AddressBlockEnd () |
| ConstAddressBlockIterator | AddressBlockEnd () const |
| int | AddressBlockSize (void) const |
| bool | AddressBlockEmpty (void) const |
| Ptr< PbbAddressBlock > | AddressBlockFront (void) |
| const Ptr< PbbAddressBlock > | AddressBlockFront (void) const |
| Ptr< PbbAddressBlock > | AddressBlockBack (void) |
| const Ptr< PbbAddressBlock > | AddressBlockBack (void) const |
| void | AddressBlockPushFront (Ptr< PbbAddressBlock > block) |
| Prepends an address block to the front of this message. | |
| void | AddressBlockPopFront (void) |
| Removes an address block from the front of this message. | |
| void | AddressBlockPushBack (Ptr< PbbAddressBlock > block) |
| Appends an address block to the front of this message. | |
| void | AddressBlockPopBack (void) |
| Removes an address block from the back of this message. | |
| AddressBlockIterator | AddressBlockErase (AddressBlockIterator position) |
| Removes the address block at the specified position. | |
| AddressBlockIterator | AddressBlockErase (AddressBlockIterator first, AddressBlockIterator last) |
| Removes all address blocks from [first, last) (includes first, not includes last). | |
| void | AddressBlockClear (void) |
| Removes all address blocks from this message. | |
| uint32_t | GetSerializedSize (void) const |
| void | Serialize (Buffer::Iterator &start) const |
| Serializes this message into the specified buffer. | |
| void | Deserialize (Buffer::Iterator &start) |
| Deserializes a message from the specified buffer. | |
| void | Print (std::ostream &os) const |
| Pretty-prints the contents of this message. | |
| void | Print (std::ostream &os, int level) const |
| Pretty-prints the contents of this message, with specified indentation. | |
| bool | operator== (const PbbMessage &other) const |
| bool | operator!= (const PbbMessage &other) const |
Static Public Member Functions | |
| static Ptr< PbbMessage > | DeserializeMessage (Buffer::Iterator &start) |
| Deserializes a message, returning the correct object depending on whether it is an IPv4 message or an IPv6 message. | |
Protected Member Functions | |
| virtual PbbAddressLength | GetAddressLength (void) const =0 |
| virtual void | SerializeOriginatorAddress (Buffer::Iterator &start) const =0 |
| virtual Address | DeserializeOriginatorAddress (Buffer::Iterator &start) const =0 |
| virtual void | PrintOriginatorAddress (std::ostream &os) const =0 |
| virtual Ptr< PbbAddressBlock > | AddressBlockDeserialize (Buffer::Iterator &start) const =0 |
A message within a PbbPacket packet.
There may be any number of messages in one packet packet. This is a pure virtual base class, when creating a message, you should instantiate either PbbMessageIpv4 or PbbMessageIpv6.
| const Ptr<PbbAddressBlock> ns3::PbbMessage::AddressBlockBack | ( | void | ) | const |
| Ptr<PbbAddressBlock> ns3::PbbMessage::AddressBlockBack | ( | void | ) |
| ConstAddressBlockIterator ns3::PbbMessage::AddressBlockBegin | ( | ) | const |
| AddressBlockIterator ns3::PbbMessage::AddressBlockBegin | ( | ) |
| bool ns3::PbbMessage::AddressBlockEmpty | ( | void | ) | const |
| ConstAddressBlockIterator ns3::PbbMessage::AddressBlockEnd | ( | ) | const |
| AddressBlockIterator ns3::PbbMessage::AddressBlockEnd | ( | ) |
| AddressBlockIterator ns3::PbbMessage::AddressBlockErase | ( | AddressBlockIterator | first, | |
| AddressBlockIterator | last | |||
| ) |
Removes all address blocks from [first, last) (includes first, not includes last).
| first | an Iterator pointing to the first address block to erase (inclusive). | |
| last | an Iterator pointing to the element past the last address block to erase. |
| AddressBlockIterator ns3::PbbMessage::AddressBlockErase | ( | AddressBlockIterator | position | ) |
Removes the address block at the specified position.
| position | an Iterator pointing to the address block to erase. |
| const Ptr<PbbAddressBlock> ns3::PbbMessage::AddressBlockFront | ( | void | ) | const |
| Ptr<PbbAddressBlock> ns3::PbbMessage::AddressBlockFront | ( | void | ) |
| void ns3::PbbMessage::AddressBlockPushBack | ( | Ptr< PbbAddressBlock > | block | ) |
Appends an address block to the front of this message.
| block | a smart pointer to the address block to append. |
| void ns3::PbbMessage::AddressBlockPushFront | ( | Ptr< PbbAddressBlock > | block | ) |
Prepends an address block to the front of this message.
| block | a smart pointer to the address block to prepend. |
| int ns3::PbbMessage::AddressBlockSize | ( | void | ) | const |
| void ns3::PbbMessage::Deserialize | ( | Buffer::Iterator & | start | ) |
Deserializes a message from the specified buffer.
| start | a reference to the point in a buffer to begin deserializing. |
Users should not need to call this. Blocks will be deserialized by their containing packet.
| static Ptr<PbbMessage> ns3::PbbMessage::DeserializeMessage | ( | Buffer::Iterator & | start | ) | [static] |
Deserializes a message, returning the correct object depending on whether it is an IPv4 message or an IPv6 message.
| start | a reference to the point in a buffer to begin deserializing. |
Users should not need to call this. Blocks will be deserialized by their containing packet.
| uint8_t ns3::PbbMessage::GetHopCount | ( | void | ) | const |
Calling this while HasHopCount is False is undefined. Make sure you check it first. This will be checked by an assert in debug builds.
| uint8_t ns3::PbbMessage::GetHopLimit | ( | void | ) | const |
Calling this while HasHopLimit is False is undefined. Make sure you check it first. This will be checked by an assert in debug builds.
| Address ns3::PbbMessage::GetOriginatorAddress | ( | void | ) | const |
Calling this while HasOriginatorAddress is False is undefined. Make sure you check it first. This will be checked by an assert in debug builds.
| uint16_t ns3::PbbMessage::GetSequenceNumber | ( | void | ) | const |
Calling this while HasSequenceNumber is False is undefined. Make sure you check it first. This will be checked by an assert in debug builds.
| uint32_t ns3::PbbMessage::GetSerializedSize | ( | void | ) | const |
| uint8_t ns3::PbbMessage::GetType | ( | void | ) | const |
| bool ns3::PbbMessage::HasHopCount | ( | void | ) | const |
Tests whether or not this message has a hop count.
| bool ns3::PbbMessage::HasHopLimit | ( | void | ) | const |
Tests whether or not this message has a hop limit.
If this is set, messages should not hop further than this limit.
| bool ns3::PbbMessage::HasOriginatorAddress | ( | void | ) | const |
Tests whether or not this message has an originator address.
| bool ns3::PbbMessage::HasSequenceNumber | ( | void | ) | const |
Tests whether or not this message has a sequence number.
| void ns3::PbbMessage::Print | ( | std::ostream & | os, | |
| int | level | |||
| ) | const |
Pretty-prints the contents of this message, with specified indentation.
| os | a stream object to print to. | |
| level | level of indentation. |
This probably never needs to be called by users. This is used when recursively printing sub-objects.
| void ns3::PbbMessage::Print | ( | std::ostream & | os | ) | const |
Pretty-prints the contents of this message.
| os | a stream object to print to. |
| void ns3::PbbMessage::Serialize | ( | Buffer::Iterator & | start | ) | const |
Serializes this message into the specified buffer.
| start | a reference to the point in a buffer to begin serializing. |
Users should not need to call this. Blocks will be deserialized by their containing packet.
| void ns3::PbbMessage::SetHopCount | ( | uint8_t | hopcount | ) |
Sets the current number of hops this message has traveled.
| hopcount | the current number of hops |
| void ns3::PbbMessage::SetHopLimit | ( | uint8_t | hoplimit | ) |
Sets the maximum number of hops this message should travel.
| hoplimit | the limit to set |
| void ns3::PbbMessage::SetOriginatorAddress | ( | Address | address | ) |
Sets the address for the node that created this packet.
| address | the originator address. |
| void ns3::PbbMessage::SetSequenceNumber | ( | uint16_t | seqnum | ) |
Sets the sequence number of this message.
| seqnum | the sequence number to set. |
| void ns3::PbbMessage::SetType | ( | uint8_t | type | ) |
Sets the type for this message.
| type | the type to set. |
| ConstTlvIterator ns3::PbbMessage::TlvBegin | ( | ) | const |
| TlvIterator ns3::PbbMessage::TlvBegin | ( | ) |
| bool ns3::PbbMessage::TlvEmpty | ( | void | ) | const |
| ConstTlvIterator ns3::PbbMessage::TlvEnd | ( | ) | const |
| TlvIterator ns3::PbbMessage::TlvEnd | ( | ) |
| TlvIterator ns3::PbbMessage::TlvErase | ( | TlvIterator | first, | |
| TlvIterator | last | |||
| ) |
Removes all message TLVs from [first, last) (includes first, not includes last).
| first | an Iterator pointing to the first message TLV to erase (inclusive). | |
| last | an Iterator pointing to the element past the last message TLV to erase. |
| TlvIterator ns3::PbbMessage::TlvErase | ( | TlvIterator | position | ) |
Removes the message TLV at the specified position.
| position | an Iterator pointing to the message TLV to erase. |
Appends a message TLV to the back of this message.
| tlv | a smart pointer to the message TLV to append. |
Prepends a message TLV to the front of this message.
| tlv | a smart pointer to the message TLV to prepend. |
| int ns3::PbbMessage::TlvSize | ( | void | ) | const |
1.6.1