Expand description
ping : ICMP echo utility for strat9-os
Sends ICMP echo requests by writing to /net/ping/<target_ip> and reads
replies from the same scheme path. The actual ICMP socket is driven by
the strate-net silo via smoltcp; this tool is a thin userspace wrapper.
Usage: ping [-6] [-c count] [ip|hostname] [count]
All I/O is done through Plan 9βstyle schemes (no BSD sockets).
StructsΒ§
- BufWriter π
- Bump
Allocator - Ping
Args π - Ping
Request π - ICMP echo request/reply payload passed through the
/net/ping/<ip>scheme. - Resolved
Target π - __
Free πNode
EnumsΒ§
- Address
Family π - Resolve
Error π
ConstantsΒ§
- __
MIN_ πALIGN - __
MIN_ πBLOCK_ SIZE
StaticsΒ§
- GLOBAL_
ALLOCATOR π - __
ALLOC_ πLOCK - __
FREE_ πLIST_ HEAD - __HEAP π
- __
HEAP_ πOFFSET
FunctionsΒ§
- __
align_ πup - Implements align up.
- __
alloc_ πsize - Implements alloc size.
- __
lock_ πalloc - Implements lock alloc.
- __
unlock_ πalloc - Implements unlock alloc.
- _startβ
- Entry point: captures the initial RSP (= SysV stack pointer) and calls
start_impl. Using a naked function guarantees that no prologue has modified RSP before we pass it asrdi. - alloc_
error π - Implements alloc error.
- apply_
family_ πconstraint - clock_
ns π - Implements clock ns.
- copy_
target π - cstr_
to_ π βstr - Convert a null-terminated C string pointer to a
&'static str. - family_
flag π - family_
name π - log π
- Implements log.
- log_u32 π
- Implements log u32.
- panic π
- parse_
args_ πfrom_ stack - Build
PingArgsfrom the SysV initial user stack. - print_
usage π - read_
default_ πtarget - resolve_
target π - scheme_
close π - Close a scheme fd.
- scheme_
open π - Open a scheme file, return fd.
- scheme_
read_ πfd - Read from an open scheme fd, return bytes read.
- scheme_
write_ πfd - Write to an open scheme fd, return bytes written.
- sleep_
ms π - Implements sleep ms.
- start_
impl π - Main program logic; called from the naked
_starttrampoline. - str_
to_ πu32 - Parse an ASCII decimal string into a
u32. - u32_
to_ πstr - Implements u32 to str.