Lines Matching refs:ax25_rt
44 ax25_route *s, *t, *ax25_rt; in ax25_rt_device_down() local
47 ax25_rt = ax25_route_list; in ax25_rt_device_down()
48 while (ax25_rt != NULL) { in ax25_rt_device_down()
49 s = ax25_rt; in ax25_rt_device_down()
50 ax25_rt = ax25_rt->next; in ax25_rt_device_down()
74 ax25_route *ax25_rt; in ax25_rt_add() local
87 ax25_rt = ax25_route_list; in ax25_rt_add()
88 while (ax25_rt != NULL) { in ax25_rt_add()
89 if (ax25cmp(&ax25_rt->callsign, &route->dest_addr) == 0 && in ax25_rt_add()
90 ax25_rt->dev == ax25_dev->dev) { in ax25_rt_add()
91 kfree(ax25_rt->digipeat); in ax25_rt_add()
92 ax25_rt->digipeat = NULL; in ax25_rt_add()
94 if ((ax25_rt->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) { in ax25_rt_add()
99 ax25_rt->digipeat->lastrepeat = -1; in ax25_rt_add()
100 ax25_rt->digipeat->ndigi = route->digi_count; in ax25_rt_add()
102 ax25_rt->digipeat->repeated[i] = 0; in ax25_rt_add()
103 ax25_rt->digipeat->calls[i] = route->digi_addr[i]; in ax25_rt_add()
110 ax25_rt = ax25_rt->next; in ax25_rt_add()
113 if ((ax25_rt = kmalloc(sizeof(ax25_route), GFP_ATOMIC)) == NULL) { in ax25_rt_add()
119 refcount_set(&ax25_rt->refcount, 1); in ax25_rt_add()
120 ax25_rt->callsign = route->dest_addr; in ax25_rt_add()
121 ax25_rt->dev = ax25_dev->dev; in ax25_rt_add()
122 ax25_rt->digipeat = NULL; in ax25_rt_add()
123 ax25_rt->ip_mode = ' '; in ax25_rt_add()
125 if ((ax25_rt->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) { in ax25_rt_add()
127 kfree(ax25_rt); in ax25_rt_add()
131 ax25_rt->digipeat->lastrepeat = -1; in ax25_rt_add()
132 ax25_rt->digipeat->ndigi = route->digi_count; in ax25_rt_add()
134 ax25_rt->digipeat->repeated[i] = 0; in ax25_rt_add()
135 ax25_rt->digipeat->calls[i] = route->digi_addr[i]; in ax25_rt_add()
138 ax25_rt->next = ax25_route_list; in ax25_rt_add()
139 ax25_route_list = ax25_rt; in ax25_rt_add()
146 void __ax25_put_route(ax25_route *ax25_rt) in __ax25_put_route() argument
148 kfree(ax25_rt->digipeat); in __ax25_put_route()
149 kfree(ax25_rt); in __ax25_put_route()
154 ax25_route *s, *t, *ax25_rt; in ax25_rt_del() local
162 ax25_rt = ax25_route_list; in ax25_rt_del()
163 while (ax25_rt != NULL) { in ax25_rt_del()
164 s = ax25_rt; in ax25_rt_del()
165 ax25_rt = ax25_rt->next; in ax25_rt_del()
190 ax25_route *ax25_rt; in ax25_rt_opt() local
199 ax25_rt = ax25_route_list; in ax25_rt_opt()
200 while (ax25_rt != NULL) { in ax25_rt_opt()
201 if (ax25_rt->dev == ax25_dev->dev && in ax25_rt_opt()
202 ax25cmp(&rt_option->dest_addr, &ax25_rt->callsign) == 0) { in ax25_rt_opt()
209 ax25_rt->ip_mode = rt_option->arg; in ax25_rt_opt()
221 ax25_rt = ax25_rt->next; in ax25_rt_opt()
261 struct ax25_route *ax25_rt; in ax25_rt_seq_start() local
268 for (ax25_rt = ax25_route_list; ax25_rt != NULL; ax25_rt = ax25_rt->next) { in ax25_rt_seq_start()
270 return ax25_rt; in ax25_rt_seq_start()
297 struct ax25_route *ax25_rt = v; in ax25_rt_seq_show() local
301 if (ax25cmp(&ax25_rt->callsign, &null_ax25_address) == 0) in ax25_rt_seq_show()
304 callsign = ax2asc(buf, &ax25_rt->callsign); in ax25_rt_seq_show()
308 ax25_rt->dev ? ax25_rt->dev->name : "???"); in ax25_rt_seq_show()
310 switch (ax25_rt->ip_mode) { in ax25_rt_seq_show()
322 if (ax25_rt->digipeat != NULL) in ax25_rt_seq_show()
323 for (i = 0; i < ax25_rt->digipeat->ndigi; i++) in ax25_rt_seq_show()
325 ax2asc(buf, &ax25_rt->digipeat->calls[i])); in ax25_rt_seq_show()
350 ax25_route *ax25_rt; in ax25_get_route() local
356 for (ax25_rt = ax25_route_list; ax25_rt != NULL; ax25_rt = ax25_rt->next) { in ax25_get_route()
358 if (ax25cmp(&ax25_rt->callsign, addr) == 0 && ax25_rt->dev != NULL) in ax25_get_route()
359 ax25_spe_rt = ax25_rt; in ax25_get_route()
360 if (ax25cmp(&ax25_rt->callsign, &null_ax25_address) == 0 && ax25_rt->dev != NULL) in ax25_get_route()
361 ax25_def_rt = ax25_rt; in ax25_get_route()
363 if (ax25cmp(&ax25_rt->callsign, addr) == 0 && ax25_rt->dev == dev) in ax25_get_route()
364 ax25_spe_rt = ax25_rt; in ax25_get_route()
365 if (ax25cmp(&ax25_rt->callsign, &null_ax25_address) == 0 && ax25_rt->dev == dev) in ax25_get_route()
366 ax25_def_rt = ax25_rt; in ax25_get_route()
370 ax25_rt = ax25_def_rt; in ax25_get_route()
372 ax25_rt = ax25_spe_rt; in ax25_get_route()
374 return ax25_rt; in ax25_get_route()
401 ax25_route *ax25_rt; in ax25_rt_autobind() local
405 ax25_rt = ax25_get_route(addr, NULL); in ax25_rt_autobind()
406 if (!ax25_rt) { in ax25_rt_autobind()
410 if ((ax25->ax25_dev = ax25_dev_ax25dev(ax25_rt->dev)) == NULL) { in ax25_rt_autobind()
427 if (ax25_rt->digipeat != NULL) { in ax25_rt_autobind()
428 ax25->digipeat = kmemdup(ax25_rt->digipeat, sizeof(ax25_digi), in ax25_rt_autobind()
478 ax25_route *s, *ax25_rt = ax25_route_list; in ax25_rt_free() local
481 while (ax25_rt != NULL) { in ax25_rt_free()
482 s = ax25_rt; in ax25_rt_free()
483 ax25_rt = ax25_rt->next; in ax25_rt_free()