hub/commands.c File Reference

#include "commands.h"

Include dependency graph for commands.c:

Go to the source code of this file.

Data Structures

struct  Registration

Functions

Nodeextract_message (Message *message, const char *child, const char *parent)
static int Hub_register_cb (struct Hub *hub, struct Route *route, Message *message)
static int Hub_unregister_cb (struct Hub *hub, struct Route *route, Message *message)
static int Hub_who_cb (struct Hub *hub, struct Route *route, Message *message)
int Hub_commands_register (Hub *hub)

Variables

Registration registrations []


Function Documentation

Node* extract_message ( Message message,
const char *  child,
const char *  parent 
) [inline]

Definition at line 3 of file commands.c.

References Message::data, and Node_decons().

Referenced by Hub_register_cb(), and Hub_unregister_cb().

Here is the call graph for this function:

int Hub_commands_register ( Hub hub  ) 

Definition at line 56 of file commands.c.

References assert_mem, bdestroy(), bfromcstr(), Registration::callback, check, log, Registration::node, Node_destroy(), Node_parse(), on_fail, registrations, Route_register_callback(), and Hub::routes.

Referenced by Hub_create().

Here is the call graph for this function:

static int Hub_register_cb ( struct Hub hub,
struct Route route,
Message message 
) [static]

Definition at line 14 of file commands.c.

References check, extract_message(), Message::from, on_fail, Route_dump(), Route_register(), Hub::routes, and trace.

Here is the call graph for this function:

static int Hub_unregister_cb ( struct Hub hub,
struct Route route,
Message message 
) [static]

Definition at line 27 of file commands.c.

References check, extract_message(), Message::from, on_fail, Route_unregister(), Hub::routes, and trace.

Here is the call graph for this function:

static int Hub_who_cb ( struct Hub hub,
struct Route route,
Message message 
) [static]

Definition at line 36 of file commands.c.

References Message_dump(), and trace.

Here is the call graph for this function:


Variable Documentation

Registration registrations[]

Initial value:

 {
  { "[ [ register route ", Hub_register_cb },
  { "[ [ unregister route ", Hub_unregister_cb },
  { "[ [ who route ", Hub_who_cb },
  { NULL, NULL}
}

Definition at line 49 of file commands.c.

Referenced by Hub_commands_register().


Generated on Tue Apr 10 01:00:23 2007 for Utu by  doxygen 1.5.1