/* This dedicated timer is used to poll underlying network media status. In case of cable swap or wireless network switch, a new round auto configuration will be initiated. The timer will signal the IP4 to run DHCP configuration again. IP4 driver will free old IP address related resource, such as route table and Interface, then initiate a DHCP process to acquire new IP, eventually create route table for new IP address. */
VOID EFIAPI Ip4TimerReconfigChecking(IN EFI_EVENT Event, IN VOID *Context)
/* This dedicated timer is used to poll underlying network media status. In case of cable swap or wireless network switch, a new round auto configuration will be initiated. The timer will signal the IP4 to run DHCP configuration again. IP4 driver will free old IP address related resource, such as route table and Interface, then initiate a DHCP process to acquire new IP, eventually create route table for new IP address. */
VOID EFIAPI Ip4TimerReconfigChecking(IN EFI_EVENT Event, IN VOID *Context)
{
  IP4_SERVICE              *IpSb;
  BOOLEAN                  OldMediaPresent;
  EFI_STATUS               Status;
  EFI_SIMPLE_NETWORK_MODE  SnpModeData;
  IpSb = (IP4_SERVICE *)Context;
  NET_CHECK_SIGNATURE (IpSb, IP4_SERVICE_SIGNATURE);
  OldMediaPresent = IpSb->MediaPresent;
  Status = IpSb->Mnp->GetModeData (IpSb->Mnp, NULL, &SnpModeData);
  if (EFI_ERROR (Status) && (Status != EFI_NOT_STARTED)) {
    return;
  }
  IpSb->MediaPresent = SnpModeData.MediaPresent;
  if (!OldMediaPresent && IpSb->MediaPresent && (IpSb->Ip4Config2Instance.Policy == Ip4Config2PolicyDhcp)) {
    if (IpSb->ReconfigEvent != NULL) {
      Status = gBS->SignalEvent (IpSb->ReconfigEvent);
      DispatchDpc ();
    }
  }
}