/net/x25/ |
D | x25_route.c | 33 struct x25_route *rt; in x25_add_route() local 40 rt = list_entry(entry, struct x25_route, node); in x25_add_route() 42 if (!memcmp(&rt->address, address, sigdigits) && in x25_add_route() 43 rt->sigdigits == sigdigits) in x25_add_route() 47 rt = kmalloc(sizeof(*rt), GFP_ATOMIC); in x25_add_route() 49 if (!rt) in x25_add_route() 52 strcpy(rt->address.x25_addr, "000000000000000"); in x25_add_route() 53 memcpy(rt->address.x25_addr, address->x25_addr, sigdigits); in x25_add_route() 55 rt->sigdigits = sigdigits; in x25_add_route() 56 rt->dev = dev; in x25_add_route() [all …]
|
D | x25_proc.c | 31 struct x25_route *rt = NULL; in x25_get_route_idx() local 34 rt = list_entry(route_entry, struct x25_route, node); in x25_get_route_idx() 38 rt = NULL; in x25_get_route_idx() 40 return rt; in x25_get_route_idx() 54 struct x25_route *rt; in x25_seq_route_next() local 58 rt = NULL; in x25_seq_route_next() 60 rt = list_entry(x25_route_list.next, in x25_seq_route_next() 64 rt = v; in x25_seq_route_next() 65 if (rt->node.next != &x25_route_list) in x25_seq_route_next() 66 rt = list_entry(rt->node.next, struct x25_route, node); in x25_seq_route_next() [all …]
|
D | x25_forward.c | 21 struct x25_route *rt; in x25_forward_call() local 29 if ((rt = x25_get_route(dest_addr)) == NULL) in x25_forward_call() 32 if ((neigh_new = x25_get_neigh(rt->dev)) == NULL) { in x25_forward_call() 42 if (rt->dev == from->dev) { in x25_forward_call() 67 new_frwd->dev1 = rt->dev; in x25_forward_call() 86 x25_route_put(rt); in x25_forward_call()
|
/net/ipv6/ |
D | route.c | 193 struct rt6_info *rt = (struct rt6_info *)dst; in ip6_dst_destroy() local 194 struct inet6_dev *idev = rt->rt6i_idev; in ip6_dst_destroy() 197 rt->rt6i_idev = NULL; in ip6_dst_destroy() 205 struct rt6_info *rt = (struct rt6_info *)dst; in ip6_dst_ifdown() local 206 struct inet6_dev *idev = rt->rt6i_idev; in ip6_dst_ifdown() 214 rt->rt6i_idev = loopback_idev; in ip6_dst_ifdown() 220 static __inline__ int rt6_check_expired(const struct rt6_info *rt) in rt6_check_expired() argument 222 return (rt->rt6i_flags & RTF_EXPIRES && in rt6_check_expired() 223 time_after(jiffies, rt->rt6i_expires)); in rt6_check_expired() 237 struct rt6_info *rt, in rt6_device_match() [all …]
|
D | ip6_fib.c | 79 struct rt6_info *rt); 161 static __inline__ void rt6_release(struct rt6_info *rt) in rt6_release() argument 163 if (atomic_dec_and_test(&rt->rt6i_ref)) in rt6_release() 164 dst_free(&rt->u.dst); in rt6_release() 281 struct rt6_info *rt; in fib6_dump_node() local 283 for (rt = w->leaf; rt; rt = rt->u.dst.rt6_next) { in fib6_dump_node() 284 res = rt6_dump_route(rt, w->args); in fib6_dump_node() 287 w->leaf = rt; in fib6_dump_node() 602 static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt, in fib6_add_rt2node() argument 615 if (iter->rt6i_metric == rt->rt6i_metric) { in fib6_add_rt2node() [all …]
|
D | xfrm6_policy.c | 110 struct rt6_info *rt = (struct rt6_info*)dst; in xfrm6_init_path() local 111 if (rt->rt6i_node) in xfrm6_init_path() 112 path->path_cookie = rt->rt6i_node->fn_sernum; in xfrm6_init_path() 122 struct rt6_info *rt = (struct rt6_info*)xdst->route; in xfrm6_fill_dst() local 127 xdst->u.rt6.rt6i_idev = in6_dev_get(rt->u.dst.dev); in xfrm6_fill_dst() 133 xdst->u.rt6.rt6i_flags = rt->rt6i_flags & (RTF_ANYCAST | in xfrm6_fill_dst() 135 xdst->u.rt6.rt6i_metric = rt->rt6i_metric; in xfrm6_fill_dst() 136 xdst->u.rt6.rt6i_node = rt->rt6i_node; in xfrm6_fill_dst() 137 if (rt->rt6i_node) in xfrm6_fill_dst() 138 xdst->route_cookie = rt->rt6i_node->fn_sernum; in xfrm6_fill_dst() [all …]
|
D | fib6_rules.c | 53 struct rt6_info *rt = NULL; in fib6_rule_action() local 62 rt = net->ipv6.ip6_null_entry; in fib6_rule_action() 66 rt = net->ipv6.ip6_blk_hole_entry; in fib6_rule_action() 69 rt = net->ipv6.ip6_prohibit_entry; in fib6_rule_action() 75 rt = lookup(net, table, flp, flags); in fib6_rule_action() 77 if (rt != net->ipv6.ip6_null_entry) { in fib6_rule_action() 97 ip6_dst_idev(&rt->u.dst)->dev, in fib6_rule_action() 109 dst_release(&rt->u.dst); in fib6_rule_action() 110 rt = NULL; in fib6_rule_action() 114 dst_hold(&rt->u.dst); in fib6_rule_action() [all …]
|
D | ip6_output.c | 496 struct rt6_info *rt; in ip6_forward() local 504 rt = (struct rt6_info *) dst; in ip6_forward() 505 if ((rt->rt6i_flags & RTF_GATEWAY)) in ip6_forward() 626 struct rt6_info *rt = (struct rt6_info*)skb->dst; in ip6_fragment() local 722 dst_hold(&rt->u.dst); in ip6_fragment() 750 IP6_INC_STATS(net, ip6_dst_idev(&rt->u.dst), in ip6_fragment() 764 IP6_INC_STATS(net, ip6_dst_idev(&rt->u.dst), in ip6_fragment() 766 dst_release(&rt->u.dst); in ip6_fragment() 776 IP6_INC_STATS(net, ip6_dst_idev(&rt->u.dst), in ip6_fragment() 778 dst_release(&rt->u.dst); in ip6_fragment() [all …]
|
D | anycast.c | 80 struct rt6_info *rt; in ipv6_sock_ac_join() local 82 rt = rt6_lookup(net, addr, NULL, 0, 0); in ipv6_sock_ac_join() 83 if (rt) { in ipv6_sock_ac_join() 84 dev = rt->rt6i_dev; in ipv6_sock_ac_join() 86 dst_release(&rt->u.dst); in ipv6_sock_ac_join() 264 struct rt6_info *rt; in ipv6_dev_ac_inc() local 297 rt = addrconf_dst_alloc(idev, addr, 1); in ipv6_dev_ac_inc() 298 if (IS_ERR(rt)) { in ipv6_dev_ac_inc() 300 err = PTR_ERR(rt); in ipv6_dev_ac_inc() 306 aca->aca_rt = rt; in ipv6_dev_ac_inc() [all …]
|
/net/netfilter/ipvs/ |
D | ip_vs_xmit.c | 67 struct rtable *rt; /* Route to the other host */ in __ip_vs_get_out_rt() local 72 if (!(rt = (struct rtable *) in __ip_vs_get_out_rt() 83 if (ip_route_output_key(&init_net, &rt, &fl)) { in __ip_vs_get_out_rt() 89 __ip_vs_dst_set(dest, rtos, dst_clone(&rt->u.dst)); in __ip_vs_get_out_rt() 92 atomic_read(&rt->u.dst.__refcnt), rtos); in __ip_vs_get_out_rt() 105 if (ip_route_output_key(&init_net, &rt, &fl)) { in __ip_vs_get_out_rt() 112 return rt; in __ip_vs_get_out_rt() 119 struct rt6_info *rt; /* Route to the other host */ in __ip_vs_get_out_rt_v6() local 124 rt = (struct rt6_info *)__ip_vs_dst_check(dest, 0, 0); in __ip_vs_get_out_rt_v6() 125 if (!rt) { in __ip_vs_get_out_rt_v6() [all …]
|
/net/decnet/ |
D | dn_route.c | 146 static inline void dnrt_free(struct dn_route *rt) in dnrt_free() argument 148 call_rcu_bh(&rt->u.dst.rcu_head, dst_rcu_free); in dnrt_free() 151 static inline void dnrt_drop(struct dn_route *rt) in dnrt_drop() argument 153 dst_release(&rt->u.dst); in dnrt_drop() 154 call_rcu_bh(&rt->u.dst.rcu_head, dst_rcu_free); in dnrt_drop() 160 struct dn_route *rt, **rtp; in dn_dst_check_expire() local 168 while((rt=*rtp) != NULL) { in dn_dst_check_expire() 169 if (atomic_read(&rt->u.dst.__refcnt) || in dn_dst_check_expire() 170 (now - rt->u.dst.lastuse) < expire) { in dn_dst_check_expire() 171 rtp = &rt->u.dst.dn_next; in dn_dst_check_expire() [all …]
|
/net/ipv4/ |
D | xfrm4_policy.c | 34 struct rtable *rt; in xfrm4_dst_lookup() local 40 err = __ip_route_output_key(net, &rt, &fl); in xfrm4_dst_lookup() 41 dst = &rt->u.dst; in xfrm4_dst_lookup() 51 struct rtable *rt; in xfrm4_get_saddr() local 57 rt = (struct rtable *)dst; in xfrm4_get_saddr() 58 saddr->a4 = rt->rt_src; in xfrm4_get_saddr() 71 if (xdst->u.rt.fl.oif == fl->oif && /*XXX*/ in __xfrm4_find_bundle() 72 xdst->u.rt.fl.fl4_dst == fl->fl4_dst && in __xfrm4_find_bundle() 73 xdst->u.rt.fl.fl4_src == fl->fl4_src && in __xfrm4_find_bundle() 74 xdst->u.rt.fl.fl4_tos == fl->fl4_tos && in __xfrm4_find_bundle() [all …]
|
D | route.c | 611 static inline void rt_free(struct rtable *rt) in rt_free() argument 613 call_rcu_bh(&rt->u.dst.rcu_head, dst_rcu_free); in rt_free() 616 static inline void rt_drop(struct rtable *rt) in rt_drop() argument 618 ip_rt_put(rt); in rt_drop() 619 call_rcu_bh(&rt->u.dst.rcu_head, dst_rcu_free); in rt_drop() 663 static inline u32 rt_score(struct rtable *rt) in rt_score() argument 665 u32 score = jiffies - rt->u.dst.lastuse; in rt_score() 669 if (rt_valuable(rt)) in rt_score() 672 if (!rt->fl.iif || in rt_score() 673 !(rt->rt_flags & (RTCF_BROADCAST|RTCF_MULTICAST|RTCF_LOCAL))) in rt_score() [all …]
|
D | ip_output.c | 143 struct rtable *rt = skb->rtable; in ip_build_and_send_pkt() local 153 if (ip_dont_fragment(sk, &rt->u.dst)) in ip_build_and_send_pkt() 157 iph->ttl = ip_select_ttl(inet, &rt->u.dst); in ip_build_and_send_pkt() 158 iph->daddr = rt->rt_dst; in ip_build_and_send_pkt() 159 iph->saddr = rt->rt_src; in ip_build_and_send_pkt() 161 ip_select_ident(iph, &rt->u.dst, sk); in ip_build_and_send_pkt() 165 ip_options_build(skb, opt, daddr, rt, 0); in ip_build_and_send_pkt() 180 struct rtable *rt = (struct rtable *)dst; in ip_finish_output2() local 184 if (rt->rt_type == RTN_MULTICAST) in ip_finish_output2() 186 else if (rt->rt_type == RTN_BROADCAST) in ip_finish_output2() [all …]
|
D | ip_forward.c | 56 struct rtable *rt; /* Route we use */ in ip_forward() local 84 rt = skb->rtable; in ip_forward() 86 if (opt->is_strictroute && rt->rt_dst != rt->rt_gateway) in ip_forward() 89 if (unlikely(skb->len > dst_mtu(&rt->u.dst) && !skb_is_gso(skb) && in ip_forward() 91 IP_INC_STATS(dev_net(rt->u.dst.dev), IPSTATS_MIB_FRAGFAILS); in ip_forward() 93 htonl(dst_mtu(&rt->u.dst))); in ip_forward() 98 if (skb_cow(skb, LL_RESERVED_SPACE(rt->u.dst.dev)+rt->u.dst.header_len)) in ip_forward() 109 if (rt->rt_flags&RTCF_DOREDIRECT && !opt->srr && !skb_sec_path(skb)) in ip_forward() 114 return NF_HOOK(PF_INET, NF_INET_FORWARD, skb, skb->dev, rt->u.dst.dev, in ip_forward()
|
D | icmp.c | 270 static inline int icmpv4_xrlim_allow(struct net *net, struct rtable *rt, in icmpv4_xrlim_allow() argument 273 struct dst_entry *dst = &rt->u.dst; in icmpv4_xrlim_allow() 324 struct ipcm_cookie *ipc, struct rtable **rt) in icmp_push_reply() argument 329 sk = icmp_sk(dev_net((*rt)->u.dst.dev)); in icmp_push_reply() 333 ipc, rt, MSG_DONTWAIT) < 0) in icmp_push_reply() 359 struct rtable *rt = skb->rtable; in icmp_reply() local 360 struct net *net = dev_net(rt->u.dst.dev); in icmp_reply() 376 daddr = ipc.addr = rt->rt_src; in icmp_reply() 386 .saddr = rt->rt_spec_dst, in icmp_reply() 390 if (ip_route_output_key(net, &rt, &fl)) in icmp_reply() [all …]
|
D | datagram.c | 27 struct rtable *rt; in ip4_datagram_connect() local 49 err = ip_route_connect(&rt, usin->sin_addr.s_addr, saddr, in ip4_datagram_connect() 59 if ((rt->rt_flags & RTCF_BROADCAST) && !sock_flag(sk, SOCK_BROADCAST)) { in ip4_datagram_connect() 60 ip_rt_put(rt); in ip4_datagram_connect() 64 inet->saddr = rt->rt_src; /* Update source address */ in ip4_datagram_connect() 66 inet->rcv_saddr = rt->rt_src; in ip4_datagram_connect() 67 inet->daddr = rt->rt_dst; in ip4_datagram_connect() 72 sk_dst_set(sk, &rt->u.dst); in ip4_datagram_connect()
|
D | ip_options.c | 39 __be32 daddr, struct rtable *rt, int is_frag) in ip_options_build() argument 52 ip_rt_get_source(iph+opt->rr+iph[opt->rr+2]-5, rt); in ip_options_build() 54 ip_rt_get_source(iph+opt->ts+iph[opt->ts+2]-9, rt); in ip_options_build() 257 struct rtable *rt = NULL; in ip_options_compile() local 260 rt = skb->rtable; in ip_options_compile() 333 memcpy(&optptr[optptr[2]-1], &rt->rt_spec_dst, 4); in ip_options_compile() 375 memcpy(&optptr[optptr[2]-1], &rt->rt_spec_dst, 4); in ip_options_compile() 553 struct rtable *rt = skb->rtable; in ip_forward_options() local 558 ip_rt_get_source(&optptr[optptr[2]-5], rt); in ip_forward_options() 572 if (memcmp(&rt->rt_dst, &optptr[srrptr-1], 4) == 0) in ip_forward_options() [all …]
|
D | fib_frontend.c | 322 static int rtentry_to_fib_config(struct net *net, int cmd, struct rtentry *rt, in rtentry_to_fib_config() argument 331 if (rt->rt_dst.sa_family != AF_INET) in rtentry_to_fib_config() 343 addr = sk_extract_addr(&rt->rt_dst); in rtentry_to_fib_config() 344 if (!(rt->rt_flags & RTF_HOST)) { in rtentry_to_fib_config() 345 __be32 mask = sk_extract_addr(&rt->rt_genmask); in rtentry_to_fib_config() 347 if (rt->rt_genmask.sa_family != AF_INET) { in rtentry_to_fib_config() 348 if (mask || rt->rt_genmask.sa_family) in rtentry_to_fib_config() 366 if (rt->rt_metric) in rtentry_to_fib_config() 367 cfg->fc_priority = rt->rt_metric - 1; in rtentry_to_fib_config() 369 if (rt->rt_flags & RTF_REJECT) { in rtentry_to_fib_config() [all …]
|
D | ipip.c | 398 struct rtable *rt; /* Route to the other host */ in ipip_tunnel_xmit() local 419 if ((rt = skb->rtable) == NULL) { in ipip_tunnel_xmit() 423 if ((dst = rt->rt_gateway) == 0) in ipip_tunnel_xmit() 434 if (ip_route_output_key(dev_net(dev), &rt, &fl)) { in ipip_tunnel_xmit() 439 tdev = rt->u.dst.dev; in ipip_tunnel_xmit() 442 ip_rt_put(rt); in ipip_tunnel_xmit() 448 mtu = dst_mtu(&rt->u.dst) - sizeof(struct iphdr); in ipip_tunnel_xmit() 454 ip_rt_put(rt); in ipip_tunnel_xmit() 464 ip_rt_put(rt); in ipip_tunnel_xmit() 485 ip_rt_put(rt); in ipip_tunnel_xmit() [all …]
|
/net/ipx/ |
D | ipx_route.c | 54 struct ipx_route *rt; in ipxrtr_add_route() local 58 rt = ipxrtr_lookup(network); in ipxrtr_add_route() 59 if (!rt) { in ipxrtr_add_route() 60 rt = kmalloc(sizeof(*rt), GFP_ATOMIC); in ipxrtr_add_route() 62 if (!rt) in ipxrtr_add_route() 65 atomic_set(&rt->refcnt, 1); in ipxrtr_add_route() 66 ipxrtr_hold(rt); in ipxrtr_add_route() 68 list_add(&rt->node, &ipx_routes); in ipxrtr_add_route() 76 rt->ir_net = network; in ipxrtr_add_route() 77 rt->ir_intrfc = intrfc; in ipxrtr_add_route() [all …]
|
D | ipx_proc.c | 148 struct ipx_route *rt; in ipx_seq_route_show() local 154 rt = v; in ipx_seq_route_show() 155 seq_printf(seq, "%08lX ", (unsigned long int)ntohl(rt->ir_net)); in ipx_seq_route_show() 156 if (rt->ir_routed) in ipx_seq_route_show() 158 (long unsigned int)ntohl(rt->ir_intrfc->if_netnum), in ipx_seq_route_show() 159 rt->ir_router_node[0], rt->ir_router_node[1], in ipx_seq_route_show() 160 rt->ir_router_node[2], rt->ir_router_node[3], in ipx_seq_route_show() 161 rt->ir_router_node[4], rt->ir_router_node[5]); in ipx_seq_route_show()
|
/net/sunrpc/ |
D | timer.c | 29 rpc_init_rtt(struct rpc_rtt *rt, unsigned long timeo) in rpc_init_rtt() argument 34 rt->timeo = timeo; in rpc_init_rtt() 39 rt->srtt[i] = init; in rpc_init_rtt() 40 rt->sdrtt[i] = RPC_RTO_INIT; in rpc_init_rtt() 41 rt->ntimeouts[i] = 0; in rpc_init_rtt() 51 rpc_update_rtt(struct rpc_rtt *rt, unsigned timer, long m) in rpc_update_rtt() argument 65 srtt = (long *)&rt->srtt[timer]; in rpc_update_rtt() 72 sdrtt = (long *)&rt->sdrtt[timer]; in rpc_update_rtt() 96 rpc_calc_rto(struct rpc_rtt *rt, unsigned timer) in rpc_calc_rto() argument 101 return rt->timeo; in rpc_calc_rto() [all …]
|
/net/appletalk/ |
D | atalk_proc.c | 124 struct atalk_route *rt; in atalk_seq_route_show() local 132 rt = &atrtr_default; in atalk_seq_route_show() 134 ntohs(rt->gateway.s_net), rt->gateway.s_node, in atalk_seq_route_show() 135 rt->flags, rt->dev->name); in atalk_seq_route_show() 138 rt = v; in atalk_seq_route_show() 140 ntohs(rt->target.s_net), rt->target.s_node, in atalk_seq_route_show() 141 ntohs(rt->gateway.s_net), rt->gateway.s_node, in atalk_seq_route_show() 142 rt->flags, rt->dev->name); in atalk_seq_route_show()
|
D | ddp.c | 507 struct atalk_route *rt; in atrtr_create() local 523 for (rt = atalk_routes; rt; rt = rt->next) { in atrtr_create() 524 if (r->rt_flags != rt->flags) in atrtr_create() 527 if (ta->sat_addr.s_net == rt->target.s_net) { in atrtr_create() 528 if (!(rt->flags & RTF_HOST)) in atrtr_create() 530 if (ta->sat_addr.s_node == rt->target.s_node) in atrtr_create() 560 if (!rt) { in atrtr_create() 561 rt = kzalloc(sizeof(*rt), GFP_ATOMIC); in atrtr_create() 564 if (!rt) in atrtr_create() 567 rt->next = atalk_routes; in atrtr_create() [all …]
|