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