BSNMP Enhancements

Project description

BSNMP is a portable SNMP framework consisting of a daemon (bsnmpd), modules and tools. Bsnmp consists of the following pieces:

The bsnmpd daemon implements just the bare minimum that is needed for such a daemon: the system group, parts of the SNMP group and a private tree that does the following:

The BSNMPD SNMP daemon implements a minimal MIB which consists of the system group, part of the SNMP MIB, a private configuration MIB, a trap destination table, a UDP port table, a community table, a module table, a statistics group and a debugging group. All other MIBs are supported through loadable modules. This allows bsnmpd to use that which is not a classical SNMP task, for tasks. Modules are loaded by writing to the module table. This table is indexed by a string, which identifies the module to the daemon. This identifier is used to select the correct configuration section from the configuration files and to identify resources allocated to this module.

All real functionality is implemented via loadable modules. This project proposes to add full IPv6 support (e.g. able to talk to snmpd daemon over IPv6) in both bsnmpd and the bsnmp tools. This will be done as a loadable transport module to BSNMP.

Deliverables

Add full IPv6 support as a loadable transport module to BSNMP.

Milestones

1. Community bonding period

2. 19th May – 9th June

3. 9th – 23rd June

4. 23rd – 27th June

5. 28th June - 13th July

6. 14th - 27th July

7. 28th July - 10th Aug

8. 11th – 18th Aug

9. 18th – 22nd Aug

Approach to solving the problem

Full IPv6 support for the daemon bsnmpd as well as for bsnmptools was added, as a loadable transport module. An IPv6 UDP transport module was created(trans_udpv6.c) with an equivalent header file(trans_udpv6.h). This module used IPv6 accommodating data structures and functions. The recv functions(recv_stream, check_priv_stream and recv_dgram, check_priv_dgram) were moved from main to their equivalent functions in each of their respective transport modules. Trap.c was modified to support IPv6. IPv6 entries were added to snmpd.config. MIB definitions were added to BEGEMOT-SNMPD-MIB and tree.def for IPv6 transport module as well as for IPv6 traps. Separate IPv6 functions and function calls were added to bsnmp(config.c, export.c, action.c), trap(trap.c, target_snmp.c) and bsnmptools(bsnmptools.c, bsnmpget.c). Data structures were changed in snmpd.h, snmpmod.h and snmp.h to add/ modify structures that support IPv6.

Test Plan

The testing of the code is not yet completed and is currently in progress.

The Code

The source code changes are located in: https://socsvn.freebsd.org/socsvn/soc2014/shonali/head/contrib/bsnmp/ https://socsvn.freebsd.org/socsvn/soc2014/shonali/head/usr.sbin/bsnmpd/


CategorySnmp

SummerOfCode2014/BSNMPEnhancements (last edited 2017-09-18 14:00:07 by KubilayKocak)