#!/usr/bin/haserl <% echo -en "Content-Type: text/html\r\n\r\n" HOSTNAME="$(uci -q get "fff.system.hostname")" data=$(echo "dump" | nc ::1 33123) %>
<% echo "$data" | head -n 1 %> |
<% echo "$data" | head -n 2 | tail -n 1 %> |
<% echo "$data" | head -n 3 | tail -n 1 %> |
<% echo "$data" | head -n 4 | tail -n 1 %> |
Interface | up | ipv6 | ipv4 |
---|---|---|---|
" echo ${line#*interface} | cut -d " " -f 1 echo " | " echo "" echo ${line#*up} | cut -d " " -f 1 echo " | " echo "" echo ${line#*ipv6} | cut -d " " -f 1 echo " | " echo "" echo ${line#*ipv4} | cut -d " " -f 1 echo " | " echo "
address | interface | reach | rxcost | txcost | rtt | rttcost | cost |
---|---|---|---|---|---|---|---|
" echo ${line#*address} | cut -d " " -f 1 echo " | " echo "" echo ${line#*if} | cut -d " " -f 1 echo " | " echo "" echo ${line#*reach} | cut -d " " -f 1 echo " | " echo "" echo ${line#*rxcost} | cut -d " " -f 1 echo " | " echo "" echo ${line#*txcost} | cut -d " " -f 1 echo " | " echo "" echo ${line#*rtt} | cut -d " " -f 1 echo " | " echo "" echo ${line#*rttcost} | cut -d " " -f 1 echo " | " echo "" echo ${line#*cost} | cut -d " " -f 1 echo " | " echo "
prefix | metric |
---|---|
" echo ${line#*prefix} | cut -d " " -f 1 echo " | " echo "" echo ${line#*metric} | cut -d " " -f 1 echo " | " echo "
target | installed | via | device | metric | Destination ID |
---|---|---|---|---|---|
" echo ${line#*prefix} | cut -d " " -f 1 echo " | " echo "" echo ${line#*installed} | cut -d " " -f 1 echo " | " echo "" echo ${line#*via} | cut -d " " -f 1 echo " | " echo "" echo ${line#*if} | cut -d " " -f 1 echo " | " echo "" echo ${line#*metric} | cut -d " " -f 1 echo " | " echo "" echo ${line#*id} | cut -d " " -f 1 echo " | " echo "
target | via | dev |
---|---|---|
" echo $line | cut -d " " -f 1 echo " | " echo "" echo ${line#*via} | cut -d " " -f 1 echo " | " echo "" echo ${line#*dev} | cut -d " " -f 1 echo " | " echo "
Destination | Source Specific | via | Device | Kernelmetric |
---|---|---|---|---|
" echo $line | cut -d " " -f 1 echo " | " echo "" echo ${line#*from} | cut -d " " -f 1 echo " | " echo "" echo ${line#*via} | cut -d " " -f 1 echo " | " echo "" echo ${line#*dev} | cut -d " " -f 1 echo " | " echo "" echo ${line#*metric} | cut -d " " -f 1 echo " | " echo "