Lines Matching refs:rt

29 	struct x25_route *rt;  in x25_add_route()  local
34 list_for_each_entry(rt, &x25_route_list, node) { in x25_add_route()
35 if (!memcmp(&rt->address, address, sigdigits) && in x25_add_route()
36 rt->sigdigits == sigdigits) in x25_add_route()
40 rt = kmalloc(sizeof(*rt), GFP_ATOMIC); in x25_add_route()
42 if (!rt) in x25_add_route()
45 strcpy(rt->address.x25_addr, "000000000000000"); in x25_add_route()
46 memcpy(rt->address.x25_addr, address->x25_addr, sigdigits); in x25_add_route()
48 rt->sigdigits = sigdigits; in x25_add_route()
49 rt->dev = dev; in x25_add_route()
50 refcount_set(&rt->refcnt, 1); in x25_add_route()
52 list_add(&rt->node, &x25_route_list); in x25_add_route()
66 static void __x25_remove_route(struct x25_route *rt) in __x25_remove_route() argument
68 if (rt->node.next) { in __x25_remove_route()
69 list_del(&rt->node); in __x25_remove_route()
70 x25_route_put(rt); in __x25_remove_route()
77 struct x25_route *rt; in x25_del_route() local
82 list_for_each_entry(rt, &x25_route_list, node) { in x25_del_route()
83 if (!memcmp(&rt->address, address, sigdigits) && in x25_del_route()
84 rt->sigdigits == sigdigits && rt->dev == dev) { in x25_del_route()
85 __x25_remove_route(rt); in x25_del_route()
100 struct x25_route *rt; in x25_route_device_down() local
106 rt = list_entry(entry, struct x25_route, node); in x25_route_device_down()
108 if (rt->dev == dev) in x25_route_device_down()
109 __x25_remove_route(rt); in x25_route_device_down()
137 struct x25_route *rt, *use = NULL; in x25_get_route() local
141 list_for_each_entry(rt, &x25_route_list, node) { in x25_get_route()
142 if (!memcmp(&rt->address, addr, rt->sigdigits)) { in x25_get_route()
144 use = rt; in x25_get_route()
145 else if (rt->sigdigits > use->sigdigits) in x25_get_route()
146 use = rt; in x25_get_route()
162 struct x25_route_struct rt; in x25_route_ioctl() local
170 if (copy_from_user(&rt, arg, sizeof(rt))) in x25_route_ioctl()
174 if (rt.sigdigits > 15) in x25_route_ioctl()
177 dev = x25_dev_get(rt.device); in x25_route_ioctl()
182 rc = x25_add_route(&rt.address, rt.sigdigits, dev); in x25_route_ioctl()
184 rc = x25_del_route(&rt.address, rt.sigdigits, dev); in x25_route_ioctl()
195 struct x25_route *rt; in x25_route_free() local
200 rt = list_entry(entry, struct x25_route, node); in x25_route_free()
201 __x25_remove_route(rt); in x25_route_free()