Learn about some tools you can use and watch our OFP how-to videos
Generate code coverage report from unit tests by passing ‘–coverage’ during building, and use lcov to view the results:
./configure <typical-ofp-flags> CFLAGS='-g -O0 --coverage' LDFLAGS='-g -O0 --coverage' make check cd test/cunit lcov --directory . --directory ../../src --capture --output-file coverage.info genhtml coverage.info --output-directory out .. view out/index.html ..
TUTORIAL: UDP FORWARDING APPLICATION
This short tutorial shows some of the available OpenFastPath functionality including an UDP forwarding application using BSD sockets on a real ARMv8 system. The UDP echo application is available as an example in the git repository (location: example/udpecho).
- Show a working OFP application on a real ARMv8
- Use OFP socket functionality to receive and send UDP data
- Other OFP available features in demo:
- Command line interface(CLI) to show statistics and interface configuration
- ICMP protocol
- Ethernet, IP and ARP processing
- Use of standard Linux applications to instrument demo:
- Netcat: UDP client application
- Tcpdump: capture and analyze responses
- Ping: check availability
The setup of the tutorial is represented in the image below
Let’s get to the action, shall we?
Steps taken in the video
- Connect to Freescale LS2085ardb target where is running OpenFastPath UDP echo application.
- ifconfig eth0 – shows IP address(172.24.30.141) for the Linux interface used for Control/Debug
- Uname –a – shows the system information for the ARMv8 Freescale board running Linux
- Lower-right window: start interface capture
- Top-right window: connect to OpenFastPath Command Line interface on the target. This is found at port 2345 on IP 172.24.30.141.
- Show statistics. 1 packet received and 1 packet sent from the ARP discovery of target.
- Show OpenFastPath interface ip: 192.168.100.1
- Lower-left window: ping the target interface managed by OpenFastPath
- Show incremented statistics (2) on OFP CLI
- Top-left window: Connect to OpenFastPath UDP echo application. The application listens on port 2048
- Type a text message to send to OFP application then ENTER
- Message “ECHO:text sent” is received back
- Lower-right window: UDP packet sent to 192.168.100.1 port 2048 with data:”text sent“
- UDP ECHO packet sent from OFP application with modified data:”ECHO:text sent“
- Top-left window: statistics incremented (3) on OFP CLI