{"id":1288,"date":"2026-01-12T04:18:14","date_gmt":"2026-01-12T04:18:14","guid":{"rendered":"https:\/\/monkey.ploogie.co.uk\/?page_id=1288"},"modified":"2026-01-12T04:23:48","modified_gmt":"2026-01-12T04:23:48","slug":"mwnci-route-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-route-function\/","title":{"rendered":"Mwnci route() Function"},"content":{"rendered":"<h2>Syntax<\/h2>\n<p>route<strong>()<\/strong><\/p>\n<h2>Description<\/h2>\n<p>The <i>route()<\/i> function returns an array of hashes of the current routing table.<\/p>\n<h2>Example<\/h2>\n<pre>include(\"net\")\r\nOutput=route()\r\nprintln(Output)\r\nforeach Line in Output {\r\n    println(Line[\"iface\"], \"    \",Line[\"destination\"], \"    \", Line[\"gateway\"])\r\n}\r\n[{\"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}]\r\n\r\nwlan0    0.0.0.0    192.168.0.1\r\nwlan0    192.168.0.0    0.0.0.0\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax route() Description The route() function returns an array of hashes of the current routing table. Example include(&#8220;net&#8221;) Output=route() println(Output) foreach Line in Output { println(Line[&#8220;iface&#8221;], &#8221; &#8220;,Line[&#8220;destination&#8221;], &#8221; &#8220;, Line[&#8220;gateway&#8221;]) } [{&#8220;metric&#8221;: 600, &#8220;window&#8221;: 0, &#8220;irtt&#8221;: 0, &#8220;iface&#8221;: &#8220;wlan0&#8221;, &#8220;flags&#8221;: &#8220;UG&#8221;, &#8220;refcnt&#8221;: 0, &#8220;mask&#8221;: &#8220;0.0.0.0&#8221;, &#8220;gateway&#8221;: &#8220;192.168.0.1&#8221;, &#8220;mtu&#8221;: 0, &#8220;destination&#8221;: &#8220;0.0.0.0&#8221;, &#8220;use&#8221;: 0}, {&#8220;use&#8221;: &hellip; <a href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-route-function\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Mwnci route() Function&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1288","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/1288","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=1288"}],"version-history":[{"count":4,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/1288\/revisions"}],"predecessor-version":[{"id":1292,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/1288\/revisions\/1292"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=1288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}