snmp_config.c File Reference

Go to the source code of this file.

Functions

int SnmpViewCreate (CONST char *name, CONST OID *subtree, size_t subtreelen, int type)
int SnmpViewFind (char *name)
int SnmpCommunityFind (CONST char *name, int *readView, int *writeView)
 Find community entry by name.
int SnmpCommunityCreate (CONST char *name, int readView, int writeView)
 Create a community entry.


Function Documentation

int SnmpViewCreate ( CONST char *  name,
CONST OID subtree,
size_t  subtreelen,
int  type 
)

Parameters:
name Symbolic name of this view.
type Either SNMP_VIEW_INCLUDED or SNMP_VIEW_EXCLUDED.
Returns:
View index on success. Otherwise -1 is returned.

Definition at line 51 of file snmp_config.c.

References malloc, memset(), VIEW_LIST::next, strcmp(), strcpy(), strlen(), VIEW_LIST::view_index, VIEW_LIST::view_name, VIEW_LIST::view_subtree, VIEW_LIST::view_subtree_len, and VIEW_LIST::view_type.

int SnmpViewFind ( char *  name  ) 

Definition at line 93 of file snmp_config.c.

References VIEW_LIST::next, strcmp(), VIEW_LIST::view_index, and VIEW_LIST::view_name.

int SnmpCommunityFind ( CONST char *  name,
int *  readView,
int *  writeView 
)

Find community entry by name.

Parameters:
name Community name.
readView Pointer to a variable that receives the view index for read access.
writeView Pointer to a variable that receives the view index for write access.
Returns:
0 on success, -1 otherwise.

Definition at line 119 of file snmp_config.c.

References COMMUNITY_LIST::comm_name, COMMUNITY_LIST::comm_read_view, COMMUNITY_LIST::comm_write_view, COMMUNITY_LIST::next, and strcmp().

int SnmpCommunityCreate ( CONST char *  name,
int  readView,
int  writeView 
)

Create a community entry.

Parameters:
name Community name.
readView View index for read access, obtained from a previous call to SnmpViewCreate().
writeView View index for write access, obtained from a previous call to SnmpViewCreate().
Returns:
0 on success, -1 otherwise.

Definition at line 148 of file snmp_config.c.

References COMMUNITY_LIST::comm_name, COMMUNITY_LIST::comm_read_view, COMMUNITY_LIST::comm_write_view, malloc, memset(), COMMUNITY_LIST::next, strcmp(), strcpy(), and strlen().


© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/