Home | History | Annotate | Download | only in dist

Lines Matching refs:nodes

33 					  ipf_rdx_node_t nodes[2], int *));
92 /* nodes(O) - pair of ipf_rdx_node_t's to initialise with data */
95 /* Initialise the fields in a pair of radix tree nodes according to the */
101 buildnodes(addr, mask, nodes)
103 ipf_rdx_node_t nodes[2];
122 bzero(&nodes[0], sizeof(ipf_rdx_node_t) * 2);
123 nodes[0].maskbitcount = maskbits;
124 nodes[0].index = -1 - (ADF_OFF_BITS + maskbits);
125 nodes[0].addrkey = (u_32_t *)addr;
126 nodes[0].maskkey = (u_32_t *)mask;
127 nodes[0].addroff = nodes[0].addrkey + masklen;
128 nodes[0].maskoff = nodes[0].maskkey + masklen;
129 nodes[0].parent = &nodes[1];
130 nodes[0].offset = masklen;
131 nodes[0].lastmask = lastmask;
132 nodes[1].offset = masklen;
133 nodes[1].left = &nodes[0];
134 nodes[1].maskbitcount = maskbits;
136 (void) strcpy(nodes[0].name, "_BUILD.0");
137 (void) strcpy(nodes[1].name, "_BUILD.1");
322 /* Paramters: head(I) - pointer to tree head to add nodes to */
323 /* nodes(I) - pointer to radix nodes to be added */
326 /* Add the new radix tree entry that owns nodes[] to the tree given by head.*/
333 ipf_rx_insert(head, nodes, dup)
335 ipf_rdx_node_t nodes[2];
355 addr = nodes[0].addrkey;
378 nodes[1].index = nlen;
379 nodes[1].bitmask = htonl(0x80000000 >> (nlen & 0x1f));
380 nodes[0].offset = nlen / 32;
381 nodes[1].offset = nlen / 32;
392 key = nodes[0].addrkey;
403 prev->left = &nodes[1];
405 prev->right = &nodes[1];
407 cur->parent = &nodes[1];
408 nodes[1].parent = prev;
409 if ((key[nodes[1].offset] & nodes[1].bitmask) == 0) {
410 nodes[1].right = cur;
412 nodes[1].right = &nodes[0];
413 nodes[1].left = cur;
416 nodeoff = nodes[0].offset;
417 nodekey = nodes[0].addrkey[nodeoff];
418 nodemask = nodes[0].lastmask;
419 nodebits = nodes[0].maskbitcount;
426 for (cur = nodes[1].parent; cur->root == 0; cur = cur->parent) {
439 mask->node = &nodes[0];
441 mask->mask = nodes[0].maskkey;
442 nodes[0].mymask = mask;
454 * No higher up nodes qualify, so attach mask locally.
456 pmask = &nodes[0].masks;
465 cur = nodes[1].right;
470 ipf_rx_attach_mask(&nodes[0], mask);
476 cur = nodes[1].left;
477 if (cur->root == 0 && cur != &nodes[0]) {
481 ipf_rx_attach_mask(&nodes[0], mask);
487 return (&nodes[0]);
497 /* nodes(I) - radix tree data nodes inside allocate structure */
500 /* (addr,mask). No memory allocation for the radix nodes themselves is */
506 /* the key material (addr,mask) and the radix tree nodes[]. */
513 ipf_rx_addroute(head, addr, mask, nodes)
516 ipf_rdx_node_t *nodes;
523 buildnodes(addr, mask, nodes);
524 x = ipf_rx_insert(head, nodes, &dup);
529 node = &nodes[0];
551 nodes[0].dupkey = x;
552 prev->dupkey = &nodes[0];
553 nodes[0].parent = prev;
555 x->parent = &nodes[0];
557 nodes[0].dupkey = x->dupkey;
559 nodes[0].parent = prev;
560 x->parent = &nodes[0];
562 prev->left = &nodes[0];
564 prev->right = &nodes[0];
568 return &nodes[0];
626 * to other tree nodes need to be preserved and
827 node = ptr->nodes;
948 struct ipf_rdx_node nodes[2];
1164 ipf_rdx_node_t *node = &stp->nodes[0];
1166 if (stp->nodes[0].index > 0)
1167 stp = (myst_t *)&stp->nodes[-1];
1218 GNAME(&rnh->nodes[0]),
1219 rnh->nodes[0].index, GNAME(rnh->nodes[0].parent),
1220 GNAME(rnh->nodes[0].left), GNAME(rnh->nodes[0].right));
1222 GNAME(&rnh->nodes[1]),
1223 rnh->nodes[1].index, GNAME(rnh->nodes[1].parent),
1224 GNAME(rnh->nodes[1].left), GNAME(rnh->nodes[1].right));
1226 GNAME(&rnh->nodes[2]),
1227 rnh->nodes[2].index, GNAME(rnh->nodes[2].parent),
1228 GNAME(rnh->nodes[2].left), GNAME(rnh->nodes[2].right));
1401 stp->nodes[0].parent = &stp->nodes[0];
1402 stp->nodes[1].parent = &stp->nodes[1];
1427 rn = ipf_rx_addroute(rnh, &stp->dst, &stp->mask, stp->nodes);
1449 rn = &s1->nodes[1];