/* This function registers an event that is to be signaled whenever a configuration process on the specified configuration data is performed. An event can be registered for a different DataType simultaneously. The caller is responsible for determining which type of configuration data causes the signaling of the event in such an event. */
EFI_STATUS EFIAPI EfiIp6ConfigRegisterDataNotify(IN EFI_IP6_CONFIG_PROTOCOL *This, IN EFI_IP6_CONFIG_DATA_TYPE DataType, IN EFI_EVENT Event)
/* This function registers an event that is to be signaled whenever a configuration process on the specified configuration data is performed. An event can be registered for a different DataType simultaneously. The caller is responsible for determining which type of configuration data causes the signaling of the event in such an event. */
EFI_STATUS EFIAPI EfiIp6ConfigRegisterDataNotify(IN EFI_IP6_CONFIG_PROTOCOL *This, IN EFI_IP6_CONFIG_DATA_TYPE DataType, IN EFI_EVENT Event)
{
  EFI_TPL              OldTpl;
  EFI_STATUS           Status;
  IP6_CONFIG_INSTANCE  *Instance;
  NET_MAP              *EventMap;
  NET_MAP_ITEM         *Item;
  if ((This == NULL) || (Event == NULL)) {
    return EFI_INVALID_PARAMETER;
  }
  if (DataType >= Ip6ConfigDataTypeMaximum) {
    return EFI_UNSUPPORTED;
  }
  OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
  Instance = IP6_CONFIG_INSTANCE_FROM_PROTOCOL (This);
  EventMap = &Instance->DataItem[DataType].EventMap;
  Item = NetMapFindKey (EventMap, Event);
  if (Item == NULL) {
    Status = NetMapInsertTail (EventMap, Event, NULL);
    if (EFI_ERROR (Status)) {
      Status = EFI_OUT_OF_RESOURCES;
    }
  } else {
    Status = EFI_ACCESS_DENIED;
  }
  gBS->RestoreTPL (OldTpl);
  return Status;
}