Home
last modified time | relevance | path

Searched refs:gw (Results 1 – 21 of 21) sorted by relevance

/net/batman-adv/
Dgateway_common.c136 struct batadv_tvlv_gateway_data gw; in batadv_gw_tvlv_container_update() local
140 gw_mode = atomic_read(&bat_priv->gw.mode); in batadv_gw_tvlv_container_update()
148 down = atomic_read(&bat_priv->gw.bandwidth_down); in batadv_gw_tvlv_container_update()
149 up = atomic_read(&bat_priv->gw.bandwidth_up); in batadv_gw_tvlv_container_update()
150 gw.bandwidth_down = htonl(down); in batadv_gw_tvlv_container_update()
151 gw.bandwidth_up = htonl(up); in batadv_gw_tvlv_container_update()
153 &gw, sizeof(gw)); in batadv_gw_tvlv_container_update()
177 down_curr = (unsigned int)atomic_read(&bat_priv->gw.bandwidth_down); in batadv_gw_bandwidth_set()
178 up_curr = (unsigned int)atomic_read(&bat_priv->gw.bandwidth_up); in batadv_gw_bandwidth_set()
202 atomic_set(&bat_priv->gw.bandwidth_down, down_new); in batadv_gw_bandwidth_set()
[all …]
Dgateway_client.c84 gw_node = rcu_dereference(bat_priv->gw.curr_gw); in batadv_gw_get_selected_gw_node()
132 spin_lock_bh(&bat_priv->gw.list_lock); in batadv_gw_select()
137 curr_gw_node = rcu_replace_pointer(bat_priv->gw.curr_gw, new_gw_node, in batadv_gw_select()
142 spin_unlock_bh(&bat_priv->gw.list_lock); in batadv_gw_select()
158 atomic_set(&bat_priv->gw.reselect, 1); in batadv_gw_reselect()
173 if (atomic_read(&bat_priv->gw.mode) != BATADV_GW_MODE_CLIENT) in batadv_gw_check_client_stop()
205 if (atomic_read(&bat_priv->gw.mode) != BATADV_GW_MODE_CLIENT) in batadv_gw_election()
208 if (!bat_priv->algo_ops->gw.get_best_gw_node) in batadv_gw_election()
213 if (!batadv_atomic_dec_not_zero(&bat_priv->gw.reselect) && curr_gw) in batadv_gw_election()
220 next_gw = bat_priv->algo_ops->gw.get_best_gw_node(bat_priv); in batadv_gw_election()
[all …]
Dbat_v.c512 atomic_set(&bat_priv->gw.sel_class, 50); in batadv_v_init_sel_class()
525 old_class = atomic_read(&bat_priv->gw.sel_class); in batadv_v_store_sel_class()
526 atomic_set(&bat_priv->gw.sel_class, class); in batadv_v_store_sel_class()
588 hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.gateway_list, list) { in batadv_v_gw_get_best_gw_node()
628 threshold = atomic_read(&bat_priv->gw.sel_class); in batadv_v_gw_is_eligible()
780 spin_lock_bh(&bat_priv->gw.list_lock); in batadv_v_gw_dump()
781 cb->seq = bat_priv->gw.generation << 1 | 1; in batadv_v_gw_dump()
783 hlist_for_each_entry(gw_node, &bat_priv->gw.gateway_list, list) { in batadv_v_gw_dump()
796 spin_unlock_bh(&bat_priv->gw.list_lock); in batadv_v_gw_dump()
819 .gw = {
Dnetlink.c311 atomic_read(&bat_priv->gw.bandwidth_down))) in batadv_netlink_mesh_fill()
315 atomic_read(&bat_priv->gw.bandwidth_up))) in batadv_netlink_mesh_fill()
319 atomic_read(&bat_priv->gw.mode))) in batadv_netlink_mesh_fill()
322 if (bat_priv->algo_ops->gw.get_best_gw_node && in batadv_netlink_mesh_fill()
323 bat_priv->algo_ops->gw.is_eligible) { in batadv_netlink_mesh_fill()
328 atomic_read(&bat_priv->gw.sel_class))) in batadv_netlink_mesh_fill()
507 atomic_set(&bat_priv->gw.bandwidth_down, nla_get_u32(attr)); in batadv_netlink_set_mesh()
514 atomic_set(&bat_priv->gw.bandwidth_up, nla_get_u32(attr)); in batadv_netlink_set_mesh()
542 atomic_set(&bat_priv->gw.mode, gw_mode); in batadv_netlink_set_mesh()
548 bat_priv->algo_ops->gw.get_best_gw_node && in batadv_netlink_set_mesh()
[all …]
Dmain.c162 spin_lock_init(&bat_priv->gw.list_lock); in batadv_mesh_init()
174 INIT_HLIST_HEAD(&bat_priv->gw.gateway_list); in batadv_mesh_init()
191 bat_priv->gw.generation = 0; in batadv_mesh_init()
232 atomic_set(&bat_priv->gw.reselect, 0); in batadv_mesh_init()
Dbat_iv_ogm.c2245 atomic_set(&bat_priv->gw.sel_class, 20); in batadv_iv_init_sel_class()
2261 hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.gateway_list, list) { in batadv_iv_gw_get_best_gw_node()
2277 switch (atomic_read(&bat_priv->gw.sel_class)) { in batadv_iv_gw_get_best_gw_node()
2337 if (atomic_read(&bat_priv->gw.sel_class) <= 2) in batadv_iv_gw_is_eligible()
2372 if ((atomic_read(&bat_priv->gw.sel_class) > 3) && in batadv_iv_gw_is_eligible()
2373 (orig_tq_avg - gw_tq_avg < atomic_read(&bat_priv->gw.sel_class))) in batadv_iv_gw_is_eligible()
2480 spin_lock_bh(&bat_priv->gw.list_lock); in batadv_iv_gw_dump()
2481 cb->seq = bat_priv->gw.generation << 1 | 1; in batadv_iv_gw_dump()
2483 hlist_for_each_entry(gw_node, &bat_priv->gw.gateway_list, list) { in batadv_iv_gw_dump()
2496 spin_unlock_bh(&bat_priv->gw.list_lock); in batadv_iv_gw_dump()
[all …]
Dsoft-interface.c273 gw_mode = atomic_read(&bat_priv->gw.mode); in batadv_interface_tx()
768 atomic_set(&bat_priv->gw.mode, BATADV_GW_MODE_OFF); in batadv_softif_init_late()
769 atomic_set(&bat_priv->gw.bandwidth_down, 100); in batadv_softif_init_late()
770 atomic_set(&bat_priv->gw.bandwidth_up, 20); in batadv_softif_init_late()
Dbridge_loop_avoidance.c85 const struct batadv_bla_backbone_gw *gw; in batadv_choose_backbone_gw() local
88 gw = (struct batadv_bla_backbone_gw *)data; in batadv_choose_backbone_gw()
89 hash = jhash(&gw->orig, sizeof(gw->orig), hash); in batadv_choose_backbone_gw()
90 hash = jhash(&gw->vid, sizeof(gw->vid), hash); in batadv_choose_backbone_gw()
Dtypes.h1715 struct batadv_priv_gw gw; member
2284 struct batadv_algo_gw_ops gw; member
/net/ipv6/netfilter/
Dnf_dup_ipv6.c20 const struct in6_addr *gw, int oif) in nf_dup_ipv6_route() argument
30 fl6.daddr = *gw; in nf_dup_ipv6_route()
48 const struct in6_addr *gw, int oif) in nf_dup_ipv6() argument
65 if (nf_dup_ipv6_route(net, skb, gw, oif)) { in nf_dup_ipv6()
Dnft_dup_ipv6.c25 struct in6_addr *gw = (struct in6_addr *)&regs->data[priv->sreg_addr]; in nft_dup_ipv6_eval() local
28 nf_dup_ipv6(nft_net(pkt), pkt->skb, nft_hook(pkt), gw, oif); in nft_dup_ipv6_eval()
/net/ipv4/netfilter/
Dnf_dup_ipv4.c24 const struct in_addr *gw, int oif) in nf_dup_ipv4_route() argument
34 fl4.daddr = gw->s_addr; in nf_dup_ipv4_route()
51 const struct in_addr *gw, int oif) in nf_dup_ipv4() argument
86 if (nf_dup_ipv4_route(net, skb, gw, oif)) { in nf_dup_ipv4()
Dnft_dup_ipv4.c25 struct in_addr gw = { in nft_dup_ipv4_eval() local
30 nf_dup_ipv4(nft_net(pkt), pkt->skb, nft_hook(pkt), &gw, oif); in nft_dup_ipv4_eval()
/net/can/
DMakefile16 obj-$(CONFIG_CAN_GW) += can-gw.o
17 can-gw-y := gw.o
/net/netfilter/
Dxt_TEE.c42 nf_dup_ipv4(xt_net(par), skb, xt_hooknum(par), &info->gw.in, oif); in tee_tg4()
54 nf_dup_ipv6(xt_net(par), skb, xt_hooknum(par), &info->gw.in6, oif); in tee_tg6()
99 if (memcmp(&info->gw, &tee_zero_address, in tee_tg_check()
/net/ipv4/
Dfib_semantics.c440 int ip_fib_check_default(__be32 gw, struct net_device *dev) in ip_fib_check_default() argument
451 nh->fib_nh_gw4 == gw && in ip_fib_check_default()
675 static int fib_gw_from_attr(__be32 *gw, struct nlattr *nla, in fib_gw_from_attr() argument
678 if (nla_len(nla) < sizeof(*gw)) { in fib_gw_from_attr()
683 *gw = nla_get_in_addr(nla); in fib_gw_from_attr()
958 __be32 gw; in fib_nh_match() local
960 err = fib_gw_from_attr(&gw, nla, extack); in fib_nh_match()
965 gw != nh->fib_nh_gw4) in fib_nh_match()
Droute.c645 __be32 gw, u32 pmtu, bool lock, in update_or_create_fnhe() argument
681 if (gw) in update_or_create_fnhe()
682 fnhe->fnhe_gw = gw; in update_or_create_fnhe()
713 fnhe->fnhe_gw = gw; in update_or_create_fnhe()
931 __be32 gw = rt_nexthop(rt, ip_hdr(skb)->daddr); in ip_rt_send_redirect() local
933 icmp_send(skb, ICMP_REDIRECT, ICMP_REDIR_HOST, gw); in ip_rt_send_redirect()
941 &ip_hdr(skb)->daddr, &gw); in ip_rt_send_redirect()
1829 __be32 gw; in __mkroute_input() local
1831 gw = nhc->nhc_gw_family == AF_INET ? nhc->nhc_gw.ipv4 : 0; in __mkroute_input()
1833 inet_addr_onlink(out_dev, saddr, gw)) in __mkroute_input()
Dnexthop.c2514 .fc_gw4 = cfg->gw.ipv4, in nh_create_ipv4()
2515 .fc_gw_family = cfg->gw.ipv4 ? AF_INET : 0, in nh_create_ipv4()
2554 .fc_gateway = cfg->gw.ipv6, in nh_create_ipv6()
2563 if (!ipv6_addr_any(&cfg->gw.ipv6)) in nh_create_ipv6()
2881 cfg->gw.ipv4 = nla_get_be32(gwa); in rtm_to_nh_config()
2888 cfg->gw.ipv6 = nla_get_in6_addr(gwa); in rtm_to_nh_config()
Dfib_trie.c2989 __be32 gw = 0; in fib_route_seq_show() local
2992 gw = nhc->nhc_gw.ipv4; in fib_route_seq_show()
2998 prefix, gw, flags, 0, 0, in fib_route_seq_show()
/net/bluetooth/
D6lowpan.c33 struct in6_addr gw; member
145 if (ipv6_addr_any(&lowpan_cb(skb)->gw)) { in peer_lookup_dst()
153 nexthop = &lowpan_cb(skb)->gw; in peer_lookup_dst()
162 memcpy(&lowpan_cb(skb)->gw, nexthop, sizeof(struct in6_addr)); in peer_lookup_dst()
/net/ipv6/
Droute.c204 struct neighbour *ip6_neigh_lookup(const struct in6_addr *gw, in ip6_neigh_lookup() argument
211 daddr = choose_neigh_daddr(gw, skb, daddr); in ip6_neigh_lookup()
1937 const struct in6_addr *gw; member
1947 (arg->gw && !nh->fib_nh_gw_family) || in fib6_nh_find_match()
1948 (!arg->gw && nh->fib_nh_gw_family) || in fib6_nh_find_match()
1949 (arg->gw && !ipv6_addr_equal(arg->gw, &nh->fib_nh_gw6))) in fib6_nh_find_match()
1972 .gw = &rt->rt6i_gateway, in rt6_update_exception_stamp_rt()
2894 .gw = &rt6->rt6i_gateway, in __ip6_rt_update_pmtu()
2992 const struct in6_addr *gw, in ip6_redirect_nh_match() argument
3006 if (!ipv6_addr_equal(gw, &nh->fib_nh_gw6)) { in ip6_redirect_nh_match()
[all …]