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

echo "TEST START" > $testLog

start_nfd

# 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 BroadcastStrategy for ndn:/ namespace.
  nfdc set-strategy ndn:/ ndn:/localhost/nfd/strategy/broadcast

  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

  # run nrd
  start_nrd

  # 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

