1 #ifndef SNMP_TC_H
2 #define SNMP_TC_H
3 
4 #ifdef __cplusplus
5 extern          "C" {
6 #endif
7     /*
8      * snmp-tc.h: Provide some standard #defines for Textual Convention
9      * related value information
10      */
11 
12     int
13     netsnmp_dateandtime_set_buf_from_vars(u_char *buf, size_t *bufsize,
14                                           u_short y, u_char mon, u_char d,
15                                           u_char h, u_char min, u_char s,
16                                           u_char deci_seconds,
17                                           int utc_offset_direction,
18                                           u_char utc_offset_hours,
19                                           u_char utc_offset_minutes);
20 
21     NETSNMP_IMPORT
22     u_char         *date_n_time(const time_t *, size_t *);
23     time_t          ctime_to_timet(const char *);
24 
25     /*
26      * TrueValue
27      */
28 #define TV_TRUE 1
29 #define TV_FALSE 2
30 
31     /*
32      * RowStatus
33      */
34 #define RS_NONEXISTENT    0
35 #define RS_ACTIVE	        1
36 #define RS_NOTINSERVICE	        2
37 #define RS_NOTREADY	        3
38 #define RS_CREATEANDGO	        4
39 #define RS_CREATEANDWAIT	5
40 #define RS_DESTROY		6
41 
42 #define RS_IS_GOING_ACTIVE( x ) ( x == RS_CREATEANDGO || x == RS_ACTIVE )
43 #define RS_IS_ACTIVE( x ) ( x == RS_ACTIVE )
44 #define RS_IS_NOT_ACTIVE( x ) ( ! RS_IS_GOING_ACTIVE(x) )
45 
46     /*
47      * StorageType
48      */
49 #define ST_NONE 0
50 #define ST_OTHER	1
51 #define ST_VOLATILE	2
52 #define ST_NONVOLATILE	3
53 #define ST_PERMANENT	4
54 #define ST_READONLY	5
55 
56     NETSNMP_IMPORT
57     char            check_rowstatus_transition(int old_val, int new_val);
58     NETSNMP_IMPORT
59     char            check_rowstatus_with_storagetype_transition(int old_val, int new_val, int old_storage);
60     NETSNMP_IMPORT
61     char            check_storage_transition(int old_val, int new_val);
62 
63 #ifdef __cplusplus
64 }
65 #endif
66 #endif                          /* SNMP_TC_H */
67