ItsIpv6OverGeoNetworking_TestCases.ttcn 109 KB
Newer Older
                      log("*** " & testcasename() & ": INCONC: Expected message not received ***");
                      f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
                  }
                }
                
                // Postamble
                f_poIpv6Neighbour();
                f_cf01DownGn6();
                
            } // end TC_IPV6GEO_MG_TVL_BV_03
            
        } // end mgTvl
        
    } // end group messageGeneration
    
    //5.2.2
    group messageReception {
        
        //5.2.2.1
        group mrGvl {
            
            /**
             * @desc    Checks handling of a received GeoBroadcast message containing an 
             *          IPv6 packet, which has destination area corresponding to an existing SGVL 
             *          of the IUT
             * <pre>    
             * Pics Selection: PICS_SGVL
             * Initial conditions: 
             *  with {
             *      the IUT having configured SGVL (SGVL1)
             *      the IUT having configured SGVLs (SGVL2..SGVLx)
             *  }
             * Expected behaviour:
             *  ensure that {
             *      when { 
             *          the IUT receives a GeoBroadcast message
             *              containing Destination Area parameters corresponding to SGVL1
             *              containing payload 
             *                  indicating an IPv6 packet
             *      }
             *      then {
             *          the IUT transmits on the virtual interface associated to GVL1 an Ethernet packet
             *              containing Destination MAC address
             *                  indicating the broadcast value
             *              containing Source MAC address
             *                  indicating a value derived from Source GN_ADDR field
             *              containing Ether Type value
             *                  indicating IPv6
             *              containing the IPv6 packet
             *      }
             *  }
             * </pre>
             * 
             * @see         ETSI TS 102 859-2 v2.1.1 TP/IPv6GEO/MR/GVL/BV/01
             * @reference   ETSI EN 302 636-6-1 clauses, 8.2.2
             */
            testcase TC_IPV6GEO_MR_GVL_BV_01() runs on ItsIpv6OverGeoNetworking system ItsIpv6OverGeoNetworkingSystem {
                // Local variables
                var LongPosVector v_longPosVectorNodeA;
                var AddressTableEntry v_addressesIut, v_addressesNodeA;
                var template (value) Ipv6Packet v_ipv6Packet;
                
                // Test control
                
                // Test component configuration
                f_cf01UpGn6();
                v_addressesIut := f_getAddresses(c_compIut);
                v_longPosVectorNodeA := f_getPosition(c_compNodeA);
                v_addressesNodeA := f_getAddresses(c_compNodeA);
                                
                // Test adapter configuration
                
                // Preamble
                f_prIpv6Neighbour();
                f_prConfigureGVL({c_gvl1, c_gvl2});
                
                v_ipv6Packet := m_ipv6Packet(
                                    v_addressesNodeA.lla, 
                                    v_addressesIut.lla, 
                                    c_noNextHdr, 
                                    omit
                                );
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                
                // Test Body
                f_sendGeoNetMessageWithPayload(
Yann Garcia's avatar
Yann Garcia committed
                    m_geoNwReq_linkLayerBroadcast(
                        m_geoNwPdu(
                            m_geoNwBroadcastPacket(
                                v_longPosVectorNodeA,
                                vc_localSeqNumber,
                                f_getGeoBroadcastArea(vc_gvlTable[c_gvl1].area)
                            )
                        )
Yann Garcia's avatar
Yann Garcia committed
                    ),
                    bit2oct(encvalue(v_ipv6Packet))
                );
                
                tc_ac.start;
                alt {
                  [] ipv6OverGeoNetworkingPort.receive(
                        mw_ipv6OverGeoNwInd(
                            f_getGvlInterface(c_gvl1),
                            v_addressesNodeA.macAddress, // FIXME check where this comes from (verify TP)
                            c_llBroadcast,
                            v_ipv6Packet
                        )
                    )  {
                      tc_ac.stop;
                      log("*** " & testcasename() & ": PASS: Received correct Ethernet packet ***");
                      f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); 
                  }
                  [] tc_ac.timeout {
                      log("*** " & testcasename() & ": INCONC: Expected message not received ***");
                      f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
                  }   
                }
                
                // Postamble
                f_poIpv6Neighbour();
                f_cf01DownGn6();
                     
            } // end TC_IPV6GEO_MR_GVL_BV_01
            
            /**
             * @desc    Checks handling of a received GeoBroadcast message containing an IPv6 
             *          packet no carrying a Router Advertisement, which has destination area not corresponding to 
             *          any existing SGVL of the IUT
             * <pre>    
             * Pics Selection: PICS_SGVL and PICS_DGVL
             * Initial conditions: 
             *  with {
             *      the IUT having configured SGVLs (SGVL1 .. SGVLx)
             *      the IUT having configured DGVL (DGVL1)
             *  }
             * Expected behaviour:
             *  ensure that {
             *      when { 
             *          the IUT receives a GeoBroadcast message
             *              containing Destination Area parameters not corresponding to any GVLs
             *              containing payload 
             *                  containing an IPv6 packet
             *                      not containing an ICMPv6 RA message
             *      }
             *      then {
             *          the IUT transmits on the virtual interface associated to DGVL1 an Ethernet packet
             *              containing Destination MAC address
             *                  indicating the broadcast value
             *              containing Source MAC address
             *                  indicating a value derived from Source GN_ADDR field
             *              containing Ether Type value
             *                  indicating IPv6
             *              containing the IPv6 packet
             *      }
             *  }
             * </pre>
             * 
             * @see         ETSI TS 102 859-2 v2.1.1 TP/IPv6GEO/MR/GVL/BV/02
             * @reference   ETSI EN 302 636-6-1 clauses, 8.2.2
             */
            testcase TC_IPV6GEO_MR_GVL_BV_02() runs on ItsIpv6OverGeoNetworking system ItsIpv6OverGeoNetworkingSystem {
                // Local variables
                var LongPosVector v_longPosVectorNodeA;
                var AddressTableEntry v_addressesIut, v_addressesNodeA;
                var template (value) Ipv6Packet v_ipv6Packet;
                
                // Test control
                
                // Test component configuration
                f_cf01UpGn6();
                v_addressesIut := f_getAddresses(c_compIut);
                v_longPosVectorNodeA := f_getPosition(c_compNodeA);
                v_addressesNodeA := f_getAddresses(c_compNodeA);
                                
                // Test adapter configuration
                
                // Preamble
                f_prIpv6Neighbour();
                
                // No Router Advertisement for gvl2
                f_prConfigureGVL({c_gvl1});
                
                v_ipv6Packet := m_ipv6Packet(
                                    v_addressesNodeA.lla, 
                                    v_addressesIut.solNodeMca, 
                                    c_noNextHdr, 
                                    omit
                                );
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                
                // Test Body
                f_sendGeoNetMessageWithPayload(
Yann Garcia's avatar
Yann Garcia committed
                    m_geoNwReq_linkLayerBroadcast(
                        m_geoNwPdu(
                            m_geoNwBroadcastPacket(
                                v_longPosVectorNodeA,
                                vc_localSeqNumber,
                                f_getGeoBroadcastArea(vc_gvlTable[c_gvl2].area)
                            )
                        )
Yann Garcia's avatar
Yann Garcia committed
                    ),
                    bit2oct(encvalue(v_ipv6Packet))
                );
                
                tc_ac.start;
                alt {
                  [] ipv6OverGeoNetworkingPort.receive(
                        mw_ipv6OverGeoNwInd(
                            complement (f_getGvlInterface(c_gvl1), f_getGvlInterface(c_gvl2)),
                            v_addressesNodeA.macAddress,
                            c_llBroadcast,
                            v_ipv6Packet
                        )
                    )  {
                      tc_ac.stop;
                      log("*** " & testcasename() & ": PASS: Received correct Ethernet packet ***");
                      f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); 
                  }
                  [] tc_ac.timeout {
                      log("*** " & testcasename() & ": INCONC: Expected message not received ***");
                      f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
                  }   
                }
                
                // Postamble
                f_poIpv6Neighbour();
                f_cf01DownGn6();
                     
            } // end TC_IPV6GEO_MR_GVL_BV_02
            
            /**
             * @desc    Checks handling of a received GeoAnycast message containing an IPv6 packet, which 
             *          has destination area corresponding to an existing SGVL of the IUT
             * <pre>    
             * Pics Selection: PICS_SGVL
             * Initial conditions: 
             *  with {
             *      the IUT having configured SGVLs (SGVL1 .. SGVLx)
             *  }
             * Expected behaviour:
             *  ensure that {
             *      when { 
             *          the IUT receives a GeoAnycast message
             *              containing Destination Area parameters corresponding to SGVL1
             *              containing payload 
             *                  indicating an IPv6 packet
             *      }
             *      then {
             *          the IUT transmits on the virtual interface associated to SGVL1 an Ethernet packet
             *              containing Source MAC address
             *                  indicating a value derived from Source GN_ADDR field
             *              containing Ether Type value
             *                  indicating IPv6 
             *              containing the IPv6 packet
             *      }
             *  }
             * </pre>
             * 
             * @see         ETSI TS 102 859-2 v2.1.1 TP/IPv6GEO/MR/GVL/BV/03
             * @reference   ETSI EN 302 636-6-1 clauses, 8.2.2
             */
            testcase TC_IPV6GEO_MR_GVL_BV_03() runs on ItsIpv6OverGeoNetworking system ItsIpv6OverGeoNetworkingSystem {
                // Local variables
                var LongPosVector v_longPosVectorNodeA;
                var AddressTableEntry v_addressesIut, v_addressesNodeA;
                var template (value) Ipv6Packet v_ipv6Packet;
                
                // Test control
                
                // Test component configuration
                f_cf01UpGn6();
                v_addressesIut := f_getAddresses(c_compIut);
                v_longPosVectorNodeA := f_getPosition(c_compNodeA);
                v_addressesNodeA := f_getAddresses(c_compNodeA);
                
                // Test adapter configuration
                
                // Preamble
                f_prIpv6Neighbour();
                f_prConfigureGVL({c_gvl1, c_gvl2});
                
                v_ipv6Packet := m_ipv6Packet(
                                    v_addressesNodeA.lla, 
                                    v_addressesIut.solNodeMca, 
                                    c_noNextHdr, 
                                    omit
                                );
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                
                // Test Body
                f_sendGeoNetMessageWithPayload(
Yann Garcia's avatar
Yann Garcia committed
                    m_geoNwReq_linkLayerBroadcast(
                        m_geoNwPdu(
                            m_geoNwAnycastPacket(
                                v_longPosVectorNodeA,
                                vc_localSeqNumber,
                                f_getGeoAnycastArea(vc_gvlTable[c_gvl1].area)
                            )
                        )
Yann Garcia's avatar
Yann Garcia committed
                    ),
                    bit2oct(encvalue(v_ipv6Packet))
                );
                
                tc_ac.start;
                alt {
                  [] ipv6OverGeoNetworkingPort.receive(
                        mw_ipv6OverGeoNwInd(
                            f_getGvlInterface(c_gvl1),
                            v_addressesNodeA.macAddress,
                            ?, 
                            v_ipv6Packet
                        )
                    )  {
                      tc_ac.stop;
                      log("*** " & testcasename() & ": PASS: Received correct Ethernet packet ***");
                      f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); 
                  }
                  [] tc_ac.timeout {
                      log("*** " & testcasename() & ": INCONC: Expected message not received ***");
                      f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
                  }
                }
                
                // Postamble
                f_poIpv6Neighbour();
                f_cf01DownGn6();
                
            } // end TC_IPV6GEO_MR_GVL_BV_03
            
            /**
             * @desc    Checks handling of a received GeoAnycast message containing an IPv6 packet, which 
             *          has destination area not corresponding to any existing GVL of the IUT
             * <pre>    
             * Pics Selection: PICS_SGVL and PICS_DGVL
             * Initial conditions: 
             *  with {
             *      the IUT having configured GVLs (GVL1 .. GVLx)
             *      the IUT having configured DGVL (DGVL1)
             *  }
             * Expected behaviour:
             *  ensure that {
             *      when { 
             *          the IUT receives a GeoAnycast message
             *              containing Destination Area parameters not corresponding to any SGVLs and
             *               containing payload 
             *                   indicating an IPv6 packet
             *      }
             *      then {
             *          the IUT transmits on the virtual interface associated to DGVL1 an Ethernet packet
             *              containing Destination MAC address
             *                  indicating the broadcast value
             *              containing Source MAC address
             *                  indicating a value derived from Source GN_ADDR field
             *              containing Ether Type value
             *                  indicating IPv6
             *              containing the IPv6 packet
             *      }
             *  }
             * </pre>
             * 
             * @see         ETSI TS 102 859-2 v2.1.1 TP/IPv6GEO/MR/GVL/BV/04
             * @reference   ETSI EN 302 636-6-1 clauses, 8.2.2
             */
            testcase TC_IPV6GEO_MR_GVL_BV_04() runs on ItsIpv6OverGeoNetworking system ItsIpv6OverGeoNetworkingSystem {
                
                // Local variables
                var LongPosVector v_longPosVectorNodeA;
                var AddressTableEntry v_addressesIut, v_addressesNodeA;
                var template (value) Ipv6Packet v_ipv6Packet;
                
                // Test control
                
                // Test component configuration
                f_cf01UpGn6();
                v_addressesIut := f_getAddresses(c_compIut);
                v_longPosVectorNodeA := f_getPosition(c_compNodeA);
                v_addressesNodeA := f_getAddresses(c_compNodeA);
                
                // Test adapter configuration
                
                // Preamble
                f_prIpv6Neighbour();
                
                // No Router Advertisement for gvl_1
                f_prConfigureGVL({c_gvl2});
                
                v_ipv6Packet := m_ipv6Packet(
                                    v_addressesNodeA.lla, 
                                    v_addressesIut.lla, 
                                    c_noNextHdr, 
                                    omit
                                );
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                
                // Test Body
                f_sendGeoNetMessageWithPayload(
Yann Garcia's avatar
Yann Garcia committed
                    m_geoNwReq_linkLayerBroadcast(
                        m_geoNwPdu(
                            m_geoNwBroadcastPacket(
                                v_longPosVectorNodeA,
                                vc_localSeqNumber,
                                f_getGeoBroadcastArea(vc_gvlTable[c_gvl1].area)
                            )
                        )
Yann Garcia's avatar
Yann Garcia committed
                    ),
                    bit2oct(encvalue(v_ipv6Packet))
                );
                
                tc_ac.start;
                alt {
                  [] ipv6OverGeoNetworkingPort.receive(
                        mw_ipv6OverGeoNwInd(
                            complement (f_getGvlInterface(c_gvl1), f_getGvlInterface(c_gvl2)),
                            v_addressesNodeA.macAddress,
                            c_llBroadcast, 
                            v_ipv6Packet
                        )
                    )  {
                      tc_ac.stop;
                      log("*** " & testcasename() & ": PASS: Received correct Ethernet packet ***");
                      f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); 
                  }
                  [] tc_ac.timeout {
                      log("*** " & testcasename() & ": INCONC: Expected message not received ***");
                      f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
                  }
                }
                
                // Postamble
                f_poIpv6Neighbour();
                f_cf01DownGn6();
                
            } // end TC_IPV6GEO_MR_GVL_BV_04
            
            /**
             * @desc    Checks handling of a received GeoBroadcast message containing an
             *          IPv6 packet carrying a Router Advertisement, which has destination area not corresponding to 
             *          any existing SGVL of the IUT
             * <pre>    
             * Pics Selection: PICS_SGVL
             * Initial conditions: 
             *  with {
             *      the IUT having configured SGVLs (SGVL1 .. SGVLx)
             *  }
             * Expected behaviour:
             *  ensure that {
             *      when { 
             *          the IUT receives a GeoBroadcast message
             *              containing Destination Area parameters not corresponding to any SGVLs
             *                  containing an IPv6 packet
             *                      indicating an ICMPv6 RA message
             *      }
             *      then {
             *          the IUT creates a new SGVL and a new virtual interface associated to it 
             *          the IUT transmits on the virtual interface associated to the new GVL an Ethernet packet
             *              containing Destination MAC address
             *                  indicating '33:33:00:00:00:01'
             *              containing Source MAC address
             *                  indicating a value derived from Source GN_ADDR field
             *              containing Ether Type value
             *                  indicating IPv6
             *              containing the IPv6 packet
             *      }
             *  }
             * </pre>
             * 
             * @see         ETSI TS 102 859-2 v2.1.1 TP/IPv6GEO/MR/GVL/BV/05
             * @reference   ETSI EN 302 636-6-1 clauses, 8.2.2
             */
            testcase TC_IPV6GEO_MR_GVL_BV_05() runs on ItsIpv6OverGeoNetworking system ItsIpv6OverGeoNetworkingSystem {
                
                // Local variables
                var LongPosVector v_longPosVectorNodeA;
                var AddressTableEntry v_addressesNodeA;
                var template (value) Ipv6Packet v_ipv6Packet;
                
                // Test control
                
                // Test component configuration
                f_cf01UpGn6();
                v_longPosVectorNodeA := f_getPosition(c_compNodeA);
                v_addressesNodeA := f_getAddresses(c_compNodeA);
                
                // Test adapter configuration
                
                // Preamble
                f_prIpv6Neighbour();
                //gvl3 handled later
                f_prConfigureGVL({c_gvl1, c_gvl2});
                                
                v_ipv6Packet := m_ipv6Packet(
                                    v_addressesNodeA.lla, 
                                    c_allNodesMca, 
                                    c_icmpHdr,
                                    m_rtAdvWithOptions(
                                        m_rtAdvOpt_prefixOpt(
                                            vc_gvlTable[c_gvl3].prefixLength,
                                            c_lFlag1,
                                            c_aFlag1,
                                            c_validLifetime30s,
                                            c_preferredLifetime30s,
                                            vc_gvlTable[c_gvl3].prefix
                                        )
                                    )
                                );
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                
                // Test Body
                f_sendGeoNetMessageWithPayload(
Yann Garcia's avatar
Yann Garcia committed
                    m_geoNwReq_linkLayerBroadcast(
                        m_geoNwPdu(
                            m_geoNwBroadcastPacket(
                                v_longPosVectorNodeA,
                                vc_localSeqNumber,
                                f_getGeoBroadcastArea(vc_gvlTable[c_gvl3].area)
                            )
                        )
Yann Garcia's avatar
Yann Garcia committed
                    ),
                    bit2oct(encvalue(v_ipv6Packet))
                );
                
                f_sleep(PX_T_BUILD_CONFIG);
                f_acUpdateInterfaces();
                
                tc_ac.start;
                alt {
                  [] ipv6OverGeoNetworkingPort.receive(
                        mw_ipv6OverGeoNwInd(
                            f_getGvlInterface(c_gvl3),
                            v_addressesNodeA.macAddress,
                            c_macBroadcastAddr,
                            v_ipv6Packet
                        )
                    )  {
                      tc_ac.stop;
                      log("*** " & testcasename() & ": PASS: Received correct Ethernet packet ***");
                      f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); 
                  }
                  [] tc_ac.timeout {
                      log("*** " & testcasename() & ": INCONC: Expected message not received ***");
                      f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
                  }
                }
                
                // Postamble
                f_poIpv6Neighbour();
                f_cf01DownGn6();
                
            } // end TC_IPV6GEO_MR_GVL_BV_05
            
            /**
             * @desc    Checks handling of a received GeoUnicast message, containing an IPv6 packet with 
             *          destination address matching one and only one address associated to a 
             *          virtual interface of the IUT
             * <pre>
             * Pics Selection: PICS_SGVL
             * Initial conditions: 
             *  with {
             *      the IUT having configured SGVLs (SGVL1 .. SGVLx)
             *  }
             * Expected behaviour:
             *  ensure that {
             *      when { 
             *          the IUT receives a GeoUnicast message
             *              containing an IPv6 packet 
             *                  containing address associated to one SGVL (SGVLy)
             *      }
             *      then {
             *          the IUT transmits on the virtual interface associated to SGVLy an Ethernet packet
             *              containing Destination MAC address
             *                  indicating a value derived from the Destination GN_ADDR field
             *              containing Source MAC address
             *                  indicating a value derived from Source GN_ADDR field
             *              containing Ether Type value
             *                  indicating IPv6
             *              containing the IPv6 packet
             *      }
             *  }
             * </pre>
             * 
             * @see         ETSI TS 102 859-2 v2.1.1 TP/IPv6GEO/MR/GVL/BV/06
             * @reference   ETSI EN 302 636-6-1 clauses, 8.2.2
             */
            testcase TC_IPV6GEO_MR_GVL_BV_06() runs on ItsIpv6OverGeoNetworking system ItsIpv6OverGeoNetworkingSystem {
                
                // Local variables
                var LongPosVector v_longPosVectorIut, v_longPosVectorNodeA, v_longPosVectorNodeB;
                var AddressTableEntry v_addressesIut, v_addressesNodeA;
                var template (value) Ipv6Packet v_ipv6Packet;
                
                // Test control
                
                // Test component configuration
                f_cf01UpGn6();
                v_longPosVectorIut := f_getPosition(c_compIut);
                v_addressesIut := f_getAddresses(c_compIut);
                v_longPosVectorNodeA := f_getPosition(c_compNodeA);
                v_addressesNodeA := f_getAddresses(c_compNodeA);
                v_longPosVectorNodeB := f_getPosition(c_compNodeB);
                
                // Test adapter configuration
                
                // Preamble
                f_prIpv6Neighbour();
                f_prConfigureGVL({c_gvl1, c_gvl2});
                
                v_ipv6Packet := m_ipv6Packet(
                                    v_addressesNodeA.lla, 
                                    v_addressesIut.lla, 
                                    c_noNextHdr, 
                                    omit
                                );
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                
                // Test Body
                f_sendGeoNetMessageWithPayload(
Yann Garcia's avatar
Yann Garcia committed
                    m_geoNwReq_linkLayerBroadcast(
                        m_geoNwPdu(
                            m_geoNwUnicastPacket(
                                v_longPosVectorNodeA,
                                f_longPosVector2ShortPosVector(v_longPosVectorIut),
                                vc_localSeqNumber
                            )
                        )
Yann Garcia's avatar
Yann Garcia committed
                    ),
                    bit2oct(encvalue(v_ipv6Packet))
                );
                
                tc_ac.start;
                alt {
                  [] ipv6OverGeoNetworkingPort.receive(
                        mw_ipv6OverGeoNwInd(
                            f_getGvlInterface(c_gvl2),
                            v_addressesNodeA.macAddress,
                            v_addressesIut.macAddress,
                            v_ipv6Packet
                        )
                    )  {
                      tc_ac.stop;
                      log("*** " & testcasename() & ": PASS: Received correct Ethernet packet ***");
                      f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); 
                  }
                  [] tc_ac.timeout {
                      log("*** " & testcasename() & ": INCONC: Expected message not received ***");
                      f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
                  }
                }
                
                // Postamble
                f_poIpv6Neighbour();
                f_cf01DownGn6();
                
            } // end TC_IPV6GEO_MR_GVL_BV_06
            
            /**
             * @desc    Checks handling of a received GeoUnicast message, containing an 
             *          IPv6 packet with destination address not matching addresses associated to IUT's SGVLs and 
             *          with SOPV contained in one and only one geoArea associated to IUT's SGVLs
             * <pre>
             * Pics Selection: PICS_SGVL
             * Initial conditions: 
             *  with {
             *      the IUT having configured SGVLs (SGVL1 .. SGVLx)
             *  }
             * Expected behaviour:
             *  ensure that {
             *      when { 
             *          the IUT receives a GeoUnicast message
             *              containing payload
             *                  containing an IPv6 packet
             *                      containing a destination address
             *                          indicating address not associated to any GVL
             *              containing Source position coordinates only contained in GVLy
             *      }
             *      then {
             *          the IUT transmits on the virtual interface associated to GVLy an Ethernet packet
             *              containing Destination MAC address
             *                  indicating a value derived from the Destination GN_ADDR field
             *              containing Source MAC address
             *                  indicating a value derived from Source GN_ADDR field
             *              containing Ether Type value
             *                  indicating IPv6
             *              containing the IPv6 packet
             *      }
             *  }
             * </pre>
             * 
             * @see         ETSI TS 102 859-2 v2.1.1 TP/IPv6GEO/MR/GVL/BV/07
             * @reference   ETSI EN 302 636-6-1 clauses, 8.2.2
             */
            testcase TC_IPV6GEO_MR_GVL_BV_07() runs on ItsIpv6OverGeoNetworking system ItsIpv6OverGeoNetworkingSystem {
                
                // Local variables
                var LongPosVector v_longPosVectorIut, v_longPosVectorNodeA, v_longPosVectorNodeB;
                var AddressTableEntry v_addressesIut, v_addressesNodeA, v_addressesNodeB;
                var template (value) Ipv6Packet v_ipv6Packet;
                
                // Test control
                
                // Test component configuration
                f_cf01UpGn6();
                v_longPosVectorIut := f_getPosition(c_compIut);
                v_addressesIut := f_getAddresses(c_compIut);
                v_longPosVectorNodeA := f_getPosition(c_compNodeA);
                v_addressesNodeA := f_getAddresses(c_compNodeA);
                v_longPosVectorNodeB := f_getPosition(c_compNodeB);
                v_addressesNodeB := f_getAddresses(c_compNodeB);
                
                // Test adapter configuration
                
                // Preamble
                f_prIpv6Neighbour();
                f_prConfigureGVL({c_gvl1, c_gvl2});
                
                v_ipv6Packet := m_ipv6Packet(
                                    v_addressesNodeA.lla, 
                                    v_addressesNodeB.lla, 
                                    c_noNextHdr, 
                                    omit
                                );
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                
                // Test Body
                f_sendGeoNetMessageWithPayload(
Yann Garcia's avatar
Yann Garcia committed
                    m_geoNwReq_linkLayerBroadcast(
                        m_geoNwPdu(
                            m_geoNwUnicastPacket(
                                v_longPosVectorNodeB,
                                f_longPosVector2ShortPosVector(v_longPosVectorIut),
                                vc_localSeqNumber
                            )
                        )
Yann Garcia's avatar
Yann Garcia committed
                    ),
                    bit2oct(encvalue(v_ipv6Packet))
                );
                
                tc_ac.start;
                alt {
                  [] ipv6OverGeoNetworkingPort.receive(
                        mw_ipv6OverGeoNwInd(
                            f_getGvlInterface(c_gvl3),
                            v_addressesNodeA.macAddress,
                            v_addressesNodeB.macAddress,
                            v_ipv6Packet
                        )
                    )  {
                      tc_ac.stop;
                      log("*** " & testcasename() & ": PASS: Received correct Ethernet packet ***");
                      f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); 
                  }
                  [] tc_ac.timeout {
                      log("*** " & testcasename() & ": INCONC: Expected message not received ***");
                      f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
                  }
                }
                
                // Postamble
                f_poIpv6Neighbour();
                f_cf01DownGn6();
                
            } // end TC_IPV6GEO_MR_GVL_BV_07
            
            /**
             * @desc    Checks handling of a received GeoUnicast message, containing an IPv6 packet with 
             *          destination address not matching addresses associated to IUT's GVLs and with SOPV not 
             *          contained in any geoArea associated to IUT's GVLs
             * <pre>    
             * Pics Selection: PICS_SGVL and PICS_DGVL
             * Initial conditions: 
             *  with {
             *      the IUT having configured SGVLs (SGVL1 .. SGVLx)
             *      the IUT having configured DGVL (DGVL1)
             *  }
             * Expected behaviour:
             *  ensure that {
             *      when { 
             *          the IUT receives a GeoUnicast message
             *              containing payload
             *                  containing an IPv6 packet
             *                      containing a destination address
             *                          indicating address not associated to any GVL
             *              containing Source position coordinates not contained in any GVL
             *      }
             *      then {
             *          the IUT transmits on the virtual interface associated to DGVL an Ethernet packet
             *              containing Destination MAC address
             *                  indicating a value derived from the Destination GN_ADDR field
             *              containing Source MAC address
             *                  indicating a value derived from Source GN_ADDR field
             *              containing Ether Type value
             *                  indicating IPv6
             *              containing the IPv6 packet
             *      }
             *  }
             * </pre>
             * 
             * @see         ETSI TS 102 859-2 v2.1.1 TP/IPv6GEO/MR/GVL/BV/08
             * @reference   ETSI EN 302 636-6-1 clauses, 8.2.2
             */
            testcase TC_IPV6GEO_MR_GVL_BV_08() runs on ItsIpv6OverGeoNetworking system ItsIpv6OverGeoNetworkingSystem {
                
                // Local variables
                var LongPosVector v_longPosVectorIut, v_longPosVectorNodeB;
                var AddressTableEntry v_addressesIut, v_addressesNodeA;
                var template (value) Ipv6Packet v_ipv6Packet;
                
                // Test control
                
                // Test component configuration
                f_cf01UpGn6();
                v_longPosVectorIut := f_getPosition(c_compIut);
                v_addressesIut := f_getAddresses(c_compIut);
                v_longPosVectorNodeB := f_getPosition(c_compNodeB);
                v_addressesNodeA := f_getAddresses(c_compNodeA);
                
                // Test adapter configuration
                
                // Preamble
                f_prIpv6Neighbour();
                f_prConfigureGVL({c_gvl1, c_gvl2});
                                
                v_ipv6Packet := m_ipv6Packet(
                                    f_computeGlobalAddress(c_compNodeA, vc_gvlTable[c_gvl2].prefix, vc_gvlTable[c_gvl2].prefixLength),
                                    f_computeGlobalAddress(c_compIut, vc_gvlTable[c_gvl2].prefix, vc_gvlTable[c_gvl2].prefixLength),
                                    c_noNextHdr, 
                                    omit
                                );
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                
                // Test Body
                f_sendGeoNetMessageWithPayload(
Yann Garcia's avatar
Yann Garcia committed
                    m_geoNwReq_linkLayerBroadcast(
                        m_geoNwPdu(
                            m_geoNwUnicastPacket(
                                v_longPosVectorNodeB,
                                f_longPosVector2ShortPosVector(v_longPosVectorIut),
                                vc_localSeqNumber
                            )
                        )
Yann Garcia's avatar
Yann Garcia committed
                    ),
                    bit2oct(encvalue(v_ipv6Packet))
                );
                
                tc_ac.start;
                alt {
                  [] ipv6OverGeoNetworkingPort.receive(
                        mw_ipv6OverGeoNwInd(
                            complement (f_getGvlInterface(c_gvl1), f_getGvlInterface(c_gvl2)),
                            v_addressesNodeA.macAddress,
                            v_addressesIut.macAddress,
                            v_ipv6Packet
                        )
                    )  {
                      tc_ac.stop;
                      log("*** " & testcasename() & ": PASS: Received correct Ethernet packet ***");
                      f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); 
                  }
                  [] tc_ac.timeout {
                      log("*** " & testcasename() & ": INCONC: Expected message not received ***");
                      f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
                  }
                }
                
                // Postamble
                f_poIpv6Neighbour();
                f_cf01DownGn6();
                
            } // end TC_IPV6GEO_MR_GVL_BV_08
            
            /**
             * @desc    Checks handling of a received GeoUnicast message, containing an IPv6 packet with 
             *          destination address not matching addresses associated to IUT's SGVLs and with SOPV 
             *          contained in more than one geoArea associated to IUT's SGVLs and with IPv6 source 
             *          address considered to be on-link on at least one of those SGVLs
             * <pre>    
             * Pics Selection: PICS_SGVL
             * Initial conditions: 
             *  with {
             *      the IUT having configured SGVLs (SGVL1 .. SGVLx)
             *      GVLb invalidation timer being higher than SGVLa and SGVLc invalidation timers
             *  }
             * Expected behaviour:
             *  ensure that {
             *      when { 
             *          the IUT receives a GeoUnicast message
             *              containing payload
             *                  containing an IPv6 packet
             *                      containing a destination address
             *                          indicating address not associated to any SGVL
             *              containing Source position coordinates contained in SGVLa, SGVLb and SGVLc
             *      }
             *      then {
             *          the IUT transmits on the virtual interface associated to SGVLb an Ethernet packet
             *              containing Destination MAC address
             *                  indicating a value derived from the Destination GN_ADDR field
             *              containing Source MAC address
             *                  indicating a value derived from Source GN_ADDR field
             *              containing Ether Type value
             *                  indicating IPv6
             *              containing the IPv6 packet
             *      }
             *  }
             * </pre>
             * 
             * @see         ETSI TS 102 859-2 v2.1.1 TP/IPv6GEO/MR/GVL/BV/09
             * @reference   ETSI EN 302 636-6-1 clauses, 8.2.2
             */
            testcase TC_IPV6GEO_MR_GVL_BV_09() runs on ItsIpv6OverGeoNetworking system ItsIpv6OverGeoNetworkingSystem {
                
                // Local variables
                var LongPosVector v_longPosVectorIut, v_longPosVectorNodeB;
                var AddressTableEntry v_addressesIut, v_addressesNodeA;
                var template (value) Ipv6Packet v_ipv6Packet;
                
                // Test control
                
                // Test component configuration
                f_cf01UpGn6();
                v_longPosVectorIut := f_getPosition(c_compIut);
                v_addressesIut := f_getAddresses(c_compIut);
                v_longPosVectorNodeB := f_getPosition(c_compNodeB);
                v_addressesNodeA := f_getAddresses(c_compNodeA);
                
                // Test adapter configuration
                
                // Preamble
                f_prIpv6Neighbour();
                f_prConfigureGVL({c_gvl1, c_gvl2, c_gvl3}, {c_validLifetime20s, c_validLifetime30s, c_validLifetime20s});
                
                v_ipv6Packet := m_ipv6Packet(
                                    f_computeGlobalAddress(c_compNodeA, vc_gvlTable[c_gvl2].prefix, vc_gvlTable[c_gvl2].prefixLength),
                                    f_computeGlobalAddress(c_compIut, vc_gvlTable[c_gvl2].prefix, vc_gvlTable[c_gvl2].prefixLength),
                                    c_noNextHdr, 
                                    omit
                                );
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                
                // Test Body
                f_sendGeoNetMessageWithPayload(
Yann Garcia's avatar
Yann Garcia committed
                    m_geoNwReq_linkLayerBroadcast(
                        m_geoNwPdu(
                            m_geoNwUnicastPacket(
                                v_longPosVectorNodeB,
                                f_longPosVector2ShortPosVector(v_longPosVectorIut),
                                vc_localSeqNumber
                            )
                        )
Yann Garcia's avatar
Yann Garcia committed
                    ),
                    bit2oct(encvalue(v_ipv6Packet))
                );
                
                tc_ac.start;
                alt {
                  [] ipv6OverGeoNetworkingPort.receive(
                        mw_ipv6OverGeoNwInd(
                            f_getGvlInterface(c_gvl2),
                            v_addressesNodeA.macAddress,
                            v_addressesIut.macAddress,
                            v_ipv6Packet
                        )
                    )  {
                      tc_ac.stop;
                      log("*** " & testcasename() & ": PASS: Received correct Ethernet packet ***");
                      f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); 
                  }
                  [] tc_ac.timeout {
                      log("*** " & testcasename() & ": INCONC: Expected message not received ***");
                      f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
                  }
                }
                
                // Postamble
                f_poIpv6Neighbour();
                f_cf01DownGn6();
                
            } // end TC_IPV6GEO_MR_GVL_BV_09
            
            /**
             * @desc    Checks handling of a received GeoUnicast message, containing an IPv6 packet with 
             *          destination address not matching addresses associated to IUT's SGVLs and with SOPV 
             *          contained in more than one geoArea associated to IUT's SGVLs and with IPv6 source 
             *          address not considered to be on-link on any of those SGVLs
             * <pre>    
             * Pics Selection: PICS_SGVL and PICS_DGVL
             * Initial conditions: 
             *  with {
             *      the IUT having configured SGVLs (SGVL1 .. SGVLx)
             *      the IUT having configured DGVLs (DGVL1)
             *      IPv6 address IPV6_SRC not considered to be on-link on SGVLa, SGVLb, and SGVLc
             *  }
             * Expected behaviour:
             *  ensure that {
             *      when { 
             *          the IUT receives a GeoUnicast message
             *              containing payload
             *                  containing an IPv6 packet
             *                      containing a destination address
             *                          indicating address not associated to any SGVL
             *                      containing a source address IPV6_SRC
             *              containing Source position coordinates contained in SGVLa, SGVLb and SGVLc