Public Member Functions | |
boost::shared_ptr < NetworkMessageData > | GetData (void) const |
Returns the data this message carries. | |
NodeNS::IPAddress | GetDestinationIPAddress (void) const |
Returns the IP address of the node intended as the receiver of this message. | |
NodeNS::Port | GetDestinationPort (void) const |
Returns the port of the node intended as the received of this message. | |
NodeNS::IPAddress | GetNextHopIPAddress (void) const |
Returns the IP address of the node requested to forward this message to the destination. | |
NodeNS::IPAddress | GetSenderIPAddress (void) const |
Returns the IP address of the node sending this message. | |
NodeNS::Port | GetSenderPort (void) const |
Returns the port of the node sending this message. | |
TopologyNS::HopCount | GetTTLHopCount (void) const |
Returns the maximum remaining number of hops this message is allowed to travel. | |
NetworkMessage (NetworkMessage const &other) | |
Copy-constructor. | |
NetworkMessage (NodeNS::IPAddress senderIPAddress, NodeNS::Port senderPort, NodeNS::IPAddress nextHopIPAddress, NodeNS::IPAddress destinationIPAddress, NodeNS::Port destinationPort, TopologyNS::HopCount hopCount) | |
Constructor. | |
void | SetData (boost::shared_ptr< NetworkMessageData > data) |
Sets the data carried by this message. | |
~NetworkMessage (void) | |
Destructor. |
YansCoreNS::NetworkMessage::NetworkMessage | ( | NodeNS::IPAddress | senderIPAddress, | |
NodeNS::Port | senderPort, | |||
NodeNS::IPAddress | nextHopIPAddress, | |||
NodeNS::IPAddress | destinationIPAddress, | |||
NodeNS::Port | destinationPort, | |||
TopologyNS::HopCount | hopCount | |||
) | [explicit] |
Constructor.
YansCoreNS::NetworkMessage::NetworkMessage | ( | NetworkMessage const & | other | ) |
Copy-constructor.
other | The object to copy for the creation of this instance. |
YansCoreNS::NetworkMessage::~NetworkMessage | ( | void | ) |
Destructor.
boost::shared_ptr<NetworkMessageData> YansCoreNS::NetworkMessage::GetData | ( | void | ) | const |
Returns the data this message carries.
boost::dynamic_pointer_cast<>()
on the return value to determine if they can handle the data. NodeNS::IPAddress YansCoreNS::NetworkMessage::GetDestinationIPAddress | ( | void | ) | const |
Returns the IP address of the node intended as the receiver of this message.
NodeNS::Port YansCoreNS::NetworkMessage::GetDestinationPort | ( | void | ) | const |
Returns the port of the node intended as the received of this message.
NodeNS::IPAddress YansCoreNS::NetworkMessage::GetNextHopIPAddress | ( | void | ) | const |
Returns the IP address of the node requested to forward this message to the destination.
NodeNS::IPAddress YansCoreNS::NetworkMessage::GetSenderIPAddress | ( | void | ) | const |
Returns the IP address of the node sending this message.
NodeNS::Port YansCoreNS::NetworkMessage::GetSenderPort | ( | void | ) | const |
Returns the port of the node sending this message.
TopologyNS::HopCount YansCoreNS::NetworkMessage::GetTTLHopCount | ( | void | ) | const |
Returns the maximum remaining number of hops this message is allowed to travel.
Nodes forwarding this message should decrement the hop count if it is positive or discard the message otherwise.
void YansCoreNS::NetworkMessage::SetData | ( | boost::shared_ptr< NetworkMessageData > | data | ) |
Sets the data carried by this message.
data | The information this message carries. |