Lines Matching defs:rtm
2403 struct rtmsg *rtm, u32 portid)
2456 err = mr_fill_mroute(mrt, skb, &cache->_c, rtm);
2466 struct rtmsg *rtm;
2469 nlh = nlmsg_put(skb, portid, seq, cmd, sizeof(*rtm), flags);
2473 rtm = nlmsg_data(nlh);
2474 rtm->rtm_family = RTNL_FAMILY_IPMR;
2475 rtm->rtm_dst_len = 32;
2476 rtm->rtm_src_len = 32;
2477 rtm->rtm_tos = 0;
2478 rtm->rtm_table = mrt->id;
2481 rtm->rtm_type = RTN_MULTICAST;
2482 rtm->rtm_scope = RT_SCOPE_UNIVERSE;
2484 rtm->rtm_protocol = RTPROT_STATIC;
2486 rtm->rtm_protocol = RTPROT_MROUTED;
2487 rtm->rtm_flags = 0;
2492 err = mr_fill_mroute(mrt, skb, &c->_c, rtm);
2629 struct rtmsg *rtm;
2632 rtm = nlmsg_payload(nlh, sizeof(*rtm));
2633 if (!rtm) {
2639 return nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX,
2642 if ((rtm->rtm_src_len && rtm->rtm_src_len != 32) ||
2643 (rtm->rtm_dst_len && rtm->rtm_dst_len != 32) ||
2644 rtm->rtm_tos || rtm->rtm_table || rtm->rtm_protocol ||
2645 rtm->rtm_scope || rtm->rtm_type || rtm->rtm_flags) {
2650 err = nlmsg_parse_deprecated_strict(nlh, sizeof(*rtm), tb, RTA_MAX,
2655 if ((tb[RTA_SRC] && !rtm->rtm_src_len) ||
2656 (tb[RTA_DST] && !rtm->rtm_dst_len)) {
2813 struct rtmsg *rtm;
2816 ret = nlmsg_validate_deprecated(nlh, sizeof(*rtm), RTA_MAX,
2820 rtm = nlmsg_data(nlh);
2823 if (rtm->rtm_family != RTNL_FAMILY_IPMR || rtm->rtm_dst_len != 32 ||
2824 rtm->rtm_type != RTN_MULTICAST ||
2825 rtm->rtm_scope != RT_SCOPE_UNIVERSE ||
2826 !ipmr_rtm_validate_proto(rtm->rtm_protocol))
2867 *mrtsock = rtm->rtm_protocol == RTPROT_MROUTED ? 1 : 0;