net-snmp 5.7
snmpv3.h
00001 /*
00002  * snmpv3.h
00003  */
00004 
00005 #ifndef SNMPV3_H
00006 #define SNMPV3_H
00007 
00008 #ifdef __cplusplus
00009 extern          "C" {
00010 #endif
00011 
00012 #define MAX_ENGINEID_LENGTH 32 /* per SNMP-FRAMEWORK-MIB SnmpEngineID TC */
00013 
00014 #define ENGINEID_TYPE_IPV4    1
00015 #define ENGINEID_TYPE_IPV6    2
00016 #define ENGINEID_TYPE_MACADDR 3
00017 #define ENGINEID_TYPE_TEXT    4
00018 #define ENGINEID_TYPE_EXACT   5
00019 #define ENGINEID_TYPE_NETSNMP_RND 128
00020 
00021 #define DEFAULT_NIC "eth0"
00022 
00023     NETSNMP_IMPORT
00024     int             setup_engineID(u_char ** eidp, const char *text);
00025     void            engineID_conf(const char *word, char *cptr);
00026     void            engineBoots_conf(const char *, char *);
00027     void            engineIDType_conf(const char *, char *);
00028     void            engineIDNic_conf(const char *, char *);
00029     NETSNMP_IMPORT
00030     void            init_snmpv3(const char *);
00031     int             init_snmpv3_post_config(int majorid, int minorid,
00032                                             void *serverarg,
00033                                             void *clientarg);
00034     int             init_snmpv3_post_premib_config(int majorid,
00035                                                    int minorid,
00036                                                    void *serverarg,
00037                                                    void *clientarg);
00038     void            shutdown_snmpv3(const char *type);
00039     int             snmpv3_store(int majorID, int minorID, void *serverarg,
00040                                  void *clientarg);
00041     NETSNMP_IMPORT
00042     u_long          snmpv3_local_snmpEngineBoots(void);
00043     int             snmpv3_clone_engineID(u_char **, size_t *, u_char *,
00044                                           size_t);
00045     NETSNMP_IMPORT
00046     size_t          snmpv3_get_engineID(u_char * buf, size_t buflen);
00047     NETSNMP_IMPORT
00048     u_char         *snmpv3_generate_engineID(size_t *);
00049     NETSNMP_IMPORT
00050     u_long          snmpv3_local_snmpEngineTime(void);
00051     int             get_default_secLevel(void);
00052     void            snmpv3_set_engineBootsAndTime(int boots, int ttime);
00053     int             free_engineID(int majorid, int minorid, void *serverarg,
00054                                   void *clientarg);
00055     NETSNMP_IMPORT
00056     int             parse_secLevel_conf(const char* word, char *cptr);
00057 
00058 #ifdef __cplusplus
00059 }
00060 #endif
00061 #endif                          /* SNMPV3_H */