/* The callback function for the net buffer which wraps the packet processed by IPsec. It releases the wrap packet and also signals IPsec to free the resources. */
VOID EFIAPI Ip4IpSecFree(IN VOID *Arg)
/* The callback function for the net buffer which wraps the packet processed by IPsec. It releases the wrap packet and also signals IPsec to free the resources. */
VOID EFIAPI Ip4IpSecFree(IN VOID *Arg)
{
  IP4_IPSEC_WRAP  *Wrap;
  Wrap = (IP4_IPSEC_WRAP *)Arg;
  if (Wrap->IpSecRecycleSignal != NULL) {
    gBS->SignalEvent (Wrap->IpSecRecycleSignal);
  }
  NetbufFree (Wrap->Packet);
  FreePool (Wrap);
  return;
}