You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
FreeRTOS/FreeRTOS-Plus/VisualStudio_StaticProjects/FreeRTOS+TCP/NetworkInterface_WinPCap.c

981 lines
39 KiB
C

FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
/*
* FreeRTOS V202212.00
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* https://www.FreeRTOS.org
* https://github.com/FreeRTOS
*
*/
#include <stdlib.h>
/* WinPCap includes. */
#define HAVE_REMOTE
#include "pcap.h"
/* FreeRTOS includes. */
#include "FreeRTOS.h"
#include "task.h"
#include "semphr.h"
/* FreeRTOS+TCP includes. */
#include "FreeRTOS_IP.h"
#include "FreeRTOS_IP_Private.h"
#include "NetworkBufferManagement.h"
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
#include "FreeRTOS_Routing.h"
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
/* Thread-safe circular buffers are being used to pass data to and from the PCAP
* access functions. */
#include "Win32-Extensions.h"
#include "FreeRTOS_Stream_Buffer.h"
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
/* Sizes of the thread safe circular buffers used to pass data to and from the
* WinPCAP Windows threads. */
#define xSEND_BUFFER_SIZE 32768
#define xRECV_BUFFER_SIZE 32768
/* If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 1, then the Ethernet
* driver will filter incoming packets and only pass the stack those packets it
* considers need processing. */
#if ( ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES == 0 )
#define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eProcessBuffer
#else
#define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eConsiderFrameForProcessing( ( pucEthernetBuffer ) )
#endif
/* Used to insert test code only. */
#define niDISRUPT_PACKETS 0
/*-----------------------------------------------------------*/
/*
* Windows threads that are outside of the control of the FreeRTOS simulator are
* used to interface with the WinPCAP libraries.
*/
DWORD WINAPI prvWinPcapRecvThread( void * pvParam );
DWORD WINAPI prvWinPcapSendThread( void * pvParam );
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
/*
* A pointer to the network interface is needed later when receiving packets.
*/
static NetworkInterface_t * pxMyInterface;
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
/*
* Print out a numbered list of network interfaces that are available on the
* host computer.
*/
static pcap_if_t * prvPrintAvailableNetworkInterfaces( void );
/*
* Open the network interface. The number of the interface to be opened is set
* by the configNETWORK_INTERFACE_TO_USE constant in FreeRTOSConfig.h.
*/
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
static void prvOpenSelectedNetworkInterface( pcap_if_t * pxAllNetworkInterfaces,
const NetworkInterface_t * pxInterface );
static int prvOpenInterface( const char * pucName,
const NetworkInterface_t * pxInterface );
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
/*
* Configure the capture filter to allow blocking reads, and to filter out
* packets that are not of interest to this demo.
*/
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
static void prvConfigureCaptureBehaviour( const NetworkInterface_t * pxInterface );
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
/*
* A function that simulates Ethernet interrupts by periodically polling the
* WinPCap interface for new data.
*/
static void prvInterruptSimulatorTask( void * pvParameters );
/*
* Create the buffers that are used to pass data between the FreeRTOS simulator
* and the Win32 threads that manage WinPCAP.
*/
static void prvCreateThreadSafeBuffers( void );
/*
* This function is equivalent to uxStreamBufferAdd from
* FreeRTOS_Stream_Buffer.c in the case that the stream buffer is being used
* as a normal circular buffer (i.e. only the tail and head pointers are
* needed). Thus, this function does not take the offset argument, and does not
* update the front pointer of the stream buffer. This allows the removal of
* the calls to vTaskSuspendAll and xTaskResumeAll, as the head and front
* pointer no longer need to be atomically updated, allowing this function to be
* safely used by a Windows thread.
*/
static size_t prvStreamBufferAdd( StreamBuffer_t * pxBuffer,
const uint8_t * pucData,
size_t uxByteCount );
/*
* Utility function used to format print messages only.
*/
static const char * prvRemoveSpaces( char * pcBuffer,
int aBuflen,
const char * pcMessage );
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
/*
* This function will return pdTRUE if the packet is targeted at
* the MAC address of this device, in other words when is was bounced-
* back by the WinPCap interface.
*/
static BaseType_t xPacketBouncedBack( const uint8_t * pucBuffer );
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
/*-----------------------------------------------------------*/
/* Required by the WinPCap library. */
static char cErrorBuffer[ PCAP_ERRBUF_SIZE ];
/* An event used to wake up the Win32 thread that sends data through the WinPCAP
* library. */
static void * pvSendEvent = NULL;
/* _HT_ made the PCAP interface number configurable through the program's
* parameters in order to test in different machines. */
static BaseType_t xConfigNetworkInterfaceToUse = configNETWORK_INTERFACE_TO_USE;
/* Handles to the Windows threads that handle the PCAP IO. */
static HANDLE vWinPcapRecvThreadHandle = NULL;
static HANDLE vWinPcapSendThreadHandle = NULL;
/* The interface being used by WinPCap. */
static pcap_t * pxOpenedInterfaceHandle = NULL;
/* Circular buffers used by the PCAP Win32 threads. */
static StreamBuffer_t * xSendBuffer = NULL;
static StreamBuffer_t * xRecvBuffer = NULL;
/* Logs the number of WinPCAP send failures, for viewing in the debugger only. */
static volatile uint32_t ulWinPCAPSendFailures = 0;
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
/*-----------------------------------------------------------*/
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
static BaseType_t xWinPcap_NetworkInterfaceInitialise( NetworkInterface_t * pxInterface );
static BaseType_t xWinPcap_NetworkInterfaceOutput( NetworkInterface_t * pxInterface,
NetworkBufferDescriptor_t * const pxNetworkBuffer,
BaseType_t bReleaseAfterSend );
static BaseType_t xWinPcap_GetPhyLinkStatus( NetworkInterface_t * pxInterface );
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
NetworkInterface_t * pxWinPcap_FillInterfaceDescriptor( BaseType_t xEMACIndex,
NetworkInterface_t * pxInterface );
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
/*-----------------------------------------------------------*/
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
static BaseType_t xWinPcap_NetworkInterfaceInitialise( NetworkInterface_t * pxInterface )
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
{
BaseType_t xReturn = pdFALSE;
pcap_if_t * pxAllNetworkInterfaces;
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
( void ) pxInterface;
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
/* Query the computer the simulation is being executed on to find the
* network interfaces it has installed. */
pxAllNetworkInterfaces = prvPrintAvailableNetworkInterfaces();
/* Open the network interface. The number of the interface to be opened is
* set by the configNETWORK_INTERFACE_TO_USE constant in FreeRTOSConfig.h.
* Calling this function will set the pxOpenedInterfaceHandle variable. If,
* after calling this function, pxOpenedInterfaceHandle is equal to NULL, then
* the interface could not be opened. */
if( pxAllNetworkInterfaces != NULL )
{
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
prvOpenSelectedNetworkInterface( pxAllNetworkInterfaces, pxInterface );
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
}
if( pxOpenedInterfaceHandle != NULL )
{
xReturn = pdPASS;
}
return xReturn;
}
/*-----------------------------------------------------------*/
static void prvCreateThreadSafeBuffers( void )
{
/* The buffer used to pass data to be transmitted from a FreeRTOS task to
* the Win32 thread that sends via the WinPCAP library. */
if( xSendBuffer == NULL )
{
xSendBuffer = ( StreamBuffer_t * ) malloc( sizeof( *xSendBuffer ) - sizeof( xSendBuffer->ucArray ) + xSEND_BUFFER_SIZE + 1 );
configASSERT( xSendBuffer );
memset( xSendBuffer, '\0', sizeof( *xSendBuffer ) - sizeof( xSendBuffer->ucArray ) );
xSendBuffer->LENGTH = xSEND_BUFFER_SIZE + 1;
}
/* The buffer used to pass received data from the Win32 thread that receives
* via the WinPCAP library to the FreeRTOS task. */
if( xRecvBuffer == NULL )
{
xRecvBuffer = ( StreamBuffer_t * ) malloc( sizeof( *xRecvBuffer ) - sizeof( xRecvBuffer->ucArray ) + xRECV_BUFFER_SIZE + 1 );
configASSERT( xRecvBuffer );
memset( xRecvBuffer, '\0', sizeof( *xRecvBuffer ) - sizeof( xRecvBuffer->ucArray ) );
xRecvBuffer->LENGTH = xRECV_BUFFER_SIZE + 1;
}
}
/*-----------------------------------------------------------*/
static size_t prvStreamBufferAdd( StreamBuffer_t * pxBuffer,
const uint8_t * pucData,
size_t uxByteCount )
{
size_t uxSpace, uxNextHead, uxFirst;
size_t uxCount = uxByteCount;
uxSpace = uxStreamBufferGetSpace( pxBuffer );
/* The number of bytes that can be written is the minimum of the number of
* bytes requested and the number available. */
uxCount = FreeRTOS_min_size_t( uxSpace, uxCount );
if( uxCount != 0U )
{
uxNextHead = pxBuffer->uxHead;
if( pucData != NULL )
{
/* Calculate the number of bytes that can be added in the first
* write - which may be less than the total number of bytes that need
* to be added if the buffer will wrap back to the beginning. */
uxFirst = FreeRTOS_min_size_t( pxBuffer->LENGTH - uxNextHead, uxCount );
/* Write as many bytes as can be written in the first write. */
( void ) memcpy( &( pxBuffer->ucArray[ uxNextHead ] ), pucData, uxFirst );
/* If the number of bytes written was less than the number that
* could be written in the first write... */
if( uxCount > uxFirst )
{
/* ...then write the remaining bytes to the start of the
* buffer. */
( void ) memcpy( pxBuffer->ucArray, &( pucData[ uxFirst ] ), uxCount - uxFirst );
}
}
uxNextHead += uxCount;
if( uxNextHead >= pxBuffer->LENGTH )
{
uxNextHead -= pxBuffer->LENGTH;
}
pxBuffer->uxHead = uxNextHead;
}
return uxCount;
}
/*-----------------------------------------------------------*/
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
static BaseType_t xWinPcap_NetworkInterfaceOutput( NetworkInterface_t * pxInterface,
NetworkBufferDescriptor_t * const pxNetworkBuffer,
BaseType_t bReleaseAfterSend )
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
{
size_t xSpace;
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
( void ) pxInterface;
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
iptraceNETWORK_INTERFACE_TRANSMIT();
configASSERT( xIsCallingFromIPTask() == pdTRUE );
/* Both the length of the data being sent and the actual data being sent
* are placed in the thread safe buffer used to pass data between the FreeRTOS
* tasks and the Win32 thread that sends data via the WinPCAP library. Drop
* the packet if there is insufficient space in the buffer to hold both. */
xSpace = uxStreamBufferGetSpace( xSendBuffer );
if( ( pxNetworkBuffer->xDataLength <= ( ipconfigNETWORK_MTU + ipSIZE_OF_ETH_HEADER ) ) &&
( xSpace >= ( pxNetworkBuffer->xDataLength + sizeof( pxNetworkBuffer->xDataLength ) ) ) )
{
/* First write in the length of the data, then write in the data
* itself. */
uxStreamBufferAdd( xSendBuffer, 0, ( const uint8_t * ) &( pxNetworkBuffer->xDataLength ), sizeof( pxNetworkBuffer->xDataLength ) );
uxStreamBufferAdd( xSendBuffer, 0, ( const uint8_t * ) pxNetworkBuffer->pucEthernetBuffer, pxNetworkBuffer->xDataLength );
}
else
{
FreeRTOS_debug_printf( ( "xNetworkInterfaceOutput: send buffers full to store %lu\n", pxNetworkBuffer->xDataLength ) );
}
/* Kick the Tx task in either case in case it doesn't know the buffer is
* full. */
SetEvent( pvSendEvent );
/* The buffer has been sent so can be released. */
if( bReleaseAfterSend != pdFALSE )
{
vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer );
}
return pdPASS;
}
/*-----------------------------------------------------------*/
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
static BaseType_t xWinPcap_GetPhyLinkStatus( NetworkInterface_t * pxInterface )
{
BaseType_t xResult = pdFALSE;
( void ) pxInterface;
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
if( pxOpenedInterfaceHandle != NULL )
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
{
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
xResult = pdTRUE;
}
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
return xResult;
}
/*-----------------------------------------------------------*/
#if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 1 )
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
/* Do not call the following function directly. It is there for downward compatibility.
* The function FreeRTOS_IPInit() will call it to initialise the interface and end-point
* objects. See the description in FreeRTOS_Routing.h. */
NetworkInterface_t * pxFillInterfaceDescriptor( BaseType_t xEMACIndex,
NetworkInterface_t * pxInterface )
{
pxWinPcap_FillInterfaceDescriptor( xEMACIndex, pxInterface );
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
}
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
#endif
/*-----------------------------------------------------------*/
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
NetworkInterface_t * pxWinPcap_FillInterfaceDescriptor( BaseType_t xEMACIndex,
NetworkInterface_t * pxInterface )
{
static char pcName[ 17 ];
/* This function pxWinPcap_FillInterfaceDescriptor() adds a network-interface.
* Make sure that the object pointed to by 'pxInterface'
* is declared static or global, and that it will remain to exist. */
pxMyInterface = pxInterface;
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
snprintf( pcName, sizeof( pcName ), "eth%ld", xEMACIndex );
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
memset( pxInterface, '\0', sizeof( *pxInterface ) );
pxInterface->pcName = pcName; /* Just for logging, debugging. */
pxInterface->pvArgument = ( void * ) xEMACIndex; /* Has only meaning for the driver functions. */
pxInterface->pfInitialise = xWinPcap_NetworkInterfaceInitialise;
pxInterface->pfOutput = xWinPcap_NetworkInterfaceOutput;
pxInterface->pfGetPhyLinkStatus = xWinPcap_GetPhyLinkStatus;
FreeRTOS_AddNetworkInterface( pxInterface );
return pxInterface;
}
/*-----------------------------------------------------------*/
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
#ifdef configNETWORK_INTERFACE_TYPE_TO_USE
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
/* In earlier versions of this network interface,
* `configNETWORK_INTERFACE_TO_USE` indicated the interface
* sequence number to be used. On some laptops with dynamic
* adapters, the numbering of interfaces changes all the time.
* The new macro 'configNETWORK_INTERFACE_TYPE_TO_USE' can be
* used to define the name of the interface to use, e.g. "Realtek"
* Note that a sort of strcasestr() is used to find a match between
* an interface name and e.g. "Realtek".
*/
static BaseType_t xDesiredAdapter( const char * pcDescription )
{
size_t uxIndex;
size_t uxLength;
size_t uxKeyLength = strlen( configNETWORK_INTERFACE_TYPE_TO_USE );
BaseType_t xMatchFound = pdFALSE;
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
if( ( pcDescription != NULL ) && ( pcDescription[ 0 ] != 0 ) )
{
uxLength = strlen( pcDescription );
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
if( uxKeyLength <= uxLength )
{
for( uxIndex = 0U; ( uxIndex <= uxLength - uxKeyLength ) && ( xMatchFound == 0 ); uxIndex++ )
{
if( strncasecmp( configNETWORK_INTERFACE_TYPE_TO_USE, &( pcDescription[ uxIndex ] ), uxKeyLength ) == 0 )
{
xMatchFound = pdTRUE;
break;
}
}
}
}
return xMatchFound;
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
}
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
#endif /* ifdef configNETWORK_INTERFACE_TYPE_TO_USE */
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
/*-----------------------------------------------------------*/
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
static pcap_if_t * prvPrintAvailableNetworkInterfaces( void )
{
pcap_if_t * pxAllNetworkInterfaces = NULL, * xInterface;
int32_t lInterfaceNumber = 1;
char cBuffer[ 512 ];
static BaseType_t xInvalidInterfaceDetected = pdFALSE;
if( xInvalidInterfaceDetected == pdFALSE )
{
if( pcap_findalldevs_ex( PCAP_SRC_IF_STRING, NULL, &pxAllNetworkInterfaces, cErrorBuffer ) == -1 )
{
printf( "Could not obtain a list of network interfaces\n%s\n", cErrorBuffer );
pxAllNetworkInterfaces = NULL;
}
else
{
printf( "\r\n\r\nThe following network interfaces are available:\r\n\r\n" );
}
if( pxAllNetworkInterfaces != NULL )
{
/* Print out the list of network interfaces. The first in the list
* is interface '1', not interface '0'. */
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
for( xInterface = pxAllNetworkInterfaces; xInterface != NULL; xInterface = xInterface->next )
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
{
/* The descriptions of the devices can be full of spaces, clean them
* a little. printf() can only be used here because the network is not
* up yet - so no other network tasks will be running. */
printf( "Interface %d - %s\n", lInterfaceNumber, prvRemoveSpaces( cBuffer, sizeof( cBuffer ), xInterface->name ) );
printf( " (%s)\n", prvRemoveSpaces( cBuffer, sizeof( cBuffer ), xInterface->description ? xInterface->description : "No description" ) );
printf( "\n" );
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
#ifdef configNETWORK_INTERFACE_TYPE_TO_USE
{
if( xInterface->description != NULL )
{
if( xDesiredAdapter( xInterface->description ) )
{
printf( "The description of adapter %d matches with '%s'\n", lInterfaceNumber, configNETWORK_INTERFACE_TYPE_TO_USE );
xConfigNetworkInterfaceToUse = lInterfaceNumber;
}
}
}
#endif /* ifdef configNETWORK_INTERFACE_TYPE_TO_USE */
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
lInterfaceNumber++;
}
}
if( lInterfaceNumber == 1 )
{
/* The interface number was never incremented, so the above for() loop
* did not execute meaning no interfaces were found. */
printf( " \nNo network interfaces were found.\n" );
pxAllNetworkInterfaces = NULL;
}
printf( "\r\nThe interface that will be opened is set by " );
printf( "\"configNETWORK_INTERFACE_TO_USE\", which\r\nshould be defined in FreeRTOSConfig.h\r\n" );
if( ( xConfigNetworkInterfaceToUse < 1L ) || ( xConfigNetworkInterfaceToUse >= lInterfaceNumber ) )
{
printf( "\r\nERROR: configNETWORK_INTERFACE_TO_USE is set to %d, which is an invalid value.\r\n", xConfigNetworkInterfaceToUse );
printf( "Please set configNETWORK_INTERFACE_TO_USE to one of the interface numbers listed above,\r\n" );
printf( "then re-compile and re-start the application. Only Ethernet (as opposed to WiFi)\r\n" );
printf( "interfaces are supported.\r\n\r\nHALTING\r\n\r\n\r\n" );
xInvalidInterfaceDetected = pdTRUE;
if( pxAllNetworkInterfaces != NULL )
{
/* Free the device list, as no devices are going to be opened. */
pcap_freealldevs( pxAllNetworkInterfaces );
pxAllNetworkInterfaces = NULL;
}
}
else
{
printf( "Attempting to open interface number %d.\n", xConfigNetworkInterfaceToUse );
}
}
return pxAllNetworkInterfaces;
}
/*-----------------------------------------------------------*/
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
static int prvOpenInterface( const char * pucName,
const NetworkInterface_t * pxInterface )
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
{
static char pucInterfaceName[ 256 ];
if( pucName != NULL )
{
strncpy( pucInterfaceName, pucName, sizeof( pucInterfaceName ) );
}
pxOpenedInterfaceHandle = pcap_open( pucInterfaceName, /* The name of the selected interface. */
ipTOTAL_ETHERNET_FRAME_SIZE, /* The size of the packet to capture. */
PCAP_OPENFLAG_PROMISCUOUS, /* Open in promiscuous mode as the MAC and
* IP address is going to be "simulated", and
* not be the real MAC and IP address. This allows
* traffic to the simulated IP address to be routed
* to uIP, and traffic to the real IP address to be
* routed to the Windows TCP/IP stack. */
100,
NULL, /* No authentication is required as this is
* not a remote capture session. */
cErrorBuffer
);
if( pxOpenedInterfaceHandle == NULL )
{
printf( "\n%s is not supported by WinPcap and cannot be opened\n", pucInterfaceName );
return 1;
}
else
{
/* Configure the capture filter to allow blocking reads, and to filter
* out packets that are not of interest to this demo. */
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
prvConfigureCaptureBehaviour( pxInterface );
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
}
return 0;
}
/*-----------------------------------------------------------*/
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
static void prvOpenSelectedNetworkInterface( pcap_if_t * pxAllNetworkInterfaces,
const NetworkInterface_t * pxInterface )
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
{
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
pcap_if_t * pxPCAPInterface;
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
int32_t x;
/* Walk the list of devices until the selected device is located. */
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
pxPCAPInterface = pxAllNetworkInterfaces;
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
for( x = 0L; x < ( xConfigNetworkInterfaceToUse - 1L ); x++ )
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
{
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
pxPCAPInterface = pxPCAPInterface->next;
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
}
/* Open the selected interface. */
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
if( prvOpenInterface( pxPCAPInterface->name, pxInterface ) == 0 )
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
{
printf( "Successfully opened interface number %d.\n", x + 1 );
}
else
{
printf( "Failed to open interface number %d.\n", x + 1 );
}
/* The device list is no longer required. */
pcap_freealldevs( pxAllNetworkInterfaces );
}
/*-----------------------------------------------------------*/
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
static void prvConfigureCaptureBehaviour( const NetworkInterface_t * pxInterface )
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
{
struct bpf_program xFilterCode;
uint32_t ulNetMask;
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
const uint8_t * pucMAC;
NetworkEndPoint_t * pxEndPoint;
/* Find the MAC address of the very first end-point. */
pxEndPoint = FreeRTOS_FirstEndPoint( pxInterface );
/* Make sure that at least one end-point is defined. */
configASSERT( pxEndPoint != NULL );
pucMAC = pxEndPoint->xMACAddress.ucBytes;
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
/* Set up a filter so only the packets of interest are passed to the IP
* stack. cErrorBuffer is used for convenience to create the string. Don't
* confuse this with an error message. */
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
snprintf( cErrorBuffer, sizeof( cErrorBuffer ), "broadcast or multicast or ether host %x:%x:%x:%x:%x:%x",
pucMAC[ 0 ], pucMAC[ 1 ], pucMAC[ 2 ], pucMAC[ 3 ], pucMAC[ 4 ], pucMAC[ 5 ] );
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
ulNetMask = ( configNET_MASK3 << 24UL ) | ( configNET_MASK2 << 16UL ) | ( configNET_MASK1 << 8L ) | configNET_MASK0;
if( pcap_compile( pxOpenedInterfaceHandle, &xFilterCode, cErrorBuffer, 1, ulNetMask ) < 0 )
{
printf( "\nThe packet filter string is invalid\n" );
}
else
{
if( pcap_setfilter( pxOpenedInterfaceHandle, &xFilterCode ) < 0 )
{
printf( "\nAn error occurred setting the packet filter.\n" );
}
/* When pcap_compile() succeeds, it allocates memory for the memory pointed to by the bpf_program struct
* parameter.pcap_freecode() will free that memory. */
pcap_freecode( &xFilterCode );
}
/* Create the buffers used to pass packets between the FreeRTOS simulator
* and the Win32 threads that are handling WinPCAP. */
prvCreateThreadSafeBuffers();
if( pvSendEvent == NULL )
{
/* Create event used to signal the Win32 WinPCAP Tx thread. */
pvSendEvent = CreateEvent( NULL, FALSE, TRUE, NULL );
/* Create the Win32 thread that handles WinPCAP Rx. */
vWinPcapRecvThreadHandle = CreateThread(
NULL, /* Pointer to thread security attributes. */
0, /* Initial thread stack size, in bytes. */
prvWinPcapRecvThread, /* Pointer to thread function. */
NULL, /* Argument for new thread. */
0, /* Creation flags. */
NULL );
/* Use the cores that are not used by the FreeRTOS tasks. */
SetThreadAffinityMask( vWinPcapRecvThreadHandle, ~0x01u );
/* Create the Win32 thread that handlers WinPCAP Tx. */
vWinPcapSendThreadHandle = CreateThread(
NULL, /* Pointer to thread security attributes. */
0, /* initial thread stack size, in bytes. */
prvWinPcapSendThread, /* Pointer to thread function. */
NULL, /* Argument for new thread. */
0, /* Creation flags. */
NULL );
/* Use the cores that are not used by the FreeRTOS tasks. */
SetThreadAffinityMask( vWinPcapSendThreadHandle, ~0x01u );
/* Create a task that simulates an interrupt in a real system. This will
* block waiting for packets, then send a message to the IP task when data
* is available. */
xTaskCreate( prvInterruptSimulatorTask, "MAC_ISR", configMINIMAL_STACK_SIZE, NULL, configMAC_ISR_SIMULATOR_PRIORITY, NULL );
}
}
/*-----------------------------------------------------------*/
/* WinPCAP function. */
void pcap_callback( u_char * user,
const struct pcap_pkthdr * pkt_header,
const u_char * pkt_data )
{
( void ) user;
/* THIS IS CALLED FROM A WINDOWS THREAD - DO NOT ATTEMPT ANY FREERTOS CALLS
* OR TO PRINT OUT MESSAGES HERE. */
/* Pass data to the FreeRTOS simulator on a thread safe circular buffer. */
if( ( pkt_header->caplen <= ( ipconfigNETWORK_MTU + ipSIZE_OF_ETH_HEADER ) ) &&
( uxStreamBufferGetSpace( xRecvBuffer ) >= ( ( ( size_t ) pkt_header->caplen ) + sizeof( *pkt_header ) ) ) )
{
/* The received packets will be written to a C source file,
* only if 'ipconfigUSE_DUMP_PACKETS' is defined.
* Otherwise, there is no action. */
iptraceDUMP_PACKET( ( const uint8_t * ) pkt_data, ( size_t ) pkt_header->caplen, pdTRUE );
/* NOTE. The prvStreamBufferAdd function is used here in place of
* uxStreamBufferAdd since the uxStreamBufferAdd call will suspend
* the FreeRTOS scheduler to atomically update the head and front
* of the stream buffer. Since xRecvBuffer is being used as a regular
* circular buffer (i.e. only the head and tail are needed), this call
* only updates the head of the buffer, removing the need to suspend
* the scheduler, and allowing this function to be safely called from
* a Windows thread. */
prvStreamBufferAdd( xRecvBuffer, ( const uint8_t * ) pkt_header, sizeof( *pkt_header ) );
prvStreamBufferAdd( xRecvBuffer, ( const uint8_t * ) pkt_data, ( size_t ) pkt_header->caplen );
}
}
/*-----------------------------------------------------------*/
DWORD WINAPI prvWinPcapRecvThread( void * pvParam )
{
( void ) pvParam;
/* THIS IS A WINDOWS THREAD - DO NOT ATTEMPT ANY FREERTOS CALLS OR TO PRINT
* OUT MESSAGES HERE. */
for( ; ; )
{
pcap_dispatch( pxOpenedInterfaceHandle, 1, pcap_callback, ( u_char * ) "mydata" );
}
}
/*-----------------------------------------------------------*/
DWORD WINAPI prvWinPcapSendThread( void * pvParam )
{
size_t xLength;
uint8_t ucBuffer[ ipconfigNETWORK_MTU + ipSIZE_OF_ETH_HEADER ];
static char cErrorMessage[ 1024 ];
const DWORD xMaxMSToWait = 1000;
/* THIS IS A WINDOWS THREAD - DO NOT ATTEMPT ANY FREERTOS CALLS OR TO PRINT
* OUT MESSAGES HERE. */
/* Remove compiler warnings about unused parameters. */
( void ) pvParam;
for( ; ; )
{
/* Wait until notified of something to send. */
WaitForSingleObject( pvSendEvent, xMaxMSToWait );
/* Is there more than the length value stored in the circular buffer
* used to pass data from the FreeRTOS simulator into this Win32 thread? */
while( uxStreamBufferGetSize( xSendBuffer ) > sizeof( xLength ) )
{
uxStreamBufferGet( xSendBuffer, 0, ( uint8_t * ) &xLength, sizeof( xLength ), pdFALSE );
uxStreamBufferGet( xSendBuffer, 0, ( uint8_t * ) ucBuffer, xLength, pdFALSE );
/* The packets sent will be written to a C source file,
* only if 'ipconfigUSE_DUMP_PACKETS' is defined.
* Otherwise, there is no action. */
iptraceDUMP_PACKET( ucBuffer, xLength, pdFALSE );
if( pcap_sendpacket( pxOpenedInterfaceHandle, ucBuffer, xLength ) != 0 )
{
ulWinPCAPSendFailures++;
}
}
}
}
/*-----------------------------------------------------------*/
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
static BaseType_t xPacketBouncedBack( const uint8_t * pucBuffer )
{
static BaseType_t xHasWarned = pdFALSE;
EthernetHeader_t * pxEtherHeader;
NetworkEndPoint_t * pxEndPoint;
BaseType_t xResult = pdFALSE;
pxEtherHeader = ( EthernetHeader_t * ) pucBuffer;
/* Sometimes, packets are bounced back by the driver and we need not process them. Check
* whether this packet is one such packet. */
for( pxEndPoint = FreeRTOS_FirstEndPoint( NULL );
pxEndPoint != NULL;
pxEndPoint = FreeRTOS_NextEndPoint( NULL, pxEndPoint ) )
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
{
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
if( memcmp( pxEndPoint->xMACAddress.ucBytes, pxEtherHeader->xSourceAddress.ucBytes, ipMAC_ADDRESS_LENGTH_BYTES ) == 0 )
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
{
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
if( xHasWarned == pdFALSE )
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
{
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
xHasWarned = pdTRUE;
FreeRTOS_printf( ( "Bounced back by WinPCAP interface: %02x:%02x:%02x:%02x:%02x:%02x\n",
pxEndPoint->xMACAddress.ucBytes[ 0 ],
pxEndPoint->xMACAddress.ucBytes[ 1 ],
pxEndPoint->xMACAddress.ucBytes[ 2 ],
pxEndPoint->xMACAddress.ucBytes[ 3 ],
pxEndPoint->xMACAddress.ucBytes[ 4 ],
pxEndPoint->xMACAddress.ucBytes[ 5 ] ) );
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
}
xResult = pdTRUE;
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
break;
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
}
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
}
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
return xResult;
}
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
/*-----------------------------------------------------------*/
static void prvInterruptSimulatorTask( void * pvParameters )
{
struct pcap_pkthdr xHeader;
static struct pcap_pkthdr * pxHeader;
const uint8_t * pucPacketData;
uint8_t ucRecvBuffer[ ipconfigNETWORK_MTU + ipSIZE_OF_ETH_HEADER ];
NetworkBufferDescriptor_t * pxNetworkBuffer;
IPStackEvent_t xRxEvent = { eNetworkRxEvent, NULL };
eFrameProcessingResult_t eResult;
/* Remove compiler warnings about unused parameters. */
( void ) pvParameters;
for( ; ; )
{
/* Does the circular buffer used to pass data from the Win32 thread that
* handles WinPCAP Rx into the FreeRTOS simulator contain another packet? */
if( uxStreamBufferGetSize( xRecvBuffer ) > sizeof( xHeader ) )
{
/* Get the next packet. */
uxStreamBufferGet( xRecvBuffer, 0, ( uint8_t * ) &xHeader, sizeof( xHeader ), pdFALSE );
uxStreamBufferGet( xRecvBuffer, 0, ( uint8_t * ) ucRecvBuffer, ( size_t ) xHeader.len, pdFALSE );
pucPacketData = ucRecvBuffer;
pxHeader = &xHeader;
iptraceNETWORK_INTERFACE_RECEIVE();
/* Check for minimal size. */
if( pxHeader->len >= sizeof( EthernetHeader_t ) )
{
eResult = ipCONSIDER_FRAME_FOR_PROCESSING( pucPacketData );
}
else
{
eResult = eReleaseBuffer;
}
if( eResult == eProcessBuffer )
{
/* Will the data fit into the frame buffer? */
if( pxHeader->len <= ipTOTAL_ETHERNET_FRAME_SIZE )
{
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
BaseType_t xBounced = xPacketBouncedBack( pucPacketData );
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
/* Obtain a buffer into which the data can be placed. This
* is only an interrupt simulator, not a real interrupt, so it
* is ok to call the task level function here, but note that
* some buffer implementations cannot be called from a real
* interrupt. */
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
if( xBounced == pdFALSE )
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
{
pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( pxHeader->len, 0 );
}
else
{
pxNetworkBuffer = NULL;
}
if( pxNetworkBuffer != NULL )
{
memcpy( pxNetworkBuffer->pucEthernetBuffer, pucPacketData, pxHeader->len );
pxNetworkBuffer->xDataLength = ( size_t ) pxHeader->len;
#if ( niDISRUPT_PACKETS == 1 )
{
pxNetworkBuffer = vRxFaultInjection( pxNetworkBuffer, pucPacketData );
}
#endif /* niDISRUPT_PACKETS */
if( pxNetworkBuffer != NULL )
{
xRxEvent.pvData = ( void * ) pxNetworkBuffer;
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
pxNetworkBuffer->pxInterface = pxMyInterface;
pxNetworkBuffer->pxEndPoint = FreeRTOS_MatchingEndpoint( pxMyInterface, pxNetworkBuffer->pucEthernetBuffer );
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
/* Just for now, make sure that there is a valid end-point. */
if( pxNetworkBuffer->pxEndPoint == NULL )
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
{
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
FreeRTOS_printf( ( "Network interface: dropped packet\n" ) );
vReleaseNetworkBufferAndDescriptor( BUFFER_FROM_WHERE_CALL( 153 ) pxNetworkBuffer );
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
}
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
else
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
{
Merging IPv6 demo changes to main (#1028) * Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years ago
/* Data was received and stored. Send a message to
* the IP task to let it know. */
if( xSendEventStructToIPTask( &xRxEvent, ( TickType_t ) 0 ) == pdFAIL )
{
/* The buffer could not be sent to the stack so
* must be released again. This is only an
* interrupt simulator, not a real interrupt, so it
* is ok to use the task level function here, but
* note no all buffer implementations will allow
* this function to be executed from a real
* interrupt. */
vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer );
iptraceETHERNET_RX_EVENT_LOST();
}
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
}
}
else
{
/* The packet was already released or stored inside
* vRxFaultInjection(). Don't release it here. */
}
}
else
{
iptraceETHERNET_RX_EVENT_LOST();
}
}
else
{
/* Log that a packet was dropped because it would have
* overflowed the buffer, but there may be more buffers to
* process. */
}
}
}
else
{
/* There is no real way of simulating an interrupt. Make sure
* other tasks can run. */
vTaskDelay( configWINDOWS_MAC_INTERRUPT_SIMULATOR_DELAY );
}
}
}
/*-----------------------------------------------------------*/
static const char * prvRemoveSpaces( char * pcBuffer,
int aBuflen,
const char * pcMessage )
{
char * pcTarget = pcBuffer;
/* Utility function used to format messages being printed only. */
while( ( *pcMessage != 0 ) && ( pcTarget < ( pcBuffer + aBuflen - 1 ) ) )
{
*( pcTarget++ ) = *pcMessage;
if( isspace( *pcMessage ) != pdFALSE )
{
while( isspace( *pcMessage ) != pdFALSE )
{
pcMessage++;
}
}
else
{
pcMessage++;
}
}
*pcTarget = '\0';
return pcBuffer;
}
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
/*-----------------------------------------------------------*/
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
#define BUFFER_SIZE ( ipTOTAL_ETHERNET_FRAME_SIZE + ipBUFFER_PADDING )
#define BUFFER_SIZE_ROUNDED_UP ( ( BUFFER_SIZE + 7 ) & ~0x07UL )
void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] )
{
static uint8_t * pucNetworkPacketBuffers = NULL;
size_t uxIndex;
if( pucNetworkPacketBuffers == NULL )
{
pucNetworkPacketBuffers = ( uint8_t * ) malloc( ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS * BUFFER_SIZE_ROUNDED_UP );
}
if( pucNetworkPacketBuffers == NULL )
{
FreeRTOS_printf( ( "Failed to allocate memory for pxNetworkBuffers" ) );
configASSERT( 0 );
}
else
{
Changes in FreeRTOS+TCP demo application files to add compatibility for running EndPoint changes in the IPv4 stack. (#907) * Update main.c * Update main.c * Update main.c * Update main.c * TCP/IP Demo Changes for Sock Addr Changes * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main.c * Update main_networking.c * Update TwoEchoClients.c * Update SimpleClientAndServer.c * Update TwoEchoClients.c * Update SimpleUDPClientAndServer.c * Update main_networking.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main_networking.c * Update main_networking.c * Update main.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update plus_tcp_hooks_winsim.c * Update main.c * Update main.c * Update main_networking.c * Update main_networking.c * Update plus_tcp_hooks_winsim.c * Update lexicon.txt * Update lexicon.txt * Update lexicon.txt * Fix core header check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Update main_networking.c * Update CLI-commands.c * Update plus_tcp_hooks_winsim.c * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Remove incorrect spelling from lexicon Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Fix Build issues in QEMU and UDP demo * Lexicon spell check issue fix * WinPcap Network Interface update * Update Network_winPCap.c * Adding declaration for pxMyInterface for EndPoint changed function in WinPCap.c * Revert changes for WinPCap.c * Update NetworkInterface_WinPCap.c * Minor code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years ago
for( uxIndex = 0; uxIndex < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; uxIndex++ )
FreeRTOS Windows Simulator Build Changes and LTS 2.0 Update (#872) * Update mbedtls to version v3.2.1 * Adjust include paths for github workflow * Update FreeRTOS+TCP to v3.1.0 * Add initial VS project files for Kernel, +TCP, and mbedtls * winpcap: Consolidate to a single copy of WinPcap * Downgrade library projects to VS 2019. Add heap_4 to kernel. * Remove *.vcxproj.user files and add to gitignore * Disable unwanted kernel config options * Update FreeRTOS+TCP and Kernel include paths * Update FreeRTOS+TCP Windows Minimal sln * Remove .suo and .vcxproj.user files * Update mbedtls transport implementations for mbedtls v3.2.1 * Fix typo in mbedtls_freertos_port.c * Update vcxproj files for +TCP, Kernel, Mbedtls * Fix typo in name WindowSimulator -> WindowsSimulator * Add wpcap lib to FreeRTOS+TCP.vcxproj * Update FreeRTOS+TCP Minimal Demo for Windows Simulator * Mask MSVC string function warnings Aad _CRT_SECURE_NO_WARNINGS preprocessor definition. * Move projects to their own directories to make VisualStudio happy * mbedtls_freertos_port.c: Fix formatting? * Add coreHTTP, Logging libs. Adjust dependencies * Disable FreeRTOS Kernel malloc failed hook * Update coreHTTP Plaintext demo * Rename / relocate transport interface implementations * Remove old VS project files * Remove extra core_http_config.h files * Remove extra FreeRTOSConfig.h files * Remove extra FreeRTOSIPConfig.h files * Remove old mbedtls_config.h files * Remove old FreeRTOSConfig and core_http_config files * Update HTTP Mutual Auth Demo build files * Fix transport_plaintext.h include name * Update HTTP_Plaintext demo build files * Update CoreHTTP_S3_Download VS project files * Update HTTP_S3_Upload demo build files * Update CoreHTTP_S3_Download_Multithreaded demo build files * Add GithubActions builds for FreeRTOS+ CoreHTTP Demos * Update S3DownloadHTTPExample.c to be compatible with mbedtls 3.x * Update GithubActions FreeRTOS+ config file * Combine core_pkcs11_config.h files into a single one * Add corePKCS11 VS project file * Update corePKCS11 WinSim demo project and build files * Update corePKCS11 library to version 3.5.0 * Modifiying demos to build using static libraries * Adding a header file * Two more demos * Update corePKCS11 demo code and auto-format * Downgrade corePKCS11 library build file to v142 / VS 2019 * Speed up CI builds with selective submodule initialization * Separate corePKCS11 demo into it's own job. * Remove WIN32.vcxproj and WIN32.vcxproj.filters files * Remove old configuration header files Partially reverts 73829ced6061e4584e521185178a61b4a437c5e0 * Revert unwanted coreHTTP demo changes * Changing include paths for demos * Adding an include * MQTT WoflSSL Demo update * wolfSSL Demo changes * Config changes for MQTT Demos * Initial Device Defender demo update. * Initial Device Shadow demo update. * Update mbedtls_transport_pkcs11 for Mbedtls 3.x * Update corePKCS11 MQTT Mutual Auth demo * Add a default definition of SdkLog * Update CorePKCS11 + MQTT Mutual Auth demo sln name * Build all configs of coreHTTP demos * Update coreSNTP Demo build files. * Update coreSNTP Demo sln name * Update FreeRTOS+TCP Posix demo * Update FreeRTOS+TCP Qemu ARM MPS2 AN385 Demo * Update FreeRTOS+TCP Demo Github Actions builds * Update Fleet Provisioning WinSim Demo build files * Remove mbedtls_pk_info_t references from mbedtls_pk_pkcs11.h * Restore / update the FreeRTOS+TCP Minimal WinSim demo * Initial Jobs demo update. * Fix jobs demo build. * Initial OTA over HTTP demo update. * Initial OTA over MQTT demo update. * Ota_Over_Mqtt_Demo build fix. * OTA over MQTT demo fix. * Update HTTP demo solution file name for CI. * Update Github actions workflow to old HTTP demo names. * Update coreSTNP demo to old solution name. * Fix defender demo / fix mbedtls config to use threading alt. * Add MBEDTLS_CONFIG_FILE definition to each config * Fix config file name. * MQTT Mutual auth fixes. * Fix job demo. * Device shadow demo fixes. * Fix coreSNTP demo not setting alt threading functions for mbedtls. * Enable Static allocation, Add default hooks for FreeRTOS Kernel and +TCP * Add xPlatformIsNetworkUp platform function to FreeRTOS+TCP hooks * Enable runtime statistics in the Windows Simualator Kernel config * Revert "Fix coreSNTP demo not setting alt threading functions for mbedtls." This reverts commit 9069707519561ca8136d58c0f18fb176c9050a1d. * Revert mbedtls threading related config changes * Add xPlatformIsNetworkUp function prototype * Remove boileplate FreeRTOS kernel and +tcp hooks * Refactor device defender demo for clarity * Add wait loop calling xPlatformIsNetworkUp * Add missing vPlatformInitLogging function * Add vPlatformInitLogging and vLoggingPrintf defitions to logging headers * Updating the FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator * Updating the FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator demo * Updates to the FreeRTOS_Plus_WolfSSL_Windows_Simulator demo * Fixing wrong include path * Upating FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator demo * Update coreMQTT WinSim demos to print start and end condition. * Modifiying repos updated as part of the CLI demo GitHub workflow * Removing duplicate functions from the FreeRTOS_Plus_TCP_Minimal_Windows_Simulator demo * Updated FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Demo to call the static function that creates task * Fix log message using unitialized string in MQTT Multitask demo. * Fixing a broken extern function * Fixing a typo extern function name * Added a reference to coreHTTP * Fixing a pre-processor issue in the OTA_Over_Http_Demo * Updating the MQTT_Mutual_Auth_Demo_with_BG96 demo * Updating the MQTT_Mutual_Auth_Demo_with_HL7802 demo * Changes to the MQTT_Mutual_Auth_Demo_with_SARA_R4 demo * Fix demos for CI. * Adding the source path to the CBMC proofs for FreeRTOS+TCP * Spell check fixes, adding words to lexicons * Fixing a typo * Add arg to skip prompt in setup script. * Update paths of script to be relative to the file. * Changing manifest.yml file to point to corePKCS11 3.5.0 * Added CI markers to cellular demos. * Fix cellular demo flow. * Fix celullar demos. * Initial TCP sockets wrapper rework - will break things. * First cellular demo fix for new sockets wrapper. * Minor fix to cellular sockets wrapper. * Fix mbedtls bio using FreeRTOS Plus TCP call. * Clean up BG96 demo project files. * Update HL7802 demo. * Fix SARA R4 demo for new sockets wrapper. * Fix Device Defender, Device Shadow, and Fleet PRovisioning. * Fix Jobs demo. * Fix OTA over HTTP demo. * Fix OTA over MQTT demo. * Fix HTTP mutual auth demo. * Fix OTA over MQTT demo endianness. * Fix OTA over HTTP demo endianness. * Fix HTTP Plaintext demo. * Fix HTTP S3 download demo. * Fix plaintext transport * Fix OTA demos. * Fix OTA demos. * Fix OTA HTTP demo. * Fix HTTP S3 Download multithreaded demo. * Fix HTTP S3 Upload demo * Fix corePKCS11 Mutual Auth demo. * Updating MQTT_Mutual_Auth * Update pkcs11 setup script. * Updating the MQTT_Basic_TLS Demo * Organize PKCS11 demos project. * Updating MQTT_Keep_Alive demo * Clean up SNTP demo. * Updated MQTT_Multitask demo * Updated MQTT_Plain_Text * Updating the MQTT_Serializer Demo * Updating corePKCS11_MQTT_Mutual_Auth_Windows_Simulator * Updating coreSNTP_Windows_Simulator * Clean up demo projects. * Add markers to PKCS11 mutual auth demo. * Fix Fleet Provisioning demo script. * Fix SNTP demo solution. * Fix coreSNTP project files. * Fix Fleet Provisiong script. * Fix fleet provisioning script. * Fix demo config template. * Fleet provisioning demo markers. * Updating MQTT_Mutual_Auth_wolfSSL demo and the transport_wolfSSL file * Fixing FreeRTOS_Plus_TCP_Echo_POSIX * Fixing CLI and Trace Demos * Fixing TCP_ECHO_POSIX demo * Adding a word to the lexicon * Remove unneeded files. * Update github workflows to use Ubuntu 20.04. * Change OTA demo target names to RTOSDemo for OTAE2E tests. * Fixing Headers * Updating headers * Two more headers * Adding words to the lexicon * Whitepsace * Ignore mbedtls config file for header check. * Removing FreeRTOS Header from the mbedtls_config_v3.2.1.h file * Fix bug in lPKCS11PkMbedtlsCloseSessionAndFree. Add doxygen api docs. * Update lexicon.txt * Fix spelling * Apply suggestions from code review Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> * Add return code comment for p11_ecdsa_ctx_init * Rename WindowsSimulator folder to VisualStudio_StaticProjects. * Remove references to coroutines * Fix mbedtls_pk_pkcs11.c * Update to LTS 2.0 submodule pointers (#880) * Update submodule pointers to LTS 2.0 * Initial coreMQTT 2.1.1 update. * Update AWS demos for coreMQTT 2.1.1 * Fix deprecated macro for coreMQTT demos. * Fix keep alive demo. * Fix plaintext demo. * Fix MQTT wolfSSL demo. * Fix MQTT PKCS11 demo. * Remove duplicate functions. * Fix Mutual auth demos for Cellular. * Fix OTA demos. * Fix header of plaintext demo config. * Set writev to NULL for OTA demos. * Fix mbedlts config for OTA demos. * Fix spelling. Co-authored-by: Jason Carroll <czjaso@amazon.com> * Removing blank line * Fix jobs demo race condition. * Fix race condition from WinPCap network interface. * Update lexicon. Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Jason Carroll <czjaso@amazon.com> Co-authored-by: Paul Bartell <paul.bartell@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
2 years ago
{
size_t uxOffset = uxIndex * BUFFER_SIZE_ROUNDED_UP;
NetworkBufferDescriptor_t ** ppDescriptor;
/* At the beginning of each pbuff is a pointer to the relevant descriptor */
ppDescriptor = ( NetworkBufferDescriptor_t ** ) &( pucNetworkPacketBuffers[ uxOffset ] );
/* Set this pointer to the address of the correct descriptor */
*ppDescriptor = &( pxNetworkBuffers[ uxIndex ] );
/* pucEthernetBuffer is set to point ipBUFFER_PADDING bytes in from the
* beginning of the allocated buffer. */
pxNetworkBuffers[ uxIndex ].pucEthernetBuffer = &( pucNetworkPacketBuffers[ uxOffset + ipBUFFER_PADDING ] );
}
}
}