bmc: allowing packing transport flags densely

Future transport backends can densely fill in the upper 5 bits of the
transport flag bitfield.

Signed-off-by: Benjamin Fair <benjaminfair@google.com>
Change-Id: Ie4ee59e0581e458a9020775e18270100f9a1de4e
diff --git a/bmc/firmware_handler.hpp b/bmc/firmware_handler.hpp
index 3a4b4be..6275843 100644
--- a/bmc/firmware_handler.hpp
+++ b/bmc/firmware_handler.hpp
@@ -117,19 +117,18 @@
      * @param[in] firmwares - list of firmware types and their handlers
      * @param[in] blobs - list of blobs_ids to support
      * @param[in] transports - list of transport types and their handlers
-     * @param[in] bitmask - bitmask of transports to support
      * @param[in] verification - pointer to object for triggering verification
      * @param[in] update - point to object for triggering the update
      */
     FirmwareBlobHandler(std::vector<HandlerPack>&& firmwares,
                         const std::vector<std::string>& blobs,
                         const std::vector<DataHandlerPack>& transports,
-                        std::uint16_t bitmask, ActionMap&& actionPacks) :
+                        ActionMap&& actionPacks) :
         handlers(std::move(firmwares)),
-        blobIDs(blobs), transports(transports), bitmask(bitmask),
-        activeImage(activeImageBlobId), activeHash(activeHashBlobId),
-        verifyImage(verifyBlobId), updateImage(updateBlobId), lookup(),
-        state(UpdateState::notYetStarted), actionPacks(std::move(actionPacks))
+        blobIDs(blobs), transports(transports), activeImage(activeImageBlobId),
+        activeHash(activeHashBlobId), verifyImage(verifyBlobId),
+        updateImage(updateBlobId), lookup(), state(UpdateState::notYetStarted),
+        actionPacks(std::move(actionPacks))
     {
     }
     ~FirmwareBlobHandler() = default;
@@ -227,9 +226,6 @@
     /** List of handlers by transport type. */
     std::vector<DataHandlerPack> transports;
 
-    /** The bits set indicate what transport mechanisms are supported. */
-    std::uint16_t bitmask;
-
     /** Active image session. */
     Session activeImage;
 
@@ -260,6 +256,11 @@
     ActionStatus lastVerificationStatus = ActionStatus::unknown;
 
     ActionStatus lastUpdateStatus = ActionStatus::unknown;
+
+    /** Portion of "flags" argument to open() which specifies the desired
+     *  transport type
+     */
+    static constexpr std::uint16_t transportMask = 0xff00;
 };
 
 } // namespace ipmi_flash