Dear net-snmp-coders,

 

I noticed there was a discussion on SNMP-COMMUNITY-MIB implementation
among Dana Burns, Magnus Fromreide, Dave Shield, etc in Nov. 2006. Is
there any progress since then? 

 

If not, I have implemented snmpCommunityTable(see the attached zip
file). I would like to contribute to net-snmp-coders and seek your
feedbacks on what is the best solution to integrate SNMP-COMMUNITY-MIB
support into 5.3.1.

 

My goal at first is to minimize the integration changes in VACM and
snmplib, currently I only have one change in vacm_conf.c(see the
attached patch file) and no changes in snmplib. 

 

Here is in summary what I did:

1.      Created "snmpCommunity" directive to support snmpCommunityTable,
this new directive uses the same syntax as "com2sec". 
2.      Added parse snmpCommunity function
snmpCommunityTable_parse_snmpCommunity. 
3.      Added a new data struct snmpCommunityList to store
snmpCommunityTable entries, creation/deletion of the entries via
snmpCommunityStatus are supported. 
4.      Replaced netsnmp_udp_getSecName in vacm_conf.c with
snmpCommunityTable_get_snmpCommunity. 

 

Limitations:
The  UDP6/UNIX _getSecName replacement are not implemented yet, but I
think they could be done by calling UDP6/UNIX _getsnmpCommunity
functions from vacm_conf.c in the same way as I have done with UDP.

 

Plesae let me know if the snmpCommunityTable implementation is
acceptable, I welcome any feedbacks.

 

Best Regards

Emi Yanagi

------------------------------------------------------------------------
------------------------------------------------------------------------
---------------------------

[EMAIL PROTECTED] ~]$ snmpwalk 10.1 snmpCommunityTable

SNMP-COMMUNITY-MIB::snmpCommunityName.'1' = STRING: "private"

SNMP-COMMUNITY-MIB::snmpCommunitySecurityName.'1' = STRING: SecNameAllRW

SNMP-COMMUNITY-MIB::snmpCommunityContextEngineID.'1' = Hex-STRING: 80 00
1F 88 80 50 A4 46 EB 46 AE 69 0E

SNMP-COMMUNITY-MIB::snmpCommunityContextName.'1' = STRING:

SNMP-COMMUNITY-MIB::snmpCommunityTransportTag.'1' = STRING:

SNMP-COMMUNITY-MIB::snmpCommunityStorageType.'1' = INTEGER: permanent(4)

SNMP-COMMUNITY-MIB::snmpCommunityStatus.'1' = INTEGER: active(1)

 [EMAIL PROTECTED] ~]$

[EMAIL PROTECTED] ~]$ snmpset 10.1 snmpCommunityStatus.1 i 4

SNMP-COMMUNITY-MIB::snmpCommunityStatus.'.' = INTEGER: createAndGo(4)

[EMAIL PROTECTED] ~]$ snmpset 10.1 snmpCommunitySecurityName.1 s
SecNameAllRW

SNMP-COMMUNITY-MIB::snmpCommunitySecurityName.'.' = STRING: SecNameAllRW

[EMAIL PROTECTED] ~]$ snmpset 10.1 snmpCommunityName.1 s foo

SNMP-COMMUNITY-MIB::snmpCommunityName.'.' = STRING: "foo"

[EMAIL PROTECTED] ~]$

[EMAIL PROTECTED] ~]$ snmpwalk -cfoo 10.1 snmpCommunityTable

SNMP-COMMUNITY-MIB::snmpCommunityName.'.' = STRING: "foo"

SNMP-COMMUNITY-MIB::snmpCommunityName.'1' = STRING: "private"

SNMP-COMMUNITY-MIB::snmpCommunitySecurityName.'.' = STRING: SecNameAllRW

SNMP-COMMUNITY-MIB::snmpCommunitySecurityName.'1' = STRING: SecNameAllRW

SNMP-COMMUNITY-MIB::snmpCommunityContextEngineID.'.' = Hex-STRING: 80 00
1F 88 80 50 A4 46 EB 46 AE 69 0E

SNMP-COMMUNITY-MIB::snmpCommunityContextEngineID.'1' = Hex-STRING: 80 00
1F 88 80 50 A4 46 EB 46 AE 69 0E

SNMP-COMMUNITY-MIB::snmpCommunityContextName.'.' = STRING:

SNMP-COMMUNITY-MIB::snmpCommunityContextName.'1' = STRING:

SNMP-COMMUNITY-MIB::snmpCommunityTransportTag.'.' = STRING:

SNMP-COMMUNITY-MIB::snmpCommunityTransportTag.'1' = STRING:

SNMP-COMMUNITY-MIB::snmpCommunityStorageType.'.' = INTEGER:
nonVolatile(3)

SNMP-COMMUNITY-MIB::snmpCommunityStorageType.'1' = INTEGER: permanent(4)

SNMP-COMMUNITY-MIB::snmpCommunityStatus.'.' = INTEGER: active(1)

SNMP-COMMUNITY-MIB::snmpCommunityStatus.'1' = INTEGER: active(1)

 

 

PS, I had to send this email twice because attached zip file was bounced
back.

 

Attachment: snmp-community-mib.zip_1
Description: snmp-community-mib.zip_1

Attachment: vacm_snmpCommunity.patch
Description: vacm_snmpCommunity.patch

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to