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 ax25_rt->callsign = route->dest_addr; in ax25_rt_add()
120 ax25_rt->dev = ax25_dev->dev; in ax25_rt_add()
121 ax25_rt->digipeat = NULL; in ax25_rt_add()
122 ax25_rt->ip_mode = ' '; in ax25_rt_add()
124 if ((ax25_rt->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) { in ax25_rt_add()
126 kfree(ax25_rt); in ax25_rt_add()
130 ax25_rt->digipeat->lastrepeat = -1; in ax25_rt_add()
131 ax25_rt->digipeat->ndigi = route->digi_count; in ax25_rt_add()
133 ax25_rt->digipeat->repeated[i] = 0; in ax25_rt_add()
134 ax25_rt->digipeat->calls[i] = route->digi_addr[i]; in ax25_rt_add()
137 ax25_rt->next = ax25_route_list; in ax25_rt_add()
138 ax25_route_list = ax25_rt; in ax25_rt_add()
145 void __ax25_put_route(ax25_route *ax25_rt) in __ax25_put_route() argument
147 kfree(ax25_rt->digipeat); in __ax25_put_route()
148 kfree(ax25_rt); in __ax25_put_route()
153 ax25_route *s, *t, *ax25_rt; in ax25_rt_del() local
161 ax25_rt = ax25_route_list; in ax25_rt_del()
162 while (ax25_rt != NULL) { in ax25_rt_del()
163 s = ax25_rt; in ax25_rt_del()
164 ax25_rt = ax25_rt->next; in ax25_rt_del()
189 ax25_route *ax25_rt; in ax25_rt_opt() local
198 ax25_rt = ax25_route_list; in ax25_rt_opt()
199 while (ax25_rt != NULL) { in ax25_rt_opt()
200 if (ax25_rt->dev == ax25_dev->dev && in ax25_rt_opt()
201 ax25cmp(&rt_option->dest_addr, &ax25_rt->callsign) == 0) { in ax25_rt_opt()
208 ax25_rt->ip_mode = rt_option->arg; in ax25_rt_opt()
220 ax25_rt = ax25_rt->next; in ax25_rt_opt()
260 struct ax25_route *ax25_rt; in ax25_rt_seq_start() local
267 for (ax25_rt = ax25_route_list; ax25_rt != NULL; ax25_rt = ax25_rt->next) { in ax25_rt_seq_start()
269 return ax25_rt; in ax25_rt_seq_start()
296 struct ax25_route *ax25_rt = v; in ax25_rt_seq_show() local
300 if (ax25cmp(&ax25_rt->callsign, &null_ax25_address) == 0) in ax25_rt_seq_show()
303 callsign = ax2asc(buf, &ax25_rt->callsign); in ax25_rt_seq_show()
307 ax25_rt->dev ? ax25_rt->dev->name : "???"); in ax25_rt_seq_show()
309 switch (ax25_rt->ip_mode) { in ax25_rt_seq_show()
321 if (ax25_rt->digipeat != NULL) in ax25_rt_seq_show()
322 for (i = 0; i < ax25_rt->digipeat->ndigi; i++) in ax25_rt_seq_show()
324 ax2asc(buf, &ax25_rt->digipeat->calls[i])); in ax25_rt_seq_show()
349 ax25_route *ax25_rt; in ax25_get_route() local
355 for (ax25_rt = ax25_route_list; ax25_rt != NULL; ax25_rt = ax25_rt->next) { in ax25_get_route()
357 if (ax25cmp(&ax25_rt->callsign, addr) == 0 && ax25_rt->dev != NULL) in ax25_get_route()
358 ax25_spe_rt = ax25_rt; in ax25_get_route()
359 if (ax25cmp(&ax25_rt->callsign, &null_ax25_address) == 0 && ax25_rt->dev != NULL) in ax25_get_route()
360 ax25_def_rt = ax25_rt; in ax25_get_route()
362 if (ax25cmp(&ax25_rt->callsign, addr) == 0 && ax25_rt->dev == dev) in ax25_get_route()
363 ax25_spe_rt = ax25_rt; in ax25_get_route()
364 if (ax25cmp(&ax25_rt->callsign, &null_ax25_address) == 0 && ax25_rt->dev == dev) in ax25_get_route()
365 ax25_def_rt = ax25_rt; in ax25_get_route()
369 ax25_rt = ax25_def_rt; in ax25_get_route()
371 ax25_rt = ax25_spe_rt; in ax25_get_route()
373 return ax25_rt; in ax25_get_route()
400 ax25_route *ax25_rt; in ax25_rt_autobind() local
404 ax25_rt = ax25_get_route(addr, NULL); in ax25_rt_autobind()
405 if (!ax25_rt) { in ax25_rt_autobind()
409 if ((ax25->ax25_dev = ax25_dev_ax25dev(ax25_rt->dev)) == NULL) { in ax25_rt_autobind()
426 if (ax25_rt->digipeat != NULL) { in ax25_rt_autobind()
427 ax25->digipeat = kmemdup(ax25_rt->digipeat, sizeof(ax25_digi), in ax25_rt_autobind()
477 ax25_route *s, *ax25_rt = ax25_route_list; in ax25_rt_free() local
480 while (ax25_rt != NULL) { in ax25_rt_free()
481 s = ax25_rt; in ax25_rt_free()
482 ax25_rt = ax25_rt->next; in ax25_rt_free()