diff options
author | Sergiu Ivanov <unlimitedscolobb@gmail.com> | 2009-03-06 21:21:47 +0200 |
---|---|---|
committer | Sergiu Ivanov <unlimitedscolobb@gmail.com> | 2009-03-06 21:21:47 +0200 |
commit | 48efa86dfe3e546190f997e70c307a231026d207 (patch) | |
tree | b095f30d7ddec15469235ae9b5ef65b3ea7038b0 /node.c | |
parent | 3cea8614816e68db569bbea21134c64273e037b5 (diff) |
Added node types
Now inside each netnode (and, hence, inside each node) there is
a field showing the type of the node. This is required because,
at least in response to requests by the filter, proxy nodes and
shadow nodes will have different jobs to do and the server-side
implementation of filesystem RPCs in nsmux would need to know
what actions they are expected to carry out.
Diffstat (limited to 'node.c')
-rw-r--r-- | node.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -83,6 +83,8 @@ error_t node_create (lnode_t * lnode, node_t ** node) return err; } + node_new->nn->type = NODE_TYPE_NORMAL; + /*link the lnode to the new node */ lnode->node = node_new; @@ -142,6 +144,8 @@ error_t node_create_proxy (lnode_t * lnode, node_t ** node) return err; } + node_new->nn->type = NODE_TYPE_PROXY; + /*add this new node to the list of proxies of `lnode` */ lnode_add_proxy (lnode, node_new); @@ -195,6 +199,10 @@ error_t node_create_from_port (mach_port_t port, node_t ** node) return err; } + /*The caller may want to change this to NODE_TYPE_SHADOW if it's + the case. */ + node_new->nn->type = NODE_TYPE_PROXY; + /*this node is ``orphan'' -- it is not associated to any lnode and has some service functions only */ node_new->nn->lnode = NULL; |