code: def callback_dump(msg, results):
      
      bss = dict()  # To be filled by nla_parse_nested().
  
      # First we must parse incoming data into manageable chunks and check for errors.
      gnlh = genlmsghdr(nlmsg_data(nlmsg_hdr(msg)))
      tb = dict((i, None) for i in range(nl80211.NL80211_ATTR_MAX + 1))
      nla_parse(tb, nl80211.NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0), genlmsg_attrlen(gnlh, 0), None)
      if not tb[nl80211.NL80211_ATTR_BSS]:
          print('WARNING: BSS info missing for an access point.')
          return libnl.handlers.NL_SKIP
      if nla_parse_nested(bss, nl80211.NL80211_BSS_MAX, tb[nl80211.NL80211_ATTR_BSS], bss_policy):
          print('WARNING: Failed to parse nested attributes for an access point!')
          return libnl.handlers.NL_SKIP
      if not bss[nl80211.NL80211_BSS_BSSID]:
          print('WARNING: No BSSID detected for an access point!')
          return libnl.handlers.NL_SKIP
      if not bss[nl80211.NL80211_BSS_INFORMATION_ELEMENTS]:
          print('WARNING: No additional information available for an access point!')
          return libnl.handlers.NL_SKIP
  
      # Further parse and then store. Overwrite existing data for BSSID if scan is run multiple times.
      bss_parsed = parse_bss(bss)
      results[bss_parsed['bssid']] = bss_parsed
      return libnl.handlers.NL_SKIP
docs: Here is where SSIDs and their data is decoded from the binary data sent by the kernel.
  
      This function is called once per SSID. Everything in `msg` pertains to just one SSID.
  
      Positional arguments:
      msg -- nl_msg class instance containing the data sent by the kernel.
      results -- dictionary to populate with parsed data.