Hi Larry,

I don't have a direct answer to your question: I don't know if there's a
way to call agentx_send_ping() from your own subagent.  But, I can share
what works for me to check if the session is established, which is to check
if "main_session != NULL".  main_session is defined in
<net-snmp/agent/snmp_agent.h>.

  Bill


On Tue, Mar 6, 2018 at 11:46 AM, Larry Hayes <lhay...@gmail.com> wrote:

> OS: Linux
> Net-SNMP version: 5.7.3
> Build Env: OpenEmbedded yocto
>
> I am trying to build a sub agent that generates traps for events
> originating from another process.
> I do not want to start trying to generate traps until the snmpd agent is
> running.
>
> So I am trying to use agentx_send_ping() to detect when the snmpd agent is
> up.
>
> I have this working.  But my question is there any configuration options
> that will install the needed header files in a DEST_DIR/usr/include
> directory so I can build my sub agent in a somewhat normal way without
> adding install copy lines to copy the headers out
>
> I see the net-snmp headers being installed in a xxx/usr/include/net-snmp
> directory but the header that includes the the agentx_send_ping() seems to
> live outside of the net-snmp directory in an agent directory.
>
> Thanks
> Larry
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Net-snmp-users mailing list
> Net-snmp-users@lists.sourceforge.net
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to