Lines Matching refs:ax25_rt
47 ax25_route *s, *t, *ax25_rt;
50 ax25_rt = ax25_route_list;
51 while (ax25_rt != NULL) {
52 s = ax25_rt;
53 ax25_rt = ax25_rt->next;
77 ax25_route *ax25_rt;
88 ax25_rt = ax25_route_list;
89 while (ax25_rt != NULL) {
90 if (ax25cmp(&ax25_rt->callsign, &route->dest_addr) == 0 &&
91 ax25_rt->dev == ax25_dev->dev) {
92 kfree(ax25_rt->digipeat);
93 ax25_rt->digipeat = NULL;
95 if ((ax25_rt->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) {
99 ax25_rt->digipeat->lastrepeat = -1;
100 ax25_rt->digipeat->ndigi = route->digi_count;
102 ax25_rt->digipeat->repeated[i] = 0;
103 ax25_rt->digipeat->calls[i] = route->digi_addr[i];
109 ax25_rt = ax25_rt->next;
112 if ((ax25_rt = kmalloc(sizeof(ax25_route), GFP_ATOMIC)) == NULL) {
117 atomic_set(&ax25_rt->refcount, 1);
118 ax25_rt->callsign = route->dest_addr;
119 ax25_rt->dev = ax25_dev->dev;
120 ax25_rt->digipeat = NULL;
121 ax25_rt->ip_mode = ' ';
123 if ((ax25_rt->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) {
125 kfree(ax25_rt);
128 ax25_rt->digipeat->lastrepeat = -1;
129 ax25_rt->digipeat->ndigi = route->digi_count;
131 ax25_rt->digipeat->repeated[i] = 0;
132 ax25_rt->digipeat->calls[i] = route->digi_addr[i];
135 ax25_rt->next = ax25_route_list;
136 ax25_route_list = ax25_rt;
142 void __ax25_put_route(ax25_route *ax25_rt)
144 kfree(ax25_rt->digipeat);
145 kfree(ax25_rt);
150 ax25_route *s, *t, *ax25_rt;
158 ax25_rt = ax25_route_list;
159 while (ax25_rt != NULL) {
160 s = ax25_rt;
161 ax25_rt = ax25_rt->next;
185 ax25_route *ax25_rt;
194 ax25_rt = ax25_route_list;
195 while (ax25_rt != NULL) {
196 if (ax25_rt->dev == ax25_dev->dev &&
197 ax25cmp(&rt_option->dest_addr, &ax25_rt->callsign) == 0) {
204 ax25_rt->ip_mode = rt_option->arg;
216 ax25_rt = ax25_rt->next;
255 struct ax25_route *ax25_rt;
262 for (ax25_rt = ax25_route_list; ax25_rt != NULL; ax25_rt = ax25_rt->next) {
264 return ax25_rt;
291 struct ax25_route *ax25_rt = v;
295 if (ax25cmp(&ax25_rt->callsign, &null_ax25_address) == 0)
298 callsign = ax2asc(buf, &ax25_rt->callsign);
302 ax25_rt->dev ? ax25_rt->dev->name : "???");
304 switch (ax25_rt->ip_mode) {
316 if (ax25_rt->digipeat != NULL)
317 for (i = 0; i < ax25_rt->digipeat->ndigi; i++)
319 ax2asc(buf, &ax25_rt->digipeat->calls[i]));
357 ax25_route *ax25_rt;
364 for (ax25_rt = ax25_route_list; ax25_rt != NULL; ax25_rt = ax25_rt->next) {
366 if (ax25cmp(&ax25_rt->callsign, addr) == 0 && ax25_rt->dev != NULL)
367 ax25_spe_rt = ax25_rt;
368 if (ax25cmp(&ax25_rt->callsign, &null_ax25_address) == 0 && ax25_rt->dev != NULL)
369 ax25_def_rt = ax25_rt;
371 if (ax25cmp(&ax25_rt->callsign, addr) == 0 && ax25_rt->dev == dev)
372 ax25_spe_rt = ax25_rt;
373 if (ax25cmp(&ax25_rt->callsign, &null_ax25_address) == 0 && ax25_rt->dev == dev)
374 ax25_def_rt = ax25_rt;
378 ax25_rt = ax25_def_rt;
380 ax25_rt = ax25_spe_rt;
382 if (ax25_rt != NULL)
383 ax25_hold_route(ax25_rt);
387 return ax25_rt;
414 ax25_route *ax25_rt;
417 if ((ax25_rt = ax25_get_route(addr, NULL)) == NULL)
420 if ((ax25->ax25_dev = ax25_dev_ax25dev(ax25_rt->dev)) == NULL) {
437 if (ax25_rt->digipeat != NULL) {
438 ax25->digipeat = kmemdup(ax25_rt->digipeat, sizeof(ax25_digi),
454 ax25_put_route(ax25_rt);
494 ax25_route *s, *ax25_rt = ax25_route_list;
497 while (ax25_rt != NULL) {
498 s = ax25_rt;
499 ax25_rt = ax25_rt->next;