Build netlink request message to add a new neighbour
- tmpl template with data of new neighbour
- flags additional netlink message flags
- result Pointer to store resulting message.
Builds a new netlink message requesting a addition of a new neighbour. The netlink message header isn't fully equipped with all relevant fields and must thus be sent out via nl_send_auto_complete()
or supplemented as needed. tmpl
must contain the attributes of the new neighbour set via
The following attributes must be set in the template:
- Interface index (rtnl_neigh_set_ifindex())
- State (rtnl_neigh_set_state())
- Destination address (rtnl_neigh_set_dst())
- Link layer address (rtnl_neigh_set_lladdr())
- 0 on success or a negative error code.
Definition at line 555 of file neigh.c.
Referenced by rtnl_neigh_add().
return build_neigh_msg(tmpl, RTM_NEWNEIGH, flags, result);