chimera.h File Reference

#include "host.h"
#include "key.h"
#include "log.h"
#include <pthread.h>
#include "message.h"

Go to the source code of this file.

Typedefs

typedef void(* chimera_forward_upcall_t )(Key **, Message **, ChimeraHost **)
typedef void(* chimera_deliver_upcall_t )(Key *, Message *)
typedef void(* chimera_update_upcall_t )(Key *, ChimeraHost *, int)

Functions

ChimeraStatechimera_init (int port)
void chimera_join (ChimeraState *state, ChimeraHost *bootstrap)
void chimera_route (ChimeraState *state, Key *key, Message *msg, ChimeraHost *hint)
void chimera_forward (ChimeraState *state, chimera_forward_upcall_t func)
void chimera_deliver (ChimeraState *state, chimera_deliver_upcall_t func)
void chimera_update (ChimeraState *state, chimera_update_upcall_t func)
void chimera_setkey (ChimeraState *state, Key key)
void chimera_register (ChimeraState *state, int type)
void chimera_send (ChimeraState *state, Key key, int type, int len, char *data)
int chimera_ping (ChimeraState *state, ChimeraHost *host)


Typedef Documentation

typedef void(* chimera_deliver_upcall_t)(Key *, Message *)
 

typedef void(* chimera_forward_upcall_t)(Key **, Message **, ChimeraHost **)
 

typedef void(* chimera_update_upcall_t)(Key *, ChimeraHost *, int)
 


Function Documentation

void chimera_deliver ChimeraState state,
chimera_deliver_upcall_t  func
 

chimera_deliver: Set the chimera deliver upcall to func. This handler will be called every time a message is delivered to the current node

void chimera_forward ChimeraState state,
chimera_forward_upcall_t  func
 

chimera_forward: Set the chimera forward upcall to func. This handler will be called every time a message is routed to a key through the current node. The host argument is upsupported, but will allow the programmer to choose the next hop

ChimeraState* chimera_init int  port  ) 
 

chimera_init: Initializes Chimera on port port and returns the ChimeraState * which contains global state of different chimera modules.

void chimera_join ChimeraState state,
ChimeraHost bootstrap
 

chimera_join: Join the network that the bootstrap host is a part of

int chimera_ping ChimeraState state,
ChimeraHost host
 

chimera_ping: sends a PING message to the host. The message is acknowledged in network layer.

void chimera_register ChimeraState state,
int  type
 

chimera_register: register an integer message type to be routed by the chimera routing layer

void chimera_route ChimeraState state,
Key key,
Message message,
ChimeraHost host
 

chimera_route: routes a message one step closer to its destination key. Delivers the message to its destination if it is the current host through the deliver upcall, otherwise it makes the route upcall

void chimera_send ChimeraState state,
Key  key,
int  type,
int  size,
char *  data
 

chimera_send: Route a message of type to key containing size bytes of data. This will send data through the Chimera system and deliver it to the host closest to the key.

void chimera_setkey ChimeraState state,
Key  key
 

chimera_setkey: Manually sets the key for the current node

void chimera_update ChimeraState state,
chimera_update_upcall_t  func
 

chimera_update: Set the chimera deliver update to func. This handler will be called every time a host leaves or joins your neighbor set. The final iteger is a 1 if the host joins and a 0 if the host leaves


Generated on Sat Nov 12 16:43:13 2005 for Chimera by  doxygen 1.4.5