> I have written an application with a function interface for a snmp-agent.
> Now my application is more than two files big. Is it possible to integrate
> a own written lib into the net-snmp build tree?

Yes.

 
> At the moment I add my own files with configure script e.g.
> ------------------------------------------------
> .configure --prefix=/usr/local/net-snmp \
>       --enable-shared --enable-embedded-perl \
>       --with-mib-modules="mySNMPAgentAPP/agentFile
>                           mySNMPAgentAPP/foo
>                           mySNMPAgentAPP/bar" 

Yes - that should work OK.

> ------------------------------------------------
> it works fine but :
>       - I have a complex directory struct

Doesn't matter - configure doesn't care.

>       - I have more then 10 files

So do we :-)


Try the following:

   -  create a file 'mySNMPAgentAPP.h' containing the following:

        config_require( mySNMPAgentAPP/agentFile )
        config_require( mySNMPAgentAPP/foo )
        config_require( mySNMPAgentAPP/bar )

      (The name doesn't have to be the same as your subdirectory,
       but it's less confusing if it's clearly related in some way.
       Note that you *don't* need a corresponding mySNMPAgentAPP.c file).

   -  run "configure ... --with-mib-modules=mySNMPAgentAPP

       This will then pick up the entries from that .h file,
       and pull those modules in as well.

See the current source tree for examples of this in action.

Dave



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to