Home
last modified time | relevance | path

Searched refs:bufLen (Results 1 – 25 of 345) sorted by relevance

12345678910>>...14

/ohos5.0/foundation/communication/wifi/wifi/test/wifi_standard/wifi_hal/unittest/
H A Dwifi_wpa_hal_test.cpp49 const int bufLen = 18; variable
56 const int bufLen = 18; variable
63 const int bufLen = 18; variable
70 const int bufLen = 18; variable
77 const int bufLen = 18; variable
84 const int bufLen = 18; variable
92 const int bufLen = 18; variable
99 const int bufLen = 18; variable
107 const int bufLen = 18; variable
181 const int bufLen = 5; variable
[all …]
H A Dwifi_wpa_common_test.cpp71 const size_t bufLen = 10; variable
72 const char cmd[bufLen] = "string";
73 char buf[bufLen] = "string";
74 int result = WpaCliCmd(cmd, buf, bufLen);
80 const size_t bufLen = 10; variable
81 const char cmd[bufLen] = "ENABLE";
82 char buf[bufLen] = "string";
83 int result = WpaCliCmd(cmd, buf, bufLen);
/ohos5.0/foundation/communication/dsoftbus/sdk/transmission/trans_channel/udp/stream/libsoftbus_stream/
H A Draw_stream_data.cpp30 … raw->InitStreamData(std::move(data.buffer), data.bufLen, std::move(data.extBuffer), data.extLen); in MakeRawStream()
42 if (bufLen <= 0 || bufLen > MAX_STREAM_LEN) { in MakeRawStream()
50 auto buffer = std::make_unique<char[]>(bufLen); in MakeRawStream()
51 auto ret = memcpy_s(buffer.get(), bufLen, buf, bufLen); in MakeRawStream()
56 raw->InitStreamData(std::move(buffer), bufLen, nullptr, 0); in MakeRawStream()
61 auto buffer = std::make_unique<char[]>(bufLen + RawStreamData::FRAME_HEADER_LEN); in MakeRawStream()
62 auto ret = memcpy_s(buffer.get() + RawStreamData::FRAME_HEADER_LEN, bufLen, buf, bufLen); in MakeRawStream()
67 RawStreamData::InsertBufferLength(bufLen, RawStreamData::FRAME_HEADER_LEN, in MakeRawStream()
70 raw->InitStreamData(std::move(buffer), bufLen + RawStreamData::FRAME_HEADER_LEN, nullptr, 0); in MakeRawStream()
75 int RawStreamData::InitStreamData(std::unique_ptr<char[]> buffer, ssize_t bufLen, in InitStreamData() argument
[all …]
/ohos5.0/drivers/liteos/hievent/src/
H A Dhievent_driver.c146 if (bufLeft > bufLen) { in HieventReadRingBuffer()
147 retval = HieventBufferCopy(buffer, bufLen, HieventBufferHead(), bufLen); in HieventReadRingBuffer()
177 if (bufLen < header.len + sizeof(header)) { in HieventRead()
218 if (bufLen > bufLeft) { in HieventWriteRingBuffer()
228 bufLeft, buffer, bufLen); in HieventWriteRingBuffer()
250 static void HieventCoverOldLog(size_t bufLen) in HieventCoverOldLog() argument
268 int HieventWriteInternal(const char *buffer, size_t bufLen) in HieventWriteInternal() argument
273 if (bufLen < sizeof(int) || in HieventWriteInternal()
293 HieventCoverOldLog(bufLen); in HieventWriteInternal()
295 HieventHeadInit(&header, bufLen - sizeof(int)); in HieventWriteInternal()
[all …]
/ohos5.0/foundation/communication/bluetooth_service/services/bluetooth/service/src/obex/
H A Dobex_body.cpp24 ObexArrayBodyObject::ObexArrayBodyObject(const uint8_t *buf, size_t bufLen) in ObexArrayBodyObject() argument
26 auto ret = PrivateWrite(buf, bufLen); in ObexArrayBodyObject()
32 size_t ObexArrayBodyObject::Read(uint8_t *buf, size_t bufLen) in Read() argument
35 size_t readSize = bufLen; in Read()
47 size_t ObexArrayBodyObject::Write(const uint8_t *buf, size_t bufLen) in Write() argument
49 return PrivateWrite(buf, bufLen); in Write()
52 size_t ObexArrayBodyObject::PrivateWrite(const uint8_t *buf, size_t bufLen) in PrivateWrite() argument
55 body_.insert(body_.end(), buf, buf + bufLen); in PrivateWrite()
56 return bufLen; in PrivateWrite()
H A Dobex_body.h29 virtual size_t Read(uint8_t *buf, size_t bufLen) = 0;
30 virtual size_t Write(const uint8_t *buf, size_t bufLen) = 0;
36 ObexArrayBodyObject(const uint8_t *buf, size_t bufLen);
39 size_t Read(uint8_t *buf, size_t bufLen) override;
40 size_t Write(const uint8_t *buf, size_t bufLen) override;
44 size_t PrivateWrite(const uint8_t *buf, size_t bufLen);
/ohos5.0/drivers/peripheral/wlan/wpa/interfaces/hdi_service/service_common/
H A Dhdi_wpa_common.c113 static int StaCliCmd(WpaCtrl *ctrl, const char *cmd, char *buf, size_t bufLen) in StaCliCmd() argument
120 size_t len = bufLen - 1; in StaCliCmd()
147 size_t len = bufLen - 1; in P2pCliCmd()
174 size_t len = bufLen - 1; in ChbaCliCmd()
201 size_t len = bufLen - 1; in CommonCliCmd()
222 int WpaCliCmd(const char *cmd, char *buf, size_t bufLen) in WpaCliCmd() argument
226 if (cmd == NULL || buf == NULL || bufLen == 0) { in WpaCliCmd()
242 ret = StaCliCmd(GetStaCtrl(), cmd, buf, bufLen); in WpaCliCmd()
244 ret = P2pCliCmd(GetP2pCtrl(), cmd, buf, bufLen); in WpaCliCmd()
246 ret = ChbaCliCmd(GetChbaCtrl(), cmd, buf, bufLen); in WpaCliCmd()
[all …]
/ohos5.0/foundation/communication/dsoftbus/sdk/transmission/trans_channel/udp/stream/adaptor/src/
H A Dclient_trans_udp_stream_interface.cpp59 ssize_t dataLen = bufLen + adaptor->GetEncryptOverhead(); in CreateRawStream()
61 bufLen, adaptor->GetEncryptOverhead()); in CreateRawStream()
76 int32_t ret = CreateRawStream(adaptor, inData->buf, inData->bufLen, stream); in ProcessAdaptorAndEncrypt()
82 if (inData->bufLen < 0 || inData->bufLen > Communication::SoftBus::MAX_STREAM_LEN || in ProcessAdaptorAndEncrypt()
83 … (ext != nullptr && (ext->bufLen < 0 || ext->bufLen > Communication::SoftBus::MAX_STREAM_LEN))) { in ProcessAdaptorAndEncrypt()
87 .buffer = std::make_unique<char[]>(inData->bufLen), in ProcessAdaptorAndEncrypt()
88 .bufLen = inData->bufLen, in ProcessAdaptorAndEncrypt()
92 int32_t ret = memcpy_s(data.buffer.get(), data.bufLen, inData->buf, inData->bufLen); in ProcessAdaptorAndEncrypt()
97 if (ext != nullptr && ext->bufLen > 0) { in ProcessAdaptorAndEncrypt()
98 data.extBuffer = std::make_unique<char[]>(ext->bufLen); in ProcessAdaptorAndEncrypt()
[all …]
/ohos5.0/foundation/filemanagement/file_api/interfaces/kits/js/src/mod_fileio/
H A Dcommon_func.cpp66 } else if (opOffset > static_cast<int64_t>(bufLen)) { in GetActualBuf()
82 size_t retLen = bufLen - bufOff; in GetActualLen()
110 retLen = bufLen - bufOff; in GetActualLenV9()
111 } else if (opLength > bufLen - bufOff) { in GetActualLenV9()
119 retLen = bufLen - bufOff; in GetActualLenV9()
184 size_t bufLen = 0; in GetReadArg() local
186 tie(succ, buf, bufLen) = txt.ToArraybuffer(); in GetReadArg()
248 size_t bufLen = 0; in GetWriteArg() local
294 int64_t bufLen; in GetReadArgV9() local
295 tie(succ, buf, bufLen) = txt.ToArraybuffer(); in GetReadArgV9()
[all …]
/ohos5.0/base/tee/tee_client/services/authentication/
H A Dtcu_authentication.c124 static int GetFileInfo(int bufLen, uint8_t *buffer, const char *path) in GetFileInfo() argument
132 (bufLen == 0)); in GetFileInfo()
143 fileSize = (int)fread(buffer, sizeof(char), (unsigned int)bufLen, fp); in GetFileInfo()
144 if (fileSize != bufLen) { in GetFileInfo()
156 static uint8_t *InitTempBuf(int bufLen) in InitTempBuf() argument
161 bool variablesCheck = ((bufLen <= 0) || (bufLen > HASH_FILE_MAX_SIZE)); in InitTempBuf()
167 buffer = (uint8_t *)malloc((unsigned int)bufLen); in InitTempBuf()
173 ret = memset_s(buffer, (unsigned int)bufLen, 0, (unsigned int)bufLen); in InitTempBuf()
187 int bufLen; in ReadXmlFile() local
191 bufLen = GetFileSize(xmlFile, &realSize); in ReadXmlFile()
[all …]
/ohos5.0/base/telephony/call_manager/frameworks/js/napi/src/
H A Dnative_module.cpp42 int* bufLen) in NAPI_telephony_call_GetJSCode() argument
48 if (bufLen != nullptr) { in NAPI_telephony_call_GetJSCode()
49 *bufLen = _binary_call_js_end - _binary_call_js_start; in NAPI_telephony_call_GetJSCode()
54 int* bufLen) in NAPI_telephony_call_GetABCCode() argument
60 if (bufLen != nullptr) { in NAPI_telephony_call_GetABCCode()
61 *bufLen = _binary_call_abc_end - _binary_call_abc_start; in NAPI_telephony_call_GetABCCode()
/ohos5.0/foundation/communication/dsoftbus/tests/sdk/transmission/trans_channel/udp/stream/libsoftbus_stream/raw_stream_data_test/
H A Draw_stream_data_test.cpp186 ssize_t dataLen = indata->bufLen + adaptor->GetEncryptOverhead();
187 ssize_t bufLen = MAX_STREAM_LEN; variable
190 tmpIStream = iStream->MakeRawStream(data.get(), bufLen, *info, scene);
194 bufLen = MAX_STREAM_LEN + 1;
195 tmpIStream = iStream->MakeRawStream(data.get(), bufLen, *info, scene);
199 tmpIStream = iStream->MakeRawStream(data.get(), bufLen, *info, scene);
203 tmpIStream = iStream->MakeRawStream(data.get(), bufLen, *info, scene);
221 ssize_t bufLen = 22; variable
222 auto buffer = std::make_unique<char[]>(bufLen + RawStreamData::FRAME_HEADER_LEN);
255 ssize_t bufLen = 1; variable
[all …]
/ohos5.0/foundation/communication/netmanager_ext/frameworks/js/napi/extensionability/
H A Dvpn_extension_ability_module.cpp35 const char **buf, int *bufLen) in NAPI_app_ability_VpnExtensionAbility_GetJSCode() argument
41 if (bufLen != nullptr) { in NAPI_app_ability_VpnExtensionAbility_GetJSCode()
42 *bufLen = _binary_vpn_extension_ability_js_end - _binary_vpn_extension_ability_js_start; in NAPI_app_ability_VpnExtensionAbility_GetJSCode()
68 const char **buf, int *bufLen) in NAPI_application_VpnExtensionAbility_GetJSCode() argument
74 if (bufLen != nullptr) { in NAPI_application_VpnExtensionAbility_GetJSCode()
75 *bufLen = _binary_vpn_extension_ability_js_end - _binary_vpn_extension_ability_js_start; in NAPI_application_VpnExtensionAbility_GetJSCode()
/ohos5.0/foundation/ability/ability_runtime/frameworks/js/napi/ability/
H A Dability_module.cpp35 void NAPI_app_ability_UIAbility_GetJSCode(const char **buf, int *bufLen) in NAPI_app_ability_UIAbility_GetJSCode() argument
41 if (bufLen != nullptr) { in NAPI_app_ability_UIAbility_GetJSCode()
42 *bufLen = _binary_ability_js_end - _binary_ability_js_start; in NAPI_app_ability_UIAbility_GetJSCode()
70 void NAPI_application_Ability_GetJSCode(const char **buf, int *bufLen) in NAPI_application_Ability_GetJSCode() argument
76 if (bufLen != nullptr) { in NAPI_application_Ability_GetJSCode()
77 *bufLen = _binary_ability_js_end - _binary_ability_js_start; in NAPI_application_Ability_GetJSCode()
/ohos5.0/foundation/multimedia/media_library/frameworks/js/src/
H A Dnative_module_ohos_medialibrary.cpp39 int* bufLen) in NAPI_multimedia_mediaLibrary_GetJSCode() argument
45 if (bufLen != nullptr) { in NAPI_multimedia_mediaLibrary_GetJSCode()
46 *bufLen = _binary_medialibraryinf_js_end - _binary_medialibraryinf_js_start; in NAPI_multimedia_mediaLibrary_GetJSCode()
51 int* bufLen) in NAPI_multimedia_mediaLibrary_GetABCCode() argument
57 if (bufLen != nullptr) { in NAPI_multimedia_mediaLibrary_GetABCCode()
58 *bufLen = _binary_medialibraryinf_abc_end - _binary_medialibraryinf_abc_start; in NAPI_multimedia_mediaLibrary_GetABCCode()
H A Dnative_module_ohos_photoaccess_helper.cpp63 int* bufLen) in NAPI_file_photoAccessHelper_GetJSCode() argument
69 if (bufLen != nullptr) { in NAPI_file_photoAccessHelper_GetJSCode()
70 *bufLen = _binary_photoaccesshelperinf_js_end - _binary_photoaccesshelperinf_js_start; in NAPI_file_photoAccessHelper_GetJSCode()
75 int* bufLen) in NAPI_file_photoAccessHelper_GetABCCode() argument
81 if (bufLen != nullptr) { in NAPI_file_photoAccessHelper_GetABCCode()
82 *bufLen = _binary_photoaccesshelperinf_abc_end - _binary_photoaccesshelperinf_abc_start; in NAPI_file_photoAccessHelper_GetABCCode()
/ohos5.0/foundation/distributeddatamgr/data_object/frameworks/jskitsimpl/src/adaptor/
H A Djs_module_init.cpp60 const char **buf, int *bufLen) in NAPI_data_distributedDataObject_GetJSCode() argument
66 if (bufLen != nullptr) { in NAPI_data_distributedDataObject_GetJSCode()
67 *bufLen = _binary_distributed_data_object_js_end - _binary_distributed_data_object_js_start; in NAPI_data_distributedDataObject_GetJSCode()
72 const char **buf, int *bufLen) in NAPI_data_distributedDataObject_GetABCCode() argument
78 if (bufLen != nullptr) { in NAPI_data_distributedDataObject_GetABCCode()
79 … *bufLen = _binary_distributed_data_object_abc_end - _binary_distributed_data_object_abc_start; in NAPI_data_distributedDataObject_GetABCCode()
/ohos5.0/foundation/filemanagement/user_file_service/interfaces/kits/picker/
H A Dnative_module_ohos_picker.cpp50 int* bufLen) in NAPI_file_picker_GetJSCode() argument
56 if (bufLen != nullptr) { in NAPI_file_picker_GetJSCode()
57 *bufLen = _binary_picker_js_end - _binary_picker_js_start; in NAPI_file_picker_GetJSCode()
62 int* bufLen) in NAPI_file_picker_GetABCCode() argument
68 if (bufLen != nullptr) { in NAPI_file_picker_GetABCCode()
69 *bufLen = _binary_picker_abc_end - _binary_picker_abc_start; in NAPI_file_picker_GetABCCode()
/ohos5.0/foundation/multimedia/drm_framework/services/drm_service/server/src/
H A Dmedia_decrypt_module_service.cpp89 uint32_t bufLen = 0; in DecryptMediaData() local
91 SetCryptInfo(cryptInfoTmp, cryptInfo, bufLen); in DecryptMediaData()
101 UpdateDecryptionStatistics(ret, bufLen, decryptDuration); in DecryptMediaData()
114 IMediaDecryptModuleService::CryptInfo &cryptInfo, uint32_t &bufLen) in SetCryptInfo() argument
124 bufLen += cryptInfoTmp.subSamples[i].clearHeaderLen; in SetCryptInfo()
126 bufLen += cryptInfoTmp.subSamples[i].payLoadLen; in SetCryptInfo()
132 IMediaDecryptModuleService::DrmBuffer &dstBuffer, uint32_t bufLen) in SetDrmBufferInfo() argument
137 drmSrcBuffer->bufferLen = bufLen; in SetDrmBufferInfo()
145 drmDstBuffer->bufferLen = bufLen; in SetDrmBufferInfo()
153 uint32_t bufLen, uint32_t curDuration) in UpdateDecryptionStatistics() argument
[all …]
/ohos5.0/base/tee/tee_client/services/teecd/src/
H A Dtee_ca_auth.c28 static int GetLoginInfo(const struct ucred *cr, int fd, uint8_t *buf, unsigned int bufLen) in GetLoginInfo() argument
32 ret = TeeGetNativeCert(cr->pid, cr->uid, &bufLen, buf); in GetLoginInfo()
49 unsigned int bufLen = BUF_MAX_SIZE; in SendLoginInfo() local
56 uint8_t *buf = (uint8_t *)malloc(bufLen); in SendLoginInfo()
61 ret = memset_s(buf, bufLen, 0, bufLen); in SendLoginInfo()
67 ret = GetLoginInfo(cr, fd, buf, bufLen); in SendLoginInfo()
/ohos5.0/base/global/resource_management/frameworks/resmgr/src/utils/
H A Dhap_parser.cpp91 size_t &bufLen) in ReadCurrentFile() argument
94 bufLen = fileInfo.uncompressed_size; in ReadCurrentFile()
106 err = unzReadCurrentFile(uf, buffer.get(), bufLen); in ReadCurrentFile()
116 size_t &bufLen) in ReadFileFromZip() argument
207 size_t &bufLen) in ReadIndexFromFile() argument
405 if (offset + IdItem::SIZE_LEN > bufLen) { in ParseString()
435 if (offset + IdItem::SIZE_LEN > bufLen) { in ParseStringArray()
480 if (offset + IdItem::HEADER_LEN > bufLen) { in ParseIdItem()
516 if (offset + ResId::RESID_HEADER_LEN > bufLen) { in ParseId()
609 if (offset + ResKey::RESKEY_HEADER_LEN > bufLen) { in ParseKey()
[all …]
/ohos5.0/foundation/communication/dsoftbus/sdk/transmission/trans_channel/udp/stream/adaptor/include/
H A Dstream_adaptor_listener.h63 retStreamData.bufLen = buflen; in OnStreamReceived()
130 int32_t ConvertRawStreamData(char *buf, int32_t bufLen, std::unique_ptr<char[]> &plainData, in ConvertRawStreamData() argument
135 retStreamData.bufLen = bufLen; in ConvertRawStreamData()
140 int32_t plainDataLength = bufLen - encryptOverhead; in ConvertRawStreamData()
144 bufLen, encryptOverhead); in ConvertRawStreamData()
148 ssize_t decLen = adaptor_->Decrypt(buf, bufLen, plainData.get(), plainDataLength, in ConvertRawStreamData()
156 retStreamData.bufLen = plainDataLength; in ConvertRawStreamData()
/ohos5.0/base/hiviewdfx/hilog/interfaces/js/kits/napi/src/common/napi/
H A Dn_val.cpp62 size_t bufLen = strLen + 1; in ToUTF8String() local
63 unique_ptr<char[]> str = make_unique<char[]>(bufLen); in ToUTF8String()
64 status = napi_get_value_string_utf8(env_, val_, str.get(), bufLen, &strLen); in ToUTF8String()
137 size_t bufLen = 0; in ToArraybuffer() local
138 bool status = napi_get_arraybuffer_info(env_, val_, &buf, &bufLen); in ToArraybuffer()
139 return make_tuple(status == napi_ok, buf, bufLen); in ToArraybuffer()
156 size_t bufLen = 0; in ToDataview() local
160 bool status = napi_get_dataview_info(env_, val_, &bufLen, &buf, &arraybuffer, &byteoff); in ToDataview()
161 return make_tuple(status == napi_ok, buf, bufLen); in ToDataview()
266 NVal NVal::CreateUint8Array(napi_env env, void *buf, size_t bufLen) in CreateUint8Array() argument
[all …]
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/common/src/
H A Dparcel.cpp376 int Parcel::WriteBlob(const char *buffer, uint32_t bufLen) in WriteBlob() argument
386 if (parcelLen_ + bufLen > totalLen_) { in WriteBlob()
392 int errCode = memcpy_s(bufPtr_, leftLen, buffer, bufLen); in WriteBlob()
394 LOGE("[WriteBlob] leftLen:%" PRIu32 ", bufLen:%" PRIu32, leftLen, bufLen); in WriteBlob()
398 uint32_t length = (BYTE_8_ALIGN(bufLen) < leftLen) ? BYTE_8_ALIGN(bufLen) : leftLen; in WriteBlob()
403 uint32_t Parcel::ReadBlob(char *buffer, uint32_t bufLen) in ReadBlob() argument
414 if (parcelLen_ + bufLen > totalLen_) { in ReadBlob()
415 …LOGE("[ReadBlob] bufLen:%" PRIu32 ", totalLen:%" PRIu64 ", parcelLen:%" PRIu64, bufLen, totalLen_,… in ReadBlob()
419 int errCode = memcpy_s(buffer, bufLen, bufPtr_, bufLen); in ReadBlob()
421 LOGE("[ReadBlob] bufLen:%u", bufLen); in ReadBlob()
[all …]
/ohos5.0/foundation/communication/dsoftbus/tests/sdk/transmission/trans_channel/udp/stream/
H A Dstream_adaptor_test.cpp99 ssize_t dataLen = streamData.bufLen + adaptor->GetEncryptOverhead();
101 …int32_t ret = adaptor->Encrypt(streamData.buf, streamData.bufLen, data.get(), dataLen, adaptor->Ge…
103 …ret = adaptor->Decrypt(data.get(), dataLen, streamData.buf, streamData.bufLen, adaptor->GetSession…
123 ssize_t dataLen = streamData.bufLen + adaptor->GetEncryptOverhead();
125 …int32_t ret = adaptor->Encrypt(streamData.buf, streamData.bufLen, data.get(), dataLen, adaptor->Ge…
127 …ret = adaptor->Decrypt(data.get(), dataLen + 1, streamData.buf, streamData.bufLen, adaptor->GetSes…

12345678910>>...14