Skip to content

Commit

Permalink
Define local address management parameters only when preview features…
Browse files Browse the repository at this point in the history
… enabled
  • Loading branch information
masa-koz committed Dec 21, 2024
1 parent 12c1579 commit f2c9629
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/inc/msquic.h
Original file line number Diff line number Diff line change
Expand Up @@ -922,8 +922,10 @@ typedef struct QUIC_SCHANNEL_CREDENTIAL_ATTRIBUTE_W {
#define QUIC_PARAM_CONN_STATISTICS_V2 0x05000016 // QUIC_STATISTICS_V2
#define QUIC_PARAM_CONN_STATISTICS_V2_PLAT 0x05000017 // QUIC_STATISTICS_V2
#define QUIC_PARAM_CONN_ORIG_DEST_CID 0x05000018 // uint8_t[]
#ifdef QUIC_API_ENABLE_PREVIEW_FEATURES
#define QUIC_PARAM_CONN_ADD_LOCAL_ADDRESS 0x05000019 // QUIC_ADDR
#define QUIC_PARAM_CONN_REMOVE_LOCAL_ADDRESS 0x0500001A // QUIC_ADDR
#endif

//
// Parameters for TLS.
Expand Down
4 changes: 3 additions & 1 deletion src/test/bin/quic_gtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1666,6 +1666,7 @@ TEST_P(WithFamilyArgs, PathValidationTimeout) {
}
}

#if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
TEST_P(WithProbePathArgs, ProbePath) {
TestLoggerT<ParamType> Logger("QuicTestProbePath", GetParam());
if (TestingKernelMode) {
Expand Down Expand Up @@ -1716,7 +1717,8 @@ TEST_P(WithProbePathArgs, MultipleLocalAddresses) {
GetParam().DropPacketCount);
}
}
#endif
#endif // QUIC_API_ENABLE_PREVIEW_FEATURES
#endif // QUIC_TEST_DATAPATH_HOOKS_ENABLED

TEST_P(WithFamilyArgs, ChangeMaxStreamIDs) {
TestLoggerT<ParamType> Logger("QuicTestChangeMaxStreamID", GetParam());
Expand Down
2 changes: 2 additions & 0 deletions src/test/bin/quic_gtest.h
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,7 @@ class WithValidateTlsConfigArgs : public testing::Test,
public testing::WithParamInterface<TlsConfigArgs> {
};

#if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
struct ProbePathArgs {
int Family;
BOOLEAN ShareBinding;
Expand Down Expand Up @@ -980,3 +981,4 @@ std::ostream& operator << (std::ostream& o, const MigrationArgs& args) {
class WithMigrationArgs : public testing::Test,
public testing::WithParamInterface<MigrationArgs> {
};
#endif
4 changes: 4 additions & 0 deletions src/test/lib/ApiTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4521,6 +4521,7 @@ void QuicTest_QUIC_PARAM_CONN_ORIG_DEST_CID(MsQuicRegistration& Registration, Ms
}
}

#if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
void QuicTest_QUIC_PARAM_CONN_ADD_LOCAL_ADDRESS(MsQuicRegistration& Registration, MsQuicConfiguration& ClientConfiguration)
{
TestScopeLogger LogScope0("QUIC_PARAM_CONN_ADD_LOCAL_ADDRESS");
Expand Down Expand Up @@ -4702,6 +4703,7 @@ void QuicTest_QUIC_PARAM_CONN_REMOVE_LOCAL_ADDRESS(MsQuicRegistration& Registrat
}
}
}
#endif

void QuicTestConnectionParam()
{
Expand Down Expand Up @@ -4736,8 +4738,10 @@ void QuicTestConnectionParam()
QuicTest_QUIC_PARAM_CONN_STATISTICS_V2(Registration);
QuicTest_QUIC_PARAM_CONN_STATISTICS_V2_PLAT(Registration);
QuicTest_QUIC_PARAM_CONN_ORIG_DEST_CID(Registration, ClientConfiguration);
#if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
QuicTest_QUIC_PARAM_CONN_ADD_LOCAL_ADDRESS(Registration, ClientConfiguration);
QuicTest_QUIC_PARAM_CONN_REMOVE_LOCAL_ADDRESS(Registration, ClientConfiguration);
#endif
}

//
Expand Down
2 changes: 2 additions & 0 deletions src/test/lib/PathTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ QuicTestLocalPathChanges(
}
}

#if defined(QUIC_API_ENABLE_PREVIEW_FEATURES)
void
QuicTestProbePath(
_In_ int Family,
Expand Down Expand Up @@ -357,3 +358,4 @@ QuicTestMultipleLocalAddresses(
TEST_TRUE(ProbeHelpers[2].ServerReceiveProbeEvent.WaitTimeout(TestWaitTimeout * 10));
TEST_TRUE(ProbeHelpers[2].ClientReceiveProbeEvent.WaitTimeout(TestWaitTimeout * 10));
}
#endif

0 comments on commit f2c9629

Please sign in to comment.