#!/bin/sh
#
# gwck qmp IPv4 config example
#
# Copyright (C) 2008-2012 Simó Albert i Beltran
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# Version 0.1.20120512.0


#############
# Variables #
#############

# Modules directory.
#MODULES_DIR="$CONF_DIR/module"

# Instance name.
#INSTANCE="default"
INSTANCE="IPv4"

# Seconds to wait after connection detect in loop mode.
#WAIT_CONNECT="10"
WAIT_CONNECT="2"

# Seconds to wait after disconnection detect in loop mode.
#WAIT_DISCONNECT="300"
WAIT_DISCONNECT="3"

# File to log.
#LOG_FILE="/var/log/gwck"

# IP adresses to test.
#HOSTS_TEST="4.2.2.4 141.1.1.1 8.8.8.8"
HOSTS_TEST="4.2.2.4 198.41.0.4 8.8.8.8"

# Number of request packets to send to each target.
#PACKETS_NUMBER="20"
PACKETS_NUMBER="10"

# Action modules.
MODULES="wait_default specific_routes qmp"

# IP version.
GWCK_MOD_WAIT_DEFAULT_IPV="4"

# Route for hosts tests.
# Empty for autodetect.
#GWCK_MOD_SPECIFIC_ROUTES_ROUTE=""

# Routing table
#GWCK_MOD_SPECIFIC_ROUTES_RT_TABLE="200"

# Not disable offer if no other nodes offer Internet access.
#GWCK_MOD_QMP_TEST_OTHER_OFFER="true"

# Enable offer command.
#GWCK_MOD_QMP_ENABLE_OFFER="qmpcontrol offer_default_gw"
GWCK_MOD_QMP_ENABLE_OFFER="qmpcontrol offer_default_gw ipv4"

# Enable search command.
#GWCK_MOD_QMP_ENABLE_SEARCH="qmpcontrol search_default_gw"
GWCK_MOD_QMP_ENABLE_SEARCH="qmpcontrol search_default_gw ipv4"


#############
# Main code #
#############

# Start searching
$GWCK_MOD_QMP_ENABLE_SEARCH

##
# Start tests

log "Start gwck for IPv4 tests."
