Changes between Version 2 and Version 3 of Ticket #40
- Timestamp:
- Oct 21, 2010, 3:55:43 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #40 – Description
v2 v3 69 69 struct device_s *dev; /// associated device, if any 70 70 }; 71 72 /** 73 The only creteria telling two ports are different is 74 private must be different. For models not using private, 75 an useless but different value must be set. 76 */ 77 struct topo_port_s 78 { 79 struct topo_node_s *node; // node owning the port 80 void *private; // port's private. 81 }; 82 83 enum topo_crit_val_e 84 { 85 CRIT_DROP, /// Node is not interesting, stop recursion here in the graph 86 CRIT_RECURS, /// Node is not selected, but we can recurs through it 87 CRIT_SELECT, /// Node is selected, and may be recursed down 88 }; 71 89 }}} 72 90 … … 92 110 struct topo_node_s *start, 93 111 struct topo_addr_s *dest); 112 113 /** 114 Selector function 115 @param node Node to filter 116 @param metrics Metrics from start node to this one 117 @param priv Selector private data 118 @returns whether the node is interesting 119 */ 120 typedef enum topo_crit_val_e crit_func_t(struct topo_node_s *node, struct topo_metrics_s *metrics, void *priv); 121 122 error_t select( 123 struct topo_node_s *start, /// Start node 124 crit_func_t *crit, void *crit_priv, /// Criterium function, telling whether a node is eligible 125 size_t max_nodes, /// Maximal number of nodes to return 126 struct topo_node_s **nodes); /// Output nodes. Table must be allocated by caller and be able to contain max_nodes 94 127 }}} 95 128 (round-trip is sufficient as there is roughly the same energy … … 133 166 error_t next( 134 167 struct topo_node_s *node, /// node of our model where we are coming from 168 struct topo_port_s *input, /// input in node. May be NULL on start node 135 169 const struct topo_addr_s *dest, /// destination address for the current address space 136 170 struct topo_metrics_s *metrics, /// Metrics to update on the go 137 struct topo_node_s **next_node); /// Next hop 171 struct topo_port_s **output_peer); /// Input port of the next hop 172 173 error_t select_next( 174 struct topo_node_s *node, /// node of our model where we are coming from 175 struct topo_port_s *input, /// input in node. May be NULL on start node 176 struct topo_metrics_s *metrics, /// Metrics to update on the go 177 struct topo_port_s **output_peer); /// Input port of the next hop 138 178 }}} 139 179