net-snmp 5.7
snmp-tc.h
00001 #ifndef SNMP_TC_H
00002 #define SNMP_TC_H
00003 
00004 #ifdef __cplusplus
00005 extern          "C" {
00006 #endif
00007     /*
00008      * snmp-tc.h: Provide some standard #defines for Textual Convention
00009      * related value information 
00010      */
00011 
00012     int
00013     netsnmp_dateandtime_set_buf_from_vars(u_char *buf, size_t *bufsize,
00014                                           u_short y, u_char mon, u_char d,
00015                                           u_char h, u_char min, u_char s,
00016                                           u_char deci_seconds,
00017                                           int utc_offset_direction,
00018                                           u_char utc_offset_hours,
00019                                           u_char utc_offset_minutes);
00020 
00021     NETSNMP_IMPORT
00022     u_char         *date_n_time(const time_t *, size_t *);
00023     time_t          ctime_to_timet(const char *);
00024 
00025     /*
00026      * TrueValue 
00027      */
00028 #define TV_TRUE 1
00029 #define TV_FALSE 2
00030 
00031     /*
00032      * RowStatus 
00033      */
00034 #define RS_NONEXISTENT    0
00035 #define RS_ACTIVE               1
00036 #define RS_NOTINSERVICE         2
00037 #define RS_NOTREADY             3
00038 #define RS_CREATEANDGO          4
00039 #define RS_CREATEANDWAIT        5
00040 #define RS_DESTROY              6
00041 
00042 #define RS_IS_GOING_ACTIVE( x ) ( x == RS_CREATEANDGO || x == RS_ACTIVE )
00043 #define RS_IS_ACTIVE( x ) ( x == RS_ACTIVE )
00044 #define RS_IS_NOT_ACTIVE( x ) ( ! RS_IS_GOING_ACTIVE(x) )
00045 
00046     /*
00047      * StorageType 
00048      */
00049 #define ST_NONE 0
00050 #define ST_OTHER        1
00051 #define ST_VOLATILE     2
00052 #define ST_NONVOLATILE  3
00053 #define ST_PERMANENT    4
00054 #define ST_READONLY     5
00055 
00056     NETSNMP_IMPORT
00057     char            check_rowstatus_transition(int old_val, int new_val);
00058     NETSNMP_IMPORT
00059     char            check_rowstatus_with_storagetype_transition(int old_val, int new_val, int old_storage);
00060     NETSNMP_IMPORT
00061     char            check_storage_transition(int old_val, int new_val);
00062 
00063 #ifdef __cplusplus
00064 }
00065 #endif
00066 #endif                          /* SNMP_TC_H */