20#define REST_EX_CONFIG_DATA_LEN_UNKNOWN 0xff
41 IN EFI_REST_EX_SERVICE_ACCESS_MODE AccessMode,
42 IN EFI_REST_EX_CONFIG_TYPE ConfigType,
43 IN EFI_REST_EX_SERVICE_TYPE ServiceType,
53 if ((Image ==
NULL) ||
54 (AccessMode >= EfiRestExServiceModeMax) ||
55 (ConfigType >= EfiRestExConfigTypeMax) ||
56 (ServiceType >= EfiRestExServiceTypeMax) ||
57 (ChildInstanceHandle ==
NULL)
60 return EFI_INVALID_PARAMETER;
63 *ChildInstanceHandle =
NULL;
69 &gEfiRestExServiceBindingProtocolGuid,
72 if (EFI_ERROR (Status)) {
75 "%a: Failed to create service child - %r \n",
82 Status =
gBS->OpenProtocol (
84 &gEfiRestExProtocolGuid,
88 EFI_OPEN_PROTOCOL_GET_PROTOCOL
90 if (EFI_ERROR (Status)) {
97 Status = RestEx->GetService (
101 if (EFI_ERROR (Status)) {
108 switch (ConfigType) {
109 case EfiRestExConfigHttp:
113 case EfiRestExConfigUnspecific:
114 LenOfConfig = REST_EX_CONFIG_DATA_LEN_UNKNOWN;
121 if ((RestExServiceInfo->EfiRestExServiceInfoV10.RestServiceAccessMode != AccessMode) ||
122 (RestExServiceInfo->EfiRestExServiceInfoV10.RestServiceType != ServiceType) ||
123 (RestExServiceInfo->EfiRestExServiceInfoV10.RestExConfigType != ConfigType) ||
124 ((LenOfConfig != REST_EX_CONFIG_DATA_LEN_UNKNOWN) && (RestExServiceInfo->EfiRestExServiceInfoV10.RestExConfigDataLength != LenOfConfig)))
132 *ChildInstanceHandle = ChildHandle;
139 &gEfiRestExServiceBindingProtocolGuid,
142 return EFI_NOT_FOUND;
EFI_STATUS RestExLibCreateChild(IN EFI_HANDLE Controller, IN EFI_HANDLE Image, IN EFI_REST_EX_SERVICE_ACCESS_MODE AccessMode, IN EFI_REST_EX_CONFIG_TYPE ConfigType, IN EFI_REST_EX_SERVICE_TYPE ServiceType, OUT EFI_HANDLE *ChildInstanceHandle)
#define DEBUG(Expression)
EFI_STATUS EFIAPI NetLibCreateServiceChild(IN EFI_HANDLE Controller, IN EFI_HANDLE Image, IN EFI_GUID *ServiceBindingGuid, IN OUT EFI_HANDLE *ChildHandle)
EFI_STATUS EFIAPI NetLibDestroyServiceChild(IN EFI_HANDLE Controller, IN EFI_HANDLE Image, IN EFI_GUID *ServiceBindingGuid, IN EFI_HANDLE ChildHandle)