feat: HTML man pages

This commit is contained in:
2026-07-09 11:32:27 +02:00
parent 51bab1e62e
commit e5db1c3918
23 changed files with 4245 additions and 12 deletions
+145
View File
@@ -0,0 +1,145 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS manual page: dhcp(1) - obtain network configuration via DHCP">
<title>dhcp(1) - MontaukOS Manual</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar .current {
color: #004499;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
pre { background: #f0f0f0; padding: 0.5em; overflow-x: auto; }
code { background: #f0f0f0; padding: 0 0.15em; }
pre code { padding: 0; }
.center { text-align: center; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">Man Pages</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h1>dhcp(1)</h1>
</div>
<hr>
<pre><code><strong>NAME</strong>
dhcp - obtain network configuration via DHCP
<strong>SYNOPSIS</strong>
dhcp
<strong>DESCRIPTION</strong>
The DHCP client automatically obtains an IP address, subnet mask,
default gateway, and other network parameters from a DHCP server
on the local network using the Dynamic Host Configuration Protocol
(RFC 2131).
On success the network configuration is applied immediately via
set_netcfg(). On failure the original configuration is restored.
The client is run automatically by the init system at boot, but
may also be invoked manually from the shell.
<strong>PROTOCOL</strong>
The client performs the standard four-message DHCP exchange:
1. DHCPDISCOVER Broadcast to 255.255.255.255:67
2. DHCPOFFER Server offers an IP address
3. DHCPREQUEST Client accepts the offered address
4. DHCPACK Server confirms the lease
The BROADCAST flag (0x8000) is set so that server replies are
sent to the broadcast address, since the client has no IP yet.
Each step has a 10-second timeout. If no response is received
the client exits with an error and restores the previous config.
<strong>OUTPUT</strong>
On success the client prints the assigned configuration:
IP Address, Subnet Mask, Gateway, DNS Server, Lease Time
<strong>OPTIONS</strong>
The DHCP client requests the following options from the server:
1 Subnet Mask
3 Router (default gateway)
6 DNS Server
51 Lease Time
<strong>SEE ALSO</strong>
ifconfig(1), shell(1), syscalls(2)</code></pre>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
+148
View File
@@ -0,0 +1,148 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS manual page: edit(1) - text editor for MontaukOS">
<title>edit(1) - MontaukOS Manual</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar .current {
color: #004499;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
pre { background: #f0f0f0; padding: 0.5em; overflow-x: auto; }
code { background: #f0f0f0; padding: 0 0.15em; }
pre code { padding: 0; }
.center { text-align: center; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">Man Pages</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h1>edit(1)</h1>
</div>
<hr>
<pre><code><strong>NAME</strong>
edit - text editor for MontaukOS
<strong>SYNOPSIS</strong>
edit [filename]
<strong>DESCRIPTION</strong>
edit is an interactive text editor. When invoked with a filename,
it opens the file for editing. If the file does not exist, a new
empty buffer is created and will be saved to that path on write.
When invoked without arguments, edit opens an empty buffer. You
will be prompted for a filename when saving.
<strong>KEYBOARD SHORTCUTS</strong>
<strong>Navigation</strong>
Arrow Keys Move cursor up/down/left/right
Home Move to start of line
End Move to end of line
Page Up Scroll up one page
Page Down Scroll down one page
<strong>Editing</strong>
Backspace Delete character before cursor
Delete Delete character at cursor
Enter Insert new line
Tab Insert 4 spaces
<strong>Commands</strong>
Ctrl+S Save file
Ctrl+Q Quit (warns if unsaved changes)
Ctrl+F Search for text
Ctrl+G Find next occurrence
<strong>DISPLAY</strong>
The top line shows the filename, a modified indicator [+],
and the current cursor position (Ln, Col).
The bottom line shows keyboard shortcuts or status messages.
Line numbers are displayed in a gutter on the left side.
Lines past the end of the file are marked with ~.
<strong>EXAMPLES</strong>
edit intro.1 Edit a file
edit Open a new empty buffer
<strong>SEE ALSO</strong>
cat(1), shell(1)</code></pre>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
+159
View File
@@ -0,0 +1,159 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS manual page: fetch(1) - HTTP/HTTPS client for MontaukOS">
<title>fetch(1) - MontaukOS Manual</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar .current {
color: #004499;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
pre { background: #f0f0f0; padding: 0.5em; overflow-x: auto; }
code { background: #f0f0f0; padding: 0 0.15em; }
pre code { padding: 0; }
.center { text-align: center; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">Man Pages</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h1>fetch(1)</h1>
</div>
<hr>
<pre><code><strong>NAME</strong>
fetch - HTTP/HTTPS client for MontaukOS
<strong>SYNOPSIS</strong>
fetch [-v] &lt;url&gt;
fetch [-v] &lt;host&gt; &lt;port&gt; [path]
<strong>DESCRIPTION</strong>
fetch performs an HTTP/1.0 GET request and prints the response
body to the terminal. Supports both plain HTTP and HTTPS (TLS 1.2)
connections. By default only the body is printed.
In URL mode, the scheme (http:// or https://) determines whether
TLS is used. The port defaults to 80 for HTTP and 443 for HTTPS.
In legacy mode, the host and port are specified as separate
arguments and the connection is always plain HTTP.
The host may be an IP address or a hostname. Hostnames are
resolved via the configured DNS server.
If no path is given, "/" is used.
<strong>OPTIONS</strong>
<strong>-v</strong>
Verbose mode. Print connection info, trust anchor count, TLS
handshake progress, and the HTTP status/size header before
the body.
<strong>EXAMPLES</strong>
fetch https://icanhazip.com
Print your public IP address over HTTPS.
fetch http://icanhazip.com
Same, but over plain HTTP.
fetch -v https://example.com
Fetch a page with verbose output showing:
Connecting to example.com:443 (HTTPS)...
Loaded 128 trust anchors
TLS handshake...
TLS connection established
GET /
HTTP 200 OK (1256 bytes)
fetch 10.0.68.1 80 /
Fetch from a local server by IP (legacy syntax).
<strong>TLS SUPPORT</strong>
HTTPS connections use BearSSL for TLS 1.2. Server certificates
are validated against the system CA bundle at
0:/os/certs/ca-certificates.crt.
Entropy for the TLS handshake is provided by RDTSC-seeded
random data via the SYS_GETRANDOM syscall.
<strong>KEYBOARD</strong>
Ctrl+Q Abort the request
<strong>SEE ALSO</strong>
ping(1), nslookup(1), tcpconnect(1), shell(1), syscalls(2)</code></pre>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
+199
View File
@@ -0,0 +1,199 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS manual page: file(2) - file I/O system calls">
<title>file(2) - MontaukOS Manual</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar .current {
color: #004499;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
pre { background: #f0f0f0; padding: 0.5em; overflow-x: auto; }
code { background: #f0f0f0; padding: 0 0.15em; }
pre code { padding: 0; }
.center { text-align: center; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">Man Pages</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h1>file(2)</h1>
</div>
<hr>
<pre><code><strong>NAME</strong>
open, read, getsize, close, readdir - file I/O system calls
<strong>SYNOPSIS</strong>
<strong> int montauk::open(const char* path);</strong>
<strong> int montauk::read(int handle, uint8_t* buf, uint64_t offset, uint64_t size);</strong>
<strong> uint64_t montauk::getsize(int handle);</strong>
<strong> void montauk::close(int handle);</strong>
<strong> int montauk::readdir(const char* path, const char** names, int max);</strong>
<strong>DESCRIPTION</strong>
MontaukOS provides a Virtual File System (VFS) with read/write
support. Drive 0 is the boot ramdisk; additional drives may be
mounted from GPT partitions backed by FAT32 or ext2 (see
syscalls(2), STORAGE section). Files are accessed via paths in
the format "&lt;drive&gt;:/&lt;path&gt;".
<strong>open</strong>
Opens a file and returns a non-negative handle on success, or a
negative value on error (file not found, no free handles).
int h = montauk::open("0:/os/hello.elf");
<strong>read</strong>
Reads up to 'size' bytes starting at 'offset' into 'buf'.
Returns the number of bytes actually read, or negative on error.
There is no implicit file position -- the offset is explicit on
every call.
uint8_t buf[512];
int n = montauk::read(h, buf, 0, 512);
<strong>getsize</strong>
Returns the total size in bytes of the file.
uint64_t sz = montauk::getsize(h);
<strong>close</strong>
Closes the file handle and frees kernel resources.
montauk::close(h);
<strong>readdir</strong>
Lists entries in a directory. Up to 'max' entry names (VFS cap
256, driver-backed listings such as 0:/os/ cap 128) are written
to the 'names' array. The kernel allocates a user-accessible
page for the string data automatically. Directory entries are
returned with a trailing slash.
const char* entries[64];
int count = montauk::readdir("0:/", entries, 64);
// entries: "os/", "apps/", "man/", "www/", "users/", ...
For directories that may contain more entries than fit in one
call, use montauk::readdir_at(path, names, max, startIndex) and
advance startIndex by the returned count until it returns 0.
<strong>READING PATTERN</strong>
The standard pattern for reading a file:
int h = montauk::open("0:/man/intro.1");
uint64_t size = montauk::getsize(h);
uint8_t buf[512];
uint64_t off = 0;
while (off &lt; size) {
uint64_t chunk = size - off;
if (chunk &gt; 511) chunk = 511;
int n = montauk::read(h, buf, off, chunk);
if (n &lt;= 0) break;
buf[n] = '\0';
montauk::print((const char*)buf);
off += n;
}
montauk::close(h);
<strong>WRITING, DELETING, RENAMING</strong>
<strong> int montauk::fcreate(const char* path);</strong>
<strong> int montauk::fwrite(int handle, const uint8_t* buf, uint64_t offset, uint64_t size);</strong>
<strong> int montauk::fdelete(const char* path);</strong>
<strong> int montauk::fmkdir(const char* path);</strong>
<strong> int montauk::frename(const char* oldPath, const char* newPath);</strong>
fcreate creates a new file and returns a handle. fwrite writes
bytes at the given offset. fdelete removes a file, fmkdir
creates a directory, and frename renames or moves a file or
directory (the basis for file manager move operations).
On drive 0 (the ramdisk), changes persist only until reboot --
the ramdisk is reloaded from the USTAR archive on each boot. On
disk-backed drives (FAT32/ext2 partitions mounted with
montauk::fs_mount), changes are written through to storage; use
montauk::fs_sync() to flush caches before power-off.
<strong>NOTES</strong>
Drive 0 is loaded at boot from a USTAR tar archive into RAM.
Other drives are mounted on demand from GPT partitions on
SATA/NVMe/USB block devices; see syscalls(2), STORAGE and
DEVICES sections.
<strong>SEE ALSO</strong>
syscalls(2), spawn(2), malloc(3)</code></pre>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
+140
View File
@@ -0,0 +1,140 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS manual page: fontscale(1) - get or set terminal font scale">
<title>fontscale(1) - MontaukOS Manual</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar .current {
color: #004499;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
pre { background: #f0f0f0; padding: 0.5em; overflow-x: auto; }
code { background: #f0f0f0; padding: 0 0.15em; }
pre code { padding: 0; }
.center { text-align: center; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">Man Pages</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h1>fontscale(1)</h1>
</div>
<hr>
<pre><code><strong>NAME</strong>
fontscale - get or set terminal font scale
<strong>SYNOPSIS</strong>
fontscale
fontscale &lt;n&gt;
fontscale &lt;x&gt; &lt;y&gt;
<strong>DESCRIPTION</strong>
Controls the terminal font scale factor. The Flanterm terminal
emulator renders text at a configurable scale multiplier.
Increasing the scale makes text larger, which is useful on
high-resolution displays or real hardware where text may be
too small to read comfortably.
With no arguments, prints the current scale factor and terminal
dimensions.
With one argument, sets both the horizontal and vertical scale
to the same value.
With two arguments, sets asymmetric horizontal and vertical
scale factors independently.
Valid scale values are 1 through 8. After rescaling, the screen
is cleared.
<strong>OUTPUT</strong>
fontscale
Scale: 1x1 (160 cols x 50 rows)
fontscale 2
Scale set to 2x2 (80 cols x 25 rows)
<strong>EXAMPLES</strong>
fontscale Show current scale and dimensions
fontscale 2 Double the font size
fontscale 3 2 3x horizontal, 2x vertical
fontscale 1 Reset to default size
<strong>SEE ALSO</strong>
shell(1), syscalls(2)</code></pre>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
+159
View File
@@ -0,0 +1,159 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS manual page: framebuffer(2) - direct framebuffer access">
<title>framebuffer(2) - MontaukOS Manual</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar .current {
color: #004499;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
pre { background: #f0f0f0; padding: 0.5em; overflow-x: auto; }
code { background: #f0f0f0; padding: 0 0.15em; }
pre code { padding: 0; }
.center { text-align: center; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">Man Pages</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h1>framebuffer(2)</h1>
</div>
<hr>
<pre><code><strong>NAME</strong>
fb_info, fb_map - direct framebuffer access
<strong>SYNOPSIS</strong>
<strong> void montauk::fb_info(montauk::abi::FbInfo* info);</strong>
<strong> void* montauk::fb_map();</strong>
<strong>DESCRIPTION</strong>
These syscalls allow userspace programs to access the linear
framebuffer directly for graphical output.
<strong>fb_info</strong>
Fills in an FbInfo structure with the framebuffer geometry:
montauk::abi::FbInfo fb;
montauk::fb_info(&amp;fb);
// fb.width, fb.height, fb.pitch, fb.bpp
The pitch is the number of bytes per scanline (may be larger
than width * 4 due to alignment). bpp is always 32.
<strong>fb_map</strong>
Maps the physical framebuffer into the process address space at
a fixed virtual address (0x50000000) and returns that address.
uint32_t* pixels = (uint32_t*)montauk::fb_map();
Each pixel is a 32-bit value in 0xAARRGGBB format (blue in the
low byte). Writing to this memory directly updates the screen.
<strong>PIXEL FORMAT</strong>
Bits 31-24: Alpha (unused, typically 0xFF)
Bits 23-16: Red
Bits 15-8: Green
Bits 7-0: Blue
Example: red = 0x00FF0000, green = 0x0000FF00, blue = 0x000000FF
<strong>EXAMPLE</strong>
Fill the screen with blue:
montauk::abi::FbInfo fb;
montauk::fb_info(&amp;fb);
uint32_t* pixels = (uint32_t*)montauk::fb_map();
for (uint64_t y = 0; y &lt; fb.height; y++) {
uint32_t* row = (uint32_t*)((uint8_t*)pixels + y * fb.pitch);
for (uint64_t x = 0; x &lt; fb.width; x++) {
row[x] = 0x000000FF;
}
}
<strong>NOTES</strong>
After mapping, the cursor overlay is not composited. Programs
that use the framebuffer take full control of screen output.
Only one mapping per process is supported. Calling fb_map()
multiple times returns the same address.
<strong>SEE ALSO</strong>
syscalls(2), malloc(3)</code></pre>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
+243
View File
@@ -0,0 +1,243 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS Man Pages">
<title>Man Pages - MontaukOS</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar .current {
color: #004499;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
.doc-list {
list-style: none;
padding: 0;
}
.doc-list li {
margin: 0.75em 0;
}
.doc-list a {
font-weight: 600;
font-family: monospace;
}
.doc-list p {
margin: 0.25em 0 0 1.5em;
color: #555;
font-size: 0.9em;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">Man Pages</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h1>Man Pages</h1>
</div>
<hr>
<p>
Manual pages for MontaukOS, viewable in-system with the <a href="man.html">man(1)</a> command.
</p>
<h2>User Commands (Section 1)</h2>
<ul class="doc-list">
<li>
<a href="intro.html">intro(1)</a>
<p>introduction to MontaukOS userspace</p>
</li>
<li>
<a href="shell.html">shell(1)</a>
<p>MontaukOS interactive command shell</p>
</li>
<li>
<a href="init.html">init(1)</a>
<p>MontaukOS init system</p>
</li>
<li>
<a href="dhcp.html">dhcp(1)</a>
<p>obtain network configuration via DHCP</p>
</li>
<li>
<a href="fetch.html">fetch(1)</a>
<p>HTTP/HTTPS client for MontaukOS</p>
</li>
<li>
<a href="ping.html">ping(1)</a>
<p>send ICMP echo requests</p>
</li>
<li>
<a href="nslookup.html">nslookup(1)</a>
<p>DNS hostname lookup</p>
</li>
<li>
<a href="fontscale.html">fontscale(1)</a>
<p>get or set terminal font scale</p>
</li>
<li>
<a href="edit.html">edit(1)</a>
<p>text editor for MontaukOS</p>
</li>
<li>
<a href="man.html">man(1)</a>
<p>display manual pages</p>
</li>
<li>
<a href="printctl.html">printctl(1)</a>
<p>configure printers and submit print jobs</p>
</li>
<li>
<a href="printd.html">printd(1)</a>
<p>MontaukOS userspace print spooler daemon</p>
</li>
<li>
<a href="wiki.html">wiki(1)</a>
<p>Wikipedia article viewer for MontaukOS</p>
</li>
</ul>
<h2>System Calls (Section 2)</h2>
<ul class="doc-list">
<li>
<a href="syscalls.html">syscalls(2)</a>
<p>overview of MontaukOS system calls</p>
</li>
<li>
<a href="spawn.html">spawn(2)</a>
<p>create and wait for processes</p>
</li>
<li>
<a href="file.html">file(2)</a>
<p>file I/O system calls</p>
</li>
<li>
<a href="framebuffer.html">framebuffer(2)</a>
<p>direct framebuffer access</p>
</li>
</ul>
<h2>Library Functions (Section 3)</h2>
<ul class="doc-list">
<li>
<a href="malloc.html">malloc(3)</a>
<p>userspace heap allocation</p>
</li>
</ul>
<h2>File Formats / Reference (Section 5)</h2>
<ul class="doc-list">
<li>
<a href="tls-errors.html">tls-errors(5)</a>
<p>BearSSL TLS and X.509 error codes</p>
</li>
</ul>
<h2>Miscellaneous (Section 7)</h2>
<ul class="doc-list">
<li>
<a href="legal.html">legal(7)</a>
<p>MontaukOS legal/copyright information</p>
</li>
</ul>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
+136
View File
@@ -0,0 +1,136 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS manual page: init(1) - MontaukOS init system">
<title>init(1) - MontaukOS Manual</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar .current {
color: #004499;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
pre { background: #f0f0f0; padding: 0.5em; overflow-x: auto; }
code { background: #f0f0f0; padding: 0 0.15em; }
pre code { padding: 0; }
.center { text-align: center; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">Man Pages</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h1>init(1)</h1>
</div>
<hr>
<pre><code><strong>NAME</strong>
init - MontaukOS init system
<strong>SYNOPSIS</strong>
Spawned automatically by the kernel as PID 0.
<strong>DESCRIPTION</strong>
init is the first userspace process started by the MontaukOS
kernel. It chains system services in sequence, then launches
the interactive shell.
Each service is spawned as a child process. init waits for it
to exit before starting the next one. If a service fails to
spawn, init logs an error and continues to the next stage.
Log output is timestamped and color-coded:
HH:MM:SS INFO init Starting dhcp
HH:MM:SS OK init dhcp finished (pid 1)
<strong>BOOT SEQUENCE</strong>
The following services are started in order:
1. 0:/os/dhcp.elf Obtain network configuration via DHCP
2. 0:/os/shell.elf Launch the interactive shell
After the shell exits, init enters an idle loop.
<strong>LOG LEVELS</strong>
init uses four log levels, each with a distinct color:
OK Green Service completed successfully
INFO Cyan Informational (service starting, etc.)
WARN Yellow Non-fatal warning
FAIL Red Service failed to start
<strong>SEE ALSO</strong>
dhcp(1), shell(1), syscalls(2)</code></pre>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
+191
View File
@@ -0,0 +1,191 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS manual page: intro(1) - introduction to MontaukOS userspace">
<title>intro(1) - MontaukOS Manual</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar .current {
color: #004499;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
pre { background: #f0f0f0; padding: 0.5em; overflow-x: auto; }
code { background: #f0f0f0; padding: 0 0.15em; }
pre code { padding: 0; }
.center { text-align: center; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">Man Pages</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h1>intro(1)</h1>
</div>
<hr>
<pre><code><strong>NAME</strong>
intro - introduction to MontaukOS userspace
<strong>DESCRIPTION</strong>
MontaukOS is a hobbyist 64-bit operating system written in C++20,
currently at version 0.1.7 (API version 8). Userspace programs
run in Ring 3, are loaded as static ELF64 binaries, and
communicate with the kernel through the x86-64 SYSCALL/SYSRET
mechanism (150 syscalls -- see syscalls(2)).
Programs are compiled with a freestanding cross-compiler and
linked at virtual address 0x400000. There is no standard C
library for C++ programs -- all system interaction goes through
the montauk:: syscall wrappers. A desktop environment with a
window server, GUI apps, and Bluetooth/audio/networking stacks
runs on top of the same syscall API.
<strong>GETTING STARTED</strong>
To write a new system/CLI program, create a directory under
programs/src/ with a main.cpp file. The entry point is:
extern "C" void _start() { ... }
There is no argc/argv. Use montauk::getargs() to retrieve any
arguments passed by the parent process. Include &lt;montauk/syscall.h&gt;
for the full typed syscall API. GUI apps additionally use
win_create()/win_poll()/win_present() from montauk/Window.hpp
(see framebuffer(2)).
Build with:
cd programs &amp;&amp; make
System/CLI binaries appear in programs/bin/os/; GUI app bundles
(ELF + manifest.toml + icon) appear under programs/bin/apps/&lt;name&gt;/.
<strong>RAMDISK LAYOUT</strong>
The boot ramdisk is mounted as drive 0 with the following
directory structure:
0:/os/ System/CLI binaries (shell, init, man, etc.),
plus os-owned data: certs/, firmware/,
licenses/, wallpapers/
0:/apps/ GUI app bundles, one directory per app
(&lt;app&gt;.elf + manifest.toml + icon)
0:/config/ System-wide config TOMLs
0:/users/&lt;name&gt;/ Per-user home directories (created at
login), with Music/, Videos/, Pictures/,
config/ subdirectories
0:/fonts/ Shared fonts
0:/icons/ Shared icons
0:/man/ Manual pages
0:/www/ Web server content
0:/lib/ Lua and TinyCC toolchain payloads
0:/boot/ Kernel, bootloader, ramdisk image
There is no 0:/games/, 0:/common/, 0:/home/, or 0:/etc/ --
these were used by earlier single-user releases and no longer
exist. Games and other GUI programs (including doom) ship as
bundles under 0:/apps/.
<strong>SHELL</strong>
The interactive shell is the primary way to interact with
MontaukOS. Commands are resolved against the current directory
first, then 0:/os/. Type 'help' at the shell prompt for a list
of commands. Use 'man shell' for detailed shell documentation.
<strong>MAN PAGES</strong>
The following man pages are available:
intro(1) This page
shell(1) Shell commands reference
init(1) Init system
dhcp(1) DHCP client
fetch(1) HTTP client
ping(1) ICMP ping
nslookup(1) DNS lookup
fontscale(1) Terminal font scaling
edit(1) Text editor
man(1) The man command itself
printctl(1) Printer control
printd(1) Print spooler daemon
wiki(1) Wikipedia article viewer
legal(7) Copyright and legal information
tls-errors(5) TLS/BearSSL error reference
syscalls(2) Overview of all syscalls
spawn(2) Process spawning
file(2) File I/O syscalls
framebuffer(2) Framebuffer access
malloc(3) Memory allocation
<strong>SEE ALSO</strong>
shell(1), syscalls(2), malloc(3)</code></pre>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
+156
View File
@@ -0,0 +1,156 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS manual page: legal(7) - MontaukOS legal/copyright information">
<title>legal(7) - MontaukOS Manual</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar .current {
color: #004499;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
pre { background: #f0f0f0; padding: 0.5em; overflow-x: auto; }
code { background: #f0f0f0; padding: 0 0.15em; }
pre code { padding: 0; }
.center { text-align: center; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">Man Pages</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h1>legal(7)</h1>
</div>
<hr>
<pre><code><strong>NAME</strong>
MontaukOS legal/copyright information
<strong>DESCRIPTION</strong>
Copyright (c) 2025-2026 Daniel Hammer, et al.
(includes contributors to other projects, i.e. The Limine Bootloader. Please refer to any other project's own license.)
MontaukOS is source-available software, provided under the terms of the
MontaukOS Software License. The full license text is on this system at
0:/os/licenses/LICENSE.txt.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
== License for the Limine C++ template (certain portions derive therefrom) ==
Copyright (C) 2023-2026 Mintsuki and contributors.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
<strong>THIRD-PARTY COMPONENTS</strong>
MontaukOS is distributed together with third-party components that remain
under their own licenses, including:
* Flat Remix icon theme, Copyright (C) Daniel Ruiz de Alegria - GPLv3
* DOOM engine (doom.elf, via doomgeneric), Copyright (C) id Software, Inc.
and contributors - GPLv2
* Limine bootloader, Copyright (C) Mintsuki and contributors - BSD 2-Clause
* BearSSL, Copyright (c) Thomas Pornin - MIT
* stb_image, Copyright (c) Sean Barrett - MIT
* JetBrains Mono font, Copyright The JetBrains Mono Project Authors - OFL-1.1
* Noto Serif font, Copyright The Noto Project Authors - OFL-1.1
* Roboto font, Copyright The Roboto Project Authors - OFL-1.1
* C059 font (URW Base 35), Copyright (C) (URW)++ Design and Development
GmbH - AGPLv3 with font-embedding exception
* Tiny C Compiler (tcc.elf, 0:/lib/tcc), Copyright (c) Fabrice Bellard and
contributors - LGPL-2.1
* Lua (lua.elf, 0:/lib/lua), Copyright (C) Lua.org, PUC-Rio - MIT
* Mozilla CA certificate bundle (0:/os/certs), Mozilla CA Certificate
Program - MPL-2.0
* Intel Bluetooth firmware (0:/os/firmware/intel), Copyright (c) Intel
Corporation - Intel redistributable firmware license
* Default wallpaper photo (0:/os/wallpapers), by Nikhil Kumar -
Unsplash License
Full license texts and notices are on this system in 0:/os/licenses/.</code></pre>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
+154
View File
@@ -0,0 +1,154 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS manual page: malloc(3) - userspace heap allocation">
<title>malloc(3) - MontaukOS Manual</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar .current {
color: #004499;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
pre { background: #f0f0f0; padding: 0.5em; overflow-x: auto; }
code { background: #f0f0f0; padding: 0 0.15em; }
pre code { padding: 0; }
.center { text-align: center; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">Man Pages</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h1>malloc(3)</h1>
</div>
<hr>
<pre><code><strong>NAME</strong>
malloc, mfree, realloc - userspace heap allocation
<strong>SYNOPSIS</strong>
<strong> void* montauk::malloc(uint64_t size);</strong>
<strong> void montauk::mfree(void* ptr);</strong>
<strong> void* montauk::realloc(void* ptr, uint64_t size);</strong>
<strong>DESCRIPTION</strong>
The userspace heap provides dynamic memory allocation on top of
the kernel's page-mapping syscall (SYS_ALLOC). Include the
header &lt;montauk/heap.h&gt; to use these functions.
<strong>malloc</strong>
Allocates 'size' bytes from the free list. Returns a 16-byte
aligned pointer, or nullptr on failure. When the free list is
empty, it requests more pages from the kernel via SYS_ALLOC
(minimum 16 KiB growth, initial seed of 64 KiB).
char* buf = (char*)montauk::malloc(1024);
<strong>mfree</strong>
Returns the block to the userspace free list. No syscall is
made -- the memory stays mapped and is immediately reusable.
Passing nullptr is a safe no-op.
montauk::mfree(buf);
<strong>realloc</strong>
Resizes the allocation to 'size' bytes. Allocates a new block,
copies the smaller of old/new sizes, and frees the old block.
If ptr is nullptr, behaves like malloc.
buf = (char*)montauk::realloc(buf, 2048);
<strong>IMPLEMENTATION</strong>
The allocator uses a linked free-list with first-fit search.
Blocks larger than needed are split. The allocation header is
16 bytes (magic + size). All allocations are 16-byte aligned.
The heap grows by requesting pages from the kernel via
SYS_ALLOC. These pages are never returned to the kernel (since
SYS_FREE is currently a no-op), but mfree makes them available
for future malloc calls within the process.
<strong>LOW-LEVEL PAGE API</strong>
For large allocations or when direct page control is needed:
void* montauk::alloc(uint64_t size); // SYS_ALLOC
void montauk::free(void* ptr); // SYS_FREE (no-op)
alloc() maps zeroed pages starting at 0x40000000 and growing
upward. Size is rounded up to 4 KiB page boundaries.
<strong>SEE ALSO</strong>
syscalls(2), file(2)</code></pre>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
+146
View File
@@ -0,0 +1,146 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS manual page: man(1) - display manual pages">
<title>man(1) - MontaukOS Manual</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar .current {
color: #004499;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
pre { background: #f0f0f0; padding: 0.5em; overflow-x: auto; }
code { background: #f0f0f0; padding: 0 0.15em; }
pre code { padding: 0; }
.center { text-align: center; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">Man Pages</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h1>man(1)</h1>
</div>
<hr>
<pre><code><strong>NAME</strong>
man - display manual pages
<strong>SYNOPSIS</strong>
<strong> man topic</strong>
<strong> man section topic</strong>
<strong>DESCRIPTION</strong>
The man command displays manual pages from the ramdisk in a
fullscreen pager. Pages are stored as plain text files with
simple formatting directives.
If no section is specified, sections 1 through 7 are searched
in order. If a section number is given, only that section is
checked.
<strong>KEY BINDINGS</strong>
<strong>Navigation</strong>
j, Down Arrow Scroll down one line
k, Up Arrow Scroll up one line
Space, Page Down Scroll down one page
b, Page Up Scroll up one page
g, Home Go to top
G, End Go to bottom
q Quit
<strong>SECTIONS</strong>
1 User commands and programs
2 System calls (kernel interface)
3 Library functions (userspace libraries)
7 Miscellaneous (legal, conventions)
<strong>FILES</strong>
Man pages are stored on the ramdisk at:
0:/man/&lt;topic&gt;.&lt;section&gt;
For example, man intro reads 0:/man/intro.1
<strong>EXAMPLES</strong>
man intro View the introduction
man 2 syscalls View syscall overview (section 2)
man malloc View malloc documentation
man legal View copyright information
<strong>SEE ALSO</strong>
intro(1), shell(1), syscalls(2)</code></pre>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
+133
View File
@@ -0,0 +1,133 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS manual page: nslookup(1) - DNS hostname lookup">
<title>nslookup(1) - MontaukOS Manual</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar .current {
color: #004499;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
pre { background: #f0f0f0; padding: 0.5em; overflow-x: auto; }
code { background: #f0f0f0; padding: 0 0.15em; }
pre code { padding: 0; }
.center { text-align: center; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">Man Pages</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h1>nslookup(1)</h1>
</div>
<hr>
<pre><code><strong>NAME</strong>
nslookup - DNS hostname lookup
<strong>SYNOPSIS</strong>
nslookup &lt;hostname&gt;
<strong>DESCRIPTION</strong>
Resolves a hostname to an IPv4 address using the configured
DNS server and prints the result.
The kernel DNS resolver sends a UDP query to port 53 of the
configured DNS server and waits up to 5 seconds for a reply.
Results are cached in an 8-entry kernel cache with TTL support.
<strong>OUTPUT</strong>
Server: 10.0.68.1
Name: example.com
Address: 93.184.216.34
Time: 3ms
If the lookup fails:
Could not resolve: badhost.invalid
<strong>DNS CONFIGURATION</strong>
The DNS server address is obtained automatically via DHCP.
It can also be viewed and set with ifconfig. The default
is 10.0.68.1 (QEMU user-mode networking).
<strong>EXAMPLES</strong>
nslookup google.com
nslookup icanhazip.com
<strong>SEE ALSO</strong>
ping(1), fetch(1), dhcp(1), ifconfig(1), syscalls(2)</code></pre>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
+134
View File
@@ -0,0 +1,134 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS manual page: ping(1) - send ICMP echo requests">
<title>ping(1) - MontaukOS Manual</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar .current {
color: #004499;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
pre { background: #f0f0f0; padding: 0.5em; overflow-x: auto; }
code { background: #f0f0f0; padding: 0 0.15em; }
pre code { padding: 0; }
.center { text-align: center; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">Man Pages</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h1>ping(1)</h1>
</div>
<hr>
<pre><code><strong>NAME</strong>
ping - send ICMP echo requests
<strong>SYNOPSIS</strong>
ping &lt;host&gt;
<strong>DESCRIPTION</strong>
Sends 4 ICMP echo requests to the specified host and prints
the round-trip time for each reply.
The host may be an IP address or a hostname. Hostnames are
resolved via the configured DNS server.
Each request has a 3-second timeout. Requests are sent at
1-second intervals.
<strong>OUTPUT</strong>
PING example.com (93.184.216.34)
Reply from 93.184.216.34: time=12ms
Reply from 93.184.216.34: time=11ms
Reply from 93.184.216.34: time=13ms
Reply from 93.184.216.34: time=11ms
If a reply is not received within the timeout:
Request timed out
<strong>EXAMPLES</strong>
ping 10.0.68.1
Ping the gateway by IP address.
ping google.com
Ping by hostname (requires DNS).
<strong>SEE ALSO</strong>
nslookup(1), ifconfig(1), shell(1), syscalls(2)</code></pre>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
+129
View File
@@ -0,0 +1,129 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS manual page: printctl(1) - configure printers and submit print jobs">
<title>printctl(1) - MontaukOS Manual</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar .current {
color: #004499;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
pre { background: #f0f0f0; padding: 0.5em; overflow-x: auto; }
code { background: #f0f0f0; padding: 0 0.15em; }
pre code { padding: 0; }
.center { text-align: center; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">Man Pages</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h1>printctl(1)</h1>
</div>
<hr>
<pre><code><strong>NAME</strong>
printctl - configure printers and submit print jobs
<strong>SYNOPSIS</strong>
<strong>printctl</strong>
<em>command</em>
[<em>options</em>]
<strong>DESCRIPTION</strong>
<strong>printctl</strong>
manages the MontaukOS userspace print spooler and submits print jobs to IPP printers.
<strong>COMMANDS</strong>
<strong>set-printer <em>URI</em></strong>
Store the default printer URI.
<strong>show-printer</strong>
Print the configured default printer URI.
<strong>print <em>FILE</em> [--printer <em>URI</em>] [--name <em>JOB</em>] [--wait]</strong>
Queue a file for printing.
<strong>test-page [--printer <em>URI</em>] [--wait] [--no-wait]</strong>
Generate and queue a simple test page.
<strong>status [--verbose]</strong>
Show daemon state and queued, active, completed, and failed jobs.
<strong>inspect <em>JOB-ID</em></strong>
Show full metadata and debug details for a queued, active, completed, or failed job.
<strong>probe [<em>URI</em>]</strong>
Probe the configured printer, print host and resolution details, and show IPP capability diagnostics.</code></pre>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
+109
View File
@@ -0,0 +1,109 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS manual page: printd(1) - MontaukOS userspace print spooler daemon">
<title>printd(1) - MontaukOS Manual</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar .current {
color: #004499;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
pre { background: #f0f0f0; padding: 0.5em; overflow-x: auto; }
code { background: #f0f0f0; padding: 0 0.15em; }
pre code { padding: 0; }
.center { text-align: center; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">Man Pages</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h1>printd(1)</h1>
</div>
<hr>
<pre><code><strong>NAME</strong>
printd - MontaukOS userspace print spooler daemon
<strong>SYNOPSIS</strong>
<strong>printd</strong>
<strong>DESCRIPTION</strong>
<strong>printd</strong>
monitors the print spool directories, claims queued jobs, and delivers them to IPP printers.
It is normally launched automatically by
<strong>init</strong>(1)
and does not require direct user interaction.</code></pre>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
+292
View File
@@ -0,0 +1,292 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS manual page: shell(1) - MontaukOS interactive command shell">
<title>shell(1) - MontaukOS Manual</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar .current {
color: #004499;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
pre { background: #f0f0f0; padding: 0.5em; overflow-x: auto; }
code { background: #f0f0f0; padding: 0 0.15em; }
pre code { padding: 0; }
.center { text-align: center; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">Man Pages</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h1>shell(1)</h1>
</div>
<hr>
<pre><code><strong>NAME</strong>
shell - MontaukOS interactive command shell
<strong>DESCRIPTION</strong>
The MontaukOS shell is a command interpreter launched by init
after system services have started. It provides command
execution, file navigation, shell variables, command chaining,
tab completion, and command history.
Commands are either shell builtins or external programs. When
a command is not a builtin, the shell searches for a matching
ELF binary and executes it as a child process.
<strong>COMMAND RESOLUTION</strong>
When a non-builtin command is entered, the shell searches for
a matching binary in the following order:
1. &lt;cwd&gt;/&lt;command&gt; (exact name, e.g. "hello.elf")
2. &lt;cwd&gt;/&lt;command&gt;.elf
3. 0:/os/&lt;command&gt;.elf
4. 0:/os/&lt;command&gt; (no extension)
5. If on a non-zero drive, the drive root: &lt;drive&gt;:/&lt;command&gt;[.elf]
A command containing a "/" (or an explicit drive prefix, or a
leading "." or "/") is instead treated as a direct path and
resolved by the kernel against the process CWD, trying the
path as-is and then with ".elf" appended.
The first match is spawned and the shell waits for it to exit.
If no match is found, the shell prints:
&lt;command&gt;: command not found
Arguments after the command name are passed to the spawned
process.
<strong>BUILTINS</strong>
<strong>help</strong>
Display a categorized list of available commands.
<strong>ls [dir]</strong>
List files in the current directory, or in the specified
directory. Directory entries are shown with a trailing slash.
Examples: ls, ls man, ls os
<strong>cd [dir]</strong>
Change the working directory. With no argument, returns to the
logged-in user's home directory (0:/users/&lt;user&gt;); with /,
returns to the drive root. Use cd .. to go up one level.
The shell prompt reflects the current directory.
Examples: cd os, cd .., cd
<strong>pwd</strong>
Print the current working directory as an absolute path
(e.g. "0:/os").
<strong>echo [-n] ...</strong>
Print the arguments. -n suppresses the trailing newline.
<strong>set [VAR=value]</strong>
With no argument, list all shell variables (built-in and
user-defined). With VAR=value, set a variable. With a bare
name, print that variable's value.
<strong>unset VAR</strong>
Remove a user-defined shell variable.
<strong>true / false</strong>
Return exit status 0 / 1 without doing anything. Useful with
&amp;&amp; and ||.
<strong>N:</strong>
A bare "&lt;number&gt;:" (e.g. "1:") switches the current drive to
drive N and resets the working directory to that drive's root.
<strong>exit</strong>
Terminate the shell process (with the last command's exit code).
<strong>SYNTAX</strong>
<strong>Variables</strong>
NAME=value Set a shell variable (no leading $)
$VAR or ${VAR} Expand a variable's value
$? Exit status of the last command
$USER, $HOME, $PWD Built-in dynamic variables (session user,
home directory, current directory)
\$ Escape a literal '$'
<strong>Tilde expansion</strong>
A leading ~ expands to the session home directory
(0:/users/&lt;user&gt;) when followed by end-of-string, '/', or a
space.
<strong>Command chaining</strong>
cmd1 ; cmd2 Run cmd2 unconditionally after cmd1
cmd1 &amp;&amp; cmd2 Run cmd2 only if cmd1 succeeded (exit 0)
cmd1 || cmd2 Run cmd2 only if cmd1 failed (nonzero exit)
Single and double quotes protect ;, &amp;&amp;, and || from being
treated as separators.
<strong>Comments</strong>
A '#' outside of quotes starts a comment; the rest of the line
is ignored.
<strong>EXTERNAL COMMANDS</strong>
All external commands live in 0:/os/ (see COMMAND RESOLUTION).
Where a dedicated man page exists it is noted below; run
'man &lt;command&gt;' for details.
<strong>File commands</strong>
cat &lt;file&gt; Display file contents
edit [file] Text editor -- see edit(1)
copy &lt;src&gt; &lt;dst&gt; Copy a file
move &lt;src&gt; &lt;dst&gt; Move/rename a file
rm &lt;file&gt; Remove a file
touch &lt;file&gt; Create an empty file
<strong>System commands</strong>
man &lt;topic&gt; View manual pages -- see man(1)
whoami Print the current username
info / mtkfetch Show system information
date Show current date and time
uptime Show system uptime
proclist List running processes
power CPU power/thermal status (power [watch [secs]])
clear Clear the screen and framebuffer
fontscale [n] Get or set terminal font scale -- see fontscale(1)
lua Lua interpreter
tcc TinyCC (in-system C compiler)
reset Reboot the system
shutdown Shut down the system
<strong>Network commands</strong>
ping &lt;host&gt; Send ICMP echo requests -- see ping(1)
nslookup &lt;host&gt; DNS lookup -- see nslookup(1)
ifconfig Show/set network configuration
tcpconnect &lt;host&gt; &lt;port&gt; Interactive TCP client
irc IRC client
dhcp DHCP client -- see dhcp(1)
fetch &lt;url&gt; HTTP/HTTPS client (TLS 1.2) -- see fetch(1)
wiki &lt;title&gt; Wikipedia article viewer -- see wiki(1)
httpd HTTP server
Network commands accept both IP addresses and hostnames.
Hostnames are resolved via the configured DNS server.
<strong>Bluetooth</strong>
btlist List connected Bluetooth devices
btbonds List bonded (paired) Bluetooth devices
<strong>Software-defined radio</strong>
sdr [freqMHz [rateHz]] Receive and report basic signal
statistics from an attached RTL-SDR dongle
GUI applications (window server programs, not run from the
shell prompt as text commands) live under 0:/apps/, one bundle
per app -- e.g. doom, terminal, texteditor, spreadsheet,
wordprocessor, paint, calculator, network, bluetooth, audio,
disks, devexplorer, procmgr, powermgr, printers, timezone,
weather, wikipedia. There is no 0:/games/ directory.
<strong>TAB COMPLETION</strong>
Pressing Tab completes the word under the cursor against, in
order: executable names in 0:/os/, shell builtins, and file/
directory entries in the current directory. A single match is
completed inline; multiple matches are listed below the prompt.
<strong>INPUT</strong>
The shell uses non-blocking keyboard input via SYS_GETKEY (with
SYS_INPUT_WAIT to sleep between events) to support arrow key
detection. Lines are limited to 255 characters.
<strong>Editing</strong>
Backspace Delete character before cursor
Tab Tab-complete the current word
Enter Execute the command line
<strong>History</strong>
The shell stores the last 32 unique commands. Duplicate
consecutive entries are suppressed.
Up Arrow Recall previous command
Down Arrow Recall next command (or clear line)
<strong>PROMPT</strong>
The prompt displays the current drive and working directory:
0:/&gt; _ (at root of drive 0)
0:/os&gt; _ (in os/ directory)
1:/&gt; _ (at root of drive 1)
<strong>SEE ALSO</strong>
man(1), intro(1), syscalls(2)</code></pre>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
+166
View File
@@ -0,0 +1,166 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS manual page: spawn(2) - create and wait for processes">
<title>spawn(2) - MontaukOS Manual</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar .current {
color: #004499;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
pre { background: #f0f0f0; padding: 0.5em; overflow-x: auto; }
code { background: #f0f0f0; padding: 0 0.15em; }
pre code { padding: 0; }
.center { text-align: center; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">Man Pages</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h1>spawn(2)</h1>
</div>
<hr>
<pre><code><strong>NAME</strong>
spawn, waitpid - create and wait for processes
<strong>SYNOPSIS</strong>
<strong> int montauk::spawn(const char* path, const char* args = nullptr);</strong>
<strong> void montauk::waitpid(int pid);</strong>
<strong> int montauk::getargs(char* buf, uint64_t maxLen);</strong>
<strong>DESCRIPTION</strong>
<strong>spawn</strong>
Loads the ELF64 binary at the given VFS path and creates a new
process. The path must include the drive prefix, for example:
int pid = montauk::spawn("0:/os/hello.elf");
An optional second argument passes a string to the child:
int pid = montauk::spawn("0:/os/man.elf", "intro");
The new process gets its own PML4 page table, a 32 KiB stack
(at 0x7FFFFF7000-0x7FFFFFF000), and begins executing at the
ELF entry point (_start).
Returns the new process's PID on success, or -1 on failure.
Failure occurs when there are no free process slots (max 256),
the file cannot be found, or the ELF is invalid.
<strong>waitpid</strong>
Blocks the calling process until the process with the given PID
has exited. Internally, this yields the CPU in a loop:
montauk::waitpid(pid);
This is how the shell implements foreground process execution --
it spawns a child and waits for it to complete before showing
the next prompt.
<strong>EXAMPLES</strong>
Spawn a program and wait for it:
int pid = montauk::spawn("0:/os/hello.elf");
if (pid &lt; 0) {
montauk::print("spawn failed\n");
} else {
montauk::waitpid(pid);
montauk::print("child exited\n");
}
<strong>getargs</strong>
Copies the argument string into buf (up to maxLen bytes, always
null-terminated). Returns the number of characters copied, or
-1 on error.
char args[256];
montauk::getargs(args, sizeof(args));
The argument string is set by the parent when calling spawn().
If no arguments were provided, the buffer will be empty.
<strong>NOTES</strong>
The _start() entry point receives no argc/argv. Use getargs()
to retrieve the argument string passed by the parent process.
Process exit codes are not yet collected by waitpid.
<strong>SEE ALSO</strong>
syscalls(2), file(2)</code></pre>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
+884
View File
@@ -0,0 +1,884 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS manual page: syscalls(2) - overview of MontaukOS system calls">
<title>syscalls(2) - MontaukOS Manual</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar .current {
color: #004499;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
pre { background: #f0f0f0; padding: 0.5em; overflow-x: auto; }
code { background: #f0f0f0; padding: 0 0.15em; }
pre code { padding: 0; }
.center { text-align: center; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">Man Pages</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h1>syscalls(2)</h1>
</div>
<hr>
<pre><code><strong>NAME</strong>
syscalls - overview of MontaukOS system calls
<strong>DESCRIPTION</strong>
MontaukOS provides 150 system calls (numbers 0-149, sparsely
assigned -- not every number in the range is in use) for
userspace programs. Syscalls use the x86-64 SYSCALL instruction
with the following register convention:
RAX Syscall number (in) / return value (out)
RDI Argument 1
RSI Argument 2
RDX Argument 3
R10 Argument 4
R8 Argument 5
R9 Argument 6
Include &lt;Api/Syscall.hpp&gt; for the numeric SYS_* constants and
ABI structs, and &lt;montauk/syscall.h&gt; for typed wrappers in the
montauk:: namespace. This page groups syscalls the same way the
kernel source does (one subsystem header per group).
<strong>PROCESS MANAGEMENT</strong>
<strong>SYS_EXIT (0)</strong>
Terminate the calling process.
[[noreturn]] void montauk::exit(int code = 0);
<strong>SYS_YIELD (1)</strong>
Yield the remainder of the time slice.
void montauk::yield();
<strong>SYS_SLEEP_MS (2)</strong>
Sleep for at least the given number of milliseconds.
void montauk::sleep_ms(uint64_t ms);
<strong>SYS_GETPID (3)</strong>
Return the PID of the calling process.
int montauk::getpid();
<strong>SYS_SPAWN (20)</strong>
Spawn a new process from an ELF binary on the VFS.
int montauk::spawn(const char* path, const char* args = nullptr);
<strong>SYS_WAITPID (23)</strong>
Block until the given process has exited.
void montauk::waitpid(int pid);
<strong>SYS_GETARGS (25)</strong>
Get the argument string passed to this process at spawn time.
int montauk::getargs(char* buf, uint64_t maxLen);
<strong>SYS_PROCLIST (61)</strong>
List running processes (pid, parent, state, name, heap usage,
accumulated CPU time).
int montauk::proclist(montauk::abi::ProcInfo* buf, int max);
<strong>SYS_KILL (62)</strong>
Terminate another process by PID.
int montauk::kill(int pid);
<strong>SYS_CHDIR (96)</strong>
Change the calling process's current working directory.
int montauk::chdir(const char* path);
<strong>SYS_GETCWD (95)</strong>
Get the calling process's current working directory.
int montauk::getcwd(char* buf, uint64_t maxLen);
<strong>SYS_SETUSER (92)</strong>
Associate a process with a logged-in user name (used by login/session
management).
int montauk::setuser(int pid, const char* name);
<strong>SYS_GETUSER (93)</strong>
Get the user name associated with the calling process.
int montauk::getuser(char* buf, uint64_t maxLen);
<strong>THREADING</strong>
Threads share the spawning process's address space and heap
(see montauk/heap.h for the heap lock). Declared in
montauk/thread.h.
<strong>SYS_THREAD_SPAWN (130)</strong>
Spawn a new thread in the calling process. Returns a positive
TID on success, -1 on failure.
int montauk::thread_spawn(ThreadEntry entry, void* arg,
uint64_t stack_bytes = 0);
<strong>SYS_THREAD_EXIT (131)</strong>
Terminate only the calling thread. If it is the main thread,
the whole process exits.
[[noreturn]] void montauk::thread_exit(int code = 0);
<strong>SYS_THREAD_JOIN (132)</strong>
Block until the given TID exits, then reclaim its kernel state.
int montauk::thread_join(int tid, int* out_code = nullptr);
<strong>SYS_THREAD_SELF (133)</strong>
Return the calling thread's TID (equals getpid() for the main
thread).
int montauk::thread_self();
<strong>CONSOLE I/O</strong>
<strong>SYS_PRINT (4)</strong>
Write a null-terminated string to the terminal.
void montauk::print(const char* text);
<strong>SYS_PUTCHAR (5)</strong>
Write a single character to the terminal.
void montauk::putchar(char c);
<strong>FILE I/O</strong>
<strong>SYS_OPEN (6)</strong>
Open a file. Returns a handle or negative on error.
int montauk::open(const char* path);
<strong>SYS_READ (7)</strong>
Read bytes from a file at a given offset.
int montauk::read(int h, uint8_t* buf, uint64_t off, uint64_t sz);
<strong>SYS_GETSIZE (8)</strong>
Get the size of an open file in bytes.
uint64_t montauk::getsize(int handle);
<strong>SYS_CLOSE (9)</strong>
Close a file handle.
void montauk::close(int handle);
<strong>SYS_READDIR (10)</strong>
List directory entries (max 256 per call for VFS directories,
128 for driver-backed listings such as 0:/os/). For larger
directories use SYS_READDIR_AT.
int montauk::readdir(const char* path, const char** names, int max);
<strong>SYS_READDIR_AT (136)</strong>
Paginated directory read. Returns entries starting at
startIndex; call repeatedly with startIndex advanced by the
returned count until it returns 0 to enumerate directories of
any size.
int montauk::readdir_at(const char* path, const char** names,
int max, int startIndex);
<strong>SYS_FWRITE (41)</strong>
Write bytes to a file at a given offset.
int montauk::fwrite(int handle, const uint8_t* buf,
uint64_t offset, uint64_t size);
<strong>SYS_FCREATE (42)</strong>
Create a new file on the target volume. Returns a handle or
negative on error.
int montauk::fcreate(const char* path);
<strong>SYS_FDELETE (77)</strong>
Delete a file.
int montauk::fdelete(const char* path);
<strong>SYS_FMKDIR (78)</strong>
Create a directory.
int montauk::fmkdir(const char* path);
<strong>SYS_FRENAME (94)</strong>
Rename or move a file/directory (used as the basis for file
manager move operations).
int montauk::frename(const char* oldPath, const char* newPath);
<strong>SYS_DRIVELIST (79)</strong>
List mounted drive numbers.
int montauk::drivelist(int* outDrives, int max);
<strong>SYS_DRIVELABEL (124)</strong>
Get the volume label of a drive.
int montauk::drivelabel(int drive, char* outLabel, int maxLen);
<strong>SYS_DRIVEKIND (127)</strong>
Get the block device kind backing a drive: 0=unknown/ramdisk,
1=SATA, 2=SATAPI, 3=NVMe, 4=USB mass storage.
int montauk::drivekind(int drive);
<strong>MEMORY</strong>
<strong>SYS_ALLOC (11)</strong>
Map zeroed pages into the process address space.
void* montauk::alloc(uint64_t size);
<strong>SYS_FREE (12)</strong>
Reserved (currently a no-op).
void montauk::free(void* ptr);
<strong>SYS_MEMSTATS (67)</strong>
Get kernel-wide physical memory usage (total/free/used bytes,
page size).
void montauk::memstats(montauk::abi::MemStats* out);
<strong>TIMEKEEPING</strong>
<strong>SYS_GETTICKS (13)</strong>
Get APIC timer ticks since boot.
uint64_t montauk::get_ticks();
<strong>SYS_GETMILLISECONDS (14)</strong>
Get milliseconds elapsed since boot.
uint64_t montauk::get_milliseconds();
<strong>SYS_GETTIME (28)</strong>
Get the current wall-clock date and time (UTC).
Fills a montauk::abi::DateTime struct with Year, Month, Day,
Hour, Minute, and Second fields.
void montauk::gettime(montauk::abi::DateTime* out);
<strong>SYS_SETTZ (90)</strong>
Set the process/system timezone offset, in minutes from UTC.
void montauk::settz(int offset_minutes);
<strong>SYS_GETTZ (91)</strong>
Get the current timezone offset, in minutes from UTC.
int montauk::gettz();
<strong>SYSTEM</strong>
<strong>SYS_GETINFO (15)</strong>
Get OS name, version string, API version, max process count,
and the monotonic kernel build number.
void montauk::get_info(montauk::abi::SysInfo* info);
<strong>KEYBOARD</strong>
<strong>SYS_ISKEYAVAILABLE (16)</strong>
Check if a key event is pending (non-blocking).
bool montauk::is_key_available();
<strong>SYS_GETKEY (17)</strong>
Get the next key event (press or release).
void montauk::getkey(montauk::abi::KeyEvent* out);
<strong>SYS_GETCHAR (18)</strong>
Block until a printable character is typed.
char montauk::getchar();
<strong>SYS_INPUT_WAIT (123)</strong>
Block until the input serial number differs from
observedSerial or the timeout elapses; used to sleep
efficiently between input-driven redraws.
uint64_t montauk::input_wait(uint64_t observedSerial, uint64_t timeoutMs);
<strong>MOUSE</strong>
<strong>SYS_MOUSESTATE (47)</strong>
Get the current mouse position, scroll delta, and button mask.
void montauk::mouse_state(montauk::abi::MouseState* out);
<strong>SYS_SETMOUSEBOUNDS (48)</strong>
Set the maximum X/Y the mouse cursor may reach (e.g. framebuffer
dimensions).
void montauk::set_mouse_bounds(int32_t maxX, int32_t maxY);
<strong>NETWORKING</strong>
<strong>SYS_PING (19)</strong>
Send an ICMP echo request and wait for reply.
int32_t montauk::ping(uint32_t ip, uint32_t timeoutMs = 3000);
<strong>SYS_RESOLVE (44)</strong>
Resolve a hostname to an IPv4 address via DNS. Sends a UDP
query to the configured DNS server and waits up to 5 seconds
for a reply. Returns the IP in network byte order, or 0 on
failure. IP address strings (e.g. "10.0.0.1") are detected
and returned directly without a DNS query.
uint32_t montauk::resolve(const char* hostname);
<strong>SYS_GETNETCFG (37)</strong>
Get the current network configuration (IP, mask, gateway, MAC,
DNS server).
void montauk::get_netcfg(montauk::abi::NetCfg* out);
<strong>SYS_SETNETCFG (38)</strong>
Set the network configuration (IP, mask, gateway, DNS server).
int montauk::set_netcfg(const montauk::abi::NetCfg* cfg);
<strong>SYS_NETSTATUS (125)</strong>
Get adapter status including driver name, link state, polling mode,
and RX/TX packet counters.
int montauk::net_status(montauk::abi::NetStatus* out);
<strong>SOCKETS</strong>
<strong>SYS_SOCKET (29)</strong>
Create a socket. type=SOCK_TCP (1) or SOCK_UDP (2).
Returns fd or -1.
int montauk::socket(int type);
<strong>SYS_CONNECT (30)</strong>
Connect a TCP socket to a remote host.
int montauk::connect(int fd, uint32_t ip, uint16_t port);
<strong>SYS_BIND (31)</strong>
Bind a socket to a local port for listening.
int montauk::bind(int fd, uint16_t port);
<strong>SYS_LISTEN (32)</strong>
Start listening for incoming TCP connections.
int montauk::listen(int fd);
<strong>SYS_ACCEPT (33)</strong>
Accept an incoming connection on a listening socket.
Returns a new socket fd for the client connection.
int montauk::accept(int fd);
<strong>SYS_SEND (34)</strong>
Send data on a connected socket. Returns bytes sent.
int montauk::send(int fd, const void* data, uint32_t len);
<strong>SYS_RECV (35)</strong>
Receive data from a connected socket. Returns bytes
received, 0 if no data available, or -1 on close/error.
int montauk::recv(int fd, void* buf, uint32_t maxLen);
<strong>SYS_CLOSESOCK (36)</strong>
Close a socket and release its resources.
int montauk::closesocket(int fd);
<strong>SYS_SENDTO (39)</strong>
Send a UDP datagram to a specific destination.
int montauk::sendto(int fd, const void* data, uint32_t len,
uint32_t destIp, uint16_t destPort);
<strong>SYS_RECVFROM (40)</strong>
Receive a UDP datagram. Returns the source address.
int montauk::recvfrom(int fd, void* buf, uint32_t maxLen,
uint32_t* srcIp, uint16_t* srcPort);
<strong>FRAMEBUFFER</strong>
<strong>SYS_FBINFO (21)</strong>
Get framebuffer dimensions and format.
void montauk::fb_info(montauk::abi::FbInfo* info);
<strong>SYS_FBMAP (22)</strong>
Map the framebuffer into process memory.
void* montauk::fb_map();
<strong>TERMINAL</strong>
<strong>SYS_TERMSIZE (24)</strong>
Get terminal dimensions (columns and rows).
void montauk::termsize(int* cols, int* rows);
<strong>SYS_TERMSCALE (43)</strong>
Get or set the terminal font scale factor. When scale_x is 0,
returns the current scale as (scale_y &lt;&lt; 32 | scale_x). When
scale_x is non-zero, sets the font scale and returns the new
terminal dimensions as (rows &lt;&lt; 32 | cols).
void montauk::termscale(int scale_x, int scale_y);
void montauk::get_termscale(int* scale_x, int* scale_y);
<strong>RANDOM</strong>
<strong>SYS_GETRANDOM (45)</strong>
Fill a buffer with random bytes using RDTSC-seeded entropy.
Returns the number of bytes written.
int64_t montauk::getrandom(void* buf, uint32_t len);
<strong>POWER MANAGEMENT</strong>
<strong>SYS_RESET (26)</strong>
Reboot the system.
[[noreturn]] void montauk::reset();
<strong>SYS_SHUTDOWN (27)</strong>
Shut down the system.
[[noreturn]] void montauk::shutdown();
<strong>SYS_SUSPEND (89)</strong>
Enter ACPI S3 sleep. Returns after wake, 0 on success.
int montauk::suspend();
<strong>SYS_POWER_REQUEST (135)</strong>
Cross-process graceful power-off request channel. The desktop
posts a pending action (POWER_REQ_SHUTDOWN / POWER_REQ_REBOOT)
then exits; login.elf reads it with POWER_REQ_QUERY
(read-and-clear), runs the shutdown stages, and finally calls
shutdown()/reset(). See montauk::abi::PowerRequestAction.
int montauk::power_request(int action);
<strong>SYS_POWERINFO (149)</strong>
Get the CPU power/thermal snapshot (HWP state, throttling,
package temperature, base/max/effective frequency). Returns 0
on success, -1 if unsupported by the running hardware.
int montauk::syscall1(SYS_POWERINFO, (uint64_t)&amp;out);
// out: montauk::abi::PowerInfo*
<strong>KERNEL LOG</strong>
<strong>SYS_KLOG (46)</strong>
Read from the kernel ring log buffer.
int64_t montauk::read_klog(char* buf, uint64_t size);
<strong>I/O REDIRECTION</strong>
Used by the terminal app and similar programs to run a child
process with its console I/O captured instead of going directly
to the framebuffer console.
<strong>SYS_SPAWN_REDIR (49)</strong>
Spawn a process with its console I/O redirected to the caller.
int montauk::spawn_redir(const char* path, const char* args = nullptr);
<strong>SYS_CHILDIO_READ (50)</strong>
Read buffered output produced by a redirected child.
int montauk::childio_read(int childPid, char* buf, int maxLen);
<strong>SYS_CHILDIO_WRITE (51)</strong>
Write text input to a redirected child's stdin.
int montauk::childio_write(int childPid, const char* data, int len);
<strong>SYS_CHILDIO_WRITEKEY (52)</strong>
Forward a raw key event to a redirected child.
int montauk::childio_writekey(int childPid, const montauk::abi::KeyEvent* key);
<strong>SYS_CHILDIO_SETTERMSZ (53)</strong>
Tell a redirected child its terminal dimensions changed.
int montauk::childio_settermsz(int childPid, int cols, int rows);
<strong>WINDOW SERVER</strong>
Window server syscalls are used by GUI programs to create and
drive an on-screen window (see montauk/Window.hpp for the
higher-level win_create/win_poll/win_present wrappers built on
top of these).
<strong>SYS_WINCREATE (54)</strong>
Create a window and get its pixel buffer.
int montauk::win_create(const char* title, int w, int h,
montauk::abi::WinCreateResult* result);
<strong>SYS_WINDESTROY (55)</strong>
Destroy a window.
int montauk::win_destroy(int id);
<strong>SYS_WINPRESENT (56)</strong>
Flush the pixel buffer to the screen.
uint64_t montauk::win_present(int id);
<strong>SYS_WINPOLL (57)</strong>
Poll the next event (key, mouse, resize, close, scale) for a
window.
int montauk::win_poll(int id, montauk::abi::WinEvent* event);
<strong>SYS_WINENUM (58)</strong>
Enumerate all windows currently managed by the window server.
int montauk::win_enumerate(montauk::abi::WinInfo* info, int max);
<strong>SYS_WINMAP (59)</strong>
Map (or re-map) a window's pixel buffer into the caller's
address space.
uint64_t montauk::win_map(int id);
<strong>SYS_WINUNMAP (97)</strong>
Unmap a window's pixel buffer from the caller's address space.
int montauk::win_unmap(int id);
<strong>SYS_WINSENDEVENT (60)</strong>
Inject an event into a window's event queue.
int montauk::win_sendevent(int id, const montauk::abi::WinEvent* event);
<strong>SYS_WINRESIZE (64)</strong>
Resize a window and its pixel buffer.
uint64_t montauk::win_resize(int id, int w, int h);
<strong>SYS_WINSETSCALE (65)</strong>
Set the desktop-wide UI scale factor.
int montauk::win_setscale(int scale);
<strong>SYS_WINGETSCALE (66)</strong>
Get the desktop-wide UI scale factor.
int montauk::win_getscale();
<strong>SYS_WINSETCURSOR (68)</strong>
Set the mouse cursor shown while over a window (0=arrow,
1=resize_h, 2=resize_v).
int montauk::win_setcursor(int id, int cursor);
<strong>SYS_WINSETFLAGS (126)</strong>
Set window flags (e.g. WIN_FLAG_FULLSCREEN).
int montauk::win_setflags(int id, uint32_t flags);
<strong>DEVICES</strong>
<strong>SYS_DEVLIST (63)</strong>
Enumerate detected devices (CPU, interrupts, timers, input,
USB, network, display, storage, PCI, audio, ACPI) for the
device explorer app.
int montauk::devlist(montauk::abi::DevInfo* buf, int max);
<strong>SYS_DISKINFO (69)</strong>
Get detailed info for one block device (model, serial, sector
size, NCQ/TRIM/SMART support, etc.).
int montauk::diskinfo(montauk::abi::DiskInfo* buf, int port);
<strong>STORAGE</strong>
<strong>SYS_PARTLIST (70)</strong>
Enumerate GPT partitions across all block devices.
int montauk::partlist(montauk::abi::PartInfo* buf, int max);
<strong>SYS_DISKREAD (71)</strong>
Raw, driver-agnostic sector read from a block device.
int64_t montauk::disk_read(int blockDev, uint64_t lba,
uint32_t sectorCount, void* buf);
<strong>SYS_DISKWRITE (72)</strong>
Raw, driver-agnostic sector write to a block device.
int64_t montauk::disk_write(int blockDev, uint64_t lba,
uint32_t sectorCount, const void* buf);
<strong>SYS_GPTINIT (73)</strong>
Initialize a fresh GPT partition table on a block device.
int montauk::gpt_init(int blockDev);
<strong>SYS_GPTADD (74)</strong>
Add a partition to an existing GPT table.
int montauk::gpt_add(const montauk::abi::GptAddParams* params);
<strong>SYS_FSMOUNT (75)</strong>
Mount a partition's filesystem onto a drive number.
int montauk::fs_mount(int partIndex, int driveNum);
<strong>SYS_FSFORMAT (76)</strong>
Format a partition with a filesystem (FS_TYPE_FAT32 or
FS_TYPE_EXT2).
int montauk::fs_format(const montauk::abi::FsFormatParams* params);
<strong>SYS_FS_SYNC (134)</strong>
Flush all block-device write caches and cleanly unmount
disk-backed volumes ahead of power-off. Returns the number of
volumes unmounted. Part of the graceful shutdown sequence
(see SYS_POWER_REQUEST).
int montauk::fs_sync();
<strong>AUDIO</strong>
<strong>SYS_AUDIOOPEN (80)</strong>
Open a mixer output stream at the given sample rate, channel
count, and bit depth. Returns a stream handle.
int montauk::audio_open(uint32_t sampleRate, uint8_t channels,
uint8_t bitsPerSample);
<strong>SYS_AUDIOCLOSE (81)</strong>
Close an audio stream.
void montauk::audio_close(int handle);
<strong>SYS_AUDIOWRITE (82)</strong>
Write PCM samples to an audio stream.
int montauk::audio_write(int handle, const void* data, uint32_t size);
<strong>SYS_AUDIOCTL (83)</strong>
Control an audio stream or the global mixer. Commands 0-3 act
on the stream named by the handle argument; commands 4-12 act
on that stream's routing/mute state or the global master and
ignore or reuse the handle as documented below.
int montauk::audio_ctl(int handle, int cmd, int value);
Convenience wrappers (all thin calls onto audio_ctl):
audio_set_volume, audio_get_volume AUDIO_CTL_{SET,GET}_VOLUME (0/1)
audio_get_pos AUDIO_CTL_GET_POS (2)
audio_pause, audio_resume AUDIO_CTL_PAUSE (3)
audio_get_output AUDIO_CTL_GET_OUTPUT (4): 0=HDA, 1=Bluetooth
(SET_OUTPUT, 5) switch a stream's output route
audio_bt_status AUDIO_CTL_BT_STATUS (6)
audio_set_master_volume, _get_ AUDIO_CTL_{SET,GET}_MASTER_VOLUME (7/8), 0-100
audio_set_mute, audio_get_mute AUDIO_CTL_{SET,GET}_MUTE (9/10), per-stream
audio_set_master_mute, _get_ AUDIO_CTL_{SET,GET}_MASTER_MUTE (11/12)
<strong>SYS_AUDIOLIST (128)</strong>
Enumerate active mixer streams (owner PID, name, format,
volume, mute/pause state).
int montauk::audio_list(montauk::abi::AudioStreamInfo* buf, int maxCount);
<strong>SYS_AUDIOWAIT (129)</strong>
Return the current mixer state serial. With timeoutMs &gt; 0,
blocks until the serial differs from prevSerial or the timeout
elapses; with timeoutMs == 0 it returns immediately.
uint64_t montauk::audio_wait(uint64_t prevSerial, uint64_t timeoutMs);
<strong>BLUETOOTH</strong>
<strong>SYS_BTSCAN (84)</strong>
Scan for discoverable Bluetooth devices for up to timeoutMs.
int montauk::bt_scan(montauk::abi::BtScanResult* buf, int maxCount,
uint32_t timeoutMs);
<strong>SYS_BTCONNECT (85)</strong>
Connect (and pair/bond if needed) to a device by BD_ADDR.
int montauk::bt_connect(const uint8_t* bdAddr);
<strong>SYS_BTDISCONNECT (86)</strong>
Disconnect from a device by BD_ADDR.
int montauk::bt_disconnect(const uint8_t* bdAddr);
<strong>SYS_BTLIST (87)</strong>
List currently connected devices.
int montauk::bt_list(montauk::abi::BtDevInfo* buf, int maxCount);
<strong>SYS_BTINFO (88)</strong>
Get local adapter info (BD_ADDR, name, init/scanning state).
int montauk::bt_info(montauk::abi::BtAdapterInfo* buf);
<strong>SYS_BTSETADDR (137)</strong>
Change the adapter's BD_ADDR (6-byte buffer, byte 0 is the
least-significant octet). Volatile -- apply after the last
controller reset and persist separately to bluetooth.toml.
int montauk::bt_set_addr(const uint8_t* bdAddr);
<strong>SYS_BTBONDS (138)</strong>
List bonded (paired) devices.
int montauk::bt_bonds(montauk::abi::BtBondInfo* buf, int maxCount);
<strong>SYS_BTFORGET (139)</strong>
Forget a paired device; it must re-pair next time.
int montauk::bt_forget(const uint8_t* bdAddr);
<strong>SOFTWARE-DEFINED RADIO</strong>
Receive-only SDR API. Receivers are enumerated by index in
[0, SYS_SDR_COUNT); SYS_SDR_OPEN returns a handle used by the
rest of the calls. Samples are delivered as interleaved 8-bit
unsigned I/Q (CU8, SDR_FORMAT_CU8) from the device's ring
buffer. Backed by an RTL-SDR (RTL2832U + R820T2) driver.
<strong>SYS_SDR_COUNT (140)</strong>
Number of available SDR receivers.
int montauk::sdr_count();
<strong>SYS_SDR_INFO (141)</strong>
Get static/dynamic info for one receiver by index (name, tuner,
frequency/sample-rate ranges, gain steps, present/streaming
flags).
int montauk::sdr_info(int index, montauk::abi::SdrDeviceInfo* out);
<strong>SYS_SDR_OPEN (142)</strong>
Open a receiver by index. Returns a handle.
int montauk::sdr_open(int index);
<strong>SYS_SDR_CLOSE (143)</strong>
Close a receiver handle.
int montauk::sdr_close(int handle);
<strong>SYS_SDR_START (144)</strong>
Begin streaming samples.
int montauk::sdr_start(int handle);
<strong>SYS_SDR_STOP (145)</strong>
Stop streaming samples.
int montauk::sdr_stop(int handle);
<strong>SYS_SDR_READ (146)</strong>
Non-blocking read of queued I/Q samples. Returns bytes copied.
int montauk::sdr_read(int handle, void* buf, uint32_t len);
<strong>SYS_SDR_SETPARAM (147)</strong>
Set a tunable parameter (see SDR_PARAM_* below).
int montauk::sdr_set_param(int handle, int param, uint64_t value);
<strong>SYS_SDR_GETPARAM (148)</strong>
Get a tunable parameter's current value.
int64_t montauk::sdr_get_param(int handle, int param);
Parameters (montauk::abi::SDR_PARAM_*): FREQ (center frequency,
Hz), SAMPLE_RATE (Hz), GAIN_MODE (0=auto/AGC, 1=manual), GAIN
(tenths of dB), FREQ_CORR (ppm), AGC (demod digital AGC, 0/1),
DIRECT_SAMP (0=off, 1=I, 2=Q). Convenience wrappers exist for
each: sdr_set_freq/sdr_get_freq, sdr_set_sample_rate/
sdr_get_sample_rate, sdr_set_gain_mode, sdr_set_gain,
sdr_set_freq_correction, sdr_set_agc.
<strong>CLIPBOARD</strong>
<strong>SYS_CLIPBOARD_SET_TEXT (119)</strong>
Set the system clipboard's text contents (max
CLIPBOARD_MAX_TEXT_BYTES, 256 KiB).
int montauk::clipboard_set_text(const char* data, uint32_t len);
<strong>SYS_CLIPBOARD_GET_INFO (120)</strong>
Get the clipboard's current size and serial number (for
change detection).
int montauk::clipboard_get_info(montauk::abi::ClipboardInfo* out);
<strong>SYS_CLIPBOARD_GET_TEXT (121)</strong>
Read the clipboard's text contents.
int montauk::clipboard_get_text(char* buf, uint32_t bufLen,
uint32_t* outLen, uint64_t* outSerial = nullptr);
<strong>SYS_CLIPBOARD_CLEAR (122)</strong>
Clear the clipboard.
int montauk::clipboard_clear();
<strong>GENERIC IPC</strong>
Handle-based IPC primitives underlying streams, mailboxes,
waitsets, and shared-memory surfaces (see kernel/src/Ipc/Ipc.hpp).
All are accessed via numeric handles with rights-based security
and can be waited on with SYS_WAIT_HANDLE or a waitset.
<strong>SYS_DUPHANDLE (98)</strong>
Duplicate a handle (e.g. to hand a copy to a child process).
int montauk::dup_handle(int handle);
<strong>SYS_WAIT_HANDLE (99)</strong>
Block until a handle's signals intersect wantedSignals, or
timeoutMs elapses. See IPC_SIGNAL_* (READABLE, WRITABLE,
PEER_CLOSED, EXITED, READY).
uint32_t montauk::wait_handle(int handle, uint32_t wantedSignals,
uint64_t timeoutMs = ~0ULL);
<strong>SYS_STREAM_CREATE (100)</strong>
Create a byte-pipe stream, returning a read handle and a write
handle.
int montauk::stream_create(int* outReadHandle, int* outWriteHandle,
uint32_t capacity = 0);
<strong>SYS_STREAM_READ (101)</strong>
Read bytes from a stream handle.
int montauk::stream_read(int handle, void* buf, int maxLen);
<strong>SYS_STREAM_WRITE (102)</strong>
Write bytes to a stream handle.
int montauk::stream_write(int handle, const void* data, int len);
<strong>SYS_MAILBOX_CREATE (103)</strong>
Create a message-queue mailbox, returning a send handle and a
receive handle.
int montauk::mailbox_create(int* outSendHandle, int* outRecvHandle);
<strong>SYS_MAILBOX_SEND (104)</strong>
Send a typed message, optionally attaching a handle to
transfer to the receiver.
int montauk::mailbox_send(int handle, uint32_t msgType, const void* data,
uint16_t len, int attachHandle = -1);
<strong>SYS_MAILBOX_RECV (105)</strong>
Receive a message.
int montauk::mailbox_recv(int handle, uint32_t* outMsgType, void* data,
uint16_t* inOutLen, int* outAttachHandle = nullptr);
<strong>SYS_WAITSET_CREATE (106)</strong>
Create a waitset for multiplexing waits across many handles.
int montauk::waitset_create();
<strong>SYS_WAITSET_ADD (107)</strong>
Add a handle and its signal mask to a waitset.
int montauk::waitset_add(int waitsetHandle, int targetHandle,
uint32_t signals);
<strong>SYS_WAITSET_REMOVE (108)</strong>
Remove an entry from a waitset by index.
int montauk::waitset_remove(int waitsetHandle, int index);
<strong>SYS_WAITSET_WAIT (109)</strong>
Block until any member handle's watched signals fire, or
timeoutMs elapses.
int montauk::waitset_wait(int waitsetHandle, montauk::abi::IpcWaitResult* outReady,
uint64_t timeoutMs = ~0ULL);
<strong>SYS_PROC_OPEN (110)</strong>
Open a handle to another process by PID (for waiting on its
exit via IPC_SIGNAL_EXITED, etc.).
int montauk::proc_open(int pid);
<strong>SYS_SURFACE_CREATE (111)</strong>
Create a shared pixel-buffer surface of byteSize bytes.
int montauk::surface_create(uint64_t byteSize);
<strong>SYS_SURFACE_MAP (112)</strong>
Map a surface into the caller's address space.
void* montauk::surface_map(int handle);
<strong>SYS_SURFACE_RESIZE (113)</strong>
Resize a surface.
int montauk::surface_resize(int handle, uint64_t newSize);
<strong>SHARED LIBRARIES</strong>
<strong>SYS_LOAD_LIB (114)</strong>
Load a shared library ELF (.lib) into the caller's address
space.
int montauk::load_lib(const char* path);
<strong>SYS_UNLOAD_LIB (115)</strong>
Unload a previously loaded library.
int montauk::unload_lib(int handle);
<strong>SYS_DLSYM (116)</strong>
Resolve a symbol offset within a loaded library to a callable
address.
void* montauk::dlsym(int handle, uint64_t symbolOffset);
<strong>SYS_GETLIBBASE (117)</strong>
Get the base virtual address a loaded library was mapped at.
uint64_t montauk::get_libbase(int handle);
<strong>CRASH REPORTING</strong>
<strong>SYS_CRASH_REPORT (118)</strong>
Retrieve the kernel-filled crash report for the last faulting
process (exception vector/name, faulting address, register
state, page-fault error bits). Used by the crashpad app.
int montauk::crash_report(montauk::abi::CrashReportInfo* out);
<strong>SEE ALSO</strong>
spawn(2), file(2), framebuffer(2), malloc(3), intro(1)</code></pre>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
+334
View File
@@ -0,0 +1,334 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS manual page: tls-errors(5) - BearSSL TLS and X.509 error codes">
<title>tls-errors(5) - MontaukOS Manual</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar .current {
color: #004499;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
pre { background: #f0f0f0; padding: 0.5em; overflow-x: auto; }
code { background: #f0f0f0; padding: 0 0.15em; }
pre code { padding: 0; }
.center { text-align: center; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">Man Pages</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h1>tls-errors(5)</h1>
</div>
<hr>
<pre><code><strong>NAME</strong>
tls-errors - BearSSL TLS and X.509 error codes
<strong>DESCRIPTION</strong>
MontaukOS uses BearSSL for TLS 1.2 connections. When a TLS
operation fails, an integer error code is reported. This page
lists all possible error codes.
<strong>SSL/TLS ENGINE ERRORS</strong>
<strong>0 BR_ERR_OK</strong>
No error.
<strong>1 BR_ERR_BAD_PARAM</strong>
Caller-provided parameter is incorrect.
<strong>2 BR_ERR_BAD_STATE</strong>
Operation cannot be applied in the current engine state.
<strong>3 BR_ERR_UNSUPPORTED_VERSION</strong>
Incoming protocol or record version is unsupported.
<strong>4 BR_ERR_BAD_VERSION</strong>
Incoming record version does not match the expected version.
<strong>5 BR_ERR_BAD_LENGTH</strong>
Incoming record length is invalid.
<strong>6 BR_ERR_TOO_LARGE</strong>
Incoming record is too large, or buffer is too small for the
handshake message to send.
<strong>7 BR_ERR_BAD_MAC</strong>
Decryption found invalid padding, or the record MAC is
not correct.
<strong>8 BR_ERR_NO_RANDOM</strong>
No initial entropy was provided and none could be obtained
from the OS.
<strong>9 BR_ERR_UNKNOWN_TYPE</strong>
Incoming record type is unknown.
<strong>10 BR_ERR_UNEXPECTED</strong>
Incoming record or message has wrong type for the current
engine state.
<strong>12 BR_ERR_BAD_CCS</strong>
ChangeCipherSpec message from the peer has invalid contents.
<strong>13 BR_ERR_BAD_ALERT</strong>
Alert message from the peer has invalid contents (odd length).
<strong>14 BR_ERR_BAD_HANDSHAKE</strong>
Incoming handshake message decoding failed.
<strong>15 BR_ERR_OVERSIZED_ID</strong>
ServerHello contains a session ID larger than 32 bytes.
<strong>16 BR_ERR_BAD_CIPHER_SUITE</strong>
Server wants to use a cipher suite that we did not advertise,
or we tried to advertise a cipher suite that we do not support.
<strong>17 BR_ERR_BAD_COMPRESSION</strong>
Server wants to use a compression method that we did not
advertise.
<strong>18 BR_ERR_BAD_FRAGLEN</strong>
Server's max fragment length does not match client's.
<strong>19 BR_ERR_BAD_SECRENEG</strong>
Secure renegotiation failed.
<strong>20 BR_ERR_EXTRA_EXTENSION</strong>
Server sent an extension type that we did not announce, or
used the same extension type more than once in ServerHello.
<strong>21 BR_ERR_BAD_SNI</strong>
Invalid Server Name Indication contents (when used by the
server, this extension shall be empty).
<strong>22 BR_ERR_BAD_HELLO_DONE</strong>
Invalid ServerHelloDone from the server (length is not 0).
<strong>23 BR_ERR_LIMIT_EXCEEDED</strong>
Internal limit exceeded (e.g. server's public key is too
large).
<strong>24 BR_ERR_BAD_FINISHED</strong>
Finished message from peer does not match the expected value.
<strong>25 BR_ERR_RESUME_MISMATCH</strong>
Session resumption attempted with a different version or
cipher suite.
<strong>26 BR_ERR_INVALID_ALGORITHM</strong>
Unsupported or invalid algorithm (ECDHE curve, signature
algorithm, hash function).
<strong>27 BR_ERR_BAD_SIGNATURE</strong>
Invalid signature on ServerKeyExchange or CertificateVerify.
<strong>28 BR_ERR_WRONG_KEY_USAGE</strong>
Peer's public key does not have the proper type or is not
allowed for the requested operation.
<strong>29 BR_ERR_NO_CLIENT_AUTH</strong>
Client did not send a certificate upon request, or the client
certificate could not be validated.
<strong>31 BR_ERR_IO</strong>
I/O error or premature close on the underlying transport.
<strong>X.509 CERTIFICATE ERRORS</strong>
<strong>32 BR_ERR_X509_OK</strong>
X.509 validation was successful (not an error).
<strong>33 BR_ERR_X509_INVALID_VALUE</strong>
Invalid value in an ASN.1 structure.
<strong>34 BR_ERR_X509_TRUNCATED</strong>
Truncated certificate.
<strong>35 BR_ERR_X509_EMPTY_CHAIN</strong>
Empty certificate chain (no certificate at all).
<strong>36 BR_ERR_X509_INNER_TRUNC</strong>
Inner element extends beyond outer element size.
<strong>37 BR_ERR_X509_BAD_TAG_CLASS</strong>
Unsupported tag class (application or private).
<strong>38 BR_ERR_X509_BAD_TAG_VALUE</strong>
Unsupported tag value.
<strong>39 BR_ERR_X509_INDEFINITE_LENGTH</strong>
Indefinite length encoding found.
<strong>40 BR_ERR_X509_EXTRA_ELEMENT</strong>
Extraneous element in certificate.
<strong>41 BR_ERR_X509_UNEXPECTED</strong>
Unexpected element in certificate.
<strong>42 BR_ERR_X509_NOT_CONSTRUCTED</strong>
Expected constructed element, but found primitive.
<strong>43 BR_ERR_X509_NOT_PRIMITIVE</strong>
Expected primitive element, but found constructed.
<strong>44 BR_ERR_X509_PARTIAL_BYTE</strong>
BIT STRING length is not a multiple of 8.
<strong>45 BR_ERR_X509_BAD_BOOLEAN</strong>
BOOLEAN value has invalid length.
<strong>46 BR_ERR_X509_OVERFLOW</strong>
Value is off-limits (overflow).
<strong>47 BR_ERR_X509_BAD_DN</strong>
Invalid distinguished name.
<strong>48 BR_ERR_X509_BAD_TIME</strong>
Invalid date/time representation in certificate.
<strong>49 BR_ERR_X509_UNSUPPORTED</strong>
Certificate contains unsupported features that cannot be
ignored.
<strong>50 BR_ERR_X509_LIMIT_EXCEEDED</strong>
Key or signature size exceeds internal limits.
<strong>51 BR_ERR_X509_WRONG_KEY_TYPE</strong>
Key type does not match that which was expected.
<strong>52 BR_ERR_X509_BAD_SIGNATURE</strong>
Signature is invalid.
<strong>53 BR_ERR_X509_TIME_UNKNOWN</strong>
Validation time is unknown (no time was set).
<strong>54 BR_ERR_X509_EXPIRED</strong>
Certificate is expired or not yet valid.
<strong>55 BR_ERR_X509_DN_MISMATCH</strong>
Issuer/subject DN mismatch in the chain.
<strong>56 BR_ERR_X509_BAD_SERVER_NAME</strong>
Expected server name was not found in the chain.
<strong>57 BR_ERR_X509_CRITICAL_EXTENSION</strong>
Unknown critical extension in certificate.
<strong>58 BR_ERR_X509_NOT_CA</strong>
Not a CA, or path length constraint violation.
<strong>59 BR_ERR_X509_FORBIDDEN_KEY_USAGE</strong>
Key Usage extension prohibits the intended usage.
<strong>60 BR_ERR_X509_WEAK_PUBLIC_KEY</strong>
Public key found in certificate is too small.
<strong>62 BR_ERR_X509_NOT_TRUSTED</strong>
Chain could not be linked to a trust anchor.
<strong>FATAL ALERTS</strong>
When a fatal alert is received from the peer, the error code
is 256 + the TLS alert value. When a fatal alert is sent to
the peer, the error code is 512 + the TLS alert value.
Common alert values:
0 close_notify
10 unexpected_message
20 bad_record_mac
40 handshake_failure
42 bad_certificate
43 unsupported_certificate
44 certificate_revoked
45 certificate_expired
46 certificate_unknown
47 illegal_parameter
48 unknown_ca
50 decode_error
51 decrypt_error
70 protocol_version
71 insufficient_security
80 internal_error
86 unrecognized_name
112 no_application_protocol
For example, error 296 means a handshake_failure alert was
received (256 + 40 = 296).
<strong>SEE ALSO</strong>
fetch(1), syscalls(2)</code></pre>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
+161
View File
@@ -0,0 +1,161 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS manual page: wiki(1) - Wikipedia article viewer for MontaukOS">
<title>wiki(1) - MontaukOS Manual</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar .current {
color: #004499;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
pre { background: #f0f0f0; padding: 0.5em; overflow-x: auto; }
code { background: #f0f0f0; padding: 0 0.15em; }
pre code { padding: 0; }
.center { text-align: center; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">Man Pages</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h1>wiki(1)</h1>
</div>
<hr>
<pre><code><strong>NAME</strong>
wiki - Wikipedia article viewer for MontaukOS
<strong>SYNOPSIS</strong>
wiki &lt;title&gt;
wiki -f &lt;title&gt;
wiki -s &lt;query&gt;
<strong>DESCRIPTION</strong>
wiki fetches and displays Wikipedia articles in the terminal.
It connects to en.wikipedia.org over HTTPS (TLS 1.2) and
uses the Wikipedia REST and Action APIs to retrieve article
content as plain text.
Articles are displayed in a fullscreen interactive pager with
color-coded headings and word-wrapped text. Multi-word titles
are accepted as separate arguments and joined automatically.
<strong>OPTIONS</strong>
<strong>-f</strong>
Full article mode. Display the complete article text instead
of just the summary. Section headings are color-coded.
<strong>-s</strong>
Search mode. Search Wikipedia for articles matching the
query and display a numbered list of up to 10 results.
Press a number key to view that article's summary.
<strong>EXAMPLES</strong>
wiki Linux
Show a summary of the Linux article.
wiki -f C programming language
Show the full text of the C programming language article.
wiki -s operating system
Search for articles related to "operating system".
<strong>TLS SUPPORT</strong>
Connections use BearSSL for TLS 1.2. Server certificates
are validated against the system CA bundle at
0:/os/certs/ca-certificates.crt.
<strong>KEYBOARD</strong>
<strong>Article pager</strong>
j / Down Scroll down one line
k / Up Scroll up one line
Space / PgDn Scroll down one page
b / PgUp Scroll up one page
g / Home Jump to top
G / End Jump to bottom
q Quit pager
<strong>Search results</strong>
1-9, 0 View article (0 = result 10)
q Quit search
<strong>General</strong>
Ctrl+Q Abort during network request
<strong>SEE ALSO</strong>
fetch(1), ping(1), nslookup(1), shell(1)</code></pre>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>