This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS: NDK ARP messages

Tool/software: TI-RTOS

Hi,

I wanted to know  how to manually send ARP messages (gratuitous ARP) - is there an API for that ? also is there a configuration i can make so that NDK automatically send GARP on wake up and after each IP/MAC change?

(using NDK version 2_24_02_31 on TDA3XX)

Thanks

Guy

  • Hi Guy,

    I have forwarded your question to a NDK expert.

    Regards,
    Yordan
  • Guy,

    Copying Steve's reply in mail:

    Yes, you can configure the NDK to do this.  Most things are configured in the NDK via the application *.cfg script, however support for Gratuitous Arp is missing.

    Please see below thread for how to update you app to configure Gratuitous ARP.

     https://e2e.ti.com/support/embedded/tirtos/f/355/p/552991/2031516#2031516 

    Prasad

  • The configuration in the given thread applies to handling received GARP and determine how NDK will treat GARP that are being received while what I need is to make NDK send GARP messages (either manually and/or upon every change of MAC / IP addresses).

    (i also tried adding the suggested code for GARP configuration and it did not change the behavior for sending GARP - i.e no GARP are sent)

    Guy
  • Guy,

    Are you able to ping the board when this happens?

    The gratuitous ARP should happen in the BindNew function.  It would hit as follows:

    1.       Your app would call

            CfgAddEntry(hCfg, CFGTAG_IPNET, <ip address>, …);

     

    2.      Calls SPIpNet()

    a.      Enters if for  adding an entry:

                         i.   if( Op == CFGOP_ADD )

    3.      calls NtAddNetwork()

    4.      calls BindNew():

     

    HANDLE BindNew( HANDLE hIF, IPN IPHost, IPN IPMask )

    {

    ...

        /* Gratuitous ARP on Ethernet */

        if( IFGetType( hIF ) == HTYPE_ETH && IPHost != INADDR_ANY

                                             && IPHost != INADDR_BROADCAST )

                    LLIGenArpPacket( hIF, IPHost );

     

    Since you're not connected to JTAG, there's no way to print a message here unless you have another means such as a UART connection that's configured for outputting print messages (?).

     

    Steve

  • Guy,

    OK, no UART, so a print wouldn't help us here.

    Are you able to ping the board when you see this issue? When you ping, do you see ARP packets for resolving the IP address in Wireshark? (i.e. the PC ARP request "who has 192.168.xxx.yyy?" ... followed by NDK response "192.168.xxx.yyy at <MAC address>")

    Steve
  • Also, are there any other differences between these 2 scenarios (RAM w/ JTAG vs. flash w/o JTAG)? Are they the same executable and same map file?

    Steve
  • Hi Steve,
    There is nothing different between the 2 scenarios (with or without JTAG) i am running the exact same code and just looking at wireshark log
    So the CPU goes through the exact same code.

    as for pings - no problem with pings, network works fine and i can ping the and get the reply (can also so the "who has" messages from the PC and response from NDK)

    No idea why connecting the JTAG makes the GARP show up

    Guy