def genl_connect(sk):
return int(nl_connect(sk, NETLINK_GENERIC))<EOL>
Connect a Generic Netlink socket.

    https://github.com/thom311/libnl/blob/libnl3_2_25/lib/genl/genl.c#L45

    This function expects a nl_socket class instance previously allocated via nl_socket_alloc(). It calls nl_connect()
    to create the local socket file descriptor and binds the socket to the NETLINK_GENERIC Netlink protocol.

    Using this function is equivalent to:
    nl_connect(sk, NETLINK_GENERIC)

    Positional arguments:
    sk -- unconnected Netlink socket (nl_sock class instance).

    Returns:
    0 on success or a negative error code.