xorp

EmulateSubnet< A > Class Template Reference

Bind together a set of IO classes in order to form a virtual subnet for testing, one instance per subnet. More...

#include <emulate_net.hh>

Inheritance diagram for EmulateSubnet< A >:
EmulateSubnetHops

List of all members.

Classes

struct  Frame
struct  Multiplex

Public Member Functions

 EmulateSubnet (TestInfo &info, EventLoop &eventloop)
void receive_frames (const string &interface, const string &vif, IPv4 dst, uint16_t dport, IPv4 src, uint16_t sport, uint8_t *data, uint32_t len, const string instance)
 Receive frames.
virtual void bind_interface (const string &instance, const string &interface, const string &vif, const IPv4 &listen_addr, const uint16_t listen_port, DebugIO &io)
 Bind an interface to the emulated subnet.
void unbind_interface (const string &instance, const string &interface, const string &vif, const IPv4 &listen_addr, const uint16_t listen_port, DebugIO &io)
 Unbind an interface from the emulated subnet.
void set_all_nodes_addr (IPv4 all_nodes_addr)
 EmulateSubnet (TestInfo &info, EventLoop &eventloop)
void receive_frames (const string &interface, const string &vif, A dst, A src, uint8_t *data, uint32_t len, const string instance)
 Receive frames.
void bind_interfaces (const string &instance, const string &interface, const string &vif, DebugIO< A > &io)
 Bind together a set of interfaces.

Protected Member Functions

void next ()
virtual void forward (Frame frame)

Protected Attributes

TestInfo_info
EventLoop_eventloop
map< const Multiplex, DebugIO * > _ios
XorpTimer _timer
deque< Frame_queue [2]
int _queue_add
int _queue_remove
IPv4 _all_nodes_addr

Private Member Functions

void next ()
void forward (Frame frame)

Private Attributes

map< const Multiplex, DebugIO
< A > * > 
_ios

Detailed Description

template<typename A>
class EmulateSubnet< A >

Bind together a set of IO classes in order to form a virtual subnet for testing, one instance per subnet.


Member Function Documentation

template<typename A >
void EmulateSubnet< A >::receive_frames ( const string &  interface,
const string &  vif,
IPv4  dst,
uint16_t  dport,
IPv4  src,
uint16_t  sport,
uint8_t *  data,
uint32_t  len,
const string  instance 
)

Receive frames.

All frames generated by an OLSR instance arrive here. Note that a frame arriving from one OLSR instance is not sent directly to another. The frames are queued and only when OLSR instance gives back control to the eventloop are the frames forwarded. This ensures that two OLSR instances are not in each others call graphs, which can cause re-entrancy problems.

template<typename A >
void EmulateSubnet< A >::receive_frames ( const string &  interface,
const string &  vif,
dst,
src,
uint8_t *  data,
uint32_t  len,
const string  instance 
) [inline]

Receive frames.

All frames generated by an OSPF instances arrive here. Note that a frame arriving from one OSPF instance is not sent directly to another. The frames are queued and only when OSPF instance gives back control to the eventloop are the frames forwarded. This ensures that two OSPF instances are not in each others call graphs, which can cause re-entrancy problems.


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