Mwnci route() Function

Syntax

route()

Description

The route() function returns an array of hashes of the current routing table.

Example

include("net")
Output=route()
println(Output)
foreach Line in Output {
    println(Line["iface"], "    ",Line["destination"], "    ", Line["gateway"])
}
[{"metric": 600, "window": 0, "irtt": 0, "iface": "wlan0", "flags": "UG", "refcnt": 0, "mask": "0.0.0.0", "gateway": "192.168.0.1", "mtu": 0, "destination": "0.0.0.0", "use": 0}, {"use": 0, "flags": "U", "mtu": 0, "destination": "192.168.0.0", "metric": 600, "mask": "255.255.255.0", "window": 0, "irtt": 0, "iface": "wlan0", "gateway": "0.0.0.0", "refcnt": 0}]

wlan0    0.0.0.0    192.168.0.1
wlan0    192.168.0.0    0.0.0.0