Lines Matching defs:rtm

2258 		   struct rtmsg *rtm, u32 portid)
2309 err = mr_fill_mroute(mrt, skb, &cache->_c, rtm);
2319 struct rtmsg *rtm;
2322 nlh = nlmsg_put(skb, portid, seq, cmd, sizeof(*rtm), flags);
2326 rtm = nlmsg_data(nlh);
2327 rtm->rtm_family = RTNL_FAMILY_IPMR;
2328 rtm->rtm_dst_len = 32;
2329 rtm->rtm_src_len = 32;
2330 rtm->rtm_tos = 0;
2331 rtm->rtm_table = mrt->id;
2334 rtm->rtm_type = RTN_MULTICAST;
2335 rtm->rtm_scope = RT_SCOPE_UNIVERSE;
2337 rtm->rtm_protocol = RTPROT_STATIC;
2339 rtm->rtm_protocol = RTPROT_MROUTED;
2340 rtm->rtm_flags = 0;
2345 err = mr_fill_mroute(mrt, skb, &c->_c, rtm);
2483 struct rtmsg *rtm;
2486 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*rtm))) {
2492 return nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX,
2495 rtm = nlmsg_data(nlh);
2496 if ((rtm->rtm_src_len && rtm->rtm_src_len != 32) ||
2497 (rtm->rtm_dst_len && rtm->rtm_dst_len != 32) ||
2498 rtm->rtm_tos || rtm->rtm_table || rtm->rtm_protocol ||
2499 rtm->rtm_scope || rtm->rtm_type || rtm->rtm_flags) {
2504 err = nlmsg_parse_deprecated_strict(nlh, sizeof(*rtm), tb, RTA_MAX,
2509 if ((tb[RTA_SRC] && !rtm->rtm_src_len) ||
2510 (tb[RTA_DST] && !rtm->rtm_dst_len)) {
2667 struct rtmsg *rtm;
2670 ret = nlmsg_validate_deprecated(nlh, sizeof(*rtm), RTA_MAX,
2674 rtm = nlmsg_data(nlh);
2677 if (rtm->rtm_family != RTNL_FAMILY_IPMR || rtm->rtm_dst_len != 32 ||
2678 rtm->rtm_type != RTN_MULTICAST ||
2679 rtm->rtm_scope != RT_SCOPE_UNIVERSE ||
2680 !ipmr_rtm_validate_proto(rtm->rtm_protocol))
2721 *mrtsock = rtm->rtm_protocol == RTPROT_MROUTED ? 1 : 0;