annotate dep/animone/src/fd/openbsd.cc @ 341:052ec053ee37

dep/animone: a11y/win32: fix missing ComInterface definition
author Paper <paper@paper.us.eu.org>
date Wed, 19 Jun 2024 23:21:19 -0400
parents f63dfa309380
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
338
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
1 /*
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
2 * fd/openbsd.cc: support for OpenBSD
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
3 *
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
4 * COMPLETELY UNTESTED. may or may not work.
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
5 */
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
6 #include "animone/fd/bsd.h"
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
7 #include "animone.h"
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
8 #include "animone/fd.h"
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
9
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
10 #include <sys/file.h>
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
11 #include <sys/filedesc.h>
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
12 #include <sys/param.h>
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
13 #include <sys/queue.h>
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
14 #include <sys/sysctl.h>
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
15 #include <sys/types.h>
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
16 #include <sys/user.h>
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
17 #include <sys/vnode.h>
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
18
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
19 #include <kvm.h>
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
20 #include <fts.h>
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
21
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
22 #include <string>
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
23
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
24 namespace animone::internal::openbsd {
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
25
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
26 /* XXX is this necessary */
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
27 static std::string Basename(const std::string& name) {
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
28 size_t s = name.find_last_of('/');
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
29
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
30 if (s == std::string::npos)
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
31 return name;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
32
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
33 return name.substr(s, name.size());
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
34 }
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
35
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
36 bool GetProcessName(pid_t pid, std::string& name) {
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
37 char errbuf[_POSIX2_LINE_MAX];
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
38 kvm_t* kernel = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, errbuf);
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
39 if (!kernel)
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
40 return false;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
41
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
42 int entries = 0;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
43 struct kinfo_proc* kinfo = kvm_getprocs(kernel, KERN_PROC_PID, pid, &entries);
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
44 if (!kinfo) {
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
45 kvm_close(kernel);
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
46 return false;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
47 }
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
48
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
49 if (entries < 1) {
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
50 kvm_close(kernel);
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
51 return false;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
52 }
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
53
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
54 name = Basename(kinfo[0].ki_paddr->p_comm);
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
55
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
56 return true;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
57 }
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
58
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
59 bool EnumerateOpenProcesses(process_proc_t process_proc) {
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
60 char errbuf[_POSIX2_LINE_MAX];
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
61 kvm_t* kernel = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, errbuf);
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
62 if (!kernel)
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
63 return false;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
64
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
65 int entries = 0;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
66 struct kinfo_proc* kinfo = kvm_getprocs(kernel, KERN_PROC_ALL, 0, &entries);
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
67 if (!kinfo) {
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
68 kvm_close(kernel);
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
69 return false;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
70 }
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
71
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
72 for (int i = 0; i < entries; i++) {
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
73 if (!process_proc({.platform = ExecutablePlatform::Posix, .pid = kinfo[i].ki_paddr->p_pid, .comm = Basename(kinfo[i].ki_paddr->p_comm)})) {
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
74 kvm_close(kernel);
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
75 return false;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
76 }
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
77 }
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
78
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
79 kvm_close(kernel);
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
80
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
81 return true;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
82 }
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
83
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
84 static bool GetOpenFileName(const struct kinfo_file& file, std::string& name) {
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
85 /* OpenBSD doesn't provide a native API for this, so we have
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
86 * to do it ourselves */
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
87 static constexpr std::string_view root = "/";
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
88
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
89 FTS* file_system = fts_open(root.data(), FTS_COMFOLLOW | FTS_NOCHDIR, nullptr);
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
90 if (!file_system)
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
91 return false;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
92
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
93 /* Search through the filesystem for a file that matches our
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
94 * kinfo_file structure */
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
95 FTSENT* parent = nullptr;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
96 while ((parent = fts_read(file_system))) {
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
97 FTSENT* child = fts_children(file_system, 0);
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
98 while (child && child->fts_link) {
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
99 child = child->fts_link;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
100 if (!S_ISREG(child->fts_statp->st_mode) || !S_ISLNK(child->fts_statp->st_mode))
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
101 continue;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
102
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
103 if (child->fts_statp->st_dev != file->va_fsid)
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
104 continue;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
105
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
106 if (child->fts_statp->st_ino != file->va_fileid)
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
107 continue;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
108
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
109 name = std::string(child->fts_path) + child->fts_name;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
110 fts_close(file_system);
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
111 return true;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
112 }
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
113 }
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
114
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
115 fts_close(filesystem);
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
116 return false;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
117 }
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
118
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
119 bool EnumerateOpenFiles(const std::set<pid_t>& pids, open_file_proc_t open_file_proc) {
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
120 char errbuf[_POSIX2_LINE_MAX];
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
121 kvm_t* kernel = kvm_openfiles(nullptr, nullptr, nullptr, O_RDONLY, errbuf);
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
122 if (!kernel)
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
123 return false;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
124
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
125 for (const auto& pid : pids) {
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
126 int cnt;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
127 struct kinfo_file* kfile = kvm_getfiles(kernel, KERN_FILE_BYPID, pid, &cnt);
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
128 if (!kfile) {
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
129 kvm_close(kernel);
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
130 return false;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
131 }
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
132
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
133 for (int i = 0; i < cnt; i++) {
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
134 uint32_t oflags = kfile[i].kf_flags & O_ACCMODE;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
135 if (oflags == O_WRONLY || oflags == O_RDWR)
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
136 continue;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
137
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
138 std::string name;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
139 if (!GetOpenFileName(kfile[i], name))
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
140 continue;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
141
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
142 if (!open_file_proc({pid, name})) {
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
143 kvm_close(kernel);
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
144 return false;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
145 }
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
146 }
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
147 }
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
148
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
149 kvm_close(kernel);
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
150 return true;
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
151 }
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
152
f63dfa309380 dep/animone: separate *BSD into separate files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
153 } // namespace animone::internal::openbsd