iPXE
image Struct Reference

An executable image. More...

#include <image.h>

Data Fields

struct refcnt refcnt
 Reference count.
struct list_head list
 List of registered images.
struct uriuri
 URI of image.
char * name
 Name.
unsigned int flags
 Flags.
char * cmdline
 Command line to pass to image.
union { 
   const void *   data 
 Read-only data. More...
   void *   rwdata 
 Writable data. More...
   const char *   text 
 Read-only text (guaranteed to be NUL terminated). More...
}; 
 Raw file image.
size_t len
 Length of raw file image.
struct image_typetype
 Image type, if known.
struct imagereplacement
 Replacement image.

Detailed Description

An executable image.

Definition at line 24 of file image.h.

Field Documentation

◆ refcnt

struct refcnt image::refcnt

Reference count.

Definition at line 26 of file image.h.

Referenced by alloc_image(), image_get(), and image_put().

◆ list

struct list_head image::list

List of registered images.

Definition at line 29 of file image.h.

Referenced by first_image(), lkrn_exec(), register_image(), and unregister_image().

◆ uri

struct uri* image::uri

◆ name

char* image::name

Name.

If the IMAGE_STATIC_NAME flag is set, then this is a statically allocated string.

Definition at line 38 of file image.h.

Referenced by archive_okx(), bzimage_check_initrds(), bzimage_exec(), bzimage_load_initrds(), bzimage_parse_cmdline(), bzimage_parse_header(), bzimage_set_cmdline(), bzimage_update_header(), com32_exec_loop(), com32_identify(), com32_load_image(), com32_prepare_bounce_buffer(), comboot_exec(), comboot_exec_loop(), comboot_identify(), comboot_init_psp(), comboot_prepare_segment(), cpio_header(), cpio_parse_cmdline(), der_image_asn1(), der_image_probe(), digest_exec(), downloader_finished(), efi_autoexec_load(), efi_file_find(), efi_file_image(), efi_file_read_initrd(), efi_image_cmdline(), efi_image_exec(), efi_image_filepath(), efi_image_probe(), efi_pe_image_probe(), efisig_image_asn1(), efisig_image_probe(), elf_load(), elf_load_segment(), elf_segment(), elf_segments(), elfboot_check_segment(), elfboot_exec(), elfboot_probe(), embedded_init(), fdt_parse_image(), find_image(), free_image(), gzip_extract(), gzip_probe(), image_asn1(), image_exec(), image_extract(), image_pixbuf(), image_probe(), image_replace(), image_set_name(), image_set_uri(), image_strip_suffix(), imgdecrypt(), imgstat(), imgverify(), initrd_dump(), initrd_load(), initrd_squash_high(), lkrn_exec(), lkrn_parse(), lkrn_probe(), lkrn_ram(), mime_decode_base64(), mime_extract(), mime_extract_entity(), mime_extract_part(), mime_parse(), mime_parse_attribute(), mime_parse_encoding(), mime_parse_type(), mime_part_end(), mime_part_next(), multiboot_add_modules(), multiboot_build_memmap(), multiboot_exec(), multiboot_find_header(), multiboot_load_elf(), multiboot_load_raw(), multiboot_probe(), nbi_boot16(), nbi_boot32(), nbi_exec(), nbi_prepare_dhcp(), nbi_prepare_segment(), nbi_probe(), nbi_process_segments(), pem_image_asn1(), pem_image_probe(), png_chunk(), png_image_data(), png_image_end(), png_image_header(), png_palette(), png_pixbuf(), png_pixels_pass(), png_probe(), png_unfilter_pass(), pnm_ascii(), pnm_binary(), pnm_data(), pnm_probe(), pnm_scale(), pxe_exec(), pxe_probe_no_mz(), register_image(), sdi_exec(), sdi_probe(), ucode_describe(), ucode_exec(), ucode_parse(), ucode_parse_amd(), ucode_parse_intel(), ucode_probe(), ucode_update_all(), ucode_verify(), unregister_image(), zimg_extract(), zimg_parse(), zimg_probe(), zlib_deflate(), and zlib_probe().

◆ flags

◆ cmdline

◆ data

◆ rwdata

◆ text

const char* image::text

Read-only text (guaranteed to be NUL terminated).

Images are allocated with a trailing NUL byte, to allow string functions to be used more easily on image data.

Definition at line 60 of file image.h.

Referenced by mime_decode_base64(), mime_extract(), mime_extract_part(), mime_probe(), and register_image().

◆ [union]

union { ... } image

Raw file image.

If the IMAGE_STATIC flag is set, then this is a statically allocated image.

◆ len

◆ type

struct image_type* image::type

◆ replacement

struct image* image::replacement

Replacement image.

An image wishing to replace itself with another image (in a style similar to a Unix exec() call) should return from its exec() method with the replacement image set to point to the new image.

If an image unregisters itself as a result of being executed, it must make sure that its replacement image (if any) is registered, otherwise the replacement is likely to be freed before it can be executed.

Definition at line 80 of file image.h.

Referenced by com32_exec_loop(), comboot_exec_loop(), free_image(), image_exec(), and image_replace().


The documentation for this struct was generated from the following file: