blob: c10916f7e349794fe68b3c22aa17d0bcf7c03f61 [file] [log] [blame]
---
Author: János Kövesdi
Version: 198 17-CNL 113 632, Rev. A
Date: 2016-11-17
---
= NDP Protocol Modules for TTCN-3 Toolset with TITAN, User Guide
:author: János Kövesdi
:revnumber: 198 17-CNL 113 632, Rev. A
:revdate: 2016-11-17
:toc:
*Copyright*
Copyright (c) 2000-2019 Ericsson Telecom AB. +
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 that accompanies this distribution, and is available at +
http://www.eclipse.org/legal/epl-v10.html.
== About This Document
=== How to Read This Document
This is the User Guide for the NDP protocol module. The NDP protocol module is developed for the TTCN-3 Toolset with TITAN. This document should be read together with Function Specification <<_4, [4]>>.
=== Presumed Knowledge
To use this protocol module the knowledge of the TTCN-3 language <<_1, [1]>> is essential.
== System Requirements
Protocol modules are a set of TTCN-3 source code files that can be used as part of TTCN-3 test suites only. Hence, protocol modules alone do not put specific requirements on the system used. However in order to compile and execute a TTCN-3 test suite using the set of protocol modules the following system requirements must be satisfied:
* TITAN TTCN-3 Test Executor 1.8.pl0.pre2 or higher installed. For installation guide see <<_3, [3]>>.
NOTE: This version of the protocol module can not be used for defining 32bit unsigned or larger integers with TITAN versions earlier than 1.8.pl0.pre2. +
This version of the protocol module is not compatible with TITANreleases earlier than R7A.
= Protocol Modules
== Overview
Protocol modules implement the message structures of the corresponding protocol in a formalized way, using the standard specification language TTCN-3. This allows defining of test data (templates) in the TTCN-3 language <<_1, [1]>> and correctly encoding/decoding messages when executing test suites using the TITAN TTCN-3 test environment.
Protocol modules are using TITANs RAW encoding attributes <<_2, [2]>> and hence are usable with the TITAN test toolset only.
The table below contains the implemented NDP messages and the corresponding TTCN-3 type records. Using those type records, templates can be defined to send and receive a given message.
[cols=",,",options="header",]
|===
|Message name |Reference |Corresponding type record in __NDP_Types.ttcn__
|Router Solicitation |<<_5, [5]>> 4.1 |`NDP_RouterSolicitation`
|Router Advertisement |<<_5, [5]>> 4.2 |`NDP_RouterAdvertisement`
|Neighbor Solicitation |<<_5, [5]>> 4.3 |`NDP_NeighborSolicitation`
|Neighbor Advertisement |<<_5, [5]>> 4.4 |`NDP_NeighborAdvertisement`
|Redirect |<<_5, [5]>> 4.5 |`NDP_Redirect`
|===
== Installation
The set of protocol modules can be used in developing TTCN-3 test suites using any text editor. However to make the work more efficient a TTCN-3-enabled text editor is recommended, for example `nedit`, `xemacs`. Since the NDP protocol module is used as a part of a TTCN-3 test suite, this requires TTCN-3 Test Executor and a C compiler be installed before the module can be compiled and executed together with other parts of the test suite. For more details on the installation of TTCN-3 Test Executor see the relevant parts of <<_2, [2]>>.
== Configuration
None.
== Encoding, Decoding, Checksum Calculation
Implemented encoding/decoding functions:
[cols=3*,options=header]
|===
|Name |Type of formal parameters |Type of return value**
|`f_enc_PDU_NDP` |PDU_NDP, OCT16, OCT16 |octetstring
|`f_dec_PDU_NDP` |octetstring |PDU_NDP
|===
The encoding function `f_enc_PDU_NDP` performs basic RAW encoding <<_2, [2]>>. In addition to encoding functionality this function can calculate the `checksum` field. The checksum is automatically calculated during encoding if the user sets the `PDU_NDP’s` `checksum` field to `__`'0000'O`__`. For calculating the correct checksum the user needs to provide 2 additional parameters to the encoding function. These parameters are the `srcaddr` and `dstaddr`. The value of `srcaddr` is the source address in the IPv6 packet. The value of `dstaddr` is the destination address in the IPv6 packet. The default value for `srcaddr` is the dummy value `__`'00000000000000000000000000000000'O`__`. The default value for `dstaddr` is the dummy value `__`'00000000000000000000000000000000'O`__`. If the user sets the `PDU_NDP’s` `checksum` field to a value different from `_'0000'O_` then this user defined value will appear in the encoded message.
The decoding function `f_dec_PDU_NDP` performs basic RAW decoding <<_2, [2]>>. The `checksum` field is not verified during decoding.
There is an additional function which verifies the `checksum` field in an encoded NDP message:
[cols=3*,options=header]
|===
|Name |Type of formal parameters |Type of return value
|`f_NDP_verify_checksum` |octetstring, OCT16,OCT16 |boolean
|===
The inputs into this function are the encoded NDPmessage and the source and destination addresses of the IPv6 packet. The default value for `srcaddr` is the dummy value `__`'00000000000000000000000000000000'O`__`. The default value for `dstaddr` is the dummy value `_'00000000000000000000000000000000'O_`. The function returns `_true_` if the checksum is correct and `_false_` if it is incorrect.
= Terminology
TITAN TTCN-3 Test Executor.
= Abbreviations
IETF:: Internet Engineering Task Force
IP:: Internet Protocol
ICMPv6:: Internet Control Message Protocol for IPv6
IPv6:: Internet Protocol Version 6
NDP:: Neighbor Discovery Protocol
RFC:: Request for Comments
TTCN-3:: Testing and Test Control Notation version 3
= References
[[_1]]
[1] ETSI ES 201 8731 v.3.1.1 (06/2005) +
The Testing and Test Control Notation version 3. Part 1: Core Language
[[_2]]
[2] Programmers Technical Reference for the TITAN TTCN-3 Test Executor
[[_3]]
[3] Installation Guide for the TITAN TTCN-3 Test Executor
[[_4]]
[4] NDP Protocol Modules for TTCN-3 Toolset with TITAN, Function Specification
[[_5]]
[5] IETF https://tools.ietf.org/html/rfc4861[RFC 4861] +
Neighbor Discovery for IP version 6 (IPv6)