Home
last modified time | relevance | path

Searched refs:rth (Results 1 – 6 of 6) sorted by relevance

/linux/tools/testing/selftests/bpf/
H A Dnetlink_helpers.c16 void rtnl_close(struct rtnl_handle *rth) in rtnl_close() argument
18 if (rth->fd >= 0) { in rtnl_close()
19 close(rth->fd); in rtnl_close()
20 rth->fd = -1; in rtnl_close()
24 int rtnl_open_byproto(struct rtnl_handle *rth, unsigned int subscriptions, in rtnl_open_byproto() argument
31 memset(rth, 0, sizeof(*rth)); in rtnl_open_byproto()
32 rth->proto = protocol; in rtnl_open_byproto()
33 rth->fd = socket(AF_NETLINK, SOCK_RAW | SOCK_CLOEXEC, protocol); in rtnl_open_byproto()
34 if (rth->fd < 0) { in rtnl_open_byproto()
38 if (setsockopt(rth->fd, SOL_SOCKET, SO_SNDBUF, in rtnl_open_byproto()
[all …]
H A Dnetlink_helpers.h29 int rtnl_open(struct rtnl_handle *rth, unsigned int subscriptions)
31 void rtnl_close(struct rtnl_handle *rth);
/linux/net/ipv4/
H A Droute.c396 static inline bool rt_is_expired(const struct rtable *rth) in rt_is_expired() argument
401 res = rth->rt_genid != rt_genid_ipv4(dev_net_rcu(rth->dst.dev)); in rt_is_expired()
1748 struct rtable *rth; in ip_route_input_mc() local
1762 rth = rt_dst_alloc(dev_net(dev)->loopback_dev, flags, RTN_MULTICAST, in ip_route_input_mc()
1764 if (!rth) in ip_route_input_mc()
1768 rth->dst.tclassid = itag; in ip_route_input_mc()
1770 rth->dst.output = ip_rt_bug; in ip_route_input_mc()
1771 rth->rt_is_input= 1; in ip_route_input_mc()
1775 rth->dst.input = ip_mr_input; in ip_route_input_mc()
1780 skb_dst_set(skb, &rth->dst); in ip_route_input_mc()
[all …]
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dtc_redirect.c167 struct rtnl_handle rth = { .fd = -1 }; in create_netkit()
176 err = rtnl_open(&rth, 0); in create_netkit()
198 err = rtnl_talk(&rth, &req.n, NULL); in create_netkit()
200 rtnl_close(&rth); in create_netkit()
165 struct rtnl_handle rth = { .fd = -1 }; create_netkit() local
H A Dtc_links.c1800 struct rtnl_handle rth = { .fd = -1 }; in qdisc_replace() local
1804 err = rtnl_open(&rth, 0); in qdisc_replace()
1820 err = rtnl_talk(&rth, &req.n, NULL); in qdisc_replace()
1822 rtnl_close(&rth); in qdisc_replace()
/linux/net/core/
H A Dnet_namespace.c928 struct rtgenmsg *rth; in rtnl_net_fill()
930 nlh = nlmsg_put(skb, args->portid, args->seq, args->cmd, sizeof(*rth), in rtnl_net_fill()
935 rth = nlmsg_data(nlh); in rtnl_net_fill()
936 rth->rtgen_family = AF_UNSPEC; in rtnl_net_fill()
927 struct rtgenmsg *rth; rtnl_net_fill() local