Home
last modified time | relevance | path

Searched refs:frame (Results 1 – 25 of 28) sorted by relevance

12

/openthread-3.5.0/tests/scripts/thread-cert/
Dtest_mac802154.py45 frame = mac802154.MacFrame()
46 frame.parse(io.BytesIO(bytearray([0x12, 0x00, 0x12, 0x34, 0x56])))
48 self.assertEqual(mac802154.MacHeader.FrameType.ACK, frame.header.frame_type)
49 self.assertEqual(True, frame.header.frame_pending)
50 self.assertEqual(False, frame.header.ack_request)
51 self.assertEqual(0, frame.header.frame_version)
52 self.assertEqual(0x12, frame.header.seq)
53 self.assertEqual(bytearray([0x34, 0x56]), frame.header.fcs)
54 self.assertEqual(None, frame.payload)
57 frame = mac802154.MacFrame()
[all …]
Dpcap.py66 def encode_frame(self, frame, sec, usec): argument
74 pcap_tap_channel_tlv = struct.pack("<HHHH", 3, 3, frame[0], 0)
78 frame = frame[1:]
79 length += len(frame)
85 pcap_frame += frame
95 def append(self, frame, timestamp=None): argument
99 pkt = self.encode_frame(frame, *timestamp)
Dwpan.py118 def dissect(frame: bytes) -> WpanFrameInfo:
119 fcf = struct.unpack("<H", frame[1:3])[0]
121 seq_no = frame[3]
134 dst_short = struct.unpack('<H', frame[offset:offset + 2])[0]
136 dst_extaddr = '%016x' % struct.unpack('<Q', frame[offset:offset + 8])[0]
/openthread-3.5.0/tests/unit/
Dtest_hdlc.cpp130 uint8_t *frame = nullptr; in TestSpinelMultiFrameBuffer() local
143 …VerifyOrQuit(frameBuffer.GetNextSavedFrame(frame, length) == OT_ERROR_NOT_FOUND, "after constructo… in TestSpinelMultiFrameBuffer()
203 frame = nullptr; in TestSpinelMultiFrameBuffer()
204 SuccessOrQuit(frameBuffer.GetNextSavedFrame(frame, length)); in TestSpinelMultiFrameBuffer()
206 …VerifyOrQuit(memcmp(frame, sMottoText, length) == 0, "GetNextSavedFrame() frame content is incorre… in TestSpinelMultiFrameBuffer()
209 SuccessOrQuit(frameBuffer.GetNextSavedFrame(frame, length)); in TestSpinelMultiFrameBuffer()
211 …VerifyOrQuit(memcmp(frame, sHelloText, length) == 0, "GetNextSavedFrame() frame content is incorre… in TestSpinelMultiFrameBuffer()
214 SuccessOrQuit(frameBuffer.GetNextSavedFrame(frame, length)); in TestSpinelMultiFrameBuffer()
216 …VerifyOrQuit(memcmp(frame, sHexText, length) == 0, "GetNextSavedFrame() frame content is incorrect… in TestSpinelMultiFrameBuffer()
218 newFrame = frame; in TestSpinelMultiFrameBuffer()
[all …]
Dtest_mac_frame.cpp289 Mac::TxFrame frame; in TestMacHeader() local
295 frame.mPsdu = psdu; in TestMacHeader()
296 frame.mLength = 0; in TestMacHeader()
297 frame.mRadioType = 0; in TestMacHeader()
354frame.InitMacHeader(Mac::Frame::kTypeData, testCase.mVersion, addresses, panIds, testCase.mSecurit… in TestMacHeader()
357 VerifyOrQuit(frame.GetHeaderLength() == testCase.mHeaderLength); in TestMacHeader()
358 VerifyOrQuit(frame.GetFooterLength() == testCase.mFooterLength); in TestMacHeader()
359 VerifyOrQuit(frame.GetLength() == testCase.mHeaderLength + testCase.mFooterLength); in TestMacHeader()
361 VerifyOrQuit(frame.GetType() == Mac::Frame::kTypeData); in TestMacHeader()
362 VerifyOrQuit(!frame.IsAck()); in TestMacHeader()
[all …]
Dtest_lowpan.cpp1870 uint8_t frame[kMaxFrameSize]; in TestLowpanMeshHeader() local
1881 frameBuilder.Init(frame, sizeof(frame)); in TestLowpanMeshHeader()
1886 VerifyOrQuit(memcmp(frame, kMeshHeader1, length) == 0, "MeshHeader::AppendTo() failed"); in TestLowpanMeshHeader()
1889 frameData.Init(frame, length); in TestLowpanMeshHeader()
1893 …VerifyOrQuit(frameData.GetBytes() - frame == length, "ParseFrom() did not skip over parsed content… in TestLowpanMeshHeader()
1898 frameData.Init(frame, length - 1); in TestLowpanMeshHeader()
1909 frameBuilder.Init(frame, sizeof(frame)); in TestLowpanMeshHeader()
1914 VerifyOrQuit(memcmp(frame, kMeshHeader2, length) == 0, "MeshHeader::AppendTo() failed"); in TestLowpanMeshHeader()
1917 frameData.Init(frame, length); in TestLowpanMeshHeader()
1921 …VerifyOrQuit(frameData.GetBytes() - frame == length, "ParseFrom() did not skip over parsed content… in TestLowpanMeshHeader()
[all …]
Dtest_spinel_encoder.cpp62 uint8_t frame[kTestBufferSize]; in TestEncoder() local
144 SuccessOrQuit(ReadFrame(ncpBuffer, frame, frameLen)); in TestEncoder()
145 DumpBuffer("Frame", frame, frameLen); in TestEncoder()
148 frame, static_cast<spinel_size_t>(frameLen), in TestEncoder()
199 SuccessOrQuit(ReadFrame(ncpBuffer, frame, frameLen)); in TestEncoder()
200 DumpBuffer("Frame", frame, frameLen); in TestEncoder()
203 frame, static_cast<spinel_size_t>(frameLen), in TestEncoder()
218 parsedLen = spinel_datatype_unpack(frame, static_cast<spinel_size_t>(frameLen), in TestEncoder()
258 SuccessOrQuit(ReadFrame(ncpBuffer, frame, frameLen)); in TestEncoder()
261 frame, static_cast<spinel_size_t>(frameLen), in TestEncoder()
[all …]
DCMakeLists.txt346 add_executable(ot-test-frame-builder
350 target_include_directories(ot-test-frame-builder
355 target_compile_options(ot-test-frame-builder
360 target_link_libraries(ot-test-frame-builder
365 add_test(NAME ot-test-frame_builder COMMAND ot-test-frame-builder)
625 add_executable(ot-test-mac-frame
629 target_include_directories(ot-test-mac-frame
634 target_compile_options(ot-test-mac-frame
639 target_link_libraries(ot-test-mac-frame
644 add_test(NAME ot-test-mac-frame COMMAND ot-test-mac-frame)
/openthread-3.5.0/src/core/thread/
Dcsl_tx_scheduler.cpp180 Mac::TxFrame *frame = nullptr; in HandleFrameRequest() local
188 frame = &aTxFrames.GetTxFrame(Mac::kRadioTypeIeee802154); in HandleFrameRequest()
190 frame = &aTxFrames.GetTxFrame(); in HandleFrameRequest()
193 …VerifyOrExit(mCallbacks.PrepareFrameForChild(*frame, mFrameContext, *mCslTxChild) == kErrorNone, f… in HandleFrameRequest()
195 VerifyOrExit(mCslTxMessage != nullptr, frame = nullptr); in HandleFrameRequest()
203 frame->SetIsARetransmission(true); in HandleFrameRequest()
204 frame->SetSequence(mCslTxChild->GetIndirectDataSequenceNumber()); in HandleFrameRequest()
206 if (frame->GetSecurityEnabled()) in HandleFrameRequest()
208 frame->SetFrameCounter(mCslTxChild->GetIndirectFrameCounter()); in HandleFrameRequest()
209 frame->SetKeyId(mCslTxChild->GetIndirectKeyId()); in HandleFrameRequest()
[all …]
Ddiscover_scanner.cpp187 Mac::TxFrame *frame = &aFrame; in PrepareDiscoveryRequestFrame() local
196 frame = nullptr; in PrepareDiscoveryRequestFrame()
200 frame->SetChannel(mScanChannel); in PrepareDiscoveryRequestFrame()
205 return frame; in PrepareDiscoveryRequestFrame()
Dlowpan.cpp1148 uint8_t frame[kDeepHopsHeaderLength]; in ParseFrom() local
1151 frameLength = aMessage.ReadBytes(/* aOffset */ 0, frame, sizeof(frame)); in ParseFrom()
1153 return ParseFrom(frame, frameLength, aHeaderLength); in ParseFrom()
1193 uint8_t frame[kDeepHopsHeaderLength]; in AppendTo() local
1196 frameBuilder.Init(frame, sizeof(frame)); in AppendTo()
1257 uint8_t frame[sizeof(NextFrag)]; in ParseFrom() local
1260 frameLength = aMessage.ReadBytes(aOffset, frame, sizeof(frame)); in ParseFrom()
1262 return ParseFrom(frame, frameLength, aHeaderLength); in ParseFrom()
Dmesh_forwarder.cpp764 Mac::TxFrame *frame = nullptr; in HandleFrameRequest() local
770 frame = &Get<RadioSelector>().SelectRadio(*mSendMessage, mMacAddrs.mDestination, aTxFrames); in HandleFrameRequest()
783 frame = &aTxFrames.GetTxFrame(); in HandleFrameRequest()
793 frame = Get<Mle::DiscoverScanner>().PrepareDiscoveryRequestFrame(*frame); in HandleFrameRequest()
794 VerifyOrExit(frame != nullptr); in HandleFrameRequest()
803 …PrepareDataFrame(*frame, *mSendMessage, mMacAddrs, mAddMeshHeader, mMeshSource, mMeshDest, addFrag… in HandleFrameRequest()
809 ExitNow(frame = nullptr); in HandleFrameRequest()
820 PrepareEmptyFrame(*frame, macDestAddr, /* aAckRequest */ true); in HandleFrameRequest()
828 SendMesh(*mSendMessage, *frame); in HandleFrameRequest()
843 ExitNow(frame = nullptr); in HandleFrameRequest()
[all …]
/openthread-3.5.0/tests/fuzz/
Dradio_receive_done.cpp65 otRadioFrame frame; in LLVMFuzzerTestOneInput() local
81 memset(&frame, 0, sizeof(frame)); in LLVMFuzzerTestOneInput()
82 frame.mPsdu = buf; in LLVMFuzzerTestOneInput()
83 frame.mChannel = 11; in LLVMFuzzerTestOneInput()
84 frame.mLength = static_cast<uint8_t>(size); in LLVMFuzzerTestOneInput()
85 memcpy(buf, data, frame.mLength); in LLVMFuzzerTestOneInput()
87 otPlatRadioReceiveDone(instance, &frame, OT_ERROR_NONE); in LLVMFuzzerTestOneInput()
/openthread-3.5.0/tools/harness-simulation/posix/sniffer_sim/
Dpcap_codec.py70 def _encode_frame(self, frame, sec, usec): argument
74 frame = frame[1:]
76 length = len(frame)
78 pcap_frame += frame
89 def append(self, frame): argument
93 if frame[0] != self._channel:
97 self._write(self._encode_frame(frame, *timestamp))
/openthread-3.5.0/src/core/mac/
Dmac_links.cpp61 TxFrame *frame = nullptr; in GetTxFrame() local
67 frame = &mTxFrame802154; in GetTxFrame()
72 frame = &mTxFrameTrel; in GetTxFrame()
79 return *frame; in GetTxFrame()
89 TxFrame *frame = nullptr; in GetTxFrame() local
94 frame = &mTxFrame802154; in GetTxFrame()
99 …if (aRadioTypes.Contains(kRadioTypeTrel) && ((frame == nullptr) || (frame->GetMtu() > mTxFrameTrel… in GetTxFrame()
101 frame = &mTxFrameTrel; in GetTxFrame()
107 return *frame; in GetTxFrame()
Ddata_poll_handler.cpp179 Mac::TxFrame *frame = nullptr; in HandleFrameRequest() local
184 frame = &aTxFrames.GetTxFrame(mIndirectTxChild->GetLastPollRadioType()); in HandleFrameRequest()
186 frame = &aTxFrames.GetTxFrame(); in HandleFrameRequest()
189 …VerifyOrExit(mCallbacks.PrepareFrameForChild(*frame, mFrameContext, *mIndirectTxChild) == kErrorNo… in HandleFrameRequest()
190 frame = nullptr); in HandleFrameRequest()
202 frame->SetIsARetransmission(true); in HandleFrameRequest()
203 frame->SetSequence(mIndirectTxChild->GetIndirectDataSequenceNumber()); in HandleFrameRequest()
205 if (frame->GetSecurityEnabled()) in HandleFrameRequest()
207 frame->SetFrameCounter(mIndirectTxChild->GetIndirectFrameCounter()); in HandleFrameRequest()
208 frame->SetKeyId(mIndirectTxChild->GetIndirectKeyId()); in HandleFrameRequest()
[all …]
Dmac.cpp736 TxFrame &frame = mLinks.GetTxFrames().GetBroadcastTxFrame(); in PrepareBeaconRequest() local
744frame.InitMacHeader(Frame::kTypeMacCmd, Frame::kVersion2003, addrs, panIds, Frame::kSecurityNone); in PrepareBeaconRequest()
746 IgnoreError(frame.SetCommandId(Frame::kMacCmdBeaconRequest)); in PrepareBeaconRequest()
750 return &frame; in PrepareBeaconRequest()
755 TxFrame *frame; in PrepareBeacon() local
766 frame = &mLinks.GetTxFrames().GetTxFrame(mTxBeaconRadioLinks); in PrepareBeacon()
769 frame = &mLinks.GetTxFrames().GetBroadcastTxFrame(); in PrepareBeacon()
776frame->InitMacHeader(Frame::kTypeBeacon, Frame::kVersion2003, addrs, panIds, Frame::kSecurityNone); in PrepareBeacon()
778 beacon = reinterpret_cast<Beacon *>(frame->GetPayload()); in PrepareBeacon()
802 frame->SetPayloadLength(beaconLength); in PrepareBeacon()
[all …]
Ddata_poll_sender.cpp557 Mac::TxFrame *frame = nullptr; in PrepareDataRequest() local
565 frame = &aTxFrames.GetTxFrame(radio); in PrepareDataRequest()
568 frame = &aTxFrames.GetTxFrame(); in PrepareDataRequest()
582 Get<MeshForwarder>().PrepareMacHeaders(*frame, Mac::Frame::kTypeMacCmd, addresses, panIds, in PrepareDataRequest()
586 if (frame->GetHeaderIe(Mac::CslIe::kHeaderIeId) != nullptr) in PrepareDataRequest()
593 IgnoreError(frame->SetCommandId(Mac::Frame::kMacCmdDataRequest)); in PrepareDataRequest()
596 return frame; in PrepareDataRequest()
/openthread-3.5.0/src/lib/spinel/
Dradio_spinel_impl.hpp865 uint8_t *frame = nullptr; in ProcessFrameQueue() local
868 while (mRxFrameBuffer.GetNextSavedFrame(frame, length) == OT_ERROR_NONE) in ProcessFrameQueue()
870 HandleNotification(frame, length); in ProcessFrameQueue()
2671 otRadioFrame frame; in LogSpinelFrame() local
2691 … &frame.mPsdu, &frame.mLength, &frame.mInfo.mRxInfo.mRssi, &noiseFloor, in LogSpinelFrame()
2692 &flags, &frame.mChannel, &frame.mInfo.mRxInfo.mLqi, in LogSpinelFrame()
2693 &frame.mInfo.mRxInfo.mTimestamp, &receiveError); in LogSpinelFrame()
2695 …tart += Snprintf(start, static_cast<uint32_t>(end - start), ", len:%u, rssi:%d ...", frame.mLength, in LogSpinelFrame()
2696 frame.mInfo.mRxInfo.mRssi); in LogSpinelFrame()
2702 flags, frame.mChannel, frame.mInfo.mRxInfo.mLqi, in LogSpinelFrame()
[all …]
/openthread-3.5.0/examples/platforms/utils/
Dmac_frame.cpp41 const Mac::Frame &frame = *static_cast<const Mac::Frame *>(aFrame); in otMacFrameDoesAddrMatch() local
46 SuccessOrExit(frame.GetDstAddr(dst)); in otMacFrameDoesAddrMatch()
62 SuccessOrExit(frame.GetDstPanId(panid)); in otMacFrameDoesAddrMatch()
/openthread-3.5.0/src/ncp/
Dncp_base_radio.cpp452 otRadioFrame *frame; in HandlePropertySet_SPINEL_PROP_STREAM_RAW() local
456 frame = otLinkRawGetTransmitBuffer(mInstance); in HandlePropertySet_SPINEL_PROP_STREAM_RAW()
457 VerifyOrExit(frame != nullptr, error = OT_ERROR_NO_BUFS); in HandlePropertySet_SPINEL_PROP_STREAM_RAW()
459 SuccessOrExit(error = DecodeStreamRawTxRequest(*frame)); in HandlePropertySet_SPINEL_PROP_STREAM_RAW()
/openthread-3.5.0/tools/spi-hdlc-adapter/
DREADME.md22frame. This makes this tool usable with SPI slaves which have buggy SPI blocks that prepend a var…
33 If an MCU reset is detected by the reset bit being set on a SPI frame, the special vendor-specific …
/openthread-3.5.0/third_party/mbedtls/repo/
DCMakeLists.txt207 …o-common -fsanitize=undefined -fno-sanitize-recover=all -O1 -g3 -fno-omit-frame-pointer -fno-optim…
218 …o-common -fsanitize=undefined -fno-sanitize-recover=all -O1 -g3 -fno-omit-frame-pointer -fno-optim…
220 …set(CMAKE_C_FLAGS_MEMSANDBG "-fsanitize=memory -O1 -g3 -fno-omit-frame-pointer -fno-optimize-sib…
/openthread-3.5.0/src/cli/
DREADME.md2146 - Error rates, frame tx (at MAC layer), IPv6 message tx (above MAC)
2160 err-rate - frame:11.51% msg:0.76%
2167 err-rate - frame:0.73% msg:0.00%
2200 - Error rates, frame tx (at MAC layer), IPv6 message tx (above MAC)
2207 err-rate - frame:1.38% msg:0.00%
2211 err-rate - frame:0.72% msg:0.00%
2996 …s not receive any frame and/or potentially send ack). Also the frame transmission requests return …
3824 …n-Idle device to send a mac frame to its parent. The mac frame could be either a mac data request …
DREADME_HISTORY.md511 - Short address (RLOC16) of neighbor to/from which the message was sent/received. If the frame is b…

12