Home
last modified time | relevance | path

Searched refs:aOffset (Results 1 – 25 of 76) sorted by relevance

1234

/external/openthread/src/core/net/
Ddns_types.cpp223 Error Name::AppendPointerLabel(uint16_t aOffset, Message &aMessage) in AppendPointerLabel() argument
237 error = Name(aMessage, aOffset + aMessage.GetOffset()).AppendTo(aMessage); in AppendPointerLabel()
249 OT_ASSERT(aOffset < kPointerLabelTypeUint16); in AppendPointerLabel()
251 value = HostSwap16(aOffset | kPointerLabelTypeUint16); in AppendPointerLabel()
270 Error Name::ParseName(const Message &aMessage, uint16_t &aOffset) in ParseName() argument
273 LabelIterator iterator(aMessage, aOffset); in ParseName()
286 aOffset = iterator.mNameEndOffset; in ParseName()
300 Error Name::ReadLabel(const Message &aMessage, uint16_t &aOffset, char *aLabelBuffer, uint8_t &aLab… in ReadLabel() argument
303 LabelIterator iterator(aMessage, aOffset); in ReadLabel()
307 aOffset = iterator.mNextLabelOffset; in ReadLabel()
[all …]
Ddns_types.hpp558 Name(const Message &aMessage, uint16_t aOffset) in Name() argument
559 : Name(nullptr, &aMessage, aOffset) in Name()
619 void SetFromMessage(const Message &aMessage, uint16_t aOffset) in SetFromMessage() argument
623 mOffset = aOffset; in SetFromMessage()
646 const Message &GetAsMessage(uint16_t &aOffset) const in GetAsMessage()
648 aOffset = mOffset; in GetAsMessage()
784 static Error AppendPointerLabel(uint16_t aOffset, Message &aMessage);
818 static Error ParseName(const Message &aMessage, uint16_t &aOffset);
848 …static Error ReadLabel(const Message &aMessage, uint16_t &aOffset, char *aLabelBuffer, uint8_t &aL…
872 …static Error ReadName(const Message &aMessage, uint16_t &aOffset, char *aNameBuffer, uint16_t aNam…
[all …]
Ddhcp6_server.cpp240 uint16_t Server::FindOption(Message &aMessage, uint16_t aOffset, uint16_t aLength, Code aCode) in FindOption() argument
242 uint16_t end = aOffset + aLength; in FindOption()
245 while (aOffset <= end) in FindOption()
249 SuccessOrExit(aMessage.Read(aOffset, option)); in FindOption()
253 ExitNow(rval = aOffset); in FindOption()
256 aOffset += sizeof(option) + option.GetLength(); in FindOption()
262 Error Server::ProcessClientIdentifier(Message &aMessage, uint16_t aOffset, ClientIdentifier &aClien… in ProcessClientIdentifier() argument
266 SuccessOrExit(error = aMessage.Read(aOffset, aClientId)); in ProcessClientIdentifier()
275 Error Server::ProcessElapsedTime(Message &aMessage, uint16_t aOffset) in ProcessElapsedTime() argument
280 SuccessOrExit(error = aMessage.Read(aOffset, option)); in ProcessElapsedTime()
[all …]
Ddhcp6_client.cpp456 uint16_t Client::FindOption(Message &aMessage, uint16_t aOffset, uint16_t aLength, Dhcp6::Code aCod… in FindOption() argument
458 uint32_t offset = aOffset; in FindOption()
459 uint16_t end = aOffset + aLength; in FindOption()
480 Error Client::ProcessServerIdentifier(Message &aMessage, uint16_t aOffset) in ProcessServerIdentifier() argument
485 SuccessOrExit(aMessage.Read(aOffset, option)); in ProcessServerIdentifier()
496 Error Client::ProcessClientIdentifier(Message &aMessage, uint16_t aOffset) in ProcessClientIdentifier() argument
504 SuccessOrExit(error = aMessage.Read(aOffset, option)); in ProcessClientIdentifier()
513 Error Client::ProcessIaNa(Message &aMessage, uint16_t aOffset) in ProcessIaNa() argument
520 SuccessOrExit(error = aMessage.Read(aOffset, option)); in ProcessIaNa()
522 aOffset += sizeof(option); in ProcessIaNa()
[all …]
Ddhcp6_client.hpp133 uint16_t FindOption(Message &aMessage, uint16_t aOffset, uint16_t aLength, Code aCode);
134 Error ProcessServerIdentifier(Message &aMessage, uint16_t aOffset);
135 Error ProcessClientIdentifier(Message &aMessage, uint16_t aOffset);
136 Error ProcessIaNa(Message &aMessage, uint16_t aOffset);
137 Error ProcessStatusCode(Message &aMessage, uint16_t aOffset);
138 Error ProcessIaAddress(Message &aMessage, uint16_t aOffset);
Ddnssd_server.hpp193 void SetDomainNameOffset(uint16_t aOffset) { mDomainNameOffset = aOffset; } in SetDomainNameOffset() argument
204 void SetServiceNameOffset(uint16_t aOffset) in SetServiceNameOffset() argument
208 mServiceNameOffset = aOffset; in SetServiceNameOffset()
218 void SetInstanceNameOffset(uint16_t aOffset) in SetInstanceNameOffset() argument
222 mInstanceNameOffset = aOffset; in SetInstanceNameOffset()
232 void SetHostNameOffset(uint16_t aOffset) in SetHostNameOffset() argument
236 mHostNameOffset = aOffset; in SetHostNameOffset()
241 … static bool MatchCompressedName(const Message &aMessage, uint16_t aOffset, const char *aName) in MatchCompressedName() argument
243 … return aOffset != kUnknownOffset && Name::CompareName(aMessage, aOffset, aName) == kErrorNone; in MatchCompressedName()
Ddhcp6_server.hpp206 uint16_t FindOption(Message &aMessage, uint16_t aOffset, uint16_t aLength, Code aCode);
207 …Error ProcessClientIdentifier(Message &aMessage, uint16_t aOffset, ClientIdentifier &aClientId);
208 Error ProcessIaNa(Message &aMessage, uint16_t aOffset, IaNa &aIaNa);
209 Error ProcessIaAddress(Message &aMessage, uint16_t aOffset);
210 Error ProcessElapsedTime(Message &aMessage, uint16_t aOffset);
Dip6_headers.hpp610 void SetOffset(uint16_t aOffset) in SetOffset() argument
613 tmp = (tmp & ~kOffsetMask) | ((aOffset << kOffsetOffset) & kOffsetMask); in SetOffset()
670 …tatic inline uint16_t FragmentOffsetToBytes(uint16_t aOffset) { return static_cast<uint16_t>(aOffs… in FragmentOffsetToBytes() argument
679 static inline uint16_t BytesToFragmentOffset(uint16_t aOffset) { return aOffset >> 3; } in BytesToFragmentOffset() argument
/external/openthread/examples/platforms/cc2538/
Dflash.c46 static uint32_t flashPhysAddr(uint8_t aSwapIndex, uint32_t aOffset) in flashPhysAddr() argument
48 uint32_t address = (uint32_t)(&_FLASH_settings_pageA[0]) + aOffset; in flashPhysAddr()
80 void otPlatFlashWrite(otInstance *aInstance, uint8_t aSwapIndex, uint32_t aOffset, const void *aDat… in otPlatFlashWrite() argument
86 …for (uint32_t size = 0; size < aSize; size += sizeof(uint32_t), aOffset += sizeof(uint32_t), data+… in otPlatFlashWrite()
88 ROM_ProgramFlash(data, flashPhysAddr(aSwapIndex, aOffset), sizeof(uint32_t)); in otPlatFlashWrite()
96 void otPlatFlashRead(otInstance *aInstance, uint8_t aSwapIndex, uint32_t aOffset, uint8_t *aData, u… in otPlatFlashRead() argument
100 memcpy(aData, (void *)flashPhysAddr(aSwapIndex, aOffset), aSize); in otPlatFlashRead()
/external/openthread/src/core/common/
Dtlvs.cpp81 Error Tlv::FindTlvOffset(const Message &aMessage, uint8_t aType, uint16_t &aOffset) in FindTlvOffset() argument
83 return Find(aMessage, aType, &aOffset, nullptr, nullptr); in FindTlvOffset()
110 Error Tlv::Find(const Message &aMessage, uint8_t aType, uint16_t *aOffset, uint16_t *aSize, bool *a… in Find() argument
152 if (aOffset != nullptr) in Find()
154 *aOffset = offset; in Find()
179 template <typename UintType> Error Tlv::ReadUintTlv(const Message &aMessage, uint16_t aOffset, Uint… in ReadUintTlv() argument
183 SuccessOrExit(error = ReadTlv(aMessage, aOffset, &aValue, sizeof(aValue))); in ReadUintTlv()
191 template Error Tlv::ReadUintTlv<uint8_t>(const Message &aMessage, uint16_t aOffset, uint8_t &aValue…
192 template Error Tlv::ReadUintTlv<uint16_t>(const Message &aMessage, uint16_t aOffset, uint16_t &aVal…
193 template Error Tlv::ReadUintTlv<uint32_t>(const Message &aMessage, uint16_t aOffset, uint32_t &aVal…
[all …]
Dmessage.cpp326 void Message::SetOffset(uint16_t aOffset) in SetOffset() argument
328 OT_ASSERT(aOffset <= GetLength()); in SetOffset()
329 GetMetadata().mOffset = aOffset; in SetOffset()
416 Error Message::AppendBytesFromMessage(const Message &aMessage, uint16_t aOffset, uint16_t aLength) in AppendBytesFromMessage() argument
422 VerifyOrExit(aMessage.GetLength() >= aOffset + aLength, error = kErrorParse); in AppendBytesFromMessage()
425 aMessage.GetFirstChunk(aOffset, aLength, chunk); in AppendBytesFromMessage()
490 void Message::GetFirstChunk(uint16_t aOffset, uint16_t &aLength, Chunk &aChunk) const in GetFirstChunk() argument
499 VerifyOrExit(aOffset < GetLength(), aChunk.SetLength(0)); in GetFirstChunk()
501 if (aOffset + aLength >= GetLength()) in GetFirstChunk()
503 aLength = GetLength() - aOffset; in GetFirstChunk()
[all …]
Dmessage.hpp482 void SetOffset(uint16_t aOffset);
643 Error AppendBytesFromMessage(const Message &aMessage, uint16_t aOffset, uint16_t aLength);
693 uint16_t ReadBytes(uint16_t aOffset, void *aBuf, uint16_t aLength) const;
709 Error Read(uint16_t aOffset, void *aBuf, uint16_t aLength) const;
727 template <typename ObjectType> Error Read(uint16_t aOffset, ObjectType &aObject) const in Read() argument
731 return Read(aOffset, &aObject, sizeof(ObjectType)); in Read()
750 …bool CompareBytes(uint16_t aOffset, const void *aBuf, uint16_t aLength, ByteMatcher aMatcher = nul…
768 bool CompareBytes(uint16_t aOffset,
789 template <typename ObjectType> bool Compare(uint16_t aOffset, const ObjectType &aObject) const in Compare() argument
793 return CompareBytes(aOffset, &aObject, sizeof(ObjectType)); in Compare()
[all …]
Dtlvs.hpp189 … static Error ReadTlv(const Message &aMessage, uint16_t aOffset, void *aValue, uint8_t aMinLength);
205 …static Error Read(const Message &aMessage, uint16_t aOffset, typename SimpleTlvType::ValueType &aV… in Read() argument
207 return ReadTlv(aMessage, aOffset, &aValue, sizeof(aValue)); in Read()
224 …static Error Read(const Message &aMessage, uint16_t aOffset, typename UintTlvType::UintValueType &… in Read() argument
226 return ReadUintTlv(aMessage, aOffset, aValue); in Read()
277 static Error FindTlvOffset(const Message &aMessage, uint8_t aType, uint16_t &aOffset);
433 …static Error Find(const Message &aMessage, uint8_t aType, uint16_t *aOffset, uint16_t *aSize, bool…
436 …template <typename UintType> static Error ReadUintTlv(const Message &aMessage, uint16_t aOffset, U…
Dframe_builder.hpp178 Error AppendBytesFromMessage(const Message &aMessage, uint16_t aOffset, uint16_t aLength);
209 void WriteBytes(uint16_t aOffset, const void *aBuffer, uint16_t aLength);
223 template <typename ObjectType> void Write(uint16_t aOffset, const ObjectType &aObject) in Write() argument
227 WriteBytes(aOffset, &aObject, sizeof(ObjectType)); in Write()
Dframe_builder.cpp82 Error FrameBuilder::AppendBytesFromMessage(const Message &aMessage, uint16_t aOffset, uint16_t aLen… in AppendBytesFromMessage() argument
87 SuccessOrExit(error = aMessage.Read(aOffset, mBuffer + mLength, aLength)); in AppendBytesFromMessage()
94 void FrameBuilder::WriteBytes(uint16_t aOffset, const void *aBuffer, uint16_t aLength) in WriteBytes() argument
96 memcpy(mBuffer + aOffset, aBuffer, aLength); in WriteBytes()
Dheap_data.cpp60 Error Data::SetFrom(const Message &aMessage, uint16_t aOffset, uint16_t aLength) in SetFrom() argument
64 VerifyOrExit(aOffset + aLength <= aMessage.GetLength(), error = kErrorParse); in SetFrom()
69 SuccessOrAssert(aMessage.Read(aOffset, mData.GetBytes(), aLength)); in SetFrom()
/external/openthread/src/core/api/
Dmessage_api.cpp63 void otMessageSetOffset(otMessage *aMessage, uint16_t aOffset) in otMessageSetOffset() argument
65 AsCoreType(aMessage).SetOffset(aOffset); in otMessageSetOffset()
95 uint16_t otMessageRead(const otMessage *aMessage, uint16_t aOffset, void *aBuf, uint16_t aLength) in otMessageRead() argument
97 return AsCoreType(aMessage).ReadBytes(aOffset, aBuf, aLength); in otMessageRead()
100 int otMessageWrite(otMessage *aMessage, uint16_t aOffset, const void *aBuf, uint16_t aLength) in otMessageWrite() argument
102 AsCoreType(aMessage).WriteBytes(aOffset, aBuf, aLength); in otMessageWrite()
/external/openthread/examples/platforms/simulation/
Dflash.c118 void otPlatFlashRead(otInstance *aInstance, uint8_t aSwapIndex, uint32_t aOffset, void *aData, uint… in otPlatFlashRead() argument
125 …assert((sFlashFd >= 0) && (aSwapIndex < SWAP_NUM) && (aSize <= SWAP_SIZE) && (aOffset <= (SWAP_SIZ… in otPlatFlashRead()
129 rval = pread(sFlashFd, aData, aSize, (off_t)(address + aOffset)); in otPlatFlashRead()
133 void otPlatFlashWrite(otInstance *aInstance, uint8_t aSwapIndex, uint32_t aOffset, const void *aDat… in otPlatFlashWrite() argument
141 …assert((sFlashFd >= 0) && (aSwapIndex < SWAP_NUM) && (aSize <= SWAP_SIZE) && (aOffset <= (SWAP_SIZ… in otPlatFlashWrite()
144 address += aOffset; in otPlatFlashWrite()
/external/openthread/include/openthread/
Dmessage.h170 void otMessageSetOffset(otMessage *aMessage, uint16_t aOffset);
242 uint16_t otMessageRead(const otMessage *aMessage, uint16_t aOffset, void *aBuf, uint16_t aLength);
263 int otMessageWrite(otMessage *aMessage, uint16_t aOffset, const void *aBuf, uint16_t aLength);
/external/openthread/tests/unit/
Dtest_platform.cpp386 OT_TOOL_WEAK void otPlatFlashRead(otInstance *, uint8_t aSwapIndex, uint32_t aOffset, void *aData, … in otPlatFlashRead() argument
392 VerifyOrQuit(aOffset <= (FLASH_SWAP_SIZE - aSize), "aOffset + aSize invalid"); in otPlatFlashRead()
396 memcpy(aData, sFlash + address + aOffset, aSize); in otPlatFlashRead()
401 uint32_t aOffset, in otPlatFlashWrite() argument
409 VerifyOrQuit(aOffset <= (FLASH_SWAP_SIZE - aSize), "aOffset + aSize invalid"); in otPlatFlashWrite()
415 sFlash[address + aOffset + index] &= ((uint8_t *)aData)[index]; in otPlatFlashWrite()
/external/openthread/include/openthread/platform/
Dflash.h77 void otPlatFlashRead(otInstance *aInstance, uint8_t aSwapIndex, uint32_t aOffset, void *aData, uint…
90 void otPlatFlashWrite(otInstance *aInstance, uint8_t aSwapIndex, uint32_t aOffset, const void *aDat…
/external/openthread/src/core/meshcop/
Ddataset_manager.hpp202 Error ReadFromMessage(const Message &aMessage, uint16_t aOffset);
279 …Error Save(const Timestamp &aTimestamp, const Message &aMessage, uint16_t aOffset, uint8_t aLength…
429 …Error Save(const Timestamp &aTimestamp, const Message &aMessage, uint16_t aOffset, uint8_t aLength…
574 …Error Save(const Timestamp &aTimestamp, const Message &aMessage, uint16_t aOffset, uint8_t aLength…
/external/openthread/src/core/crypto/
Dsha256.cpp65 void Sha256::Update(const Message &aMessage, uint16_t aOffset, uint16_t aLength) in Update() argument
69 aMessage.GetFirstChunk(aOffset, aLength, chunk); in Update()
Dhmac_sha256.cpp70 void HmacSha256::Update(const Message &aMessage, uint16_t aOffset, uint16_t aLength) in Update() argument
74 aMessage.GetFirstChunk(aOffset, aLength, chunk); in Update()
/external/openthread/src/core/utils/
Dflash.cpp207 bool Flash::DoesValidRecordExist(uint32_t aOffset, uint16_t aKey) const in DoesValidRecordExist() argument
212 for (; aOffset < mSwapUsed; aOffset += record.GetSize()) in DoesValidRecordExist()
214 otPlatFlashRead(&GetInstance(), mSwapIndex, aOffset, &record, sizeof(record)); in DoesValidRecordExist()

1234