|Example of ping ( ICMP )over a layer 2 test port with Titan [message #1701422]
||Mon, 13 July 2015 11:16
|| Elemer Lelik
Registered: January 2015
Hi, it's time for a new episode in our series.|
The TTCN-3 program presented is a simple ping application using the ICMP and IP protocol modules and the LANL2 test port. The test port is used as a dual-faced test port, as described earlier in the SNMP/UDP example. Details of the dual-face functionality can be found in the Titan reference guide. ( BTW, the standard, see TTCN-3 Language Extensions: Configuration and Deployment Support ETSI ES 202 781 V1.4.1 (2015-06) calls these ports as ports having translation capability )
The port receives ICMP PDU's at the northern end and connects to Ethernet at the southern end. The ICMP PDU 's are packed in an IP packet after encoding. The IP packet is correspondingly encoded, then an Ethernet frame is assembled. When receiving the response, the payloads are extracted and decoded in inverse order.
Documentation of the IP and ICMP protocol modules, and that of the LANL2 test port can be found in the /doc sections of the relevant github repos.
This is a good example of layering protocols in TTCN-3 and Titan,in the form of protocol modules stacked on the top of an appropriately chosen test port.
It also highlights the strength of working with Titan: every protocol layer down to the last single bit can be configured to reach the desired result.
Mind you that you will need root privileges to use the LANL2 test port as this will require unrestricted access to Ethernet.
The cfg file will have to be updated with your locally relevant data (Ethernet and IP addresses).
How to build and run:
Unpack the attached file to a directory ICMP
The Makefile was generated as below:
makefilegen -s -e ICMP *.ttcn *.cc *.hh
(Size: 304.31KB, Downloaded 209 times)
Powered by FUDForum
. Page generated in 0.03415 seconds