#!/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 ndn:/test-nfdc -c $NUM_OF_PINGS

  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)

  # 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)

  # 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

