• Home
  • Raw
  • Download

Lines Matching refs:rose_neigh

40 static struct rose_neigh *rose_neigh_list;
45 struct rose_neigh *rose_loopback_neigh;
55 struct rose_neigh *rose_neigh; in rose_add_node() local
75 rose_neigh = rose_neigh_list; in rose_add_node()
76 while (rose_neigh != NULL) { in rose_add_node()
78 &rose_neigh->callsign) == 0 && in rose_add_node()
79 rose_neigh->dev == dev) in rose_add_node()
81 rose_neigh = rose_neigh->next; in rose_add_node()
84 if (rose_neigh == NULL) { in rose_add_node()
85 rose_neigh = kmalloc(sizeof(*rose_neigh), GFP_ATOMIC); in rose_add_node()
86 if (rose_neigh == NULL) { in rose_add_node()
91 rose_neigh->callsign = rose_route->neighbour; in rose_add_node()
92 rose_neigh->digipeat = NULL; in rose_add_node()
93 rose_neigh->ax25 = NULL; in rose_add_node()
94 rose_neigh->dev = dev; in rose_add_node()
95 rose_neigh->count = 0; in rose_add_node()
96 rose_neigh->use = 0; in rose_add_node()
97 rose_neigh->dce_mode = 0; in rose_add_node()
98 rose_neigh->loopback = 0; in rose_add_node()
99 rose_neigh->number = rose_neigh_no++; in rose_add_node()
100 rose_neigh->restarted = 0; in rose_add_node()
102 skb_queue_head_init(&rose_neigh->queue); in rose_add_node()
104 timer_setup(&rose_neigh->ftimer, NULL, 0); in rose_add_node()
105 timer_setup(&rose_neigh->t0timer, NULL, 0); in rose_add_node()
108 rose_neigh->digipeat = in rose_add_node()
110 if (rose_neigh->digipeat == NULL) { in rose_add_node()
111 kfree(rose_neigh); in rose_add_node()
116 rose_neigh->digipeat->ndigi = rose_route->ndigis; in rose_add_node()
117 rose_neigh->digipeat->lastrepeat = -1; in rose_add_node()
120 rose_neigh->digipeat->calls[i] = in rose_add_node()
122 rose_neigh->digipeat->repeated[i] = 0; in rose_add_node()
126 rose_neigh->next = rose_neigh_list; in rose_add_node()
127 rose_neigh_list = rose_neigh; in rose_add_node()
161 rose_node->neighbour[0] = rose_neigh; in rose_add_node()
180 rose_neigh->count++; in rose_add_node()
187 rose_node->neighbour[rose_node->count] = rose_neigh; in rose_add_node()
189 rose_neigh->count++; in rose_add_node()
226 static void rose_remove_neigh(struct rose_neigh *rose_neigh) in rose_remove_neigh() argument
228 struct rose_neigh *s; in rose_remove_neigh()
230 del_timer_sync(&rose_neigh->ftimer); in rose_remove_neigh()
231 del_timer_sync(&rose_neigh->t0timer); in rose_remove_neigh()
233 skb_queue_purge(&rose_neigh->queue); in rose_remove_neigh()
235 if ((s = rose_neigh_list) == rose_neigh) { in rose_remove_neigh()
236 rose_neigh_list = rose_neigh->next; in rose_remove_neigh()
237 if (rose_neigh->ax25) in rose_remove_neigh()
238 ax25_cb_put(rose_neigh->ax25); in rose_remove_neigh()
239 kfree(rose_neigh->digipeat); in rose_remove_neigh()
240 kfree(rose_neigh); in rose_remove_neigh()
245 if (s->next == rose_neigh) { in rose_remove_neigh()
246 s->next = rose_neigh->next; in rose_remove_neigh()
247 if (rose_neigh->ax25) in rose_remove_neigh()
248 ax25_cb_put(rose_neigh->ax25); in rose_remove_neigh()
249 kfree(rose_neigh->digipeat); in rose_remove_neigh()
250 kfree(rose_neigh); in rose_remove_neigh()
296 struct rose_neigh *rose_neigh; in rose_del_node() local
316 rose_neigh = rose_neigh_list; in rose_del_node()
317 while (rose_neigh != NULL) { in rose_del_node()
319 &rose_neigh->callsign) == 0 && in rose_del_node()
320 rose_neigh->dev == dev) in rose_del_node()
322 rose_neigh = rose_neigh->next; in rose_del_node()
325 if (rose_neigh == NULL) { in rose_del_node()
331 if (rose_node->neighbour[i] == rose_neigh) { in rose_del_node()
332 rose_neigh->count--; in rose_del_node()
334 if (rose_neigh->count == 0 && rose_neigh->use == 0) in rose_del_node()
335 rose_remove_neigh(rose_neigh); in rose_del_node()
371 struct rose_neigh *sn; in rose_add_loopback_neigh()
373 rose_loopback_neigh = kmalloc(sizeof(struct rose_neigh), GFP_KERNEL); in rose_add_loopback_neigh()
479 struct rose_neigh *s, *rose_neigh; in rose_rt_device_down() local
485 rose_neigh = rose_neigh_list; in rose_rt_device_down()
486 while (rose_neigh != NULL) { in rose_rt_device_down()
487 s = rose_neigh; in rose_rt_device_down()
488 rose_neigh = rose_neigh->next; in rose_rt_device_down()
554 struct rose_neigh *s, *rose_neigh; in rose_clear_routes() local
560 rose_neigh = rose_neigh_list; in rose_clear_routes()
570 while (rose_neigh != NULL) { in rose_clear_routes()
571 s = rose_neigh; in rose_clear_routes()
572 rose_neigh = rose_neigh->next; in rose_clear_routes()
661 struct rose_route *rose_route_free_lci(unsigned int lci, struct rose_neigh *neigh) in rose_route_free_lci()
676 struct rose_neigh *rose_get_neigh(rose_address *addr, unsigned char *cause, in rose_get_neigh()
679 struct rose_neigh *res = NULL; in rose_get_neigh()
764 static void rose_del_route_by_neigh(struct rose_neigh *rose_neigh) in rose_del_route_by_neigh() argument
768 rose_neigh->restarted = 0; in rose_del_route_by_neigh()
770 rose_stop_t0timer(rose_neigh); in rose_del_route_by_neigh()
771 rose_start_ftimer(rose_neigh); in rose_del_route_by_neigh()
773 skb_queue_purge(&rose_neigh->queue); in rose_del_route_by_neigh()
780 if ((rose_route->neigh1 == rose_neigh && rose_route->neigh2 == rose_neigh) || in rose_del_route_by_neigh()
781 (rose_route->neigh1 == rose_neigh && rose_route->neigh2 == NULL) || in rose_del_route_by_neigh()
782 (rose_route->neigh2 == rose_neigh && rose_route->neigh1 == NULL)) { in rose_del_route_by_neigh()
789 if (rose_route->neigh1 == rose_neigh) { in rose_del_route_by_neigh()
795 if (rose_route->neigh2 == rose_neigh) { in rose_del_route_by_neigh()
813 struct rose_neigh *rose_neigh; in rose_link_failed() local
816 rose_neigh = rose_neigh_list; in rose_link_failed()
817 while (rose_neigh != NULL) { in rose_link_failed()
818 if (rose_neigh->ax25 == ax25) in rose_link_failed()
820 rose_neigh = rose_neigh->next; in rose_link_failed()
823 if (rose_neigh != NULL) { in rose_link_failed()
824 rose_neigh->ax25 = NULL; in rose_link_failed()
827 rose_del_route_by_neigh(rose_neigh); in rose_link_failed()
828 rose_kill_by_neigh(rose_neigh); in rose_link_failed()
839 struct rose_neigh *rose_neigh; in rose_link_device_down() local
841 for (rose_neigh = rose_neigh_list; rose_neigh != NULL; rose_neigh = rose_neigh->next) { in rose_link_device_down()
842 if (rose_neigh->dev == dev) { in rose_link_device_down()
843 rose_del_route_by_neigh(rose_neigh); in rose_link_device_down()
844 rose_kill_by_neigh(rose_neigh); in rose_link_device_down()
855 struct rose_neigh *rose_neigh, *new_neigh; in rose_route_frame() local
886 rose_neigh = rose_neigh_list; in rose_route_frame()
887 while (rose_neigh != NULL) { in rose_route_frame()
888 if (ax25cmp(&ax25->dest_addr, &rose_neigh->callsign) == 0 && in rose_route_frame()
889 ax25->ax25_dev->dev == rose_neigh->dev) in rose_route_frame()
891 rose_neigh = rose_neigh->next; in rose_route_frame()
894 if (rose_neigh == NULL) { in rose_route_frame()
903 rose_stop_ftimer(rose_neigh); in rose_route_frame()
910 rose_link_rx_restart(skb, rose_neigh, frametype); in rose_route_frame()
917 if ((sk = rose_find_socket(lci, rose_neigh)) != NULL) { in rose_route_frame()
949 res = rose_rx_call_request(skb, dev, rose_neigh, lci); in rose_route_frame()
955 rose_transmit_clear_request(rose_neigh, lci, ROSE_NOT_OBTAINABLE, 0); in rose_route_frame()
965 rose_route->neigh1 == rose_neigh) { in rose_route_frame()
986 rose_route->neigh2 == rose_neigh) { in rose_route_frame()
1024 rose_transmit_clear_request(rose_neigh, lci, ROSE_INVALID_FACILITY, 76); in rose_route_frame()
1037 rose_transmit_clear_request(rose_neigh, lci, ROSE_NOT_OBTAINABLE, 120); in rose_route_frame()
1044 rose_transmit_clear_request(rose_neigh, lci, cause, diagnostic); in rose_route_frame()
1049 rose_transmit_clear_request(rose_neigh, lci, ROSE_NETWORK_CONGESTION, 71); in rose_route_frame()
1054 rose_transmit_clear_request(rose_neigh, lci, ROSE_NETWORK_CONGESTION, 120); in rose_route_frame()
1064 rose_route->neigh1 = rose_neigh; in rose_route_frame()
1159 struct rose_neigh *rose_neigh; in rose_neigh_start() local
1166 for (rose_neigh = rose_neigh_list; rose_neigh && i < *pos; in rose_neigh_start()
1167 rose_neigh = rose_neigh->next, ++i); in rose_neigh_start()
1169 return (i == *pos) ? rose_neigh : NULL; in rose_neigh_start()
1177 : ((struct rose_neigh *)v)->next; in rose_neigh_next()
1195 struct rose_neigh *rose_neigh = v; in rose_neigh_show() local
1199 rose_neigh->number, in rose_neigh_show()
1200 (rose_neigh->loopback) ? "RSLOOP-0" : ax2asc(buf, &rose_neigh->callsign), in rose_neigh_show()
1201 rose_neigh->dev ? rose_neigh->dev->name : "???", in rose_neigh_show()
1202 rose_neigh->count, in rose_neigh_show()
1203 rose_neigh->use, in rose_neigh_show()
1204 (rose_neigh->dce_mode) ? "DCE" : "DTE", in rose_neigh_show()
1205 (rose_neigh->restarted) ? "yes" : "no", in rose_neigh_show()
1206 ax25_display_timer(&rose_neigh->t0timer) / HZ, in rose_neigh_show()
1207 ax25_display_timer(&rose_neigh->ftimer) / HZ); in rose_neigh_show()
1209 if (rose_neigh->digipeat != NULL) { in rose_neigh_show()
1210 for (i = 0; i < rose_neigh->digipeat->ndigi; i++) in rose_neigh_show()
1211 seq_printf(seq, " %s", ax2asc(buf, &rose_neigh->digipeat->calls[i])); in rose_neigh_show()
1305 struct rose_neigh *s, *rose_neigh = rose_neigh_list; in rose_rt_free() local
1309 while (rose_neigh != NULL) { in rose_rt_free()
1310 s = rose_neigh; in rose_rt_free()
1311 rose_neigh = rose_neigh->next; in rose_rt_free()