Configuring IP Forwarding and IP Fragmentation

Jump to: navigation, search

Table of Contents >> Appendix A: Configuration Notes


IP Forwarding

By default, IP Forwarding is not enabled in the Treck stack. To enable IP Forwarding, the user must turn on the IP forwarding option after the tfStartTreck() call:

errorCode = tfSetTreckOptions(TM_OPTION_IP_FORWARDING, 1UL);

In addition, each device that the user wants to forward packets from and to, should be configured with the TM_DEV_IP_FORW_ENB bit set in the tfOpenInterface() flag parameter. See the tfOpenInterface() description for a list of the valid parameters.


IP Fragmentation

By default, if the TM_IP_FRAGMENT macro is defined in <trsystem.h>, then IP Fragmentation is turned on in the Treck stack. To disable IP Fragmentation, the user must turn off the IP Fragmentation option after the tfStartTreck() call as follows:

errorCode = tfSetTreckOptions(TM_OPTION_IP_FRAGMENT, 0UL);


Removing IP Fragmentation and IP Reassembly Code

To save code space, the user can optionally not compile the IP fragmentation and IP reassembly code in the Treck stack.


Warning Warning: In this case, no IP fragmentation or IP reassembly will ever take place in the Treck stack.


To do that, delete the following macro from <trsystem.h>:

#define TM_IP_FRAGMENT


Table of Contents >> Appendix A: Configuration Notes