#!/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) %> <%= ${HOSTNAME} %>

Simple Babelweb



Babel information

<% 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 %>

<% if ! [ ${GET_routes} ] && ! [ ${GET_v4table} ] && ! [ ${GET_v6table} ]; then %>

Interfaces

<% echo "$data" | grep interface | while read line ; do echo "" echo "" echo "" echo "" echo "" echo "" done %>
Interface up ipv6 ipv4
" echo ${line#*interface} | cut -d " " -f 1 echo "" echo ${line#*up} | cut -d " " -f 1 echo "" echo ${line#*ipv6} | cut -d " " -f 1 echo "" echo ${line#*ipv4} | cut -d " " -f 1 echo "

Neighbours

<% echo "$data" | grep neighbour | while read line ; do echo "" echo "" echo "" echo "" echo "" echo "" echo "" echo "" echo "" echo "" done %>
address interface reach rxcost txcost rtt rttcost cost
" echo ${line#*address} | cut -d " " -f 1 echo "" echo ${line#*if} | cut -d " " -f 1 echo "" echo ${line#*reach} | cut -d " " -f 1 echo "" echo ${line#*rxcost} | cut -d " " -f 1 echo "" echo ${line#*txcost} | cut -d " " -f 1 echo "" echo ${line#*rtt} | cut -d " " -f 1 echo "" echo ${line#*rttcost} | cut -d " " -f 1 echo "" echo ${line#*cost} | cut -d " " -f 1 echo "

Redistributed routes

<% echo "$data" | grep xroute | while read line ; do echo "" echo "" echo "" echo "" done %>
prefix metric
" echo ${line#*prefix} | cut -d " " -f 1 echo "" echo ${line#*metric} | cut -d " " -f 1 echo "
<% fi if [ ${GET_routes} ]; then %> <% echo "$data" | grep route | grep -v xroute | while read line ; do echo "" echo "" echo "" echo "" echo "" echo "" echo "" echo "" done fi %>
target installed via device metric Destination ID
" echo ${line#*prefix} | cut -d " " -f 1 echo "" echo ${line#*installed} | cut -d " " -f 1 echo "" echo ${line#*via} | cut -d " " -f 1 echo "" echo ${line#*if} | cut -d " " -f 1 echo "" echo ${line#*metric} | cut -d " " -f 1 echo "" echo ${line#*id} | cut -d " " -f 1 echo "
<% if [ ${GET_v4table} ]; then %> <% v4routen=$(ip ro sh tab 10) echo "$v4routen" | while read line ; do echo "" echo "" echo "" echo "" echo "" done fi %>
target via dev
" echo $line | cut -d " " -f 1 echo "" echo ${line#*via} | cut -d " " -f 1 echo "" echo ${line#*dev} | cut -d " " -f 1 echo "
<% if [ ${GET_v6table} ]; then %> <% v6routen=$(ip -6 ro sh tab 10) echo "$v6routen" | while read line ; do echo "" echo "" echo "" echo "" echo "" echo "" echo "" done fi %>
Destination Source Specific via Device Kernelmetric
" echo $line | cut -d " " -f 1 echo "" echo ${line#*from} | cut -d " " -f 1 echo "" echo ${line#*via} | cut -d " " -f 1 echo "" echo ${line#*dev} | cut -d " " -f 1 echo "" echo ${line#*metric} | cut -d " " -f 1 echo "