• Home
  • Raw
  • Download

Lines Matching refs:rose_node

38 static struct rose_node  *rose_node_list;
54 struct rose_node *rose_node, *rose_tmpn, *rose_tmpp; in rose_add_node() local
61 rose_node = rose_node_list; in rose_add_node()
62 while (rose_node != NULL) { in rose_add_node()
63 if ((rose_node->mask == rose_route->mask) && in rose_add_node()
64 (rosecmpm(&rose_route->address, &rose_node->address, in rose_add_node()
67 rose_node = rose_node->next; in rose_add_node()
70 if (rose_node != NULL && rose_node->loopback) { in rose_add_node()
137 if (rose_node == NULL) { in rose_add_node()
151 rose_node = kmalloc(sizeof(*rose_node), GFP_ATOMIC); in rose_add_node()
152 if (rose_node == NULL) { in rose_add_node()
157 rose_node->address = rose_route->address; in rose_add_node()
158 rose_node->mask = rose_route->mask; in rose_add_node()
159 rose_node->count = 1; in rose_add_node()
160 rose_node->loopback = 0; in rose_add_node()
161 rose_node->neighbour[0] = rose_neigh; in rose_add_node()
165 rose_node_list = rose_node; in rose_add_node()
166 rose_node->next = NULL; in rose_add_node()
168 rose_tmpp->next = rose_node; in rose_add_node()
169 rose_node->next = NULL; in rose_add_node()
173 rose_node->next = rose_node_list; in rose_add_node()
174 rose_node_list = rose_node; in rose_add_node()
176 rose_tmpp->next = rose_node; in rose_add_node()
177 rose_node->next = rose_tmpn; in rose_add_node()
186 if (rose_node->count < 3) { in rose_add_node()
187 rose_node->neighbour[rose_node->count] = rose_neigh; in rose_add_node()
188 rose_node->count++; in rose_add_node()
202 static void rose_remove_node(struct rose_node *rose_node) in rose_remove_node() argument
204 struct rose_node *s; in rose_remove_node()
206 if ((s = rose_node_list) == rose_node) { in rose_remove_node()
207 rose_node_list = rose_node->next; in rose_remove_node()
208 kfree(rose_node); in rose_remove_node()
213 if (s->next == rose_node) { in rose_remove_node()
214 s->next = rose_node->next; in rose_remove_node()
215 kfree(rose_node); in rose_remove_node()
295 struct rose_node *rose_node; in rose_del_node() local
302 rose_node = rose_node_list; in rose_del_node()
303 while (rose_node != NULL) { in rose_del_node()
304 if ((rose_node->mask == rose_route->mask) && in rose_del_node()
305 (rosecmpm(&rose_route->address, &rose_node->address, in rose_del_node()
308 rose_node = rose_node->next; in rose_del_node()
311 if (rose_node == NULL || rose_node->loopback) { in rose_del_node()
330 for (i = 0; i < rose_node->count; i++) { in rose_del_node()
331 if (rose_node->neighbour[i] == rose_neigh) { in rose_del_node()
337 rose_node->count--; in rose_del_node()
339 if (rose_node->count == 0) { in rose_del_node()
340 rose_remove_node(rose_node); in rose_del_node()
344 rose_node->neighbour[0] = in rose_del_node()
345 rose_node->neighbour[1]; in rose_del_node()
348 rose_node->neighbour[1] = in rose_del_node()
349 rose_node->neighbour[2]; in rose_del_node()
405 struct rose_node *rose_node; in rose_add_loopback_node() local
410 rose_node = rose_node_list; in rose_add_loopback_node()
411 while (rose_node != NULL) { in rose_add_loopback_node()
412 if ((rose_node->mask == 10) && in rose_add_loopback_node()
413 (rosecmpm(address, &rose_node->address, 10) == 0) && in rose_add_loopback_node()
414 rose_node->loopback) in rose_add_loopback_node()
416 rose_node = rose_node->next; in rose_add_loopback_node()
419 if (rose_node != NULL) in rose_add_loopback_node()
422 if ((rose_node = kmalloc(sizeof(*rose_node), GFP_ATOMIC)) == NULL) { in rose_add_loopback_node()
427 rose_node->address = *address; in rose_add_loopback_node()
428 rose_node->mask = 10; in rose_add_loopback_node()
429 rose_node->count = 1; in rose_add_loopback_node()
430 rose_node->loopback = 1; in rose_add_loopback_node()
431 rose_node->neighbour[0] = rose_loopback_neigh; in rose_add_loopback_node()
434 rose_node->next = rose_node_list; in rose_add_loopback_node()
435 rose_node_list = rose_node; in rose_add_loopback_node()
450 struct rose_node *rose_node; in rose_del_loopback_node() local
454 rose_node = rose_node_list; in rose_del_loopback_node()
455 while (rose_node != NULL) { in rose_del_loopback_node()
456 if ((rose_node->mask == 10) && in rose_del_loopback_node()
457 (rosecmpm(address, &rose_node->address, 10) == 0) && in rose_del_loopback_node()
458 rose_node->loopback) in rose_del_loopback_node()
460 rose_node = rose_node->next; in rose_del_loopback_node()
463 if (rose_node == NULL) in rose_del_loopback_node()
466 rose_remove_node(rose_node); in rose_del_loopback_node()
480 struct rose_node *t, *rose_node; in rose_rt_device_down() local
493 rose_node = rose_node_list; in rose_rt_device_down()
495 while (rose_node != NULL) { in rose_rt_device_down()
496 t = rose_node; in rose_rt_device_down()
497 rose_node = rose_node->next; in rose_rt_device_down()
555 struct rose_node *t, *rose_node; in rose_clear_routes() local
561 rose_node = rose_node_list; in rose_clear_routes()
563 while (rose_node != NULL) { in rose_clear_routes()
564 t = rose_node; in rose_clear_routes()
565 rose_node = rose_node->next; in rose_clear_routes()
680 struct rose_node *node; in rose_get_neigh()
1093 struct rose_node *rose_node; in rose_node_start() local
1100 for (rose_node = rose_node_list; rose_node && i < *pos; in rose_node_start()
1101 rose_node = rose_node->next, ++i); in rose_node_start()
1103 return (i == *pos) ? rose_node : NULL; in rose_node_start()
1111 : ((struct rose_node *)v)->next; in rose_node_next()
1128 const struct rose_node *rose_node = v; in rose_node_show() local
1135 rose2asc(rsbuf, &rose_node->address), in rose_node_show()
1136 rose_node->mask, in rose_node_show()
1137 rose_node->count); in rose_node_show()
1139 for (i = 0; i < rose_node->count; i++) in rose_node_show()
1141 rose_node->neighbour[i]->number); in rose_node_show()
1306 struct rose_node *t, *rose_node = rose_node_list; in rose_rt_free() local
1316 while (rose_node != NULL) { in rose_rt_free()
1317 t = rose_node; in rose_rt_free()
1318 rose_node = rose_node->next; in rose_rt_free()