#!/usr/bin/env bash

source ../multi-host.conf

start_nfd() {
  sudo nfd &> $workdir/logs/nfd.log &
  ssh $CTRL_B "sudo nfd &"
  sleep 2
}

set_up() {
  workdir=$(pwd)
  mkdir -p $workdir/logs

  start_nfd
}

clean_up() {
  nfd-stop
  exit 0
}

create_face() {
  nextHop=$1

  result=$(nfdc face create udp4://$nextHop)
  echo $result
}

register() {
  name=$1
  expirationPeriod=$2
  nextHop=$3

  result=$(nfdc route add $name udp4://$nextHop expires $(($expirationPeriod * 1000)) | grep -o 'nexthop=[0-9]*' | sed s/'nexthop='//)
  echo $result
}

is_expiration_period_correct() {
  name=$1
  nextHop=$2
  lowerBound=$3
  upperBound=$4

  expirationPeriod=$(nfdc route list | grep -iF ''$name'' | grep 'nexthop='$nextHop'' |\
                     grep -o 'expires=[0-9]*' | sed 's/'expires='//')

  if [[ "$expirationPeriod" -lt $lowerBound || "$expirationPeriod" -gt $upperBound ]]; then
    echo $name "has an expiration period of $expirationPeriod seconds which is not between the expected $lowerBound-$upperBound seconds"
    exit 1
  else
    echo $name "has a correct expiration period between $lowerBound and $upperBound seconds"
  fi
}

expect_entry_does_not_exist() {
  name=$1

  count=$(nfdc route list | grep -c '$name ')

  if [[ $count -gt 0 ]]; then
    echo $name "exists past its expected expiration period."
    exit 2
  else
    echo $name "has expired successfully"
  fi
}

expect_route_does_not_exist() {
  name=$1
  nexthop=$2

  count=$(nfdc route list | grep -iF ''$name'' | grep -c 'nexthop='$nexthop'')

  if [[ $count -gt 0 ]]; then
    echo "Route for $name with nexthop=$nexthop exists past its expected expiration period."
    exit 2
  else
    echo "Route for $name with nexthop=$nexthop has expired successfully"
  fi
}

sleep_for_seconds() {
  echo -e "Sleeping for $1 seconds...\n"
  sleep $1
}
