Return to index

network functions

map = dns_resolve(host, [record_type])

top

Resolves host using specified DNS record type. Record types: A, AAAA, CNAME, MX, TXT, NS, PTR, SRV, ANY. Returns map with results.


map = http_benchmark(url, requests, [concurrent], [keep_alive], [skip_verify])

top

Benchmarks HTTP requests to URL. Returns performance statistics with error breakdown.


map = http_headers(url, [headers])

top

Inspects HTTP headers for URL. Returns response headers and status.


map = icmp_ping(host, [timeout_seconds])

top

Performs ICMP ping to host. Returns map with latency, success, and error fields.


slice = icmp_traceroute(host, [max_hops], [timeout_seconds])

top

Performs ICMP traceroute to host. Returns slice of hop info. Requires root privileges.


slice = net_interfaces_detailed()

top

Returns detailed info for all network interfaces.


[]map = netstat()

top

Returns all network connections across all available protocols.


[]map = netstat_established()

top

Returns network connections in ESTABLISHED state.


[]map = netstat_interface(interface)

top

Returns network connections on specific interface.


[]map = netstat_listen()

top

Returns network connections in LISTEN state.


[]map = netstat_process(pid)

top

Returns network connections for specific process ID.


[]map = netstat_protocol(protocol)

top

Returns network connections filtered by specific protocol.


map = netstat_protocol_info()

top

Returns detailed information about available protocols and their capabilities.


[]string = netstat_protocols()

top

Returns list of available protocols for network monitoring.


map = network_stats()

top

Returns network interface statistics (if available).


[]map = open_files()

top

Returns file descriptors and network connections (lsof equivalent).


map = port_scan(host, ports, [timeout_seconds])

top

Scans ports on host. Returns map of port to open/closed.


map = ssl_cert_install_help(host, [port])

top

Validates SSL certificate and provides platform-specific installation instructions if verification fails.


map = ssl_cert_validate(host, [port])

top

Validates SSL certificate for host:port. Returns certificate information.


bool = tcp_available(handle)

top

Checks if TCP client handle is still connected.


handle = tcp_client(host, port, [timeout_seconds])

top

Creates TCP connection to host:port. Returns handle for subsequent operations.


bool = tcp_close(handle)

top

Closes TCP connection and frees handle.


map = tcp_ping(host, port, [timeout_seconds])

top

Performs TCP connect to host:port. Returns map with latency, success, and error fields.


map = tcp_receive(handle, [timeout_seconds])

top

Receives data from TCP connection. Returns map with content, available, and error fields.


bool = tcp_send(handle, data)

top

Sends data over TCP connection.


handle = tcp_server(port, [mode])

top

Starts a TCP server on the given port. Mode can be 'blocking' or 'non_blocking'. Returns handle.


map = tcp_server_accept(handle, [timeout_seconds])

top

Accepts a new client connection on the TCP server. Returns map with client handle and address.


bool = tcp_server_stop(handle)

top

Stops the TCP server and closes all client connections.


slice = tcp_traceroute(host, port, [max_hops], [timeout_seconds])

top

Performs a TCP-based traceroute to host:port. Returns slice of hop info.


slice = traceroute(protocol, host, [port], [max_hops], [timeout_seconds])

top

Performs traceroute to host. Protocol: 'icmp' or 'tcp'. For TCP, port is required. Returns slice of hop info.