00001 /* 00002 * Copyright (c) 2000 University of Southern California. 00003 * All rights reserved. 00004 * 00005 * Redistribution and use in source and binary forms are permitted 00006 * provided that the above copyright notice and this paragraph are 00007 * duplicated in all such forms and that any documentation, advertising 00008 * materials, and other materials related to such distribution and use 00009 * acknowledge that the software was developed by the University of 00010 * Southern California, Information Sciences Institute. The name of the 00011 * University may not be used to endorse or promote products derived from 00012 * this software without specific prior written permission. 00013 * 00014 * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED 00015 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 00016 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00017 * 00018 * 00019 * Generic helpers (all routing algorithms) 00020 * contributed to ns 00021 * George Riley, Georgia Tech, Winter 2000 00022 */ 00023 00024 #ifndef __ROUTEALGO_H__ 00025 #define __ROUTEALGO_H__ 00026 00027 #include "rnode.h" 00028 // Print the route, given source s, destination d and predecessor vector pred 00029 void PrintRoute( nodeid_t s, nodeid_t d, RoutingVec_t& pred); 00030 00031 // Create the NixVector 00032 void NixRoute( nodeid_t s, nodeid_t d, RoutingVec_t& pred, 00033 RNodeVec_t& nodes, NixVec& nv); 00034 00035 // Print the parent list (debug) 00036 void PrintParents(RoutingVec_t& pred); 00037 00038 // Print the route from the nixvector (debug) 00039 void PrintNix(nodeid_t s, RNodeVec_t nodes, NixVec& nv); 00040 00041 #endif
1.3.3