Home
last modified time | relevance | path

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

/net/phonet/
Dpn_netlink.c163 struct rtmsg *rtm; in fill_route() local
166 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*rtm), 0); in fill_route()
170 rtm = nlmsg_data(nlh); in fill_route()
171 rtm->rtm_family = AF_PHONET; in fill_route()
172 rtm->rtm_dst_len = 6; in fill_route()
173 rtm->rtm_src_len = 0; in fill_route()
174 rtm->rtm_tos = 0; in fill_route()
175 rtm->rtm_table = RT_TABLE_MAIN; in fill_route()
176 rtm->rtm_protocol = RTPROT_STATIC; in fill_route()
177 rtm->rtm_scope = RT_SCOPE_UNIVERSE; in fill_route()
[all …]
/net/mpls/
Daf_mpls.c1812 struct rtmsg *rtm; in rtm_to_route_config() local
1817 err = nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX, in rtm_to_route_config()
1823 rtm = nlmsg_data(nlh); in rtm_to_route_config()
1825 if (rtm->rtm_family != AF_MPLS) { in rtm_to_route_config()
1829 if (rtm->rtm_dst_len != 20) { in rtm_to_route_config()
1833 if (rtm->rtm_src_len != 0) { in rtm_to_route_config()
1837 if (rtm->rtm_tos != 0) { in rtm_to_route_config()
1841 if (rtm->rtm_table != RT_TABLE_MAIN) { in rtm_to_route_config()
1852 if (rtm->rtm_scope != RT_SCOPE_UNIVERSE) { in rtm_to_route_config()
1857 if (rtm->rtm_type != RTN_UNICAST) { in rtm_to_route_config()
[all …]
/net/ipv4/
Dfib_frontend.c734 struct rtmsg *rtm; in rtm_to_fib_config() local
736 err = nlmsg_validate_deprecated(nlh, sizeof(*rtm), RTA_MAX, in rtm_to_fib_config()
743 rtm = nlmsg_data(nlh); in rtm_to_fib_config()
745 if (!inet_validate_dscp(rtm->rtm_tos)) { in rtm_to_fib_config()
751 cfg->fc_dscp = inet_dsfield_to_dscp(rtm->rtm_tos); in rtm_to_fib_config()
753 cfg->fc_dst_len = rtm->rtm_dst_len; in rtm_to_fib_config()
754 cfg->fc_table = rtm->rtm_table; in rtm_to_fib_config()
755 cfg->fc_protocol = rtm->rtm_protocol; in rtm_to_fib_config()
756 cfg->fc_scope = rtm->rtm_scope; in rtm_to_fib_config()
757 cfg->fc_type = rtm->rtm_type; in rtm_to_fib_config()
[all …]
Dipmr.c2258 struct rtmsg *rtm, u32 portid) in ipmr_get_route() argument
2309 err = mr_fill_mroute(mrt, skb, &cache->_c, rtm); in ipmr_get_route()
2319 struct rtmsg *rtm; in ipmr_fill_mroute() local
2322 nlh = nlmsg_put(skb, portid, seq, cmd, sizeof(*rtm), flags); in ipmr_fill_mroute()
2326 rtm = nlmsg_data(nlh); in ipmr_fill_mroute()
2327 rtm->rtm_family = RTNL_FAMILY_IPMR; in ipmr_fill_mroute()
2328 rtm->rtm_dst_len = 32; in ipmr_fill_mroute()
2329 rtm->rtm_src_len = 32; in ipmr_fill_mroute()
2330 rtm->rtm_tos = 0; in ipmr_fill_mroute()
2331 rtm->rtm_table = mrt->id; in ipmr_fill_mroute()
[all …]
Dfib_semantics.c1787 struct rtmsg *rtm; in fib_dump_info() local
1789 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*rtm), flags); in fib_dump_info()
1793 rtm = nlmsg_data(nlh); in fib_dump_info()
1794 rtm->rtm_family = AF_INET; in fib_dump_info()
1795 rtm->rtm_dst_len = fri->dst_len; in fib_dump_info()
1796 rtm->rtm_src_len = 0; in fib_dump_info()
1797 rtm->rtm_tos = inet_dscp_to_dsfield(fri->dscp); in fib_dump_info()
1799 rtm->rtm_table = tb_id; in fib_dump_info()
1801 rtm->rtm_table = RT_TABLE_COMPAT; in fib_dump_info()
1804 rtm->rtm_type = fri->type; in fib_dump_info()
[all …]
Droute.c3210 struct rtmsg *rtm; in inet_rtm_valid_getroute_req() local
3213 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*rtm))) { in inet_rtm_valid_getroute_req()
3220 return nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX, in inet_rtm_valid_getroute_req()
3223 rtm = nlmsg_data(nlh); in inet_rtm_valid_getroute_req()
3224 if ((rtm->rtm_src_len && rtm->rtm_src_len != 32) || in inet_rtm_valid_getroute_req()
3225 (rtm->rtm_dst_len && rtm->rtm_dst_len != 32) || in inet_rtm_valid_getroute_req()
3226 rtm->rtm_table || rtm->rtm_protocol || in inet_rtm_valid_getroute_req()
3227 rtm->rtm_scope || rtm->rtm_type) { in inet_rtm_valid_getroute_req()
3232 if (rtm->rtm_flags & ~(RTM_F_NOTIFY | in inet_rtm_valid_getroute_req()
3239 err = nlmsg_parse_deprecated_strict(nlh, sizeof(*rtm), tb, RTA_MAX, in inet_rtm_valid_getroute_req()
[all …]
Dipmr_base.c209 struct mr_mfc *c, struct rtmsg *rtm) in mr_fill_mroute() argument
220 rtm->rtm_flags |= RTNH_F_UNRESOLVED; in mr_fill_mroute()
233 rtm->rtm_flags |= RTNH_F_OFFLOAD; in mr_fill_mroute()
274 rtm->rtm_type = RTN_MULTICAST; in mr_fill_mroute()
/net/ipv6/
Dip6mr.c2273 int ip6mr_get_route(struct net *net, struct sk_buff *skb, struct rtmsg *rtm, in ip6mr_get_route() argument
2338 err = mr_fill_mroute(mrt, skb, &cache->_c, rtm); in ip6mr_get_route()
2348 struct rtmsg *rtm; in ip6mr_fill_mroute() local
2351 nlh = nlmsg_put(skb, portid, seq, cmd, sizeof(*rtm), flags); in ip6mr_fill_mroute()
2355 rtm = nlmsg_data(nlh); in ip6mr_fill_mroute()
2356 rtm->rtm_family = RTNL_FAMILY_IP6MR; in ip6mr_fill_mroute()
2357 rtm->rtm_dst_len = 128; in ip6mr_fill_mroute()
2358 rtm->rtm_src_len = 128; in ip6mr_fill_mroute()
2359 rtm->rtm_tos = 0; in ip6mr_fill_mroute()
2360 rtm->rtm_table = mrt->id; in ip6mr_fill_mroute()
[all …]
Droute.c4982 struct rtmsg *rtm; in rtm_to_fib6_config() local
4987 err = nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX, in rtm_to_fib6_config()
4993 rtm = nlmsg_data(nlh); in rtm_to_fib6_config()
4995 if (rtm->rtm_tos) { in rtm_to_fib6_config()
5002 .fc_table = rtm->rtm_table, in rtm_to_fib6_config()
5003 .fc_dst_len = rtm->rtm_dst_len, in rtm_to_fib6_config()
5004 .fc_src_len = rtm->rtm_src_len, in rtm_to_fib6_config()
5006 .fc_protocol = rtm->rtm_protocol, in rtm_to_fib6_config()
5007 .fc_type = rtm->rtm_type, in rtm_to_fib6_config()
5014 if (rtm->rtm_type == RTN_UNREACHABLE || in rtm_to_fib6_config()
[all …]
Dip6_fib.c638 struct rtmsg *rtm = nlmsg_data(nlh); in inet6_dump_fib() local
640 if (rtm->rtm_flags & RTM_F_PREFIX) in inet6_dump_fib()
/net/mctp/
Droute.c1186 struct nlattr **tb, struct rtmsg **rtm, in mctp_route_nlparse() argument
1213 *rtm = nlmsg_data(nlh); in mctp_route_nlparse()
1214 if ((*rtm)->rtm_family != AF_MCTP) { in mctp_route_nlparse()
1247 struct rtmsg *rtm; in mctp_newroute() local
1252 &rtm, &mdev, &daddr_start); in mctp_newroute()
1256 if (rtm->rtm_type != RTN_UNICAST) { in mctp_newroute()
1271 rc = mctp_route_add(mdev, daddr_start, rtm->rtm_dst_len, mtu, in mctp_newroute()
1272 rtm->rtm_type); in mctp_newroute()
1282 struct rtmsg *rtm; in mctp_delroute() local
1286 &rtm, &mdev, &daddr_start); in mctp_delroute()
[all …]