[prev in list] [next in list] [prev in thread] [next in thread] 

List:       net-snmp-users
Subject:    Re: How to configure net-snmp to expose the agentx_send_ping() function
From:       Larry Hayes <lhayesg () gmail ! com>
Date:       2018-03-19 13:20:51
Message-ID: CAG3KfNZHqUWNFWQ6y9Aid8oA1q_toBMk0subas7n0bz5FBK=OQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thanks for the suggestion.

I eventually just modified the bit bake recipe  to copy out the needed
header files to a destination in the search path.

Larry


On Sun, Mar 18, 2018 at 2:35 PM Bill Fenner <fenner@gmail.com> wrote:

> 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 <lhayesg@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
>>
>>
>

[Attachment #5 (text/html)]

<div dir="ltr"><div><div>Thanks for the suggestion.<br><br></div>I eventually just \
modified the bit bake recipe   to copy out the needed header files to a destination \
in the search path.<br><br></div>Larry<br></div><br><br><div class="gmail_quote"><div \
dir="ltr">On Sun, Mar 18, 2018 at 2:35 PM Bill Fenner &lt;<a \
href="mailto:fenner@gmail.com">fenner@gmail.com</a>&gt; wrote:<br></div><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Hi Larry,<div><br></div><div>I don&#39;t have \
a direct answer to your question: I don&#39;t know if there&#39;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 &quot;main_session != \
NULL&quot;.   main_session is defined in \
&lt;net-snmp/agent/snmp_agent.h&gt;.</div><div><br></div><div>   \
Bill</div><div><br></div></div><div class="gmail_extra"><br><div \
class="gmail_quote">On Tue, Mar 6, 2018 at 11:46 AM, Larry Hayes <span \
dir="ltr">&lt;<a href="mailto:lhayesg@gmail.com" \
target="_blank">lhayesg@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div><div>OS: Linux<br></div>Net-SNMP version: \
5.7.3<br></div><div>Build Env: OpenEmbedded yocto<br><br></div><div>I am trying to \
build a sub agent that generates traps for events originating from another \
process.<br></div><div>I do not want to start trying to generate traps until the \
snmpd agent is running.<br><br></div><div>So I am trying to use agentx_send_ping() to \
detect when the snmpd agent is up.<br><br></div><div>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<br><br></div><div>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.<br><br></div><div>Thanks<span \
class="m_-7829091951754946081HOEnZb"><font \
color="#888888"><br></font></span></div><span \
class="m_-7829091951754946081HOEnZb"><font \
color="#888888"><div>Larry<br></div></font></span></div> \
<br>------------------------------------------------------------------------------<br>
 Check out the vibrant tech community on one of the world&#39;s most<br>
engaging tech sites, Slashdot.org! <a href="http://sdm.link/slashdot" \
rel="noreferrer" target="_blank">http://sdm.link/slashdot</a><br>_______________________________________________<br>
 Net-snmp-users mailing list<br>
<a href="mailto:Net-snmp-users@lists.sourceforge.net" \
target="_blank">Net-snmp-users@lists.sourceforge.net</a><br> Please see the following \
page to unsubscribe or change other options:<br> <a \
href="https://lists.sourceforge.net/lists/listinfo/net-snmp-users" rel="noreferrer" \
target="_blank">https://lists.sourceforge.net/lists/listinfo/net-snmp-users</a><br> \
<br></blockquote></div><br></div> </blockquote></div>



------------------------------------------------------------------------------
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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic