LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
LIEF::PE::DosHeader Class Reference

Class which represents the DosHeader, the first structure presents at the beginning of a PE file. More...

#include <DosHeader.hpp>

Inheritance diagram for LIEF::PE::DosHeader:
Collaboration diagram for LIEF::PE::DosHeader:

Public Types

using reserved_t = std::array<uint16_t, 4>
 
using reserved2_t = std::array<uint16_t, 10>
 
- Public Types inherited from LIEF::Object
template<class T >
using output_t = add_pointer_t<decay_t<T>>
 
template<class T >
using output_const_t = add_pointer_t<add_const_t<decay_t<T>>>
 

Public Member Functions

 DosHeader (const details::pe_dos_header &header)
 
 DosHeader (const DosHeader &)=default
 
DosHeaderoperator= (const DosHeader &)=default
 
 DosHeader (DosHeader &&)=default
 
DosHeaderoperator= (DosHeader &&)=default
 
 ~DosHeader () override=default
 
uint16_t magic () const
 Magic bytes identifying a DOS/PE binary.
 
uint16_t used_bytes_in_last_page () const
 
uint16_t file_size_in_pages () const
 
uint16_t numberof_relocation () const
 
uint16_t header_size_in_paragraphs () const
 
uint16_t minimum_extra_paragraphs () const
 
uint16_t maximum_extra_paragraphs () const
 
uint16_t initial_relative_ss () const
 
uint16_t initial_sp () const
 
uint16_t checksum () const
 
uint16_t initial_ip () const
 
uint16_t initial_relative_cs () const
 
uint16_t addressof_relocation_table () const
 
uint16_t overlay_number () const
 
const reserved_treserved () const
 
uint16_t oem_id () const
 
uint16_t oem_info () const
 
const reserved2_treserved2 () const
 
uint32_t addressof_new_exeheader () const
 Return the offset to the PE::Header structure.
 
void magic (uint16_t magic)
 
void used_bytes_in_last_page (uint16_t value)
 
void file_size_in_pages (uint16_t value)
 
void numberof_relocation (uint16_t value)
 
void header_size_in_paragraphs (uint16_t value)
 
void minimum_extra_paragraphs (uint16_t value)
 
void maximum_extra_paragraphs (uint16_t value)
 
void initial_relative_ss (uint16_t value)
 
void initial_sp (uint16_t value)
 
void checksum (uint16_t value)
 
void initial_ip (uint16_t value)
 
void initial_relative_cs (uint16_t value)
 
void addressof_relocation_table (uint16_t value)
 
void overlay_number (uint16_t value)
 
void reserved (const reserved_t &reserved)
 
void oem_id (uint16_t value)
 
void oem_info (uint16_t value)
 
void reserved2 (const reserved2_t &reserved2)
 
void addressof_new_exeheader (uint32_t value)
 
void accept (Visitor &visitor) const override
 
- Public Member Functions inherited from LIEF::Object
 Object ()
 
 Object (const Object &other)
 
Objectoperator= (const Object &other)
 
template<class T >
output_t< T > as ()
 
template<class T >
output_const_t< T > as () const
 
virtual bool operator== (const Object &other) const
 
virtual bool operator!= (const Object &other) const
 
virtual ~Object ()
 

Static Public Member Functions

static DosHeader create (PE_TYPE type)
 

Static Public Attributes

static constexpr uint16_t MAGIC = 0x5a4d
 

Detailed Description

Class which represents the DosHeader, the first structure presents at the beginning of a PE file.

Most of the attributes of this structures are no longer relevant.

Member Typedef Documentation

◆ reserved2_t

using LIEF::PE::DosHeader::reserved2_t = std::array<uint16_t, 10>

◆ reserved_t

using LIEF::PE::DosHeader::reserved_t = std::array<uint16_t, 4>

Constructor & Destructor Documentation

◆ DosHeader() [1/3]

LIEF::PE::DosHeader::DosHeader ( const details::pe_dos_header & header)

◆ DosHeader() [2/3]

LIEF::PE::DosHeader::DosHeader ( const DosHeader & )
default

◆ DosHeader() [3/3]

LIEF::PE::DosHeader::DosHeader ( DosHeader && )
default

◆ ~DosHeader()

LIEF::PE::DosHeader::~DosHeader ( )
overridedefault

Member Function Documentation

◆ accept()

void LIEF::PE::DosHeader::accept ( Visitor & visitor) const
overridevirtual

Implements LIEF::Object.

◆ addressof_new_exeheader() [1/2]

uint32_t LIEF::PE::DosHeader::addressof_new_exeheader ( ) const
inline

Return the offset to the PE::Header structure.

◆ addressof_new_exeheader() [2/2]

void LIEF::PE::DosHeader::addressof_new_exeheader ( uint32_t value)
inline

◆ addressof_relocation_table() [1/2]

uint16_t LIEF::PE::DosHeader::addressof_relocation_table ( ) const
inline

◆ addressof_relocation_table() [2/2]

