Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsExample of ping ( ICMP )over a layer 2 test port with Titan
https://www.eclipse.org/forums/index.php/mv/msg/1068359/1701422/#msg_1701422
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
cd ICMP
cd bin
../install.script
make
./ICMP cfg.cfg
The Makefile was generated as below:
makefilegen -s -e ICMP *.ttcn *.cc *.hh
Best regards
Elemer
]]>Elemer Lelik2015-07-13T11:16:17-00:00Re: Example of ping ( ICMP )over a layer 2 test port with Titan
https://www.eclipse.org/forums/index.php/mv/msg/1068359/1798494/#msg_1798494
Would you know where the Cyclic Redundancy Check (CRC) and Frame Check Sequence (FCS) field are defined in ipv4 header template (IP_Type.ttcn & ICMP_Types.ttcn) or in ICMP2ETH.ttcn, as we are now making an educated guess but cannot find any description in correlation with these 2 crucial fields in LANL2asp_CNL113519_1551.doc ?
Regards - David]]>David Laurent2018-11-19T20:21:16-00:00Re: Example of ping ( ICMP )over a layer 2 test port with Titan
https://www.eclipse.org/forums/index.php/mv/msg/1068359/1798526/#msg_1798526
I assume you refer to the CRC or FCS of the Ethernet header.
Certainly they have no place in IP or ICMP definitions;
"The checksum calculation might be done by the network driver, protocol driver or even in hardware."
etc.
so that's the reason you don't see it in TTCN-3 (or in Wireshark for that matter) , it's dealt with automatically in the background.
Best regards
Elemer
]]>Elemer Lelik2018-11-20T08:12:55-00:00Re: Example of ping ( ICMP )over a layer 2 test port with Titan
https://www.eclipse.org/forums/index.php/mv/msg/1068359/1798693/#msg_1798693
Would you know the meaning of this value in the config ?
[DEFINE]
eth_proto := "0800"
Would it be the FCS of the ethernet header ?
Regards - David]]>David Laurent2018-11-22T21:45:46-00:00Re: Example of ping ( ICMP )over a layer 2 test port with Titan
https://www.eclipse.org/forums/index.php/mv/msg/1068359/1798725/#msg_1798725
I don't know how to make this any clearer;
CRC and FCS, although belong to Layer 2 , will be handled by drivers or HW.
They will not appear explicitly on Layer 2.
eth_proto is equivalent with the Ethertype field , and 0x0800 signifies IPV4.