/home/aherms/Code/git/awds-routing/src/awds/FlowRouting.h

00001 #ifndef _FLOWROUTING_H__
00002 #define _FLOWROUTING_H__
00003 
00004 #include <awds/basic.h>
00005 #include <awds/routing.h>
00006 #include <awds/NodeId.h>
00007 #include <awds/BasePacket.h>
00008 
00009 namespace awds {
00010     
00014     class FlowRouting : public Routing {
00015     public:     
00016         typedef uint32_t FlowId;
00017         
00018         typedef void (*FlowReceiver)(BasePacket *p, void *data);
00019     
00020 
00021         FlowRouting(basic *basic) : 
00022             Routing(basic->MyId) 
00023         {}
00024 
00025         virtual int  addForwardingRule(FlowId flowid, NodeId nextHop) = 0;
00026         virtual int  delForwardingRule(FlowId flowid) = 0;
00027         //      virtual bool getNextHop(FlowId flowid, NodeId& retval) = 0;
00028 
00029         virtual int addFlowReceiver(FlowId flowid, FlowReceiver, void *data) = 0;
00030         virtual int delFlowReceiver(FlowId) = 0;
00031 
00032         virtual BasePacket *newFlowPacket(FlowId flowid) = 0; 
00033         virtual int sendFlowPacket(BasePacket *p) = 0;
00034         
00035         virtual ~FlowRouting() {}
00036     };
00037 }
00038 
00039 
00040 #endif //FLOWROUTING_H__
00041 /* This stuff is for emacs
00042  * Local variables:
00043  * mode:c++
00044  * c-basic-offset: 4
00045  * End:
00046  */

Generated on Tue Dec 11 17:58:47 2007 for AWDS by  doxygen 1.5.3-20071008