Hi,

attaching to arbitrary port works fine.
The problem requires implementing snmp_add_full with respective routines,
which doesn't work.

Here is the code
(for transport)
ptp_tr = netsnmp_transport_open_server("agentx", "ptpext");
...
(for session)
main_session = snmp_add_full(&def_sess, ptp_tr, NULL, ptpagentx_parse,
NULL, NULL, NULL, ptpagentx_checkpacket, NULL);

The transport and session registration works when
netsnmp_transport_open_server is used but not with
netsnmp_transport_open_client. But, it is not the problem here. In both
cases I can't figure that either ptpagentx_parse or ptpagentx_check packet
are called. Each of them contain a line snmp_log(LOG_INFO, "PTP
ptpagentx_parse/ptpagentx_check called.\n"); which should apper in ./snmpd
-f -Le -d.

Can you send any functional piece of code?

Kujtim



> On 13/11/2007 <[EMAIL PROTECTED]> wrote:
>> And how is the procedure of integrating this to the agent. Just by
>> calling
>> the mentioned routines or should provide the adding by ./configure
>> before
>> installation too.
>
> Fundamentally, all you need to do is add the relevant code files to the
> build process, and ensure your new code is called at the appropriate
> times.
>
> The cleanest approach (or at least the simplest) is probably to put the
> code files (myModule.[ch]) somewhere under "agent/mibgroup", and
> have a routine "init_{myModule}" to create/register the FDs.
>    Then run
>                  configure --with-mib-modules=myModule
>
> That's the normal mechanism for adding new MIB modules to the agent,
> but it can also be used for new supporting code as well.
>
> Dave
>


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to