tag | line | file | source code |
nr_node | 74 | include/net/netrom.h | struct nr_node *next; |
nr_node | 60 | net/netrom/nr_route.c | static struct nr_node *nr_node_list = NULL; |
nr_node | 70 | net/netrom/nr_route.c | struct nr_node *nr_node; |
nr_node | 76 | net/netrom/nr_route.c | for (nr_node = nr_node_list; nr_node != NULL; nr_node = nr_node->next) |
nr_node | 77 | net/netrom/nr_route.c | if (ax25cmp(nr, &nr_node->callsign) == 0) |
nr_node | 84 | net/netrom/nr_route.c | if (quality == 0 && nr_neigh != NULL && nr_node != NULL) |
nr_node | 116 | net/netrom/nr_route.c | if (nr_node == NULL) { |
nr_node | 117 | net/netrom/nr_route.c | if ((nr_node = (struct nr_node *)kmalloc(sizeof(*nr_node), GFP_ATOMIC)) == NULL) |
nr_node | 120 | net/netrom/nr_route.c | nr_node->callsign = *nr; |
nr_node | 121 | net/netrom/nr_route.c | memcpy(&nr_node->mnemonic, mnemonic, sizeof(nr_node->mnemonic)); |
nr_node | 123 | net/netrom/nr_route.c | nr_node->which = 0; |
nr_node | 124 | net/netrom/nr_route.c | nr_node->count = 1; |
nr_node | 126 | net/netrom/nr_route.c | nr_node->routes[0].quality = quality; |
nr_node | 127 | net/netrom/nr_route.c | nr_node->routes[0].obs_count = obs_count; |
nr_node | 128 | net/netrom/nr_route.c | nr_node->routes[0].neighbour = nr_neigh->number; |
nr_node | 133 | net/netrom/nr_route.c | nr_node->next = nr_node_list; |
nr_node | 134 | net/netrom/nr_route.c | nr_node_list = nr_node; |
nr_node | 143 | net/netrom/nr_route.c | for (found = 0, i = 0; i < nr_node->count; i++) { |
nr_node | 144 | net/netrom/nr_route.c | if (nr_node->routes[i].neighbour == nr_neigh->number) { |
nr_node | 145 | net/netrom/nr_route.c | nr_node->routes[i].quality = quality; |
nr_node | 146 | net/netrom/nr_route.c | nr_node->routes[i].obs_count = obs_count; |
nr_node | 154 | net/netrom/nr_route.c | if (nr_node->count < 3) { |
nr_node | 155 | net/netrom/nr_route.c | nr_node->routes[2] = nr_node->routes[1]; |
nr_node | 156 | net/netrom/nr_route.c | nr_node->routes[1] = nr_node->routes[0]; |
nr_node | 158 | net/netrom/nr_route.c | nr_node->routes[0].quality = quality; |
nr_node | 159 | net/netrom/nr_route.c | nr_node->routes[0].obs_count = obs_count; |
nr_node | 160 | net/netrom/nr_route.c | nr_node->routes[0].neighbour = nr_neigh->number; |
nr_node | 162 | net/netrom/nr_route.c | nr_node->count++; |
nr_node | 166 | net/netrom/nr_route.c | if (quality > nr_node->routes[2].quality) { |
nr_node | 167 | net/netrom/nr_route.c | nr_node->routes[2].quality = quality; |
nr_node | 168 | net/netrom/nr_route.c | nr_node->routes[2].obs_count = obs_count; |
nr_node | 169 | net/netrom/nr_route.c | nr_node->routes[2].neighbour = nr_neigh->number; |
nr_node | 177 | net/netrom/nr_route.c | switch (nr_node->count) { |
nr_node | 179 | net/netrom/nr_route.c | if (nr_node->routes[1].quality > nr_node->routes[0].quality) { |
nr_node | 180 | net/netrom/nr_route.c | switch (nr_node->which) { |
nr_node | 181 | net/netrom/nr_route.c | case 0: nr_node->which = 1; break; |
nr_node | 182 | net/netrom/nr_route.c | case 1: nr_node->which = 0; break; |
nr_node | 185 | net/netrom/nr_route.c | nr_route = nr_node->routes[0]; |
nr_node | 186 | net/netrom/nr_route.c | nr_node->routes[0] = nr_node->routes[1]; |
nr_node | 187 | net/netrom/nr_route.c | nr_node->routes[1] = nr_route; |
nr_node | 189 | net/netrom/nr_route.c | if (nr_node->routes[2].quality > nr_node->routes[1].quality) { |
nr_node | 190 | net/netrom/nr_route.c | switch (nr_node->which) { |
nr_node | 191 | net/netrom/nr_route.c | case 1: nr_node->which = 2; break; |
nr_node | 192 | net/netrom/nr_route.c | case 2: nr_node->which = 1; break; |
nr_node | 195 | net/netrom/nr_route.c | nr_route = nr_node->routes[1]; |
nr_node | 196 | net/netrom/nr_route.c | nr_node->routes[1] = nr_node->routes[2]; |
nr_node | 197 | net/netrom/nr_route.c | nr_node->routes[2] = nr_route; |
nr_node | 200 | net/netrom/nr_route.c | if (nr_node->routes[1].quality > nr_node->routes[0].quality) { |
nr_node | 201 | net/netrom/nr_route.c | switch (nr_node->which) { |
nr_node | 202 | net/netrom/nr_route.c | case 0: nr_node->which = 1; break; |
nr_node | 203 | net/netrom/nr_route.c | case 1: nr_node->which = 0; break; |
nr_node | 206 | net/netrom/nr_route.c | nr_route = nr_node->routes[0]; |
nr_node | 207 | net/netrom/nr_route.c | nr_node->routes[0] = nr_node->routes[1]; |
nr_node | 208 | net/netrom/nr_route.c | nr_node->routes[1] = nr_route; |
nr_node | 214 | net/netrom/nr_route.c | for (i = 0; i < nr_node->count; i++) { |
nr_node | 215 | net/netrom/nr_route.c | if (nr_node->routes[i].neighbour == nr_neigh->number) { |
nr_node | 216 | net/netrom/nr_route.c | if (i < nr_node->which) |
nr_node | 217 | net/netrom/nr_route.c | nr_node->which = i; |
nr_node | 225 | net/netrom/nr_route.c | static void nr_remove_node(struct nr_node *nr_node) |
nr_node | 227 | net/netrom/nr_route.c | struct nr_node *s; |
nr_node | 233 | net/netrom/nr_route.c | if ((s = nr_node_list) == nr_node) { |
nr_node | 234 | net/netrom/nr_route.c | nr_node_list = nr_node->next; |
nr_node | 236 | net/netrom/nr_route.c | kfree_s(nr_node, sizeof(struct nr_node)); |
nr_node | 241 | net/netrom/nr_route.c | if (s->next == nr_node) { |
nr_node | 242 | net/netrom/nr_route.c | s->next = nr_node->next; |
nr_node | 244 | net/netrom/nr_route.c | kfree_s(nr_node, sizeof(struct nr_node)); |
nr_node | 293 | net/netrom/nr_route.c | struct nr_node *nr_node; |
nr_node | 297 | net/netrom/nr_route.c | for (nr_node = nr_node_list; nr_node != NULL; nr_node = nr_node->next) |
nr_node | 298 | net/netrom/nr_route.c | if (ax25cmp(callsign, &nr_node->callsign) == 0) |
nr_node | 301 | net/netrom/nr_route.c | if (nr_node == NULL) return -EINVAL; |
nr_node | 309 | net/netrom/nr_route.c | for (i = 0; i < nr_node->count; i++) { |
nr_node | 310 | net/netrom/nr_route.c | if (nr_node->routes[i].neighbour == nr_neigh->number) { |
nr_node | 316 | net/netrom/nr_route.c | nr_node->count--; |
nr_node | 318 | net/netrom/nr_route.c | if (nr_node->count == 0) { |
nr_node | 319 | net/netrom/nr_route.c | nr_remove_node(nr_node); |
nr_node | 323 | net/netrom/nr_route.c | nr_node->routes[0] = nr_node->routes[1]; |
nr_node | 325 | net/netrom/nr_route.c | nr_node->routes[1] = nr_node->routes[2]; |
nr_node | 407 | net/netrom/nr_route.c | struct nr_node *s, *nr_node; |
nr_node | 410 | net/netrom/nr_route.c | nr_node = nr_node_list; |
nr_node | 412 | net/netrom/nr_route.c | while (nr_node != NULL) { |
nr_node | 413 | net/netrom/nr_route.c | s = nr_node; |
nr_node | 414 | net/netrom/nr_route.c | nr_node = nr_node->next; |
nr_node | 471 | net/netrom/nr_route.c | struct nr_node *t, *nr_node; |
nr_node | 479 | net/netrom/nr_route.c | nr_node = nr_node_list; |
nr_node | 481 | net/netrom/nr_route.c | while (nr_node != NULL) { |
nr_node | 482 | net/netrom/nr_route.c | t = nr_node; |
nr_node | 483 | net/netrom/nr_route.c | nr_node = nr_node->next; |
nr_node | 631 | net/netrom/nr_route.c | struct nr_node *nr_node; |
nr_node | 639 | net/netrom/nr_route.c | for (nr_node = nr_node_list; nr_node != NULL; nr_node = nr_node->next) |
nr_node | 640 | net/netrom/nr_route.c | if (nr_node->which >= nr_node->count && nr_node->routes[nr_node->which].neighbour == nr_neigh->number) |
nr_node | 641 | net/netrom/nr_route.c | nr_node->which++; |
nr_node | 653 | net/netrom/nr_route.c | struct nr_node *nr_node; |
nr_node | 680 | net/netrom/nr_route.c | for (nr_node = nr_node_list; nr_node != NULL; nr_node = nr_node->next) |
nr_node | 681 | net/netrom/nr_route.c | if (ax25cmp(nr_dest, &nr_node->callsign) == 0) |
nr_node | 684 | net/netrom/nr_route.c | if (nr_node == NULL || nr_node->which >= nr_node->count) |
nr_node | 688 | net/netrom/nr_route.c | if (nr_neigh->number == nr_node->routes[nr_node->which].neighbour) |
nr_node | 713 | net/netrom/nr_route.c | struct nr_node *nr_node; |
nr_node | 723 | net/netrom/nr_route.c | for (nr_node = nr_node_list; nr_node != NULL; nr_node = nr_node->next) { |
nr_node | 725 | net/netrom/nr_route.c | ax2asc(&nr_node->callsign), |
nr_node | 726 | net/netrom/nr_route.c | nr_node->mnemonic, |
nr_node | 727 | net/netrom/nr_route.c | nr_node->which + 1, |
nr_node | 728 | net/netrom/nr_route.c | nr_node->count); |
nr_node | 730 | net/netrom/nr_route.c | for (i = 0; i < nr_node->count; i++) { |
nr_node | 732 | net/netrom/nr_route.c | nr_node->routes[i].quality, |
nr_node | 733 | net/netrom/nr_route.c | nr_node->routes[i].obs_count, |
nr_node | 734 | net/netrom/nr_route.c | nr_node->routes[i].neighbour); |