nfs-ganesha 1.4
Functions

register.c File Reference

register.c: registration routine More...

#include "snmp_adm.h"
#include "instance_handler.h"

Go to the source code of this file.

Functions

int register_ro_string (oid *myoid, int oid_len, char *string, netsnmp_handler_registration **phandler)
int reg_scal (oid *myoid, size_t oid_len, void *value, unsigned char type, int access, netsnmp_handler_registration *phandler_tab[2])
int reg_get_set (oid *myoid, size_t oid_len, unsigned char type, int access, netsnmp_handler_registration *phandler_tab[2])
int reg_proc (oid *myoid, size_t oid_len, netsnmp_handler_registration **phandler)
int unreg_instance (netsnmp_handler_registration *myreg)

Detailed Description

register.c: registration routine

Author:
Cédric CABESSA

Definition in file register.c.


Function Documentation

int reg_get_set ( oid *  myoid,
size_t  oid_len,
unsigned char  type,
int  access,
netsnmp_handler_registration *  phandler_tab[2] 
)

Register scalar variable by getter setter. we actually register two thing : the type and the value.

Parameters:
myoidoid
oid_lenoid length
typetype of the value.
See also:
type_number.
Parameters:
accessaccess right.
phandler_taboutput parameters, contain the netsnmp handlers registration of the value and type.
Returns:
MIB_REGISTERED_OK on success.

Definition at line 134 of file register.c.

int reg_proc ( oid *  myoid,
size_t  oid_len,
netsnmp_handler_registration **  phandler 
)

Register a procedure

Parameters:
myoidoid
oid_lenoid length
phandleroutput parameters, contain the netsnmp handler registration (trigger node).
Returns:
MIB_REGISTERED_OK on success.

Definition at line 195 of file register.c.

int reg_scal ( oid *  myoid,
size_t  oid_len,
void *  value,
unsigned char  type,
int  access,
netsnmp_handler_registration *  phandler_tab[2] 
)

Register scalar variable by pointer. we actually register two thing : the type and the value.

Parameters:
myoidoid
oid_lenoid length
valuepointer on the value to register.
typetype of the value.
See also:
type_number.
Parameters:
accessaccess right.
phandler_taboutput parameters, contain the netsnmp handlers registration of the value and type.
Returns:
MIB_REGISTERED_OK on success.

myoid has enough memory

Definition at line 50 of file register.c.

int register_ro_string ( oid *  myoid,
int  oid_len,
char *  string,
netsnmp_handler_registration **  phandler 
)

Register a read only string

Parameters:
myoidoid
oid_lenoid length
stringstring to register.
phandleroutput parameter, contain the netsnmp handler registration of the string.
Returns:
MIB_REGISTERED_OK on success.

Definition at line 23 of file register.c.

int unreg_instance ( netsnmp_handler_registration *  myreg)

FIXME bug snmp valgrind say Invalid read of size 1 sometime snmpd crash on exit

Definition at line 205 of file register.c.