Hila Ben Abraham | 47583d1 | 2014-05-22 04:39:31 -0500 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | workDir=$1 |
| 3 | source $workDir/../multi-host.conf |
| 4 | source $workDir/include.sh |
| 5 | |
| 6 | #compress IPv6 |
| 7 | IP6_A1=$(python -c "import sys; import socket; result = socket.getaddrinfo('$IP6_A1', None); family, socktype, proto, canonname,(address, port, flow_info, scope_id) = result[0]; print address") |
| 8 | |
| 9 | remoteFaceIdUdp4=$(check_nfd_status_face_existence none udp4://$IP4_A1) |
| 10 | if [[ -z "$remoteFaceIdUdp4" ]]; then |
| 11 | exit 3 |
| 12 | fi |
| 13 | |
| 14 | remoteFaceIdTcp4=$(check_nfd_status_face_existence none tcp4://$IP4_A1) |
| 15 | if [[ -z "$remoteFaceIdTcp4" ]]; then |
| 16 | exit 3 |
| 17 | fi |
| 18 | |
| 19 | remoteFaceIdUdp6=$(check_nfd_status_face_existence none udp6://[$IP6_A1]) |
| 20 | if [[ -z "$remoteFaceIdUdp6" ]]; then |
| 21 | exit 3 |
| 22 | fi |
| 23 | |
| 24 | remoteFaceIdTcp6=$(check_nfd_status_face_existence none tcp6://[$IP6_A1]) |
| 25 | if [[ -z "$remoteFaceIdTcp6" ]]; then |
| 26 | exit 3 |
| 27 | fi |
| 28 | |
| 29 | check_nfd_status_counters $remoteFaceIdUdp4 udp4://$IP4_A1 'in' $NUM_OF_PINGS |
| 30 | if [[ $? -ne 0 ]]; then |
| 31 | exit 3 |
| 32 | fi |
| 33 | |
| 34 | check_nfd_status_counters $remoteFaceIdTcp4 tcp4://$IP4_A1 'in' $NUM_OF_PINGS |
| 35 | if [[ $? -ne 0 ]]; then |
| 36 | exit 3 |
| 37 | fi |
| 38 | |
| 39 | check_nfd_status_counters $remoteFaceIdUdp6 udp6://[$IP6_A1] 'in' $NUM_OF_PINGS |
| 40 | if [[ $? -ne 0 ]]; then |
| 41 | exit 3 |
| 42 | fi |
| 43 | |
| 44 | check_nfd_status_counters $remoteFaceIdTcp6 tcp6://[$IP6_A1] 'in' $NUM_OF_PINGS |
| 45 | if [[ $? -ne 0 ]]; then |
| 46 | exit 3 |
| 47 | fi |
| 48 | |
| 49 | |
| 50 | exit 0 |