Library name : ksnmplib
Author : Enrico Pasqualucci
This library contains all the routines used by the KLOE run control and DFC processes and based on the SNMP utility. It is based on SNMP version 2 by CMU. The library structure has been completely reviewed in such a way that the snmp session and remote process variable management can be completely hidden to the user. The source itself has been logically divided into several files; in the following the documentation of the entry points has been divided per-files.
Have also a look to the example programs :
mapnet.c rget.c snmpset.c timeval.c toproc.c
A more general (and simpler) example of how to retrieve the value of a remote variable can be found in:
getvalue.c
In the following file an example of how to send a trap to the KLOE dfc daemon can be found:
ktrap.c
A simple extension of trap daemon (first standalone version of the KLOE dfc daemon) can be found in:
dfcd.c
To evaluate the time needed to send commands and to react to traps, the following programs have been used:
commtime.c traptime.c
File name : ksnmp_api.c
Author : Enrico Pasqualucci
This part of the library contains the functions to initialize and end the ksnmp library and to perform simple snmp operation in the standard KLOE environment.
File name : ksnmp_environment.c
Author : Enrico Pasqualucci
This part of the library contains the function to read the enviromental variables that can superseed the default global variable values and to set that variables.
File name : ksnmp_map.c
Author : Enrico Pasqualucci
This part of the library contains the functions to manage the map of the KLOE network.
File name : ksnmp_message_system_interface.c
Author : Enrico Pasqualucci
This part of the library contains the functions directly used by the KLOE message system; in particular, to send remote messages and read acknowledgements.
File name : ksnmp_session.c
Author : Enrico Pasqualucci
This part of the library contains the functions to manage the snmp sessions. This part of the library should be never used directly by the user, it takes care of opening the needed snmp sessions, keeping them in memory as a list, retrieving them when needed and closing them.
File name : ksnmp_vars.c
Author : Enrico Pasqualucci
This part of the library contains the functions to manage the remote process variables, taking care of searching the snmp names corresponding to them and keeping a list of remote indexes of requested variables. A function is provided to the user to read remote variables.