#include "chimera.h"
#include "semaphore.h"
#include "key.h"
Go to the source code of this file.
Classes | |
struct | RouteGlobal |
Defines | |
#define | MAX_ROW KEY_SIZE/BASE_B |
#define | MAX_COL power(2,BASE_B) |
#define | MAX_ENTRY 3 |
#define | LEAFSET_SIZE 8 |
Functions | |
void * | route_init (ChimeraHost *me) |
ChimeraHost ** | route_lookup (ChimeraState *state, Key key, int count, int is_safe) |
ChimeraHost ** | route_neighbors (ChimeraState *state, int count) |
void | route_update (ChimeraState *state, ChimeraHost *host, int joined) |
ChimeraHost ** | route_row_lookup (ChimeraState *state, Key key) |
ChimeraHost ** | route_get_table (ChimeraState *state) |
void | printTable (ChimeraState *state) |
|
|
|
|
|
|
|
|
|
prints routing table, |
|
route_get_table: returns all the entries in the routing table in an array of ChimeraHost. |
|
route_init: Ininitiates routing table and leafsets |
|
route_lookup: returns an array of count# nodes that are acceptable next hops for a message being routed to key#. is_save# is ignored for now. |
|
route_neighbors: returns an array of count# neighbor nodes with priority to closer nodes |
|
route_row_lookup:key return the row in the routing table that matches the longest prefix with key# |
|
route_update: updated the routing table in regard to host#. If the host is joining the network (and joined# == 1), then it is added to the routing table if it is appropriate. If it is leaving the network (and joined# == 0), then it is removed from the routing tables |