src/routing/manet/aodv/test/aodv-regression.h
author Elena Buchatskaia <borovkovaes@iitp.ru>
Thu, 29 Oct 2009 17:25:28 +0300
changeset 5732 e8996df1412d
parent 5730 f530c4943146
permissions -rw-r--r--
script description added
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5726
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
     2
/*
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
     3
 * Copyright (c) 2009 IITP RAS
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
     4
 *
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License version 2 as
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
     7
 * published by the Free Software Foundation;
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
     8
 *
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    12
 * GNU General Public License for more details.
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    13
 *
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    17
 *
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    18
 * Authors: Pavel Boyko <boyko@iitp.ru>
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    19
 */
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    20
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    21
#ifndef AODVREGRESSION_H_
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    22
#define AODVREGRESSION_H_
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    23
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    24
#include "ns3/test.h"
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    25
#include "ns3/nstime.h"
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    26
#include "ns3/node-container.h"
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    27
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    28
namespace ns3 {
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    29
namespace aodv {
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    30
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    31
/**
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    32
 * \ingroup aodv
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    33
 * 
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    34
 * \brief AODV chain regression test
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    35
 *
5732
e8996df1412d script description added
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5730
diff changeset
    36
 * This script creates 1-dimensional grid topology and then ping last node from the first one:
e8996df1412d script description added
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5730
diff changeset
    37
 *
e8996df1412d script description added
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5730
diff changeset
    38
 * [10.1.1.1] <-- step --> [10.1.1.2] <-- step --> [10.1.1.3] <-- step --> [10.1.1.4] <-- step --> [10.1.1.5]
e8996df1412d script description added
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5730
diff changeset
    39
 *
e8996df1412d script description added
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5730
diff changeset
    40
 * Each node can hear only his right and his left neighbor, if they exist. When one third of total time expired,
e8996df1412d script description added
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5730
diff changeset
    41
 * central node moves away. After this, node 3 doesn't hear any packets from other nodes and nobody hears his packets.
e8996df1412d script description added
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5730
diff changeset
    42
 * We want to demonstrate in this script
e8996df1412d script description added
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5730
diff changeset
    43
 * 1) route establishing
e8996df1412d script description added
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5730
diff changeset
    44
 * 2) broken link detection both from layer 2 information and hello messages.
5726
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    45
 * 
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
    46
 * \verbatim
5730
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    47
 Expected packets time diagram.
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    48
           1       2       3       4       5
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    49
    <------|------>|       |       |       |        RREQ (orig 10.1.1.1, dst 10.1.1.5, G=1, U=1, hop=0, ID=1, org_seqno=1) src = 10.1.1.1
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    50
           |<------|------>|       |       |        RREQ (orig 10.1.1.1, dst 10.1.1.5, G=1, U=1, hop=1, ID=1, org_seqno=1) src = 10.1.1.2
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    51
           |       |<------|------>|       |        RREQ (orig 10.1.1.1, dst 10.1.1.5, G=1, U=1, hop=2, ID=1, org_seqno=1) src = 10.1.1.3
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    52
           |       |       |<------|------>|        RREQ (orig 10.1.1.1, dst 10.1.1.5, G=1, U=1, hop=3, ID=1, org_seqno=1) src = 10.1.1.4
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    53
           |       |       |       |<------|------> ARP request. Who has 10.1.1.4? Tell 10.1.1.5
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    54
           |       |       |       |======>|        ARP reply
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    55
           |       |       |       |<======|        RREP (orig 10.1.1.1, dst 10.1.1.5, hop=0, dst_seqno=0) src=10.1.1.5
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    56
           |       |       |<------|------>|        ARP request. Who has 10.1.1.3? Tell 10.1.1.4
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    57
           |       |       |======>|       |        ARP reply
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    58
           |       |       |<======|       |        RREP (orig 10.1.1.1, dst 10.1.1.5, hop=1, dst_seqno=0) src=10.1.1.4
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    59
           |       |<------|------>|       |        ARP request. Who has 10.1.1.2? Tell 10.1.1.3
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    60
           |       |======>|       |       |        ARP reply
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    61
           |       |<======|       |       |        RREP (orig 10.1.1.1, dst 10.1.1.5, hop=2, dst_seqno=0) src=10.1.1.3
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    62
           |<------|------>|       |       |        ARP request. Who has 10.1.1.1? Tell 10.1.1.2
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    63
           |======>|       |       |       |        ARP reply
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    64
           |<======|       |       |       |        RREP (orig 10.1.1.1, dst 10.1.1.5, hop=3, dst_seqno=0) src=10.1.1.2
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    65
   <-------|------>|       |       |       |        ARP request. Who has 10.1.1.2? Tell 10.1.1.1
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    66
           |<======|       |       |       |
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    67
           |======>|       |       |       |        ICMP (ping) request 0 from 10.1.1.1 to 10.1.1.5; src=10.1.1.1 next_hop=10.1.1.2
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    68
           |<------|------>|       |       |        ARP request. Who has 10.1.1.3? Tell 10.1.1.2
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    69
           |       |<======|       |       |        ARP reply
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    70
           |       |======>|       |       |        ICMP (ping) request 0 from 10.1.1.1 to 10.1.1.5; src=10.1.1.2 next_hop=10.1.1.3
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    71
           |       |<------|------>|       |        ARP request. Who has 10.1.1.4? Tell 10.1.1.3
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    72
           |       |       |<======|       |        ARP reply
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    73
           |       |       |======>|       |        ICMP (ping) request 0 from 10.1.1.1 to 10.1.1.5; src=10.1.1.3 next_hop=10.1.1.4
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    74
           |       |       |<------|------>|        ARP request. Who has 10.1.1.5? Tell 10.1.1.4
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    75
           |       |       |       |<======|        ARP reply
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    76
           |       |       |       |======>|        ICMP (ping) request 0; src=10.1.1.4 next_hop=10.1.1.5
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    77
           |       |       |       |<======|        ICMP (ping) reply 0; src=10.1.1.5 next_hop=10.1.1.4
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    78
           |       |       |<======|       |        ICMP (ping) reply 0; src=10.1.1.4 next_hop=10.1.1.3
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    79
           |       |<======|       |       |        ICMP (ping) reply 0; src=10.1.1.3 next_hop=10.1.1.2
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    80
           |<======|       |       |       |        ICMP (ping) reply 0; src=10.1.1.2 next_hop=10.1.1.1
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    81
           |       |       |       |<------|------> Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    82
           |<------|------>|       |       |        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    83
    <------|------>|       |       |       |        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    84
           |       |<------|------>|       |        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    85
           |======>|       |       |       |        ICMP (ping) request 1; src=10.1.1.1 next_hop=10.1.1.2
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    86
           |       |       |<------|------>|        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    87
           |       |======>|       |       |        ICMP (ping) request 1; src=10.1.1.2 next_hop=10.1.1.3
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    88
           |       |       |======>|       |        ICMP (ping) request 1; src=10.1.1.3 next_hop=10.1.1.4
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    89
           |       |       |       |======>|        ICMP (ping) request 1; src=10.1.1.4 next_hop=10.1.1.5
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    90
           |       |       |       |<======|        ICMP (ping) reply 1; src=10.1.1.5 next_hop=10.1.1.4
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    91
           |       |       |<======|       |        ICMP (ping) reply 1; src=10.1.1.4 next_hop=10.1.1.3
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    92
           |       |<======|       |       |        ICMP (ping) reply 11; src=10.1.1.3 next_hop=10.1.1.2
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    93
           |<======|       |       |       |        ICMP (ping) reply 1; src=10.1.1.2 next_hop=10.1.1.1
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    94
           |       |       |       |<------|------> Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    95
           |<------|------>|       |       |        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    96
    <------|------>|       |       |       |        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    97
           |       |       |<------|------>|        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    98
           |       |<------|------>|       |        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
    99
           |======>|       |       |       |        ICMP (ping) request 2; src=10.1.1.1 next_hop=10.1.1.2
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   100
           |       |======>|       |       |        ICMP (ping) request 2; src=10.1.1.2 next_hop=10.1.1.3
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   101
           |       |       |======>|       |        ICMP (ping) request 2; src=10.1.1.3 next_hop=10.1.1.4
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   102
           |       |       |       |======>|        ICMP (ping) request 2; src=10.1.1.4 next_hop=10.1.1.5
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   103
           |       |       |       |<======|        ICMP (ping) reply 2; src=10.1.1.5 next_hop=10.1.1.4
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   104
           |       |       |<======|       |        ICMP (ping) reply 2; src=10.1.1.4 next_hop=10.1.1.3
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   105
           |       |<======|       |       |        ICMP (ping) reply 2; src=10.1.1.3 next_hop=10.1.1.2
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   106
           |<======|       |       |       |        ICMP (ping) reply 2; src=10.1.1.2 next_hop=10.1.1.1
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   107
           |       |       |       |<------|------> Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   108
    <------|------>|       |       |       |        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   109
           |       |<------|------>|       |        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   110
           |<------|------>|       |       |        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   111
           |       |       |<------|------>|        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   112
           |======>|       |       |       |        ICMP (ping) request 3; src=10.1.1.1 next_hop=10.1.1.2
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   113
           |       |======>|       |       |        ICMP (ping) request 3; src=10.1.1.2 next_hop=10.1.1.3
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   114
           |       |       |======>|       |        ICMP (ping) request 3; src=10.1.1.3 next_hop=10.1.1.4
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   115
           |       |       |       |======>|        ICMP (ping) request 3; src=10.1.1.4 next_hop=10.1.1.5
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   116
           |       |       |       |<======|        ICMP (ping) reply 3; src=10.1.1.5 next_hop=10.1.1.4
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   117
           |       |       |<======|       |        ICMP (ping) reply 3; src=10.1.1.4 next_hop=10.1.1.3
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   118
           |       |<======|       |       |        ICMP (ping) reply 3; src=10.1.1.3 next_hop=10.1.1.2
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   119
           |<======|       |       |       |        ICMP (ping) reply 3; src=10.1.1.2 next_hop=10.1.1.1
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   120
           |       |       |       |<------|------> Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   121
    <------|------>|       |       |       |        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   122
           |<------|-->    |       |       |        Hello   |
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   123
           |       |    <--|-->    |       |        Hello   |Node 3 move away => nobody hear his packets and node 3 doesn't hear anything !
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   124
           |       |       |    <--|------>|        Hello   |
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   125
           |======>|       |       |       |        ICMP (ping) request 4; src=10.1.1.1 next_hop=10.1.1.2
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   126
           |       |==>    |       |       |        ICMP (ping) request 4; src=10.1.1.2 next_hop=10.1.1.3.   7 retries.
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   127
           |<======|       |       |       |        RERR (unreachable dst 10.1.1.3 & 10.1.1.5) src=10.1.1.2
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   128
           |       |       |       |<------|------> Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   129
    <------|------>|       |       |       |        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   130
           |<------|-->    |       |       |        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   131
           |       |    <--|-->    |       |        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   132
           |       |       |    <--|------>|        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   133
    <------|------>|       |       |       |        RREQ (orig 10.1.1.1, dst 10.1.1.5, G=1, hop=0, ID=2, org_seqno=2) src = 10.1.1.1
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   134
           |<------|-->    |       |       |        RREQ (orig 10.1.1.1, dst 10.1.1.5, G=1, hop=1, ID=2, org_seqno=1) src = 10.1.1.2
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   135
           |       |       |       |<------|------> Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   136
           |       |       |    <--|------>|        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   137
           |       |    <--|-->    |       |        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   138
    <------|------>|       |       |       |        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   139
    <------|------>|       |       |       |        RREQ (orig 10.1.1.1, dst 10.1.1.5, G=1, hop=0, ID=3, org_seqno=3) src = 10.1.1.1
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   140
           |<------|-->    |       |       |        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   141
           |<------|-->    |       |       |        RREQ (orig 10.1.1.1, dst 10.1.1.5, G=1, hop=1, ID=3, org_seqno=3) src = 10.1.1.2
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   142
           |       |       |       |======>|        RERR (unreachable dst 10.1.1.1 & 10.1.1.3) src=10.1.1.4
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   143
           |       |       |       |<------|------> Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   144
           |       |       |    <--|------>|        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   145
           |       |    <--|-->    |       |        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   146
           |<------|-->    |       |       |        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   147
    <------|------>|       |       |       |        Hello
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   148
    <------|------>|       |       |       |        RREQ (orig 10.1.1.1, dst 10.1.1.5, G=1, hop=0, ID=4, org_seqno=4) src = 10.1.1.1
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   149
           |<------|-->    |       |       |        RREQ (orig 10.1.1.1, dst 10.1.1.5, G=1, hop=1, ID=4, org_seqno=4) src = 10.1.1.2
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   150
f530c4943146 time diagram + fixed hop count
Elena Buchatskaia <borovkovaes@iitp.ru>
parents: 5726
diff changeset
   151
..................................................................
5726
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   152
 * \endverbatim
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   153
 */
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   154
class ChainRegressionTest : public TestCase
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   155
{
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   156
public:
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   157
  ChainRegressionTest ();
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   158
  ~ChainRegressionTest ();  
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   159
private:
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   160
  /// Unique PCAP files prefix for this test
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   161
  static const char * const PREFIX;
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   162
  /// XXX It is important to have pointers here
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   163
  NodeContainer * m_nodes;
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   164
  
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   165
  /// Total simulation time
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   166
  const Time m_time;
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   167
  /// Chain size
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   168
  const uint32_t m_size;
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   169
  /// Chain step, meters
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   170
  const double m_step;
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   171
  
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   172
  /// Create test topology
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   173
  void CreateNodes ();
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   174
  /// Create devices, install TCP/IP stack and applications
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   175
  void CreateDevices ();
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   176
  /// Compare traces with reference ones
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   177
  void CheckResults ();
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   178
  /// Go
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   179
  bool DoRun ();
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   180
};
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   181
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   182
}
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   183
}
8776c223c36c [aodv] Broken chain ping regression added (without reference traces yet)
Pavel Boyko <boyko@iitp.ru>
parents:
diff changeset
   184
#endif /* AODVREGRESSION_H_ */