hop-2012/node.h

17 lines
345 B
C
Raw Normal View History

2010-12-27 21:56:42 +00:00
#ifndef cmsg_node_h
#define cmsg_node_h
typedef struct node_t_ {
struct node_class_t_ *node_class;
2010-12-27 21:56:42 +00:00
cmsg_bytes_t name; /* used as (partial) routing key for metamessages */
} node_t;
2010-12-27 21:56:42 +00:00
typedef struct node_class_t_ {
void (*destroy)(node_t *n);
void (*handle_message)(node_t *n, msg_t *m);
} node_class_t;
extern node_t *new_node(
2010-12-27 21:56:42 +00:00
#endif