33 : m_tag (0), m_prefix (
"127.0.0.1"), m_subnetMask (
"0.0.0.0"), m_nextHop (
"0.0.0.0"), m_metric (16)
41 .SetGroupName (
"Internet")
42 .AddConstructor<
RipRte> ();
166 .SetGroupName (
"Internet")
179 for (std::list<RipRte>::const_iterator iter =
m_rteList.begin ();
201 for (std::list<RipRte>::const_iterator iter =
m_rteList.begin ();
205 i.
Next(iter->GetSerializedSize ());
226 NS_LOG_LOGIC (
"RIP received a message with mismatch version, ignoring.");
232 NS_LOG_LOGIC (
"RIP received a message with invalid filled flags, ignoring.");
237 for (uint8_t
n=0;
n<rteNumber;
n++)
virtual uint32_t GetSerializedSize(void) const
Get the serialized size of the packet.
void SetPrefix(Ipv4Address prefix)
Set the prefix.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Ipv4Mask GetSubnetMask(void) const
Get the subnet mask.
a class to represent an Ipv4 address mask
uint32_t GetRemainingSize(void) const
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ipv4Address m_nextHop
Next hop.
Ipv4Address GetPrefix(void) const
Get the prefix.
uint32_t ReadNtohU32(void)
iterator in a Buffer instance
void SetRouteMetric(uint32_t routeMetric)
Set the route metric.
virtual TypeId GetInstanceTypeId(void) const
Return the instance type identifier.
void WriteU16(uint16_t data)
void WriteHtonU16(uint16_t data)
void SetSubnetMask(Ipv4Mask subnetMask)
Set the subnet mask.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
void Next(void)
go forward by one byte
Ipv4Mask m_subnetMask
Subnet mask.
static TypeId GetTypeId(void)
Get the type ID.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Rip v2 Routing Table Entry (RTE) - see RFC 2453.
void Set(uint32_t mask)
input mask is in host order.
void WriteHtonU32(uint32_t data)
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
uint16_t GetRouteTag(void) const
Get the route tag.
Ipv4Address m_prefix
Advertised prefix.
void Set(uint32_t address)
input address is in host order.
Ipv4 addresses are stored in host order in this class.
uint32_t GetRouteMetric(void) const
Get the route metric.
uint32_t m_metric
Route metric.
void WriteU8(uint8_t data)
uint32_t Get(void) const
Get the host-order 32-bit IP mask.
void SetNextHop(Ipv4Address nextHop)
Set the next hop.
uint16_t GetPrefixLength(void) const
void SetRouteTag(uint16_t routeTag)
Set the route tag.
uint32_t Get(void) const
Get the host-order 32-bit IP address.
uint16_t ReadNtohU16(void)
Ipv4Address GetNextHop(void) const
Get the next hop.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
virtual void Print(std::ostream &os) const