lib: add netlink handler function