void LIEF::PE::DosHeader::addressof_relocation_table ( uint16_t value)
inline

◆ checksum() [1/2]

uint16_t LIEF::PE::DosHeader::checksum ( ) const
inline

◆ checksum() [2/2]

void LIEF::PE::DosHeader::checksum ( uint16_t value)
inline

◆ create()

static DosHeader LIEF::PE::DosHeader::create ( PE_TYPE type)
static

◆ file_size_in_pages() [1/2]

uint16_t LIEF::PE::DosHeader::file_size_in_pages ( ) const
inline

◆ file_size_in_pages() [2/2]

void LIEF::PE::DosHeader::file_size_in_pages ( uint16_t value)
inline

◆ header_size_in_paragraphs() [1/2]

uint16_t LIEF::PE::DosHeader::header_size_in_paragraphs ( ) const
inline

◆ header_size_in_paragraphs() [2/2]

void LIEF::PE::DosHeader::header_size_in_paragraphs ( uint16_t value)
inline

◆ initial_ip() [1/2]

uint16_t LIEF::PE::DosHeader::initial_ip ( ) const
inline

◆ initial_ip() [2/2]

void LIEF::PE::DosHeader::initial_ip ( uint16_t value)
inline

◆ initial_relative_cs() [1/2]

uint16_t LIEF::PE::DosHeader::initial_relative_cs ( ) const
inline

◆ initial_relative_cs() [2/2]

void LIEF::PE::DosHeader::initial_relative_cs ( uint16_t value)
inline

◆ initial_relative_ss() [1/2]

uint16_t LIEF::PE::DosHeader::initial_relative_ss ( ) const
inline

◆ initial_relative_ss() [2/2]

void LIEF::PE::DosHeader::initial_relative_ss ( uint16_t value)
inline

◆ initial_sp() [1/2]

uint16_t LIEF::PE::DosHeader::initial_sp ( ) const
inline

◆ initial_sp() [2/2]

void LIEF::PE::DosHeader::initial_sp ( uint16_t value)
inline

◆ magic() [1/2]

uint16_t LIEF::PE::DosHeader::magic ( ) const
inline

Magic bytes identifying a DOS/PE binary.

◆ magic() [2/2]

void LIEF::PE::DosHeader::magic ( uint16_t magic)
inline

◆ maximum_extra_paragraphs() [1/2]

uint16_t LIEF::PE::DosHeader::maximum_extra_paragraphs ( ) const
inline

◆ maximum_extra_paragraphs() [2/2]

void LIEF::PE::DosHeader::maximum_extra_paragraphs ( uint16_t value)
inline

◆ minimum_extra_paragraphs() [1/2]

uint16_t LIEF::PE::DosHeader::minimum_extra_paragraphs ( ) const
inline

◆ minimum_extra_paragraphs() [2/2]

void LIEF::PE::DosHeader::minimum_extra_paragraphs ( uint16_t value)
inline

◆ numberof_relocation() [1/2]

uint16_t LIEF::PE::DosHeader::numberof_relocation ( ) const
inline

◆ numberof_relocation() [2/2]

void LIEF::PE::DosHeader::numberof_relocation ( uint16_t value)
inline

◆ oem_id() [1/2]

uint16_t LIEF::PE::DosHeader::oem_id ( ) const
inline

◆ oem_id() [2/2]

void LIEF::PE::DosHeader::oem_id ( uint16_t value)
inline

◆ oem_info() [1/2]

uint16_t LIEF::PE::DosHeader::oem_info ( ) const
inline

◆ oem_info() [2/2]

void LIEF::PE::DosHeader::oem_info ( uint16_t value)
inline

◆ operator=() [1/2]

DosHeader & LIEF::PE::DosHeader::operator= ( const DosHeader & )
default

◆ operator=() [2/2]

DosHeader & LIEF::PE::DosHeader::operator= ( DosHeader && )
default

◆ overlay_number() [1/2]

uint16_t LIEF::PE::DosHeader::overlay_number ( ) const
inline

◆ overlay_number() [2/2]

void LIEF::PE::DosHeader::overlay_number ( uint16_t value)
inline

◆ reserved() [1/2]

const reserved_t & LIEF::PE::DosHeader::reserved ( ) const
inline

◆ reserved() [2/2]

void LIEF::PE::DosHeader::reserved ( const reserved_t & reserved)
inline

◆ reserved2() [1/2]

const reserved2_t & LIEF::PE::DosHeader::reserved2 ( ) const
inline

◆ reserved2() [2/2]

void LIEF::PE::DosHeader::reserved2 ( const reserved2_t & reserved2)
inline

◆ used_bytes_in_last_page() [1/2]

uint16_t LIEF::PE::DosHeader::used_bytes_in_last_page ( ) const
inline

◆ used_bytes_in_last_page() [2/2]

void LIEF::PE::DosHeader::used_bytes_in_last_page ( uint16_t value)
inline

Member Data Documentation

◆ MAGIC

uint16_t LIEF::PE::DosHeader::MAGIC = 0x5a4d
staticconstexpr

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