/net/phonet/ |
D | pn_netlink.c | 163 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/ |
D | af_mpls.c | 1816 struct rtmsg *rtm; in rtm_to_route_config() local 1821 err = nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX, in rtm_to_route_config() 1827 rtm = nlmsg_data(nlh); in rtm_to_route_config() 1829 if (rtm->rtm_family != AF_MPLS) { in rtm_to_route_config() 1833 if (rtm->rtm_dst_len != 20) { in rtm_to_route_config() 1837 if (rtm->rtm_src_len != 0) { in rtm_to_route_config() 1841 if (rtm->rtm_tos != 0) { in rtm_to_route_config() 1845 if (rtm->rtm_table != RT_TABLE_MAIN) { in rtm_to_route_config() 1856 if (rtm->rtm_scope != RT_SCOPE_UNIVERSE) { in rtm_to_route_config() 1861 if (rtm->rtm_type != RTN_UNICAST) { in rtm_to_route_config() [all …]
|
/net/ipv4/ |
D | fib_frontend.c | 731 struct rtmsg *rtm; in rtm_to_fib_config() local 733 err = nlmsg_validate_deprecated(nlh, sizeof(*rtm), RTA_MAX, in rtm_to_fib_config() 740 rtm = nlmsg_data(nlh); in rtm_to_fib_config() 741 cfg->fc_dst_len = rtm->rtm_dst_len; in rtm_to_fib_config() 742 cfg->fc_tos = rtm->rtm_tos; in rtm_to_fib_config() 743 cfg->fc_table = rtm->rtm_table; in rtm_to_fib_config() 744 cfg->fc_protocol = rtm->rtm_protocol; in rtm_to_fib_config() 745 cfg->fc_scope = rtm->rtm_scope; in rtm_to_fib_config() 746 cfg->fc_type = rtm->rtm_type; in rtm_to_fib_config() 747 cfg->fc_flags = rtm->rtm_flags; in rtm_to_fib_config() [all …]
|
D | ipmr.c | 2236 struct rtmsg *rtm, u32 portid) in ipmr_get_route() argument 2292 err = mr_fill_mroute(mrt, skb, &cache->_c, rtm); in ipmr_get_route() 2303 struct rtmsg *rtm; in ipmr_fill_mroute() local 2306 nlh = nlmsg_put(skb, portid, seq, cmd, sizeof(*rtm), flags); in ipmr_fill_mroute() 2310 rtm = nlmsg_data(nlh); in ipmr_fill_mroute() 2311 rtm->rtm_family = RTNL_FAMILY_IPMR; in ipmr_fill_mroute() 2312 rtm->rtm_dst_len = 32; in ipmr_fill_mroute() 2313 rtm->rtm_src_len = 32; in ipmr_fill_mroute() 2314 rtm->rtm_tos = 0; in ipmr_fill_mroute() 2315 rtm->rtm_table = mrt->id; in ipmr_fill_mroute() [all …]
|
D | fib_semantics.c | 1804 struct rtmsg *rtm; in fib_dump_info() local 1806 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*rtm), flags); in fib_dump_info() 1810 rtm = nlmsg_data(nlh); in fib_dump_info() 1811 rtm->rtm_family = AF_INET; in fib_dump_info() 1812 rtm->rtm_dst_len = fri->dst_len; in fib_dump_info() 1813 rtm->rtm_src_len = 0; in fib_dump_info() 1814 rtm->rtm_tos = fri->tos; in fib_dump_info() 1816 rtm->rtm_table = tb_id; in fib_dump_info() 1818 rtm->rtm_table = RT_TABLE_COMPAT; in fib_dump_info() 1821 rtm->rtm_type = fri->type; in fib_dump_info() [all …]
|
D | route.c | 3228 struct rtmsg *rtm; in inet_rtm_valid_getroute_req() local 3231 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*rtm))) { in inet_rtm_valid_getroute_req() 3238 return nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX, in inet_rtm_valid_getroute_req() 3241 rtm = nlmsg_data(nlh); in inet_rtm_valid_getroute_req() 3242 if ((rtm->rtm_src_len && rtm->rtm_src_len != 32) || in inet_rtm_valid_getroute_req() 3243 (rtm->rtm_dst_len && rtm->rtm_dst_len != 32) || in inet_rtm_valid_getroute_req() 3244 rtm->rtm_table || rtm->rtm_protocol || in inet_rtm_valid_getroute_req() 3245 rtm->rtm_scope || rtm->rtm_type) { in inet_rtm_valid_getroute_req() 3250 if (rtm->rtm_flags & ~(RTM_F_NOTIFY | in inet_rtm_valid_getroute_req() 3257 err = nlmsg_parse_deprecated_strict(nlh, sizeof(*rtm), tb, RTA_MAX, in inet_rtm_valid_getroute_req() [all …]
|
D | ipmr_base.c | 209 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()
|
/net/mctp/ |
D | route.c | 919 struct nlattr **tb, struct rtmsg **rtm, in mctp_route_nlparse() argument 946 *rtm = nlmsg_data(nlh); in mctp_route_nlparse() 947 if ((*rtm)->rtm_family != AF_MCTP) { in mctp_route_nlparse() 975 struct rtmsg *rtm; in mctp_newroute() local 980 &rtm, &mdev, &daddr_start); in mctp_newroute() 984 if (rtm->rtm_type != RTN_UNICAST) { in mctp_newroute() 992 if (rtm->rtm_type != RTN_UNICAST) in mctp_newroute() 995 rc = mctp_route_add(mdev, daddr_start, rtm->rtm_dst_len, mtu, in mctp_newroute() 996 rtm->rtm_type); in mctp_newroute() 1006 struct rtmsg *rtm; in mctp_delroute() local [all …]
|
/net/ipv6/ |
D | route.c | 4998 struct rtmsg *rtm; in rtm_to_fib6_config() local 5003 err = nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX, in rtm_to_fib6_config() 5009 rtm = nlmsg_data(nlh); in rtm_to_fib6_config() 5012 .fc_table = rtm->rtm_table, in rtm_to_fib6_config() 5013 .fc_dst_len = rtm->rtm_dst_len, in rtm_to_fib6_config() 5014 .fc_src_len = rtm->rtm_src_len, in rtm_to_fib6_config() 5016 .fc_protocol = rtm->rtm_protocol, in rtm_to_fib6_config() 5017 .fc_type = rtm->rtm_type, in rtm_to_fib6_config() 5024 if (rtm->rtm_type == RTN_UNREACHABLE || in rtm_to_fib6_config() 5025 rtm->rtm_type == RTN_BLACKHOLE || in rtm_to_fib6_config() [all …]
|
D | ip6mr.c | 2257 int ip6mr_get_route(struct net *net, struct sk_buff *skb, struct rtmsg *rtm, in ip6mr_get_route() argument 2322 err = mr_fill_mroute(mrt, skb, &cache->_c, rtm); in ip6mr_get_route() 2332 struct rtmsg *rtm; in ip6mr_fill_mroute() local 2335 nlh = nlmsg_put(skb, portid, seq, cmd, sizeof(*rtm), flags); in ip6mr_fill_mroute() 2339 rtm = nlmsg_data(nlh); in ip6mr_fill_mroute() 2340 rtm->rtm_family = RTNL_FAMILY_IP6MR; in ip6mr_fill_mroute() 2341 rtm->rtm_dst_len = 128; in ip6mr_fill_mroute() 2342 rtm->rtm_src_len = 128; in ip6mr_fill_mroute() 2343 rtm->rtm_tos = 0; in ip6mr_fill_mroute() 2344 rtm->rtm_table = mrt->id; in ip6mr_fill_mroute() [all …]
|
D | ip6_fib.c | 638 struct rtmsg *rtm = nlmsg_data(nlh); in inet6_dump_fib() local 640 if (rtm->rtm_flags & RTM_F_PREFIX) in inet6_dump_fib()
|