Rename MoQT SetupParameters to SetupOptions.

Draft-18 update. Not in production.

PiperOrigin-RevId: 986218324
diff --git a/quiche/quic/moqt/moqt_framer.cc b/quiche/quic/moqt/moqt_framer.cc
index 3ce7877..aa4d9f1 100644
--- a/quiche/quic/moqt/moqt_framer.cc
+++ b/quiche/quic/moqt/moqt_framer.cc
@@ -277,28 +277,28 @@
 
 }  // namespace
 
-KeyValuePairList SetupParameters::ToKeyValuePairList() const {
+KeyValuePairList SetupOptions::ToKeyValuePairList() const {
   KeyValuePairList out;
   if (max_auth_token_cache_size.has_value()) {
-    out.insert(static_cast<uint64_t>(SetupParameter::kMaxAuthTokenCacheSize),
+    out.insert(static_cast<uint64_t>(SetupOption::kMaxAuthTokenCacheSize),
                *max_auth_token_cache_size);
   }
   if (path.has_value()) {
-    out.insert(static_cast<uint64_t>(SetupParameter::kPath), *path);
+    out.insert(static_cast<uint64_t>(SetupOption::kPath), *path);
   }
   for (const AuthToken& token : authorization_tokens) {
-    out.insert(static_cast<uint64_t>(SetupParameter::kAuthorizationToken),
+    out.insert(static_cast<uint64_t>(SetupOption::kAuthorizationToken),
                SerializeAuthToken(token).AsStringView());
   }
   if (authority.has_value()) {
-    out.insert(static_cast<uint64_t>(SetupParameter::kAuthority), *authority);
+    out.insert(static_cast<uint64_t>(SetupOption::kAuthority), *authority);
   }
   if (moqt_implementation.has_value()) {
-    out.insert(static_cast<uint64_t>(SetupParameter::kMoqtImplementation),
+    out.insert(static_cast<uint64_t>(SetupOption::kMoqtImplementation),
                *moqt_implementation);
   }
   if (support_object_acks.has_value()) {
-    out.insert(static_cast<uint64_t>(SetupParameter::kSupportObjectAcks),
+    out.insert(static_cast<uint64_t>(SetupOption::kSupportObjectAcks),
                *support_object_acks ? 1ULL : 0ULL);
   }
   return out;
@@ -491,12 +491,12 @@
 }
 
 quiche::QuicheBuffer MoqtFramer::SerializeSetup(const MoqtSetup& message) {
-  KeyValuePairList parameters;
-  if (!FillAndValidateSetupParameters(message.parameters, parameters)) {
+  KeyValuePairList options;
+  if (!FillAndValidateSetupOptions(message.options, options)) {
     return quiche::QuicheBuffer();
   }
   return SerializeControlMessage(MoqtMessageType::kSetup,
-                                 WireKeyValuePairList(parameters));
+                                 WireKeyValuePairList(options));
 }
 
 quiche::QuicheBuffer MoqtFramer::SerializeRequestOk(
@@ -676,16 +676,16 @@
           message.delta_from_deadline.ToMicroseconds())));
 }
 
-bool MoqtFramer::FillAndValidateSetupParameters(
-    const SetupParameters& parameters, KeyValuePairList& out) {
-  if (SetupParametersAllowedByMessage(parameters, perspective_,
-                                      using_webtrans_) != MoqtError::kNoError) {
-    QUICHE_BUG(QUICHE_BUG_invalid_setup_parameters)
-        << "Invalid setup parameters for "
+bool MoqtFramer::FillAndValidateSetupOptions(const SetupOptions& options,
+                                             KeyValuePairList& out) {
+  if (SetupOptionsAllowedByMessage(options, perspective_, using_webtrans_) !=
+      MoqtError::kNoError) {
+    QUICHE_BUG(QUICHE_BUG_invalid_setup_options)
+        << "Invalid setup options for "
         << MoqtMessageTypeToString(MoqtMessageType::kSetup);
     return false;
   }
-  out = parameters.ToKeyValuePairList();
+  out = options.ToKeyValuePairList();
   return true;
 }
 
diff --git a/quiche/quic/moqt/moqt_framer.h b/quiche/quic/moqt/moqt_framer.h
index beaa407..282104d 100644
--- a/quiche/quic/moqt/moqt_framer.h
+++ b/quiche/quic/moqt/moqt_framer.h
@@ -75,8 +75,8 @@
 
  private:
   // Returns true if the parameters are valid for the message type.
-  bool FillAndValidateSetupParameters(const SetupParameters& parameters,
-                                      KeyValuePairList& out);
+  bool FillAndValidateSetupOptions(const SetupOptions& options,
+                                   KeyValuePairList& out);
   // Returns true if the metadata is internally consistent.
   static bool ValidateObjectMetadata(const MoqtObject& object);
   const bool using_webtrans_;
diff --git a/quiche/quic/moqt/moqt_key_value_pair.h b/quiche/quic/moqt/moqt_key_value_pair.h
index 09d8949..5eef4d5 100644
--- a/quiche/quic/moqt/moqt_key_value_pair.h
+++ b/quiche/quic/moqt/moqt_key_value_pair.h
@@ -155,11 +155,11 @@
   uint64_t end_group_ = kMaxGroupId;
 };
 
-// Setup parameters.
+// Setup Options.
 // TODO(martinduke): Implement an auth token cache.
 inline constexpr uint64_t kDefaultMaxAuthTokenCacheSize = 0;
 inline constexpr bool kDefaultSupportObjectAcks = false;
-enum class QUICHE_EXPORT SetupParameter : uint64_t {
+enum class QUICHE_EXPORT SetupOption : uint64_t {
   kPath = 0x1,
   kAuthorizationToken = 0x3,
   kMaxAuthTokenCacheSize = 0x4,
@@ -171,10 +171,10 @@
   kSupportObjectAcks = 0xbbf1438,
 };
 // TODO(martinduke): Refactor this to be more like TrackProperties.
-struct QUICHE_EXPORT SetupParameters {
-  SetupParameters() = default;
+struct QUICHE_EXPORT SetupOptions {
+  SetupOptions() = default;
   // Constructors for tests.
-  SetupParameters(absl::string_view path, absl::string_view authority)
+  SetupOptions(absl::string_view path, absl::string_view authority)
       : path(path), authority(authority) {}
 
   std::optional<std::string> path;
@@ -185,7 +185,7 @@
   std::optional<std::string> moqt_implementation;
 
   std::optional<bool> support_object_acks;
-  bool operator==(const SetupParameters& other) const = default;
+  bool operator==(const SetupOptions& other) const = default;
   // Defined in moqt_framer.cc.
   KeyValuePairList ToKeyValuePairList() const;
   // Defined in moqt_parser.cc.
diff --git a/quiche/quic/moqt/moqt_messages.cc b/quiche/quic/moqt/moqt_messages.cc
index 1ac1208..05ac688 100644
--- a/quiche/quic/moqt/moqt_messages.cc
+++ b/quiche/quic/moqt/moqt_messages.cc
@@ -24,15 +24,15 @@
   return static_cast<MoqtObjectStatus>(integer);
 }
 
-MoqtError SetupParametersAllowedByMessage(const SetupParameters& parameters,
-                                          quic::Perspective sender_perspective,
-                                          bool webtrans) {
+MoqtError SetupOptionsAllowedByMessage(const SetupOptions& options,
+                                       quic::Perspective sender_perspective,
+                                       bool webtrans) {
   bool should_have_path_and_authority =
       !webtrans && sender_perspective == quic::Perspective::IS_CLIENT;
-  if (should_have_path_and_authority != parameters.path.has_value()) {
+  if (should_have_path_and_authority != options.path.has_value()) {
     return MoqtError::kInvalidPath;
   }
-  if (should_have_path_and_authority != parameters.authority.has_value()) {
+  if (should_have_path_and_authority != options.authority.has_value()) {
     return MoqtError::kInvalidAuthority;
   }
   return MoqtError::kNoError;
diff --git a/quiche/quic/moqt/moqt_messages.h b/quiche/quic/moqt/moqt_messages.h
index 79b27be..9ed77fd 100644
--- a/quiche/quic/moqt/moqt_messages.h
+++ b/quiche/quic/moqt/moqt_messages.h
@@ -235,7 +235,7 @@
 };
 
 struct QUICHE_EXPORT MoqtSetup {
-  SetupParameters parameters;
+  SetupOptions options;
 };
 
 // These codes do not appear on the wire.
@@ -499,9 +499,9 @@
 };
 
 // Returns false if the parameters cannot be in |message type|.
-MoqtError SetupParametersAllowedByMessage(const SetupParameters& parameters,
-                                          quic::Perspective sender_perspective,
-                                          bool webtrans);
+MoqtError SetupOptionsAllowedByMessage(const SetupOptions& options,
+                                       quic::Perspective sender_perspective,
+                                       bool webtrans);
 
 std::string MoqtMessageTypeToString(MoqtMessageType message_type);
 std::string MoqtDataStreamTypeToString(MoqtDataStreamType type);
diff --git a/quiche/quic/moqt/moqt_parser.cc b/quiche/quic/moqt/moqt_parser.cc
index d03b67a..fab425f 100644
--- a/quiche/quic/moqt/moqt_parser.cc
+++ b/quiche/quic/moqt/moqt_parser.cc
@@ -178,8 +178,8 @@
   return absl::OkStatus();
 }
 
-bool ParseAuthTokenParameter(absl::string_view field,
-                             std::vector<AuthToken>& out) {
+bool ParseAuthTokenOption(absl::string_view field,
+                          std::vector<AuthToken>& out) {
   quic::QuicDataReader reader(field);
   AuthTokenAliasType alias_type;
   uint64_t alias;
@@ -267,24 +267,23 @@
 
 }  // namespace
 
-absl::Status SetupParameters::FromKeyValuePairList(
-    const KeyValuePairList& list) {
+absl::Status SetupOptions::FromKeyValuePairList(const KeyValuePairList& list) {
   absl::Status status = absl::OkStatus();
   uint64_t last_key;
   bool result = list.ForEach(
       [&](uint64_t key, std::variant<uint64_t, absl::string_view> value) {
         last_key = key;
-        switch (static_cast<SetupParameter>(key)) {
-          case SetupParameter::kMaxAuthTokenCacheSize:
+        switch (static_cast<SetupOption>(key)) {
+          case SetupOption::kMaxAuthTokenCacheSize:
             if (max_auth_token_cache_size.has_value()) {
-              status = absl::InvalidArgumentError("Duplicate Setup Parameter");
+              status = absl::InvalidArgumentError("Duplicate Setup Option");
               return false;
             }
             max_auth_token_cache_size = std::get<uint64_t>(value);
             break;
-          case SetupParameter::kPath:
+          case SetupOption::kPath:
             if (path.has_value()) {
-              status = absl::InvalidArgumentError("Duplicate Setup Parameter");
+              status = absl::InvalidArgumentError("Duplicate Setup Option");
               return false;
             }
             if (!http2::adapter::HeaderValidator::IsValidPath(
@@ -296,14 +295,14 @@
             }
             path = std::get<absl::string_view>(value);
             break;
-          case SetupParameter::kAuthorizationToken:
-            if (!ParseAuthTokenParameter(std::get<absl::string_view>(value),
-                                         authorization_tokens)) {
-              status = KeyValueFormatError("Malformed auth token parameter");
+          case SetupOption::kAuthorizationToken:
+            if (!ParseAuthTokenOption(std::get<absl::string_view>(value),
+                                      authorization_tokens)) {
+              status = KeyValueFormatError("Malformed auth token option");
               return false;
             }
             break;
-          case SetupParameter::kAuthority:
+          case SetupOption::kAuthority:
             if (!http2::adapter::HeaderValidator::IsValidAuthority(
                     std::get<absl::string_view>(value))) {
               status = MoqtErrorStatusWithCode("Invalid authority field",
@@ -312,18 +311,18 @@
             }
             authority = std::get<absl::string_view>(value);
             break;
-          case SetupParameter::kMoqtImplementation:
+          case SetupOption::kMoqtImplementation:
             if (moqt_implementation.has_value()) {
-              status = absl::InvalidArgumentError("Duplicate Setup Parameter");
+              status = absl::InvalidArgumentError("Duplicate Setup Option");
               return false;
             }
             QUICHE_LOG(INFO) << "Peer MOQT implementation: "
                              << std::get<absl::string_view>(value);
             moqt_implementation = std::get<absl::string_view>(value);
             break;
-          case SetupParameter::kSupportObjectAcks:
+          case SetupOption::kSupportObjectAcks:
             if (support_object_acks.has_value()) {
-              status = absl::InvalidArgumentError("Duplicate Setup Parameter");
+              status = absl::InvalidArgumentError("Duplicate Setup Option");
               return false;
             }
             if (std::get<uint64_t>(value) > 1) {
@@ -340,7 +339,7 @@
       });
   if (!result && status.ok()) {
     return absl::InvalidArgumentError(
-        absl::StrCat("Failed to parse the value for the setup parameter key 0x",
+        absl::StrCat("Failed to parse the value for the Setup Option key 0x",
                      absl::Hex(static_cast<uint64_t>(last_key))));
   }
   return status;
@@ -369,8 +368,8 @@
                 .value_or(quic::QuicTimeDelta::Infinite());
         break;
       case MessageParameter::kAuthorizationToken:
-        if (!ParseAuthTokenParameter(std::get<absl::string_view>(value),
-                                     authorization_tokens)) {
+        if (!ParseAuthTokenOption(std::get<absl::string_view>(value),
+                                  authorization_tokens)) {
           status = KeyValueFormatError("Malformed auth token parameter");
           return false;
         }
@@ -638,10 +637,9 @@
     absl::string_view data) const {
   quic::QuicDataReader reader(data);
   MoqtSetup setup;
-  KeyValuePairList parameters;
-  QUICHE_RETURN_IF_ERROR(ParseKeyValuePairList(reader, parameters));
-  QUICHE_RETURN_IF_ERROR(
-      FillAndValidateSetupParameters(parameters, setup.parameters));
+  KeyValuePairList options;
+  QUICHE_RETURN_IF_ERROR(ParseKeyValuePairList(reader, options));
+  QUICHE_RETURN_IF_ERROR(FillAndValidateSetupOptions(options, setup.options));
   // TODO(martinduke): Validate construction of the PATH (Sec 8.3.2.1)
   QUICHE_RETURN_IF_ERROR(CheckForTrailingData(reader));
   return setup;
@@ -1003,13 +1001,13 @@
   return absl::OkStatus();
 }
 
-absl::Status MoqtControlMessageParser::FillAndValidateSetupParameters(
-    const KeyValuePairList& in, SetupParameters& out) const {
+absl::Status MoqtControlMessageParser::FillAndValidateSetupOptions(
+    const KeyValuePairList& in, SetupOptions& out) const {
   QUICHE_RETURN_IF_ERROR(out.FromKeyValuePairList(in));
-  MoqtError error = SetupParametersAllowedByMessage(
+  MoqtError error = SetupOptionsAllowedByMessage(
       out, FlipPerspective(perspective_), uses_web_transport_);
   if (error != MoqtError::kNoError) {
-    return MoqtErrorStatusWithCode("Setup parameter parsing error", error);
+    return MoqtErrorStatusWithCode("Setup option parsing error", error);
   }
   return absl::OkStatus();
 }
diff --git a/quiche/quic/moqt/moqt_parser.h b/quiche/quic/moqt/moqt_parser.h
index 01107af..cb9752c 100644
--- a/quiche/quic/moqt/moqt_parser.h
+++ b/quiche/quic/moqt/moqt_parser.h
@@ -244,8 +244,8 @@
   // large. Sets a ParseError if the name is malformed.
   absl::Status ReadFullTrackName(quic::QuicDataReader& reader,
                                  FullTrackName& full_track_name) const;
-  absl::Status FillAndValidateSetupParameters(const KeyValuePairList& in,
-                                              SetupParameters& out) const;
+  absl::Status FillAndValidateSetupOptions(const KeyValuePairList& in,
+                                           SetupOptions& out) const;
   // |reader| points to the beginning of a KeyValuePairList. Returns false if
   // there is any sort of error. (The function calls ParseError(), so the
   // caller has no need to do so.)
diff --git a/quiche/quic/moqt/moqt_parser_test.cc b/quiche/quic/moqt/moqt_parser_test.cc
index c4d1c83..f60fc63 100644
--- a/quiche/quic/moqt/moqt_parser_test.cc
+++ b/quiche/quic/moqt/moqt_parser_test.cc
@@ -609,7 +609,7 @@
 TEST_F(MoqtMessageSpecificTest, ClientSetupMaxAuthTokenCacheSizeAppearsTwice) {
   char setup[] = {
       0xaf, 0x00, 0x00, 0x0a,
-      0x03,                          // 3 params
+      0x03,                          // 3 options
       0x01, 0x03, 0x66, 0x6f, 0x6f,  // path = "foo"
       0x03, 0x32,                    // max_auth_token_cache_size = 50
       0x00, 0x32,                    // max_auth_token_cache_size = 50
@@ -617,13 +617,13 @@
   absl::StatusOr<std::vector<AnyMoqtControlMessage>> parsed =
       ParseAllMessages(absl::string_view(setup, sizeof(setup)));
   EXPECT_THAT(parsed, StatusIs(absl::StatusCode::kInvalidArgument,
-                               HasSubstr("Duplicate Setup Parameter")));
+                               HasSubstr("Duplicate Setup Option")));
 }
 
 TEST_F(MoqtMessageSpecificTest, ServerSetupAuthorizationTokenTagRegister) {
   char setup[] = {
       0xaf, 0x00, 0x00, 0x09,
-      0x01,                                            // 1 param
+      0x01,                                            // 1 option
       0x03, 0x06, 0x01, 0x10, 0x00, 0x62, 0x61, 0x72,  // REGISTER 0x01
   };
   absl::StatusOr<std::vector<AnyMoqtControlMessage>> parsed =
@@ -636,7 +636,7 @@
 TEST_F(MoqtMessageSpecificTest, SetupPathFromServer) {
   char setup[] = {
       0xaf, 0x00, 0x00, 0x06,
-      0x01,                          // 1 param
+      0x01,                          // 1 option
       0x01, 0x03, 0x66, 0x6f, 0x6f,  // path = "foo"
   };
   absl::StatusOr<std::vector<AnyMoqtControlMessage>> parsed =
@@ -644,7 +644,7 @@
                        kDefaultMoqtVersion, true, quic::Perspective::IS_CLIENT);
   ASSERT_THAT(parsed.status(),
               StatusIs(absl::StatusCode::kInvalidArgument,
-                       HasSubstr("Setup parameter parsing error")));
+                       HasSubstr("Setup option parsing error")));
   EXPECT_EQ(ExtractMoqtErrorForStatus(parsed.status()),
             MoqtError::kInvalidPath);
 }
@@ -652,7 +652,7 @@
 TEST_F(MoqtMessageSpecificTest, SetupAuthorityFromServer) {
   char setup[] = {
       0xaf, 0x00, 0x00, 0x06,
-      0x01,                          // 1 param
+      0x01,                          // 1 option
       0x05, 0x03, 0x66, 0x6f, 0x6f,  // authority = "foo"
   };
   absl::StatusOr<std::vector<AnyMoqtControlMessage>> parsed =
@@ -665,7 +665,7 @@
 TEST_F(MoqtMessageSpecificTest, SetupPathAppearsTwice) {
   char setup[] = {
       0xaf, 0x00, 0x00, 0x0b,
-      0x02,                          // 2 params
+      0x02,                          // 2 options
       0x01, 0x03, 0x66, 0x6f, 0x6f,  // path = "foo"
       0x00, 0x03, 0x66, 0x6f, 0x6f,  // path = "foo"
   };
@@ -678,7 +678,7 @@
 TEST_F(MoqtMessageSpecificTest, SetupPathOverWebtrans) {
   char setup[] = {
       0xaf, 0x00, 0x00, 0x06,
-      0x01,                          // 1 param
+      0x01,                          // 1 option
       0x01, 0x03, 0x66, 0x6f, 0x6f,  // path = "foo"
   };
   absl::StatusOr<std::vector<AnyMoqtControlMessage>> parsed = ParseAllMessages(
@@ -690,7 +690,7 @@
 TEST_F(MoqtMessageSpecificTest, SetupAuthorityOverWebtrans) {
   char setup[] = {
       0xaf, 0x00, 0x00, 0x06,
-      0x01,                          // 1 param
+      0x01,                          // 1 option
       0x05, 0x03, 0x66, 0x6f, 0x6f,  // authority = "foo"
   };
   absl::StatusOr<std::vector<AnyMoqtControlMessage>> parsed = ParseAllMessages(
@@ -702,7 +702,7 @@
 TEST_F(MoqtMessageSpecificTest, SetupPathMissing) {
   char setup[] = {
       0xaf, 0x00, 0x00, 0x01,
-      0x00,  // no param
+      0x00,  // no options
   };
   absl::StatusOr<std::vector<AnyMoqtControlMessage>> parsed = ParseAllMessages(
       absl::string_view(setup, sizeof(setup)), kDefaultMoqtVersion, kRawQuic);
@@ -713,7 +713,7 @@
 TEST_F(MoqtMessageSpecificTest, ClientSetupMalformedPath) {
   char setup[] = {
       0xaf, 0x00, 0x00, 0x06,
-      0x01,                          // 1 param
+      0x01,                          // 1 option
       0x01, 0x03, 0x66, 0x5c, 0x6f,  // path = "f\o"
   };
   absl::StatusOr<std::vector<AnyMoqtControlMessage>> parsed = ParseAllMessages(
@@ -725,7 +725,7 @@
 TEST_F(MoqtMessageSpecificTest, ClientSetupMalformedAuthority) {
   char setup[] = {
       0xaf, 0x00, 0x00, 0x0b,
-      0x02,                          // 2 params
+      0x02,                          // 2 options
       0x01, 0x03, 0x66, 0x6f, 0x6f,  // path = "foo"
       0x04, 0x03, 0x66, 0x5c, 0x6f,  // authority = "f\o"
   };
@@ -735,10 +735,10 @@
             MoqtError::kMalformedAuthority);
 }
 
-TEST_F(MoqtMessageSpecificTest, ServerSetupUnknownParameterIsOk) {
+TEST_F(MoqtMessageSpecificTest, ServerSetupUnknownOptionIsOk) {
   char setup[] = {
       0xaf, 0x00, 0x00, 0x0b,
-      0x02,                          // 2 params
+      0x02,                          // 2 options
       0x1f, 0x03, 0x62, 0x61, 0x72,  // 0x1f = "bar"
       0x00, 0x03, 0x62, 0x61, 0x72,  // 0x1f = "bar"
   };
@@ -748,7 +748,7 @@
   ASSERT_TRUE(parsed.ok());
   ASSERT_EQ(parsed->size(), 1);
   MoqtSetup message = std::get<MoqtSetup>((*parsed)[0]);
-  EXPECT_EQ(message.parameters, SetupParameters());
+  EXPECT_EQ(message.options, SetupOptions());
 }
 
 TEST_F(MoqtMessageSpecificTest, SubscribeDeliveryTimeoutTwice) {
diff --git a/quiche/quic/moqt/moqt_session.cc b/quiche/quic/moqt/moqt_session.cc
index e361f42..9d948d5 100644
--- a/quiche/quic/moqt/moqt_session.cc
+++ b/quiche/quic/moqt/moqt_session.cc
@@ -144,7 +144,7 @@
   trace_recorder_.RecordControlStreamCreated(stream->GetStreamId());
   stream->SetVisitor(std::move(control_stream));
   MoqtSetup setup;
-  parameters_.ToSetupParameters(setup.parameters);
+  parameters_.ToSetupOptions(setup.options);
   SendControlMessage(framer_.SerializeSetup(setup));
   QUIC_DLOG(INFO) << ENDPOINT << "Send SETUP";
 }
@@ -1320,8 +1320,8 @@
     return absl::InvalidArgumentError("Duplicate SETUP message");
   }
   peer_setup_received_ = true;
-  peer_supports_object_ack_ = message.parameters.support_object_acks.value_or(
-      kDefaultSupportObjectAcks);
+  peer_supports_object_ack_ =
+      message.options.support_object_acks.value_or(kDefaultSupportObjectAcks);
   QUIC_DLOG(INFO) << ENDPOINT << "Received the SETUP message";
   // TODO: handle path.
   if (callbacks_.session_established_callback != nullptr) {
@@ -1399,7 +1399,7 @@
   }
 }
 
-void MoqtSessionParameters::ToSetupParameters(SetupParameters& out) const {
+void MoqtSessionParameters::ToSetupOptions(SetupOptions& out) const {
   if (perspective == quic::Perspective::IS_CLIENT && !using_webtrans) {
     out.path = path;
     out.authority = authority;
diff --git a/quiche/quic/moqt/moqt_session_interface.h b/quiche/quic/moqt/moqt_session_interface.h
index 3332701..25d7ebd 100644
--- a/quiche/quic/moqt/moqt_session_interface.h
+++ b/quiche/quic/moqt/moqt_session_interface.h
@@ -64,7 +64,7 @@
 
   // Takes the relevant fields from this object and populates |out| if not the
   // protocol default value.
-  void ToSetupParameters(SetupParameters& out) const;
+  void ToSetupOptions(SetupOptions& out) const;
 };
 
 class MoqtSessionInterface {
diff --git a/quiche/quic/moqt/moqt_session_test.cc b/quiche/quic/moqt/moqt_session_test.cc
index c380d92..94012af 100644
--- a/quiche/quic/moqt/moqt_session_test.cc
+++ b/quiche/quic/moqt/moqt_session_test.cc
@@ -407,7 +407,7 @@
   MoqtFramer framer(session_parameters.using_webtrans,
                     quic::Perspective::IS_CLIENT);
   MoqtSetup setup;
-  session_parameters.ToSetupParameters(setup.parameters);
+  session_parameters.ToSetupOptions(setup.options);
   quiche::QuicheBuffer buffer = framer.SerializeSetup(setup);
   in_memory_stream.Receive(absl::string_view(buffer.data(), buffer.size()),
                            /*fin=*/false);
@@ -430,7 +430,7 @@
   MoqtFramer framer(session_parameters.using_webtrans,
                     quic::Perspective::IS_CLIENT);
   MoqtSetup setup;
-  session_parameters.ToSetupParameters(setup.parameters);
+  session_parameters.ToSetupOptions(setup.options);
   quiche::QuicheBuffer buffer = framer.SerializeSetup(setup);
   in_memory_stream.Receive(absl::string_view(buffer.data(), buffer.size()),
                            /*fin=*/false);
@@ -464,7 +464,7 @@
   MoqtFramer framer(session_parameters.using_webtrans,
                     quic::Perspective::IS_CLIENT);
   MoqtSetup setup;
-  session_parameters.ToSetupParameters(setup.parameters);
+  session_parameters.ToSetupOptions(setup.options);
   quiche::QuicheBuffer buffer = framer.SerializeSetup(setup);
 
   stream1.Receive(absl::string_view(buffer.data(), buffer.size()),
@@ -2390,7 +2390,7 @@
   // Receive CLIENT_SETUP on an incoming unidirectional stream.
   webtransport::test::InMemoryStreamWithWriteBuffer control_stream(1);
   MoqtSetup setup;
-  session_parameters.ToSetupParameters(setup.parameters);
+  session_parameters.ToSetupOptions(setup.options);
   quiche::QuicheBuffer setup_buffer = client_framer.SerializeSetup(setup);
   control_stream.Receive(
       absl::string_view(setup_buffer.data(), setup_buffer.size()),
diff --git a/quiche/quic/moqt/test_tools/moqt_framer_utils.cc b/quiche/quic/moqt/test_tools/moqt_framer_utils.cc
index 146fa38..287553f 100644
--- a/quiche/quic/moqt/test_tools/moqt_framer_utils.cc
+++ b/quiche/quic/moqt/test_tools/moqt_framer_utils.cc
@@ -88,7 +88,7 @@
   quic::Perspective perspective = quic::Perspective::IS_CLIENT;
   if (std::holds_alternative<MoqtSetup>(frame)) {
     const MoqtSetup& setup = std::get<MoqtSetup>(frame);
-    if (!use_webtrans && !setup.parameters.path.has_value()) {
+    if (!use_webtrans && !setup.options.path.has_value()) {
       perspective = quic::Perspective::IS_SERVER;
     }
   }
diff --git a/quiche/quic/moqt/test_tools/moqt_test_message.h b/quiche/quic/moqt/test_tools/moqt_test_message.h
index a0c813a..3781e3b 100644
--- a/quiche/quic/moqt/test_tools/moqt_test_message.h
+++ b/quiche/quic/moqt/test_tools/moqt_test_message.h
@@ -602,13 +602,13 @@
 class QUICHE_NO_EXPORT ClientSetupMessage : public TestMessageBase {
  public:
   explicit ClientSetupMessage(bool webtrans) : TestMessageBase() {
-    client_setup_.parameters.moqt_implementation = kTestImplementationString;
+    client_setup_.options.moqt_implementation = kTestImplementationString;
     if (webtrans) {
       // Should not send PATH or AUTHORITY.
-      client_setup_.parameters.path = std::nullopt;
-      client_setup_.parameters.authority = std::nullopt;
+      client_setup_.options.path = std::nullopt;
+      client_setup_.options.authority = std::nullopt;
       raw_packet_[3] -= 17;   // adjust payload length
-      raw_packet_[4] = 0x01;  // only one parameter
+      raw_packet_[4] = 0x01;  // only one option
       // Move MoqtImplementation up in the packet.
       memmove(raw_packet_ + 5, raw_packet_ + 22,
               kTestImplementationString.length() + 2);
@@ -621,15 +621,15 @@
 
   bool EqualFieldValues(const MessageStructuredData& values) const override {
     auto cast = std::get<MoqtSetup>(values);
-    if (cast.parameters != client_setup_.parameters) {
-      QUIC_LOG(INFO) << "CLIENT_SETUP parameter mismatch";
+    if (cast.options != client_setup_.options) {
+      QUIC_LOG(INFO) << "CLIENT_SETUP option mismatch";
       return false;
     }
     return true;
   }
 
   void ExpandVarints() override {
-    if (client_setup_.parameters.path.has_value()) {
+    if (client_setup_.options.path.has_value()) {
       ExpandVarintsImpl("vvv----vv---------vv---------------------------");
     } else {
       ExpandVarintsImpl("vvv---------------------------");
@@ -641,13 +641,13 @@
   }
 
  private:
-  // The framer serializes all the integer parameters in order, then all the
-  // string parameters in order. Unfortunately, this means that
+  // The framer serializes all the integer options in order, then all the
+  // string options in order. Unfortunately, this means that
   // kMoqtImplementation goes last even though it is always present, while
   // kPath and KAuthority aren't.
   uint8_t raw_packet_[52] = {
       0xaf, 0x00, 0x00, 0x30,              // type, length
-      0x03,                                // 3 parameters
+      0x03,                                // 3 options
       0x01, 0x04, 0x70, 0x61, 0x74, 0x68,  // path = "path"
       0x04, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74,
       0x79,  // authority = "authority"
@@ -656,21 +656,21 @@
       0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f,
       0x6e, 0x20, 0x54, 0x79, 0x70, 0x65};
   MoqtSetup client_setup_ = {
-      SetupParameters("path", "authority"),
+      SetupOptions("path", "authority"),
   };
 };
 
 class QUICHE_NO_EXPORT ServerSetupMessage : public TestMessageBase {
  public:
   ServerSetupMessage() : TestMessageBase() {
-    server_setup_.parameters.moqt_implementation = kTestImplementationString;
+    server_setup_.options.moqt_implementation = kTestImplementationString;
     SetWireImage(raw_packet_, sizeof(raw_packet_));
   }
 
   bool EqualFieldValues(const MessageStructuredData& values) const override {
     auto cast = std::get<MoqtSetup>(values);
-    if (cast.parameters != server_setup_.parameters) {
-      QUIC_LOG(INFO) << "SERVER_SETUP parameter mismatch";
+    if (cast.options != server_setup_.options) {
+      QUIC_LOG(INFO) << "SERVER_SETUP option mismatch";
       return false;
     }
     return true;
@@ -684,14 +684,14 @@
 
  private:
   uint8_t raw_packet_[35] = {0xaf, 0x00, 0x00, 0x1f,  // type, length
-                             0x01,                    // one parameter
+                             0x01,                    // one option
                              // moqt_implementation:
                              0x07, 0x1c, 0x4d, 0x6f, 0x71, 0x20, 0x54, 0x65,
                              0x73, 0x74, 0x20, 0x49, 0x6d, 0x70, 0x6c, 0x65,
                              0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f,
                              0x6e, 0x20, 0x54, 0x79, 0x70, 0x65};
   MoqtSetup server_setup_ = {
-      SetupParameters(),
+      SetupOptions(),
   };
 };