Home
last modified time | relevance | path

Searched refs:rtm (Results 1 – 17 of 17) sorted by relevance

/Linux-v4.19/net/phonet/
Dpn_netlink.c176 struct rtmsg *rtm; in fill_route() local
179 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*rtm), 0); in fill_route()
183 rtm = nlmsg_data(nlh); in fill_route()
184 rtm->rtm_family = AF_PHONET; in fill_route()
185 rtm->rtm_dst_len = 6; in fill_route()
186 rtm->rtm_src_len = 0; in fill_route()
187 rtm->rtm_tos = 0; in fill_route()
188 rtm->rtm_table = RT_TABLE_MAIN; in fill_route()
189 rtm->rtm_protocol = RTPROT_STATIC; in fill_route()
190 rtm->rtm_scope = RT_SCOPE_UNIVERSE; in fill_route()
[all …]
/Linux-v4.19/drivers/rtc/
Drtc-ls1x.c88 static int ls1x_rtc_read_time(struct device *dev, struct rtc_time *rtm) in ls1x_rtc_read_time() argument
96 memset(rtm, 0, sizeof(struct rtc_time)); in ls1x_rtc_read_time()
100 rtc_time64_to_tm(t, rtm); in ls1x_rtc_read_time()
105 static int ls1x_rtc_set_time(struct device *dev, struct rtc_time *rtm) in ls1x_rtc_set_time() argument
110 v = ((rtm->tm_mon + 1) << LS1X_MONTH_OFFSET) in ls1x_rtc_set_time()
111 | (rtm->tm_mday << LS1X_DAY_OFFSET) in ls1x_rtc_set_time()
112 | (rtm->tm_hour << LS1X_HOUR_OFFSET) in ls1x_rtc_set_time()
113 | (rtm->tm_min << LS1X_MIN_OFFSET) in ls1x_rtc_set_time()
114 | (rtm->tm_sec << LS1X_SEC_OFFSET); in ls1x_rtc_set_time()
127 t = rtm->tm_year + 1900; in ls1x_rtc_set_time()
/Linux-v4.19/net/decnet/netfilter/
Ddn_rtmsg.c40 struct nf_dn_rtmsg *rtm; in dnrmg_build_message() local
56 rtm = (struct nf_dn_rtmsg *)nlmsg_data(nlh); in dnrmg_build_message()
57 rtm->nfdn_ifindex = rt_skb->dev->ifindex; in dnrmg_build_message()
58 ptr = NFDN_RTMSG(rtm); in dnrmg_build_message()
/Linux-v4.19/net/mpls/
Daf_mpls.c1734 struct rtmsg *rtm; in rtm_to_route_config() local
1739 err = nlmsg_parse(nlh, sizeof(*rtm), tb, RTA_MAX, rtm_mpls_policy, in rtm_to_route_config()
1745 rtm = nlmsg_data(nlh); in rtm_to_route_config()
1747 if (rtm->rtm_family != AF_MPLS) { in rtm_to_route_config()
1751 if (rtm->rtm_dst_len != 20) { in rtm_to_route_config()
1755 if (rtm->rtm_src_len != 0) { in rtm_to_route_config()
1759 if (rtm->rtm_tos != 0) { in rtm_to_route_config()
1763 if (rtm->rtm_table != RT_TABLE_MAIN) { in rtm_to_route_config()
1774 if (rtm->rtm_scope != RT_SCOPE_UNIVERSE) { in rtm_to_route_config()
1779 if (rtm->rtm_type != RTN_UNICAST) { in rtm_to_route_config()
[all …]
/Linux-v4.19/net/decnet/
Ddn_table.c305 struct rtmsg *rtm; in dn_fib_dump_info() local
308 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*rtm), flags); in dn_fib_dump_info()
312 rtm = nlmsg_data(nlh); in dn_fib_dump_info()
313 rtm->rtm_family = AF_DECnet; in dn_fib_dump_info()
314 rtm->rtm_dst_len = dst_len; in dn_fib_dump_info()
315 rtm->rtm_src_len = 0; in dn_fib_dump_info()
316 rtm->rtm_tos = 0; in dn_fib_dump_info()
317 rtm->rtm_table = tb_id; in dn_fib_dump_info()
318 rtm->rtm_flags = fi->fib_flags; in dn_fib_dump_info()
319 rtm->rtm_scope = scope; in dn_fib_dump_info()
[all …]
Ddn_fib.c564 struct rtmsg rtm; in fib_magic() member
590 memset(&req.rtm, 0, sizeof(req.rtm)); in fib_magic()
606 req.rtm.rtm_dst_len = dst_len; in fib_magic()
607 req.rtm.rtm_table = tb->n; in fib_magic()
608 req.rtm.rtm_protocol = RTPROT_KERNEL; in fib_magic()
609 req.rtm.rtm_scope = (type != RTN_LOCAL ? RT_SCOPE_LINK : RT_SCOPE_HOST); in fib_magic()
610 req.rtm.rtm_type = type; in fib_magic()
613 tb->insert(tb, &req.rtm, attrs, &req.nlh, NULL); in fib_magic()
615 tb->delete(tb, &req.rtm, attrs, &req.nlh, NULL); in fib_magic()
Ddn_route.c1643 struct rtmsg *rtm = nlmsg_data(nlh); in dn_cache_getroute() local
1654 err = nlmsg_parse(nlh, sizeof(*rtm), tb, RTA_MAX, rtm_dn_policy, in dn_cache_getroute()
1706 if (rtm->rtm_flags & RTM_F_NOTIFY) in dn_cache_getroute()
1732 struct rtmsg *rtm; in dn_cache_dump() local
1740 rtm = nlmsg_data(cb->nlh); in dn_cache_dump()
1741 if (!(rtm->rtm_flags & RTM_F_CLONED)) in dn_cache_dump()
/Linux-v4.19/net/ipv4/
Dfib_semantics.c1296 struct rtmsg *rtm; in fib_dump_info() local
1298 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*rtm), flags); in fib_dump_info()
1302 rtm = nlmsg_data(nlh); in fib_dump_info()
1303 rtm->rtm_family = AF_INET; in fib_dump_info()
1304 rtm->rtm_dst_len = dst_len; in fib_dump_info()
1305 rtm->rtm_src_len = 0; in fib_dump_info()
1306 rtm->rtm_tos = tos; in fib_dump_info()
1308 rtm->rtm_table = tb_id; in fib_dump_info()
1310 rtm->rtm_table = RT_TABLE_COMPAT; in fib_dump_info()
1313 rtm->rtm_type = type; in fib_dump_info()
[all …]
Dipmr.c2244 struct rtmsg *rtm, u32 portid) in ipmr_get_route() argument
2299 err = mr_fill_mroute(mrt, skb, &cache->_c, rtm); in ipmr_get_route()
2310 struct rtmsg *rtm; in ipmr_fill_mroute() local
2313 nlh = nlmsg_put(skb, portid, seq, cmd, sizeof(*rtm), flags); in ipmr_fill_mroute()
2317 rtm = nlmsg_data(nlh); in ipmr_fill_mroute()
2318 rtm->rtm_family = RTNL_FAMILY_IPMR; in ipmr_fill_mroute()
2319 rtm->rtm_dst_len = 32; in ipmr_fill_mroute()
2320 rtm->rtm_src_len = 32; in ipmr_fill_mroute()
2321 rtm->rtm_tos = 0; in ipmr_fill_mroute()
2322 rtm->rtm_table = mrt->id; in ipmr_fill_mroute()
[all …]
Dipmr_base.c209 struct mr_mfc *c, struct rtmsg *rtm) in mr_fill_mroute() argument
219 rtm->rtm_flags |= RTNH_F_UNRESOLVED; in mr_fill_mroute()
229 rtm->rtm_flags |= RTNH_F_OFFLOAD; in mr_fill_mroute()
266 rtm->rtm_type = RTN_MULTICAST; in mr_fill_mroute()
Dfib_frontend.c663 struct rtmsg *rtm; in rtm_to_fib_config() local
665 err = nlmsg_validate(nlh, sizeof(*rtm), RTA_MAX, rtm_ipv4_policy, in rtm_to_fib_config()
672 rtm = nlmsg_data(nlh); in rtm_to_fib_config()
673 cfg->fc_dst_len = rtm->rtm_dst_len; in rtm_to_fib_config()
674 cfg->fc_tos = rtm->rtm_tos; in rtm_to_fib_config()
675 cfg->fc_table = rtm->rtm_table; in rtm_to_fib_config()
676 cfg->fc_protocol = rtm->rtm_protocol; in rtm_to_fib_config()
677 cfg->fc_scope = rtm->rtm_scope; in rtm_to_fib_config()
678 cfg->fc_type = rtm->rtm_type; in rtm_to_fib_config()
679 cfg->fc_flags = rtm->rtm_flags; in rtm_to_fib_config()
Droute.c2788 struct rtmsg *rtm; in inet_rtm_getroute() local
2797 err = nlmsg_parse(nlh, sizeof(*rtm), tb, RTA_MAX, rtm_ipv4_policy, in inet_rtm_getroute()
2802 rtm = nlmsg_data(nlh); in inet_rtm_getroute()
2832 fl4.flowi4_tos = rtm->rtm_tos; in inet_rtm_getroute()
2856 err = ip_route_input_rcu(skb, dst, src, rtm->rtm_tos, in inet_rtm_getroute()
2875 if (rtm->rtm_flags & RTM_F_NOTIFY) in inet_rtm_getroute()
2878 if (rtm->rtm_flags & RTM_F_LOOKUP_TABLE) in inet_rtm_getroute()
2887 if (rtm->rtm_flags & RTM_F_FIB_MATCH) { in inet_rtm_getroute()
/Linux-v4.19/net/ipv6/
Droute.c4167 struct rtmsg *rtm; in rtm_to_fib6_config() local
4172 err = nlmsg_parse(nlh, sizeof(*rtm), tb, RTA_MAX, rtm_ipv6_policy, in rtm_to_fib6_config()
4178 rtm = nlmsg_data(nlh); in rtm_to_fib6_config()
4181 cfg->fc_table = rtm->rtm_table; in rtm_to_fib6_config()
4182 cfg->fc_dst_len = rtm->rtm_dst_len; in rtm_to_fib6_config()
4183 cfg->fc_src_len = rtm->rtm_src_len; in rtm_to_fib6_config()
4185 cfg->fc_protocol = rtm->rtm_protocol; in rtm_to_fib6_config()
4186 cfg->fc_type = rtm->rtm_type; in rtm_to_fib6_config()
4188 if (rtm->rtm_type == RTN_UNREACHABLE || in rtm_to_fib6_config()
4189 rtm->rtm_type == RTN_BLACKHOLE || in rtm_to_fib6_config()
[all …]
Dip6mr.c2201 int ip6mr_get_route(struct net *net, struct sk_buff *skb, struct rtmsg *rtm, in ip6mr_get_route() argument
2266 err = mr_fill_mroute(mrt, skb, &cache->_c, rtm); in ip6mr_get_route()
2276 struct rtmsg *rtm; in ip6mr_fill_mroute() local
2279 nlh = nlmsg_put(skb, portid, seq, cmd, sizeof(*rtm), flags); in ip6mr_fill_mroute()
2283 rtm = nlmsg_data(nlh); in ip6mr_fill_mroute()
2284 rtm->rtm_family = RTNL_FAMILY_IP6MR; in ip6mr_fill_mroute()
2285 rtm->rtm_dst_len = 128; in ip6mr_fill_mroute()
2286 rtm->rtm_src_len = 128; in ip6mr_fill_mroute()
2287 rtm->rtm_tos = 0; in ip6mr_fill_mroute()
2288 rtm->rtm_table = mrt->id; in ip6mr_fill_mroute()
[all …]
/Linux-v4.19/include/linux/
Dmroute.h86 struct rtmsg *rtm, u32 portid);
Dmroute6.h98 struct rtmsg *rtm, u32 portid);
Dmroute_base.h285 struct mr_mfc *c, struct rtmsg *rtm);
330 struct mr_mfc *c, struct rtmsg *rtm) in mr_fill_mroute() argument