def genl_ctrl_probe_by_name(sk, name):
ret = genl_family_alloc()<EOL>if not ret:<EOL><INDENT>return None<EOL><DEDENT>genl_family_set_name(ret, name)<EOL>msg = nlmsg_alloc()<EOL>orig = nl_socket_get_cb(sk)<EOL>cb = nl_cb_clone(orig)<EOL>genlmsg_put(msg, NL_AUTO_PORT, NL_AUTO_SEQ, GENL_ID_CTRL, <NUM_LIT:0>, <NUM_LIT:0>, CTRL_CMD_GETFAMILY, <NUM_LIT:1>)<EOL>nla_put_string(msg, CTRL_ATTR_FAMILY_NAME, name)<EOL>nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, probe_response, ret)<EOL>if nl_send_auto(sk, msg) < <NUM_LIT:0>:<EOL><INDENT>return None<EOL><DEDENT>if nl_recvmsgs(sk, cb) < <NUM_LIT:0>:<EOL><INDENT>return None<EOL><DEDENT>if wait_for_ack(sk) < <NUM_LIT:0>:  <EOL><INDENT>return None<EOL><DEDENT>if genl_family_get_id(ret) != <NUM_LIT:0>:<EOL><INDENT>return ret<EOL><DEDENT>
Look up generic Netlink family by family name querying the kernel directly.

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

    Directly query's the kernel for a given family name.

    Note: This API call differs from genl_ctrl_search_by_name in that it queries the kernel directly, allowing for
    module autoload to take place to resolve the family request. Using an nl_cache prevents that operation.

    Positional arguments:
    sk -- Generic Netlink socket (nl_sock class instance).
    name -- family name (bytes).

    Returns:
    Generic Netlink family `genl_family` class instance or None if no match was found.