AnsweredAssumed Answered

TCP/IP Configuration and custom lwIP build

Question asked by vix on Nov 25, 2009
Latest reply on Nov 26, 2009 by CraigG

While developing an application using lwIP for Blackfin (BF527), some questions arised, but I haven't been able to find a complete answer.

Let me descrive the situation:

  • VisualDSP++ 5.0 Update 6 has an useful TCP/IP Configuration window that generates 3 files
    • tcp_ip_conf.c with user_net_config_info struct definition
    • tcp_ip_conf.h with some macro definitions
    • tcp_ip_conf.tcp
  • INETD ADI supplied example is linked to liblwIPbf527.dlb which is generated with the liblwIP-527.dpj
  • I need to patch the lwIP port (to enable answers to broadcast ping - that is disabled by default), so I modified the files
    • ..\Blackfin\lib\src\lwip\contrib\ports\ADSP-Blackfin\proj\lwIPv4lib\lwipopts.h
    • ..\Blackfin\lib\src\lwip\src\core\ipv4\icmp.c

and recompiled the library liblwIPbf527.dlb

While doing this operations I wonder

  1. which is the suggested way to patch one of the supplied libraries? I modified the files into VisualDSP++ installation directory, but I don't like it, because when I upgraded VisualDSP the modified files will be overwritten. Have I to copy to a different location all the files and the folders used for the library, and recompile it?
  2. If I disable the UDP protocol in the TCP/IP Configuration window, but then I link to a compiled liblwIPbf527.dlb, is the UDP code linked to my project, or not?
  3. The tcp_ip_conf.h defines the macro _LWIPOPTS_H_, but lwiopts.h has a

#ifndef _LWIPOPTS_H_
#define _LWIPOPTS_H_

in its first lines

I modified lwiopts.h to add custom #define, and I recompiled the library. When I linked it to my project my patch works, and so I think the tcp_ip_conf.h definitions have no effects (because I linked to a compiled library). Am I right?

 

Thanks in advance

Outcomes