1 /* 2 * Copyright (c) 2026 Netflix, Inc. Written by Warner Losh 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7 /* 8 * IPXE protocol to download files 9 * 10 * Written from https://dox.ipxe.org/efi__download_8h.html using the names 11 * contained there for compatibility. See that for the full docs. Provides the 12 * same interface as <ipxe/efi/efi_download.h> from the ipxe distribution. 13 */ 14 #pragma once 15 16 typedef struct _IPXE_DOWNLOAD_PROTOCOL IPXE_DOWNLOAD_PROTOCOL; 17 typedef void *IPXE_DOWNLOAD_FILE; 18 typedef EFI_STATUS(EFIAPI *IPXE_DOWNLOAD_DATA_CALLBACK)(IN VOID *, IN VOID *, IN UINTN, IN UINTN); 19 typedef void(EFIAPI *IPXE_DOWNLOAD_FINISH_CALLBACK)(IN VOID *, IN EFI_STATUS); 20 typedef EFI_STATUS(EFIAPI *IPXE_DOWNLOAD_START)(IN IPXE_DOWNLOAD_PROTOCOL *, 21 IN CHAR8 *, IN IPXE_DOWNLOAD_DATA_CALLBACK, IN IPXE_DOWNLOAD_FINISH_CALLBACK, 22 IN VOID *, OUT IPXE_DOWNLOAD_FILE *); 23 typedef EFI_STATUS(EFIAPI *IPXE_DOWNLOAD_ABORT)(IN IPXE_DOWNLOAD_PROTOCOL *, 24 IN IPXE_DOWNLOAD_FILE, IN EFI_STATUS); 25 typedef EFI_STATUS(EFIAPI *IPXE_DOWNLOAD_POLL) (IN IPXE_DOWNLOAD_PROTOCOL *); 26 27 struct _IPXE_DOWNLOAD_PROTOCOL { 28 IPXE_DOWNLOAD_START Start; 29 IPXE_DOWNLOAD_ABORT Abort; 30 IPXE_DOWNLOAD_POLL Poll; 31 }; 32 #define IPXE_DOWNLOAD_PROTOCOL_GUID \ 33 { 0x3eaeaebd, 0xdecf, 0x493b, { 0x9b, 0xd1, 0xcd, 0xb2, 0xde, 0xca, 0xe7, 0x19 } } 34