xref: /aosp_15_r20/external/openthread/tests/fuzz/fuzzer_platform.cpp (revision cfb92d1480a9e65faed56933e9c12405f45898b4)
1*cfb92d14SAndroid Build Coastguard Worker /*
2*cfb92d14SAndroid Build Coastguard Worker  *  Copyright (c) 2017, The OpenThread Authors.
3*cfb92d14SAndroid Build Coastguard Worker  *  All rights reserved.
4*cfb92d14SAndroid Build Coastguard Worker  *
5*cfb92d14SAndroid Build Coastguard Worker  *  Redistribution and use in source and binary forms, with or without
6*cfb92d14SAndroid Build Coastguard Worker  *  modification, are permitted provided that the following conditions are met:
7*cfb92d14SAndroid Build Coastguard Worker  *  1. Redistributions of source code must retain the above copyright
8*cfb92d14SAndroid Build Coastguard Worker  *     notice, this list of conditions and the following disclaimer.
9*cfb92d14SAndroid Build Coastguard Worker  *  2. Redistributions in binary form must reproduce the above copyright
10*cfb92d14SAndroid Build Coastguard Worker  *     notice, this list of conditions and the following disclaimer in the
11*cfb92d14SAndroid Build Coastguard Worker  *     documentation and/or other materials provided with the distribution.
12*cfb92d14SAndroid Build Coastguard Worker  *  3. Neither the name of the copyright holder nor the
13*cfb92d14SAndroid Build Coastguard Worker  *     names of its contributors may be used to endorse or promote products
14*cfb92d14SAndroid Build Coastguard Worker  *     derived from this software without specific prior written permission.
15*cfb92d14SAndroid Build Coastguard Worker  *
16*cfb92d14SAndroid Build Coastguard Worker  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17*cfb92d14SAndroid Build Coastguard Worker  *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18*cfb92d14SAndroid Build Coastguard Worker  *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19*cfb92d14SAndroid Build Coastguard Worker  *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20*cfb92d14SAndroid Build Coastguard Worker  *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21*cfb92d14SAndroid Build Coastguard Worker  *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22*cfb92d14SAndroid Build Coastguard Worker  *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23*cfb92d14SAndroid Build Coastguard Worker  *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24*cfb92d14SAndroid Build Coastguard Worker  *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25*cfb92d14SAndroid Build Coastguard Worker  *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26*cfb92d14SAndroid Build Coastguard Worker  *  POSSIBILITY OF SUCH DAMAGE.
27*cfb92d14SAndroid Build Coastguard Worker  */
28*cfb92d14SAndroid Build Coastguard Worker 
29*cfb92d14SAndroid Build Coastguard Worker #include "openthread-core-config.h"
30*cfb92d14SAndroid Build Coastguard Worker 
31*cfb92d14SAndroid Build Coastguard Worker #include "fuzzer_platform.h"
32*cfb92d14SAndroid Build Coastguard Worker 
33*cfb92d14SAndroid Build Coastguard Worker #include <string.h>
34*cfb92d14SAndroid Build Coastguard Worker 
35*cfb92d14SAndroid Build Coastguard Worker #include <openthread/platform/alarm-micro.h>
36*cfb92d14SAndroid Build Coastguard Worker #include <openthread/platform/alarm-milli.h>
37*cfb92d14SAndroid Build Coastguard Worker #include <openthread/platform/diag.h>
38*cfb92d14SAndroid Build Coastguard Worker #include <openthread/platform/dnssd.h>
39*cfb92d14SAndroid Build Coastguard Worker #include <openthread/platform/entropy.h>
40*cfb92d14SAndroid Build Coastguard Worker #include <openthread/platform/logging.h>
41*cfb92d14SAndroid Build Coastguard Worker #include <openthread/platform/mdns_socket.h>
42*cfb92d14SAndroid Build Coastguard Worker #include <openthread/platform/misc.h>
43*cfb92d14SAndroid Build Coastguard Worker #include <openthread/platform/multipan.h>
44*cfb92d14SAndroid Build Coastguard Worker #include <openthread/platform/radio.h>
45*cfb92d14SAndroid Build Coastguard Worker #include <openthread/platform/settings.h>
46*cfb92d14SAndroid Build Coastguard Worker 
47*cfb92d14SAndroid Build Coastguard Worker #include "mac/mac_frame.hpp"
48*cfb92d14SAndroid Build Coastguard Worker 
49*cfb92d14SAndroid Build Coastguard Worker using namespace ot;
50*cfb92d14SAndroid Build Coastguard Worker 
51*cfb92d14SAndroid Build Coastguard Worker typedef struct AlarmState
52*cfb92d14SAndroid Build Coastguard Worker {
53*cfb92d14SAndroid Build Coastguard Worker     uint32_t fire;
54*cfb92d14SAndroid Build Coastguard Worker     bool     isRunning;
55*cfb92d14SAndroid Build Coastguard Worker } AlarmState;
56*cfb92d14SAndroid Build Coastguard Worker 
57*cfb92d14SAndroid Build Coastguard Worker enum
58*cfb92d14SAndroid Build Coastguard Worker {
59*cfb92d14SAndroid Build Coastguard Worker     IEEE802154_ACK_LENGTH = 5,
60*cfb92d14SAndroid Build Coastguard Worker 
61*cfb92d14SAndroid Build Coastguard Worker     IEEE802154_FRAME_TYPE_ACK = 2 << 0,
62*cfb92d14SAndroid Build Coastguard Worker };
63*cfb92d14SAndroid Build Coastguard Worker 
64*cfb92d14SAndroid Build Coastguard Worker static uint32_t     sAlarmNow;
65*cfb92d14SAndroid Build Coastguard Worker static AlarmState   sAlarmMilli;
66*cfb92d14SAndroid Build Coastguard Worker static AlarmState   sAlarmMicro;
67*cfb92d14SAndroid Build Coastguard Worker static uint32_t     sRandomState = 1;
68*cfb92d14SAndroid Build Coastguard Worker static uint8_t      sRadioTransmitPsdu[OT_RADIO_FRAME_MAX_SIZE];
69*cfb92d14SAndroid Build Coastguard Worker static otRadioFrame sRadioTransmitFrame;
70*cfb92d14SAndroid Build Coastguard Worker static uint8_t      sRadioAckPsdu[OT_RADIO_FRAME_MAX_SIZE];
71*cfb92d14SAndroid Build Coastguard Worker static otRadioFrame sRadioAckFrame;
72*cfb92d14SAndroid Build Coastguard Worker static bool         sResetWasRequested = false;
73*cfb92d14SAndroid Build Coastguard Worker static otRadioState sRadioState        = OT_RADIO_STATE_DISABLED;
74*cfb92d14SAndroid Build Coastguard Worker 
otMacFrameIsAckRequested(const otRadioFrame * aFrame)75*cfb92d14SAndroid Build Coastguard Worker bool otMacFrameIsAckRequested(const otRadioFrame *aFrame)
76*cfb92d14SAndroid Build Coastguard Worker {
77*cfb92d14SAndroid Build Coastguard Worker     return static_cast<const Mac::Frame *>(aFrame)->GetAckRequest();
78*cfb92d14SAndroid Build Coastguard Worker }
79*cfb92d14SAndroid Build Coastguard Worker 
otMacFrameGetSequence(const otRadioFrame * aFrame,uint8_t * aSequence)80*cfb92d14SAndroid Build Coastguard Worker otError otMacFrameGetSequence(const otRadioFrame *aFrame, uint8_t *aSequence)
81*cfb92d14SAndroid Build Coastguard Worker {
82*cfb92d14SAndroid Build Coastguard Worker     otError error;
83*cfb92d14SAndroid Build Coastguard Worker 
84*cfb92d14SAndroid Build Coastguard Worker     if (static_cast<const Mac::Frame *>(aFrame)->IsSequencePresent())
85*cfb92d14SAndroid Build Coastguard Worker     {
86*cfb92d14SAndroid Build Coastguard Worker         *aSequence = static_cast<const Mac::Frame *>(aFrame)->GetSequence();
87*cfb92d14SAndroid Build Coastguard Worker         error      = kErrorNone;
88*cfb92d14SAndroid Build Coastguard Worker     }
89*cfb92d14SAndroid Build Coastguard Worker     else
90*cfb92d14SAndroid Build Coastguard Worker     {
91*cfb92d14SAndroid Build Coastguard Worker         error = kErrorParse;
92*cfb92d14SAndroid Build Coastguard Worker     }
93*cfb92d14SAndroid Build Coastguard Worker 
94*cfb92d14SAndroid Build Coastguard Worker     return error;
95*cfb92d14SAndroid Build Coastguard Worker }
96*cfb92d14SAndroid Build Coastguard Worker 
FuzzerPlatformInit(void)97*cfb92d14SAndroid Build Coastguard Worker void FuzzerPlatformInit(void)
98*cfb92d14SAndroid Build Coastguard Worker {
99*cfb92d14SAndroid Build Coastguard Worker     sRandomState = 1;
100*cfb92d14SAndroid Build Coastguard Worker     sAlarmNow    = 0;
101*cfb92d14SAndroid Build Coastguard Worker     memset(&sAlarmMilli, 0, sizeof(sAlarmMilli));
102*cfb92d14SAndroid Build Coastguard Worker     memset(&sAlarmMicro, 0, sizeof(sAlarmMicro));
103*cfb92d14SAndroid Build Coastguard Worker 
104*cfb92d14SAndroid Build Coastguard Worker     sRadioTransmitFrame.mPsdu = sRadioTransmitPsdu;
105*cfb92d14SAndroid Build Coastguard Worker     sRadioAckFrame.mPsdu      = sRadioAckPsdu;
106*cfb92d14SAndroid Build Coastguard Worker }
107*cfb92d14SAndroid Build Coastguard Worker 
FuzzerPlatformProcess(otInstance * aInstance)108*cfb92d14SAndroid Build Coastguard Worker void FuzzerPlatformProcess(otInstance *aInstance)
109*cfb92d14SAndroid Build Coastguard Worker {
110*cfb92d14SAndroid Build Coastguard Worker     if (sRadioState == OT_RADIO_STATE_TRANSMIT)
111*cfb92d14SAndroid Build Coastguard Worker     {
112*cfb92d14SAndroid Build Coastguard Worker         sRadioState = OT_RADIO_STATE_RECEIVE;
113*cfb92d14SAndroid Build Coastguard Worker 
114*cfb92d14SAndroid Build Coastguard Worker         if (otMacFrameIsAckRequested(&sRadioTransmitFrame))
115*cfb92d14SAndroid Build Coastguard Worker         {
116*cfb92d14SAndroid Build Coastguard Worker             otError error;
117*cfb92d14SAndroid Build Coastguard Worker 
118*cfb92d14SAndroid Build Coastguard Worker             sRadioAckFrame.mLength  = IEEE802154_ACK_LENGTH;
119*cfb92d14SAndroid Build Coastguard Worker             sRadioAckFrame.mPsdu[0] = IEEE802154_FRAME_TYPE_ACK;
120*cfb92d14SAndroid Build Coastguard Worker             sRadioAckFrame.mPsdu[1] = 0;
121*cfb92d14SAndroid Build Coastguard Worker             error                   = otMacFrameGetSequence(&sRadioTransmitFrame, &sRadioAckFrame.mPsdu[2]);
122*cfb92d14SAndroid Build Coastguard Worker             OT_ASSERT(error == OT_ERROR_NONE);
123*cfb92d14SAndroid Build Coastguard Worker             sRadioAckFrame.mChannel = sRadioTransmitFrame.mChannel;
124*cfb92d14SAndroid Build Coastguard Worker 
125*cfb92d14SAndroid Build Coastguard Worker             otPlatRadioTxDone(aInstance, &sRadioTransmitFrame, &sRadioAckFrame, OT_ERROR_NONE);
126*cfb92d14SAndroid Build Coastguard Worker         }
127*cfb92d14SAndroid Build Coastguard Worker         else
128*cfb92d14SAndroid Build Coastguard Worker         {
129*cfb92d14SAndroid Build Coastguard Worker             otPlatRadioTxDone(aInstance, &sRadioTransmitFrame, nullptr, OT_ERROR_NONE);
130*cfb92d14SAndroid Build Coastguard Worker         }
131*cfb92d14SAndroid Build Coastguard Worker     }
132*cfb92d14SAndroid Build Coastguard Worker 
133*cfb92d14SAndroid Build Coastguard Worker     if (sAlarmMilli.isRunning || sAlarmMicro.isRunning)
134*cfb92d14SAndroid Build Coastguard Worker     {
135*cfb92d14SAndroid Build Coastguard Worker         uint32_t fire = UINT32_MAX;
136*cfb92d14SAndroid Build Coastguard Worker 
137*cfb92d14SAndroid Build Coastguard Worker         if (sAlarmMilli.isRunning && fire > sAlarmMilli.fire)
138*cfb92d14SAndroid Build Coastguard Worker         {
139*cfb92d14SAndroid Build Coastguard Worker             fire = sAlarmMilli.fire;
140*cfb92d14SAndroid Build Coastguard Worker         }
141*cfb92d14SAndroid Build Coastguard Worker 
142*cfb92d14SAndroid Build Coastguard Worker         if (sAlarmMicro.isRunning && fire > sAlarmMicro.fire)
143*cfb92d14SAndroid Build Coastguard Worker         {
144*cfb92d14SAndroid Build Coastguard Worker             fire = sAlarmMicro.fire;
145*cfb92d14SAndroid Build Coastguard Worker         }
146*cfb92d14SAndroid Build Coastguard Worker 
147*cfb92d14SAndroid Build Coastguard Worker         sAlarmNow = fire;
148*cfb92d14SAndroid Build Coastguard Worker 
149*cfb92d14SAndroid Build Coastguard Worker         if (sAlarmMilli.isRunning && sAlarmNow >= sAlarmMilli.fire)
150*cfb92d14SAndroid Build Coastguard Worker         {
151*cfb92d14SAndroid Build Coastguard Worker             sAlarmMilli.isRunning = false;
152*cfb92d14SAndroid Build Coastguard Worker             otPlatAlarmMilliFired(aInstance);
153*cfb92d14SAndroid Build Coastguard Worker         }
154*cfb92d14SAndroid Build Coastguard Worker 
155*cfb92d14SAndroid Build Coastguard Worker #if OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE
156*cfb92d14SAndroid Build Coastguard Worker         if (sAlarmMicro.isRunning && sAlarmNow >= sAlarmMicro.fire)
157*cfb92d14SAndroid Build Coastguard Worker         {
158*cfb92d14SAndroid Build Coastguard Worker             sAlarmMicro.isRunning = false;
159*cfb92d14SAndroid Build Coastguard Worker             otPlatAlarmMicroFired(aInstance);
160*cfb92d14SAndroid Build Coastguard Worker         }
161*cfb92d14SAndroid Build Coastguard Worker #endif
162*cfb92d14SAndroid Build Coastguard Worker     }
163*cfb92d14SAndroid Build Coastguard Worker }
164*cfb92d14SAndroid Build Coastguard Worker 
FuzzerPlatformResetWasRequested(void)165*cfb92d14SAndroid Build Coastguard Worker bool FuzzerPlatformResetWasRequested(void) { return sResetWasRequested; }
166*cfb92d14SAndroid Build Coastguard Worker 
167*cfb92d14SAndroid Build Coastguard Worker extern "C" {
168*cfb92d14SAndroid Build Coastguard Worker 
otPlatAlarmMilliGetNow(void)169*cfb92d14SAndroid Build Coastguard Worker uint32_t otPlatAlarmMilliGetNow(void) { return sAlarmNow / 1000; }
170*cfb92d14SAndroid Build Coastguard Worker 
otPlatAlarmMilliStartAt(otInstance * aInstance,uint32_t aT0,uint32_t aDt)171*cfb92d14SAndroid Build Coastguard Worker void otPlatAlarmMilliStartAt(otInstance *aInstance, uint32_t aT0, uint32_t aDt)
172*cfb92d14SAndroid Build Coastguard Worker {
173*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
174*cfb92d14SAndroid Build Coastguard Worker 
175*cfb92d14SAndroid Build Coastguard Worker     sAlarmMilli.fire      = (aT0 + aDt) * 1000;
176*cfb92d14SAndroid Build Coastguard Worker     sAlarmMilli.isRunning = true;
177*cfb92d14SAndroid Build Coastguard Worker }
178*cfb92d14SAndroid Build Coastguard Worker 
otPlatAlarmMilliStop(otInstance * aInstance)179*cfb92d14SAndroid Build Coastguard Worker void otPlatAlarmMilliStop(otInstance *aInstance)
180*cfb92d14SAndroid Build Coastguard Worker {
181*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
182*cfb92d14SAndroid Build Coastguard Worker 
183*cfb92d14SAndroid Build Coastguard Worker     sAlarmMilli.isRunning = false;
184*cfb92d14SAndroid Build Coastguard Worker }
185*cfb92d14SAndroid Build Coastguard Worker 
otPlatAlarmMicroGetNow(void)186*cfb92d14SAndroid Build Coastguard Worker uint32_t otPlatAlarmMicroGetNow(void) { return sAlarmNow; }
187*cfb92d14SAndroid Build Coastguard Worker 
otPlatAlarmMicroStartAt(otInstance * aInstance,uint32_t aT0,uint32_t aDt)188*cfb92d14SAndroid Build Coastguard Worker void otPlatAlarmMicroStartAt(otInstance *aInstance, uint32_t aT0, uint32_t aDt)
189*cfb92d14SAndroid Build Coastguard Worker {
190*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
191*cfb92d14SAndroid Build Coastguard Worker 
192*cfb92d14SAndroid Build Coastguard Worker     sAlarmMicro.fire      = aT0 + aDt;
193*cfb92d14SAndroid Build Coastguard Worker     sAlarmMicro.isRunning = true;
194*cfb92d14SAndroid Build Coastguard Worker }
195*cfb92d14SAndroid Build Coastguard Worker 
otPlatAlarmMicroStop(otInstance * aInstance)196*cfb92d14SAndroid Build Coastguard Worker void otPlatAlarmMicroStop(otInstance *aInstance)
197*cfb92d14SAndroid Build Coastguard Worker {
198*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
199*cfb92d14SAndroid Build Coastguard Worker 
200*cfb92d14SAndroid Build Coastguard Worker     sAlarmMicro.isRunning = false;
201*cfb92d14SAndroid Build Coastguard Worker }
202*cfb92d14SAndroid Build Coastguard Worker 
otDiagIsEnabled(otInstance * aInstance)203*cfb92d14SAndroid Build Coastguard Worker bool otDiagIsEnabled(otInstance *aInstance)
204*cfb92d14SAndroid Build Coastguard Worker {
205*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
206*cfb92d14SAndroid Build Coastguard Worker 
207*cfb92d14SAndroid Build Coastguard Worker     return false;
208*cfb92d14SAndroid Build Coastguard Worker }
209*cfb92d14SAndroid Build Coastguard Worker 
otDiagProcessCmd(otInstance * aInstance,uint8_t aArgsLength,char * aArgs[],char * aOutput,size_t aOutputMaxLen)210*cfb92d14SAndroid Build Coastguard Worker otError otDiagProcessCmd(otInstance *aInstance, uint8_t aArgsLength, char *aArgs[], char *aOutput, size_t aOutputMaxLen)
211*cfb92d14SAndroid Build Coastguard Worker {
212*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
213*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aArgsLength);
214*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aArgs);
215*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aOutput);
216*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aOutputMaxLen);
217*cfb92d14SAndroid Build Coastguard Worker 
218*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_NOT_IMPLEMENTED;
219*cfb92d14SAndroid Build Coastguard Worker }
220*cfb92d14SAndroid Build Coastguard Worker 
otDiagProcessCmdLine(otInstance * aInstance,const char * aString,char * aOutput,size_t aOutputMaxLen)221*cfb92d14SAndroid Build Coastguard Worker otError otDiagProcessCmdLine(otInstance *aInstance, const char *aString, char *aOutput, size_t aOutputMaxLen)
222*cfb92d14SAndroid Build Coastguard Worker {
223*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
224*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aString);
225*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aOutput);
226*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aOutputMaxLen);
227*cfb92d14SAndroid Build Coastguard Worker 
228*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_NOT_IMPLEMENTED;
229*cfb92d14SAndroid Build Coastguard Worker }
230*cfb92d14SAndroid Build Coastguard Worker 
otPlatReset(otInstance * aInstance)231*cfb92d14SAndroid Build Coastguard Worker void otPlatReset(otInstance *aInstance)
232*cfb92d14SAndroid Build Coastguard Worker {
233*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
234*cfb92d14SAndroid Build Coastguard Worker 
235*cfb92d14SAndroid Build Coastguard Worker     sResetWasRequested = true;
236*cfb92d14SAndroid Build Coastguard Worker }
237*cfb92d14SAndroid Build Coastguard Worker 
otPlatGetResetReason(otInstance * aInstance)238*cfb92d14SAndroid Build Coastguard Worker otPlatResetReason otPlatGetResetReason(otInstance *aInstance)
239*cfb92d14SAndroid Build Coastguard Worker {
240*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
241*cfb92d14SAndroid Build Coastguard Worker     return OT_PLAT_RESET_REASON_POWER_ON;
242*cfb92d14SAndroid Build Coastguard Worker }
243*cfb92d14SAndroid Build Coastguard Worker 
otPlatLog(otLogLevel aLogLevel,otLogRegion aLogRegion,const char * aFormat,...)244*cfb92d14SAndroid Build Coastguard Worker OT_TOOL_WEAK void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, ...)
245*cfb92d14SAndroid Build Coastguard Worker {
246*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aLogLevel);
247*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aLogRegion);
248*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aFormat);
249*cfb92d14SAndroid Build Coastguard Worker }
250*cfb92d14SAndroid Build Coastguard Worker 
otPlatWakeHost(void)251*cfb92d14SAndroid Build Coastguard Worker void otPlatWakeHost(void) {}
252*cfb92d14SAndroid Build Coastguard Worker 
otPlatMultipanGetActiveInstance(otInstance **)253*cfb92d14SAndroid Build Coastguard Worker otError otPlatMultipanGetActiveInstance(otInstance **) { return OT_ERROR_NOT_IMPLEMENTED; }
254*cfb92d14SAndroid Build Coastguard Worker 
otPlatMultipanSetActiveInstance(otInstance *,bool)255*cfb92d14SAndroid Build Coastguard Worker otError otPlatMultipanSetActiveInstance(otInstance *, bool) { return OT_ERROR_NOT_IMPLEMENTED; }
256*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioGetIeeeEui64(otInstance * aInstance,uint8_t * aIeeeEui64)257*cfb92d14SAndroid Build Coastguard Worker void otPlatRadioGetIeeeEui64(otInstance *aInstance, uint8_t *aIeeeEui64)
258*cfb92d14SAndroid Build Coastguard Worker {
259*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
260*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aIeeeEui64);
261*cfb92d14SAndroid Build Coastguard Worker }
262*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioSetPanId(otInstance * aInstance,uint16_t aPanId)263*cfb92d14SAndroid Build Coastguard Worker void otPlatRadioSetPanId(otInstance *aInstance, uint16_t aPanId)
264*cfb92d14SAndroid Build Coastguard Worker {
265*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
266*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aPanId);
267*cfb92d14SAndroid Build Coastguard Worker }
268*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioSetExtendedAddress(otInstance * aInstance,const otExtAddress * aExtAddr)269*cfb92d14SAndroid Build Coastguard Worker void otPlatRadioSetExtendedAddress(otInstance *aInstance, const otExtAddress *aExtAddr)
270*cfb92d14SAndroid Build Coastguard Worker {
271*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
272*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aExtAddr);
273*cfb92d14SAndroid Build Coastguard Worker }
274*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioSetShortAddress(otInstance * aInstance,uint16_t aShortAddress)275*cfb92d14SAndroid Build Coastguard Worker void otPlatRadioSetShortAddress(otInstance *aInstance, uint16_t aShortAddress)
276*cfb92d14SAndroid Build Coastguard Worker {
277*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
278*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aShortAddress);
279*cfb92d14SAndroid Build Coastguard Worker }
280*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioSetPromiscuous(otInstance * aInstance,bool aEnabled)281*cfb92d14SAndroid Build Coastguard Worker void otPlatRadioSetPromiscuous(otInstance *aInstance, bool aEnabled)
282*cfb92d14SAndroid Build Coastguard Worker {
283*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
284*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aEnabled);
285*cfb92d14SAndroid Build Coastguard Worker }
286*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioSetRxOnWhenIdle(otInstance * aInstance,bool aEnabled)287*cfb92d14SAndroid Build Coastguard Worker void otPlatRadioSetRxOnWhenIdle(otInstance *aInstance, bool aEnabled)
288*cfb92d14SAndroid Build Coastguard Worker {
289*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
290*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aEnabled);
291*cfb92d14SAndroid Build Coastguard Worker }
292*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioIsEnabled(otInstance * aInstance)293*cfb92d14SAndroid Build Coastguard Worker bool otPlatRadioIsEnabled(otInstance *aInstance)
294*cfb92d14SAndroid Build Coastguard Worker {
295*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
296*cfb92d14SAndroid Build Coastguard Worker     return true;
297*cfb92d14SAndroid Build Coastguard Worker }
298*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioEnable(otInstance * aInstance)299*cfb92d14SAndroid Build Coastguard Worker otError otPlatRadioEnable(otInstance *aInstance)
300*cfb92d14SAndroid Build Coastguard Worker {
301*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
302*cfb92d14SAndroid Build Coastguard Worker 
303*cfb92d14SAndroid Build Coastguard Worker     sRadioState = OT_RADIO_STATE_SLEEP;
304*cfb92d14SAndroid Build Coastguard Worker 
305*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_NONE;
306*cfb92d14SAndroid Build Coastguard Worker }
307*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioDisable(otInstance * aInstance)308*cfb92d14SAndroid Build Coastguard Worker otError otPlatRadioDisable(otInstance *aInstance)
309*cfb92d14SAndroid Build Coastguard Worker {
310*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
311*cfb92d14SAndroid Build Coastguard Worker 
312*cfb92d14SAndroid Build Coastguard Worker     sRadioState = OT_RADIO_STATE_DISABLED;
313*cfb92d14SAndroid Build Coastguard Worker 
314*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_NONE;
315*cfb92d14SAndroid Build Coastguard Worker }
316*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioSleep(otInstance * aInstance)317*cfb92d14SAndroid Build Coastguard Worker otError otPlatRadioSleep(otInstance *aInstance)
318*cfb92d14SAndroid Build Coastguard Worker {
319*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
320*cfb92d14SAndroid Build Coastguard Worker 
321*cfb92d14SAndroid Build Coastguard Worker     sRadioState = OT_RADIO_STATE_SLEEP;
322*cfb92d14SAndroid Build Coastguard Worker 
323*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_NONE;
324*cfb92d14SAndroid Build Coastguard Worker }
325*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioReceive(otInstance * aInstance,uint8_t aChannel)326*cfb92d14SAndroid Build Coastguard Worker otError otPlatRadioReceive(otInstance *aInstance, uint8_t aChannel)
327*cfb92d14SAndroid Build Coastguard Worker {
328*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
329*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aChannel);
330*cfb92d14SAndroid Build Coastguard Worker 
331*cfb92d14SAndroid Build Coastguard Worker     sRadioState = OT_RADIO_STATE_RECEIVE;
332*cfb92d14SAndroid Build Coastguard Worker 
333*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_NONE;
334*cfb92d14SAndroid Build Coastguard Worker }
335*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioTransmit(otInstance * aInstance,otRadioFrame * aFrame)336*cfb92d14SAndroid Build Coastguard Worker otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame)
337*cfb92d14SAndroid Build Coastguard Worker {
338*cfb92d14SAndroid Build Coastguard Worker     sRadioState = OT_RADIO_STATE_TRANSMIT;
339*cfb92d14SAndroid Build Coastguard Worker 
340*cfb92d14SAndroid Build Coastguard Worker     otPlatRadioTxStarted(aInstance, aFrame);
341*cfb92d14SAndroid Build Coastguard Worker 
342*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_NONE;
343*cfb92d14SAndroid Build Coastguard Worker }
344*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioGetTransmitPower(otInstance * aInstance,int8_t * aPower)345*cfb92d14SAndroid Build Coastguard Worker otError otPlatRadioGetTransmitPower(otInstance *aInstance, int8_t *aPower)
346*cfb92d14SAndroid Build Coastguard Worker {
347*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
348*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aPower);
349*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_NONE;
350*cfb92d14SAndroid Build Coastguard Worker }
351*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioGetTransmitBuffer(otInstance * aInstance)352*cfb92d14SAndroid Build Coastguard Worker otRadioFrame *otPlatRadioGetTransmitBuffer(otInstance *aInstance)
353*cfb92d14SAndroid Build Coastguard Worker {
354*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
355*cfb92d14SAndroid Build Coastguard Worker     return &sRadioTransmitFrame;
356*cfb92d14SAndroid Build Coastguard Worker }
357*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioGetRssi(otInstance * aInstance)358*cfb92d14SAndroid Build Coastguard Worker int8_t otPlatRadioGetRssi(otInstance *aInstance)
359*cfb92d14SAndroid Build Coastguard Worker {
360*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
361*cfb92d14SAndroid Build Coastguard Worker     return 0;
362*cfb92d14SAndroid Build Coastguard Worker }
363*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioGetCaps(otInstance * aInstance)364*cfb92d14SAndroid Build Coastguard Worker otRadioCaps otPlatRadioGetCaps(otInstance *aInstance)
365*cfb92d14SAndroid Build Coastguard Worker {
366*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
367*cfb92d14SAndroid Build Coastguard Worker     return OT_RADIO_CAPS_NONE;
368*cfb92d14SAndroid Build Coastguard Worker }
369*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioGetPromiscuous(otInstance * aInstance)370*cfb92d14SAndroid Build Coastguard Worker bool otPlatRadioGetPromiscuous(otInstance *aInstance)
371*cfb92d14SAndroid Build Coastguard Worker {
372*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
373*cfb92d14SAndroid Build Coastguard Worker     return false;
374*cfb92d14SAndroid Build Coastguard Worker }
375*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioEnableSrcMatch(otInstance * aInstance,bool aEnable)376*cfb92d14SAndroid Build Coastguard Worker void otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable)
377*cfb92d14SAndroid Build Coastguard Worker {
378*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
379*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aEnable);
380*cfb92d14SAndroid Build Coastguard Worker }
381*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioAddSrcMatchShortEntry(otInstance * aInstance,uint16_t aShortAddress)382*cfb92d14SAndroid Build Coastguard Worker otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress)
383*cfb92d14SAndroid Build Coastguard Worker {
384*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
385*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aShortAddress);
386*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_NONE;
387*cfb92d14SAndroid Build Coastguard Worker }
388*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioAddSrcMatchExtEntry(otInstance * aInstance,const otExtAddress * aExtAddress)389*cfb92d14SAndroid Build Coastguard Worker otError otPlatRadioAddSrcMatchExtEntry(otInstance *aInstance, const otExtAddress *aExtAddress)
390*cfb92d14SAndroid Build Coastguard Worker {
391*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
392*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aExtAddress);
393*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_NONE;
394*cfb92d14SAndroid Build Coastguard Worker }
395*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioClearSrcMatchShortEntry(otInstance * aInstance,uint16_t aShortAddress)396*cfb92d14SAndroid Build Coastguard Worker otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress)
397*cfb92d14SAndroid Build Coastguard Worker {
398*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
399*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aShortAddress);
400*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_NONE;
401*cfb92d14SAndroid Build Coastguard Worker }
402*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioClearSrcMatchExtEntry(otInstance * aInstance,const otExtAddress * aExtAddress)403*cfb92d14SAndroid Build Coastguard Worker otError otPlatRadioClearSrcMatchExtEntry(otInstance *aInstance, const otExtAddress *aExtAddress)
404*cfb92d14SAndroid Build Coastguard Worker {
405*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
406*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aExtAddress);
407*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_NONE;
408*cfb92d14SAndroid Build Coastguard Worker }
409*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioClearSrcMatchShortEntries(otInstance * aInstance)410*cfb92d14SAndroid Build Coastguard Worker void otPlatRadioClearSrcMatchShortEntries(otInstance *aInstance) { OT_UNUSED_VARIABLE(aInstance); }
411*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioClearSrcMatchExtEntries(otInstance * aInstance)412*cfb92d14SAndroid Build Coastguard Worker void otPlatRadioClearSrcMatchExtEntries(otInstance *aInstance) { OT_UNUSED_VARIABLE(aInstance); }
413*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioEnergyScan(otInstance * aInstance,uint8_t aScanChannel,uint16_t aScanDuration)414*cfb92d14SAndroid Build Coastguard Worker otError otPlatRadioEnergyScan(otInstance *aInstance, uint8_t aScanChannel, uint16_t aScanDuration)
415*cfb92d14SAndroid Build Coastguard Worker {
416*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
417*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aScanChannel);
418*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aScanDuration);
419*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_NOT_IMPLEMENTED;
420*cfb92d14SAndroid Build Coastguard Worker }
421*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioSetTransmitPower(otInstance * aInstance,int8_t aPower)422*cfb92d14SAndroid Build Coastguard Worker otError otPlatRadioSetTransmitPower(otInstance *aInstance, int8_t aPower)
423*cfb92d14SAndroid Build Coastguard Worker {
424*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
425*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aPower);
426*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_NOT_IMPLEMENTED;
427*cfb92d14SAndroid Build Coastguard Worker }
428*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioGetCcaEnergyDetectThreshold(otInstance * aInstance,int8_t * aThreshold)429*cfb92d14SAndroid Build Coastguard Worker otError otPlatRadioGetCcaEnergyDetectThreshold(otInstance *aInstance, int8_t *aThreshold)
430*cfb92d14SAndroid Build Coastguard Worker {
431*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
432*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aThreshold);
433*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_NOT_IMPLEMENTED;
434*cfb92d14SAndroid Build Coastguard Worker }
435*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioSetCcaEnergyDetectThreshold(otInstance * aInstance,int8_t aThreshold)436*cfb92d14SAndroid Build Coastguard Worker otError otPlatRadioSetCcaEnergyDetectThreshold(otInstance *aInstance, int8_t aThreshold)
437*cfb92d14SAndroid Build Coastguard Worker {
438*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
439*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aThreshold);
440*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_NOT_IMPLEMENTED;
441*cfb92d14SAndroid Build Coastguard Worker }
442*cfb92d14SAndroid Build Coastguard Worker 
otPlatRadioGetReceiveSensitivity(otInstance * aInstance)443*cfb92d14SAndroid Build Coastguard Worker int8_t otPlatRadioGetReceiveSensitivity(otInstance *aInstance)
444*cfb92d14SAndroid Build Coastguard Worker {
445*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
446*cfb92d14SAndroid Build Coastguard Worker     return 0;
447*cfb92d14SAndroid Build Coastguard Worker }
448*cfb92d14SAndroid Build Coastguard Worker 
otPlatEntropyGet(uint8_t * aOutput,uint16_t aOutputLength)449*cfb92d14SAndroid Build Coastguard Worker otError otPlatEntropyGet(uint8_t *aOutput, uint16_t aOutputLength)
450*cfb92d14SAndroid Build Coastguard Worker {
451*cfb92d14SAndroid Build Coastguard Worker     for (uint16_t length = 0; length < aOutputLength; length++)
452*cfb92d14SAndroid Build Coastguard Worker     {
453*cfb92d14SAndroid Build Coastguard Worker         aOutput[length] = (uint8_t)rand();
454*cfb92d14SAndroid Build Coastguard Worker     }
455*cfb92d14SAndroid Build Coastguard Worker 
456*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_NONE;
457*cfb92d14SAndroid Build Coastguard Worker }
458*cfb92d14SAndroid Build Coastguard Worker 
otPlatSettingsInit(otInstance * aInstance,const uint16_t * aSensitiveKeys,uint16_t aSensitiveKeysLength)459*cfb92d14SAndroid Build Coastguard Worker void otPlatSettingsInit(otInstance *aInstance, const uint16_t *aSensitiveKeys, uint16_t aSensitiveKeysLength)
460*cfb92d14SAndroid Build Coastguard Worker {
461*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
462*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aSensitiveKeys);
463*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aSensitiveKeysLength);
464*cfb92d14SAndroid Build Coastguard Worker }
465*cfb92d14SAndroid Build Coastguard Worker 
otPlatSettingsDeinit(otInstance * aInstance)466*cfb92d14SAndroid Build Coastguard Worker void otPlatSettingsDeinit(otInstance *aInstance) { OT_UNUSED_VARIABLE(aInstance); }
467*cfb92d14SAndroid Build Coastguard Worker 
otPlatSettingsGet(otInstance * aInstance,uint16_t aKey,int aIndex,uint8_t * aValue,uint16_t * aValueLength)468*cfb92d14SAndroid Build Coastguard Worker otError otPlatSettingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint8_t *aValue, uint16_t *aValueLength)
469*cfb92d14SAndroid Build Coastguard Worker {
470*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
471*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aKey);
472*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aIndex);
473*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aValue);
474*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aValueLength);
475*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_NOT_FOUND;
476*cfb92d14SAndroid Build Coastguard Worker }
477*cfb92d14SAndroid Build Coastguard Worker 
otPlatSettingsSet(otInstance * aInstance,uint16_t aKey,const uint8_t * aValue,uint16_t aValueLength)478*cfb92d14SAndroid Build Coastguard Worker otError otPlatSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength)
479*cfb92d14SAndroid Build Coastguard Worker {
480*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
481*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aKey);
482*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aValue);
483*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aValueLength);
484*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_NONE;
485*cfb92d14SAndroid Build Coastguard Worker }
486*cfb92d14SAndroid Build Coastguard Worker 
otPlatSettingsAdd(otInstance * aInstance,uint16_t aKey,const uint8_t * aValue,uint16_t aValueLength)487*cfb92d14SAndroid Build Coastguard Worker otError otPlatSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength)
488*cfb92d14SAndroid Build Coastguard Worker {
489*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
490*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aKey);
491*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aValue);
492*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aValueLength);
493*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_NONE;
494*cfb92d14SAndroid Build Coastguard Worker }
495*cfb92d14SAndroid Build Coastguard Worker 
otPlatSettingsDelete(otInstance * aInstance,uint16_t aKey,int aIndex)496*cfb92d14SAndroid Build Coastguard Worker otError otPlatSettingsDelete(otInstance *aInstance, uint16_t aKey, int aIndex)
497*cfb92d14SAndroid Build Coastguard Worker {
498*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
499*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aKey);
500*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aIndex);
501*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_NONE;
502*cfb92d14SAndroid Build Coastguard Worker }
503*cfb92d14SAndroid Build Coastguard Worker 
otPlatSettingsWipe(otInstance * aInstance)504*cfb92d14SAndroid Build Coastguard Worker void otPlatSettingsWipe(otInstance *aInstance) { OT_UNUSED_VARIABLE(aInstance); }
505*cfb92d14SAndroid Build Coastguard Worker 
otPlatDiagSetOutputCallback(otInstance * aInstance,otPlatDiagOutputCallback aCallback,void * aContext)506*cfb92d14SAndroid Build Coastguard Worker void otPlatDiagSetOutputCallback(otInstance *aInstance, otPlatDiagOutputCallback aCallback, void *aContext)
507*cfb92d14SAndroid Build Coastguard Worker {
508*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
509*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aCallback);
510*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aContext);
511*cfb92d14SAndroid Build Coastguard Worker }
512*cfb92d14SAndroid Build Coastguard Worker 
otPlatDiagProcess(otInstance * aInstance,uint8_t aArgsLength,char * aArgs[])513*cfb92d14SAndroid Build Coastguard Worker otError otPlatDiagProcess(otInstance *aInstance, uint8_t aArgsLength, char *aArgs[])
514*cfb92d14SAndroid Build Coastguard Worker {
515*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
516*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aArgsLength);
517*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aArgs);
518*cfb92d14SAndroid Build Coastguard Worker 
519*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_INVALID_COMMAND;
520*cfb92d14SAndroid Build Coastguard Worker }
521*cfb92d14SAndroid Build Coastguard Worker 
otPlatDiagModeSet(bool aMode)522*cfb92d14SAndroid Build Coastguard Worker void otPlatDiagModeSet(bool aMode) { OT_UNUSED_VARIABLE(aMode); }
523*cfb92d14SAndroid Build Coastguard Worker 
otPlatDiagModeGet(void)524*cfb92d14SAndroid Build Coastguard Worker bool otPlatDiagModeGet(void) { return false; }
525*cfb92d14SAndroid Build Coastguard Worker 
otPlatDiagChannelSet(uint8_t aChannel)526*cfb92d14SAndroid Build Coastguard Worker void otPlatDiagChannelSet(uint8_t aChannel) { OT_UNUSED_VARIABLE(aChannel); }
527*cfb92d14SAndroid Build Coastguard Worker 
otPlatDiagTxPowerSet(int8_t aTxPower)528*cfb92d14SAndroid Build Coastguard Worker void otPlatDiagTxPowerSet(int8_t aTxPower) { OT_UNUSED_VARIABLE(aTxPower); }
529*cfb92d14SAndroid Build Coastguard Worker 
otPlatDiagRadioReceived(otInstance * aInstance,otRadioFrame * aFrame,otError aError)530*cfb92d14SAndroid Build Coastguard Worker void otPlatDiagRadioReceived(otInstance *aInstance, otRadioFrame *aFrame, otError aError)
531*cfb92d14SAndroid Build Coastguard Worker {
532*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
533*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aFrame);
534*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aError);
535*cfb92d14SAndroid Build Coastguard Worker }
536*cfb92d14SAndroid Build Coastguard Worker 
otPlatDiagAlarmCallback(otInstance * aInstance)537*cfb92d14SAndroid Build Coastguard Worker void otPlatDiagAlarmCallback(otInstance *aInstance) { OT_UNUSED_VARIABLE(aInstance); }
538*cfb92d14SAndroid Build Coastguard Worker 
otPlatDnssdGetState(otInstance * aInstance)539*cfb92d14SAndroid Build Coastguard Worker otPlatDnssdState otPlatDnssdGetState(otInstance *aInstance)
540*cfb92d14SAndroid Build Coastguard Worker {
541*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
542*cfb92d14SAndroid Build Coastguard Worker 
543*cfb92d14SAndroid Build Coastguard Worker     return OT_PLAT_DNSSD_STOPPED;
544*cfb92d14SAndroid Build Coastguard Worker }
545*cfb92d14SAndroid Build Coastguard Worker 
otPlatDnssdRegisterService(otInstance * aInstance,const otPlatDnssdService * aService,otPlatDnssdRequestId aRequestId,otPlatDnssdRegisterCallback aCallback)546*cfb92d14SAndroid Build Coastguard Worker void otPlatDnssdRegisterService(otInstance                 *aInstance,
547*cfb92d14SAndroid Build Coastguard Worker                                 const otPlatDnssdService   *aService,
548*cfb92d14SAndroid Build Coastguard Worker                                 otPlatDnssdRequestId        aRequestId,
549*cfb92d14SAndroid Build Coastguard Worker                                 otPlatDnssdRegisterCallback aCallback)
550*cfb92d14SAndroid Build Coastguard Worker {
551*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
552*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aService);
553*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aRequestId);
554*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aCallback);
555*cfb92d14SAndroid Build Coastguard Worker }
556*cfb92d14SAndroid Build Coastguard Worker 
otPlatDnssdUnregisterService(otInstance * aInstance,const otPlatDnssdService * aService,otPlatDnssdRequestId aRequestId,otPlatDnssdRegisterCallback aCallback)557*cfb92d14SAndroid Build Coastguard Worker void otPlatDnssdUnregisterService(otInstance                 *aInstance,
558*cfb92d14SAndroid Build Coastguard Worker                                   const otPlatDnssdService   *aService,
559*cfb92d14SAndroid Build Coastguard Worker                                   otPlatDnssdRequestId        aRequestId,
560*cfb92d14SAndroid Build Coastguard Worker                                   otPlatDnssdRegisterCallback aCallback)
561*cfb92d14SAndroid Build Coastguard Worker {
562*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
563*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aService);
564*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aRequestId);
565*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aCallback);
566*cfb92d14SAndroid Build Coastguard Worker }
567*cfb92d14SAndroid Build Coastguard Worker 
otPlatDnssdRegisterHost(otInstance * aInstance,const otPlatDnssdHost * aHost,otPlatDnssdRequestId aRequestId,otPlatDnssdRegisterCallback aCallback)568*cfb92d14SAndroid Build Coastguard Worker void otPlatDnssdRegisterHost(otInstance                 *aInstance,
569*cfb92d14SAndroid Build Coastguard Worker                              const otPlatDnssdHost      *aHost,
570*cfb92d14SAndroid Build Coastguard Worker                              otPlatDnssdRequestId        aRequestId,
571*cfb92d14SAndroid Build Coastguard Worker                              otPlatDnssdRegisterCallback aCallback)
572*cfb92d14SAndroid Build Coastguard Worker {
573*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
574*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aHost);
575*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aRequestId);
576*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aCallback);
577*cfb92d14SAndroid Build Coastguard Worker }
578*cfb92d14SAndroid Build Coastguard Worker 
otPlatDnssdUnregisterHost(otInstance * aInstance,const otPlatDnssdHost * aHost,otPlatDnssdRequestId aRequestId,otPlatDnssdRegisterCallback aCallback)579*cfb92d14SAndroid Build Coastguard Worker void otPlatDnssdUnregisterHost(otInstance                 *aInstance,
580*cfb92d14SAndroid Build Coastguard Worker                                const otPlatDnssdHost      *aHost,
581*cfb92d14SAndroid Build Coastguard Worker                                otPlatDnssdRequestId        aRequestId,
582*cfb92d14SAndroid Build Coastguard Worker                                otPlatDnssdRegisterCallback aCallback)
583*cfb92d14SAndroid Build Coastguard Worker {
584*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
585*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aHost);
586*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aRequestId);
587*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aCallback);
588*cfb92d14SAndroid Build Coastguard Worker }
589*cfb92d14SAndroid Build Coastguard Worker 
otPlatDnssdRegisterKey(otInstance * aInstance,const otPlatDnssdKey * aKey,otPlatDnssdRequestId aRequestId,otPlatDnssdRegisterCallback aCallback)590*cfb92d14SAndroid Build Coastguard Worker void otPlatDnssdRegisterKey(otInstance                 *aInstance,
591*cfb92d14SAndroid Build Coastguard Worker                             const otPlatDnssdKey       *aKey,
592*cfb92d14SAndroid Build Coastguard Worker                             otPlatDnssdRequestId        aRequestId,
593*cfb92d14SAndroid Build Coastguard Worker                             otPlatDnssdRegisterCallback aCallback)
594*cfb92d14SAndroid Build Coastguard Worker {
595*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
596*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aKey);
597*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aRequestId);
598*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aCallback);
599*cfb92d14SAndroid Build Coastguard Worker }
600*cfb92d14SAndroid Build Coastguard Worker 
otPlatDnssdUnregisterKey(otInstance * aInstance,const otPlatDnssdKey * aKey,otPlatDnssdRequestId aRequestId,otPlatDnssdRegisterCallback aCallback)601*cfb92d14SAndroid Build Coastguard Worker void otPlatDnssdUnregisterKey(otInstance                 *aInstance,
602*cfb92d14SAndroid Build Coastguard Worker                               const otPlatDnssdKey       *aKey,
603*cfb92d14SAndroid Build Coastguard Worker                               otPlatDnssdRequestId        aRequestId,
604*cfb92d14SAndroid Build Coastguard Worker                               otPlatDnssdRegisterCallback aCallback)
605*cfb92d14SAndroid Build Coastguard Worker {
606*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
607*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aKey);
608*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aRequestId);
609*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aCallback);
610*cfb92d14SAndroid Build Coastguard Worker }
611*cfb92d14SAndroid Build Coastguard Worker 
otPlatMdnsSetListeningEnabled(otInstance * aInstance,bool aEnable,uint32_t aInfraIfIndex)612*cfb92d14SAndroid Build Coastguard Worker otError otPlatMdnsSetListeningEnabled(otInstance *aInstance, bool aEnable, uint32_t aInfraIfIndex)
613*cfb92d14SAndroid Build Coastguard Worker {
614*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
615*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aEnable);
616*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInfraIfIndex);
617*cfb92d14SAndroid Build Coastguard Worker 
618*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_NOT_IMPLEMENTED;
619*cfb92d14SAndroid Build Coastguard Worker }
620*cfb92d14SAndroid Build Coastguard Worker 
otPlatMdnsSendMulticast(otInstance * aInstance,otMessage * aMessage,uint32_t aInfraIfIndex)621*cfb92d14SAndroid Build Coastguard Worker void otPlatMdnsSendMulticast(otInstance *aInstance, otMessage *aMessage, uint32_t aInfraIfIndex)
622*cfb92d14SAndroid Build Coastguard Worker {
623*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
624*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aMessage);
625*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInfraIfIndex);
626*cfb92d14SAndroid Build Coastguard Worker }
627*cfb92d14SAndroid Build Coastguard Worker 
otPlatMdnsSendUnicast(otInstance * aInstance,otMessage * aMessage,const otPlatMdnsAddressInfo * aAddress)628*cfb92d14SAndroid Build Coastguard Worker void otPlatMdnsSendUnicast(otInstance *aInstance, otMessage *aMessage, const otPlatMdnsAddressInfo *aAddress)
629*cfb92d14SAndroid Build Coastguard Worker {
630*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInstance);
631*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aMessage);
632*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aAddress);
633*cfb92d14SAndroid Build Coastguard Worker }
634*cfb92d14SAndroid Build Coastguard Worker 
otPlatInfraIfHasAddress(uint32_t aInfraIfIndex,const otIp6Address * aAddress)635*cfb92d14SAndroid Build Coastguard Worker bool otPlatInfraIfHasAddress(uint32_t aInfraIfIndex, const otIp6Address *aAddress)
636*cfb92d14SAndroid Build Coastguard Worker {
637*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInfraIfIndex);
638*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aAddress);
639*cfb92d14SAndroid Build Coastguard Worker 
640*cfb92d14SAndroid Build Coastguard Worker     return false;
641*cfb92d14SAndroid Build Coastguard Worker }
642*cfb92d14SAndroid Build Coastguard Worker 
otPlatInfraIfSendIcmp6Nd(uint32_t aInfraIfIndex,const otIp6Address * aDestAddress,const uint8_t * aBuffer,uint16_t aBufferLength)643*cfb92d14SAndroid Build Coastguard Worker otError otPlatInfraIfSendIcmp6Nd(uint32_t            aInfraIfIndex,
644*cfb92d14SAndroid Build Coastguard Worker                                  const otIp6Address *aDestAddress,
645*cfb92d14SAndroid Build Coastguard Worker                                  const uint8_t      *aBuffer,
646*cfb92d14SAndroid Build Coastguard Worker                                  uint16_t            aBufferLength)
647*cfb92d14SAndroid Build Coastguard Worker {
648*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInfraIfIndex);
649*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aDestAddress);
650*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aBuffer);
651*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aBufferLength);
652*cfb92d14SAndroid Build Coastguard Worker 
653*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_FAILED;
654*cfb92d14SAndroid Build Coastguard Worker }
655*cfb92d14SAndroid Build Coastguard Worker 
otPlatInfraIfDiscoverNat64Prefix(uint32_t aInfraIfIndex)656*cfb92d14SAndroid Build Coastguard Worker otError otPlatInfraIfDiscoverNat64Prefix(uint32_t aInfraIfIndex)
657*cfb92d14SAndroid Build Coastguard Worker {
658*cfb92d14SAndroid Build Coastguard Worker     OT_UNUSED_VARIABLE(aInfraIfIndex);
659*cfb92d14SAndroid Build Coastguard Worker 
660*cfb92d14SAndroid Build Coastguard Worker     return OT_ERROR_FAILED;
661*cfb92d14SAndroid Build Coastguard Worker }
662*cfb92d14SAndroid Build Coastguard Worker 
663*cfb92d14SAndroid Build Coastguard Worker } // extern "C"
664