#!/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
}

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

  result=$(nfdc register -e $(($expirationPeriod * 1000)) $name udp4://$nextHop | grep -o 'FaceId: [0-9]*' | sed s/'FaceId: '//)
  echo $result
}

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

  expirationPeriod=$(nfd-status -r | grep -iF ''$name'' | grep -o 'faceid='$nextHop' ([a-zA-Z0-9 =]*)' |\
                     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=$(nfd-status -r | 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
  faceId=$2

  count=$(nfd-status -r | grep -iF ''$name'' | grep -c 'faceid='$faceId'')

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

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