Lines Matching refs:tmpl
548 static int build_addr_msg(struct rtnl_addr *tmpl, int cmd, int flags, in build_addr_msg() argument
553 .ifa_family = tmpl->a_family, in build_addr_msg()
554 .ifa_index = tmpl->a_ifindex, in build_addr_msg()
555 .ifa_prefixlen = tmpl->a_prefixlen, in build_addr_msg()
556 .ifa_flags = tmpl->a_flags, in build_addr_msg()
559 if (tmpl->ce_mask & ADDR_ATTR_SCOPE) in build_addr_msg()
560 am.ifa_scope = tmpl->a_scope; in build_addr_msg()
563 if (tmpl->a_family == AF_INET && in build_addr_msg()
564 tmpl->ce_mask & ADDR_ATTR_LOCAL && in build_addr_msg()
565 *((char *) nl_addr_get_binary_addr(tmpl->a_local)) == 127) in build_addr_msg()
578 if (tmpl->ce_mask & ADDR_ATTR_LOCAL) in build_addr_msg()
579 NLA_PUT_ADDR(msg, IFA_LOCAL, tmpl->a_local); in build_addr_msg()
581 if (tmpl->ce_mask & ADDR_ATTR_PEER) in build_addr_msg()
582 NLA_PUT_ADDR(msg, IFA_ADDRESS, tmpl->a_peer); in build_addr_msg()
583 else if (tmpl->ce_mask & ADDR_ATTR_LOCAL) in build_addr_msg()
584 NLA_PUT_ADDR(msg, IFA_ADDRESS, tmpl->a_local); in build_addr_msg()
586 if (tmpl->ce_mask & ADDR_ATTR_LABEL) in build_addr_msg()
587 NLA_PUT_STRING(msg, IFA_LABEL, tmpl->a_label); in build_addr_msg()
589 if (tmpl->ce_mask & ADDR_ATTR_BROADCAST) in build_addr_msg()
590 NLA_PUT_ADDR(msg, IFA_BROADCAST, tmpl->a_bcast); in build_addr_msg()
592 if (tmpl->ce_mask & ADDR_ATTR_CACHEINFO) { in build_addr_msg()
594 .ifa_valid = tmpl->a_cacheinfo.aci_valid, in build_addr_msg()
595 .ifa_prefered = tmpl->a_cacheinfo.aci_prefered, in build_addr_msg()
601 if (tmpl->a_flags & ~0xFF) { in build_addr_msg()
612 NLA_PUT_U32(msg, IFA_FLAGS, tmpl->a_flags); in build_addr_msg()