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.

How to hook the NetHooks in ndk application?

Hi

I use idkam437x with ccs 6.1.2, pdk 1.0.2 and ndk 2.24.3.35.

I modify the example from pdf called: NIMU_ICSS_BasicExample_idkAM437x_wSoCLib_armExampleproject. Within it, there are two hooks: netOpenHook and netCloseHook in NetHooks.c file. Everything in this example works fine at the idkam437x set, however I do not know how these hooks are connected to the rest of application - The Network Callback Hooks in *.cfg file are empty - I see no net hooks connection within the code - could you please explain me how to do it in my own application?

Thanks,

JJ

  • Hi JJ,

      If you set breakpoints in those hook functions, does it hit them? If not, it's probably because they aren't configured in your .cfg file. You'll need lines like this to connect your hook functions to the stack:

    var Global    = xdc.useModule('ti.ndk.config.Global');
    Global.networkOpenHook = "&netOpenHook";
    Global.networkCloseHook = "&netCloseHook";

    Let me know if this helps.

    Moses

  • Hi Moses,

    Thanks for your answer.

    No, these hooks have not been configured in .cfg file - after that, everything worked fine.

    Thanks

    JJ