Skip to main content

Crate ping

Crate ping 

Source
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 πŸ”’
BumpAllocator
PingArgs πŸ”’
PingRequest πŸ”’
ICMP echo request/reply payload passed through the /net/ping/<ip> scheme.
ResolvedTarget πŸ”’
__FreeNode πŸ”’

EnumsΒ§

AddressFamily πŸ”’
ResolveError πŸ”’

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 as rdi.
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 PingArgs from 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 _start trampoline.
str_to_u32 πŸ”’
Parse an ASCII decimal string into a u32.
u32_to_str πŸ”’
Implements u32 to str.