Merge branch 'bugfix/esp32h2_iperf_set_dest_ip6_addr_bugs' into 'master'

openthread: fix iperf get dest_ip6_addr

See merge request espressif/esp-idf!15577
This commit is contained in:
Shu Chen
2021-11-03 02:57:02 +00:00
15 changed files with 171 additions and 105 deletions

View File

@@ -1,10 +1,15 @@
/* OpenThread Border Router Example /*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
This example code is in the Public Domain (or CC0 licensed, at your option.) *
* SPDX-License-Identifier: CC0
Unless required by applicable law or agreed to in writing, this *
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * OpenThread Border Router Example
CONDITIONS OF ANY KIND, either express or implied. *
* This example code is in the Public Domain (or CC0 licensed, at your option.)
*
* Unless required by applicable law or agreed to in writing, this
* software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include <stdio.h> #include <stdio.h>

View File

@@ -1,10 +1,15 @@
/* OpenThread Border Router Example /*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
This example code is in the Public Domain (or CC0 licensed, at your option.) *
* SPDX-License-Identifier: CC0
Unless required by applicable law or agreed to in writing, this *
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * OpenThread Border Router Example
CONDITIONS OF ANY KIND, either express or implied. *
* This example code is in the Public Domain (or CC0 licensed, at your option.)
*
* Unless required by applicable law or agreed to in writing, this
* software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once

View File

@@ -1,10 +1,15 @@
/* OpenThread Command Line Example /*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
This example code is in the Public Domain (or CC0 licensed, at your option.) *
* SPDX-License-Identifier: CC0
Unless required by applicable law or agreed to in writing, this *
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * OpenThread Command Line Example
CONDITIONS OF ANY KIND, either express or implied. *
* This example code is in the Public Domain (or CC0 licensed, at your option.)
*
* Unless required by applicable law or agreed to in writing, this
* software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include <stdio.h> #include <stdio.h>

View File

@@ -1,10 +1,15 @@
/* OpenThread Command Line Example /*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
This example code is in the Public Domain (or CC0 licensed, at your option.) *
* SPDX-License-Identifier: CC0
Unless required by applicable law or agreed to in writing, this *
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * OpenThread Command Line Example
CONDITIONS OF ANY KIND, either express or implied. *
* This example code is in the Public Domain (or CC0 licensed, at your option.)
*
* Unless required by applicable law or agreed to in writing, this
* software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "esp_openthread.h" #include "esp_openthread.h"

View File

@@ -1,10 +1,15 @@
/* OpenThread Command Line Example /*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
This example code is in the Public Domain (or CC0 licensed, at your option.) *
* SPDX-License-Identifier: CC0
Unless required by applicable law or agreed to in writing, this *
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * OpenThread Command Line Example
CONDITIONS OF ANY KIND, either express or implied. *
* This example code is in the Public Domain (or CC0 licensed, at your option.)
*
* Unless required by applicable law or agreed to in writing, this
* software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once

View File

@@ -1,10 +1,15 @@
/* OpenThread Command Line Example /*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
This example code is in the Public Domain (or CC0 licensed, at your option.) *
* SPDX-License-Identifier: CC0
Unless required by applicable law or agreed to in writing, this *
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * OpenThread Command Line Example
CONDITIONS OF ANY KIND, either express or implied. *
* This example code is in the Public Domain (or CC0 licensed, at your option.)
*
* Unless required by applicable law or agreed to in writing, this
* software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once

View File

@@ -1,10 +1,15 @@
/* OpenThread Command Line Example /*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
This example code is in the Public Domain (or CC0 licensed, at your option.) *
* SPDX-License-Identifier: CC0
Unless required by applicable law or agreed to in writing, this *
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * OpenThread Command Line Example
CONDITIONS OF ANY KIND, either express or implied. *
* This example code is in the Public Domain (or CC0 licensed, at your option.)
*
* Unless required by applicable law or agreed to in writing, this
* software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "esp_check.h" #include "esp_check.h"
@@ -17,6 +22,7 @@
#include <string.h> #include <string.h>
#define TAG "ot-iperf" #define TAG "ot-iperf"
static char s_dest_ip6_addr[50];
void esp_ot_process_iperf(void *aContext, uint8_t aArgsLength, char *aArgs[]) void esp_ot_process_iperf(void *aContext, uint8_t aArgsLength, char *aArgs[])
{ {
@@ -48,7 +54,8 @@ void esp_ot_process_iperf(void *aContext, uint8_t aArgsLength, char *aArgs[])
IPERF_FLAG_SET(cfg.flag, IPERF_FLAG_CLIENT); IPERF_FLAG_SET(cfg.flag, IPERF_FLAG_CLIENT);
IPERF_FLAG_CLR(cfg.flag, IPERF_FLAG_SERVER); IPERF_FLAG_CLR(cfg.flag, IPERF_FLAG_SERVER);
i++; i++;
cfg.destination_ip6 = aArgs[i]; strcpy(s_dest_ip6_addr, aArgs[i]);
cfg.destination_ip6 = s_dest_ip6_addr;
otCliOutputFormat("ip:%s\n", cfg.destination_ip6); otCliOutputFormat("ip:%s\n", cfg.destination_ip6);
} else if (strcmp(aArgs[i], "-s") == 0) { } else if (strcmp(aArgs[i], "-s") == 0) {
IPERF_FLAG_SET(cfg.flag, IPERF_FLAG_SERVER); IPERF_FLAG_SET(cfg.flag, IPERF_FLAG_SERVER);

View File

@@ -1,10 +1,15 @@
/* OpenThread Command Line Example /*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
This example code is in the Public Domain (or CC0 licensed, at your option.) *
* SPDX-License-Identifier: CC0
Unless required by applicable law or agreed to in writing, this *
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * OpenThread Command Line Example
CONDITIONS OF ANY KIND, either express or implied. *
* This example code is in the Public Domain (or CC0 licensed, at your option.)
*
* Unless required by applicable law or agreed to in writing, this
* software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once

View File

@@ -1,10 +1,15 @@
/* OpenThread Command Line Example /*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
This example code is in the Public Domain (or CC0 licensed, at your option.) *
* SPDX-License-Identifier: CC0
Unless required by applicable law or agreed to in writing, this *
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * OpenThread Command Line Example
CONDITIONS OF ANY KIND, either express or implied. *
* This example code is in the Public Domain (or CC0 licensed, at your option.)
*
* Unless required by applicable law or agreed to in writing, this
* software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "esp_check.h" #include "esp_check.h"

View File

@@ -1,10 +1,15 @@
/* OpenThread Command Line Example /*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
This example code is in the Public Domain (or CC0 licensed, at your option.) *
* SPDX-License-Identifier: CC0
Unless required by applicable law or agreed to in writing, this *
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * OpenThread Command Line Example
CONDITIONS OF ANY KIND, either express or implied. *
* This example code is in the Public Domain (or CC0 licensed, at your option.)
*
* Unless required by applicable law or agreed to in writing, this
* software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once

View File

@@ -1,10 +1,15 @@
/* OpenThread Command Line Example /*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
This example code is in the Public Domain (or CC0 licensed, at your option.) *
* SPDX-License-Identifier: CC0
Unless required by applicable law or agreed to in writing, this *
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * OpenThread Command Line Example
CONDITIONS OF ANY KIND, either express or implied. *
* This example code is in the Public Domain (or CC0 licensed, at your option.)
*
* Unless required by applicable law or agreed to in writing, this
* software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include "esp_check.h" #include "esp_check.h"

View File

@@ -1,10 +1,15 @@
/* OpenThread Command Line Example /*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
This example code is in the Public Domain (or CC0 licensed, at your option.) *
* SPDX-License-Identifier: CC0
Unless required by applicable law or agreed to in writing, this *
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * OpenThread Command Line Example
CONDITIONS OF ANY KIND, either express or implied. *
* This example code is in the Public Domain (or CC0 licensed, at your option.)
*
* Unless required by applicable law or agreed to in writing, this
* software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once

View File

@@ -1,10 +1,15 @@
/* OpenThread RCP Example /*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
This example code is in the Public Domain (or CC0 licensed, at your option.) *
* SPDX-License-Identifier: CC0
Unless required by applicable law or agreed to in writing, this *
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * OpenThread Radio Co-Processor (RCP) Example
CONDITIONS OF ANY KIND, either express or implied. *
* This example code is in the Public Domain (or CC0 licensed, at your option.)
*
* Unless required by applicable law or agreed to in writing, this
* software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied.
*/ */
#pragma once #pragma once

