return CONNECTION_ERROR_INVALID_PARAMETER;
}
- *supported = _connection_libnet_mptcp_supported();
+ *supported = _connection_libnet_mptcp_supported(connection);
return CONNECTION_ERROR_NONE;
}
EXPORT_API int connection_mptcp_enable(connection_h connection, connection_mptcp_enable_e enable)
{
// check MPTCP support
- if (_connection_libnet_mptcp_supported() == FALSE) {
- CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported");
- return CONNECTION_ERROR_NOT_SUPPORTED;
+ if (_connection_libnet_mptcp_supported(connection) == FALSE) {
+ CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported"); //LCOV_EXCL_LINE
+ return CONNECTION_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE
}
if (!(_connection_check_handle_validity(connection))) {
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- if (enable == CONNECTION_MPTCP_DISABLE) {
- CONNECTION_LOG(CONNECTION_ERROR, "Use connection_mptcp_disable()");
- return CONNECTION_ERROR_INVALID_PARAMETER;
+ if (enable <= CONNECTION_MPTCP_DISABLE
+ || enable > CONNECTION_MPTCP_ENABLE_SOCKOPT) {
+ CONNECTION_LOG(CONNECTION_ERROR, "Use connection_mptcp_disable()"); //LCOV_EXCL_LINE
+ return CONNECTION_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
}
- return _connection_libnet_mptcp_enable(enable);
+ return _connection_libnet_mptcp_enable(connection, enable);
}
EXPORT_API int connection_mptcp_disable(connection_h connection)
{
// check MPTCP support
- if (_connection_libnet_mptcp_supported() == FALSE) {
- CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported");
- return CONNECTION_ERROR_NOT_SUPPORTED;
+ if (_connection_libnet_mptcp_supported(connection) == FALSE) {
+ CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported"); //LCOV_EXCL_LINE
+ return CONNECTION_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE
}
if (!(_connection_check_handle_validity(connection))) {
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- return _connection_libnet_mptcp_enable(CONNECTION_MPTCP_DISABLE);
+ return _connection_libnet_mptcp_enable(connection, CONNECTION_MPTCP_DISABLE);
}
EXPORT_API int connection_mptcp_get_enabled(connection_h connection, connection_mptcp_enable_e* enable)
{
// check MPTCP support
- if (_connection_libnet_mptcp_supported() == FALSE) {
- CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported");
- return CONNECTION_ERROR_NOT_SUPPORTED;
+ if (_connection_libnet_mptcp_supported(connection) == FALSE) {
+ CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported"); //LCOV_EXCL_LINE
+ return CONNECTION_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE
}
if (!(_connection_check_handle_validity(connection))) {
}
if (enable == NULL) {
- CONNECTION_LOG(CONNECTION_ERROR, "Invalid parameter");
- return CONNECTION_ERROR_INVALID_PARAMETER;
+ CONNECTION_LOG(CONNECTION_ERROR, "Invalid parameter"); //LCOV_EXCL_LINE
+ return CONNECTION_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
}
- return _connection_libnet_mptcp_get_enabled(enable);
+ return _connection_libnet_mptcp_get_enabled(connection, enable);
}
EXPORT_API int connection_mptcp_set_path_manager(connection_h connection, connection_mptcp_path_manager_e pm)
{
// check MPTCP support
- if (_connection_libnet_mptcp_supported() == FALSE) {
- CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported");
- return CONNECTION_ERROR_NOT_SUPPORTED;
+ if (_connection_libnet_mptcp_supported(connection) == FALSE) {
+ CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported"); //LCOV_EXCL_LINE
+ return CONNECTION_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE
}
if (!(_connection_check_handle_validity(connection))) {
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- return _connection_libnet_mptcp_set_path_manager(pm);
+ return _connection_libnet_mptcp_set_path_manager(connection, pm);
}
EXPORT_API int connection_mptcp_get_path_manager(connection_h connection, connection_mptcp_path_manager_e* pm)
{
// check MPTCP support
- if (_connection_libnet_mptcp_supported() == FALSE) {
- CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported");
- return CONNECTION_ERROR_NOT_SUPPORTED;
+ if (_connection_libnet_mptcp_supported(connection) == FALSE) {
+ CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported"); //LCOV_EXCL_LINE
+ return CONNECTION_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE
}
if (!(_connection_check_handle_validity(connection))) {
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- return _connection_libnet_mptcp_get_path_manager(pm);
+ return _connection_libnet_mptcp_get_path_manager(connection, pm);
}
EXPORT_API int connection_mptcp_set_scheduler(connection_h connection, connection_mptcp_scheduler_e scheduler)
{
// check MPTCP support
- if (_connection_libnet_mptcp_supported() == FALSE) {
- CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported");
- return CONNECTION_ERROR_NOT_SUPPORTED;
+ if (_connection_libnet_mptcp_supported(connection) == FALSE) {
+ CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported"); //LCOV_EXCL_LINE
+ return CONNECTION_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE
}
if (!(_connection_check_handle_validity(connection))) {
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- return _connection_libnet_mptcp_set_scheduler(scheduler);
+ return _connection_libnet_mptcp_set_scheduler(connection, scheduler);
}
EXPORT_API int connection_mptcp_get_scheduler(connection_h connection, connection_mptcp_scheduler_e* scheduler)
{
// check MPTCP support
- if (_connection_libnet_mptcp_supported() == FALSE) {
- CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported");
- return CONNECTION_ERROR_NOT_SUPPORTED;
+ if (_connection_libnet_mptcp_supported(connection) == FALSE) {
+ CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported"); //LCOV_EXCL_LINE
+ return CONNECTION_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE
}
if (!(_connection_check_handle_validity(connection))) {
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- return _connection_libnet_mptcp_get_scheduler(scheduler);
+ return _connection_libnet_mptcp_get_scheduler(connection, scheduler);
}