def do_scan_results(sk, if_index, driver_id, results):
msg = nlmsg_alloc()<EOL>genlmsg_put(msg, <NUM_LIT:0>, <NUM_LIT:0>, driver_id, <NUM_LIT:0>, NLM_F_DUMP, nl80211.NL80211_CMD_GET_SCAN, <NUM_LIT:0>)<EOL>nla_put_u32(msg, nl80211.NL80211_ATTR_IFINDEX, if_index)<EOL>cb = libnl.handlers.nl_cb_alloc(libnl.handlers.NL_CB_DEFAULT)<EOL>libnl.handlers.nl_cb_set(cb, libnl.handlers.NL_CB_VALID, libnl.handlers.NL_CB_CUSTOM, callback_dump, results)<EOL>_LOGGER.debug('<STR_LIT>')<EOL>ret = nl_send_auto(sk, msg)<EOL>if ret >= <NUM_LIT:0>:<EOL><INDENT>_LOGGER.debug('<STR_LIT>')<EOL>ret = nl_recvmsgs(sk, cb)<EOL><DEDENT>return ret<EOL>
Retrieve the results of a successful scan (SSIDs and data about them).

    This function does not require root privileges. It eventually calls a callback that actually decodes data about
    SSIDs but this function kicks that off.

    May exit the program (sys.exit()) if a fatal error occurs.

    Positional arguments:
    sk -- nl_sock class instance (from nl_socket_alloc()).
    if_index -- interface index (integer).
    driver_id -- nl80211 driver ID from genl_ctrl_resolve() (integer).
    results -- dictionary to populate with results. Keys are BSSIDs (MAC addresses) and values are dicts of data.

    Returns:
    0 on success or a negative error code.