From 3f0d482ba88deea01c534c6647dbafce9dffca6e Mon Sep 17 00:00:00 2001 From: tony-josi-aws Date: Mon, 9 Dec 2024 15:17:02 +0530 Subject: [PATCH] Add pxFillInterfaceDescriptor definition to libslirp netif for backward compatibility --- .../libslirp/MBuffNetworkInterface.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/source/portable/NetworkInterface/libslirp/MBuffNetworkInterface.c b/source/portable/NetworkInterface/libslirp/MBuffNetworkInterface.c index 9dc35f9a9..23de71873 100644 --- a/source/portable/NetworkInterface/libslirp/MBuffNetworkInterface.c +++ b/source/portable/NetworkInterface/libslirp/MBuffNetworkInterface.c @@ -77,6 +77,9 @@ extern void vMBuffNetifBackendDeInit( void * pvBackendContext ); static void vNetifReceiveTask( void * pvParameters ); +extern NetworkInterface_t * pxLibslirp_FillInterfaceDescriptor( BaseType_t xEMACIndex, + NetworkInterface_t * pxInterface ); + /** * @brief Initialize the MessageBuffer backed network interface. * @@ -381,6 +384,21 @@ BaseType_t xGetPhyLinkStatus( NetworkInterface_t * pxNetif ) return xResult; } + +#if ( ipconfigIPv4_BACKWARD_COMPATIBLE == 1 ) + + +/* Do not call the following function directly. It is there for downward compatibility. + * The function FreeRTOS_IPInit() will call it to initialice the interface and end-point + * objects. See the description in FreeRTOS_Routing.h. */ + NetworkInterface_t * pxFillInterfaceDescriptor( BaseType_t xEMACIndex, + NetworkInterface_t * pxInterface ) + { + return pxLibslirp_FillInterfaceDescriptor( xEMACIndex, pxInterface ); + } + +#endif + NetworkInterface_t * pxLibslirp_FillInterfaceDescriptor( BaseType_t xEMACIndex, NetworkInterface_t * pxInterface ) {