Lines Matching refs:tlv

51         AppSpawnTlvExt *tlv = (AppSpawnTlvExt *)data;  in GetAppSpawnMsgExtInfo()  local
52 if (strcmp(tlv->tlvName, name) != 0) { in GetAppSpawnMsgExtInfo()
56 *len = tlv->dataLen; in GetAppSpawnMsgExtInfo()
209 static int CheckExtTlvInfo(const AppSpawnTlv *tlv, uint32_t remainLen) in CheckExtTlvInfo() argument
211 AppSpawnTlvExt *tlvExt = (AppSpawnTlvExt *)(tlv); in CheckExtTlvInfo()
222 static int CheckMsgTlv(const AppSpawnTlv *tlv, uint32_t remainLen) in CheckMsgTlv() argument
225 switch (tlv->tlvType) { in CheckMsgTlv()
227 tlvLen = ((AppSpawnMsgFlags *)(tlv + 1))->count * sizeof(uint32_t); in CheckMsgTlv()
236 …APPSPAWN_CHECK((tlv->tlvLen - sizeof(AppSpawnTlv)) <= (sizeof(AppSpawnMsgBundleInfo) + APP_LEN_BUN… in CheckMsgTlv()
237 …rn APPSPAWN_MSG_INVALID, "Invalid property tlv %{public}d %{public}d ", tlv->tlvType, tlv->tlvLen); in CheckMsgTlv()
240 APPSPAWN_CHECK((tlv->tlvLen - sizeof(AppSpawnTlv)) <= APP_OWNER_ID_LEN, in CheckMsgTlv()
241 …rn APPSPAWN_MSG_INVALID, "Invalid property tlv %{public}d %{public}d ", tlv->tlvType, tlv->tlvLen); in CheckMsgTlv()
244 …APPSPAWN_CHECK((tlv->tlvLen - sizeof(AppSpawnTlv)) <= (APP_APL_MAX_LEN + sizeof(AppSpawnMsgDomainI… in CheckMsgTlv()
245 …rn APPSPAWN_MSG_INVALID, "Invalid property tlv %{public}d %{public}d ", tlv->tlvType, tlv->tlvLen); in CheckMsgTlv()
248 return CheckExtTlvInfo(tlv, remainLen); in CheckMsgTlv()
252 APPSPAWN_CHECK(tlvLen <= tlv->tlvLen, in CheckMsgTlv()
253 …rn APPSPAWN_MSG_INVALID, "Invalid property tlv %{public}d %{public}d ", tlv->tlvType, tlv->tlvLen); in CheckMsgTlv()
265 AppSpawnTlv *tlv = (AppSpawnTlv *)(message->buffer + currLen); in DecodeAppSpawnMsg() local
266 if (tlv == NULL) { in DecodeAppSpawnMsg()
269 APPSPAWN_CHECK(tlv->tlvLen <= (bufferLen - currLen), break, in DecodeAppSpawnMsg()
271 tlv->tlvType, tlv->tlvLen, currLen + sizeof(AppSpawnMsg)); in DecodeAppSpawnMsg()
274 tlv->tlvType, tlv->tlvLen, currLen + sizeof(AppSpawnMsg)); // show in msg offset in DecodeAppSpawnMsg()
275 ret = CheckMsgTlv(tlv, bufferLen - currLen); in DecodeAppSpawnMsg()
278 if (tlv->tlvType < TLV_MAX) { // normal in DecodeAppSpawnMsg()
279 message->tlvOffset[tlv->tlvType] = currLen; in DecodeAppSpawnMsg()
280 currLen += tlv->tlvLen; in DecodeAppSpawnMsg()
283 "Invalid tlv number tlv %{public}d tlvCount: %{public}d", tlv->tlvType, tlvCount); in DecodeAppSpawnMsg()
286 currLen += tlv->tlvLen; in DecodeAppSpawnMsg()
356 static inline void DumpMsgExtInfo(const AppSpawnTlv *tlv) in DumpMsgExtInfo() argument
358 if (tlv->tlvType != TLV_MAX) { in DumpMsgExtInfo()
359 APPSPAPWN_DUMP("App tlv info: [%{public}d %{public}d]", tlv->tlvType, tlv->tlvLen); in DumpMsgExtInfo()
362 AppSpawnTlvExt *tlvExt = (AppSpawnTlvExt *)(tlv); in DumpMsgExtInfo()