Add a new neighbour
- sk Netlink socket.
- tmpl template with requested changes
- flags additional netlink message flags
Builds a netlink message by calling rtnl_neigh_build_add_request()
, sends the request to the kernel and waits for the next ACK to be received and thus blocks until the request has been fullfilled.
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 sucess or a negative error if an error occured.
Definition at line 579 of file neigh.c.
References nl_send_auto_complete(), nlmsg_free(), and rtnl_neigh_build_add_request().