shill: Adds BSS nl80211 attribute.

The BSS attribute, which is contained in the
NL80211_CMD_NEW_SCAN_RESULTS netlink message, contains SSID information
received from a scan.

BUG=chromium:221118
TEST=unittest.

Change-Id: I20766ae6d73ae5729e4ae8de47cac8bcbf5b3fe9
Reviewed-on: https://gerrit.chromium.org/gerrit/48013
Reviewed-by: Wade Guthrie <wdg@chromium.org>
Tested-by: Wade Guthrie <wdg@chromium.org>
Commit-Queue: Wade Guthrie <wdg@chromium.org>
diff --git a/attribute_list.cc b/attribute_list.cc
index a0d441f..33e1b95 100644
--- a/attribute_list.cc
+++ b/attribute_list.cc
@@ -221,6 +221,16 @@
   return true;
 }
 
+bool AttributeList::CreateSsidAttribute(int id, const char *id_string) {
+  if (ContainsKey(attributes_, id)) {
+    LOG(ERROR) << "Trying to re-add attribute: " << id;
+    return false;
+  }
+  attributes_[id] = AttributePointer(
+      new NetlinkSsidAttribute(id, id_string));
+  return true;
+}
+
 bool AttributeList::SetStringAttributeValue(int id, string value) {
   NetlinkAttribute *attribute = GetAttribute(id);
   if (!attribute)