RE: passing context to MIB library
"Pranali Hande (phande)" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <FF454E86E986B34693FD5AC5E55D43C6080AB5BC@xmb-rtp-202.amer.cisco.com> |
Hi Dave,
Thanks for quick reply.
If you refer function set_snmp_log_params in file third-party/src/snmp/net-snmp-5.1/agent/snmp_agent.c
if (asp->orig_pdu->community) {
for (i=0;i<asp->orig_pdu->community_len;i++) {
if (asp->orig_pdu->community[i] == '@') {
if (asp->orig_pdu->community_len > i+1) {
memcpy(and_context_name,&asp->orig_pdu->community[i+1], ((asp->orig_pdu->community_len)-i));
and_context_name_len =
((asp->orig_pdu->community_len)-(i+1));
curr_ctx_entry_p = snmp_get_context_map_entry(
As seen in above code snippet from that function. It is separating a string after "@" and saves it as and_context_name .
I wanted to know how it passes this and_context_name to the get_dot1dTpFdbTable function ?
I have iterated through the net-snmp agent code many times but couldn't figure out how this context gets passed. Would greatly appreciate your help here
Thanks and Regards
Pranali
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Dave Shield
Sent: Thursday, July 23, 2009 12:54 AM
To: Pranali Hande (phande)
Cc: [email protected]
Subject: Re: passing context to MIB library
2009/7/22 Pranali Hande (phande) <[email protected]>:
> snmptable -M +. -m all -v 2c -c public@vlan3 172.23.231.28 dot1dTpFdbTable
That is sending a community-based request, using the community string
"public@vlan3"
This has no connection with contexts, which are primarily an SNMPv3 concept.
There may be SNMP agents that use this syntax to specify contexts for
community-based requests, but the Net-SNMP agent isn't one of them (AFAIK).
It's certainly not part of the SNMP protocol.
Dave
------------------------------------------------------------------------------
_______________________________________________
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