blob: fad09d0beb943913cbe1560960c266406de51bf6 [file] [log] [blame]
Hila Ben Abraham47583d12014-05-22 04:39:31 -05001#!/usr/bin/env bash
2workDir=$1
3source $workDir/../multi-host.conf
4source $workDir/include.sh
5
6#compress IPv6
7IP6_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
9remoteFaceIdUdp4=$(check_nfd_status_face_existence none udp4://$IP4_A1)
10if [[ -z "$remoteFaceIdUdp4" ]]; then
11 exit 3
12fi
13
14remoteFaceIdTcp4=$(check_nfd_status_face_existence none tcp4://$IP4_A1)
15if [[ -z "$remoteFaceIdTcp4" ]]; then
16 exit 3
17fi
18
19remoteFaceIdUdp6=$(check_nfd_status_face_existence none udp6://[$IP6_A1])
20if [[ -z "$remoteFaceIdUdp6" ]]; then
21 exit 3
22fi
23
24remoteFaceIdTcp6=$(check_nfd_status_face_existence none tcp6://[$IP6_A1])
25if [[ -z "$remoteFaceIdTcp6" ]]; then
26 exit 3
27fi
28
29check_nfd_status_counters $remoteFaceIdUdp4 udp4://$IP4_A1 'in' $NUM_OF_PINGS
30if [[ $? -ne 0 ]]; then
31 exit 3
32fi
33
34check_nfd_status_counters $remoteFaceIdTcp4 tcp4://$IP4_A1 'in' $NUM_OF_PINGS
35if [[ $? -ne 0 ]]; then
36 exit 3
37fi
38
39check_nfd_status_counters $remoteFaceIdUdp6 udp6://[$IP6_A1] 'in' $NUM_OF_PINGS
40if [[ $? -ne 0 ]]; then
41 exit 3
42fi
43
44check_nfd_status_counters $remoteFaceIdTcp6 tcp6://[$IP6_A1] 'in' $NUM_OF_PINGS
45if [[ $? -ne 0 ]]; then
46 exit 3
47fi
48
49
50exit 0