xorp

EmulateSubnetHops Class Reference

Bind together a set of IO classes like EmulateSubnet, however, in this case, any OLSR protocol messages which flow through this entity have their hopcount and TTL decremented by a given integer. More...

#include <emulate_net.hh>

Inheritance diagram for EmulateSubnetHops:
EmulateSubnet< A >

List of all members.

Public Member Functions

 EmulateSubnetHops (TestInfo &info, EventLoop &eventloop, uint8_t hopdelta=1, uint8_t maxlinks=2)
uint8_t hopdelta () const
size_t empty_pkt_drops () const
size_t ttl_msg_drops () const
void bind_interface (const string &instance, const string &interface, const string &vif, const IPv4 &listen_addr, const uint16_t listen_port, DebugIO &io)
 When used to simulate a cloud, enforce any limit on the number of links connected to that cloud by using a run-time assertion.

Protected Member Functions

void forward (Frame frame)
 Forward the given OLSR frame, however, decrement the hop counts in the Packet and in any contained Messages.

Private Attributes

MessageDecoder _md
uint8_t _hopdelta
uint8_t _maxlinks
size_t _empty_pkt_drops
size_t _ttl_msg_drops

Detailed Description

Bind together a set of IO classes like EmulateSubnet, however, in this case, any OLSR protocol messages which flow through this entity have their hopcount and TTL decremented by a given integer.

TODO: Simulate ETX-measurable loss on link. For this we need only drop HELLO messages to create a situation where the measured ETX for the link will increase.


Member Function Documentation

void EmulateSubnetHops::forward ( Frame  frame) [protected, virtual]

Forward the given OLSR frame, however, decrement the hop counts in the Packet and in any contained Messages.

Note that duplicate packet detection is NOT performed; it is always assumed that the given frame will be forwarded in either direction.

Reimplemented from EmulateSubnet< A >.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations