patch-2.1.22 linux/net/rose/rose_route.c
Next file: linux/net/rose/rose_subr.c
Previous file: linux/net/rose/rose_out.c
Back to the patch index
Back to the overall index
- Lines: 191
- Date:
Sun Jan 19 15:47:29 1997
- Orig file:
v2.1.21/linux/net/rose/rose_route.c
- Orig date:
Thu Jan 2 15:55:29 1997
diff -u --recursive --new-file v2.1.21/linux/net/rose/rose_route.c linux/net/rose/rose_route.c
@@ -17,7 +17,7 @@
* Terry(VK2KTJ) Added support for variable length
* address masks.
*/
-
+
#include <linux/config.h>
#if defined(CONFIG_ROSE) || defined(CONFIG_ROSE_MODULE)
#include <linux/errno.h>
@@ -99,7 +99,7 @@
for (i = 0; i < rose_route->ndigis; i++)
rose_neigh->digipeat->calls[i] = rose_route->digipeaters[i];
}
-
+
save_flags(flags); cli();
rose_neigh->next = rose_neigh_list;
rose_neigh_list = rose_neigh;
@@ -157,7 +157,7 @@
}
restore_flags(flags);
-
+
rose_neigh->count++;
return 0;
@@ -169,7 +169,7 @@
rose_node->neighbour[1] = rose_node->neighbour[0];
rose_node->neighbour[0] = rose_neigh;
-
+
rose_node->count++;
rose_neigh->count++;
}
@@ -213,10 +213,10 @@
struct sk_buff *skb;
del_timer(&rose_neigh->timer);
-
+
while ((skb = skb_dequeue(&rose_neigh->queue)) != NULL)
kfree_skb(skb, FREE_WRITE);
-
+
save_flags(flags);
cli();
@@ -283,7 +283,7 @@
struct rose_node *rose_node;
struct rose_neigh *rose_neigh;
int i;
-
+
for (rose_node = rose_node_list; rose_node != NULL; rose_node = rose_node->next)
if ((rose_node->mask == rose_route->mask) && (rosecmpm(&rose_route->address, &rose_node->address, rose_route->mask) == 0))
break;
@@ -295,7 +295,7 @@
break;
if (rose_neigh == NULL) return -EINVAL;
-
+
for (i = 0; i < rose_node->count; i++) {
if (rose_node->neighbour[i] == rose_neigh) {
rose_neigh->count--;
@@ -304,7 +304,7 @@
rose_remove_neigh(rose_neigh);
rose_node->count--;
-
+
if (rose_node->count == 0) {
rose_remove_node(rose_node);
} else {
@@ -337,14 +337,14 @@
while (rose_neigh != NULL) {
s = rose_neigh;
rose_neigh = rose_neigh->next;
-
+
if (s->dev == dev) {
rose_node = rose_node_list;
while (rose_node != NULL) {
t = rose_node;
rose_node = rose_node->next;
-
+
for (i = 0; i < t->count; i++) {
if (t->neighbour[i] == s) {
t->count--;
@@ -359,11 +359,11 @@
}
}
}
-
+
if (t->count <= 0)
rose_remove_node(t);
}
-
+
rose_remove_neigh(s);
}
}
@@ -379,7 +379,7 @@
while (rose_route != NULL) {
s = rose_route;
rose_route = rose_route->next;
-
+
if (s->neigh1->dev == dev || s->neigh2->dev == dev)
rose_remove_route(s);
}
@@ -442,9 +442,9 @@
break;
if (node == NULL) return NULL;
-
+
if (node->which >= node->count) return NULL;
-
+
return node->neighbour[node->which];
}
@@ -509,7 +509,7 @@
while ((skb = skb_dequeue(&rose_neigh->queue)) != NULL)
kfree_skb(skb, FREE_WRITE);
-
+
for (rose_node = rose_node_list; rose_node != NULL; rose_node = rose_node->next)
if (rose_node->which < rose_node->count && rose_node->neighbour[rose_node->which] == rose_neigh)
rose_node->which++;
@@ -748,8 +748,8 @@
rose_neigh->dev ? rose_neigh->dev->name : "???",
rose_neigh->count,
(rose_neigh->restarted) ? "yes" : "no",
- rose_neigh->t0timer / PR_SLOWHZ,
- rose_neigh->t0 / PR_SLOWHZ);
+ rose_neigh->t0timer / ROSE_SLOWHZ,
+ rose_neigh->t0 / ROSE_SLOWHZ);
pos = begin + len;
@@ -757,7 +757,7 @@
len = 0;
begin = pos;
}
-
+
if (pos > offset + length)
break;
}
@@ -800,7 +800,7 @@
len = 0;
begin = pos;
}
-
+
if (pos > offset + length)
break;
}
@@ -829,21 +829,21 @@
while (rose_neigh != NULL) {
s = rose_neigh;
rose_neigh = rose_neigh->next;
-
+
rose_remove_neigh(s);
}
while (rose_node != NULL) {
t = rose_node;
rose_node = rose_node->next;
-
+
rose_remove_node(t);
}
while (rose_route != NULL) {
u = rose_route;
rose_route = rose_route->next;
-
+
rose_remove_route(u);
}
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov