arp.sh revision f20e6999
1source config.sh
2source odl_utils.sh
3source topologies/3_node_star.sh
4
5if [ "$1" == "clean" ] ; then
6  3_node_star_topo_clean no_odl
7  exit 0
8fi
9
10if [[ $(id -u) != 0 ]]; then
11  echo "Error: run this as root."
12  exit 1
13fi
14
15function send_icmp_from_namespace
16{
17  ip netns exec "$1" "$2" -w 15 -c 1 "$3"
18}
19
20function test_arp_resolution
21{
22  3_node_star_topo_setup no_odl no_arp
23
24  maybe_pause
25  send_icmp_from_namespace vpp-ns5 "$1" "$2"
26  rc=$?
27
28  maybe_pause
29  3_node_star_topo_clean no_odl
30  print_status $rc "No ICMP response!"
31  exit $test_result
32}
33