bcm5820 driver version 1.09 and above provides cryptonet statistics through the NET-SNMP agent version distributed with
Red Hat Linux version 7.0 and above. This readme file explains how to enable and disable 
getting statistics through this agent manually. If you are installing the driver using an RPM, the RPM automatically 
installs the required files and modifies the snmpd.conf file for snmp support. 

To manually enable and disable getting cryptonet statistics, follow these instructions:
========================================================================================

A. To enable getting the cryptonet statistics through the NET-SNMP agent, do the following:
========================================================================================

1. cd to the base directory where the bcm5820 source install was done. From there cd to the snmp directory.

2. From this directory, execute the command:

   make install.

3. Make sure that bcm5820 driver is loaded.

4. If the snmpd daemon is already running, stop the daemon and restart it. If it is not running, start the
   snmp daemon.


B. To disable getting the cryptonet statistics through NET-SNMP agent, do the following:
=====================================================================================

1. cd to the base directory where the bcm5820 source install was done. From there cd to the snmp directory.

2. From this directory, execute the command:

   make uninstall.

C. To get snmp traps when card failure is detected:
===================================================

The bcm5820 driver version 1.10 and above supports generating snmp traps when a card failure is detected.

To generate snmp traps, the script gen5820traps must be running. This script once stared runs forever until 
interrupted to exit (control-c). This script is copied into the /usr/bin directory as part of the install.

To start the script, execute from a shell:

/usr/bin/gen5820traps

By default,if nothing is configured the trap will be sent to the localhost. In order to service the snmp trap 
by the localhost in Linux 7.0 and above, the NET-SNMP distribution has a daemon called snmptrapd. To service 
and log the traps generated by the agent, this daemon must be running. The traps are logged into /var/log/messages.
If the snmp trap is to be sent to a desired management station, the snmpd.conf file must be configured with the 
desired host. Please add the following line to the snmpd.conf file: (If it exists in multiple dierctories, 
make the changes in all of them).

trapsink	<hostname>	<community string>

where <hostname> is the ip address of the management station.

      <community string> is the snmp community name used by the host.

D. To verify that snmp statistics are working:
===========================================

1. If you have a snmpd.conf file in the /etc/snmp or /usr/share/snmp directories rename them to snmpd.orig or something
   similar.

2. create a new snmpd.conf file in /etc/snmp and add exactly the line shown below.

   pass .1.3.6.1.4.1.4413.4.1 /bin/sh /usr/bin/get5820stats

3. Kill the snmpd daemon if it is running.

4. Make sure the bcm5820 driver is loaded.

5. Start the snmp daemon; type /usr/sbin/snmpd.

6. Verify if statistics for the 5820 crypto card can be obtained. Type:

   snmpget -m all localhost public cnDevNumber

   There should be some value printed out for cnDevnumber on the screen. This value should be the number of
   bcm5820 cryptonet cards that you have in the system.

