LIEF: Library to Instrument Executable Formats
Version 1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
install
linux
x86_64
sdk
static
include
LIEF
runtime
osx
osx/Host.hpp
Go to the documentation of this file.
1
/* Copyright 2017 - 2026 R. Thomas
2
* Copyright 2017 - 2026 Quarkslab
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
#ifndef LIEF_RUNTIME_OSX_HOST_H
17
#define LIEF_RUNTIME_OSX_HOST_H
18
#include <
LIEF/visibility.h
>
19
#include <cstdint>
20
#include <string>
21
#include <ostream>
22
23
namespace
LIEF
{
24
namespace
runtime
{
25
namespace
osx
{
26
27
class
LIEF_API
Host
{
28
public
:
29
struct
LIEF_API
version_t
{
30
uint32_t
major
= 0;
31
uint32_t
minor
= 0;
32
uint32_t
patch
= 0;
33
34
version_t
(uint32_t
major
, uint32_t
minor
, uint32_t
patch
) :
35
major
(
major
),
36
minor
(
minor
),
37
patch
(
patch
) {}
38
39
bool
operator<=
(
const
version_t
& rhs)
const
;
40
bool
operator>
(
const
version_t
& rhs)
const
{
41
return
!(*
this
<= rhs);
42
}
43
44
bool
operator>=
(
const
version_t
& rhs)
const
;
45
bool
operator<
(
const
version_t
& rhs)
const
{
46
return
!(*
this
>= rhs);
47
}
48
49
bool
operator==
(
const
version_t
& other)
const
;
50
bool
operator!=
(
const
version_t
& other)
const
{
51
return
!(*
this
== other);
52
}
53
54
std::string
to_string
()
const
;
55
56
static
const
version_t
&
BigSur
();
57
static
const
version_t
&
Monterey
();
58
static
const
version_t
&
Ventura
();
59
static
const
version_t
&
Sonoma
();
60
static
const
version_t
&
Sequoia
();
61
static
const
version_t
&
Tahoe
();
62
63
LIEF_API
friend
std::ostream&
operator<<
(std::ostream& os,
64
const
version_t
version
) {
65
os <<
version
.to_string();
66
return
os;
67
}
68
};
69
71
static
std::string
os_version_name
();
72
74
static
version_t
os_version
();
75
80
static
bool
is_sip_enabled
();
81
};
82
83
84
}
85
}
86
}
87
#endif
LIEF::runtime::osx::Host
Definition
osx/Host.hpp:27
LIEF::runtime::osx::Host::os_version_name
static std::string os_version_name()
The OS version string (e.g. Version 26.2 (Build 25C56)).
LIEF::runtime::osx::Host::is_sip_enabled
static bool is_sip_enabled()
Whether System Integrity Protection (SIP) is enabled on this host.
LIEF::runtime::osx::Host::os_version
static version_t os_version()
The OS version (e.g. 13.0.0).
LIEF::runtime::osx
Definition
osx/Host.hpp:25
LIEF::runtime
Definition
android/Host.hpp:24
LIEF
LIEF namespace.
Definition
Abstract/Binary.hpp:41
LIEF::version
lief_version_t version()
Return the current version.
LIEF::runtime::osx::Host::version_t
Definition
osx/Host.hpp:29
LIEF::runtime::osx::Host::version_t::Tahoe
static const version_t & Tahoe()
LIEF::runtime::osx::Host::version_t::operator==
bool operator==(const version_t &other) const
LIEF::runtime::osx::Host::version_t::operator<
bool operator<(const version_t &rhs) const
Definition
osx/Host.hpp:45
LIEF::runtime::osx::Host::version_t::major
uint32_t major
Definition
osx/Host.hpp:30
LIEF::runtime::osx::Host::version_t::operator<=
bool operator<=(const version_t &rhs) const
LIEF::runtime::osx::Host::version_t::version_t
version_t(uint32_t major, uint32_t minor, uint32_t patch)
Definition
osx/Host.hpp:34
LIEF::runtime::osx::Host::version_t::BigSur
static const version_t & BigSur()
LIEF::runtime::osx::Host::version_t::operator>=
bool operator>=(const version_t &rhs) const
LIEF::runtime::osx::Host::version_t::operator<<
friend std::ostream & operator<<(std::ostream &os, const version_t version)
Definition
osx/Host.hpp:63
LIEF::runtime::osx::Host::version_t::patch
uint32_t patch
Definition
osx/Host.hpp:32
LIEF::runtime::osx::Host::version_t::Ventura
static const version_t & Ventura()
LIEF::runtime::osx::Host::version_t::Sonoma
static const version_t & Sonoma()
LIEF::runtime::osx::Host::version_t::Sequoia
static const version_t & Sequoia()
LIEF::runtime::osx::Host::version_t::to_string
std::string to_string() const
LIEF::runtime::osx::Host::version_t::operator!=
bool operator!=(const version_t &other) const
Definition
osx/Host.hpp:50
LIEF::runtime::osx::Host::version_t::minor
uint32_t minor
Definition
osx/Host.hpp:31
LIEF::runtime::osx::Host::version_t::Monterey
static const version_t & Monterey()
LIEF::runtime::osx::Host::version_t::operator>
bool operator>(const version_t &rhs) const
Definition
osx/Host.hpp:40
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:45
Generated by
1.18.0