What is TORA?
- The main objective of TORA is to limit control message propagation in the highly dynamic mobile computing environment.
- This is an on demand routing protocols
- Each node has to explicitly initiate a query when it needs to send data to a particular destination
Â
Three steps are involved in establishing a network:
- Creating routes
- Maintaining routes
- Erasing invalid routes
Â
Types of messages used in TORA:
- QRY (query) message for creating route
- For creating and maintaining routes use update (UPD) message
- For erasing code use clear (CLR) message.
Features of TORA routing:
- control messages are localized into a small set of nodes near the occurrence of topology changes
- If a node loses its last downstream link, it generates a new reference level and broadcasts the reference to its neighbors
- links are reversed to reflect the topology change and adapt to the new reference level
- Erase operation in TORA floods CLR packets through the network and erase invalid routes
Â
Architecture of TORA:
Â
Â
Â
Sample code for TORA routing protocol:
int toraAgent::command(int argc, const char*const* argv)
{
if(argc == 2) {
Tcl& tcl = Tcl::instance();
if(strncasecmp(argv[1], "id", 2) == 0) {
tcl.resultf("%d", index);
return TCL_OK;
} }
else if(argc == 3) {
if(strcmp(argv[1], "log-target") == 0 || strcmp(argv[1], "tracetarget") == 0 ) {
logtarget = (Trace*) TclObject::lookup(argv[2]);
if(logtarget == 0)
return TCL_ERROR;
return TCL_OK;
}
else if(strcmp(argv[1], "drop-target") == 0) {
int stat = rqueue.command(argc,argv);
if (stat != TCL_OK) return stat;
return Agent::command(argc, argv); }
else if(strcmp(argv[1], "if-queue") == 0) {
ifqueue = (PriQueue*) TclObject::lookup(argv[2]);

