#!/usr/bin/env bash
source ../multi-host.conf
source include.sh
workdir=$(pwd)
mkdir -p $workdir/logs/$1
testCase=$1
testLog=$workdir/logs/$testCase/nfdc_test.log

echo "TEST START" > $testLog

start_nfd $testCase

# run test case A: test nfdc create / add-nexthop / destroy test case
if [[ $testCase == 'A' ]]; then

  # Check for the existence of mcast address udp4://224.0.23.170
  udp4Mcast=$(nfd-status | grep udp4://224.0.23.170)
  udp6Mcast=$(nfd-status | grep -iF udp6://[ff00)
  ethv4=$(nfd-status | grep -iF ether://[01:00:5E:)
  ethv6=$(nfd-status | grep -iF ether://[33:33:)

  if [[ -z "$udp4Mcast" ]] && [[ -z "$udp6Mcast" ]] && [[ -z "$ethv4" ]] && [[ -z "$ethv6" ]]; then
    echo "nfd-status: Failed to find udp4/udp6/ether multicast faces" >> $testLog
    echo "nfd-status is:" >> $testLog
    nfd-status >> $testLog
    clean_up
    exit 2
  fi

  # Invoke nfdc create tcp://$IP4_B1.
  faceIdTcp4=$(nfdc create tcp4://$IP4_B1 | grep -Po 'FaceId: .*?,' | sed 's/FaceId: //' | sed 's/,//')
  sleep 2
  face=$(check_nfd_status_face_existence $faceIdTcp4 tcp4://$IP4_B1)
  if [ "-1" = $face ]; then
    clean_up
    exit 2
  fi

  #compress IPv6
  IP6_B1=$(python -c "import sys; import socket; result = socket.getaddrinfo('$IP6_B1', None); family, socktype, proto, canonname,(address, port, flow_info, scope_id) = result[0]; print address")

  # Invoke nfdc create tcp://$IP6_B1.
  faceIdTcp6=$(nfdc create tcp6://[$IP6_B1] | grep -Po 'FaceId: .*?,' | sed 's/FaceId: //' | sed 's/,//')
  sleep 2
  face=$(check_nfd_status_face_existence $faceIdTcp6 tcp6://[$IP6_B1])
  if [ "-1" = $face ]; then
    clean_up
    exit 2
  fi

  # Invoke nfdc create udp://$IP4_B1.
  faceIdUdp4=$(nfdc create udp4://$IP4_B1 | grep -Po 'FaceId: .*?,' | sed 's/FaceId: //' | sed 's/,//')
  sleep 2

  face=$(check_nfd_status_face_existence $faceIdUdp4 udp4://$IP4_B1)
  if [ "-1" = $face ]; then
    clean_up
    exit 2
  fi


  # Invoke nfdc create udp://$IP6_B1.
  faceIdUdp6=$(nfdc create udp6://[$IP6_B1] | grep -Po 'FaceId: .*?,' | sed 's/FaceId: //' | sed 's/,//')
  sleep 2
  face=$(check_nfd_status_face_existence $faceIdUdp6 udp6://[$IP6_B1])
  if [ "-1" = $face ]; then
    clean_up
    exit 2
  fi

  # Invoke nfdc to add next hops
  nfdc add-nexthop -c 24 ndn:/test-nfdc $faceIdTcp4
  nfdc add-nexthop -c 26 ndn:/test-nfdc $faceIdTcp6
  nfdc add-nexthop -c 14 ndn:/test-nfdc $faceIdUdp4
  nfdc add-nexthop -c 16 ndn:/test-nfdc $faceIdUdp6

  # check correctness of add-nexthop -c 24 ndn:/test-nfdc $faceIdTcp4
  check_nfd_status_correctness $faceIdTcp4 tcp4://$IP4_B1 /test-nfdc 24

  # check correctness of add-nexthop -c 26 ndn:/test-nfdc $faceIdTcp6
  check_nfd_status_correctness $faceIdTcp6 tcp6://[$IP6_B1] /test-nfdc 26

  # check correctness of add-nexthop -c 14 ndn:/test-nfdc $faceIdUdp4
  check_nfd_status_correctness $faceIdUdp4 udp4://$IP4_B1 /test-nfdc 14

  # check correctness of add-nexthop -c 16 ndn:/test-nfdc $faceIdUdp6
  check_nfd_status_correctness $faceIdUdp6 udp6://[$IP6_B1] /test-nfdc 16

  # Invoke nfdc to choose MulticastStrategy for ndn:/ namespace.
  nfdc set-strategy ndn:/ ndn:/localhost/nfd/strategy/multicast

  ndnping -c $NUM_OF_PINGS ndn:/test-nfdc

  check_nfd_status_counters $faceIdTcp4 tcp4://$IP4_B1 out $NUM_OF_PINGS
  check_nfd_status_counters $faceIdTcp6 tcp6://[$IP6_B1] out $NUM_OF_PINGS
  check_nfd_status_counters $faceIdUdp4 udp4://$IP4_B1 out $NUM_OF_PINGS
  check_nfd_status_counters $faceIdUdp6 udp6://[$IP6_B1] out $NUM_OF_PINGS

  ssh $CTRL_B "$workdir/test-B.sh $workdir"
  if [[ $? -ne 0 ]]; then
    echo "Failed to verify correctness on node B" >> $testLog
    clean_up
    exit 3
  fi

  nfdc destroy $faceIdTcp4
  echo "after nfdc destroy $faceIdTcp4" >> $testLog
  face=$(check_nfd_status_face_existence $faceIdTcp4 tcp4://$IP4_B1)
  if [ "-1" != $face ]; then
    echo "face $faceIdTcp4 still exists after nfdc destory" >> $testLog
    clean_up
    exit 2
  fi

  nfdc destroy $faceIdTcp6
  echo "after nfdc destroy $faceIdTcp6" >> $testLog
  face=$(check_nfd_status_face_existence $faceIdTcp6 tcp6://[$IP6_B1])
  if [ "-1" != $face ]; then
    clean_up
    exit 2
  fi

  clean_up

# run test case B: nfdc add-nexthop / remove-nexthop test case
elif [[ $testCase == 'B' ]]; then

  # Invoke nfdc to add next hop
  faceId=$(nfdc add-nexthop -c 44 ndn:/test-nfdc udp4://$IP4_B1 | grep -Po 'FaceId: .*?,' | sed 's/FaceId: //' | sed 's/,//')
  if [[ "ERROR" == $faceId* ]]
  then
    echo "nfdc: Failed to add nexthop for $IP4_B1" >> $testLog
    clean_up
    exit 1
  fi

  check_nfd_status_correctness $faceId udp4://$IP4_B1 /test-nfdc 44

  # invoke nfdc to remove the nexthop for created FaceId
  removeNextHop=$(nfdc remove-nexthop ndn:/test-nfdc $faceId)

  #wait for the refreshed output of nfd-status
  sleep 2

  # check the existence of ndn:/test-nfdc FIB entry
  fibEntry=$(nfd-status | grep /test-nfdc)
  if [ ! -z "$fibEntry" ]; then
    echo "nfd-status: Failed to delete ndn:/test-nfdc FIB entry" >> $testLog
    clean_up
    exit 2
  fi
  clean_up

# run test case C: test nfdc register / unregister test case
elif [[ $testCase == 'C' ]]; then

  # Invoke nfdc register a new prefix
  faceId=$(nfdc register -c 55 ndn:/test-nfdc udp4://$IP4_B1 | grep -Po 'FaceId: .*?,' | sed 's/FaceId: //' | sed 's/,//')
  if [[ "ERROR" == $faceId* ]]; then
    echo "nfdc: Failed to register ndn:/test-nfdc for $IP4_B1" >> $testLog
    clean_up
    exit 1
  fi
  check_nfd_status_correctness $faceId udp4://$IP4_B1 /test-nfdc 55

  # Invoke nfdc to unregister the prefix
  unregisterPrefix=$(nfdc unregister ndn:/test-nfdc $faceId)
  sleep 2
  # check the existence of ndn:/test-nfdc FIB entry
  fibEntry=$(nfd-status | grep /test-nfdc)
  if [ ! -z "$fibEntry" ]; then
    echo "nfd-status: Failed to unregister prefix" >> $testLog
    clean_up
    exit 2
  fi
  clean_up
fi

clean_up
exit 0

