1 /* 2 * Copyright (c) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 /** 17 * @addtogroup SoftBus 18 * @{ 19 * 20 * @brief Provides secure, high-speed communications between devices. 21 * 22 * This module implements unified distributed communication management of nearby devices and provides link-independent 23 * device discovery and transmission interfaces to support service publishing and data transmission. 24 * @since 1.0 25 * @version 1.0 26 */ 27 28 /** 29 * @file inner_socket.h 30 * 31 * @brief Declare the function for getting the maximum transmission unit. 32 * 33 * @since 1.0 34 * @version 1.0 35 */ 36 #ifndef INNER_SOCKET_H 37 #define INNER_SOCKET_H 38 39 #include "softbus_common.h" 40 41 #ifdef __cplusplus 42 extern "C" { 43 #endif 44 /** 45 * @brief Get maximum transmission unit of socket 46 * 47 * @param socket Indicates the unique socket fd. 48 * @param size Indicates the maximum transmission unit. 49 * 50 * @return Returns <b>SOFTBUS_INVALID_PARAM</b> if invalid parameters are detected. 51 * @return Returns <b>SOFTBUS_OK</b> if the operation is successful; returns an error code otherwise. 52 * 53 * @since 1.0 54 * @version 1.0 55 */ 56 int32_t GetMtuSize(int32_t socket, uint32_t *mtuSize); 57 #ifdef __cplusplus 58 } 59 #endif 60 #endif // INNER_SOCKET_H