Lines Matching refs:tmpl
498 static int build_neigh_msg(struct rtnl_neigh *tmpl, int cmd, int flags,
503 .ndm_ifindex = tmpl->n_ifindex,
507 if (!(tmpl->ce_mask & NEIGH_ATTR_DST))
510 nhdr.ndm_family = nl_addr_get_family(tmpl->n_dst);
512 if (tmpl->ce_mask & NEIGH_ATTR_STATE)
513 nhdr.ndm_state = tmpl->n_state;
522 NLA_PUT_ADDR(msg, NDA_DST, tmpl->n_dst);
524 if (tmpl->ce_mask & NEIGH_ATTR_LLADDR)
525 NLA_PUT_ADDR(msg, NDA_LLADDR, tmpl->n_lladdr);
537 * @arg tmpl template with data of new neighbour
544 * or supplemented as needed. \a tmpl must contain the attributes of the new
555 int rtnl_neigh_build_add_request(struct rtnl_neigh *tmpl, int flags,
558 return build_neigh_msg(tmpl, RTM_NEWNEIGH, flags, result);
564 * @arg tmpl template with requested changes
579 int rtnl_neigh_add(struct nl_sock *sk, struct rtnl_neigh *tmpl, int flags)
584 if ((err = rtnl_neigh_build_add_request(tmpl, flags, &msg)) < 0)