View File

@@ -1,10 +1,15 @@
/* OpenThread RCP Example /*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
This example code is in the Public Domain (or CC0 licensed, at your option.) *
* SPDX-License-Identifier: CC0
Unless required by applicable law or agreed to in writing, this *
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * OpenThread Radio Co-Processor (RCP) Example
CONDITIONS OF ANY KIND, either express or implied. *
* This example code is in the Public Domain (or CC0 licensed, at your option.)
*
* Unless required by applicable law or agreed to in writing, this
* software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include <stdio.h> #include <stdio.h>

View File

@@ -3194,12 +3194,6 @@ examples/network/simple_sniffer/components/pcap/pcap.h
examples/network/simple_sniffer/main/cmd_sniffer.c examples/network/simple_sniffer/main/cmd_sniffer.c
examples/network/simple_sniffer/main/cmd_sniffer.h examples/network/simple_sniffer/main/cmd_sniffer.h
examples/network/simple_sniffer/main/simple_sniffer_example_main.c examples/network/simple_sniffer/main/simple_sniffer_example_main.c
examples/openthread/ot_br/main/esp_ot_br.c
examples/openthread/ot_br/main/esp_ot_config.h
examples/openthread/ot_cli/main/esp_ot_cli.c
examples/openthread/ot_cli/main/esp_ot_config.h
examples/openthread/ot_rcp/main/esp_ot_config.h
examples/openthread/ot_rcp/main/esp_ot_rcp.c
examples/peripherals/adc/esp32c3/adc/main/adc_dma_example_main.c examples/peripherals/adc/esp32c3/adc/main/adc_dma_example_main.c
examples/peripherals/adc/single_read/adc/main/adc1_example_main.c examples/peripherals/adc/single_read/adc/main/adc1_example_main.c
examples/peripherals/adc/single_read/adc2/main/adc2_example_main.c examples/peripherals/adc/single_read/adc2/main/adc2_example_main.c