Lines Matching refs:rtm
2243 struct rtmsg *rtm, u32 portid) in ipmr_get_route() argument
2294 err = mr_fill_mroute(mrt, skb, &cache->_c, rtm); in ipmr_get_route()
2304 struct rtmsg *rtm; in ipmr_fill_mroute() local
2307 nlh = nlmsg_put(skb, portid, seq, cmd, sizeof(*rtm), flags); in ipmr_fill_mroute()
2311 rtm = nlmsg_data(nlh); in ipmr_fill_mroute()
2312 rtm->rtm_family = RTNL_FAMILY_IPMR; in ipmr_fill_mroute()
2313 rtm->rtm_dst_len = 32; in ipmr_fill_mroute()
2314 rtm->rtm_src_len = 32; in ipmr_fill_mroute()
2315 rtm->rtm_tos = 0; in ipmr_fill_mroute()
2316 rtm->rtm_table = mrt->id; in ipmr_fill_mroute()
2319 rtm->rtm_type = RTN_MULTICAST; in ipmr_fill_mroute()
2320 rtm->rtm_scope = RT_SCOPE_UNIVERSE; in ipmr_fill_mroute()
2322 rtm->rtm_protocol = RTPROT_STATIC; in ipmr_fill_mroute()
2324 rtm->rtm_protocol = RTPROT_MROUTED; in ipmr_fill_mroute()
2325 rtm->rtm_flags = 0; in ipmr_fill_mroute()
2330 err = mr_fill_mroute(mrt, skb, &c->_c, rtm); in ipmr_fill_mroute()
2468 struct rtmsg *rtm; in ipmr_rtm_valid_getroute_req() local
2471 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*rtm))) { in ipmr_rtm_valid_getroute_req()
2477 return nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX, in ipmr_rtm_valid_getroute_req()
2480 rtm = nlmsg_data(nlh); in ipmr_rtm_valid_getroute_req()
2481 if ((rtm->rtm_src_len && rtm->rtm_src_len != 32) || in ipmr_rtm_valid_getroute_req()
2482 (rtm->rtm_dst_len && rtm->rtm_dst_len != 32) || in ipmr_rtm_valid_getroute_req()
2483 rtm->rtm_tos || rtm->rtm_table || rtm->rtm_protocol || in ipmr_rtm_valid_getroute_req()
2484 rtm->rtm_scope || rtm->rtm_type || rtm->rtm_flags) { in ipmr_rtm_valid_getroute_req()
2489 err = nlmsg_parse_deprecated_strict(nlh, sizeof(*rtm), tb, RTA_MAX, in ipmr_rtm_valid_getroute_req()
2494 if ((tb[RTA_SRC] && !rtm->rtm_src_len) || in ipmr_rtm_valid_getroute_req()
2495 (tb[RTA_DST] && !rtm->rtm_dst_len)) { in ipmr_rtm_valid_getroute_req()
2650 struct rtmsg *rtm; in rtm_to_ipmr_mfcc() local
2653 ret = nlmsg_validate_deprecated(nlh, sizeof(*rtm), RTA_MAX, in rtm_to_ipmr_mfcc()
2657 rtm = nlmsg_data(nlh); in rtm_to_ipmr_mfcc()
2660 if (rtm->rtm_family != RTNL_FAMILY_IPMR || rtm->rtm_dst_len != 32 || in rtm_to_ipmr_mfcc()
2661 rtm->rtm_type != RTN_MULTICAST || in rtm_to_ipmr_mfcc()
2662 rtm->rtm_scope != RT_SCOPE_UNIVERSE || in rtm_to_ipmr_mfcc()
2663 !ipmr_rtm_validate_proto(rtm->rtm_protocol)) in rtm_to_ipmr_mfcc()
2704 *mrtsock = rtm->rtm_protocol == RTPROT_MROUTED ? 1 : 0; in rtm_to_ipmr_mfcc()