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