Skip to content

Commit

Permalink
Add pxFillInterfaceDescriptor definition to libslirp network interfac…
Browse files Browse the repository at this point in the history
…e for backward compatibility (#1210)

* Add pxFillInterfaceDescriptor definition to libslirp netif for backward compatibility

* Fix formatting
  • Loading branch information
tony-josi-aws authored Dec 9, 2024
1 parent e3412fb commit f4a0005
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions source/portable/NetworkInterface/libslirp/MBuffNetworkInterface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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 )
{
Expand Down

0 comments on commit f4a0005

Please sign in to comment.